{"version":3,"file":"vue-DrhPNF8w.js","sources":["../../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../../node_modules/vue-demi/lib/index.mjs","../../../node_modules/pinia/dist/pinia.mjs","../../../node_modules/vue-select/dist/vue-select.es.js","../../../app/javascript/constants/components.js","../../../app/javascript/components/shared/icons/Icon.vue","../../../app/javascript/constants/app.js","../../../app/javascript/composables/use-env.js","../../../app/javascript/components/shared/dev/Debug.vue","../../../app/javascript/components/shared/core/FlashMessageContainer.vue","../../../app/javascript/images/getStartedIllus.png","../../../app/javascript/components/shared/core/CountIndicator.vue","../../../app/javascript/components/shared/transitions/TransitionGrow.vue","../../../app/javascript/composables/use-empty-slots-check.js","../../../app/javascript/helpers/url.js","../../../app/javascript/composables/use-local-storage.js","../../../node_modules/vue-router/dist/vue-router.mjs","../../../app/javascript/composables/use-routing.js","../../../app/javascript/components/shared/buttons/ActionButton.vue","../../../app/javascript/components/shared/modals/Modal.vue","../../../app/javascript/composables/use-navigation.js","../../../node_modules/ky/distribution/errors/HTTPError.js","../../../node_modules/ky/distribution/errors/TimeoutError.js","../../../node_modules/ky/distribution/utils/is.js","../../../node_modules/ky/distribution/utils/merge.js","../../../node_modules/ky/distribution/core/constants.js","../../../node_modules/ky/distribution/utils/normalize.js","../../../node_modules/ky/distribution/utils/timeout.js","../../../node_modules/ky/distribution/utils/delay.js","../../../node_modules/ky/distribution/utils/options.js","../../../node_modules/ky/distribution/core/Ky.js","../../../node_modules/ky/distribution/index.js","../../../app/javascript/constants/errors.js","../../../app/javascript/services/response-error.js","../../../app/javascript/services/http.js","../../../app/javascript/helpers/string.js","../../../app/javascript/helpers/object.js","../../../node_modules/@sentry/core/build/esm/debug-build.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/version.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/worldwide.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/debug-build.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/logger.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/stacktrace.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","../../../node_modules/@sentry/core/build/esm/carrier.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/is.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/browser.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/string.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/object.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/time.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/misc.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/syncpromise.js","../../../node_modules/@sentry/core/build/esm/session.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/propagationContext.js","../../../node_modules/@sentry/core/build/esm/utils/merge.js","../../../node_modules/@sentry/core/build/esm/utils/spanOnScope.js","../../../node_modules/@sentry/core/build/esm/scope.js","../../../node_modules/@sentry/core/build/esm/defaultScopes.js","../../../node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","../../../node_modules/@sentry/core/build/esm/asyncContext/index.js","../../../node_modules/@sentry/core/build/esm/currentScopes.js","../../../node_modules/@sentry/core/build/esm/metrics/metric-summary.js","../../../node_modules/@sentry/core/build/esm/semanticAttributes.js","../../../node_modules/@sentry/core/build/esm/tracing/spanstatus.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/baggage.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/tracing.js","../../../node_modules/@sentry/core/build/esm/utils/spanUtils.js","../../../node_modules/@sentry/core/build/esm/tracing/errors.js","../../../node_modules/@sentry/core/build/esm/tracing/utils.js","../../../node_modules/@sentry/core/build/esm/utils/hasTracingEnabled.js","../../../node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","../../../node_modules/@sentry/core/build/esm/constants.js","../../../node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","../../../node_modules/@sentry/core/build/esm/tracing/logSpans.js","../../../node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","../../../node_modules/@sentry/core/build/esm/tracing/sampling.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/memo.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/normalize.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","../../../node_modules/@sentry/core/build/esm/envelope.js","../../../node_modules/@sentry/core/build/esm/tracing/measurement.js","../../../node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","../../../node_modules/@sentry/core/build/esm/tracing/trace.js","../../../node_modules/@sentry/core/build/esm/tracing/idleSpan.js","../../../node_modules/@sentry/core/build/esm/eventProcessors.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/debug-ids.js","../../../node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","../../../node_modules/@sentry/core/build/esm/utils/prepareEvent.js","../../../node_modules/@sentry/core/build/esm/exports.js","../../../node_modules/@sentry/core/build/esm/api.js","../../../node_modules/@sentry/core/build/esm/integration.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/error.js","../../../node_modules/@sentry/core/build/esm/baseclient.js","../../../node_modules/@sentry/core/build/esm/sdk.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","../../../node_modules/@sentry/core/build/esm/transports/base.js","../../../node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../../node_modules/@sentry/core/build/esm/utils/traceData.js","../../../node_modules/@sentry/core/build/esm/breadcrumbs.js","../../../node_modules/@sentry/core/build/esm/integrations/functiontostring.js","../../../node_modules/@sentry/core/build/esm/integrations/inboundfilters.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/url.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/severity.js","../../../node_modules/@sentry/core/build/esm/integrations/dedupe.js","../../../node_modules/@sentry/core/build/esm/fetch.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/supports.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/env.js","../../../node_modules/@sentry/core/build/esm/utils-hoist/vendor/supportsHistory.js","../../../node_modules/@sentry/browser/build/npm/esm/helpers.js","../../../node_modules/@sentry/browser/build/npm/esm/debug-build.js","../../../node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","../../../node_modules/@sentry/browser/build/npm/esm/userfeedback.js","../../../node_modules/@sentry/browser/build/npm/esm/client.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/types.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/onHidden.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onFCP.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getCLS.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getFID.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/interactions.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenIdle.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getINP.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getLCP.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onTTFB.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/instrument.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/utils.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/cls.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/browserMetrics.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/inp.js","../../../node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","../../../node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","../../../node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","../../../node_modules/@sentry/browser/build/npm/esm/sdk.js","../../../node_modules/@sentry/browser/build/npm/esm/tracing/request.js","../../../node_modules/@sentry/browser/build/npm/esm/tracing/backgroundtab.js","../../../node_modules/@sentry/browser/build/npm/esm/tracing/browserTracingIntegration.js","../../../node_modules/@sentry/vue/build/esm/constants.js","../../../node_modules/@sentry/vue/build/esm/debug-build.js","../../../node_modules/@sentry/vue/build/esm/vendor/components.js","../../../node_modules/@sentry/vue/build/esm/errorhandler.js","../../../node_modules/@sentry/vue/build/esm/tracing.js","../../../node_modules/@sentry/vue/build/esm/integration.js","../../../node_modules/@sentry/vue/build/esm/sdk.js","../../../node_modules/@sentry/vue/build/esm/router.js","../../../node_modules/@sentry/vue/build/esm/browserTracingIntegration.js","../../../app/javascript/composables/use-error-handling.js","../../../app/javascript/composables/use-auth.js","../../../app/javascript/api/base.api.js","../../../app/javascript/api/model.api.js","../../../app/javascript/models/base.model.js","../../../app/javascript/models/user.model.js","../../../app/javascript/api/user.api.js","../../../app/javascript/store/data.store.js","../../../app/javascript/composables/use-current-user.js","../../../app/javascript/models/organization.model.js","../../../app/javascript/api/organization.api.js","../../../app/javascript/images/sms-custom.svg","../../../app/javascript/images/slack.svg","../../../app/javascript/images/ms-teams.svg","../../../app/javascript/images/email.svg","../../../app/javascript/images/whatsapp.svg","../../../app/javascript/constants/address-types.js","../../../app/javascript/composables/use-current-organization.js","../../../app/javascript/components/shared/modals/GetStartedModal.vue","../../../app/javascript/composables/use-timezone.js","../../../app/javascript/helpers/array.js","../../../app/javascript/helpers/options.js","../../../app/javascript/constants/date-and-time.js","../../../app/javascript/helpers/date-and-time.js","../../../app/javascript/composables/use-date.js","../../../app/javascript/components/shared/transform/DateTime.vue","../../../app/javascript/components/shared/links/TextLink.vue","../../../app/javascript/composables/use-document.js","../../../app/javascript/store/page.store.js","../../../node_modules/@vueuse/shared/index.mjs","../../../node_modules/@vueuse/core/index.mjs","../../../app/javascript/composables/use-page.js","../../../app/javascript/composables/use-timezone-detection.js","../../../app/javascript/composables/use-value-toggle.js","../../../app/javascript/constants/statuses.js","../../../app/javascript/store/flash-messages.store.js","../../../app/javascript/composables/use-flash-messages.js","../../../app/javascript/composables/use-legacy-frontend.js","../../../app/javascript/App.vue","../../../app/javascript/components/shared/transitions/TransitionFadeIn.vue","../../../app/javascript/components/shared/page/SidePanelWrapper.vue","../../../app/javascript/components/shared/page/PageBlockHeader.vue","../../../app/javascript/composables/use-scroll-into-view.js","../../../app/javascript/components/shared/page/PageBlock.vue","../../../app/javascript/components/shared/tabs/TabMenu.vue","../../../app/javascript/components/shared/tabs/TabNavigation.vue","../../../app/javascript/components/shared/core/Alert.vue","../../../app/javascript/components/shared/transform/ErrorMessage.vue","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/@floating-ui/vue/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs","../../../app/javascript/components/shared/core/Tooltip.vue","../../../node_modules/date-fns/toDate.mjs","../../../node_modules/date-fns/constructFrom.mjs","../../../node_modules/date-fns/addDays.mjs","../../../node_modules/date-fns/addMonths.mjs","../../../node_modules/date-fns/add.mjs","../../../node_modules/date-fns/addMilliseconds.mjs","../../../node_modules/date-fns/constants.mjs","../../../node_modules/date-fns/addHours.mjs","../../../node_modules/date-fns/_lib/defaultOptions.mjs","../../../node_modules/date-fns/startOfWeek.mjs","../../../node_modules/date-fns/startOfISOWeek.mjs","../../../node_modules/date-fns/getISOWeekYear.mjs","../../../node_modules/date-fns/startOfDay.mjs","../../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../../../node_modules/date-fns/differenceInCalendarDays.mjs","../../../node_modules/date-fns/startOfISOWeekYear.mjs","../../../node_modules/date-fns/addQuarters.mjs","../../../node_modules/date-fns/addYears.mjs","../../../node_modules/date-fns/compareAsc.mjs","../../../node_modules/date-fns/isDate.mjs","../../../node_modules/date-fns/isValid.mjs","../../../node_modules/date-fns/getQuarter.mjs","../../../node_modules/date-fns/differenceInCalendarYears.mjs","../../../node_modules/date-fns/differenceInYears.mjs","../../../node_modules/date-fns/eachDayOfInterval.mjs","../../../node_modules/date-fns/startOfQuarter.mjs","../../../node_modules/date-fns/eachQuarterOfInterval.mjs","../../../node_modules/date-fns/startOfMonth.mjs","../../../node_modules/date-fns/endOfYear.mjs","../../../node_modules/date-fns/startOfYear.mjs","../../../node_modules/date-fns/endOfWeek.mjs","../../../node_modules/date-fns/endOfQuarter.mjs","../../../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../../../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../../../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../../../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../../../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../../../node_modules/date-fns/locale/en-US/_lib/match.mjs","../../../node_modules/date-fns/locale/en-US.mjs","../../../node_modules/date-fns/getDayOfYear.mjs","../../../node_modules/date-fns/getISOWeek.mjs","../../../node_modules/date-fns/getWeekYear.mjs","../../../node_modules/date-fns/startOfWeekYear.mjs","../../../node_modules/date-fns/getWeek.mjs","../../../node_modules/date-fns/_lib/addLeadingZeros.mjs","../../../node_modules/date-fns/_lib/format/lightFormatters.mjs","../../../node_modules/date-fns/_lib/format/formatters.mjs","../../../node_modules/date-fns/_lib/format/longFormatters.mjs","../../../node_modules/date-fns/_lib/protectedTokens.mjs","../../../node_modules/date-fns/format.mjs","../../../node_modules/date-fns/getDay.mjs","../../../node_modules/date-fns/getDaysInMonth.mjs","../../../node_modules/date-fns/getDefaultOptions.mjs","../../../node_modules/date-fns/getHours.mjs","../../../node_modules/date-fns/getISODay.mjs","../../../node_modules/date-fns/getMinutes.mjs","../../../node_modules/date-fns/getMonth.mjs","../../../node_modules/date-fns/getSeconds.mjs","../../../node_modules/date-fns/getYear.mjs","../../../node_modules/date-fns/isAfter.mjs","../../../node_modules/date-fns/isBefore.mjs","../../../node_modules/date-fns/isEqual.mjs","../../../node_modules/date-fns/transpose.mjs","../../../node_modules/date-fns/parse/_lib/Setter.mjs","../../../node_modules/date-fns/parse/_lib/Parser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/EraParser.mjs","../../../node_modules/date-fns/parse/_lib/constants.mjs","../../../node_modules/date-fns/parse/_lib/utils.mjs","../../../node_modules/date-fns/parse/_lib/parsers/YearParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs","../../../node_modules/date-fns/setWeek.mjs","../../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs","../../../node_modules/date-fns/setISOWeek.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/DateParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs","../../../node_modules/date-fns/setDay.mjs","../../../node_modules/date-fns/parse/_lib/parsers/DayParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs","../../../node_modules/date-fns/setISODay.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs","../../../node_modules/date-fns/parse/_lib/parsers.mjs","../../../node_modules/date-fns/parse.mjs","../../../node_modules/date-fns/isSameQuarter.mjs","../../../node_modules/date-fns/subDays.mjs","../../../node_modules/date-fns/setMonth.mjs","../../../node_modules/date-fns/set.mjs","../../../node_modules/date-fns/setHours.mjs","../../../node_modules/date-fns/setMilliseconds.mjs","../../../node_modules/date-fns/setMinutes.mjs","../../../node_modules/date-fns/setSeconds.mjs","../../../node_modules/date-fns/setYear.mjs","../../../node_modules/date-fns/subMonths.mjs","../../../node_modules/date-fns/sub.mjs","../../../node_modules/date-fns/subYears.mjs","../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js","../../../app/javascript/components/shared/transitions/TransitionDropdown.vue","../../../node_modules/vue3-emoji-picker/dist/emoji-picker.es.js","../../../app/javascript/composables/use-visibility-toggle.js","../../../app/javascript/components/shared/form/EmojiPicker.vue","../../../app/javascript/components/shared/form/CharacterLimitIndicator.vue","../../../app/javascript/composables/use-focus.js","../../../app/javascript/composables/use-text-insertion.js","../../../app/javascript/composables/use-capybara-peace-treaty.js","../../../app/javascript/components/shared/form/TextInput.vue","../../../app/javascript/components/shared/form/DateInput.vue","../../../app/javascript/components/shared/form/SelectInput.vue","../../../app/javascript/components/analytics/AnalyticsFilter.vue","../../../app/javascript/components/shared/dropdown/FiltersDropdownPanel.vue","../../../app/javascript/components/shared/form/PillButtonList.vue","../../../app/javascript/components/shared/filters/DeliveryMethodsFilter.vue","../../../app/javascript/components/shared/form/IconLabelInput.vue","../../../app/javascript/models/channel.model.js","../../../app/javascript/api/common-channels.api.js","../../../app/javascript/components/analytics/AdvancedAnalyticsFilter.vue","../../../app/javascript/components/shared/cards/InfoCard.vue","../../../app/javascript/helpers/numbers.js","../../../app/javascript/components/shared/transform/Percentage.vue","../../../app/javascript/components/analytics/AnalyticsInsightCards.vue","../../../app/javascript/components/shared/table/TableBody.vue","../../../app/javascript/components/shared/table/TableRow.vue","../../../app/javascript/components/shared/table/TableCell.vue","../../../app/javascript/components/shared/table/TableSort.vue","../../../app/javascript/components/shared/table/Pagination.vue","../../../app/javascript/composables/use-item-selection.js","../../../app/javascript/components/shared/table/OverviewTable.vue","../../../app/javascript/components/shared/form/SearchInput.vue","../../../app/javascript/components/shared/transform/LabelValue.vue","../../../app/javascript/components/shared/core/ProgressBar.vue","../../../app/javascript/constants/data-exports.js","../../../app/javascript/components/shared/export/ExportStatusBar.vue","../../../app/javascript/models/data-export.model.js","../../../app/javascript/api/data-exports.api.js","../../../app/javascript/composables/use-data-export-status.js","../../../app/javascript/components/shared/export/ExportStatusBarDynamic.vue","../../../app/javascript/api/analytics.api.js","../../../app/javascript/composables/use-data-export-request.js","../../../app/javascript/components/analytics/AnalyticsDashboardLearners.vue","../../../app/javascript/components/analytics/AnalyticsDashboardCourses.vue","../../../app/javascript/components/analytics/AnalyticsDashboardCohorts.vue","../../../app/javascript/api/responses.api.js","../../../app/javascript/components/analytics/AnalyticsDashboardResponses.vue","../../../app/javascript/components/shared/transform/Number.vue","../../../app/javascript/composables/use-stored-setting.js","../../../app/javascript/components/analytics/AnalyticsDashboardEngagement.vue","../../../app/javascript/components/shared/transform/UserName.vue","../../../app/javascript/components/shared/transform/Inflect.vue","../../../app/javascript/components/analytics/AnalyticsDashboardDropOffs.vue","../../../app/javascript/constants/languages.js","../../../app/javascript/constants/courses.js","../../../app/javascript/composables/use-alphabet.js","../../../app/javascript/components/analytics/AnalyticsDashboardSubstepDetails.vue","../../../node_modules/@kurkle/color/dist/color.esm.js","../../../node_modules/chart.js/dist/chunks/helpers.segment.js","../../../node_modules/chart.js/dist/chart.js","../../../node_modules/vue-chartjs/dist/index.js","../../../app/javascript/components/analytics/LineChart.vue","../../../app/javascript/helpers/boolean.js","../../../app/javascript/composables/use-tabs.js","../../../app/javascript/views/analytics/AnalyticsDashboard.vue","../../../app/javascript/components/automations/DropdownConditionEditor.vue","../../../app/javascript/components/automations/TextConditionEditor.vue","../../../app/javascript/components/automations/ConditionEditor.vue","../../../app/javascript/components/shared/flow/SavedIndicator.vue","../../../node_modules/@vuelidate/validators/dist/index.mjs","../../../app/javascript/composables/use-validators.js","../../../node_modules/@vuelidate/core/dist/index.mjs","../../../app/javascript/constants/automations.js","../../../app/javascript/models/automation.model.js","../../../app/javascript/api/automations.api.js","../../../app/javascript/composables/use-automation-validation.js","../../../app/javascript/composables/use-automation-preview.js","../../../app/javascript/composables/use-automation-dropdown-options.js","../../../app/javascript/components/automations/AutomationsForm.vue","../../../app/javascript/composables/use-automation-editing.js","../../../app/javascript/views/automations/AutomationsEdit.vue","../../../app/javascript/components/shared/search/ListItemsContainer.vue","../../../app/javascript/composables/use-keyboard-item-selection.js","../../../app/javascript/components/shared/search/SearchPanel.vue","../../../app/javascript/components/automations/AutomationStatus.vue","../../../app/javascript/components/shared/dropdown/DropdownMenuItem.vue","../../../app/javascript/components/shared/dropdown/ActionsDropdownMenu.vue","../../../app/javascript/components/automations/AutomationActionsMenu.vue","../../../app/javascript/composables/use-items-per-page.js","../../../app/javascript/composables/use-querying.js","../../../app/javascript/composables/use-search.js","../../../app/javascript/views/automations/AutomationsOverview.vue","../../../app/javascript/composables/use-automation-creation.js","../../../app/javascript/views/automations/AutomationsNew.vue","../../../app/javascript/components/cohorts/ConfirmCohortRemovalModal.vue","../../../app/javascript/components/shared/page/SidePanel.vue","../../../app/javascript/components/shared/flow/Flow.vue","../../../app/javascript/api/timezones.api.js","../../../app/javascript/composables/use-timezones.js","../../../app/javascript/components/shared/form/TimezoneSelectInput.vue","../../../app/javascript/components/shared/form/RadioButtonList.vue","../../../app/javascript/constants/cohorts.js","../../../app/javascript/models/cohort.model.js","../../../app/javascript/api/cohorts.api.js","../../../app/javascript/composables/use-cohort-validation.js","../../../app/javascript/components/cohorts/CohortCreateFlowDetailsStep.vue","../../../node_modules/mime/dist/types/other.js","../../../node_modules/mime/dist/types/standard.js","../../../node_modules/mime/dist/src/Mime.js","../../../node_modules/mime/dist/src/index.js","../../../app/javascript/constants/file-types.js","../../../app/javascript/helpers/file.js","../../../app/javascript/composables/use-file-size.js","../../../app/javascript/components/shared/transform/FileSize.vue","../../../app/javascript/api/image.api.js","../../../app/javascript/composables/use-image-source.js","../../../app/javascript/composables/use-image.js","../../../app/javascript/components/shared/image/ImageCard.vue","../../../app/javascript/composables/use-file-upload-state.js","../../../app/javascript/components/shared/file/FileDetails.vue","../../../app/javascript/composables/use-file-selection.js","../../../app/javascript/components/shared/file/FileSelect.vue","../../../app/javascript/components/cohorts/CohortCsvUploadFormField.vue","../../../app/javascript/components/cohorts/CohortCreateFlowLearnersStepCsv.vue","../../../app/javascript/models/address.model.js","../../../app/javascript/constants/fields.js","../../../app/javascript/constants/metadata.js","../../../app/javascript/models/metadata-field.model.js","../../../app/javascript/models/learner.model.js","../../../app/javascript/api/learners.api.js","../../../app/javascript/components/shared/form/LearnerPicker.vue","../../../app/javascript/composables/use-relative-dates.js","../../../app/javascript/components/shared/form/RelativeDateInput.vue","../../../app/javascript/components/shared/rules/FieldRule.vue","../../../app/javascript/constants/user.js","../../../app/javascript/api/metadata-fields.api.js","../../../app/javascript/composables/use-metadata-fields.js","../../../app/javascript/composables/use-metadata-field-options.js","../../../app/javascript/composables/use-cohort-rule-management.js","../../../app/javascript/components/cohorts/CohortRulesManagement.vue","../../../app/javascript/components/cohorts/CohortCreateFlowLearnersStepDynamic.vue","../../../app/javascript/composables/use-cohort-csv-file.js","../../../app/javascript/composables/use-cohort-creation.js","../../../app/javascript/composables/use-steps.js","../../../app/javascript/components/cohorts/CohortCreateFlow.vue","../../../app/javascript/api/cohort-creators.api.js","../../../app/javascript/components/cohorts/CohortsFilter.vue","../../../app/javascript/composables/use-item-removal.js","../../../app/javascript/composables/use-cohort-removal.js","../../../app/javascript/views/cohorts/CohortsOverview.vue","../../../app/javascript/components/shared/transform/Timezone.vue","../../../app/javascript/components/cohorts/CohortEditRulesPanel.vue","../../../app/javascript/components/cohorts/CohortAddLearnersPreviewStep.vue","../../../app/javascript/components/shared/form/FieldSelectInput.vue","../../../app/javascript/components/shared/csv/CSVSampleDataPreview.vue","../../../app/javascript/components/shared/csv/CSVColumnMapper.vue","../../../app/javascript/components/cohorts/CohortAddLearnersMapColumnsStep.vue","../../../app/javascript/components/shared/csv/CSVImportErrorsList.vue","../../../app/javascript/models/bulk-upload-error.model.js","../../../app/javascript/api/bulk-upload-errors.api.js","../../../app/javascript/components/cohorts/CohortImportErrors.vue","../../../app/javascript/constants/test.js","../../../app/javascript/composables/use-uuid.js","../../../app/javascript/helpers/random.js","../../../app/javascript/composables/use-fake-progress.js","../../../app/javascript/composables/use-cohort-csv-processing.js","../../../node_modules/papaparse/papaparse.min.js","../../../app/javascript/composables/use-csv-parsing.js","../../../app/javascript/components/cohorts/CohortAddLearnersImportStep.vue","../../../app/javascript/composables/use-metadata-field-creation.js","../../../app/javascript/composables/use-metadata-field-validation.js","../../../app/javascript/components/settings/metadatafields/CreateMetadataFieldModal.vue","../../../node_modules/xlsx/xlsx.mjs","../../../app/javascript/helpers/csv.js","../../../app/javascript/api/cohort-learners.api.js","../../../app/javascript/composables/use-cohort-learner-addition.js","../../../app/javascript/composables/use-suggested-field-options.js","../../../app/javascript/composables/use-csv-preview.js","../../../app/javascript/components/cohorts/CohortAddLearnersPanel.vue","../../../app/javascript/components/cohorts/CohortLearnersFilter.vue","../../../app/javascript/composables/use-cohort-learner-removal.js","../../../app/javascript/components/cohorts/CohortLearnersOverview.vue","../../../app/javascript/components/shared/other/ActivityLineItem.vue","../../../app/javascript/components/cohorts/CohortLogsFilter.vue","../../../app/javascript/composables/use-infinite-scroll.js","../../../app/javascript/models/cohort-log.model.js","../../../app/javascript/api/cohort-logs.api.js","../../../app/javascript/components/cohorts/CohortLogsOverview.vue","../../../app/javascript/components/cohorts/CohortEditDetailsPanel.vue","../../../app/javascript/composables/use-cohort-editing.js","../../../app/javascript/views/cohorts/CohortView.vue","../../../app/javascript/models/tag.model.js","../../../app/javascript/api/global-tags.api.js","../../../app/javascript/composables/use-global-tags.js","../../../app/javascript/components/course_catalog/CourseCatalogFilters.vue","../../../node_modules/dompurify/dist/purify.es.mjs","../../../node_modules/marked/lib/marked.esm.js","../../../app/javascript/constants/html.js","../../../app/javascript/components/shared/transform/Markdown.vue","../../../app/javascript/api/course-catalog.api.js","../../../app/javascript/views/course_catalog/CourseCatalogOverview.vue","../../../app/javascript/views/course_catalog/CourseCatalogView.vue","../../../app/javascript/components/shared/core/SideBySide.vue","../../../app/javascript/components/shared/dev/DevTools.vue","../../../app/javascript/components/shared/dropdown/ExampleDropdown.vue","../../../app/javascript/constants/ai.js","../../../app/javascript/models/llm-task.model.js","../../../app/javascript/api/llm-services.api.js","../../../app/javascript/composables/use-model-refs.js","../../../app/javascript/composables/use-toggle-debounced.js","../../../app/javascript/composables/use-delay.js","../../../app/javascript/composables/use-document-status.js","../../../app/javascript/composables/use-ai-url-document-upload.js","../../../app/javascript/composables/use-ai-document-upload.js","../../../app/javascript/composables/use-ai-suggestions.js","../../../app/javascript/components/courses/ai/CourseAIBuildDescribeStep.vue","../../../app/javascript/components/shared/transform/FormattedText.vue","../../../app/javascript/components/courses/ai/CourseAIPrompts.vue","../../../app/javascript/api/llm-tasks.api.js","../../../app/javascript/composables/use-status-progress.js","../../../app/javascript/composables/use-ai-task-status.js","../../../app/javascript/composables/use-saving-flags.js","../../../app/javascript/components/courses/ai/CourseAIBuildOutlineStep.vue","../../../app/javascript/components/shared/core/StatusIconLabels.vue","../../../app/javascript/components/courses/ai/CourseAIBuildGenerateStep.vue","../../../app/javascript/composables/use-ai-task-loader.js","../../../app/javascript/models/course-substep-answer.model.js","../../../app/javascript/models/course-substep.model.js","../../../app/javascript/models/course-step.model.js","../../../app/javascript/models/schedule.model.js","../../../app/javascript/models/course.model.js","../../../app/javascript/api/courses.api.js","../../../app/javascript/composables/use-ai-course-creation.js","../../../app/javascript/views/courses/CourseAIBuildFlow.vue","../../../app/javascript/components/shared/form/CourseSelectInput.vue","../../../app/javascript/components/courses/ai/CourseAITranslateSelectLanguagesStep.vue","../../../app/javascript/composables/use-ai-task-statuses.js","../../../app/javascript/components/courses/ai/CourseAITranslateGenerateStep.vue","../../../app/javascript/views/courses/CourseAITranslateFlow.vue","../../../app/javascript/components/courses/ai/CourseAIModifyDescribeStep.vue","../../../app/javascript/components/courses/ai/CourseAIModifyGenerateStep.vue","../../../app/javascript/views/courses/CourseAIModifyFlow.vue","../../../app/javascript/api/video.api.js","../../../app/javascript/composables/use-video-source.js","../../../app/javascript/composables/use-video.js","../../../app/javascript/components/shared/video/VideoCard.vue","../../../app/javascript/composables/use-image-upload.js","../../../app/javascript/composables/use-video-upload.js","../../../app/javascript/components/shared/form/MediaInput.vue","../../../app/javascript/composables/use-dedicated-sms-address.js","../../../app/javascript/components/courses/editor/DedicatedSmsAddressField.vue","../../../app/javascript/components/shared/file/MediaUrlPreviewCard.vue","../../../app/javascript/composables/use-thumbnail-extraction.js","../../../app/javascript/components/shared/video/SelectThumbnailModal.vue","../../../app/javascript/composables/use-course-validation.js","../../../app/javascript/models/content-type.model.js","../../../app/javascript/api/content-types.api.js","../../../app/javascript/composables/use-content-types.js","../../../app/javascript/api/tags.api.js","../../../app/javascript/composables/use-organization-tags.js","../../../app/javascript/api/urls.api.js","../../../app/javascript/composables/use-video-url-metadata.js","../../../app/javascript/composables/use-video-url-validation.js","../../../app/javascript/components/courses/CourseEditDetailsStep.vue","../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js","../../../app/javascript/components/shared/page/PageOutlineBlockItem.vue","../../../app/javascript/composables/use-course-content-checks.js","../../../app/javascript/components/courses/editor/AddContentSelector.vue","../../../app/javascript/components/courses/editor/CourseOutline.vue","../../../app/javascript/components/shared/form/CollapsibleHeader.vue","../../../app/javascript/components/courses/CourseSubstepName.vue","../../../app/javascript/components/courses/editor/SubstepPrompt.vue","../../../app/javascript/components/courses/editor/MultipleChoiceAnswerBlock.vue","../../../app/javascript/components/courses/editor/SubstepMultipleChoice.vue","../../../app/javascript/components/courses/editor/SubstepAiEvaluated.vue","../../../app/javascript/components/courses/editor/SubstepSingleResponse.vue","../../../app/javascript/composables/use-collapsible.js","../../../app/javascript/components/courses/editor/CourseSubstepBlock.vue","../../../app/javascript/components/courses/editor/AddQuestionSelector.vue","../../../app/javascript/components/courses/editor/WhatsappAlert.vue","../../../app/javascript/components/courses/editor/CourseStepBlock.vue","../../../app/javascript/components/courses/modals/ModifySubstepBaseModal.vue","../../../app/javascript/composables/use-course-substep-optimization.js","../../../app/javascript/components/courses/modals/OptimizeSubstepModal.vue","../../../app/javascript/composables/use-course-substep-generation.js","../../../app/javascript/components/courses/modals/GenerateSubstepModal.vue","../../../app/javascript/components/shared/modals/LearnMoreModal.vue","../../../app/javascript/constants/translations.js","../../../app/javascript/api/translations.api.js","../../../app/javascript/composables/use-translations.js","../../../app/javascript/composables/use-item-to-remove.js","../../../app/javascript/composables/use-course-step-management.js","../../../app/javascript/components/courses/CourseEditLessonsStep.vue","../../../app/javascript/components/courses/CourseEditNudgeStep.vue","../../../app/javascript/components/courses/editor/CourseReferenceField.vue","../../../app/javascript/components/courses/editor/CourseEditReferencesPanel.vue","../../../app/javascript/components/shared/form/InfiniteSelectInput.vue","../../../app/javascript/api/common-learners.api.js","../../../app/javascript/components/shared/form/LearnerSelectInput.vue","../../../app/javascript/composables/use-preview-course-creation.js","../../../app/javascript/components/courses/editor/CoursePreviewPanel.vue","../../../app/javascript/composables/use-course-author.js","../../../app/javascript/composables/use-course-editing.js","../../../app/javascript/views/courses/CourseEdit.vue","../../../app/javascript/components/courses/view/CourseViewReferencesPanel.vue","../../../app/javascript/components/courses/view/CourseDetailsViewSection.vue","../../../app/javascript/components/courses/view/CourseSubstepViewBlock.vue","../../../app/javascript/components/courses/view/CourseStepViewBlock.vue","../../../app/javascript/views/courses/CourseView.vue","../../../app/javascript/composables/use-course-creation.js","../../../app/javascript/views/courses/CourseCreate.vue","../../../app/javascript/components/courses/cards/CourseCardsGrid.vue","../../../app/javascript/components/shared/cards/GridCard.vue","../../../app/javascript/components/courses/CourseStatus.vue","../../../app/javascript/composables/use-element-bounding.js","../../../app/javascript/components/shared/dropdown/ActionsDropdownMenuNested.vue","../../../app/javascript/components/courses/CourseActionsMenu.vue","../../../app/javascript/components/courses/cards/CourseTemplateActionsMenu.vue","../../../app/javascript/components/courses/cards/CourseCard.vue","../../../app/javascript/components/courses/cards/CourseGeneratingCard.vue","../../../app/javascript/models/folder.model.js","../../../app/javascript/components/courses/CoursesFilter.vue","../../../app/javascript/components/shared/core/UndoFlashMessage.vue","../../../app/javascript/components/courses/modals/CourseCreateManualOptionsStep.vue","../../../app/javascript/components/courses/modals/CourseCreateAIOptionsStep.vue","../../../app/javascript/components/courses/modals/CreateCourseModal.vue","../../../app/javascript/components/courses/modals/CreateOrEditFolderModal.vue","../../../app/javascript/api/folders.api.js","../../../app/javascript/components/courses/modals/OrganizeItemModal.vue","../../../app/javascript/components/courses/modals/ConfirmLLMTaskRemovalModal.vue","../../../app/javascript/composables/use-course-management.js","../../../app/javascript/composables/use-folder-management.js","../../../app/javascript/composables/use-llm-task-removal.js","../../../app/javascript/composables/use-undo-move-folder-or-course.js","../../../app/javascript/composables/use-course-and-folder-querying.js","../../../app/javascript/views/courses/CoursesOverview.vue","../../../app/javascript/components/distributions/CourseSelectFormSection.vue","../../../app/javascript/components/distributions/NameFormSection.vue","../../../app/javascript/components/distributions/DeliveryMethodsFormSection.vue","../../../app/javascript/components/shared/form/TimeInput.vue","../../../app/javascript/components/distributions/LessonStartDatesSection.vue","../../../app/javascript/components/distributions/LessonRelativeDaysSection.vue","../../../app/javascript/components/distributions/StartDateFormSection.vue","../../../app/javascript/components/distributions/LessonDaysFormSection.vue","../../../app/javascript/components/distributions/DeliveryTimeFormSection.vue","../../../app/javascript/api/legacy-distributions.api.js","../../../app/javascript/components/distributions/NewEditForm.vue","../../../app/javascript/views/schedules/ScheduleEdit.vue","../../../app/javascript/views/schedules/ScheduleCreate.vue","../../../app/javascript/composables/use-copy-to-clipboard.js","../../../app/javascript/components/shared/form/CopyInput.vue","../../../app/javascript/components/shared/navigation/NavMenuItem.vue","../../../app/javascript/constants/schedules.js","../../../app/javascript/api/schedules.api.js","../../../app/javascript/components/schedules/ManageRecipientsPanel.vue","../../../app/javascript/composables/use-delivery-time-validation.js","../../../app/javascript/views/schedules/SchedulesEnrollmentOptions.vue","../../../app/javascript/api/country-codes.api.js","../../../app/javascript/composables/use-country-codes.js","../../../app/javascript/components/shared/form/CountryCodeSelectInput.vue","../../../app/javascript/composables/use-learner-creation.js","../../../app/javascript/components/learners/AddLearnerPanel.vue","../../../app/javascript/components/learners/ConfirmLearnerRemovalModal.vue","../../../app/javascript/components/learners/LearnerActionsMenu.vue","../../../app/javascript/components/shared/form/CohortSelectInput.vue","../../../app/javascript/components/learners/LearnersFilter.vue","../../../app/javascript/composables/use-learner-removal.js","../../../app/javascript/views/learners/LearnersOverview.vue","../../../app/javascript/components/shared/transform/AddressDisplay.vue","../../../app/javascript/constants/general.js","../../../app/javascript/components/shared/form/MetadataFormField.vue","../../../app/javascript/composables/use-learner-editing.js","../../../app/javascript/api/learner-addresses.api.js","../../../app/javascript/composables/use-learner-address-management.js","../../../app/javascript/components/learners/EditLearnerPanel.vue","../../../app/javascript/constants/enrollments.js","../../../app/javascript/models/enrollment.model.js","../../../app/javascript/api/learner-enrollments.api.js","../../../app/javascript/composables/use-learner-enrollment-creation.js","../../../app/javascript/components/learners/CreateLearnerEnrollmentModal.vue","../../../app/javascript/components/enrollments/EnrollmentStatus.vue","../../../app/javascript/components/enrollments/EnrollmentActionsMenu.vue","../../../app/javascript/components/enrollments/IndividualEnrollmentActionConfirmationModal.vue","../../../app/javascript/composables/use-queue-reordering.js","../../../app/javascript/composables/use-enrollment-queue-editing.js","../../../app/javascript/components/learners/ManageQueueModal.vue","../../../app/javascript/api/enrollments.api.js","../../../app/javascript/composables/use-enrollment-management.js","../../../app/javascript/composables/use-enrollment-actions.js","../../../app/javascript/components/learners/LearnerQueuedEnrollmentsTable.vue","../../../app/javascript/components/learners/LearnerEnrollmentsTable.vue","../../../app/javascript/components/learners/LearnerEnrollmentsOverview.vue","../../../app/javascript/views/learners/LearnerView.vue","../../../app/javascript/components/shared/transform/Truncate.vue","../../../app/javascript/api/my-enrollments.api.js","../../../app/javascript/views/my_enrollments/MyEnrollmentsOverview.vue","../../../app/javascript/components/shared/core/Breadcrumb.vue","../../../app/javascript/composables/use-my-enrollment-editing.js","../../../app/javascript/views/my_enrollments/MyEnrollmentView.vue","../../../app/javascript/components/shared/chart/GanttChartNameCell.vue","../../../app/javascript/composables/use-timeline-date-position.js","../../../app/javascript/components/shared/chart/GanttChartDateCell.vue","../../../app/javascript/composables/use-timeline-dates.js","../../../app/javascript/composables/use-timeline-scroll.js","../../../app/javascript/components/shared/chart/GanttChart.vue","../../../app/javascript/api/schedule-creators.api.js","../../../app/javascript/components/schedules/SchedulesFilter.vue","../../../app/javascript/components/schedules/ScheduleViewPanel.vue","../../../app/javascript/api/course-steps.api.js","../../../app/javascript/components/cohorts/CohortScheduleViewPanel.vue","../../../app/javascript/components/enrollments/EnrollmentScheduleViewPanel.vue","../../../app/javascript/components/schedules/SchedulesTimeline.vue","../../../app/javascript/components/schedules/ConfirmScheduleRemovalModal.vue","../../../app/javascript/components/schedules/ScheduleActionsMenu.vue","../../../app/javascript/components/schedules/ScheduleStatus.vue","../../../app/javascript/composables/use-schedule-removal.js","../../../app/javascript/composables/use-schedule-duplication.js","../../../app/javascript/components/schedules/SchedulesTable.vue","../../../app/javascript/views/schedules/SchedulesOverview.vue","../../../app/javascript/components/distributions/PerformanceGraph.vue","../../../app/javascript/components/schedules/SelectAllBanner.vue","../../../app/javascript/components/shared/transform/HTMLContent.vue","../../../app/javascript/components/enrollments/BulkEnrollmentActionConfirmationModal.vue","../../../app/javascript/api/schedule-enrollments.api.js","../../../app/javascript/composables/use-bulk-enrollment-actions.js","../../../app/javascript/views/schedules/SchedulesLaunchDashboard.vue","../../../app/javascript/components/settings/tags/ConfirmTagRemovalModal.vue","../../../app/javascript/composables/use-tag-validation.js","../../../app/javascript/components/settings/tags/CreateOrEditTagModal.vue","../../../app/javascript/composables/use-tag-creation.js","../../../app/javascript/composables/use-tag-editing.js","../../../app/javascript/composables/use-tag-removal.js","../../../app/javascript/components/settings/tags/TagsOverview.vue","../../../app/javascript/components/settings/channels/ConfirmChannelRemovalModal.vue","../../../app/javascript/api/channels.api.js","../../../app/javascript/composables/use-channel-validation.js","../../../app/javascript/components/settings/channels/CreateOrEditChannelModal.vue","../../../app/javascript/composables/use-channel-creation.js","../../../app/javascript/composables/use-channel-editing.js","../../../app/javascript/composables/use-channel-removal.js","../../../app/javascript/components/settings/channels/ChannelsOverview.vue","../../../app/javascript/constants/organization-system-messages.js","../../../app/javascript/components/settings/organization-system-messages/OrganizationSystemMessageFilter.vue","../../../app/javascript/components/settings/organization-system-messages/ConfirmOrganizationSystemMessageRemovalModal.vue","../../../app/javascript/models/organization-system-message.model.js","../../../app/javascript/api/organization-system-messages.api.js","../../../app/javascript/composables/use-organization-system-message-validation.js","../../../app/javascript/components/settings/organization-system-messages/CreateOrEditOrganizationSystemMessagePanel.vue","../../../app/javascript/composables/use-organization-system-message-creation.js","../../../app/javascript/composables/use-organization-system-message-editing.js","../../../app/javascript/composables/use-organization-system-message-removal.js","../../../app/javascript/components/settings/organization-system-messages/OrganizationSystemMessagesOverview.vue","../../../app/javascript/views/settings/SettingsIndex.vue","../../../app/javascript/components/shared/table/KeyValueTable.vue","../../../app/javascript/api/super-admin.api.js","../../../app/javascript/components/super_admin/EnrollmentChecker.vue","../../../app/javascript/components/shared/other/BarChart.vue","../../../app/javascript/api/organizations.api.js","../../../app/javascript/components/super_admin/KPIQueries.vue","../../../app/javascript/composables/use-organization-validation.js","../../../app/javascript/components/super_admin/CreateOrEditOrganizationModal.vue","../../../app/javascript/components/super_admin/OrganizationActionsMenu.vue","../../../app/javascript/composables/use-organization-editing.js","../../../app/javascript/components/super_admin/OrganizationsOverview.vue","../../../app/javascript/components/super_admin/MessageDeliveries.vue","../../../app/javascript/components/super_admin/ObjectLookupModal.vue","../../../app/javascript/components/super_admin/ObjectLookup.vue","../../../app/javascript/components/super_admin/AristReportsTable.vue","../../../app/javascript/components/super_admin/AristReports.vue","../../../app/javascript/components/super_admin/CapacityTracking.vue","../../../app/javascript/views/super_admin/SuperAdminIndex.vue","../../../app/javascript/components/courses/CourseTemplatesFilter.vue","../../../app/javascript/models/template-course.model.js","../../../app/javascript/api/template-courses.api.js","../../../app/javascript/views/content_library/ContentLibraryOverview.vue","../../../app/javascript/views/content_library/ContentLibraryView.vue","../../../app/javascript/views/PageNotFound.vue","../../../app/javascript/components/shared/form/CheckBoxList.vue","../../../app/javascript/views/ux/UXComponentsReference.vue","../../../app/javascript/routing/routes.js","../../../app/javascript/routing/router.js","../../../app/javascript/services/sentry.js","../../../app/javascript/entrypoints/vue.js"],"sourcesContent":["/**\n* @vue/shared v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n  const map = /* @__PURE__ */ Object.create(null);\n  for (const key of str.split(\",\")) map[key] = 1;\n  return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n  const i = arr.indexOf(el);\n  if (i > -1) {\n    arr.splice(i, 1);\n  }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n  return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n  return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n  // the leading comma is intentional so empty string \"\" is also included\n  \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n  \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction(\n  (str) => {\n    return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n  }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n  (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n  (str) => {\n    const s = str ? `on${capitalize(str)}` : ``;\n    return s;\n  }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n  for (let i = 0; i < fns.length; i++) {\n    fns[i](...arg);\n  }\n};\nconst def = (obj, key, value, writable = false) => {\n  Object.defineProperty(obj, key, {\n    configurable: true,\n    enumerable: false,\n    writable,\n    value\n  });\n};\nconst looseToNumber = (val) => {\n  const n = parseFloat(val);\n  return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n  const n = isString(val) ? Number(val) : NaN;\n  return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n  return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n  return source + JSON.stringify(\n    options,\n    (_, val) => typeof val === \"function\" ? val.toString() : val\n  );\n}\n\nconst PatchFlags = {\n  \"TEXT\": 1,\n  \"1\": \"TEXT\",\n  \"CLASS\": 2,\n  \"2\": \"CLASS\",\n  \"STYLE\": 4,\n  \"4\": \"STYLE\",\n  \"PROPS\": 8,\n  \"8\": \"PROPS\",\n  \"FULL_PROPS\": 16,\n  \"16\": \"FULL_PROPS\",\n  \"NEED_HYDRATION\": 32,\n  \"32\": \"NEED_HYDRATION\",\n  \"STABLE_FRAGMENT\": 64,\n  \"64\": \"STABLE_FRAGMENT\",\n  \"KEYED_FRAGMENT\": 128,\n  \"128\": \"KEYED_FRAGMENT\",\n  \"UNKEYED_FRAGMENT\": 256,\n  \"256\": \"UNKEYED_FRAGMENT\",\n  \"NEED_PATCH\": 512,\n  \"512\": \"NEED_PATCH\",\n  \"DYNAMIC_SLOTS\": 1024,\n  \"1024\": \"DYNAMIC_SLOTS\",\n  \"DEV_ROOT_FRAGMENT\": 2048,\n  \"2048\": \"DEV_ROOT_FRAGMENT\",\n  \"CACHED\": -1,\n  \"-1\": \"CACHED\",\n  \"BAIL\": -2,\n  \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n  [1]: `TEXT`,\n  [2]: `CLASS`,\n  [4]: `STYLE`,\n  [8]: `PROPS`,\n  [16]: `FULL_PROPS`,\n  [32]: `NEED_HYDRATION`,\n  [64]: `STABLE_FRAGMENT`,\n  [128]: `KEYED_FRAGMENT`,\n  [256]: `UNKEYED_FRAGMENT`,\n  [512]: `NEED_PATCH`,\n  [1024]: `DYNAMIC_SLOTS`,\n  [2048]: `DEV_ROOT_FRAGMENT`,\n  [-1]: `HOISTED`,\n  [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n  \"ELEMENT\": 1,\n  \"1\": \"ELEMENT\",\n  \"FUNCTIONAL_COMPONENT\": 2,\n  \"2\": \"FUNCTIONAL_COMPONENT\",\n  \"STATEFUL_COMPONENT\": 4,\n  \"4\": \"STATEFUL_COMPONENT\",\n  \"TEXT_CHILDREN\": 8,\n  \"8\": \"TEXT_CHILDREN\",\n  \"ARRAY_CHILDREN\": 16,\n  \"16\": \"ARRAY_CHILDREN\",\n  \"SLOTS_CHILDREN\": 32,\n  \"32\": \"SLOTS_CHILDREN\",\n  \"TELEPORT\": 64,\n  \"64\": \"TELEPORT\",\n  \"SUSPENSE\": 128,\n  \"128\": \"SUSPENSE\",\n  \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n  \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n  \"COMPONENT_KEPT_ALIVE\": 512,\n  \"512\": \"COMPONENT_KEPT_ALIVE\",\n  \"COMPONENT\": 6,\n  \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n  \"STABLE\": 1,\n  \"1\": \"STABLE\",\n  \"DYNAMIC\": 2,\n  \"2\": \"DYNAMIC\",\n  \"FORWARDED\": 3,\n  \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n  [1]: \"STABLE\",\n  [2]: \"DYNAMIC\",\n  [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n  start = Math.max(0, Math.min(start, source.length));\n  end = Math.max(0, Math.min(end, source.length));\n  if (start > end) return \"\";\n  let lines = source.split(/(\\r?\\n)/);\n  const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n  lines = lines.filter((_, idx) => idx % 2 === 0);\n  let count = 0;\n  const res = [];\n  for (let i = 0; i < lines.length; i++) {\n    count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n    if (count >= start) {\n      for (let j = i - range; j <= i + range || end > count; j++) {\n        if (j < 0 || j >= lines.length) continue;\n        const line = j + 1;\n        res.push(\n          `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}|  ${lines[j]}`\n        );\n        const lineLength = lines[j].length;\n        const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n        if (j === i) {\n          const pad = start - (count - (lineLength + newLineSeqLength));\n          const length = Math.max(\n            1,\n            end > count ? lineLength - pad : end - start\n          );\n          res.push(`   |  ` + \" \".repeat(pad) + \"^\".repeat(length));\n        } else if (j > i) {\n          if (end > count) {\n            const length = Math.max(Math.min(end - count, lineLength), 1);\n            res.push(`   |  ` + \"^\".repeat(length));\n          }\n          count += lineLength + newLineSeqLength;\n        }\n      }\n      break;\n    }\n  }\n  return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n  if (isArray(value)) {\n    const res = {};\n    for (let i = 0; i < value.length; i++) {\n      const item = value[i];\n      const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n      if (normalized) {\n        for (const key in normalized) {\n          res[key] = normalized[key];\n        }\n      }\n    }\n    return res;\n  } else if (isString(value) || isObject(value)) {\n    return value;\n  }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n  const ret = {};\n  cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n    if (item) {\n      const tmp = item.split(propertyDelimiterRE);\n      tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return ret;\n}\nfunction stringifyStyle(styles) {\n  let ret = \"\";\n  if (!styles || isString(styles)) {\n    return ret;\n  }\n  for (const key in styles) {\n    const value = styles[key];\n    if (isString(value) || typeof value === \"number\") {\n      const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n      ret += `${normalizedKey}:${value};`;\n    }\n  }\n  return ret;\n}\nfunction normalizeClass(value) {\n  let res = \"\";\n  if (isString(value)) {\n    res = value;\n  } else if (isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      const normalized = normalizeClass(value[i]);\n      if (normalized) {\n        res += normalized + \" \";\n      }\n    }\n  } else if (isObject(value)) {\n    for (const name in value) {\n      if (value[name]) {\n        res += name + \" \";\n      }\n    }\n  }\n  return res.trim();\n}\nfunction normalizeProps(props) {\n  if (!props) return null;\n  let { class: klass, style } = props;\n  if (klass && !isString(klass)) {\n    props.class = normalizeClass(klass);\n  }\n  if (style) {\n    props.style = normalizeStyle(style);\n  }\n  return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n  return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n  if (attrValidationCache.hasOwnProperty(name)) {\n    return attrValidationCache[name];\n  }\n  const isUnsafe = unsafeAttrCharRE.test(name);\n  if (isUnsafe) {\n    console.error(`unsafe attribute name: ${name}`);\n  }\n  return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n  acceptCharset: \"accept-charset\",\n  className: \"class\",\n  htmlFor: \"for\",\n  httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n  `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n  `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n  `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\n);\nfunction isRenderableAttrValue(value) {\n  if (value == null) {\n    return false;\n  }\n  const type = typeof value;\n  return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n  const str = \"\" + string;\n  const match = escapeRE.exec(str);\n  if (!match) {\n    return str;\n  }\n  let html = \"\";\n  let escaped;\n  let index;\n  let lastIndex = 0;\n  for (index = match.index; index < str.length; index++) {\n    switch (str.charCodeAt(index)) {\n      case 34:\n        escaped = \"&quot;\";\n        break;\n      case 38:\n        escaped = \"&amp;\";\n        break;\n      case 39:\n        escaped = \"&#39;\";\n        break;\n      case 60:\n        escaped = \"&lt;\";\n        break;\n      case 62:\n        escaped = \"&gt;\";\n        break;\n      default:\n        continue;\n    }\n    if (lastIndex !== index) {\n      html += str.slice(lastIndex, index);\n    }\n    lastIndex = index + 1;\n    html += escaped;\n  }\n  return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n  return src.replace(commentStripRE, \"\");\n}\nconst cssVarNameEscapeSymbolsRE = /[ !\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~]/g;\nfunction getEscapedCssVarName(key, doubleEscape) {\n  return key.replace(\n    cssVarNameEscapeSymbolsRE,\n    (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n  );\n}\n\nfunction looseCompareArrays(a, b) {\n  if (a.length !== b.length) return false;\n  let equal = true;\n  for (let i = 0; equal && i < a.length; i++) {\n    equal = looseEqual(a[i], b[i]);\n  }\n  return equal;\n}\nfunction looseEqual(a, b) {\n  if (a === b) return true;\n  let aValidType = isDate(a);\n  let bValidType = isDate(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n  }\n  aValidType = isSymbol(a);\n  bValidType = isSymbol(b);\n  if (aValidType || bValidType) {\n    return a === b;\n  }\n  aValidType = isArray(a);\n  bValidType = isArray(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n  }\n  aValidType = isObject(a);\n  bValidType = isObject(b);\n  if (aValidType || bValidType) {\n    if (!aValidType || !bValidType) {\n      return false;\n    }\n    const aKeysCount = Object.keys(a).length;\n    const bKeysCount = Object.keys(b).length;\n    if (aKeysCount !== bKeysCount) {\n      return false;\n    }\n    for (const key in a) {\n      const aHasKey = a.hasOwnProperty(key);\n      const bHasKey = b.hasOwnProperty(key);\n      if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n        return false;\n      }\n    }\n  }\n  return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n  return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n  return !!(val && val[\"__v_isRef\"] === true);\n};\nconst toDisplayString = (val) => {\n  return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n  if (isRef(val)) {\n    return replacer(_key, val.value);\n  } else if (isMap(val)) {\n    return {\n      [`Map(${val.size})`]: [...val.entries()].reduce(\n        (entries, [key, val2], i) => {\n          entries[stringifySymbol(key, i) + \" =>\"] = val2;\n          return entries;\n        },\n        {}\n      )\n    };\n  } else if (isSet(val)) {\n    return {\n      [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n    };\n  } else if (isSymbol(val)) {\n    return stringifySymbol(val);\n  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n    return String(val);\n  }\n  return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n  var _a;\n  return (\n    // Symbol.description in es2019+ so we need to cast here to pass\n    // the lib: es2016 check\n    isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n  );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { hasChanged, extend, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, toRawType, capitalize, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, NOOP, remove } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n  console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n  constructor(detached = false) {\n    this.detached = detached;\n    /**\n     * @internal\n     */\n    this._active = true;\n    /**\n     * @internal\n     */\n    this.effects = [];\n    /**\n     * @internal\n     */\n    this.cleanups = [];\n    this._isPaused = false;\n    this.parent = activeEffectScope;\n    if (!detached && activeEffectScope) {\n      this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n        this\n      ) - 1;\n    }\n  }\n  get active() {\n    return this._active;\n  }\n  pause() {\n    if (this._active) {\n      this._isPaused = true;\n      let i, l;\n      if (this.scopes) {\n        for (i = 0, l = this.scopes.length; i < l; i++) {\n          this.scopes[i].pause();\n        }\n      }\n      for (i = 0, l = this.effects.length; i < l; i++) {\n        this.effects[i].pause();\n      }\n    }\n  }\n  /**\n   * Resumes the effect scope, including all child scopes and effects.\n   */\n  resume() {\n    if (this._active) {\n      if (this._isPaused) {\n        this._isPaused = false;\n        let i, l;\n        if (this.scopes) {\n          for (i = 0, l = this.scopes.length; i < l; i++) {\n            this.scopes[i].resume();\n          }\n        }\n        for (i = 0, l = this.effects.length; i < l; i++) {\n          this.effects[i].resume();\n        }\n      }\n    }\n  }\n  run(fn) {\n    if (this._active) {\n      const currentEffectScope = activeEffectScope;\n      try {\n        activeEffectScope = this;\n        return fn();\n      } finally {\n        activeEffectScope = currentEffectScope;\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(`cannot run an inactive effect scope.`);\n    }\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  on() {\n    activeEffectScope = this;\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  off() {\n    activeEffectScope = this.parent;\n  }\n  stop(fromParent) {\n    if (this._active) {\n      let i, l;\n      for (i = 0, l = this.effects.length; i < l; i++) {\n        this.effects[i].stop();\n      }\n      for (i = 0, l = this.cleanups.length; i < l; i++) {\n        this.cleanups[i]();\n      }\n      if (this.scopes) {\n        for (i = 0, l = this.scopes.length; i < l; i++) {\n          this.scopes[i].stop(true);\n        }\n      }\n      if (!this.detached && this.parent && !fromParent) {\n        const last = this.parent.scopes.pop();\n        if (last && last !== this) {\n          this.parent.scopes[this.index] = last;\n          last.index = this.index;\n        }\n      }\n      this.parent = void 0;\n      this._active = false;\n    }\n  }\n}\nfunction effectScope(detached) {\n  return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n  return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n  if (activeEffectScope) {\n    activeEffectScope.cleanups.push(fn);\n  } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n    warn(\n      `onScopeDispose() is called when there is no active effect scope to be associated with.`\n    );\n  }\n}\n\nlet activeSub;\nconst EffectFlags = {\n  \"ACTIVE\": 1,\n  \"1\": \"ACTIVE\",\n  \"RUNNING\": 2,\n  \"2\": \"RUNNING\",\n  \"TRACKING\": 4,\n  \"4\": \"TRACKING\",\n  \"NOTIFIED\": 8,\n  \"8\": \"NOTIFIED\",\n  \"DIRTY\": 16,\n  \"16\": \"DIRTY\",\n  \"ALLOW_RECURSE\": 32,\n  \"32\": \"ALLOW_RECURSE\",\n  \"PAUSED\": 64,\n  \"64\": \"PAUSED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n  constructor(fn) {\n    this.fn = fn;\n    /**\n     * @internal\n     */\n    this.deps = void 0;\n    /**\n     * @internal\n     */\n    this.depsTail = void 0;\n    /**\n     * @internal\n     */\n    this.flags = 1 | 4;\n    /**\n     * @internal\n     */\n    this.next = void 0;\n    /**\n     * @internal\n     */\n    this.cleanup = void 0;\n    this.scheduler = void 0;\n    if (activeEffectScope && activeEffectScope.active) {\n      activeEffectScope.effects.push(this);\n    }\n  }\n  pause() {\n    this.flags |= 64;\n  }\n  resume() {\n    if (this.flags & 64) {\n      this.flags &= ~64;\n      if (pausedQueueEffects.has(this)) {\n        pausedQueueEffects.delete(this);\n        this.trigger();\n      }\n    }\n  }\n  /**\n   * @internal\n   */\n  notify() {\n    if (this.flags & 2 && !(this.flags & 32)) {\n      return;\n    }\n    if (!(this.flags & 8)) {\n      batch(this);\n    }\n  }\n  run() {\n    if (!(this.flags & 1)) {\n      return this.fn();\n    }\n    this.flags |= 2;\n    cleanupEffect(this);\n    prepareDeps(this);\n    const prevEffect = activeSub;\n    const prevShouldTrack = shouldTrack;\n    activeSub = this;\n    shouldTrack = true;\n    try {\n      return this.fn();\n    } finally {\n      if (!!(process.env.NODE_ENV !== \"production\") && activeSub !== this) {\n        warn(\n          \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n        );\n      }\n      cleanupDeps(this);\n      activeSub = prevEffect;\n      shouldTrack = prevShouldTrack;\n      this.flags &= ~2;\n    }\n  }\n  stop() {\n    if (this.flags & 1) {\n      for (let link = this.deps; link; link = link.nextDep) {\n        removeSub(link);\n      }\n      this.deps = this.depsTail = void 0;\n      cleanupEffect(this);\n      this.onStop && this.onStop();\n      this.flags &= ~1;\n    }\n  }\n  trigger() {\n    if (this.flags & 64) {\n      pausedQueueEffects.add(this);\n    } else if (this.scheduler) {\n      this.scheduler();\n    } else {\n      this.runIfDirty();\n    }\n  }\n  /**\n   * @internal\n   */\n  runIfDirty() {\n    if (isDirty(this)) {\n      this.run();\n    }\n  }\n  get dirty() {\n    return isDirty(this);\n  }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n  sub.flags |= 8;\n  if (isComputed) {\n    sub.next = batchedComputed;\n    batchedComputed = sub;\n    return;\n  }\n  sub.next = batchedSub;\n  batchedSub = sub;\n}\nfunction startBatch() {\n  batchDepth++;\n}\nfunction endBatch() {\n  if (--batchDepth > 0) {\n    return;\n  }\n  if (batchedComputed) {\n    let e = batchedComputed;\n    batchedComputed = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= ~8;\n      e = next;\n    }\n  }\n  let error;\n  while (batchedSub) {\n    let e = batchedSub;\n    batchedSub = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= ~8;\n      if (e.flags & 1) {\n        try {\n          ;\n          e.trigger();\n        } catch (err) {\n          if (!error) error = err;\n        }\n      }\n      e = next;\n    }\n  }\n  if (error) throw error;\n}\nfunction prepareDeps(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    link.version = -1;\n    link.prevActiveLink = link.dep.activeLink;\n    link.dep.activeLink = link;\n  }\n}\nfunction cleanupDeps(sub) {\n  let head;\n  let tail = sub.depsTail;\n  let link = tail;\n  while (link) {\n    const prev = link.prevDep;\n    if (link.version === -1) {\n      if (link === tail) tail = prev;\n      removeSub(link);\n      removeDep(link);\n    } else {\n      head = link;\n    }\n    link.dep.activeLink = link.prevActiveLink;\n    link.prevActiveLink = void 0;\n    link = prev;\n  }\n  sub.deps = head;\n  sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n      return true;\n    }\n  }\n  if (sub._dirty) {\n    return true;\n  }\n  return false;\n}\nfunction refreshComputed(computed) {\n  if (computed.flags & 4 && !(computed.flags & 16)) {\n    return;\n  }\n  computed.flags &= ~16;\n  if (computed.globalVersion === globalVersion) {\n    return;\n  }\n  computed.globalVersion = globalVersion;\n  const dep = computed.dep;\n  computed.flags |= 2;\n  if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {\n    computed.flags &= ~2;\n    return;\n  }\n  const prevSub = activeSub;\n  const prevShouldTrack = shouldTrack;\n  activeSub = computed;\n  shouldTrack = true;\n  try {\n    prepareDeps(computed);\n    const value = computed.fn(computed._value);\n    if (dep.version === 0 || hasChanged(value, computed._value)) {\n      computed._value = value;\n      dep.version++;\n    }\n  } catch (err) {\n    dep.version++;\n    throw err;\n  } finally {\n    activeSub = prevSub;\n    shouldTrack = prevShouldTrack;\n    cleanupDeps(computed);\n    computed.flags &= ~2;\n  }\n}\nfunction removeSub(link, soft = false) {\n  const { dep, prevSub, nextSub } = link;\n  if (prevSub) {\n    prevSub.nextSub = nextSub;\n    link.prevSub = void 0;\n  }\n  if (nextSub) {\n    nextSub.prevSub = prevSub;\n    link.nextSub = void 0;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && dep.subsHead === link) {\n    dep.subsHead = nextSub;\n  }\n  if (dep.subs === link) {\n    dep.subs = prevSub;\n    if (!prevSub && dep.computed) {\n      dep.computed.flags &= ~4;\n      for (let l = dep.computed.deps; l; l = l.nextDep) {\n        removeSub(l, true);\n      }\n    }\n  }\n  if (!soft && !--dep.sc && dep.map) {\n    dep.map.delete(dep.key);\n  }\n}\nfunction removeDep(link) {\n  const { prevDep, nextDep } = link;\n  if (prevDep) {\n    prevDep.nextDep = nextDep;\n    link.prevDep = void 0;\n  }\n  if (nextDep) {\n    nextDep.prevDep = prevDep;\n    link.nextDep = void 0;\n  }\n}\nfunction effect(fn, options) {\n  if (fn.effect instanceof ReactiveEffect) {\n    fn = fn.effect.fn;\n  }\n  const e = new ReactiveEffect(fn);\n  if (options) {\n    extend(e, options);\n  }\n  try {\n    e.run();\n  } catch (err) {\n    e.stop();\n    throw err;\n  }\n  const runner = e.run.bind(e);\n  runner.effect = e;\n  return runner;\n}\nfunction stop(runner) {\n  runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = false;\n}\nfunction enableTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = true;\n}\nfunction resetTracking() {\n  const last = trackStack.pop();\n  shouldTrack = last === void 0 ? true : last;\n}\nfunction onEffectCleanup(fn, failSilently = false) {\n  if (activeSub instanceof ReactiveEffect) {\n    activeSub.cleanup = fn;\n  } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n    warn(\n      `onEffectCleanup() was called when there was no active effect to associate with.`\n    );\n  }\n}\nfunction cleanupEffect(e) {\n  const { cleanup } = e;\n  e.cleanup = void 0;\n  if (cleanup) {\n    const prevSub = activeSub;\n    activeSub = void 0;\n    try {\n      cleanup();\n    } finally {\n      activeSub = prevSub;\n    }\n  }\n}\n\nlet globalVersion = 0;\nclass Link {\n  constructor(sub, dep) {\n    this.sub = sub;\n    this.dep = dep;\n    this.version = dep.version;\n    this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n  }\n}\nclass Dep {\n  constructor(computed) {\n    this.computed = computed;\n    this.version = 0;\n    /**\n     * Link between this dep and the current active effect\n     */\n    this.activeLink = void 0;\n    /**\n     * Doubly linked list representing the subscribing effects (tail)\n     */\n    this.subs = void 0;\n    /**\n     * For object property deps cleanup\n     */\n    this.map = void 0;\n    this.key = void 0;\n    /**\n     * Subscriber counter\n     */\n    this.sc = 0;\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      this.subsHead = void 0;\n    }\n  }\n  track(debugInfo) {\n    if (!activeSub || !shouldTrack || activeSub === this.computed) {\n      return;\n    }\n    let link = this.activeLink;\n    if (link === void 0 || link.sub !== activeSub) {\n      link = this.activeLink = new Link(activeSub, this);\n      if (!activeSub.deps) {\n        activeSub.deps = activeSub.depsTail = link;\n      } else {\n        link.prevDep = activeSub.depsTail;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n      }\n      addSub(link);\n    } else if (link.version === -1) {\n      link.version = this.version;\n      if (link.nextDep) {\n        const next = link.nextDep;\n        next.prevDep = link.prevDep;\n        if (link.prevDep) {\n          link.prevDep.nextDep = next;\n        }\n        link.prevDep = activeSub.depsTail;\n        link.nextDep = void 0;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n        if (activeSub.deps === link) {\n          activeSub.deps = next;\n        }\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") && activeSub.onTrack) {\n      activeSub.onTrack(\n        extend(\n          {\n            effect: activeSub\n          },\n          debugInfo\n        )\n      );\n    }\n    return link;\n  }\n  trigger(debugInfo) {\n    this.version++;\n    globalVersion++;\n    this.notify(debugInfo);\n  }\n  notify(debugInfo) {\n    startBatch();\n    try {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        for (let head = this.subsHead; head; head = head.nextSub) {\n          if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n            head.sub.onTrigger(\n              extend(\n                {\n                  effect: head.sub\n                },\n                debugInfo\n              )\n            );\n          }\n        }\n      }\n      for (let link = this.subs; link; link = link.prevSub) {\n        if (link.sub.notify()) {\n          ;\n          link.sub.dep.notify();\n        }\n      }\n    } finally {\n      endBatch();\n    }\n  }\n}\nfunction addSub(link) {\n  link.dep.sc++;\n  if (link.sub.flags & 4) {\n    const computed = link.dep.computed;\n    if (computed && !link.dep.subs) {\n      computed.flags |= 4 | 16;\n      for (let l = computed.deps; l; l = l.nextDep) {\n        addSub(l);\n      }\n    }\n    const currentTail = link.dep.subs;\n    if (currentTail !== link) {\n      link.prevSub = currentTail;\n      if (currentTail) currentTail.nextSub = link;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") && link.dep.subsHead === void 0) {\n      link.dep.subsHead = link;\n    }\n    link.dep.subs = link;\n  }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(\n  !!(process.env.NODE_ENV !== \"production\") ? \"Object iterate\" : \"\"\n);\nconst MAP_KEY_ITERATE_KEY = Symbol(\n  !!(process.env.NODE_ENV !== \"production\") ? \"Map keys iterate\" : \"\"\n);\nconst ARRAY_ITERATE_KEY = Symbol(\n  !!(process.env.NODE_ENV !== \"production\") ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n  if (shouldTrack && activeSub) {\n    let depsMap = targetMap.get(target);\n    if (!depsMap) {\n      targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n    }\n    let dep = depsMap.get(key);\n    if (!dep) {\n      depsMap.set(key, dep = new Dep());\n      dep.map = depsMap;\n      dep.key = key;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      dep.track({\n        target,\n        type,\n        key\n      });\n    } else {\n      dep.track();\n    }\n  }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n  const depsMap = targetMap.get(target);\n  if (!depsMap) {\n    globalVersion++;\n    return;\n  }\n  const run = (dep) => {\n    if (dep) {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        dep.trigger({\n          target,\n          type,\n          key,\n          newValue,\n          oldValue,\n          oldTarget\n        });\n      } else {\n        dep.trigger();\n      }\n    }\n  };\n  startBatch();\n  if (type === \"clear\") {\n    depsMap.forEach(run);\n  } else {\n    const targetIsArray = isArray(target);\n    const isArrayIndex = targetIsArray && isIntegerKey(key);\n    if (targetIsArray && key === \"length\") {\n      const newLength = Number(newValue);\n      depsMap.forEach((dep, key2) => {\n        if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n          run(dep);\n        }\n      });\n    } else {\n      if (key !== void 0 || depsMap.has(void 0)) {\n        run(depsMap.get(key));\n      }\n      if (isArrayIndex) {\n        run(depsMap.get(ARRAY_ITERATE_KEY));\n      }\n      switch (type) {\n        case \"add\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          } else if (isArrayIndex) {\n            run(depsMap.get(\"length\"));\n          }\n          break;\n        case \"delete\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          }\n          break;\n        case \"set\":\n          if (isMap(target)) {\n            run(depsMap.get(ITERATE_KEY));\n          }\n          break;\n      }\n    }\n  }\n  endBatch();\n}\nfunction getDepFromReactive(object, key) {\n  const depMap = targetMap.get(object);\n  return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n  const raw = toRaw(array);\n  if (raw === array) return raw;\n  track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n  return isShallow(array) ? raw : raw.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n  track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n  return arr;\n}\nconst arrayInstrumentations = {\n  __proto__: null,\n  [Symbol.iterator]() {\n    return iterator(this, Symbol.iterator, toReactive);\n  },\n  concat(...args) {\n    return reactiveReadArray(this).concat(\n      ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n    );\n  },\n  entries() {\n    return iterator(this, \"entries\", (value) => {\n      value[1] = toReactive(value[1]);\n      return value;\n    });\n  },\n  every(fn, thisArg) {\n    return apply(this, \"every\", fn, thisArg, void 0, arguments);\n  },\n  filter(fn, thisArg) {\n    return apply(this, \"filter\", fn, thisArg, (v) => v.map(toReactive), arguments);\n  },\n  find(fn, thisArg) {\n    return apply(this, \"find\", fn, thisArg, toReactive, arguments);\n  },\n  findIndex(fn, thisArg) {\n    return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n  },\n  findLast(fn, thisArg) {\n    return apply(this, \"findLast\", fn, thisArg, toReactive, arguments);\n  },\n  findLastIndex(fn, thisArg) {\n    return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n  },\n  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n  forEach(fn, thisArg) {\n    return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n  },\n  includes(...args) {\n    return searchProxy(this, \"includes\", args);\n  },\n  indexOf(...args) {\n    return searchProxy(this, \"indexOf\", args);\n  },\n  join(separator) {\n    return reactiveReadArray(this).join(separator);\n  },\n  // keys() iterator only reads `length`, no optimisation required\n  lastIndexOf(...args) {\n    return searchProxy(this, \"lastIndexOf\", args);\n  },\n  map(fn, thisArg) {\n    return apply(this, \"map\", fn, thisArg, void 0, arguments);\n  },\n  pop() {\n    return noTracking(this, \"pop\");\n  },\n  push(...args) {\n    return noTracking(this, \"push\", args);\n  },\n  reduce(fn, ...args) {\n    return reduce(this, \"reduce\", fn, args);\n  },\n  reduceRight(fn, ...args) {\n    return reduce(this, \"reduceRight\", fn, args);\n  },\n  shift() {\n    return noTracking(this, \"shift\");\n  },\n  // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n  some(fn, thisArg) {\n    return apply(this, \"some\", fn, thisArg, void 0, arguments);\n  },\n  splice(...args) {\n    return noTracking(this, \"splice\", args);\n  },\n  toReversed() {\n    return reactiveReadArray(this).toReversed();\n  },\n  toSorted(comparer) {\n    return reactiveReadArray(this).toSorted(comparer);\n  },\n  toSpliced(...args) {\n    return reactiveReadArray(this).toSpliced(...args);\n  },\n  unshift(...args) {\n    return noTracking(this, \"unshift\", args);\n  },\n  values() {\n    return iterator(this, \"values\", toReactive);\n  }\n};\nfunction iterator(self, method, wrapValue) {\n  const arr = shallowReadArray(self);\n  const iter = arr[method]();\n  if (arr !== self && !isShallow(self)) {\n    iter._next = iter.next;\n    iter.next = () => {\n      const result = iter._next();\n      if (result.value) {\n        result.value = wrapValue(result.value);\n      }\n      return result;\n    };\n  }\n  return iter;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n  const arr = shallowReadArray(self);\n  const needsWrap = arr !== self && !isShallow(self);\n  const methodFn = arr[method];\n  if (methodFn !== arrayProto[method]) {\n    const result2 = methodFn.apply(self, args);\n    return needsWrap ? toReactive(result2) : result2;\n  }\n  let wrappedFn = fn;\n  if (arr !== self) {\n    if (needsWrap) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, toReactive(item), index, self);\n      };\n    } else if (fn.length > 2) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, item, index, self);\n      };\n    }\n  }\n  const result = methodFn.call(arr, wrappedFn, thisArg);\n  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n  const arr = shallowReadArray(self);\n  let wrappedFn = fn;\n  if (arr !== self) {\n    if (!isShallow(self)) {\n      wrappedFn = function(acc, item, index) {\n        return fn.call(this, acc, toReactive(item), index, self);\n      };\n    } else if (fn.length > 3) {\n      wrappedFn = function(acc, item, index) {\n        return fn.call(this, acc, item, index, self);\n      };\n    }\n  }\n  return arr[method](wrappedFn, ...args);\n}\nfunction searchProxy(self, method, args) {\n  const arr = toRaw(self);\n  track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n  const res = arr[method](...args);\n  if ((res === -1 || res === false) && isProxy(args[0])) {\n    args[0] = toRaw(args[0]);\n    return arr[method](...args);\n  }\n  return res;\n}\nfunction noTracking(self, method, args = []) {\n  pauseTracking();\n  startBatch();\n  const res = toRaw(self)[method].apply(self, args);\n  endBatch();\n  resetTracking();\n  return res;\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nfunction hasOwnProperty(key) {\n  if (!isSymbol(key)) key = String(key);\n  const obj = toRaw(this);\n  track(obj, \"has\", key);\n  return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n  constructor(_isReadonly = false, _isShallow = false) {\n    this._isReadonly = _isReadonly;\n    this._isShallow = _isShallow;\n  }\n  get(target, key, receiver) {\n    const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_isShallow\") {\n      return isShallow2;\n    } else if (key === \"__v_raw\") {\n      if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n      // this means the receiver is a user proxy of the reactive proxy\n      Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n        return target;\n      }\n      return;\n    }\n    const targetIsArray = isArray(target);\n    if (!isReadonly2) {\n      let fn;\n      if (targetIsArray && (fn = arrayInstrumentations[key])) {\n        return fn;\n      }\n      if (key === \"hasOwnProperty\") {\n        return hasOwnProperty;\n      }\n    }\n    const res = Reflect.get(\n      target,\n      key,\n      // if this is a proxy wrapping a ref, return methods using the raw ref\n      // as receiver so that we don't have to call `toRaw` on the ref in all\n      // its class methods\n      isRef(target) ? target : receiver\n    );\n    if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n      return res;\n    }\n    if (!isReadonly2) {\n      track(target, \"get\", key);\n    }\n    if (isShallow2) {\n      return res;\n    }\n    if (isRef(res)) {\n      return targetIsArray && isIntegerKey(key) ? res : res.value;\n    }\n    if (isObject(res)) {\n      return isReadonly2 ? readonly(res) : reactive(res);\n    }\n    return res;\n  }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(false, isShallow2);\n  }\n  set(target, key, value, receiver) {\n    let oldValue = target[key];\n    if (!this._isShallow) {\n      const isOldValueReadonly = isReadonly(oldValue);\n      if (!isShallow(value) && !isReadonly(value)) {\n        oldValue = toRaw(oldValue);\n        value = toRaw(value);\n      }\n      if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n        if (isOldValueReadonly) {\n          return false;\n        } else {\n          oldValue.value = value;\n          return true;\n        }\n      }\n    }\n    const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n    const result = Reflect.set(\n      target,\n      key,\n      value,\n      isRef(target) ? target : receiver\n    );\n    if (target === toRaw(receiver)) {\n      if (!hadKey) {\n        trigger(target, \"add\", key, value);\n      } else if (hasChanged(value, oldValue)) {\n        trigger(target, \"set\", key, value, oldValue);\n      }\n    }\n    return result;\n  }\n  deleteProperty(target, key) {\n    const hadKey = hasOwn(target, key);\n    const oldValue = target[key];\n    const result = Reflect.deleteProperty(target, key);\n    if (result && hadKey) {\n      trigger(target, \"delete\", key, void 0, oldValue);\n    }\n    return result;\n  }\n  has(target, key) {\n    const result = Reflect.has(target, key);\n    if (!isSymbol(key) || !builtInSymbols.has(key)) {\n      track(target, \"has\", key);\n    }\n    return result;\n  }\n  ownKeys(target) {\n    track(\n      target,\n      \"iterate\",\n      isArray(target) ? \"length\" : ITERATE_KEY\n    );\n    return Reflect.ownKeys(target);\n  }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(true, isShallow2);\n  }\n  set(target, key) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n  deleteProperty(target, key) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n  return function(...args) {\n    const target = this[\"__v_raw\"];\n    const rawTarget = toRaw(target);\n    const targetIsMap = isMap(rawTarget);\n    const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n    const isKeyOnly = method === \"keys\" && targetIsMap;\n    const innerIterator = target[method](...args);\n    const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    !isReadonly2 && track(\n      rawTarget,\n      \"iterate\",\n      isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n    );\n    return {\n      // iterator protocol\n      next() {\n        const { value, done } = innerIterator.next();\n        return done ? { value, done } : {\n          value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n          done\n        };\n      },\n      // iterable protocol\n      [Symbol.iterator]() {\n        return this;\n      }\n    };\n  };\n}\nfunction createReadonlyMethod(type) {\n  return function(...args) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n      warn(\n        `${capitalize(type)} operation ${key}failed: target is readonly.`,\n        toRaw(this)\n      );\n    }\n    return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n  };\n}\nfunction createInstrumentations(readonly, shallow) {\n  const instrumentations = {\n    get(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly) {\n        if (hasChanged(key, rawKey)) {\n          track(rawTarget, \"get\", key);\n        }\n        track(rawTarget, \"get\", rawKey);\n      }\n      const { has } = getProto(rawTarget);\n      const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n      if (has.call(rawTarget, key)) {\n        return wrap(target.get(key));\n      } else if (has.call(rawTarget, rawKey)) {\n        return wrap(target.get(rawKey));\n      } else if (target !== rawTarget) {\n        target.get(key);\n      }\n    },\n    get size() {\n      const target = this[\"__v_raw\"];\n      !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n      return Reflect.get(target, \"size\", target);\n    },\n    has(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly) {\n        if (hasChanged(key, rawKey)) {\n          track(rawTarget, \"has\", key);\n        }\n        track(rawTarget, \"has\", rawKey);\n      }\n      return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n    },\n    forEach(callback, thisArg) {\n      const observed = this;\n      const target = observed[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n      !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n      return target.forEach((value, key) => {\n        return callback.call(thisArg, wrap(value), wrap(key), observed);\n      });\n    }\n  };\n  extend(\n    instrumentations,\n    readonly ? {\n      add: createReadonlyMethod(\"add\"),\n      set: createReadonlyMethod(\"set\"),\n      delete: createReadonlyMethod(\"delete\"),\n      clear: createReadonlyMethod(\"clear\")\n    } : {\n      add(value) {\n        if (!shallow && !isShallow(value) && !isReadonly(value)) {\n          value = toRaw(value);\n        }\n        const target = toRaw(this);\n        const proto = getProto(target);\n        const hadKey = proto.has.call(target, value);\n        if (!hadKey) {\n          target.add(value);\n          trigger(target, \"add\", value, value);\n        }\n        return this;\n      },\n      set(key, value) {\n        if (!shallow && !isShallow(value) && !isReadonly(value)) {\n          value = toRaw(value);\n        }\n        const target = toRaw(this);\n        const { has, get } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          checkIdentityKeys(target, has, key);\n        }\n        const oldValue = get.call(target, key);\n        target.set(key, value);\n        if (!hadKey) {\n          trigger(target, \"add\", key, value);\n        } else if (hasChanged(value, oldValue)) {\n          trigger(target, \"set\", key, value, oldValue);\n        }\n        return this;\n      },\n      delete(key) {\n        const target = toRaw(this);\n        const { has, get } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          checkIdentityKeys(target, has, key);\n        }\n        const oldValue = get ? get.call(target, key) : void 0;\n        const result = target.delete(key);\n        if (hadKey) {\n          trigger(target, \"delete\", key, void 0, oldValue);\n        }\n        return result;\n      },\n      clear() {\n        const target = toRaw(this);\n        const hadItems = target.size !== 0;\n        const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n        const result = target.clear();\n        if (hadItems) {\n          trigger(\n            target,\n            \"clear\",\n            void 0,\n            void 0,\n            oldTarget\n          );\n        }\n        return result;\n      }\n    }\n  );\n  const iteratorMethods = [\n    \"keys\",\n    \"values\",\n    \"entries\",\n    Symbol.iterator\n  ];\n  iteratorMethods.forEach((method) => {\n    instrumentations[method] = createIterableMethod(method, readonly, shallow);\n  });\n  return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n  const instrumentations = createInstrumentations(isReadonly2, shallow);\n  return (target, key, receiver) => {\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_raw\") {\n      return target;\n    }\n    return Reflect.get(\n      hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n      key,\n      receiver\n    );\n  };\n}\nconst mutableCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has, key) {\n  const rawKey = toRaw(key);\n  if (rawKey !== key && has.call(target, rawKey)) {\n    const type = toRawType(target);\n    warn(\n      `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n    );\n  }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n  switch (rawType) {\n    case \"Object\":\n    case \"Array\":\n      return 1 /* COMMON */;\n    case \"Map\":\n    case \"Set\":\n    case \"WeakMap\":\n    case \"WeakSet\":\n      return 2 /* COLLECTION */;\n    default:\n      return 0 /* INVALID */;\n  }\n}\nfunction getTargetType(value) {\n  return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n  if (isReadonly(target)) {\n    return target;\n  }\n  return createReactiveObject(\n    target,\n    false,\n    mutableHandlers,\n    mutableCollectionHandlers,\n    reactiveMap\n  );\n}\nfunction shallowReactive(target) {\n  return createReactiveObject(\n    target,\n    false,\n    shallowReactiveHandlers,\n    shallowCollectionHandlers,\n    shallowReactiveMap\n  );\n}\nfunction readonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    readonlyHandlers,\n    readonlyCollectionHandlers,\n    readonlyMap\n  );\n}\nfunction shallowReadonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    shallowReadonlyHandlers,\n    shallowReadonlyCollectionHandlers,\n    shallowReadonlyMap\n  );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n  if (!isObject(target)) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n          target\n        )}`\n      );\n    }\n    return target;\n  }\n  if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n    return target;\n  }\n  const existingProxy = proxyMap.get(target);\n  if (existingProxy) {\n    return existingProxy;\n  }\n  const targetType = getTargetType(target);\n  if (targetType === 0 /* INVALID */) {\n    return target;\n  }\n  const proxy = new Proxy(\n    target,\n    targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n  );\n  proxyMap.set(target, proxy);\n  return proxy;\n}\nfunction isReactive(value) {\n  if (isReadonly(value)) {\n    return isReactive(value[\"__v_raw\"]);\n  }\n  return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n  return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n  return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n  return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n  const raw = observed && observed[\"__v_raw\"];\n  return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n  if (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) {\n    def(value, \"__v_skip\", true);\n  }\n  return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction isRef(r) {\n  return r ? r[\"__v_isRef\"] === true : false;\n}\nfunction ref(value) {\n  return createRef(value, false);\n}\nfunction shallowRef(value) {\n  return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n  if (isRef(rawValue)) {\n    return rawValue;\n  }\n  return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n  constructor(value, isShallow2) {\n    this.dep = new Dep();\n    this[\"__v_isRef\"] = true;\n    this[\"__v_isShallow\"] = false;\n    this._rawValue = isShallow2 ? value : toRaw(value);\n    this._value = isShallow2 ? value : toReactive(value);\n    this[\"__v_isShallow\"] = isShallow2;\n  }\n  get value() {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      this.dep.track({\n        target: this,\n        type: \"get\",\n        key: \"value\"\n      });\n    } else {\n      this.dep.track();\n    }\n    return this._value;\n  }\n  set value(newValue) {\n    const oldValue = this._rawValue;\n    const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n    newValue = useDirectValue ? newValue : toRaw(newValue);\n    if (hasChanged(newValue, oldValue)) {\n      this._rawValue = newValue;\n      this._value = useDirectValue ? newValue : toReactive(newValue);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        this.dep.trigger({\n          target: this,\n          type: \"set\",\n          key: \"value\",\n          newValue,\n          oldValue\n        });\n      } else {\n        this.dep.trigger();\n      }\n    }\n  }\n}\nfunction triggerRef(ref2) {\n  if (ref2.dep) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      ref2.dep.trigger({\n        target: ref2,\n        type: \"set\",\n        key: \"value\",\n        newValue: ref2._value\n      });\n    } else {\n      ref2.dep.trigger();\n    }\n  }\n}\nfunction unref(ref2) {\n  return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n  return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n  get: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n  set: (target, key, value, receiver) => {\n    const oldValue = target[key];\n    if (isRef(oldValue) && !isRef(value)) {\n      oldValue.value = value;\n      return true;\n    } else {\n      return Reflect.set(target, key, value, receiver);\n    }\n  }\n};\nfunction proxyRefs(objectWithRefs) {\n  return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n  constructor(factory) {\n    this[\"__v_isRef\"] = true;\n    this._value = void 0;\n    const dep = this.dep = new Dep();\n    const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n    this._get = get;\n    this._set = set;\n  }\n  get value() {\n    return this._value = this._get();\n  }\n  set value(newVal) {\n    this._set(newVal);\n  }\n}\nfunction customRef(factory) {\n  return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n    warn(`toRefs() expects a reactive object but received a plain one.`);\n  }\n  const ret = isArray(object) ? new Array(object.length) : {};\n  for (const key in object) {\n    ret[key] = propertyToRef(object, key);\n  }\n  return ret;\n}\nclass ObjectRefImpl {\n  constructor(_object, _key, _defaultValue) {\n    this._object = _object;\n    this._key = _key;\n    this._defaultValue = _defaultValue;\n    this[\"__v_isRef\"] = true;\n    this._value = void 0;\n  }\n  get value() {\n    const val = this._object[this._key];\n    return this._value = val === void 0 ? this._defaultValue : val;\n  }\n  set value(newVal) {\n    this._object[this._key] = newVal;\n  }\n  get dep() {\n    return getDepFromReactive(toRaw(this._object), this._key);\n  }\n}\nclass GetterRefImpl {\n  constructor(_getter) {\n    this._getter = _getter;\n    this[\"__v_isRef\"] = true;\n    this[\"__v_isReadonly\"] = true;\n    this._value = void 0;\n  }\n  get value() {\n    return this._value = this._getter();\n  }\n}\nfunction toRef(source, key, defaultValue) {\n  if (isRef(source)) {\n    return source;\n  } else if (isFunction(source)) {\n    return new GetterRefImpl(source);\n  } else if (isObject(source) && arguments.length > 1) {\n    return propertyToRef(source, key, defaultValue);\n  } else {\n    return ref(source);\n  }\n}\nfunction propertyToRef(source, key, defaultValue) {\n  const val = source[key];\n  return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n  constructor(fn, setter, isSSR) {\n    this.fn = fn;\n    this.setter = setter;\n    /**\n     * @internal\n     */\n    this._value = void 0;\n    /**\n     * @internal\n     */\n    this.dep = new Dep(this);\n    /**\n     * @internal\n     */\n    this.__v_isRef = true;\n    // TODO isolatedDeclarations \"__v_isReadonly\"\n    // A computed is also a subscriber that tracks other deps\n    /**\n     * @internal\n     */\n    this.deps = void 0;\n    /**\n     * @internal\n     */\n    this.depsTail = void 0;\n    /**\n     * @internal\n     */\n    this.flags = 16;\n    /**\n     * @internal\n     */\n    this.globalVersion = globalVersion - 1;\n    /**\n     * @internal\n     */\n    this.next = void 0;\n    // for backwards compat\n    this.effect = this;\n    this[\"__v_isReadonly\"] = !setter;\n    this.isSSR = isSSR;\n  }\n  /**\n   * @internal\n   */\n  notify() {\n    this.flags |= 16;\n    if (!(this.flags & 8) && // avoid infinite self recursion\n    activeSub !== this) {\n      batch(this, true);\n      return true;\n    } else if (!!(process.env.NODE_ENV !== \"production\")) ;\n  }\n  get value() {\n    const link = !!(process.env.NODE_ENV !== \"production\") ? this.dep.track({\n      target: this,\n      type: \"get\",\n      key: \"value\"\n    }) : this.dep.track();\n    refreshComputed(this);\n    if (link) {\n      link.version = this.dep.version;\n    }\n    return this._value;\n  }\n  set value(newValue) {\n    if (this.setter) {\n      this.setter(newValue);\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\"Write operation failed: computed value is readonly\");\n    }\n  }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n  let getter;\n  let setter;\n  if (isFunction(getterOrOptions)) {\n    getter = getterOrOptions;\n  } else {\n    getter = getterOrOptions.get;\n    setter = getterOrOptions.set;\n  }\n  const cRef = new ComputedRefImpl(getter, setter, isSSR);\n  if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n    cRef.onTrack = debugOptions.onTrack;\n    cRef.onTrigger = debugOptions.onTrigger;\n  }\n  return cRef;\n}\n\nconst TrackOpTypes = {\n  \"GET\": \"get\",\n  \"HAS\": \"has\",\n  \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n  \"SET\": \"set\",\n  \"ADD\": \"add\",\n  \"DELETE\": \"delete\",\n  \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n  \"SKIP\": \"__v_skip\",\n  \"IS_REACTIVE\": \"__v_isReactive\",\n  \"IS_READONLY\": \"__v_isReadonly\",\n  \"IS_SHALLOW\": \"__v_isShallow\",\n  \"RAW\": \"__v_raw\",\n  \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\n  \"WATCH_GETTER\": 2,\n  \"2\": \"WATCH_GETTER\",\n  \"WATCH_CALLBACK\": 3,\n  \"3\": \"WATCH_CALLBACK\",\n  \"WATCH_CLEANUP\": 4,\n  \"4\": \"WATCH_CLEANUP\"\n};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n  return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n  if (owner) {\n    let cleanups = cleanupMap.get(owner);\n    if (!cleanups) cleanupMap.set(owner, cleanups = []);\n    cleanups.push(cleanupFn);\n  } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n    warn(\n      `onWatcherCleanup() was called when there was no active watcher to associate with.`\n    );\n  }\n}\nfunction watch(source, cb, options = EMPTY_OBJ) {\n  const { immediate, deep, once, scheduler, augmentJob, call } = options;\n  const warnInvalidSource = (s) => {\n    (options.onWarn || warn)(\n      `Invalid watch source: `,\n      s,\n      `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n    );\n  };\n  const reactiveGetter = (source2) => {\n    if (deep) return source2;\n    if (isShallow(source2) || deep === false || deep === 0)\n      return traverse(source2, 1);\n    return traverse(source2);\n  };\n  let effect;\n  let getter;\n  let cleanup;\n  let boundCleanup;\n  let forceTrigger = false;\n  let isMultiSource = false;\n  if (isRef(source)) {\n    getter = () => source.value;\n    forceTrigger = isShallow(source);\n  } else if (isReactive(source)) {\n    getter = () => reactiveGetter(source);\n    forceTrigger = true;\n  } else if (isArray(source)) {\n    isMultiSource = true;\n    forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n    getter = () => source.map((s) => {\n      if (isRef(s)) {\n        return s.value;\n      } else if (isReactive(s)) {\n        return reactiveGetter(s);\n      } else if (isFunction(s)) {\n        return call ? call(s, 2) : s();\n      } else {\n        !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n      }\n    });\n  } else if (isFunction(source)) {\n    if (cb) {\n      getter = call ? () => call(source, 2) : source;\n    } else {\n      getter = () => {\n        if (cleanup) {\n          pauseTracking();\n          try {\n            cleanup();\n          } finally {\n            resetTracking();\n          }\n        }\n        const currentEffect = activeWatcher;\n        activeWatcher = effect;\n        try {\n          return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n        } finally {\n          activeWatcher = currentEffect;\n        }\n      };\n    }\n  } else {\n    getter = NOOP;\n    !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n  }\n  if (cb && deep) {\n    const baseGetter = getter;\n    const depth = deep === true ? Infinity : deep;\n    getter = () => traverse(baseGetter(), depth);\n  }\n  const scope = getCurrentScope();\n  const watchHandle = () => {\n    effect.stop();\n    if (scope) {\n      remove(scope.effects, effect);\n    }\n  };\n  if (once && cb) {\n    const _cb = cb;\n    cb = (...args) => {\n      _cb(...args);\n      watchHandle();\n    };\n  }\n  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n  const job = (immediateFirstRun) => {\n    if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\n      return;\n    }\n    if (cb) {\n      const newValue = effect.run();\n      if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n        if (cleanup) {\n          cleanup();\n        }\n        const currentWatcher = activeWatcher;\n        activeWatcher = effect;\n        try {\n          const args = [\n            newValue,\n            // pass undefined as the old value when it's changed for the first time\n            oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n            boundCleanup\n          ];\n          call ? call(cb, 3, args) : (\n            // @ts-expect-error\n            cb(...args)\n          );\n          oldValue = newValue;\n        } finally {\n          activeWatcher = currentWatcher;\n        }\n      }\n    } else {\n      effect.run();\n    }\n  };\n  if (augmentJob) {\n    augmentJob(job);\n  }\n  effect = new ReactiveEffect(getter);\n  effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n  boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n  cleanup = effect.onStop = () => {\n    const cleanups = cleanupMap.get(effect);\n    if (cleanups) {\n      if (call) {\n        call(cleanups, 4);\n      } else {\n        for (const cleanup2 of cleanups) cleanup2();\n      }\n      cleanupMap.delete(effect);\n    }\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    effect.onTrack = options.onTrack;\n    effect.onTrigger = options.onTrigger;\n  }\n  if (cb) {\n    if (immediate) {\n      job(true);\n    } else {\n      oldValue = effect.run();\n    }\n  } else if (scheduler) {\n    scheduler(job.bind(null, true), true);\n  } else {\n    effect.run();\n  }\n  watchHandle.pause = effect.pause.bind(effect);\n  watchHandle.resume = effect.resume.bind(effect);\n  watchHandle.stop = watchHandle;\n  return watchHandle;\n}\nfunction traverse(value, depth = Infinity, seen) {\n  if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n    return value;\n  }\n  seen = seen || /* @__PURE__ */ new Set();\n  if (seen.has(value)) {\n    return value;\n  }\n  seen.add(value);\n  depth--;\n  if (isRef(value)) {\n    traverse(value.value, depth, seen);\n  } else if (isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      traverse(value[i], depth, seen);\n    }\n  } else if (isSet(value) || isMap(value)) {\n    value.forEach((v) => {\n      traverse(v, depth, seen);\n    });\n  } else if (isPlainObject(value)) {\n    for (const key in value) {\n      traverse(value[key], depth, seen);\n    }\n    for (const key of Object.getOwnPropertySymbols(value)) {\n      if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n        traverse(value[key], depth, seen);\n      }\n    }\n  }\n  return value;\n}\n\nexport { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch };\n","/**\n* @vue/runtime-core v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n  stack.push(vnode);\n}\nfunction popWarningContext() {\n  stack.pop();\n}\nlet isWarning = false;\nfunction warn$1(msg, ...args) {\n  if (isWarning) return;\n  isWarning = true;\n  pauseTracking();\n  const instance = stack.length ? stack[stack.length - 1].component : null;\n  const appWarnHandler = instance && instance.appContext.config.warnHandler;\n  const trace = getComponentTrace();\n  if (appWarnHandler) {\n    callWithErrorHandling(\n      appWarnHandler,\n      instance,\n      11,\n      [\n        // eslint-disable-next-line no-restricted-syntax\n        msg + args.map((a) => {\n          var _a, _b;\n          return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n        }).join(\"\"),\n        instance && instance.proxy,\n        trace.map(\n          ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n        ).join(\"\\n\"),\n        trace\n      ]\n    );\n  } else {\n    const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n    if (trace.length && // avoid spamming console during tests\n    true) {\n      warnArgs.push(`\n`, ...formatTrace(trace));\n    }\n    console.warn(...warnArgs);\n  }\n  resetTracking();\n  isWarning = false;\n}\nfunction getComponentTrace() {\n  let currentVNode = stack[stack.length - 1];\n  if (!currentVNode) {\n    return [];\n  }\n  const normalizedStack = [];\n  while (currentVNode) {\n    const last = normalizedStack[0];\n    if (last && last.vnode === currentVNode) {\n      last.recurseCount++;\n    } else {\n      normalizedStack.push({\n        vnode: currentVNode,\n        recurseCount: 0\n      });\n    }\n    const parentInstance = currentVNode.component && currentVNode.component.parent;\n    currentVNode = parentInstance && parentInstance.vnode;\n  }\n  return normalizedStack;\n}\nfunction formatTrace(trace) {\n  const logs = [];\n  trace.forEach((entry, i) => {\n    logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n  });\n  return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n  const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n  const isRoot = vnode.component ? vnode.component.parent == null : false;\n  const open = ` at <${formatComponentName(\n    vnode.component,\n    vnode.type,\n    isRoot\n  )}`;\n  const close = `>` + postfix;\n  return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n  const res = [];\n  const keys = Object.keys(props);\n  keys.slice(0, 3).forEach((key) => {\n    res.push(...formatProp(key, props[key]));\n  });\n  if (keys.length > 3) {\n    res.push(` ...`);\n  }\n  return res;\n}\nfunction formatProp(key, value, raw) {\n  if (isString(value)) {\n    value = JSON.stringify(value);\n    return raw ? value : [`${key}=${value}`];\n  } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n    return raw ? value : [`${key}=${value}`];\n  } else if (isRef(value)) {\n    value = formatProp(key, toRaw(value.value), true);\n    return raw ? value : [`${key}=Ref<`, value, `>`];\n  } else if (isFunction(value)) {\n    return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n  } else {\n    value = toRaw(value);\n    return raw ? value : [`${key}=`, value];\n  }\n}\nfunction assertNumber(val, type) {\n  if (!!!(process.env.NODE_ENV !== \"production\")) return;\n  if (val === void 0) {\n    return;\n  } else if (typeof val !== \"number\") {\n    warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n  } else if (isNaN(val)) {\n    warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n  }\n}\n\nconst ErrorCodes = {\n  \"SETUP_FUNCTION\": 0,\n  \"0\": \"SETUP_FUNCTION\",\n  \"RENDER_FUNCTION\": 1,\n  \"1\": \"RENDER_FUNCTION\",\n  \"NATIVE_EVENT_HANDLER\": 5,\n  \"5\": \"NATIVE_EVENT_HANDLER\",\n  \"COMPONENT_EVENT_HANDLER\": 6,\n  \"6\": \"COMPONENT_EVENT_HANDLER\",\n  \"VNODE_HOOK\": 7,\n  \"7\": \"VNODE_HOOK\",\n  \"DIRECTIVE_HOOK\": 8,\n  \"8\": \"DIRECTIVE_HOOK\",\n  \"TRANSITION_HOOK\": 9,\n  \"9\": \"TRANSITION_HOOK\",\n  \"APP_ERROR_HANDLER\": 10,\n  \"10\": \"APP_ERROR_HANDLER\",\n  \"APP_WARN_HANDLER\": 11,\n  \"11\": \"APP_WARN_HANDLER\",\n  \"FUNCTION_REF\": 12,\n  \"12\": \"FUNCTION_REF\",\n  \"ASYNC_COMPONENT_LOADER\": 13,\n  \"13\": \"ASYNC_COMPONENT_LOADER\",\n  \"SCHEDULER\": 14,\n  \"14\": \"SCHEDULER\",\n  \"COMPONENT_UPDATE\": 15,\n  \"15\": \"COMPONENT_UPDATE\",\n  \"APP_UNMOUNT_CLEANUP\": 16,\n  \"16\": \"APP_UNMOUNT_CLEANUP\"\n};\nconst ErrorTypeStrings$1 = {\n  [\"sp\"]: \"serverPrefetch hook\",\n  [\"bc\"]: \"beforeCreate hook\",\n  [\"c\"]: \"created hook\",\n  [\"bm\"]: \"beforeMount hook\",\n  [\"m\"]: \"mounted hook\",\n  [\"bu\"]: \"beforeUpdate hook\",\n  [\"u\"]: \"updated\",\n  [\"bum\"]: \"beforeUnmount hook\",\n  [\"um\"]: \"unmounted hook\",\n  [\"a\"]: \"activated hook\",\n  [\"da\"]: \"deactivated hook\",\n  [\"ec\"]: \"errorCaptured hook\",\n  [\"rtc\"]: \"renderTracked hook\",\n  [\"rtg\"]: \"renderTriggered hook\",\n  [0]: \"setup function\",\n  [1]: \"render function\",\n  [2]: \"watcher getter\",\n  [3]: \"watcher callback\",\n  [4]: \"watcher cleanup function\",\n  [5]: \"native event handler\",\n  [6]: \"component event handler\",\n  [7]: \"vnode hook\",\n  [8]: \"directive hook\",\n  [9]: \"transition hook\",\n  [10]: \"app errorHandler\",\n  [11]: \"app warnHandler\",\n  [12]: \"ref function\",\n  [13]: \"async component loader\",\n  [14]: \"scheduler flush\",\n  [15]: \"component update\",\n  [16]: \"app unmount cleanup function\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n  try {\n    return args ? fn(...args) : fn();\n  } catch (err) {\n    handleError(err, instance, type);\n  }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n  if (isFunction(fn)) {\n    const res = callWithErrorHandling(fn, instance, type, args);\n    if (res && isPromise(res)) {\n      res.catch((err) => {\n        handleError(err, instance, type);\n      });\n    }\n    return res;\n  }\n  if (isArray(fn)) {\n    const values = [];\n    for (let i = 0; i < fn.length; i++) {\n      values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n    }\n    return values;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`\n    );\n  }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n  const contextVNode = instance ? instance.vnode : null;\n  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\n  if (instance) {\n    let cur = instance.parent;\n    const exposedInstance = instance.proxy;\n    const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;\n    while (cur) {\n      const errorCapturedHooks = cur.ec;\n      if (errorCapturedHooks) {\n        for (let i = 0; i < errorCapturedHooks.length; i++) {\n          if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n            return;\n          }\n        }\n      }\n      cur = cur.parent;\n    }\n    if (errorHandler) {\n      pauseTracking();\n      callWithErrorHandling(errorHandler, null, 10, [\n        err,\n        exposedInstance,\n        errorInfo\n      ]);\n      resetTracking();\n      return;\n    }\n  }\n  logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n}\nfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const info = ErrorTypeStrings$1[type];\n    if (contextVNode) {\n      pushWarningContext(contextVNode);\n    }\n    warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n    if (contextVNode) {\n      popWarningContext();\n    }\n    if (throwInDev) {\n      throw err;\n    } else {\n      console.error(err);\n    }\n  } else if (throwInProd) {\n    throw err;\n  } else {\n    console.error(err);\n  }\n}\n\nconst queue = [];\nlet flushIndex = -1;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n  const p = currentFlushPromise || resolvedPromise;\n  return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n  let start = flushIndex + 1;\n  let end = queue.length;\n  while (start < end) {\n    const middle = start + end >>> 1;\n    const middleJob = queue[middle];\n    const middleJobId = getId(middleJob);\n    if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {\n      start = middle + 1;\n    } else {\n      end = middle;\n    }\n  }\n  return start;\n}\nfunction queueJob(job) {\n  if (!(job.flags & 1)) {\n    const jobId = getId(job);\n    const lastJob = queue[queue.length - 1];\n    if (!lastJob || // fast path when the job id is larger than the tail\n    !(job.flags & 2) && jobId >= getId(lastJob)) {\n      queue.push(job);\n    } else {\n      queue.splice(findInsertionIndex(jobId), 0, job);\n    }\n    job.flags |= 1;\n    queueFlush();\n  }\n}\nfunction queueFlush() {\n  if (!currentFlushPromise) {\n    currentFlushPromise = resolvedPromise.then(flushJobs);\n  }\n}\nfunction queuePostFlushCb(cb) {\n  if (!isArray(cb)) {\n    if (activePostFlushCbs && cb.id === -1) {\n      activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n    } else if (!(cb.flags & 1)) {\n      pendingPostFlushCbs.push(cb);\n      cb.flags |= 1;\n    }\n  } else {\n    pendingPostFlushCbs.push(...cb);\n  }\n  queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    seen = seen || /* @__PURE__ */ new Map();\n  }\n  for (; i < queue.length; i++) {\n    const cb = queue[i];\n    if (cb && cb.flags & 2) {\n      if (instance && cb.id !== instance.uid) {\n        continue;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n        continue;\n      }\n      queue.splice(i, 1);\n      i--;\n      if (cb.flags & 4) {\n        cb.flags &= ~1;\n      }\n      cb();\n      if (!(cb.flags & 4)) {\n        cb.flags &= ~1;\n      }\n    }\n  }\n}\nfunction flushPostFlushCbs(seen) {\n  if (pendingPostFlushCbs.length) {\n    const deduped = [...new Set(pendingPostFlushCbs)].sort(\n      (a, b) => getId(a) - getId(b)\n    );\n    pendingPostFlushCbs.length = 0;\n    if (activePostFlushCbs) {\n      activePostFlushCbs.push(...deduped);\n      return;\n    }\n    activePostFlushCbs = deduped;\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      seen = seen || /* @__PURE__ */ new Map();\n    }\n    for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n      const cb = activePostFlushCbs[postFlushIndex];\n      if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n        continue;\n      }\n      if (cb.flags & 4) {\n        cb.flags &= ~1;\n      }\n      if (!(cb.flags & 8)) cb();\n      cb.flags &= ~1;\n    }\n    activePostFlushCbs = null;\n    postFlushIndex = 0;\n  }\n}\nconst getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\nfunction flushJobs(seen) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    seen = seen || /* @__PURE__ */ new Map();\n  }\n  const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n  try {\n    for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n      const job = queue[flushIndex];\n      if (job && !(job.flags & 8)) {\n        if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n          continue;\n        }\n        if (job.flags & 4) {\n          job.flags &= ~1;\n        }\n        callWithErrorHandling(\n          job,\n          job.i,\n          job.i ? 15 : 14\n        );\n        if (!(job.flags & 4)) {\n          job.flags &= ~1;\n        }\n      }\n    }\n  } finally {\n    for (; flushIndex < queue.length; flushIndex++) {\n      const job = queue[flushIndex];\n      if (job) {\n        job.flags &= ~1;\n      }\n    }\n    flushIndex = -1;\n    queue.length = 0;\n    flushPostFlushCbs(seen);\n    currentFlushPromise = null;\n    if (queue.length || pendingPostFlushCbs.length) {\n      flushJobs(seen);\n    }\n  }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n  const count = seen.get(fn) || 0;\n  if (count > RECURSION_LIMIT) {\n    const instance = fn.i;\n    const componentName = instance && getComponentName(instance.type);\n    handleError(\n      `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n      null,\n      10\n    );\n    return true;\n  }\n  seen.set(fn, count + 1);\n  return false;\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Map();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n  getGlobalThis().__VUE_HMR_RUNTIME__ = {\n    createRecord: tryWrap(createRecord),\n    rerender: tryWrap(rerender),\n    reload: tryWrap(reload)\n  };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n  const id = instance.type.__hmrId;\n  let record = map.get(id);\n  if (!record) {\n    createRecord(id, instance.type);\n    record = map.get(id);\n  }\n  record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n  map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n  if (map.has(id)) {\n    return false;\n  }\n  map.set(id, {\n    initialDef: normalizeClassComponent(initialDef),\n    instances: /* @__PURE__ */ new Set()\n  });\n  return true;\n}\nfunction normalizeClassComponent(component) {\n  return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n  const record = map.get(id);\n  if (!record) {\n    return;\n  }\n  record.initialDef.render = newRender;\n  [...record.instances].forEach((instance) => {\n    if (newRender) {\n      instance.render = newRender;\n      normalizeClassComponent(instance.type).render = newRender;\n    }\n    instance.renderCache = [];\n    isHmrUpdating = true;\n    instance.update();\n    isHmrUpdating = false;\n  });\n}\nfunction reload(id, newComp) {\n  const record = map.get(id);\n  if (!record) return;\n  newComp = normalizeClassComponent(newComp);\n  updateComponentDef(record.initialDef, newComp);\n  const instances = [...record.instances];\n  for (let i = 0; i < instances.length; i++) {\n    const instance = instances[i];\n    const oldComp = normalizeClassComponent(instance.type);\n    let dirtyInstances = hmrDirtyComponents.get(oldComp);\n    if (!dirtyInstances) {\n      if (oldComp !== record.initialDef) {\n        updateComponentDef(oldComp, newComp);\n      }\n      hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());\n    }\n    dirtyInstances.add(instance);\n    instance.appContext.propsCache.delete(instance.type);\n    instance.appContext.emitsCache.delete(instance.type);\n    instance.appContext.optionsCache.delete(instance.type);\n    if (instance.ceReload) {\n      dirtyInstances.add(instance);\n      instance.ceReload(newComp.styles);\n      dirtyInstances.delete(instance);\n    } else if (instance.parent) {\n      queueJob(() => {\n        isHmrUpdating = true;\n        instance.parent.update();\n        isHmrUpdating = false;\n        dirtyInstances.delete(instance);\n      });\n    } else if (instance.appContext.reload) {\n      instance.appContext.reload();\n    } else if (typeof window !== \"undefined\") {\n      window.location.reload();\n    } else {\n      console.warn(\n        \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n      );\n    }\n    if (instance.root.ce && instance !== instance.root) {\n      instance.root.ce._removeChildStyle(oldComp);\n    }\n  }\n  queuePostFlushCb(() => {\n    hmrDirtyComponents.clear();\n  });\n}\nfunction updateComponentDef(oldComp, newComp) {\n  extend(oldComp, newComp);\n  for (const key in oldComp) {\n    if (key !== \"__file\" && !(key in newComp)) {\n      delete oldComp[key];\n    }\n  }\n}\nfunction tryWrap(fn) {\n  return (id, arg) => {\n    try {\n      return fn(id, arg);\n    } catch (e) {\n      console.error(e);\n      console.warn(\n        `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n      );\n    }\n  };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n  if (devtools$1) {\n    devtools$1.emit(event, ...args);\n  } else if (!devtoolsNotInstalled) {\n    buffer.push({ event, args });\n  }\n}\nfunction setDevtoolsHook$1(hook, target) {\n  var _a, _b;\n  devtools$1 = hook;\n  if (devtools$1) {\n    devtools$1.enabled = true;\n    buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n    buffer = [];\n  } else if (\n    // handle late devtools injection - only do this if we are in an actual\n    // browser environment to avoid the timer handle stalling test runner exit\n    // (#4815)\n    typeof window !== \"undefined\" && // some envs mock window but not fully\n    window.HTMLElement && // also exclude jsdom\n    // eslint-disable-next-line no-restricted-syntax\n    !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n  ) {\n    const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n    replay.push((newHook) => {\n      setDevtoolsHook$1(newHook, target);\n    });\n    setTimeout(() => {\n      if (!devtools$1) {\n        target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n        devtoolsNotInstalled = true;\n        buffer = [];\n      }\n    }, 3e3);\n  } else {\n    devtoolsNotInstalled = true;\n    buffer = [];\n  }\n}\nfunction devtoolsInitApp(app, version) {\n  emit$1(\"app:init\" /* APP_INIT */, app, version, {\n    Fragment,\n    Text,\n    Comment,\n    Static\n  });\n}\nfunction devtoolsUnmountApp(app) {\n  emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n  \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n  if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n  !devtools$1.cleanupBuffer(component)) {\n    _devtoolsComponentRemoved(component);\n  }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n  return (component) => {\n    emit$1(\n      hook,\n      component.appContext.app,\n      component.uid,\n      component.parent ? component.parent.uid : void 0,\n      component\n    );\n  };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\nfunction createDevtoolsPerformanceHook(hook) {\n  return (component, type, time) => {\n    emit$1(hook, component.appContext.app, component.uid, component, type, time);\n  };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n  emit$1(\n    \"component:emit\" /* COMPONENT_EMIT */,\n    component.appContext.app,\n    component,\n    event,\n    params\n  );\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n  const prev = currentRenderingInstance;\n  currentRenderingInstance = instance;\n  currentScopeId = instance && instance.type.__scopeId || null;\n  return prev;\n}\nfunction pushScopeId(id) {\n  currentScopeId = id;\n}\nfunction popScopeId() {\n  currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n  if (!ctx) return fn;\n  if (fn._n) {\n    return fn;\n  }\n  const renderFnWithContext = (...args) => {\n    if (renderFnWithContext._d) {\n      setBlockTracking(-1);\n    }\n    const prevInstance = setCurrentRenderingInstance(ctx);\n    let res;\n    try {\n      res = fn(...args);\n    } finally {\n      setCurrentRenderingInstance(prevInstance);\n      if (renderFnWithContext._d) {\n        setBlockTracking(1);\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      devtoolsComponentUpdated(ctx);\n    }\n    return res;\n  };\n  renderFnWithContext._n = true;\n  renderFnWithContext._c = true;\n  renderFnWithContext._d = true;\n  return renderFnWithContext;\n}\n\nfunction validateDirectiveName(name) {\n  if (isBuiltInDirective(name)) {\n    warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n  }\n}\nfunction withDirectives(vnode, directives) {\n  if (currentRenderingInstance === null) {\n    !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n    return vnode;\n  }\n  const instance = getComponentPublicInstance(currentRenderingInstance);\n  const bindings = vnode.dirs || (vnode.dirs = []);\n  for (let i = 0; i < directives.length; i++) {\n    let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n    if (dir) {\n      if (isFunction(dir)) {\n        dir = {\n          mounted: dir,\n          updated: dir\n        };\n      }\n      if (dir.deep) {\n        traverse(value);\n      }\n      bindings.push({\n        dir,\n        instance,\n        value,\n        oldValue: void 0,\n        arg,\n        modifiers\n      });\n    }\n  }\n  return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n  const bindings = vnode.dirs;\n  const oldBindings = prevVNode && prevVNode.dirs;\n  for (let i = 0; i < bindings.length; i++) {\n    const binding = bindings[i];\n    if (oldBindings) {\n      binding.oldValue = oldBindings[i].value;\n    }\n    let hook = binding.dir[name];\n    if (hook) {\n      pauseTracking();\n      callWithAsyncErrorHandling(hook, instance, 8, [\n        vnode.el,\n        binding,\n        vnode,\n        prevVNode\n      ]);\n      resetTracking();\n    }\n  }\n}\n\nconst TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTeleportDeferred = (props) => props && (props.defer || props.defer === \"\");\nconst isTargetSVG = (target) => typeof SVGElement !== \"undefined\" && target instanceof SVGElement;\nconst isTargetMathML = (target) => typeof MathMLElement === \"function\" && target instanceof MathMLElement;\nconst resolveTarget = (props, select) => {\n  const targetSelector = props && props.to;\n  if (isString(targetSelector)) {\n    if (!select) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`\n      );\n      return null;\n    } else {\n      const target = select(targetSelector);\n      if (!!(process.env.NODE_ENV !== \"production\") && !target && !isTeleportDisabled(props)) {\n        warn$1(\n          `Failed to locate Teleport target with selector \"${targetSelector}\". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`\n        );\n      }\n      return target;\n    }\n  } else {\n    if (!!(process.env.NODE_ENV !== \"production\") && !targetSelector && !isTeleportDisabled(props)) {\n      warn$1(`Invalid Teleport target: ${targetSelector}`);\n    }\n    return targetSelector;\n  }\n};\nconst TeleportImpl = {\n  name: \"Teleport\",\n  __isTeleport: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {\n    const {\n      mc: mountChildren,\n      pc: patchChildren,\n      pbc: patchBlockChildren,\n      o: { insert, querySelector, createText, createComment }\n    } = internals;\n    const disabled = isTeleportDisabled(n2.props);\n    let { shapeFlag, children, dynamicChildren } = n2;\n    if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (n1 == null) {\n      const placeholder = n2.el = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport start\") : createText(\"\");\n      const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport end\") : createText(\"\");\n      insert(placeholder, container, anchor);\n      insert(mainAnchor, container, anchor);\n      const mount = (container2, anchor2) => {\n        if (shapeFlag & 16) {\n          if (parentComponent && parentComponent.isCE) {\n            parentComponent.ce._teleportTarget = container2;\n          }\n          mountChildren(\n            children,\n            container2,\n            anchor2,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      };\n      const mountToTarget = () => {\n        const target = n2.target = resolveTarget(n2.props, querySelector);\n        const targetAnchor = prepareAnchor(target, n2, createText, insert);\n        if (target) {\n          if (namespace !== \"svg\" && isTargetSVG(target)) {\n            namespace = \"svg\";\n          } else if (namespace !== \"mathml\" && isTargetMathML(target)) {\n            namespace = \"mathml\";\n          }\n          if (!disabled) {\n            mount(target, targetAnchor);\n            updateCssVars(n2, false);\n          }\n        } else if (!!(process.env.NODE_ENV !== \"production\") && !disabled) {\n          warn$1(\n            \"Invalid Teleport target on mount:\",\n            target,\n            `(${typeof target})`\n          );\n        }\n      };\n      if (disabled) {\n        mount(container, mainAnchor);\n        updateCssVars(n2, true);\n      }\n      if (isTeleportDeferred(n2.props)) {\n        queuePostRenderEffect(mountToTarget, parentSuspense);\n      } else {\n        mountToTarget();\n      }\n    } else {\n      n2.el = n1.el;\n      n2.targetStart = n1.targetStart;\n      const mainAnchor = n2.anchor = n1.anchor;\n      const target = n2.target = n1.target;\n      const targetAnchor = n2.targetAnchor = n1.targetAnchor;\n      const wasDisabled = isTeleportDisabled(n1.props);\n      const currentContainer = wasDisabled ? container : target;\n      const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\n      if (namespace === \"svg\" || isTargetSVG(target)) {\n        namespace = \"svg\";\n      } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n        namespace = \"mathml\";\n      }\n      if (dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          currentContainer,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        traverseStaticChildren(n1, n2, true);\n      } else if (!optimized) {\n        patchChildren(\n          n1,\n          n2,\n          currentContainer,\n          currentAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          false\n        );\n      }\n      if (disabled) {\n        if (!wasDisabled) {\n          moveTeleport(\n            n2,\n            container,\n            mainAnchor,\n            internals,\n            1\n          );\n        } else {\n          if (n2.props && n1.props && n2.props.to !== n1.props.to) {\n            n2.props.to = n1.props.to;\n          }\n        }\n      } else {\n        if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\n          const nextTarget = n2.target = resolveTarget(\n            n2.props,\n            querySelector\n          );\n          if (nextTarget) {\n            moveTeleport(\n              n2,\n              nextTarget,\n              null,\n              internals,\n              0\n            );\n          } else if (!!(process.env.NODE_ENV !== \"production\")) {\n            warn$1(\n              \"Invalid Teleport target on update:\",\n              target,\n              `(${typeof target})`\n            );\n          }\n        } else if (wasDisabled) {\n          moveTeleport(\n            n2,\n            target,\n            targetAnchor,\n            internals,\n            1\n          );\n        }\n      }\n      updateCssVars(n2, disabled);\n    }\n  },\n  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {\n    const {\n      shapeFlag,\n      children,\n      anchor,\n      targetStart,\n      targetAnchor,\n      target,\n      props\n    } = vnode;\n    if (target) {\n      hostRemove(targetStart);\n      hostRemove(targetAnchor);\n    }\n    doRemove && hostRemove(anchor);\n    if (shapeFlag & 16) {\n      const shouldRemove = doRemove || !isTeleportDisabled(props);\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        unmount(\n          child,\n          parentComponent,\n          parentSuspense,\n          shouldRemove,\n          !!child.dynamicChildren\n        );\n      }\n    }\n  },\n  move: moveTeleport,\n  hydrate: hydrateTeleport\n};\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {\n  if (moveType === 0) {\n    insert(vnode.targetAnchor, container, parentAnchor);\n  }\n  const { el, anchor, shapeFlag, children, props } = vnode;\n  const isReorder = moveType === 2;\n  if (isReorder) {\n    insert(el, container, parentAnchor);\n  }\n  if (!isReorder || isTeleportDisabled(props)) {\n    if (shapeFlag & 16) {\n      for (let i = 0; i < children.length; i++) {\n        move(\n          children[i],\n          container,\n          parentAnchor,\n          2\n        );\n      }\n    }\n  }\n  if (isReorder) {\n    insert(anchor, container, parentAnchor);\n  }\n}\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {\n  o: { nextSibling, parentNode, querySelector, insert, createText }\n}, hydrateChildren) {\n  const target = vnode.target = resolveTarget(\n    vnode.props,\n    querySelector\n  );\n  if (target) {\n    const disabled = isTeleportDisabled(vnode.props);\n    const targetNode = target._lpa || target.firstChild;\n    if (vnode.shapeFlag & 16) {\n      if (disabled) {\n        vnode.anchor = hydrateChildren(\n          nextSibling(node),\n          vnode,\n          parentNode(node),\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        vnode.targetStart = targetNode;\n        vnode.targetAnchor = targetNode && nextSibling(targetNode);\n      } else {\n        vnode.anchor = nextSibling(node);\n        let targetAnchor = targetNode;\n        while (targetAnchor) {\n          if (targetAnchor && targetAnchor.nodeType === 8) {\n            if (targetAnchor.data === \"teleport start anchor\") {\n              vnode.targetStart = targetAnchor;\n            } else if (targetAnchor.data === \"teleport anchor\") {\n              vnode.targetAnchor = targetAnchor;\n              target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);\n              break;\n            }\n          }\n          targetAnchor = nextSibling(targetAnchor);\n        }\n        if (!vnode.targetAnchor) {\n          prepareAnchor(target, vnode, createText, insert);\n        }\n        hydrateChildren(\n          targetNode && nextSibling(targetNode),\n          vnode,\n          target,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n    updateCssVars(vnode, disabled);\n  }\n  return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode, isDisabled) {\n  const ctx = vnode.ctx;\n  if (ctx && ctx.ut) {\n    let node, anchor;\n    if (isDisabled) {\n      node = vnode.el;\n      anchor = vnode.anchor;\n    } else {\n      node = vnode.targetStart;\n      anchor = vnode.targetAnchor;\n    }\n    while (node && node !== anchor) {\n      if (node.nodeType === 1) node.setAttribute(\"data-v-owner\", ctx.uid);\n      node = node.nextSibling;\n    }\n    ctx.ut();\n  }\n}\nfunction prepareAnchor(target, vnode, createText, insert) {\n  const targetStart = vnode.targetStart = createText(\"\");\n  const targetAnchor = vnode.targetAnchor = createText(\"\");\n  targetStart[TeleportEndKey] = targetAnchor;\n  if (target) {\n    insert(targetStart, target);\n    insert(targetAnchor, target);\n  }\n  return targetAnchor;\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n  const state = {\n    isMounted: false,\n    isLeaving: false,\n    isUnmounting: false,\n    leavingVNodes: /* @__PURE__ */ new Map()\n  };\n  onMounted(() => {\n    state.isMounted = true;\n  });\n  onBeforeUnmount(() => {\n    state.isUnmounting = true;\n  });\n  return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n  mode: String,\n  appear: Boolean,\n  persisted: Boolean,\n  // enter\n  onBeforeEnter: TransitionHookValidator,\n  onEnter: TransitionHookValidator,\n  onAfterEnter: TransitionHookValidator,\n  onEnterCancelled: TransitionHookValidator,\n  // leave\n  onBeforeLeave: TransitionHookValidator,\n  onLeave: TransitionHookValidator,\n  onAfterLeave: TransitionHookValidator,\n  onLeaveCancelled: TransitionHookValidator,\n  // appear\n  onBeforeAppear: TransitionHookValidator,\n  onAppear: TransitionHookValidator,\n  onAfterAppear: TransitionHookValidator,\n  onAppearCancelled: TransitionHookValidator\n};\nconst recursiveGetSubtree = (instance) => {\n  const subTree = instance.subTree;\n  return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;\n};\nconst BaseTransitionImpl = {\n  name: `BaseTransition`,\n  props: BaseTransitionPropsValidators,\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const state = useTransitionState();\n    return () => {\n      const children = slots.default && getTransitionRawChildren(slots.default(), true);\n      if (!children || !children.length) {\n        return;\n      }\n      const child = findNonCommentChild(children);\n      const rawProps = toRaw(props);\n      const { mode } = rawProps;\n      if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n        warn$1(`invalid <transition> mode: ${mode}`);\n      }\n      if (state.isLeaving) {\n        return emptyPlaceholder(child);\n      }\n      const innerChild = getInnerChild$1(child);\n      if (!innerChild) {\n        return emptyPlaceholder(child);\n      }\n      let enterHooks = resolveTransitionHooks(\n        innerChild,\n        rawProps,\n        state,\n        instance,\n        // #11061, ensure enterHooks is fresh after clone\n        (hooks) => enterHooks = hooks\n      );\n      if (innerChild.type !== Comment) {\n        setTransitionHooks(innerChild, enterHooks);\n      }\n      const oldChild = instance.subTree;\n      const oldInnerChild = oldChild && getInnerChild$1(oldChild);\n      if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n        const leavingHooks = resolveTransitionHooks(\n          oldInnerChild,\n          rawProps,\n          state,\n          instance\n        );\n        setTransitionHooks(oldInnerChild, leavingHooks);\n        if (mode === \"out-in\" && innerChild.type !== Comment) {\n          state.isLeaving = true;\n          leavingHooks.afterLeave = () => {\n            state.isLeaving = false;\n            if (!(instance.job.flags & 8)) {\n              instance.update();\n            }\n            delete leavingHooks.afterLeave;\n          };\n          return emptyPlaceholder(child);\n        } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n          leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n            const leavingVNodesCache = getLeavingNodesForType(\n              state,\n              oldInnerChild\n            );\n            leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n            el[leaveCbKey] = () => {\n              earlyRemove();\n              el[leaveCbKey] = void 0;\n              delete enterHooks.delayedLeave;\n            };\n            enterHooks.delayedLeave = delayedLeave;\n          };\n        }\n      }\n      return child;\n    };\n  }\n};\nfunction findNonCommentChild(children) {\n  let child = children[0];\n  if (children.length > 1) {\n    let hasFound = false;\n    for (const c of children) {\n      if (c.type !== Comment) {\n        if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n          warn$1(\n            \"<transition> can only be used on a single element or component. Use <transition-group> for lists.\"\n          );\n          break;\n        }\n        child = c;\n        hasFound = true;\n        if (!!!(process.env.NODE_ENV !== \"production\")) break;\n      }\n    }\n  }\n  return child;\n}\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n  const { leavingVNodes } = state;\n  let leavingVNodesCache = leavingVNodes.get(vnode.type);\n  if (!leavingVNodesCache) {\n    leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n    leavingVNodes.set(vnode.type, leavingVNodesCache);\n  }\n  return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance, postClone) {\n  const {\n    appear,\n    mode,\n    persisted = false,\n    onBeforeEnter,\n    onEnter,\n    onAfterEnter,\n    onEnterCancelled,\n    onBeforeLeave,\n    onLeave,\n    onAfterLeave,\n    onLeaveCancelled,\n    onBeforeAppear,\n    onAppear,\n    onAfterAppear,\n    onAppearCancelled\n  } = props;\n  const key = String(vnode.key);\n  const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n  const callHook = (hook, args) => {\n    hook && callWithAsyncErrorHandling(\n      hook,\n      instance,\n      9,\n      args\n    );\n  };\n  const callAsyncHook = (hook, args) => {\n    const done = args[1];\n    callHook(hook, args);\n    if (isArray(hook)) {\n      if (hook.every((hook2) => hook2.length <= 1)) done();\n    } else if (hook.length <= 1) {\n      done();\n    }\n  };\n  const hooks = {\n    mode,\n    persisted,\n    beforeEnter(el) {\n      let hook = onBeforeEnter;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onBeforeAppear || onBeforeEnter;\n        } else {\n          return;\n        }\n      }\n      if (el[leaveCbKey]) {\n        el[leaveCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      const leavingVNode = leavingVNodesCache[key];\n      if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n        leavingVNode.el[leaveCbKey]();\n      }\n      callHook(hook, [el]);\n    },\n    enter(el) {\n      let hook = onEnter;\n      let afterHook = onAfterEnter;\n      let cancelHook = onEnterCancelled;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onAppear || onEnter;\n          afterHook = onAfterAppear || onAfterEnter;\n          cancelHook = onAppearCancelled || onEnterCancelled;\n        } else {\n          return;\n        }\n      }\n      let called = false;\n      const done = el[enterCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        if (cancelled) {\n          callHook(cancelHook, [el]);\n        } else {\n          callHook(afterHook, [el]);\n        }\n        if (hooks.delayedLeave) {\n          hooks.delayedLeave();\n        }\n        el[enterCbKey] = void 0;\n      };\n      if (hook) {\n        callAsyncHook(hook, [el, done]);\n      } else {\n        done();\n      }\n    },\n    leave(el, remove) {\n      const key2 = String(vnode.key);\n      if (el[enterCbKey]) {\n        el[enterCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      if (state.isUnmounting) {\n        return remove();\n      }\n      callHook(onBeforeLeave, [el]);\n      let called = false;\n      const done = el[leaveCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        remove();\n        if (cancelled) {\n          callHook(onLeaveCancelled, [el]);\n        } else {\n          callHook(onAfterLeave, [el]);\n        }\n        el[leaveCbKey] = void 0;\n        if (leavingVNodesCache[key2] === vnode) {\n          delete leavingVNodesCache[key2];\n        }\n      };\n      leavingVNodesCache[key2] = vnode;\n      if (onLeave) {\n        callAsyncHook(onLeave, [el, done]);\n      } else {\n        done();\n      }\n    },\n    clone(vnode2) {\n      const hooks2 = resolveTransitionHooks(\n        vnode2,\n        props,\n        state,\n        instance,\n        postClone\n      );\n      if (postClone) postClone(hooks2);\n      return hooks2;\n    }\n  };\n  return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n  if (isKeepAlive(vnode)) {\n    vnode = cloneVNode(vnode);\n    vnode.children = null;\n    return vnode;\n  }\n}\nfunction getInnerChild$1(vnode) {\n  if (!isKeepAlive(vnode)) {\n    if (isTeleport(vnode.type) && vnode.children) {\n      return findNonCommentChild(vnode.children);\n    }\n    return vnode;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && vnode.component) {\n    return vnode.component.subTree;\n  }\n  const { shapeFlag, children } = vnode;\n  if (children) {\n    if (shapeFlag & 16) {\n      return children[0];\n    }\n    if (shapeFlag & 32 && isFunction(children.default)) {\n      return children.default();\n    }\n  }\n}\nfunction setTransitionHooks(vnode, hooks) {\n  if (vnode.shapeFlag & 6 && vnode.component) {\n    vnode.transition = hooks;\n    setTransitionHooks(vnode.component.subTree, hooks);\n  } else if (vnode.shapeFlag & 128) {\n    vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n    vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n  } else {\n    vnode.transition = hooks;\n  }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n  let ret = [];\n  let keyedFragmentCount = 0;\n  for (let i = 0; i < children.length; i++) {\n    let child = children[i];\n    const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n    if (child.type === Fragment) {\n      if (child.patchFlag & 128) keyedFragmentCount++;\n      ret = ret.concat(\n        getTransitionRawChildren(child.children, keepComment, key)\n      );\n    } else if (keepComment || child.type !== Comment) {\n      ret.push(key != null ? cloneVNode(child, { key }) : child);\n    }\n  }\n  if (keyedFragmentCount > 1) {\n    for (let i = 0; i < ret.length; i++) {\n      ret[i].patchFlag = -2;\n    }\n  }\n  return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n  return isFunction(options) ? (\n    // #8236: extend call and options.name access are considered side-effects\n    // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n    /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n  ) : options;\n}\n\nfunction useId() {\n  const i = getCurrentInstance();\n  if (i) {\n    return (i.appContext.config.idPrefix || \"v\") + \"-\" + i.ids[0] + i.ids[1]++;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `useId() is called when there is no active component instance to be associated with.`\n    );\n  }\n  return \"\";\n}\nfunction markAsyncBoundary(instance) {\n  instance.ids = [instance.ids[0] + instance.ids[2]++ + \"-\", 0, 0];\n}\n\nconst knownTemplateRefs = /* @__PURE__ */ new WeakSet();\nfunction useTemplateRef(key) {\n  const i = getCurrentInstance();\n  const r = shallowRef(null);\n  if (i) {\n    const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;\n    let desc;\n    if (!!(process.env.NODE_ENV !== \"production\") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {\n      warn$1(`useTemplateRef('${key}') already exists.`);\n    } else {\n      Object.defineProperty(refs, key, {\n        enumerable: true,\n        get: () => r.value,\n        set: (val) => r.value = val\n      });\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `useTemplateRef() is called when there is no active component instance to be associated with.`\n    );\n  }\n  const ret = !!(process.env.NODE_ENV !== \"production\") ? readonly(r) : r;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    knownTemplateRefs.add(ret);\n  }\n  return ret;\n}\n\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n  if (isArray(rawRef)) {\n    rawRef.forEach(\n      (r, i) => setRef(\n        r,\n        oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),\n        parentSuspense,\n        vnode,\n        isUnmount\n      )\n    );\n    return;\n  }\n  if (isAsyncWrapper(vnode) && !isUnmount) {\n    return;\n  }\n  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n  const value = isUnmount ? null : refValue;\n  const { i: owner, r: ref } = rawRef;\n  if (!!(process.env.NODE_ENV !== \"production\") && !owner) {\n    warn$1(\n      `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`\n    );\n    return;\n  }\n  const oldRef = oldRawRef && oldRawRef.r;\n  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n  const setupState = owner.setupState;\n  const rawSetupState = toRaw(setupState);\n  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {\n        warn$1(\n          `Template ref \"${key}\" used on a non-ref value. It will not work in the production build.`\n        );\n      }\n      if (knownTemplateRefs.has(rawSetupState[key])) {\n        return false;\n      }\n    }\n    return hasOwn(rawSetupState, key);\n  };\n  if (oldRef != null && oldRef !== ref) {\n    if (isString(oldRef)) {\n      refs[oldRef] = null;\n      if (canSetSetupRef(oldRef)) {\n        setupState[oldRef] = null;\n      }\n    } else if (isRef(oldRef)) {\n      oldRef.value = null;\n    }\n  }\n  if (isFunction(ref)) {\n    callWithErrorHandling(ref, owner, 12, [value, refs]);\n  } else {\n    const _isString = isString(ref);\n    const _isRef = isRef(ref);\n    if (_isString || _isRef) {\n      const doSet = () => {\n        if (rawRef.f) {\n          const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;\n          if (isUnmount) {\n            isArray(existing) && remove(existing, refValue);\n          } else {\n            if (!isArray(existing)) {\n              if (_isString) {\n                refs[ref] = [refValue];\n                if (canSetSetupRef(ref)) {\n                  setupState[ref] = refs[ref];\n                }\n              } else {\n                ref.value = [refValue];\n                if (rawRef.k) refs[rawRef.k] = ref.value;\n              }\n            } else if (!existing.includes(refValue)) {\n              existing.push(refValue);\n            }\n          }\n        } else if (_isString) {\n          refs[ref] = value;\n          if (canSetSetupRef(ref)) {\n            setupState[ref] = value;\n          }\n        } else if (_isRef) {\n          ref.value = value;\n          if (rawRef.k) refs[rawRef.k] = value;\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n        }\n      };\n      if (value) {\n        doSet.id = -1;\n        queuePostRenderEffect(doSet, parentSuspense);\n      } else {\n        doSet();\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n    }\n  }\n}\n\nlet hasLoggedMismatchError = false;\nconst logMismatchError = () => {\n  if (hasLoggedMismatchError) {\n    return;\n  }\n  console.error(\"Hydration completed but contains mismatches.\");\n  hasLoggedMismatchError = true;\n};\nconst isSVGContainer = (container) => container.namespaceURI.includes(\"svg\") && container.tagName !== \"foreignObject\";\nconst isMathMLContainer = (container) => container.namespaceURI.includes(\"MathML\");\nconst getContainerType = (container) => {\n  if (container.nodeType !== 1) return void 0;\n  if (isSVGContainer(container)) return \"svg\";\n  if (isMathMLContainer(container)) return \"mathml\";\n  return void 0;\n};\nconst isComment = (node) => node.nodeType === 8;\nfunction createHydrationFunctions(rendererInternals) {\n  const {\n    mt: mountComponent,\n    p: patch,\n    o: {\n      patchProp,\n      createText,\n      nextSibling,\n      parentNode,\n      remove,\n      insert,\n      createComment\n    }\n  } = rendererInternals;\n  const hydrate = (vnode, container) => {\n    if (!container.hasChildNodes()) {\n      (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n        `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`\n      );\n      patch(null, vnode, container);\n      flushPostFlushCbs();\n      container._vnode = vnode;\n      return;\n    }\n    hydrateNode(container.firstChild, vnode, null, null, null);\n    flushPostFlushCbs();\n    container._vnode = vnode;\n  };\n  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const isFragmentStart = isComment(node) && node.data === \"[\";\n    const onMismatch = () => handleMismatch(\n      node,\n      vnode,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      isFragmentStart\n    );\n    const { type, ref, shapeFlag, patchFlag } = vnode;\n    let domType = node.nodeType;\n    vnode.el = node;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      def(node, \"__vnode\", vnode, true);\n      def(node, \"__vueParentComponent\", parentComponent, true);\n    }\n    if (patchFlag === -2) {\n      optimized = false;\n      vnode.dynamicChildren = null;\n    }\n    let nextNode = null;\n    switch (type) {\n      case Text:\n        if (domType !== 3) {\n          if (vnode.children === \"\") {\n            insert(vnode.el = createText(\"\"), parentNode(node), node);\n            nextNode = node;\n          } else {\n            nextNode = onMismatch();\n          }\n        } else {\n          if (node.data !== vnode.children) {\n            (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n              `Hydration text mismatch in`,\n              node.parentNode,\n              `\n  - rendered on server: ${JSON.stringify(\n                node.data\n              )}\n  - expected on client: ${JSON.stringify(vnode.children)}`\n            );\n            logMismatchError();\n            node.data = vnode.children;\n          }\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Comment:\n        if (isTemplateNode(node)) {\n          nextNode = nextSibling(node);\n          replaceNode(\n            vnode.el = node.content.firstChild,\n            node,\n            parentComponent\n          );\n        } else if (domType !== 8 || isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Static:\n        if (isFragmentStart) {\n          node = nextSibling(node);\n          domType = node.nodeType;\n        }\n        if (domType === 1 || domType === 3) {\n          nextNode = node;\n          const needToAdoptContent = !vnode.children.length;\n          for (let i = 0; i < vnode.staticCount; i++) {\n            if (needToAdoptContent)\n              vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;\n            if (i === vnode.staticCount - 1) {\n              vnode.anchor = nextNode;\n            }\n            nextNode = nextSibling(nextNode);\n          }\n          return isFragmentStart ? nextSibling(nextNode) : nextNode;\n        } else {\n          onMismatch();\n        }\n        break;\n      case Fragment:\n        if (!isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = hydrateFragment(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            slotScopeIds,\n            optimized\n          );\n        }\n        break;\n      default:\n        if (shapeFlag & 1) {\n          if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = hydrateElement(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized\n            );\n          }\n        } else if (shapeFlag & 6) {\n          vnode.slotScopeIds = slotScopeIds;\n          const container = parentNode(node);\n          if (isFragmentStart) {\n            nextNode = locateClosingAnchor(node);\n          } else if (isComment(node) && node.data === \"teleport start\") {\n            nextNode = locateClosingAnchor(node, node.data, \"teleport end\");\n          } else {\n            nextNode = nextSibling(node);\n          }\n          mountComponent(\n            vnode,\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            getContainerType(container),\n            optimized\n          );\n          if (isAsyncWrapper(vnode)) {\n            let subTree;\n            if (isFragmentStart) {\n              subTree = createVNode(Fragment);\n              subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;\n            } else {\n              subTree = node.nodeType === 3 ? createTextVNode(\"\") : createVNode(\"div\");\n            }\n            subTree.el = node;\n            vnode.component.subTree = subTree;\n          }\n        } else if (shapeFlag & 64) {\n          if (domType !== 8) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = vnode.type.hydrate(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized,\n              rendererInternals,\n              hydrateChildren\n            );\n          }\n        } else if (shapeFlag & 128) {\n          nextNode = vnode.type.hydrate(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            getContainerType(parentNode(node)),\n            slotScopeIds,\n            optimized,\n            rendererInternals,\n            hydrateNode\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {\n          warn$1(\"Invalid HostVNode type:\", type, `(${typeof type})`);\n        }\n    }\n    if (ref != null) {\n      setRef(ref, null, parentSuspense, vnode);\n    }\n    return nextNode;\n  };\n  const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;\n    const forcePatch = type === \"input\" || type === \"option\";\n    if (!!(process.env.NODE_ENV !== \"production\") || forcePatch || patchFlag !== -1) {\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n      }\n      let needCallTransitionHooks = false;\n      if (isTemplateNode(el)) {\n        needCallTransitionHooks = needTransition(\n          null,\n          // no need check parentSuspense in hydration\n          transition\n        ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;\n        const content = el.content.firstChild;\n        if (needCallTransitionHooks) {\n          transition.beforeEnter(content);\n        }\n        replaceNode(content, el, parentComponent);\n        vnode.el = el = content;\n      }\n      if (shapeFlag & 16 && // skip if element has innerHTML / textContent\n      !(props && (props.innerHTML || props.textContent))) {\n        let next = hydrateChildren(\n          el.firstChild,\n          vnode,\n          el,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        let hasWarned = false;\n        while (next) {\n          if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {\n            if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n              warn$1(\n                `Hydration children mismatch on`,\n                el,\n                `\nServer rendered element contains more child nodes than client vdom.`\n              );\n              hasWarned = true;\n            }\n            logMismatchError();\n          }\n          const cur = next;\n          next = next.nextSibling;\n          remove(cur);\n        }\n      } else if (shapeFlag & 8) {\n        let clientText = vnode.children;\n        if (clientText[0] === \"\\n\" && (el.tagName === \"PRE\" || el.tagName === \"TEXTAREA\")) {\n          clientText = clientText.slice(1);\n        }\n        if (el.textContent !== clientText) {\n          if (!isMismatchAllowed(el, 0 /* TEXT */)) {\n            (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n              `Hydration text content mismatch on`,\n              el,\n              `\n  - rendered on server: ${el.textContent}\n  - expected on client: ${vnode.children}`\n            );\n            logMismatchError();\n          }\n          el.textContent = vnode.children;\n        }\n      }\n      if (props) {\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {\n          const isCustomElement = el.tagName.includes(\"-\");\n          for (const key in props) {\n            if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks\n            // as it could have mutated the DOM in any possible way\n            !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {\n              logMismatchError();\n            }\n            if (forcePatch && (key.endsWith(\"value\") || key === \"indeterminate\") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers\n            key[0] === \".\" || isCustomElement) {\n              patchProp(el, key, null, props[key], void 0, parentComponent);\n            }\n          }\n        } else if (props.onClick) {\n          patchProp(\n            el,\n            \"onClick\",\n            null,\n            props.onClick,\n            void 0,\n            parentComponent\n          );\n        } else if (patchFlag & 4 && isReactive(props.style)) {\n          for (const key in props.style) props.style[key];\n        }\n      }\n      let vnodeHooks;\n      if (vnodeHooks = props && props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n      }\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n      }\n      if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {\n        queueEffectWithSuspense(() => {\n          vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n          needCallTransitionHooks && transition.enter(el);\n          dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n        }, parentSuspense);\n      }\n    }\n    return el.nextSibling;\n  };\n  const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!parentVNode.dynamicChildren;\n    const children = parentVNode.children;\n    const l = children.length;\n    let hasWarned = false;\n    for (let i = 0; i < l; i++) {\n      const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);\n      const isText = vnode.type === Text;\n      if (node) {\n        if (isText && !optimized) {\n          if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {\n            insert(\n              createText(\n                node.data.slice(vnode.children.length)\n              ),\n              container,\n              nextSibling(node)\n            );\n            node.data = vnode.children;\n          }\n        }\n        node = hydrateNode(\n          node,\n          vnode,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      } else if (isText && !vnode.children) {\n        insert(vnode.el = createText(\"\"), container);\n      } else {\n        if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {\n          if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n            warn$1(\n              `Hydration children mismatch on`,\n              container,\n              `\nServer rendered element contains fewer child nodes than client vdom.`\n            );\n            hasWarned = true;\n          }\n          logMismatchError();\n        }\n        patch(\n          null,\n          vnode,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          getContainerType(container),\n          slotScopeIds\n        );\n      }\n    }\n    return node;\n  };\n  const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    const { slotScopeIds: fragmentSlotScopeIds } = vnode;\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    const container = parentNode(node);\n    const next = hydrateChildren(\n      nextSibling(node),\n      vnode,\n      container,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      optimized\n    );\n    if (next && isComment(next) && next.data === \"]\") {\n      return nextSibling(vnode.anchor = next);\n    } else {\n      logMismatchError();\n      insert(vnode.anchor = createComment(`]`), container, next);\n      return next;\n    }\n  };\n  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\n    if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) {\n      (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n        `Hydration node mismatch:\n- rendered on server:`,\n        node,\n        node.nodeType === 3 ? `(text)` : isComment(node) && node.data === \"[\" ? `(start of fragment)` : ``,\n        `\n- expected on client:`,\n        vnode.type\n      );\n      logMismatchError();\n    }\n    vnode.el = null;\n    if (isFragment) {\n      const end = locateClosingAnchor(node);\n      while (true) {\n        const next2 = nextSibling(node);\n        if (next2 && next2 !== end) {\n          remove(next2);\n        } else {\n          break;\n        }\n      }\n    }\n    const next = nextSibling(node);\n    const container = parentNode(node);\n    remove(node);\n    patch(\n      null,\n      vnode,\n      container,\n      next,\n      parentComponent,\n      parentSuspense,\n      getContainerType(container),\n      slotScopeIds\n    );\n    return next;\n  };\n  const locateClosingAnchor = (node, open = \"[\", close = \"]\") => {\n    let match = 0;\n    while (node) {\n      node = nextSibling(node);\n      if (node && isComment(node)) {\n        if (node.data === open) match++;\n        if (node.data === close) {\n          if (match === 0) {\n            return nextSibling(node);\n          } else {\n            match--;\n          }\n        }\n      }\n    }\n    return node;\n  };\n  const replaceNode = (newNode, oldNode, parentComponent) => {\n    const parentNode2 = oldNode.parentNode;\n    if (parentNode2) {\n      parentNode2.replaceChild(newNode, oldNode);\n    }\n    let parent = parentComponent;\n    while (parent) {\n      if (parent.vnode.el === oldNode) {\n        parent.vnode.el = parent.subTree.el = newNode;\n      }\n      parent = parent.parent;\n    }\n  };\n  const isTemplateNode = (node) => {\n    return node.nodeType === 1 && node.tagName === \"TEMPLATE\";\n  };\n  return [hydrate, hydrateNode];\n}\nfunction propHasMismatch(el, key, clientValue, vnode, instance) {\n  let mismatchType;\n  let mismatchKey;\n  let actual;\n  let expected;\n  if (key === \"class\") {\n    actual = el.getAttribute(\"class\");\n    expected = normalizeClass(clientValue);\n    if (!isSetEqual(toClassSet(actual || \"\"), toClassSet(expected))) {\n      mismatchType = 2 /* CLASS */;\n      mismatchKey = `class`;\n    }\n  } else if (key === \"style\") {\n    actual = el.getAttribute(\"style\") || \"\";\n    expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));\n    const actualMap = toStyleMap(actual);\n    const expectedMap = toStyleMap(expected);\n    if (vnode.dirs) {\n      for (const { dir, value } of vnode.dirs) {\n        if (dir.name === \"show\" && !value) {\n          expectedMap.set(\"display\", \"none\");\n        }\n      }\n    }\n    if (instance) {\n      resolveCssVars(instance, vnode, expectedMap);\n    }\n    if (!isMapEqual(actualMap, expectedMap)) {\n      mismatchType = 3 /* STYLE */;\n      mismatchKey = \"style\";\n    }\n  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {\n    if (isBooleanAttr(key)) {\n      actual = el.hasAttribute(key);\n      expected = includeBooleanAttr(clientValue);\n    } else if (clientValue == null) {\n      actual = el.hasAttribute(key);\n      expected = false;\n    } else {\n      if (el.hasAttribute(key)) {\n        actual = el.getAttribute(key);\n      } else if (key === \"value\" && el.tagName === \"TEXTAREA\") {\n        actual = el.value;\n      } else {\n        actual = false;\n      }\n      expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;\n    }\n    if (actual !== expected) {\n      mismatchType = 4 /* ATTRIBUTE */;\n      mismatchKey = key;\n    }\n  }\n  if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {\n    const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}=\"${v}\"`;\n    const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;\n    const postSegment = `\n  - rendered on server: ${format(actual)}\n  - expected on client: ${format(expected)}\n  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n  You should fix the source of the mismatch.`;\n    {\n      warn$1(preSegment, el, postSegment);\n    }\n    return true;\n  }\n  return false;\n}\nfunction toClassSet(str) {\n  return new Set(str.trim().split(/\\s+/));\n}\nfunction isSetEqual(a, b) {\n  if (a.size !== b.size) {\n    return false;\n  }\n  for (const s of a) {\n    if (!b.has(s)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction toStyleMap(str) {\n  const styleMap = /* @__PURE__ */ new Map();\n  for (const item of str.split(\";\")) {\n    let [key, value] = item.split(\":\");\n    key = key.trim();\n    value = value && value.trim();\n    if (key && value) {\n      styleMap.set(key, value);\n    }\n  }\n  return styleMap;\n}\nfunction isMapEqual(a, b) {\n  if (a.size !== b.size) {\n    return false;\n  }\n  for (const [key, value] of a) {\n    if (value !== b.get(key)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction resolveCssVars(instance, vnode, expectedMap) {\n  const root = instance.subTree;\n  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {\n    const cssVars = instance.getCssVars();\n    for (const key in cssVars) {\n      expectedMap.set(\n        `--${getEscapedCssVarName(key, false)}`,\n        String(cssVars[key])\n      );\n    }\n  }\n  if (vnode === root && instance.parent) {\n    resolveCssVars(instance.parent, instance.vnode, expectedMap);\n  }\n}\nconst allowMismatchAttr = \"data-allow-mismatch\";\nconst MismatchTypeString = {\n  [0 /* TEXT */]: \"text\",\n  [1 /* CHILDREN */]: \"children\",\n  [2 /* CLASS */]: \"class\",\n  [3 /* STYLE */]: \"style\",\n  [4 /* ATTRIBUTE */]: \"attribute\"\n};\nfunction isMismatchAllowed(el, allowedType) {\n  if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) {\n    while (el && !el.hasAttribute(allowMismatchAttr)) {\n      el = el.parentElement;\n    }\n  }\n  const allowedAttr = el && el.getAttribute(allowMismatchAttr);\n  if (allowedAttr == null) {\n    return false;\n  } else if (allowedAttr === \"\") {\n    return true;\n  } else {\n    const list = allowedAttr.split(\",\");\n    if (allowedType === 0 /* TEXT */ && list.includes(\"children\")) {\n      return true;\n    }\n    return allowedAttr.split(\",\").includes(MismatchTypeString[allowedType]);\n  }\n}\n\nconst requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));\nconst cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));\nconst hydrateOnIdle = (timeout = 1e4) => (hydrate) => {\n  const id = requestIdleCallback(hydrate, { timeout });\n  return () => cancelIdleCallback(id);\n};\nfunction elementIsVisibleInViewport(el) {\n  const { top, left, bottom, right } = el.getBoundingClientRect();\n  const { innerHeight, innerWidth } = window;\n  return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);\n}\nconst hydrateOnVisible = (opts) => (hydrate, forEach) => {\n  const ob = new IntersectionObserver((entries) => {\n    for (const e of entries) {\n      if (!e.isIntersecting) continue;\n      ob.disconnect();\n      hydrate();\n      break;\n    }\n  }, opts);\n  forEach((el) => {\n    if (!(el instanceof Element)) return;\n    if (elementIsVisibleInViewport(el)) {\n      hydrate();\n      ob.disconnect();\n      return false;\n    }\n    ob.observe(el);\n  });\n  return () => ob.disconnect();\n};\nconst hydrateOnMediaQuery = (query) => (hydrate) => {\n  if (query) {\n    const mql = matchMedia(query);\n    if (mql.matches) {\n      hydrate();\n    } else {\n      mql.addEventListener(\"change\", hydrate, { once: true });\n      return () => mql.removeEventListener(\"change\", hydrate);\n    }\n  }\n};\nconst hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {\n  if (isString(interactions)) interactions = [interactions];\n  let hasHydrated = false;\n  const doHydrate = (e) => {\n    if (!hasHydrated) {\n      hasHydrated = true;\n      teardown();\n      hydrate();\n      e.target.dispatchEvent(new e.constructor(e.type, e));\n    }\n  };\n  const teardown = () => {\n    forEach((el) => {\n      for (const i of interactions) {\n        el.removeEventListener(i, doHydrate);\n      }\n    });\n  };\n  forEach((el) => {\n    for (const i of interactions) {\n      el.addEventListener(i, doHydrate, { once: true });\n    }\n  });\n  return teardown;\n};\nfunction forEachElement(node, cb) {\n  if (isComment(node) && node.data === \"[\") {\n    let depth = 1;\n    let next = node.nextSibling;\n    while (next) {\n      if (next.nodeType === 1) {\n        const result = cb(next);\n        if (result === false) {\n          break;\n        }\n      } else if (isComment(next)) {\n        if (next.data === \"]\") {\n          if (--depth === 0) break;\n        } else if (next.data === \"[\") {\n          depth++;\n        }\n      }\n      next = next.nextSibling;\n    }\n  } else {\n    cb(node);\n  }\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n  if (isFunction(source)) {\n    source = { loader: source };\n  }\n  const {\n    loader,\n    loadingComponent,\n    errorComponent,\n    delay = 200,\n    hydrate: hydrateStrategy,\n    timeout,\n    // undefined = never times out\n    suspensible = true,\n    onError: userOnError\n  } = source;\n  let pendingRequest = null;\n  let resolvedComp;\n  let retries = 0;\n  const retry = () => {\n    retries++;\n    pendingRequest = null;\n    return load();\n  };\n  const load = () => {\n    let thisRequest;\n    return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n      err = err instanceof Error ? err : new Error(String(err));\n      if (userOnError) {\n        return new Promise((resolve, reject) => {\n          const userRetry = () => resolve(retry());\n          const userFail = () => reject(err);\n          userOnError(err, userRetry, userFail, retries + 1);\n        });\n      } else {\n        throw err;\n      }\n    }).then((comp) => {\n      if (thisRequest !== pendingRequest && pendingRequest) {\n        return pendingRequest;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n        warn$1(\n          `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n        );\n      }\n      if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n        comp = comp.default;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n        throw new Error(`Invalid async component load result: ${comp}`);\n      }\n      resolvedComp = comp;\n      return comp;\n    }));\n  };\n  return defineComponent({\n    name: \"AsyncComponentWrapper\",\n    __asyncLoader: load,\n    __asyncHydrate(el, instance, hydrate) {\n      const doHydrate = hydrateStrategy ? () => {\n        const teardown = hydrateStrategy(\n          hydrate,\n          (cb) => forEachElement(el, cb)\n        );\n        if (teardown) {\n          (instance.bum || (instance.bum = [])).push(teardown);\n        }\n      } : hydrate;\n      if (resolvedComp) {\n        doHydrate();\n      } else {\n        load().then(() => !instance.isUnmounted && doHydrate());\n      }\n    },\n    get __asyncResolved() {\n      return resolvedComp;\n    },\n    setup() {\n      const instance = currentInstance;\n      markAsyncBoundary(instance);\n      if (resolvedComp) {\n        return () => createInnerComp(resolvedComp, instance);\n      }\n      const onError = (err) => {\n        pendingRequest = null;\n        handleError(\n          err,\n          instance,\n          13,\n          !errorComponent\n        );\n      };\n      if (suspensible && instance.suspense || isInSSRComponentSetup) {\n        return load().then((comp) => {\n          return () => createInnerComp(comp, instance);\n        }).catch((err) => {\n          onError(err);\n          return () => errorComponent ? createVNode(errorComponent, {\n            error: err\n          }) : null;\n        });\n      }\n      const loaded = ref(false);\n      const error = ref();\n      const delayed = ref(!!delay);\n      if (delay) {\n        setTimeout(() => {\n          delayed.value = false;\n        }, delay);\n      }\n      if (timeout != null) {\n        setTimeout(() => {\n          if (!loaded.value && !error.value) {\n            const err = new Error(\n              `Async component timed out after ${timeout}ms.`\n            );\n            onError(err);\n            error.value = err;\n          }\n        }, timeout);\n      }\n      load().then(() => {\n        loaded.value = true;\n        if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n          instance.parent.update();\n        }\n      }).catch((err) => {\n        onError(err);\n        error.value = err;\n      });\n      return () => {\n        if (loaded.value && resolvedComp) {\n          return createInnerComp(resolvedComp, instance);\n        } else if (error.value && errorComponent) {\n          return createVNode(errorComponent, {\n            error: error.value\n          });\n        } else if (loadingComponent && !delayed.value) {\n          return createVNode(loadingComponent);\n        }\n      };\n    }\n  });\n}\nfunction createInnerComp(comp, parent) {\n  const { ref: ref2, props, children, ce } = parent.vnode;\n  const vnode = createVNode(comp, props, children);\n  vnode.ref = ref2;\n  vnode.ce = ce;\n  delete parent.vnode.ce;\n  return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n  name: `KeepAlive`,\n  // Marker for special handling inside the renderer. We are not using a ===\n  // check directly on KeepAlive in the renderer, because importing it directly\n  // would prevent it from being tree-shaken.\n  __isKeepAlive: true,\n  props: {\n    include: [String, RegExp, Array],\n    exclude: [String, RegExp, Array],\n    max: [String, Number]\n  },\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const sharedContext = instance.ctx;\n    if (!sharedContext.renderer) {\n      return () => {\n        const children = slots.default && slots.default();\n        return children && children.length === 1 ? children[0] : children;\n      };\n    }\n    const cache = /* @__PURE__ */ new Map();\n    const keys = /* @__PURE__ */ new Set();\n    let current = null;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      instance.__v_cache = cache;\n    }\n    const parentSuspense = instance.suspense;\n    const {\n      renderer: {\n        p: patch,\n        m: move,\n        um: _unmount,\n        o: { createElement }\n      }\n    } = sharedContext;\n    const storageContainer = createElement(\"div\");\n    sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n      const instance2 = vnode.component;\n      move(vnode, container, anchor, 0, parentSuspense);\n      patch(\n        instance2.vnode,\n        vnode,\n        container,\n        anchor,\n        instance2,\n        parentSuspense,\n        namespace,\n        vnode.slotScopeIds,\n        optimized\n      );\n      queuePostRenderEffect(() => {\n        instance2.isDeactivated = false;\n        if (instance2.a) {\n          invokeArrayFns(instance2.a);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n      }, parentSuspense);\n      if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n        devtoolsComponentAdded(instance2);\n      }\n    };\n    sharedContext.deactivate = (vnode) => {\n      const instance2 = vnode.component;\n      invalidateMount(instance2.m);\n      invalidateMount(instance2.a);\n      move(vnode, storageContainer, null, 1, parentSuspense);\n      queuePostRenderEffect(() => {\n        if (instance2.da) {\n          invokeArrayFns(instance2.da);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n        instance2.isDeactivated = true;\n      }, parentSuspense);\n      if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n        devtoolsComponentAdded(instance2);\n      }\n    };\n    function unmount(vnode) {\n      resetShapeFlag(vnode);\n      _unmount(vnode, instance, parentSuspense, true);\n    }\n    function pruneCache(filter) {\n      cache.forEach((vnode, key) => {\n        const name = getComponentName(vnode.type);\n        if (name && !filter(name)) {\n          pruneCacheEntry(key);\n        }\n      });\n    }\n    function pruneCacheEntry(key) {\n      const cached = cache.get(key);\n      if (cached && (!current || !isSameVNodeType(cached, current))) {\n        unmount(cached);\n      } else if (current) {\n        resetShapeFlag(current);\n      }\n      cache.delete(key);\n      keys.delete(key);\n    }\n    watch(\n      () => [props.include, props.exclude],\n      ([include, exclude]) => {\n        include && pruneCache((name) => matches(include, name));\n        exclude && pruneCache((name) => !matches(exclude, name));\n      },\n      // prune post-render after `current` has been updated\n      { flush: \"post\", deep: true }\n    );\n    let pendingCacheKey = null;\n    const cacheSubtree = () => {\n      if (pendingCacheKey != null) {\n        if (isSuspense(instance.subTree.type)) {\n          queuePostRenderEffect(() => {\n            cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n          }, instance.subTree.suspense);\n        } else {\n          cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n        }\n      }\n    };\n    onMounted(cacheSubtree);\n    onUpdated(cacheSubtree);\n    onBeforeUnmount(() => {\n      cache.forEach((cached) => {\n        const { subTree, suspense } = instance;\n        const vnode = getInnerChild(subTree);\n        if (cached.type === vnode.type && cached.key === vnode.key) {\n          resetShapeFlag(vnode);\n          const da = vnode.component.da;\n          da && queuePostRenderEffect(da, suspense);\n          return;\n        }\n        unmount(cached);\n      });\n    });\n    return () => {\n      pendingCacheKey = null;\n      if (!slots.default) {\n        return current = null;\n      }\n      const children = slots.default();\n      const rawVNode = children[0];\n      if (children.length > 1) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(`KeepAlive should contain exactly one component child.`);\n        }\n        current = null;\n        return children;\n      } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n        current = null;\n        return rawVNode;\n      }\n      let vnode = getInnerChild(rawVNode);\n      if (vnode.type === Comment) {\n        current = null;\n        return vnode;\n      }\n      const comp = vnode.type;\n      const name = getComponentName(\n        isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n      );\n      const { include, exclude, max } = props;\n      if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n        vnode.shapeFlag &= ~256;\n        current = vnode;\n        return rawVNode;\n      }\n      const key = vnode.key == null ? comp : vnode.key;\n      const cachedVNode = cache.get(key);\n      if (vnode.el) {\n        vnode = cloneVNode(vnode);\n        if (rawVNode.shapeFlag & 128) {\n          rawVNode.ssContent = vnode;\n        }\n      }\n      pendingCacheKey = key;\n      if (cachedVNode) {\n        vnode.el = cachedVNode.el;\n        vnode.component = cachedVNode.component;\n        if (vnode.transition) {\n          setTransitionHooks(vnode, vnode.transition);\n        }\n        vnode.shapeFlag |= 512;\n        keys.delete(key);\n        keys.add(key);\n      } else {\n        keys.add(key);\n        if (max && keys.size > parseInt(max, 10)) {\n          pruneCacheEntry(keys.values().next().value);\n        }\n      }\n      vnode.shapeFlag |= 256;\n      current = vnode;\n      return isSuspense(rawVNode.type) ? rawVNode : vnode;\n    };\n  }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n  if (isArray(pattern)) {\n    return pattern.some((p) => matches(p, name));\n  } else if (isString(pattern)) {\n    return pattern.split(\",\").includes(name);\n  } else if (isRegExp(pattern)) {\n    pattern.lastIndex = 0;\n    return pattern.test(name);\n  }\n  return false;\n}\nfunction onActivated(hook, target) {\n  registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n  registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n  const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n    let current = target;\n    while (current) {\n      if (current.isDeactivated) {\n        return;\n      }\n      current = current.parent;\n    }\n    return hook();\n  });\n  injectHook(type, wrappedHook, target);\n  if (target) {\n    let current = target.parent;\n    while (current && current.parent) {\n      if (isKeepAlive(current.parent.vnode)) {\n        injectToKeepAliveRoot(wrappedHook, type, target, current);\n      }\n      current = current.parent;\n    }\n  }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n  const injected = injectHook(\n    type,\n    hook,\n    keepAliveRoot,\n    true\n    /* prepend */\n  );\n  onUnmounted(() => {\n    remove(keepAliveRoot[type], injected);\n  }, target);\n}\nfunction resetShapeFlag(vnode) {\n  vnode.shapeFlag &= ~256;\n  vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n  if (target) {\n    const hooks = target[type] || (target[type] = []);\n    const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n      pauseTracking();\n      const reset = setCurrentInstance(target);\n      const res = callWithAsyncErrorHandling(hook, target, type, args);\n      reset();\n      resetTracking();\n      return res;\n    });\n    if (prepend) {\n      hooks.unshift(wrappedHook);\n    } else {\n      hooks.push(wrappedHook);\n    }\n    return wrappedHook;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n    warn$1(\n      `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n    );\n  }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => {\n  if (!isInSSRComponentSetup || lifecycle === \"sp\") {\n    injectHook(lifecycle, (...args) => hook(...args), target);\n  }\n};\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\n  \"bu\"\n);\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\n  \"bum\"\n);\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\n  \"sp\"\n);\nconst onRenderTriggered = createHook(\"rtg\");\nconst onRenderTracked = createHook(\"rtc\");\nfunction onErrorCaptured(hook, target = currentInstance) {\n  injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n  if (isString(component)) {\n    return resolveAsset(COMPONENTS, component, false) || component;\n  } else {\n    return component || NULL_DYNAMIC_COMPONENT;\n  }\n}\nfunction resolveDirective(name) {\n  return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n  const instance = currentRenderingInstance || currentInstance;\n  if (instance) {\n    const Component = instance.type;\n    if (type === COMPONENTS) {\n      const selfName = getComponentName(\n        Component,\n        false\n      );\n      if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n        return Component;\n      }\n    }\n    const res = (\n      // local registration\n      // check instance[type] first which is resolved for options API\n      resolve(instance[type] || Component[type], name) || // global registration\n      resolve(instance.appContext[type], name)\n    );\n    if (!res && maybeSelfReference) {\n      return Component;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n      const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n      warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n    }\n    return res;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n    );\n  }\n}\nfunction resolve(registry, name) {\n  return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n  let ret;\n  const cached = cache && cache[index];\n  const sourceIsArray = isArray(source);\n  if (sourceIsArray || isString(source)) {\n    const sourceIsReactiveArray = sourceIsArray && isReactive(source);\n    let needsWrap = false;\n    if (sourceIsReactiveArray) {\n      needsWrap = !isShallow(source);\n      source = shallowReadArray(source);\n    }\n    ret = new Array(source.length);\n    for (let i = 0, l = source.length; i < l; i++) {\n      ret[i] = renderItem(\n        needsWrap ? toReactive(source[i]) : source[i],\n        i,\n        void 0,\n        cached && cached[i]\n      );\n    }\n  } else if (typeof source === \"number\") {\n    if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n      warn$1(`The v-for range expect an integer value but got ${source}.`);\n    }\n    ret = new Array(source);\n    for (let i = 0; i < source; i++) {\n      ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n    }\n  } else if (isObject(source)) {\n    if (source[Symbol.iterator]) {\n      ret = Array.from(\n        source,\n        (item, i) => renderItem(item, i, void 0, cached && cached[i])\n      );\n    } else {\n      const keys = Object.keys(source);\n      ret = new Array(keys.length);\n      for (let i = 0, l = keys.length; i < l; i++) {\n        const key = keys[i];\n        ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n      }\n    }\n  } else {\n    ret = [];\n  }\n  if (cache) {\n    cache[index] = ret;\n  }\n  return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n  for (let i = 0; i < dynamicSlots.length; i++) {\n    const slot = dynamicSlots[i];\n    if (isArray(slot)) {\n      for (let j = 0; j < slot.length; j++) {\n        slots[slot[j].name] = slot[j].fn;\n      }\n    } else if (slot) {\n      slots[slot.name] = slot.key ? (...args) => {\n        const res = slot.fn(...args);\n        if (res) res.key = slot.key;\n        return res;\n      } : slot.fn;\n    }\n  }\n  return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {\n    if (name !== \"default\") props.name = name;\n    return openBlock(), createBlock(\n      Fragment,\n      null,\n      [createVNode(\"slot\", props, fallback && fallback())],\n      64\n    );\n  }\n  let slot = slots[name];\n  if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n    warn$1(\n      `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n    );\n    slot = () => [];\n  }\n  if (slot && slot._c) {\n    slot._d = false;\n  }\n  openBlock();\n  const validSlotContent = slot && ensureValidVNode(slot(props));\n  const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch\n  // key attached in the `createSlots` helper, respect that\n  validSlotContent && validSlotContent.key;\n  const rendered = createBlock(\n    Fragment,\n    {\n      key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content\n      (!validSlotContent && fallback ? \"_fb\" : \"\")\n    },\n    validSlotContent || (fallback ? fallback() : []),\n    validSlotContent && slots._ === 1 ? 64 : -2\n  );\n  if (!noSlotted && rendered.scopeId) {\n    rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n  }\n  if (slot && slot._c) {\n    slot._d = true;\n  }\n  return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n  return vnodes.some((child) => {\n    if (!isVNode(child)) return true;\n    if (child.type === Comment) return false;\n    if (child.type === Fragment && !ensureValidVNode(child.children))\n      return false;\n    return true;\n  }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n  const ret = {};\n  if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n    warn$1(`v-on with no argument expects an object value.`);\n    return ret;\n  }\n  for (const key in obj) {\n    ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n  }\n  return ret;\n}\n\nconst getPublicInstance = (i) => {\n  if (!i) return null;\n  if (isStatefulComponent(i)) return getComponentPublicInstance(i);\n  return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n  // Move PURE marker to new line to workaround compiler discarding it\n  // due to type annotation\n  /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n    $: (i) => i,\n    $el: (i) => i.vnode.el,\n    $data: (i) => i.data,\n    $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n    $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n    $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n    $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n    $parent: (i) => getPublicInstance(i.parent),\n    $root: (i) => getPublicInstance(i.root),\n    $host: (i) => i.ce,\n    $emit: (i) => i.emit,\n    $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n    $forceUpdate: (i) => i.f || (i.f = () => {\n      queueJob(i.update);\n    }),\n    $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n    $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n  })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n  get({ _: instance }, key) {\n    if (key === \"__v_skip\") {\n      return true;\n    }\n    const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n    if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n      return true;\n    }\n    let normalizedProps;\n    if (key[0] !== \"$\") {\n      const n = accessCache[key];\n      if (n !== void 0) {\n        switch (n) {\n          case 1 /* SETUP */:\n            return setupState[key];\n          case 2 /* DATA */:\n            return data[key];\n          case 4 /* CONTEXT */:\n            return ctx[key];\n          case 3 /* PROPS */:\n            return props[key];\n        }\n      } else if (hasSetupBinding(setupState, key)) {\n        accessCache[key] = 1 /* SETUP */;\n        return setupState[key];\n      } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n        accessCache[key] = 2 /* DATA */;\n        return data[key];\n      } else if (\n        // only cache other properties when instance has declared (thus stable)\n        // props\n        (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n      ) {\n        accessCache[key] = 3 /* PROPS */;\n        return props[key];\n      } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n        accessCache[key] = 4 /* CONTEXT */;\n        return ctx[key];\n      } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n        accessCache[key] = 0 /* OTHER */;\n      }\n    }\n    const publicGetter = publicPropertiesMap[key];\n    let cssModule, globalProperties;\n    if (publicGetter) {\n      if (key === \"$attrs\") {\n        track(instance.attrs, \"get\", \"\");\n        !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n      } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n        track(instance, \"get\", key);\n      }\n      return publicGetter(instance);\n    } else if (\n      // css module (injected by vue-loader)\n      (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n    ) {\n      return cssModule;\n    } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n      accessCache[key] = 4 /* CONTEXT */;\n      return ctx[key];\n    } else if (\n      // global properties\n      globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n    ) {\n      {\n        return globalProperties[key];\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n    // to infinite warning loop\n    key.indexOf(\"__v\") !== 0)) {\n      if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n        warn$1(\n          `Property ${JSON.stringify(\n            key\n          )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n        );\n      } else if (instance === currentRenderingInstance) {\n        warn$1(\n          `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n        );\n      }\n    }\n  },\n  set({ _: instance }, key, value) {\n    const { data, setupState, ctx } = instance;\n    if (hasSetupBinding(setupState, key)) {\n      setupState[key] = value;\n      return true;\n    } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n      warn$1(`Cannot mutate <script setup> binding \"${key}\" from Options API.`);\n      return false;\n    } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n      data[key] = value;\n      return true;\n    } else if (hasOwn(instance.props, key)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`Attempting to mutate prop \"${key}\". Props are readonly.`);\n      return false;\n    }\n    if (key[0] === \"$\" && key.slice(1) in instance) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Attempting to mutate public property \"${key}\". Properties starting with $ are reserved and readonly.`\n      );\n      return false;\n    } else {\n      if (!!(process.env.NODE_ENV !== \"production\") && key in instance.appContext.config.globalProperties) {\n        Object.defineProperty(ctx, key, {\n          enumerable: true,\n          configurable: true,\n          value\n        });\n      } else {\n        ctx[key] = value;\n      }\n    }\n    return true;\n  },\n  has({\n    _: { data, setupState, accessCache, ctx, appContext, propsOptions }\n  }, key) {\n    let normalizedProps;\n    return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);\n  },\n  defineProperty(target, key, descriptor) {\n    if (descriptor.get != null) {\n      target._.accessCache[key] = 0;\n    } else if (hasOwn(descriptor, \"value\")) {\n      this.set(target, key, descriptor.value, null);\n    }\n    return Reflect.defineProperty(target, key, descriptor);\n  }\n};\nif (!!(process.env.NODE_ENV !== \"production\") && true) {\n  PublicInstanceProxyHandlers.ownKeys = (target) => {\n    warn$1(\n      `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`\n    );\n    return Reflect.ownKeys(target);\n  };\n}\nconst RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {\n  get(target, key) {\n    if (key === Symbol.unscopables) {\n      return;\n    }\n    return PublicInstanceProxyHandlers.get(target, key, target);\n  },\n  has(_, key) {\n    const has = key[0] !== \"_\" && !isGloballyAllowed(key);\n    if (!!(process.env.NODE_ENV !== \"production\") && !has && PublicInstanceProxyHandlers.has(_, key)) {\n      warn$1(\n        `Property ${JSON.stringify(\n          key\n        )} should not start with _ which is a reserved prefix for Vue internals.`\n      );\n    }\n    return has;\n  }\n});\nfunction createDevRenderContext(instance) {\n  const target = {};\n  Object.defineProperty(target, `_`, {\n    configurable: true,\n    enumerable: false,\n    get: () => instance\n  });\n  Object.keys(publicPropertiesMap).forEach((key) => {\n    Object.defineProperty(target, key, {\n      configurable: true,\n      enumerable: false,\n      get: () => publicPropertiesMap[key](instance),\n      // intercepted by the proxy so no need for implementation,\n      // but needed to prevent set errors\n      set: NOOP\n    });\n  });\n  return target;\n}\nfunction exposePropsOnRenderContext(instance) {\n  const {\n    ctx,\n    propsOptions: [propsOptions]\n  } = instance;\n  if (propsOptions) {\n    Object.keys(propsOptions).forEach((key) => {\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => instance.props[key],\n        set: NOOP\n      });\n    });\n  }\n}\nfunction exposeSetupStateOnRenderContext(instance) {\n  const { ctx, setupState } = instance;\n  Object.keys(toRaw(setupState)).forEach((key) => {\n    if (!setupState.__isScriptSetup) {\n      if (isReservedPrefix(key[0])) {\n        warn$1(\n          `setup() return property ${JSON.stringify(\n            key\n          )} should not start with \"$\" or \"_\" which are reserved prefixes for Vue internals.`\n        );\n        return;\n      }\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => setupState[key],\n        set: NOOP\n      });\n    }\n  });\n}\n\nconst warnRuntimeUsage = (method) => warn$1(\n  `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`\n);\nfunction defineProps() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineProps`);\n  }\n  return null;\n}\nfunction defineEmits() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineEmits`);\n  }\n  return null;\n}\nfunction defineExpose(exposed) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineExpose`);\n  }\n}\nfunction defineOptions(options) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineOptions`);\n  }\n}\nfunction defineSlots() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineSlots`);\n  }\n  return null;\n}\nfunction defineModel() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(\"defineModel\");\n  }\n}\nfunction withDefaults(props, defaults) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`withDefaults`);\n  }\n  return null;\n}\nfunction useSlots() {\n  return getContext().slots;\n}\nfunction useAttrs() {\n  return getContext().attrs;\n}\nfunction getContext() {\n  const i = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n    warn$1(`useContext() called without active instance.`);\n  }\n  return i.setupContext || (i.setupContext = createSetupContext(i));\n}\nfunction normalizePropsOrEmits(props) {\n  return isArray(props) ? props.reduce(\n    (normalized, p) => (normalized[p] = null, normalized),\n    {}\n  ) : props;\n}\nfunction mergeDefaults(raw, defaults) {\n  const props = normalizePropsOrEmits(raw);\n  for (const key in defaults) {\n    if (key.startsWith(\"__skip\")) continue;\n    let opt = props[key];\n    if (opt) {\n      if (isArray(opt) || isFunction(opt)) {\n        opt = props[key] = { type: opt, default: defaults[key] };\n      } else {\n        opt.default = defaults[key];\n      }\n    } else if (opt === null) {\n      opt = props[key] = { default: defaults[key] };\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`props default key \"${key}\" has no corresponding declaration.`);\n    }\n    if (opt && defaults[`__skip_${key}`]) {\n      opt.skipFactory = true;\n    }\n  }\n  return props;\n}\nfunction mergeModels(a, b) {\n  if (!a || !b) return a || b;\n  if (isArray(a) && isArray(b)) return a.concat(b);\n  return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));\n}\nfunction createPropsRestProxy(props, excludedKeys) {\n  const ret = {};\n  for (const key in props) {\n    if (!excludedKeys.includes(key)) {\n      Object.defineProperty(ret, key, {\n        enumerable: true,\n        get: () => props[key]\n      });\n    }\n  }\n  return ret;\n}\nfunction withAsyncContext(getAwaitable) {\n  const ctx = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !ctx) {\n    warn$1(\n      `withAsyncContext called without active current instance. This is likely a bug.`\n    );\n  }\n  let awaitable = getAwaitable();\n  unsetCurrentInstance();\n  if (isPromise(awaitable)) {\n    awaitable = awaitable.catch((e) => {\n      setCurrentInstance(ctx);\n      throw e;\n    });\n  }\n  return [awaitable, () => setCurrentInstance(ctx)];\n}\n\nfunction createDuplicateChecker() {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (type, key) => {\n    if (cache[key]) {\n      warn$1(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\n    } else {\n      cache[key] = type;\n    }\n  };\n}\nlet shouldCacheAccess = true;\nfunction applyOptions(instance) {\n  const options = resolveMergedOptions(instance);\n  const publicThis = instance.proxy;\n  const ctx = instance.ctx;\n  shouldCacheAccess = false;\n  if (options.beforeCreate) {\n    callHook(options.beforeCreate, instance, \"bc\");\n  }\n  const {\n    // state\n    data: dataOptions,\n    computed: computedOptions,\n    methods,\n    watch: watchOptions,\n    provide: provideOptions,\n    inject: injectOptions,\n    // lifecycle\n    created,\n    beforeMount,\n    mounted,\n    beforeUpdate,\n    updated,\n    activated,\n    deactivated,\n    beforeDestroy,\n    beforeUnmount,\n    destroyed,\n    unmounted,\n    render,\n    renderTracked,\n    renderTriggered,\n    errorCaptured,\n    serverPrefetch,\n    // public API\n    expose,\n    inheritAttrs,\n    // assets\n    components,\n    directives,\n    filters\n  } = options;\n  const checkDuplicateProperties = !!(process.env.NODE_ENV !== \"production\") ? createDuplicateChecker() : null;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const [propsOptions] = instance.propsOptions;\n    if (propsOptions) {\n      for (const key in propsOptions) {\n        checkDuplicateProperties(\"Props\" /* PROPS */, key);\n      }\n    }\n  }\n  if (injectOptions) {\n    resolveInjections(injectOptions, ctx, checkDuplicateProperties);\n  }\n  if (methods) {\n    for (const key in methods) {\n      const methodHandler = methods[key];\n      if (isFunction(methodHandler)) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          Object.defineProperty(ctx, key, {\n            value: methodHandler.bind(publicThis),\n            configurable: true,\n            enumerable: true,\n            writable: true\n          });\n        } else {\n          ctx[key] = methodHandler.bind(publicThis);\n        }\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          checkDuplicateProperties(\"Methods\" /* METHODS */, key);\n        }\n      } else if (!!(process.env.NODE_ENV !== \"production\")) {\n        warn$1(\n          `Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. Did you reference the function correctly?`\n        );\n      }\n    }\n  }\n  if (dataOptions) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(dataOptions)) {\n      warn$1(\n        `The data option must be a function. Plain object usage is no longer supported.`\n      );\n    }\n    const data = dataOptions.call(publicThis, publicThis);\n    if (!!(process.env.NODE_ENV !== \"production\") && isPromise(data)) {\n      warn$1(\n        `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`\n      );\n    }\n    if (!isObject(data)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`data() should return an object.`);\n    } else {\n      instance.data = reactive(data);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        for (const key in data) {\n          checkDuplicateProperties(\"Data\" /* DATA */, key);\n          if (!isReservedPrefix(key[0])) {\n            Object.defineProperty(ctx, key, {\n              configurable: true,\n              enumerable: true,\n              get: () => data[key],\n              set: NOOP\n            });\n          }\n        }\n      }\n    }\n  }\n  shouldCacheAccess = true;\n  if (computedOptions) {\n    for (const key in computedOptions) {\n      const opt = computedOptions[key];\n      const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;\n      if (!!(process.env.NODE_ENV !== \"production\") && get === NOOP) {\n        warn$1(`Computed property \"${key}\" has no getter.`);\n      }\n      const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== \"production\") ? () => {\n        warn$1(\n          `Write operation failed: computed property \"${key}\" is readonly.`\n        );\n      } : NOOP;\n      const c = computed({\n        get,\n        set\n      });\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => c.value,\n        set: (v) => c.value = v\n      });\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\n      }\n    }\n  }\n  if (watchOptions) {\n    for (const key in watchOptions) {\n      createWatcher(watchOptions[key], ctx, publicThis, key);\n    }\n  }\n  if (provideOptions) {\n    const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;\n    Reflect.ownKeys(provides).forEach((key) => {\n      provide(key, provides[key]);\n    });\n  }\n  if (created) {\n    callHook(created, instance, \"c\");\n  }\n  function registerLifecycleHook(register, hook) {\n    if (isArray(hook)) {\n      hook.forEach((_hook) => register(_hook.bind(publicThis)));\n    } else if (hook) {\n      register(hook.bind(publicThis));\n    }\n  }\n  registerLifecycleHook(onBeforeMount, beforeMount);\n  registerLifecycleHook(onMounted, mounted);\n  registerLifecycleHook(onBeforeUpdate, beforeUpdate);\n  registerLifecycleHook(onUpdated, updated);\n  registerLifecycleHook(onActivated, activated);\n  registerLifecycleHook(onDeactivated, deactivated);\n  registerLifecycleHook(onErrorCaptured, errorCaptured);\n  registerLifecycleHook(onRenderTracked, renderTracked);\n  registerLifecycleHook(onRenderTriggered, renderTriggered);\n  registerLifecycleHook(onBeforeUnmount, beforeUnmount);\n  registerLifecycleHook(onUnmounted, unmounted);\n  registerLifecycleHook(onServerPrefetch, serverPrefetch);\n  if (isArray(expose)) {\n    if (expose.length) {\n      const exposed = instance.exposed || (instance.exposed = {});\n      expose.forEach((key) => {\n        Object.defineProperty(exposed, key, {\n          get: () => publicThis[key],\n          set: (val) => publicThis[key] = val\n        });\n      });\n    } else if (!instance.exposed) {\n      instance.exposed = {};\n    }\n  }\n  if (render && instance.render === NOOP) {\n    instance.render = render;\n  }\n  if (inheritAttrs != null) {\n    instance.inheritAttrs = inheritAttrs;\n  }\n  if (components) instance.components = components;\n  if (directives) instance.directives = directives;\n  if (serverPrefetch) {\n    markAsyncBoundary(instance);\n  }\n}\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {\n  if (isArray(injectOptions)) {\n    injectOptions = normalizeInject(injectOptions);\n  }\n  for (const key in injectOptions) {\n    const opt = injectOptions[key];\n    let injected;\n    if (isObject(opt)) {\n      if (\"default\" in opt) {\n        injected = inject(\n          opt.from || key,\n          opt.default,\n          true\n        );\n      } else {\n        injected = inject(opt.from || key);\n      }\n    } else {\n      injected = inject(opt);\n    }\n    if (isRef(injected)) {\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => injected.value,\n        set: (v) => injected.value = v\n      });\n    } else {\n      ctx[key] = injected;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      checkDuplicateProperties(\"Inject\" /* INJECT */, key);\n    }\n  }\n}\nfunction callHook(hook, instance, type) {\n  callWithAsyncErrorHandling(\n    isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),\n    instance,\n    type\n  );\n}\nfunction createWatcher(raw, ctx, publicThis, key) {\n  let getter = key.includes(\".\") ? createPathGetter(publicThis, key) : () => publicThis[key];\n  if (isString(raw)) {\n    const handler = ctx[raw];\n    if (isFunction(handler)) {\n      {\n        watch(getter, handler);\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`Invalid watch handler specified by key \"${raw}\"`, handler);\n    }\n  } else if (isFunction(raw)) {\n    {\n      watch(getter, raw.bind(publicThis));\n    }\n  } else if (isObject(raw)) {\n    if (isArray(raw)) {\n      raw.forEach((r) => createWatcher(r, ctx, publicThis, key));\n    } else {\n      const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];\n      if (isFunction(handler)) {\n        watch(getter, handler, raw);\n      } else if (!!(process.env.NODE_ENV !== \"production\")) {\n        warn$1(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\n      }\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`Invalid watch option: \"${key}\"`, raw);\n  }\n}\nfunction resolveMergedOptions(instance) {\n  const base = instance.type;\n  const { mixins, extends: extendsOptions } = base;\n  const {\n    mixins: globalMixins,\n    optionsCache: cache,\n    config: { optionMergeStrategies }\n  } = instance.appContext;\n  const cached = cache.get(base);\n  let resolved;\n  if (cached) {\n    resolved = cached;\n  } else if (!globalMixins.length && !mixins && !extendsOptions) {\n    {\n      resolved = base;\n    }\n  } else {\n    resolved = {};\n    if (globalMixins.length) {\n      globalMixins.forEach(\n        (m) => mergeOptions(resolved, m, optionMergeStrategies, true)\n      );\n    }\n    mergeOptions(resolved, base, optionMergeStrategies);\n  }\n  if (isObject(base)) {\n    cache.set(base, resolved);\n  }\n  return resolved;\n}\nfunction mergeOptions(to, from, strats, asMixin = false) {\n  const { mixins, extends: extendsOptions } = from;\n  if (extendsOptions) {\n    mergeOptions(to, extendsOptions, strats, true);\n  }\n  if (mixins) {\n    mixins.forEach(\n      (m) => mergeOptions(to, m, strats, true)\n    );\n  }\n  for (const key in from) {\n    if (asMixin && key === \"expose\") {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `\"expose\" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`\n      );\n    } else {\n      const strat = internalOptionMergeStrats[key] || strats && strats[key];\n      to[key] = strat ? strat(to[key], from[key]) : from[key];\n    }\n  }\n  return to;\n}\nconst internalOptionMergeStrats = {\n  data: mergeDataFn,\n  props: mergeEmitsOrPropsOptions,\n  emits: mergeEmitsOrPropsOptions,\n  // objects\n  methods: mergeObjectOptions,\n  computed: mergeObjectOptions,\n  // lifecycle\n  beforeCreate: mergeAsArray,\n  created: mergeAsArray,\n  beforeMount: mergeAsArray,\n  mounted: mergeAsArray,\n  beforeUpdate: mergeAsArray,\n  updated: mergeAsArray,\n  beforeDestroy: mergeAsArray,\n  beforeUnmount: mergeAsArray,\n  destroyed: mergeAsArray,\n  unmounted: mergeAsArray,\n  activated: mergeAsArray,\n  deactivated: mergeAsArray,\n  errorCaptured: mergeAsArray,\n  serverPrefetch: mergeAsArray,\n  // assets\n  components: mergeObjectOptions,\n  directives: mergeObjectOptions,\n  // watch\n  watch: mergeWatchOptions,\n  // provide / inject\n  provide: mergeDataFn,\n  inject: mergeInject\n};\nfunction mergeDataFn(to, from) {\n  if (!from) {\n    return to;\n  }\n  if (!to) {\n    return from;\n  }\n  return function mergedDataFn() {\n    return (extend)(\n      isFunction(to) ? to.call(this, this) : to,\n      isFunction(from) ? from.call(this, this) : from\n    );\n  };\n}\nfunction mergeInject(to, from) {\n  return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\n}\nfunction normalizeInject(raw) {\n  if (isArray(raw)) {\n    const res = {};\n    for (let i = 0; i < raw.length; i++) {\n      res[raw[i]] = raw[i];\n    }\n    return res;\n  }\n  return raw;\n}\nfunction mergeAsArray(to, from) {\n  return to ? [...new Set([].concat(to, from))] : from;\n}\nfunction mergeObjectOptions(to, from) {\n  return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;\n}\nfunction mergeEmitsOrPropsOptions(to, from) {\n  if (to) {\n    if (isArray(to) && isArray(from)) {\n      return [.../* @__PURE__ */ new Set([...to, ...from])];\n    }\n    return extend(\n      /* @__PURE__ */ Object.create(null),\n      normalizePropsOrEmits(to),\n      normalizePropsOrEmits(from != null ? from : {})\n    );\n  } else {\n    return from;\n  }\n}\nfunction mergeWatchOptions(to, from) {\n  if (!to) return from;\n  if (!from) return to;\n  const merged = extend(/* @__PURE__ */ Object.create(null), to);\n  for (const key in from) {\n    merged[key] = mergeAsArray(to[key], from[key]);\n  }\n  return merged;\n}\n\nfunction createAppContext() {\n  return {\n    app: null,\n    config: {\n      isNativeTag: NO,\n      performance: false,\n      globalProperties: {},\n      optionMergeStrategies: {},\n      errorHandler: void 0,\n      warnHandler: void 0,\n      compilerOptions: {}\n    },\n    mixins: [],\n    components: {},\n    directives: {},\n    provides: /* @__PURE__ */ Object.create(null),\n    optionsCache: /* @__PURE__ */ new WeakMap(),\n    propsCache: /* @__PURE__ */ new WeakMap(),\n    emitsCache: /* @__PURE__ */ new WeakMap()\n  };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n  return function createApp(rootComponent, rootProps = null) {\n    if (!isFunction(rootComponent)) {\n      rootComponent = extend({}, rootComponent);\n    }\n    if (rootProps != null && !isObject(rootProps)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\n      rootProps = null;\n    }\n    const context = createAppContext();\n    const installedPlugins = /* @__PURE__ */ new WeakSet();\n    const pluginCleanupFns = [];\n    let isMounted = false;\n    const app = context.app = {\n      _uid: uid$1++,\n      _component: rootComponent,\n      _props: rootProps,\n      _container: null,\n      _context: context,\n      _instance: null,\n      version,\n      get config() {\n        return context.config;\n      },\n      set config(v) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `app.config cannot be replaced. Modify individual options instead.`\n          );\n        }\n      },\n      use(plugin, ...options) {\n        if (installedPlugins.has(plugin)) {\n          !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\n        } else if (plugin && isFunction(plugin.install)) {\n          installedPlugins.add(plugin);\n          plugin.install(app, ...options);\n        } else if (isFunction(plugin)) {\n          installedPlugins.add(plugin);\n          plugin(app, ...options);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `A plugin must either be a function or an object with an \"install\" function.`\n          );\n        }\n        return app;\n      },\n      mixin(mixin) {\n        if (__VUE_OPTIONS_API__) {\n          if (!context.mixins.includes(mixin)) {\n            context.mixins.push(mixin);\n          } else if (!!(process.env.NODE_ENV !== \"production\")) {\n            warn$1(\n              \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\n            );\n          }\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Mixins are only available in builds supporting Options API\");\n        }\n        return app;\n      },\n      component(name, component) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          validateComponentName(name, context.config);\n        }\n        if (!component) {\n          return context.components[name];\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\n          warn$1(`Component \"${name}\" has already been registered in target app.`);\n        }\n        context.components[name] = component;\n        return app;\n      },\n      directive(name, directive) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          validateDirectiveName(name);\n        }\n        if (!directive) {\n          return context.directives[name];\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\n          warn$1(`Directive \"${name}\" has already been registered in target app.`);\n        }\n        context.directives[name] = directive;\n        return app;\n      },\n      mount(rootContainer, isHydrate, namespace) {\n        if (!isMounted) {\n          if (!!(process.env.NODE_ENV !== \"production\") && rootContainer.__vue_app__) {\n            warn$1(\n              `There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling \\`app.unmount()\\` first.`\n            );\n          }\n          const vnode = app._ceVNode || createVNode(rootComponent, rootProps);\n          vnode.appContext = context;\n          if (namespace === true) {\n            namespace = \"svg\";\n          } else if (namespace === false) {\n            namespace = void 0;\n          }\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            context.reload = () => {\n              render(\n                cloneVNode(vnode),\n                rootContainer,\n                namespace\n              );\n            };\n          }\n          if (isHydrate && hydrate) {\n            hydrate(vnode, rootContainer);\n          } else {\n            render(vnode, rootContainer, namespace);\n          }\n          isMounted = true;\n          app._container = rootContainer;\n          rootContainer.__vue_app__ = app;\n          if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n            app._instance = vnode.component;\n            devtoolsInitApp(app, version);\n          }\n          return getComponentPublicInstance(vnode.component);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \\`const createMyApp = () => createApp(App)\\``\n          );\n        }\n      },\n      onUnmount(cleanupFn) {\n        if (!!(process.env.NODE_ENV !== \"production\") && typeof cleanupFn !== \"function\") {\n          warn$1(\n            `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`\n          );\n        }\n        pluginCleanupFns.push(cleanupFn);\n      },\n      unmount() {\n        if (isMounted) {\n          callWithAsyncErrorHandling(\n            pluginCleanupFns,\n            app._instance,\n            16\n          );\n          render(null, app._container);\n          if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n            app._instance = null;\n            devtoolsUnmountApp(app);\n          }\n          delete app._container.__vue_app__;\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(`Cannot unmount an app that is not mounted.`);\n        }\n      },\n      provide(key, value) {\n        if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\n          warn$1(\n            `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\n          );\n        }\n        context.provides[key] = value;\n        return app;\n      },\n      runWithContext(fn) {\n        const lastApp = currentApp;\n        currentApp = app;\n        try {\n          return fn();\n        } finally {\n          currentApp = lastApp;\n        }\n      }\n    };\n    return app;\n  };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n  if (!currentInstance) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`provide() can only be used inside setup().`);\n    }\n  } else {\n    let provides = currentInstance.provides;\n    const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n    if (parentProvides === provides) {\n      provides = currentInstance.provides = Object.create(parentProvides);\n    }\n    provides[key] = value;\n  }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n  const instance = currentInstance || currentRenderingInstance;\n  if (instance || currentApp) {\n    const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n    if (provides && key in provides) {\n      return provides[key];\n    } else if (arguments.length > 1) {\n      return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`injection \"${String(key)}\" not found.`);\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`inject() can only be used inside setup() or functional components.`);\n  }\n}\nfunction hasInjectionContext() {\n  return !!(currentInstance || currentRenderingInstance || currentApp);\n}\n\nconst internalObjectProto = {};\nconst createInternalObject = () => Object.create(internalObjectProto);\nconst isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\nfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n  const props = {};\n  const attrs = createInternalObject();\n  instance.propsDefaults = /* @__PURE__ */ Object.create(null);\n  setFullProps(instance, rawProps, props, attrs);\n  for (const key in instance.propsOptions[0]) {\n    if (!(key in props)) {\n      props[key] = void 0;\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    validateProps(rawProps || {}, props, instance);\n  }\n  if (isStateful) {\n    instance.props = isSSR ? props : shallowReactive(props);\n  } else {\n    if (!instance.type.props) {\n      instance.props = attrs;\n    } else {\n      instance.props = props;\n    }\n  }\n  instance.attrs = attrs;\n}\nfunction isInHmrContext(instance) {\n  while (instance) {\n    if (instance.type.__hmrId) return true;\n    instance = instance.parent;\n  }\n}\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n  const {\n    props,\n    attrs,\n    vnode: { patchFlag }\n  } = instance;\n  const rawCurrentProps = toRaw(props);\n  const [options] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  if (\n    // always force full diff in dev\n    // - #1942 if hmr is enabled with sfc component\n    // - vite#872 non-sfc component used by sfc component\n    !(!!(process.env.NODE_ENV !== \"production\") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)\n  ) {\n    if (patchFlag & 8) {\n      const propsToUpdate = instance.vnode.dynamicProps;\n      for (let i = 0; i < propsToUpdate.length; i++) {\n        let key = propsToUpdate[i];\n        if (isEmitListener(instance.emitsOptions, key)) {\n          continue;\n        }\n        const value = rawProps[key];\n        if (options) {\n          if (hasOwn(attrs, key)) {\n            if (value !== attrs[key]) {\n              attrs[key] = value;\n              hasAttrsChanged = true;\n            }\n          } else {\n            const camelizedKey = camelize(key);\n            props[camelizedKey] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              camelizedKey,\n              value,\n              instance,\n              false\n            );\n          }\n        } else {\n          if (value !== attrs[key]) {\n            attrs[key] = value;\n            hasAttrsChanged = true;\n          }\n        }\n      }\n    }\n  } else {\n    if (setFullProps(instance, rawProps, props, attrs)) {\n      hasAttrsChanged = true;\n    }\n    let kebabKey;\n    for (const key in rawCurrentProps) {\n      if (!rawProps || // for camelCase\n      !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case\n      // and converted to camelCase (#955)\n      ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {\n        if (options) {\n          if (rawPrevProps && // for camelCase\n          (rawPrevProps[key] !== void 0 || // for kebab-case\n          rawPrevProps[kebabKey] !== void 0)) {\n            props[key] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              key,\n              void 0,\n              instance,\n              true\n            );\n          }\n        } else {\n          delete props[key];\n        }\n      }\n    }\n    if (attrs !== rawCurrentProps) {\n      for (const key in attrs) {\n        if (!rawProps || !hasOwn(rawProps, key) && true) {\n          delete attrs[key];\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (hasAttrsChanged) {\n    trigger(instance.attrs, \"set\", \"\");\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    validateProps(rawProps || {}, props, instance);\n  }\n}\nfunction setFullProps(instance, rawProps, props, attrs) {\n  const [options, needCastKeys] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  let rawCastValues;\n  if (rawProps) {\n    for (let key in rawProps) {\n      if (isReservedProp(key)) {\n        continue;\n      }\n      const value = rawProps[key];\n      let camelKey;\n      if (options && hasOwn(options, camelKey = camelize(key))) {\n        if (!needCastKeys || !needCastKeys.includes(camelKey)) {\n          props[camelKey] = value;\n        } else {\n          (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n        }\n      } else if (!isEmitListener(instance.emitsOptions, key)) {\n        if (!(key in attrs) || value !== attrs[key]) {\n          attrs[key] = value;\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (needCastKeys) {\n    const rawCurrentProps = toRaw(props);\n    const castValues = rawCastValues || EMPTY_OBJ;\n    for (let i = 0; i < needCastKeys.length; i++) {\n      const key = needCastKeys[i];\n      props[key] = resolvePropValue(\n        options,\n        rawCurrentProps,\n        key,\n        castValues[key],\n        instance,\n        !hasOwn(castValues, key)\n      );\n    }\n  }\n  return hasAttrsChanged;\n}\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n  const opt = options[key];\n  if (opt != null) {\n    const hasDefault = hasOwn(opt, \"default\");\n    if (hasDefault && value === void 0) {\n      const defaultValue = opt.default;\n      if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {\n        const { propsDefaults } = instance;\n        if (key in propsDefaults) {\n          value = propsDefaults[key];\n        } else {\n          const reset = setCurrentInstance(instance);\n          value = propsDefaults[key] = defaultValue.call(\n            null,\n            props\n          );\n          reset();\n        }\n      } else {\n        value = defaultValue;\n      }\n      if (instance.ce) {\n        instance.ce._setProp(key, value);\n      }\n    }\n    if (opt[0 /* shouldCast */]) {\n      if (isAbsent && !hasDefault) {\n        value = false;\n      } else if (opt[1 /* shouldCastTrue */] && (value === \"\" || value === hyphenate(key))) {\n        value = true;\n      }\n    }\n  }\n  return value;\n}\nconst mixinPropsCache = /* @__PURE__ */ new WeakMap();\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n  const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;\n  const cached = cache.get(comp);\n  if (cached) {\n    return cached;\n  }\n  const raw = comp.props;\n  const normalized = {};\n  const needCastKeys = [];\n  let hasExtends = false;\n  if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n    const extendProps = (raw2) => {\n      hasExtends = true;\n      const [props, keys] = normalizePropsOptions(raw2, appContext, true);\n      extend(normalized, props);\n      if (keys) needCastKeys.push(...keys);\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendProps);\n    }\n    if (comp.extends) {\n      extendProps(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendProps);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (isObject(comp)) {\n      cache.set(comp, EMPTY_ARR);\n    }\n    return EMPTY_ARR;\n  }\n  if (isArray(raw)) {\n    for (let i = 0; i < raw.length; i++) {\n      if (!!(process.env.NODE_ENV !== \"production\") && !isString(raw[i])) {\n        warn$1(`props must be strings when using array syntax.`, raw[i]);\n      }\n      const normalizedKey = camelize(raw[i]);\n      if (validatePropName(normalizedKey)) {\n        normalized[normalizedKey] = EMPTY_OBJ;\n      }\n    }\n  } else if (raw) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isObject(raw)) {\n      warn$1(`invalid props options`, raw);\n    }\n    for (const key in raw) {\n      const normalizedKey = camelize(key);\n      if (validatePropName(normalizedKey)) {\n        const opt = raw[key];\n        const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);\n        const propType = prop.type;\n        let shouldCast = false;\n        let shouldCastTrue = true;\n        if (isArray(propType)) {\n          for (let index = 0; index < propType.length; ++index) {\n            const type = propType[index];\n            const typeName = isFunction(type) && type.name;\n            if (typeName === \"Boolean\") {\n              shouldCast = true;\n              break;\n            } else if (typeName === \"String\") {\n              shouldCastTrue = false;\n            }\n          }\n        } else {\n          shouldCast = isFunction(propType) && propType.name === \"Boolean\";\n        }\n        prop[0 /* shouldCast */] = shouldCast;\n        prop[1 /* shouldCastTrue */] = shouldCastTrue;\n        if (shouldCast || hasOwn(prop, \"default\")) {\n          needCastKeys.push(normalizedKey);\n        }\n      }\n    }\n  }\n  const res = [normalized, needCastKeys];\n  if (isObject(comp)) {\n    cache.set(comp, res);\n  }\n  return res;\n}\nfunction validatePropName(key) {\n  if (key[0] !== \"$\" && !isReservedProp(key)) {\n    return true;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`Invalid prop name: \"${key}\" is a reserved property.`);\n  }\n  return false;\n}\nfunction getType(ctor) {\n  if (ctor === null) {\n    return \"null\";\n  }\n  if (typeof ctor === \"function\") {\n    return ctor.name || \"\";\n  } else if (typeof ctor === \"object\") {\n    const name = ctor.constructor && ctor.constructor.name;\n    return name || \"\";\n  }\n  return \"\";\n}\nfunction validateProps(rawProps, props, instance) {\n  const resolvedValues = toRaw(props);\n  const options = instance.propsOptions[0];\n  const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));\n  for (const key in options) {\n    let opt = options[key];\n    if (opt == null) continue;\n    validateProp(\n      key,\n      resolvedValues[key],\n      opt,\n      !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(resolvedValues) : resolvedValues,\n      !camelizePropsKey.includes(key)\n    );\n  }\n}\nfunction validateProp(name, value, prop, props, isAbsent) {\n  const { type, required, validator, skipCheck } = prop;\n  if (required && isAbsent) {\n    warn$1('Missing required prop: \"' + name + '\"');\n    return;\n  }\n  if (value == null && !required) {\n    return;\n  }\n  if (type != null && type !== true && !skipCheck) {\n    let isValid = false;\n    const types = isArray(type) ? type : [type];\n    const expectedTypes = [];\n    for (let i = 0; i < types.length && !isValid; i++) {\n      const { valid, expectedType } = assertType(value, types[i]);\n      expectedTypes.push(expectedType || \"\");\n      isValid = valid;\n    }\n    if (!isValid) {\n      warn$1(getInvalidTypeMessage(name, value, expectedTypes));\n      return;\n    }\n  }\n  if (validator && !validator(value, props)) {\n    warn$1('Invalid prop: custom validator check failed for prop \"' + name + '\".');\n  }\n}\nconst isSimpleType = /* @__PURE__ */ makeMap(\n  \"String,Number,Boolean,Function,Symbol,BigInt\"\n);\nfunction assertType(value, type) {\n  let valid;\n  const expectedType = getType(type);\n  if (expectedType === \"null\") {\n    valid = value === null;\n  } else if (isSimpleType(expectedType)) {\n    const t = typeof value;\n    valid = t === expectedType.toLowerCase();\n    if (!valid && t === \"object\") {\n      valid = value instanceof type;\n    }\n  } else if (expectedType === \"Object\") {\n    valid = isObject(value);\n  } else if (expectedType === \"Array\") {\n    valid = isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid,\n    expectedType\n  };\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n  if (expectedTypes.length === 0) {\n    return `Prop type [] for prop \"${name}\" won't match anything. Did you mean to use type Array instead?`;\n  }\n  let message = `Invalid prop: type check failed for prop \"${name}\". Expected ${expectedTypes.map(capitalize).join(\" | \")}`;\n  const expectedType = expectedTypes[0];\n  const receivedType = toRawType(value);\n  const expectedValue = styleValue(value, expectedType);\n  const receivedValue = styleValue(value, receivedType);\n  if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {\n    message += ` with value ${expectedValue}`;\n  }\n  message += `, got ${receivedType} `;\n  if (isExplicable(receivedType)) {\n    message += `with value ${receivedValue}.`;\n  }\n  return message;\n}\nfunction styleValue(value, type) {\n  if (type === \"String\") {\n    return `\"${value}\"`;\n  } else if (type === \"Number\") {\n    return `${Number(value)}`;\n  } else {\n    return `${value}`;\n  }\n}\nfunction isExplicable(type) {\n  const explicitTypes = [\"string\", \"number\", \"boolean\"];\n  return explicitTypes.some((elem) => type.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n  return args.some((elem) => elem.toLowerCase() === \"boolean\");\n}\n\nconst isInternalKey = (key) => key[0] === \"_\" || key === \"$stable\";\nconst normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\nconst normalizeSlot = (key, rawSlot, ctx) => {\n  if (rawSlot._n) {\n    return rawSlot;\n  }\n  const normalized = withCtx((...args) => {\n    if (!!(process.env.NODE_ENV !== \"production\") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {\n      warn$1(\n        `Slot \"${key}\" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`\n      );\n    }\n    return normalizeSlotValue(rawSlot(...args));\n  }, ctx);\n  normalized._c = false;\n  return normalized;\n};\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\n  const ctx = rawSlots._ctx;\n  for (const key in rawSlots) {\n    if (isInternalKey(key)) continue;\n    const value = rawSlots[key];\n    if (isFunction(value)) {\n      slots[key] = normalizeSlot(key, value, ctx);\n    } else if (value != null) {\n      if (!!(process.env.NODE_ENV !== \"production\") && true) {\n        warn$1(\n          `Non-function value encountered for slot \"${key}\". Prefer function slots for better performance.`\n        );\n      }\n      const normalized = normalizeSlotValue(value);\n      slots[key] = () => normalized;\n    }\n  }\n};\nconst normalizeVNodeSlots = (instance, children) => {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isKeepAlive(instance.vnode) && true) {\n    warn$1(\n      `Non-function value encountered for default slot. Prefer function slots for better performance.`\n    );\n  }\n  const normalized = normalizeSlotValue(children);\n  instance.slots.default = () => normalized;\n};\nconst assignSlots = (slots, children, optimized) => {\n  for (const key in children) {\n    if (optimized || key !== \"_\") {\n      slots[key] = children[key];\n    }\n  }\n};\nconst initSlots = (instance, children, optimized) => {\n  const slots = instance.slots = createInternalObject();\n  if (instance.vnode.shapeFlag & 32) {\n    const type = children._;\n    if (type) {\n      assignSlots(slots, children, optimized);\n      if (optimized) {\n        def(slots, \"_\", type, true);\n      }\n    } else {\n      normalizeObjectSlots(children, slots);\n    }\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n  }\n};\nconst updateSlots = (instance, children, optimized) => {\n  const { vnode, slots } = instance;\n  let needDeletionCheck = true;\n  let deletionComparisonTarget = EMPTY_OBJ;\n  if (vnode.shapeFlag & 32) {\n    const type = children._;\n    if (type) {\n      if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n        assignSlots(slots, children, optimized);\n        trigger(instance, \"set\", \"$slots\");\n      } else if (optimized && type === 1) {\n        needDeletionCheck = false;\n      } else {\n        assignSlots(slots, children, optimized);\n      }\n    } else {\n      needDeletionCheck = !children.$stable;\n      normalizeObjectSlots(children, slots);\n    }\n    deletionComparisonTarget = children;\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n    deletionComparisonTarget = { default: 1 };\n  }\n  if (needDeletionCheck) {\n    for (const key in slots) {\n      if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {\n        delete slots[key];\n      }\n    }\n  }\n};\n\nlet supported;\nlet perf;\nfunction startMeasure(instance, type) {\n  if (instance.appContext.config.performance && isSupported()) {\n    perf.mark(`vue-${type}-${instance.uid}`);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());\n  }\n}\nfunction endMeasure(instance, type) {\n  if (instance.appContext.config.performance && isSupported()) {\n    const startTag = `vue-${type}-${instance.uid}`;\n    const endTag = startTag + `:end`;\n    perf.mark(endTag);\n    perf.measure(\n      `<${formatComponentName(instance, instance.type)}> ${type}`,\n      startTag,\n      endTag\n    );\n    perf.clearMarks(startTag);\n    perf.clearMarks(endTag);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());\n  }\n}\nfunction isSupported() {\n  if (supported !== void 0) {\n    return supported;\n  }\n  if (typeof window !== \"undefined\" && window.performance) {\n    supported = true;\n    perf = window.performance;\n  } else {\n    supported = false;\n  }\n  return supported;\n}\n\nfunction initFeatureFlags() {\n  const needWarn = [];\n  if (typeof __VUE_OPTIONS_API__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_OPTIONS_API__`);\n    getGlobalThis().__VUE_OPTIONS_API__ = true;\n  }\n  if (typeof __VUE_PROD_DEVTOOLS__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_DEVTOOLS__`);\n    getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;\n  }\n  if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);\n    getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && needWarn.length) {\n    const multi = needWarn.length > 1;\n    console.warn(\n      `Feature flag${multi ? `s` : ``} ${needWarn.join(\", \")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.\n\nFor more details, see https://link.vuejs.org/feature-flags.`\n    );\n  }\n}\n\nconst queuePostRenderEffect = queueEffectWithSuspense ;\nfunction createRenderer(options) {\n  return baseCreateRenderer(options);\n}\nfunction createHydrationRenderer(options) {\n  return baseCreateRenderer(options, createHydrationFunctions);\n}\nfunction baseCreateRenderer(options, createHydrationFns) {\n  {\n    initFeatureFlags();\n  }\n  const target = getGlobalThis();\n  target.__VUE__ = true;\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);\n  }\n  const {\n    insert: hostInsert,\n    remove: hostRemove,\n    patchProp: hostPatchProp,\n    createElement: hostCreateElement,\n    createText: hostCreateText,\n    createComment: hostCreateComment,\n    setText: hostSetText,\n    setElementText: hostSetElementText,\n    parentNode: hostParentNode,\n    nextSibling: hostNextSibling,\n    setScopeId: hostSetScopeId = NOOP,\n    insertStaticContent: hostInsertStaticContent\n  } = options;\n  const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== \"production\") && isHmrUpdating ? false : !!n2.dynamicChildren) => {\n    if (n1 === n2) {\n      return;\n    }\n    if (n1 && !isSameVNodeType(n1, n2)) {\n      anchor = getNextHostNode(n1);\n      unmount(n1, parentComponent, parentSuspense, true);\n      n1 = null;\n    }\n    if (n2.patchFlag === -2) {\n      optimized = false;\n      n2.dynamicChildren = null;\n    }\n    const { type, ref, shapeFlag } = n2;\n    switch (type) {\n      case Text:\n        processText(n1, n2, container, anchor);\n        break;\n      case Comment:\n        processCommentNode(n1, n2, container, anchor);\n        break;\n      case Static:\n        if (n1 == null) {\n          mountStaticNode(n2, container, anchor, namespace);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          patchStaticNode(n1, n2, container, namespace);\n        }\n        break;\n      case Fragment:\n        processFragment(\n          n1,\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        break;\n      default:\n        if (shapeFlag & 1) {\n          processElement(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 6) {\n          processComponent(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 64) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else if (shapeFlag & 128) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Invalid VNode type:\", type, `(${typeof type})`);\n        }\n    }\n    if (ref != null && parentComponent) {\n      setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n    }\n  };\n  const processText = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateText(n2.children),\n        container,\n        anchor\n      );\n    } else {\n      const el = n2.el = n1.el;\n      if (n2.children !== n1.children) {\n        hostSetText(el, n2.children);\n      }\n    }\n  };\n  const processCommentNode = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateComment(n2.children || \"\"),\n        container,\n        anchor\n      );\n    } else {\n      n2.el = n1.el;\n    }\n  };\n  const mountStaticNode = (n2, container, anchor, namespace) => {\n    [n2.el, n2.anchor] = hostInsertStaticContent(\n      n2.children,\n      container,\n      anchor,\n      namespace,\n      n2.el,\n      n2.anchor\n    );\n  };\n  const patchStaticNode = (n1, n2, container, namespace) => {\n    if (n2.children !== n1.children) {\n      const anchor = hostNextSibling(n1.anchor);\n      removeStaticNode(n1);\n      [n2.el, n2.anchor] = hostInsertStaticContent(\n        n2.children,\n        container,\n        anchor,\n        namespace\n      );\n    } else {\n      n2.el = n1.el;\n      n2.anchor = n1.anchor;\n    }\n  };\n  const moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostInsert(el, container, nextSibling);\n      el = next;\n    }\n    hostInsert(anchor, container, nextSibling);\n  };\n  const removeStaticNode = ({ el, anchor }) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostRemove(el);\n      el = next;\n    }\n    hostRemove(anchor);\n  };\n  const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    if (n2.type === \"svg\") {\n      namespace = \"svg\";\n    } else if (n2.type === \"math\") {\n      namespace = \"mathml\";\n    }\n    if (n1 == null) {\n      mountElement(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      patchElement(\n        n1,\n        n2,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let el;\n    let vnodeHook;\n    const { props, shapeFlag, transition, dirs } = vnode;\n    el = vnode.el = hostCreateElement(\n      vnode.type,\n      namespace,\n      props && props.is,\n      props\n    );\n    if (shapeFlag & 8) {\n      hostSetElementText(el, vnode.children);\n    } else if (shapeFlag & 16) {\n      mountChildren(\n        vnode.children,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(vnode, namespace),\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n    }\n    setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n    if (props) {\n      for (const key in props) {\n        if (key !== \"value\" && !isReservedProp(key)) {\n          hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n        }\n      }\n      if (\"value\" in props) {\n        hostPatchProp(el, \"value\", null, props.value, namespace);\n      }\n      if (vnodeHook = props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHook, parentComponent, vnode);\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      def(el, \"__vnode\", vnode, true);\n      def(el, \"__vueParentComponent\", parentComponent, true);\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n    }\n    const needCallTransitionHooks = needTransition(parentSuspense, transition);\n    if (needCallTransitionHooks) {\n      transition.beforeEnter(el);\n    }\n    hostInsert(el, container, anchor);\n    if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        needCallTransitionHooks && transition.enter(el);\n        dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n      }, parentSuspense);\n    }\n  };\n  const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n    if (scopeId) {\n      hostSetScopeId(el, scopeId);\n    }\n    if (slotScopeIds) {\n      for (let i = 0; i < slotScopeIds.length; i++) {\n        hostSetScopeId(el, slotScopeIds[i]);\n      }\n    }\n    if (parentComponent) {\n      let subTree = parentComponent.subTree;\n      if (!!(process.env.NODE_ENV !== \"production\") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {\n        subTree = filterSingleRoot(subTree.children) || subTree;\n      }\n      if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {\n        const parentVNode = parentComponent.vnode;\n        setScopeId(\n          el,\n          parentVNode,\n          parentVNode.scopeId,\n          parentVNode.slotScopeIds,\n          parentComponent.parent\n        );\n      }\n    }\n  };\n  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n      patch(\n        null,\n        child,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const el = n2.el = n1.el;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      el.__vnode = n2;\n    }\n    let { patchFlag, dynamicChildren, dirs } = n2;\n    patchFlag |= n1.patchFlag & 16;\n    const oldProps = n1.props || EMPTY_OBJ;\n    const newProps = n2.props || EMPTY_OBJ;\n    let vnodeHook;\n    parentComponent && toggleRecurse(parentComponent, false);\n    if (vnodeHook = newProps.onVnodeBeforeUpdate) {\n      invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n    }\n    if (dirs) {\n      invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n    }\n    parentComponent && toggleRecurse(parentComponent, true);\n    if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n      patchFlag = 0;\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {\n      hostSetElementText(el, \"\");\n    }\n    if (dynamicChildren) {\n      patchBlockChildren(\n        n1.dynamicChildren,\n        dynamicChildren,\n        el,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds\n      );\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        traverseStaticChildren(n1, n2);\n      }\n    } else if (!optimized) {\n      patchChildren(\n        n1,\n        n2,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds,\n        false\n      );\n    }\n    if (patchFlag > 0) {\n      if (patchFlag & 16) {\n        patchProps(el, oldProps, newProps, parentComponent, namespace);\n      } else {\n        if (patchFlag & 2) {\n          if (oldProps.class !== newProps.class) {\n            hostPatchProp(el, \"class\", null, newProps.class, namespace);\n          }\n        }\n        if (patchFlag & 4) {\n          hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n        }\n        if (patchFlag & 8) {\n          const propsToUpdate = n2.dynamicProps;\n          for (let i = 0; i < propsToUpdate.length; i++) {\n            const key = propsToUpdate[i];\n            const prev = oldProps[key];\n            const next = newProps[key];\n            if (next !== prev || key === \"value\") {\n              hostPatchProp(el, key, prev, next, namespace, parentComponent);\n            }\n          }\n        }\n      }\n      if (patchFlag & 1) {\n        if (n1.children !== n2.children) {\n          hostSetElementText(el, n2.children);\n        }\n      }\n    } else if (!optimized && dynamicChildren == null) {\n      patchProps(el, oldProps, newProps, parentComponent, namespace);\n    }\n    if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n        dirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n      }, parentSuspense);\n    }\n  };\n  const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n    for (let i = 0; i < newChildren.length; i++) {\n      const oldVNode = oldChildren[i];\n      const newVNode = newChildren[i];\n      const container = (\n        // oldVNode may be an errored async setup() component inside Suspense\n        // which will not have a mounted element\n        oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent\n        // of the Fragment itself so it can move its children.\n        (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement\n        // which also requires the correct parent container\n        !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.\n        oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (\n          // In other cases, the parent container is not actually used so we\n          // just pass the block element here to avoid a DOM parentNode call.\n          fallbackContainer\n        )\n      );\n      patch(\n        oldVNode,\n        newVNode,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        true\n      );\n    }\n  };\n  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n    if (oldProps !== newProps) {\n      if (oldProps !== EMPTY_OBJ) {\n        for (const key in oldProps) {\n          if (!isReservedProp(key) && !(key in newProps)) {\n            hostPatchProp(\n              el,\n              key,\n              oldProps[key],\n              null,\n              namespace,\n              parentComponent\n            );\n          }\n        }\n      }\n      for (const key in newProps) {\n        if (isReservedProp(key)) continue;\n        const next = newProps[key];\n        const prev = oldProps[key];\n        if (next !== prev && key !== \"value\") {\n          hostPatchProp(el, key, prev, next, namespace, parentComponent);\n        }\n      }\n      if (\"value\" in newProps) {\n        hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n      }\n    }\n  };\n  const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n    const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n    let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n    if (!!(process.env.NODE_ENV !== \"production\") && // #5523 dev root fragment may inherit directives\n    (isHmrUpdating || patchFlag & 2048)) {\n      patchFlag = 0;\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    if (n1 == null) {\n      hostInsert(fragmentStartAnchor, container, anchor);\n      hostInsert(fragmentEndAnchor, container, anchor);\n      mountChildren(\n        // #10007\n        // such fragment like `<></>` will be compiled into\n        // a fragment which doesn't have a children.\n        // In this case fallback to an empty array\n        n2.children || [],\n        container,\n        fragmentEndAnchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result\n      // of renderSlot() with no valid children\n      n1.dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          container,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          traverseStaticChildren(n1, n2);\n        } else if (\n          // #2080 if the stable fragment has a key, it's a <template v-for> that may\n          //  get moved around. Make sure all root level vnodes inherit el.\n          // #2134 or if it's a component root, it may also get moved around\n          // as the component is being moved.\n          n2.key != null || parentComponent && n2 === parentComponent.subTree\n        ) {\n          traverseStaticChildren(\n            n1,\n            n2,\n            true\n            /* shallow */\n          );\n        }\n      } else {\n        patchChildren(\n          n1,\n          n2,\n          container,\n          fragmentEndAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n  };\n  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    n2.slotScopeIds = slotScopeIds;\n    if (n1 == null) {\n      if (n2.shapeFlag & 512) {\n        parentComponent.ctx.activate(\n          n2,\n          container,\n          anchor,\n          namespace,\n          optimized\n        );\n      } else {\n        mountComponent(\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          optimized\n        );\n      }\n    } else {\n      updateComponent(n1, n2, optimized);\n    }\n  };\n  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n    const instance = (initialVNode.component = createComponentInstance(\n      initialVNode,\n      parentComponent,\n      parentSuspense\n    ));\n    if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n      registerHMR(instance);\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      pushWarningContext(initialVNode);\n      startMeasure(instance, `mount`);\n    }\n    if (isKeepAlive(initialVNode)) {\n      instance.ctx.renderer = internals;\n    }\n    {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        startMeasure(instance, `init`);\n      }\n      setupComponent(instance, false, optimized);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        endMeasure(instance, `init`);\n      }\n    }\n    if (instance.asyncDep) {\n      if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) initialVNode.el = null;\n      parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n      if (!initialVNode.el) {\n        const placeholder = instance.subTree = createVNode(Comment);\n        processCommentNode(null, placeholder, container, anchor);\n      }\n    } else {\n      setupRenderEffect(\n        instance,\n        initialVNode,\n        container,\n        anchor,\n        parentSuspense,\n        namespace,\n        optimized\n      );\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      popWarningContext();\n      endMeasure(instance, `mount`);\n    }\n  };\n  const updateComponent = (n1, n2, optimized) => {\n    const instance = n2.component = n1.component;\n    if (shouldUpdateComponent(n1, n2, optimized)) {\n      if (instance.asyncDep && !instance.asyncResolved) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(n2);\n        }\n        updateComponentPreRender(instance, n2, optimized);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n        return;\n      } else {\n        instance.next = n2;\n        instance.update();\n      }\n    } else {\n      n2.el = n1.el;\n      instance.vnode = n2;\n    }\n  };\n  const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n    const componentUpdateFn = () => {\n      if (!instance.isMounted) {\n        let vnodeHook;\n        const { el, props } = initialVNode;\n        const { bm, m, parent, root, type } = instance;\n        const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n        toggleRecurse(instance, false);\n        if (bm) {\n          invokeArrayFns(bm);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {\n          invokeVNodeHook(vnodeHook, parent, initialVNode);\n        }\n        toggleRecurse(instance, true);\n        if (el && hydrateNode) {\n          const hydrateSubTree = () => {\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              startMeasure(instance, `render`);\n            }\n            instance.subTree = renderComponentRoot(instance);\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              endMeasure(instance, `render`);\n            }\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              startMeasure(instance, `hydrate`);\n            }\n            hydrateNode(\n              el,\n              instance.subTree,\n              instance,\n              parentSuspense,\n              null\n            );\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              endMeasure(instance, `hydrate`);\n            }\n          };\n          if (isAsyncWrapperVNode && type.__asyncHydrate) {\n            type.__asyncHydrate(\n              el,\n              instance,\n              hydrateSubTree\n            );\n          } else {\n            hydrateSubTree();\n          }\n        } else {\n          if (root.ce) {\n            root.ce._injectChildStyle(type);\n          }\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            startMeasure(instance, `render`);\n          }\n          const subTree = instance.subTree = renderComponentRoot(instance);\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            endMeasure(instance, `render`);\n          }\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            startMeasure(instance, `patch`);\n          }\n          patch(\n            null,\n            subTree,\n            container,\n            anchor,\n            instance,\n            parentSuspense,\n            namespace\n          );\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            endMeasure(instance, `patch`);\n          }\n          initialVNode.el = subTree.el;\n        }\n        if (m) {\n          queuePostRenderEffect(m, parentSuspense);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n          const scopedInitialVNode = initialVNode;\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),\n            parentSuspense\n          );\n        }\n        if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {\n          instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n        }\n        instance.isMounted = true;\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n          devtoolsComponentAdded(instance);\n        }\n        initialVNode = container = anchor = null;\n      } else {\n        let { next, bu, u, parent, vnode } = instance;\n        {\n          const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n          if (nonHydratedAsyncRoot) {\n            if (next) {\n              next.el = vnode.el;\n              updateComponentPreRender(instance, next, optimized);\n            }\n            nonHydratedAsyncRoot.asyncDep.then(() => {\n              if (!instance.isUnmounted) {\n                componentUpdateFn();\n              }\n            });\n            return;\n          }\n        }\n        let originNext = next;\n        let vnodeHook;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(next || instance.vnode);\n        }\n        toggleRecurse(instance, false);\n        if (next) {\n          next.el = vnode.el;\n          updateComponentPreRender(instance, next, optimized);\n        } else {\n          next = vnode;\n        }\n        if (bu) {\n          invokeArrayFns(bu);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {\n          invokeVNodeHook(vnodeHook, parent, next, vnode);\n        }\n        toggleRecurse(instance, true);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `render`);\n        }\n        const nextTree = renderComponentRoot(instance);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `render`);\n        }\n        const prevTree = instance.subTree;\n        instance.subTree = nextTree;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `patch`);\n        }\n        patch(\n          prevTree,\n          nextTree,\n          // parent may have changed if it's in a teleport\n          hostParentNode(prevTree.el),\n          // anchor may have changed if it's in a fragment\n          getNextHostNode(prevTree),\n          instance,\n          parentSuspense,\n          namespace\n        );\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `patch`);\n        }\n        next.el = nextTree.el;\n        if (originNext === null) {\n          updateHOCHostEl(instance, nextTree.el);\n        }\n        if (u) {\n          queuePostRenderEffect(u, parentSuspense);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeUpdated) {\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, next, vnode),\n            parentSuspense\n          );\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n          devtoolsComponentUpdated(instance);\n        }\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n      }\n    };\n    instance.scope.on();\n    const effect = instance.effect = new ReactiveEffect(componentUpdateFn);\n    instance.scope.off();\n    const update = instance.update = effect.run.bind(effect);\n    const job = instance.job = effect.runIfDirty.bind(effect);\n    job.i = instance;\n    job.id = instance.uid;\n    effect.scheduler = () => queueJob(job);\n    toggleRecurse(instance, true);\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;\n      effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;\n    }\n    update();\n  };\n  const updateComponentPreRender = (instance, nextVNode, optimized) => {\n    nextVNode.component = instance;\n    const prevProps = instance.vnode.props;\n    instance.vnode = nextVNode;\n    instance.next = null;\n    updateProps(instance, nextVNode.props, prevProps, optimized);\n    updateSlots(instance, nextVNode.children, optimized);\n    pauseTracking();\n    flushPreFlushCbs(instance);\n    resetTracking();\n  };\n  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n    const c1 = n1 && n1.children;\n    const prevShapeFlag = n1 ? n1.shapeFlag : 0;\n    const c2 = n2.children;\n    const { patchFlag, shapeFlag } = n2;\n    if (patchFlag > 0) {\n      if (patchFlag & 128) {\n        patchKeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      } else if (patchFlag & 256) {\n        patchUnkeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      }\n    }\n    if (shapeFlag & 8) {\n      if (prevShapeFlag & 16) {\n        unmountChildren(c1, parentComponent, parentSuspense);\n      }\n      if (c2 !== c1) {\n        hostSetElementText(container, c2);\n      }\n    } else {\n      if (prevShapeFlag & 16) {\n        if (shapeFlag & 16) {\n          patchKeyedChildren(\n            c1,\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else {\n          unmountChildren(c1, parentComponent, parentSuspense, true);\n        }\n      } else {\n        if (prevShapeFlag & 8) {\n          hostSetElementText(container, \"\");\n        }\n        if (shapeFlag & 16) {\n          mountChildren(\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      }\n    }\n  };\n  const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    c1 = c1 || EMPTY_ARR;\n    c2 = c2 || EMPTY_ARR;\n    const oldLength = c1.length;\n    const newLength = c2.length;\n    const commonLength = Math.min(oldLength, newLength);\n    let i;\n    for (i = 0; i < commonLength; i++) {\n      const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      patch(\n        c1[i],\n        nextChild,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (oldLength > newLength) {\n      unmountChildren(\n        c1,\n        parentComponent,\n        parentSuspense,\n        true,\n        false,\n        commonLength\n      );\n    } else {\n      mountChildren(\n        c2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        commonLength\n      );\n    }\n  };\n  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let i = 0;\n    const l2 = c2.length;\n    let e1 = c1.length - 1;\n    let e2 = l2 - 1;\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[i];\n      const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      i++;\n    }\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[e1];\n      const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      e1--;\n      e2--;\n    }\n    if (i > e1) {\n      if (i <= e2) {\n        const nextPos = e2 + 1;\n        const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n        while (i <= e2) {\n          patch(\n            null,\n            c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          i++;\n        }\n      }\n    } else if (i > e2) {\n      while (i <= e1) {\n        unmount(c1[i], parentComponent, parentSuspense, true);\n        i++;\n      }\n    } else {\n      const s1 = i;\n      const s2 = i;\n      const keyToNewIndexMap = /* @__PURE__ */ new Map();\n      for (i = s2; i <= e2; i++) {\n        const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n        if (nextChild.key != null) {\n          if (!!(process.env.NODE_ENV !== \"production\") && keyToNewIndexMap.has(nextChild.key)) {\n            warn$1(\n              `Duplicate keys found during update:`,\n              JSON.stringify(nextChild.key),\n              `Make sure keys are unique.`\n            );\n          }\n          keyToNewIndexMap.set(nextChild.key, i);\n        }\n      }\n      let j;\n      let patched = 0;\n      const toBePatched = e2 - s2 + 1;\n      let moved = false;\n      let maxNewIndexSoFar = 0;\n      const newIndexToOldIndexMap = new Array(toBePatched);\n      for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n      for (i = s1; i <= e1; i++) {\n        const prevChild = c1[i];\n        if (patched >= toBePatched) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n          continue;\n        }\n        let newIndex;\n        if (prevChild.key != null) {\n          newIndex = keyToNewIndexMap.get(prevChild.key);\n        } else {\n          for (j = s2; j <= e2; j++) {\n            if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n              newIndex = j;\n              break;\n            }\n          }\n        }\n        if (newIndex === void 0) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n        } else {\n          newIndexToOldIndexMap[newIndex - s2] = i + 1;\n          if (newIndex >= maxNewIndexSoFar) {\n            maxNewIndexSoFar = newIndex;\n          } else {\n            moved = true;\n          }\n          patch(\n            prevChild,\n            c2[newIndex],\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          patched++;\n        }\n      }\n      const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;\n      j = increasingNewIndexSequence.length - 1;\n      for (i = toBePatched - 1; i >= 0; i--) {\n        const nextIndex = s2 + i;\n        const nextChild = c2[nextIndex];\n        const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;\n        if (newIndexToOldIndexMap[i] === 0) {\n          patch(\n            null,\n            nextChild,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (moved) {\n          if (j < 0 || i !== increasingNewIndexSequence[j]) {\n            move(nextChild, container, anchor, 2);\n          } else {\n            j--;\n          }\n        }\n      }\n    }\n  };\n  const move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n    const { el, type, transition, children, shapeFlag } = vnode;\n    if (shapeFlag & 6) {\n      move(vnode.component.subTree, container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 128) {\n      vnode.suspense.move(container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 64) {\n      type.move(vnode, container, anchor, internals);\n      return;\n    }\n    if (type === Fragment) {\n      hostInsert(el, container, anchor);\n      for (let i = 0; i < children.length; i++) {\n        move(children[i], container, anchor, moveType);\n      }\n      hostInsert(vnode.anchor, container, anchor);\n      return;\n    }\n    if (type === Static) {\n      moveStaticNode(vnode, container, anchor);\n      return;\n    }\n    const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;\n    if (needTransition2) {\n      if (moveType === 0) {\n        transition.beforeEnter(el);\n        hostInsert(el, container, anchor);\n        queuePostRenderEffect(() => transition.enter(el), parentSuspense);\n      } else {\n        const { leave, delayLeave, afterLeave } = transition;\n        const remove2 = () => hostInsert(el, container, anchor);\n        const performLeave = () => {\n          leave(el, () => {\n            remove2();\n            afterLeave && afterLeave();\n          });\n        };\n        if (delayLeave) {\n          delayLeave(el, remove2, performLeave);\n        } else {\n          performLeave();\n        }\n      }\n    } else {\n      hostInsert(el, container, anchor);\n    }\n  };\n  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n    const {\n      type,\n      props,\n      ref,\n      children,\n      dynamicChildren,\n      shapeFlag,\n      patchFlag,\n      dirs,\n      cacheIndex\n    } = vnode;\n    if (patchFlag === -2) {\n      optimized = false;\n    }\n    if (ref != null) {\n      setRef(ref, null, parentSuspense, vnode, true);\n    }\n    if (cacheIndex != null) {\n      parentComponent.renderCache[cacheIndex] = void 0;\n    }\n    if (shapeFlag & 256) {\n      parentComponent.ctx.deactivate(vnode);\n      return;\n    }\n    const shouldInvokeDirs = shapeFlag & 1 && dirs;\n    const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n    let vnodeHook;\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {\n      invokeVNodeHook(vnodeHook, parentComponent, vnode);\n    }\n    if (shapeFlag & 6) {\n      unmountComponent(vnode.component, parentSuspense, doRemove);\n    } else {\n      if (shapeFlag & 128) {\n        vnode.suspense.unmount(parentSuspense, doRemove);\n        return;\n      }\n      if (shouldInvokeDirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n      }\n      if (shapeFlag & 64) {\n        vnode.type.remove(\n          vnode,\n          parentComponent,\n          parentSuspense,\n          internals,\n          doRemove\n        );\n      } else if (dynamicChildren && // #5154\n      // when v-once is used inside a block, setBlockTracking(-1) marks the\n      // parent block with hasOnce: true\n      // so that it doesn't take the fast path during unmount - otherwise\n      // components nested in v-once are never unmounted.\n      !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments\n      (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {\n        unmountChildren(\n          dynamicChildren,\n          parentComponent,\n          parentSuspense,\n          false,\n          true\n        );\n      } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {\n        unmountChildren(children, parentComponent, parentSuspense);\n      }\n      if (doRemove) {\n        remove(vnode);\n      }\n    }\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n      }, parentSuspense);\n    }\n  };\n  const remove = (vnode) => {\n    const { type, el, anchor, transition } = vnode;\n    if (type === Fragment) {\n      if (!!(process.env.NODE_ENV !== \"production\") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {\n        vnode.children.forEach((child) => {\n          if (child.type === Comment) {\n            hostRemove(child.el);\n          } else {\n            remove(child);\n          }\n        });\n      } else {\n        removeFragment(el, anchor);\n      }\n      return;\n    }\n    if (type === Static) {\n      removeStaticNode(vnode);\n      return;\n    }\n    const performRemove = () => {\n      hostRemove(el);\n      if (transition && !transition.persisted && transition.afterLeave) {\n        transition.afterLeave();\n      }\n    };\n    if (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n      const { leave, delayLeave } = transition;\n      const performLeave = () => leave(el, performRemove);\n      if (delayLeave) {\n        delayLeave(vnode.el, performRemove, performLeave);\n      } else {\n        performLeave();\n      }\n    } else {\n      performRemove();\n    }\n  };\n  const removeFragment = (cur, end) => {\n    let next;\n    while (cur !== end) {\n      next = hostNextSibling(cur);\n      hostRemove(cur);\n      cur = next;\n    }\n    hostRemove(end);\n  };\n  const unmountComponent = (instance, parentSuspense, doRemove) => {\n    if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n      unregisterHMR(instance);\n    }\n    const { bum, scope, job, subTree, um, m, a } = instance;\n    invalidateMount(m);\n    invalidateMount(a);\n    if (bum) {\n      invokeArrayFns(bum);\n    }\n    scope.stop();\n    if (job) {\n      job.flags |= 8;\n      unmount(subTree, instance, parentSuspense, doRemove);\n    }\n    if (um) {\n      queuePostRenderEffect(um, parentSuspense);\n    }\n    queuePostRenderEffect(() => {\n      instance.isUnmounted = true;\n    }, parentSuspense);\n    if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {\n      parentSuspense.deps--;\n      if (parentSuspense.deps === 0) {\n        parentSuspense.resolve();\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      devtoolsComponentRemoved(instance);\n    }\n  };\n  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n    }\n  };\n  const getNextHostNode = (vnode) => {\n    if (vnode.shapeFlag & 6) {\n      return getNextHostNode(vnode.component.subTree);\n    }\n    if (vnode.shapeFlag & 128) {\n      return vnode.suspense.next();\n    }\n    const el = hostNextSibling(vnode.anchor || vnode.el);\n    const teleportEnd = el && el[TeleportEndKey];\n    return teleportEnd ? hostNextSibling(teleportEnd) : el;\n  };\n  let isFlushing = false;\n  const render = (vnode, container, namespace) => {\n    if (vnode == null) {\n      if (container._vnode) {\n        unmount(container._vnode, null, null, true);\n      }\n    } else {\n      patch(\n        container._vnode || null,\n        vnode,\n        container,\n        null,\n        null,\n        null,\n        namespace\n      );\n    }\n    container._vnode = vnode;\n    if (!isFlushing) {\n      isFlushing = true;\n      flushPreFlushCbs();\n      flushPostFlushCbs();\n      isFlushing = false;\n    }\n  };\n  const internals = {\n    p: patch,\n    um: unmount,\n    m: move,\n    r: remove,\n    mt: mountComponent,\n    mc: mountChildren,\n    pc: patchChildren,\n    pbc: patchBlockChildren,\n    n: getNextHostNode,\n    o: options\n  };\n  let hydrate;\n  let hydrateNode;\n  if (createHydrationFns) {\n    [hydrate, hydrateNode] = createHydrationFns(\n      internals\n    );\n  }\n  return {\n    render,\n    hydrate,\n    createApp: createAppAPI(render, hydrate)\n  };\n}\nfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n  return currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n}\nfunction toggleRecurse({ effect, job }, allowed) {\n  if (allowed) {\n    effect.flags |= 32;\n    job.flags |= 4;\n  } else {\n    effect.flags &= ~32;\n    job.flags &= ~4;\n  }\n}\nfunction needTransition(parentSuspense, transition) {\n  return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n}\nfunction traverseStaticChildren(n1, n2, shallow = false) {\n  const ch1 = n1.children;\n  const ch2 = n2.children;\n  if (isArray(ch1) && isArray(ch2)) {\n    for (let i = 0; i < ch1.length; i++) {\n      const c1 = ch1[i];\n      let c2 = ch2[i];\n      if (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n        if (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n          c2 = ch2[i] = cloneIfMounted(ch2[i]);\n          c2.el = c1.el;\n        }\n        if (!shallow && c2.patchFlag !== -2)\n          traverseStaticChildren(c1, c2);\n      }\n      if (c2.type === Text) {\n        c2.el = c1.el;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && c2.type === Comment && !c2.el) {\n        c2.el = c1.el;\n      }\n    }\n  }\n}\nfunction getSequence(arr) {\n  const p = arr.slice();\n  const result = [0];\n  let i, j, u, v, c;\n  const len = arr.length;\n  for (i = 0; i < len; i++) {\n    const arrI = arr[i];\n    if (arrI !== 0) {\n      j = result[result.length - 1];\n      if (arr[j] < arrI) {\n        p[i] = j;\n        result.push(i);\n        continue;\n      }\n      u = 0;\n      v = result.length - 1;\n      while (u < v) {\n        c = u + v >> 1;\n        if (arr[result[c]] < arrI) {\n          u = c + 1;\n        } else {\n          v = c;\n        }\n      }\n      if (arrI < arr[result[u]]) {\n        if (u > 0) {\n          p[i] = result[u - 1];\n        }\n        result[u] = i;\n      }\n    }\n  }\n  u = result.length;\n  v = result[u - 1];\n  while (u-- > 0) {\n    result[u] = v;\n    v = p[v];\n  }\n  return result;\n}\nfunction locateNonHydratedAsyncRoot(instance) {\n  const subComponent = instance.subTree.component;\n  if (subComponent) {\n    if (subComponent.asyncDep && !subComponent.asyncResolved) {\n      return subComponent;\n    } else {\n      return locateNonHydratedAsyncRoot(subComponent);\n    }\n  }\n}\nfunction invalidateMount(hooks) {\n  if (hooks) {\n    for (let i = 0; i < hooks.length; i++)\n      hooks[i].flags |= 8;\n  }\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n  {\n    const ctx = inject(ssrContextKey);\n    if (!ctx) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n      );\n    }\n    return ctx;\n  }\n};\n\nfunction watchEffect(effect, options) {\n  return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n  );\n}\nfunction watchSyncEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n  );\n}\nfunction watch(source, cb, options) {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n    warn$1(\n      `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n    );\n  }\n  return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, options = EMPTY_OBJ) {\n  const { immediate, deep, flush, once } = options;\n  if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n    if (immediate !== void 0) {\n      warn$1(\n        `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n    if (deep !== void 0) {\n      warn$1(\n        `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n    if (once !== void 0) {\n      warn$1(\n        `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n  }\n  const baseWatchOptions = extend({}, options);\n  if (!!(process.env.NODE_ENV !== \"production\")) baseWatchOptions.onWarn = warn$1;\n  const runsImmediately = cb && immediate || !cb && flush !== \"post\";\n  let ssrCleanup;\n  if (isInSSRComponentSetup) {\n    if (flush === \"sync\") {\n      const ctx = useSSRContext();\n      ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n    } else if (!runsImmediately) {\n      const watchStopHandle = () => {\n      };\n      watchStopHandle.stop = NOOP;\n      watchStopHandle.resume = NOOP;\n      watchStopHandle.pause = NOOP;\n      return watchStopHandle;\n    }\n  }\n  const instance = currentInstance;\n  baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);\n  let isPre = false;\n  if (flush === \"post\") {\n    baseWatchOptions.scheduler = (job) => {\n      queuePostRenderEffect(job, instance && instance.suspense);\n    };\n  } else if (flush !== \"sync\") {\n    isPre = true;\n    baseWatchOptions.scheduler = (job, isFirstRun) => {\n      if (isFirstRun) {\n        job();\n      } else {\n        queueJob(job);\n      }\n    };\n  }\n  baseWatchOptions.augmentJob = (job) => {\n    if (cb) {\n      job.flags |= 4;\n    }\n    if (isPre) {\n      job.flags |= 2;\n      if (instance) {\n        job.id = instance.uid;\n        job.i = instance;\n      }\n    }\n  };\n  const watchHandle = watch$1(source, cb, baseWatchOptions);\n  if (isInSSRComponentSetup) {\n    if (ssrCleanup) {\n      ssrCleanup.push(watchHandle);\n    } else if (runsImmediately) {\n      watchHandle();\n    }\n  }\n  return watchHandle;\n}\nfunction instanceWatch(source, value, options) {\n  const publicThis = this.proxy;\n  const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n  let cb;\n  if (isFunction(value)) {\n    cb = value;\n  } else {\n    cb = value.handler;\n    options = value;\n  }\n  const reset = setCurrentInstance(this);\n  const res = doWatch(getter, cb.bind(publicThis), options);\n  reset();\n  return res;\n}\nfunction createPathGetter(ctx, path) {\n  const segments = path.split(\".\");\n  return () => {\n    let cur = ctx;\n    for (let i = 0; i < segments.length && cur; i++) {\n      cur = cur[segments[i]];\n    }\n    return cur;\n  };\n}\n\nfunction useModel(props, name, options = EMPTY_OBJ) {\n  const i = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n    warn$1(`useModel() called without active instance.`);\n    return ref();\n  }\n  const camelizedName = camelize(name);\n  if (!!(process.env.NODE_ENV !== \"production\") && !i.propsOptions[0][camelizedName]) {\n    warn$1(`useModel() called with prop \"${name}\" which is not declared.`);\n    return ref();\n  }\n  const hyphenatedName = hyphenate(name);\n  const modifiers = getModelModifiers(props, camelizedName);\n  const res = customRef((track, trigger) => {\n    let localValue;\n    let prevSetValue = EMPTY_OBJ;\n    let prevEmittedValue;\n    watchSyncEffect(() => {\n      const propValue = props[camelizedName];\n      if (hasChanged(localValue, propValue)) {\n        localValue = propValue;\n        trigger();\n      }\n    });\n    return {\n      get() {\n        track();\n        return options.get ? options.get(localValue) : localValue;\n      },\n      set(value) {\n        const emittedValue = options.set ? options.set(value) : value;\n        if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {\n          return;\n        }\n        const rawProps = i.vnode.props;\n        if (!(rawProps && // check if parent has passed v-model\n        (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {\n          localValue = value;\n          trigger();\n        }\n        i.emit(`update:${name}`, emittedValue);\n        if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {\n          trigger();\n        }\n        prevSetValue = value;\n        prevEmittedValue = emittedValue;\n      }\n    };\n  });\n  res[Symbol.iterator] = () => {\n    let i2 = 0;\n    return {\n      next() {\n        if (i2 < 2) {\n          return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };\n        } else {\n          return { done: true };\n        }\n      }\n    };\n  };\n  return res;\n}\nconst getModelModifiers = (props, modelName) => {\n  return modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];\n};\n\nfunction emit(instance, event, ...rawArgs) {\n  if (instance.isUnmounted) return;\n  const props = instance.vnode.props || EMPTY_OBJ;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const {\n      emitsOptions,\n      propsOptions: [propsOptions]\n    } = instance;\n    if (emitsOptions) {\n      if (!(event in emitsOptions) && true) {\n        if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {\n          warn$1(\n            `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(camelize(event))}\" prop.`\n          );\n        }\n      } else {\n        const validator = emitsOptions[event];\n        if (isFunction(validator)) {\n          const isValid = validator(...rawArgs);\n          if (!isValid) {\n            warn$1(\n              `Invalid event arguments: event validation failed for event \"${event}\".`\n            );\n          }\n        }\n      }\n    }\n  }\n  let args = rawArgs;\n  const isModelListener = event.startsWith(\"update:\");\n  const modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n  if (modifiers) {\n    if (modifiers.trim) {\n      args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n    }\n    if (modifiers.number) {\n      args = rawArgs.map(looseToNumber);\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsComponentEmit(instance, event, args);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const lowerCaseEvent = event.toLowerCase();\n    if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n      warn$1(\n        `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n          instance,\n          instance.type\n        )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n          event\n        )}\" instead of \"${event}\".`\n      );\n    }\n  }\n  let handlerName;\n  let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n  props[handlerName = toHandlerKey(camelize(event))];\n  if (!handler && isModelListener) {\n    handler = props[handlerName = toHandlerKey(hyphenate(event))];\n  }\n  if (handler) {\n    callWithAsyncErrorHandling(\n      handler,\n      instance,\n      6,\n      args\n    );\n  }\n  const onceHandler = props[handlerName + `Once`];\n  if (onceHandler) {\n    if (!instance.emitted) {\n      instance.emitted = {};\n    } else if (instance.emitted[handlerName]) {\n      return;\n    }\n    instance.emitted[handlerName] = true;\n    callWithAsyncErrorHandling(\n      onceHandler,\n      instance,\n      6,\n      args\n    );\n  }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n  const cache = appContext.emitsCache;\n  const cached = cache.get(comp);\n  if (cached !== void 0) {\n    return cached;\n  }\n  const raw = comp.emits;\n  let normalized = {};\n  let hasExtends = false;\n  if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n    const extendEmits = (raw2) => {\n      const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n      if (normalizedFromExtend) {\n        hasExtends = true;\n        extend(normalized, normalizedFromExtend);\n      }\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendEmits);\n    }\n    if (comp.extends) {\n      extendEmits(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendEmits);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (isObject(comp)) {\n      cache.set(comp, null);\n    }\n    return null;\n  }\n  if (isArray(raw)) {\n    raw.forEach((key) => normalized[key] = null);\n  } else {\n    extend(normalized, raw);\n  }\n  if (isObject(comp)) {\n    cache.set(comp, normalized);\n  }\n  return normalized;\n}\nfunction isEmitListener(options, key) {\n  if (!options || !isOn(key)) {\n    return false;\n  }\n  key = key.slice(2).replace(/Once$/, \"\");\n  return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n  accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n  const {\n    type: Component,\n    vnode,\n    proxy,\n    withProxy,\n    propsOptions: [propsOptions],\n    slots,\n    attrs,\n    emit,\n    render,\n    renderCache,\n    props,\n    data,\n    setupState,\n    ctx,\n    inheritAttrs\n  } = instance;\n  const prev = setCurrentRenderingInstance(instance);\n  let result;\n  let fallthroughAttrs;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    accessedAttrs = false;\n  }\n  try {\n    if (vnode.shapeFlag & 4) {\n      const proxyToUse = withProxy || proxy;\n      const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n        get(target, key, receiver) {\n          warn$1(\n            `Property '${String(\n              key\n            )}' was accessed via 'this'. Avoid using 'this' in templates.`\n          );\n          return Reflect.get(target, key, receiver);\n        }\n      }) : proxyToUse;\n      result = normalizeVNode(\n        render.call(\n          thisProxy,\n          proxyToUse,\n          renderCache,\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          setupState,\n          data,\n          ctx\n        )\n      );\n      fallthroughAttrs = attrs;\n    } else {\n      const render2 = Component;\n      if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n        markAttrsAccessed();\n      }\n      result = normalizeVNode(\n        render2.length > 1 ? render2(\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          !!(process.env.NODE_ENV !== \"production\") ? {\n            get attrs() {\n              markAttrsAccessed();\n              return shallowReadonly(attrs);\n            },\n            slots,\n            emit\n          } : { attrs, slots, emit }\n        ) : render2(\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          null\n        )\n      );\n      fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n    }\n  } catch (err) {\n    blockStack.length = 0;\n    handleError(err, instance, 1);\n    result = createVNode(Comment);\n  }\n  let root = result;\n  let setRoot = void 0;\n  if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n    [root, setRoot] = getChildRoot(result);\n  }\n  if (fallthroughAttrs && inheritAttrs !== false) {\n    const keys = Object.keys(fallthroughAttrs);\n    const { shapeFlag } = root;\n    if (keys.length) {\n      if (shapeFlag & (1 | 6)) {\n        if (propsOptions && keys.some(isModelListener)) {\n          fallthroughAttrs = filterModelListeners(\n            fallthroughAttrs,\n            propsOptions\n          );\n        }\n        root = cloneVNode(root, fallthroughAttrs, false, true);\n      } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n        const allAttrs = Object.keys(attrs);\n        const eventAttrs = [];\n        const extraAttrs = [];\n        for (let i = 0, l = allAttrs.length; i < l; i++) {\n          const key = allAttrs[i];\n          if (isOn(key)) {\n            if (!isModelListener(key)) {\n              eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n            }\n          } else {\n            extraAttrs.push(key);\n          }\n        }\n        if (extraAttrs.length) {\n          warn$1(\n            `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n          );\n        }\n        if (eventAttrs.length) {\n          warn$1(\n            `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n          );\n        }\n      }\n    }\n  }\n  if (vnode.dirs) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n      warn$1(\n        `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n      );\n    }\n    root = cloneVNode(root, null, false, true);\n    root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n  }\n  if (vnode.transition) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n      warn$1(\n        `Component inside <Transition> renders non-element root node that cannot be animated.`\n      );\n    }\n    setTransitionHooks(root, vnode.transition);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n    setRoot(root);\n  } else {\n    result = root;\n  }\n  setCurrentRenderingInstance(prev);\n  return result;\n}\nconst getChildRoot = (vnode) => {\n  const rawChildren = vnode.children;\n  const dynamicChildren = vnode.dynamicChildren;\n  const childRoot = filterSingleRoot(rawChildren, false);\n  if (!childRoot) {\n    return [vnode, void 0];\n  } else if (!!(process.env.NODE_ENV !== \"production\") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {\n    return getChildRoot(childRoot);\n  }\n  const index = rawChildren.indexOf(childRoot);\n  const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n  const setRoot = (updatedRoot) => {\n    rawChildren[index] = updatedRoot;\n    if (dynamicChildren) {\n      if (dynamicIndex > -1) {\n        dynamicChildren[dynamicIndex] = updatedRoot;\n      } else if (updatedRoot.patchFlag > 0) {\n        vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n      }\n    }\n  };\n  return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children, recurse = true) {\n  let singleRoot;\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    if (isVNode(child)) {\n      if (child.type !== Comment || child.children === \"v-if\") {\n        if (singleRoot) {\n          return;\n        } else {\n          singleRoot = child;\n          if (!!(process.env.NODE_ENV !== \"production\") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {\n            return filterSingleRoot(singleRoot.children);\n          }\n        }\n      }\n    } else {\n      return;\n    }\n  }\n  return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n  let res;\n  for (const key in attrs) {\n    if (key === \"class\" || key === \"style\" || isOn(key)) {\n      (res || (res = {}))[key] = attrs[key];\n    }\n  }\n  return res;\n};\nconst filterModelListeners = (attrs, props) => {\n  const res = {};\n  for (const key in attrs) {\n    if (!isModelListener(key) || !(key.slice(9) in props)) {\n      res[key] = attrs[key];\n    }\n  }\n  return res;\n};\nconst isElementRoot = (vnode) => {\n  return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n  const { props: prevProps, children: prevChildren, component } = prevVNode;\n  const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n  const emits = component.emitsOptions;\n  if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n    return true;\n  }\n  if (nextVNode.dirs || nextVNode.transition) {\n    return true;\n  }\n  if (optimized && patchFlag >= 0) {\n    if (patchFlag & 1024) {\n      return true;\n    }\n    if (patchFlag & 16) {\n      if (!prevProps) {\n        return !!nextProps;\n      }\n      return hasPropsChanged(prevProps, nextProps, emits);\n    } else if (patchFlag & 8) {\n      const dynamicProps = nextVNode.dynamicProps;\n      for (let i = 0; i < dynamicProps.length; i++) {\n        const key = dynamicProps[i];\n        if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n          return true;\n        }\n      }\n    }\n  } else {\n    if (prevChildren || nextChildren) {\n      if (!nextChildren || !nextChildren.$stable) {\n        return true;\n      }\n    }\n    if (prevProps === nextProps) {\n      return false;\n    }\n    if (!prevProps) {\n      return !!nextProps;\n    }\n    if (!nextProps) {\n      return true;\n    }\n    return hasPropsChanged(prevProps, nextProps, emits);\n  }\n  return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n  const nextKeys = Object.keys(nextProps);\n  if (nextKeys.length !== Object.keys(prevProps).length) {\n    return true;\n  }\n  for (let i = 0; i < nextKeys.length; i++) {\n    const key = nextKeys[i];\n    if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n  while (parent) {\n    const root = parent.subTree;\n    if (root.suspense && root.suspense.activeBranch === vnode) {\n      root.el = vnode.el;\n    }\n    if (root === vnode) {\n      (vnode = parent.vnode).el = el;\n      parent = parent.parent;\n    } else {\n      break;\n    }\n  }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n  name: \"Suspense\",\n  // In order to make Suspense tree-shakable, we need to avoid importing it\n  // directly in the renderer. The renderer checks for the __isSuspense flag\n  // on a vnode's type and calls the `process` method, passing in renderer\n  // internals.\n  __isSuspense: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n    if (n1 == null) {\n      mountSuspense(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    } else {\n      if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {\n        n2.suspense = n1.suspense;\n        n2.suspense.vnode = n2;\n        n2.el = n1.el;\n        return;\n      }\n      patchSuspense(\n        n1,\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    }\n  },\n  hydrate: hydrateSuspense,\n  normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n  const eventListener = vnode.props && vnode.props[name];\n  if (isFunction(eventListener)) {\n    eventListener();\n  }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n  const {\n    p: patch,\n    o: { createElement }\n  } = rendererInternals;\n  const hiddenContainer = createElement(\"div\");\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    container,\n    hiddenContainer,\n    anchor,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals\n  );\n  patch(\n    null,\n    suspense.pendingBranch = vnode.ssContent,\n    hiddenContainer,\n    null,\n    parentComponent,\n    suspense,\n    namespace,\n    slotScopeIds\n  );\n  if (suspense.deps > 0) {\n    triggerEvent(vnode, \"onPending\");\n    triggerEvent(vnode, \"onFallback\");\n    patch(\n      null,\n      vnode.ssFallback,\n      container,\n      anchor,\n      parentComponent,\n      null,\n      // fallback tree will not have suspense context\n      namespace,\n      slotScopeIds\n    );\n    setActiveBranch(suspense, vnode.ssFallback);\n  } else {\n    suspense.resolve(false, true);\n  }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n  const suspense = n2.suspense = n1.suspense;\n  suspense.vnode = n2;\n  n2.el = n1.el;\n  const newBranch = n2.ssContent;\n  const newFallback = n2.ssFallback;\n  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n  if (pendingBranch) {\n    suspense.pendingBranch = newBranch;\n    if (isSameVNodeType(newBranch, pendingBranch)) {\n      patch(\n        pendingBranch,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else if (isInFallback) {\n        if (!isHydrating) {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      }\n    } else {\n      suspense.pendingId = suspenseId++;\n      if (isHydrating) {\n        suspense.isHydrating = false;\n        suspense.activeBranch = pendingBranch;\n      } else {\n        unmount(pendingBranch, parentComponent, suspense);\n      }\n      suspense.deps = 0;\n      suspense.effects.length = 0;\n      suspense.hiddenContainer = createElement(\"div\");\n      if (isInFallback) {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        } else {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n        patch(\n          activeBranch,\n          newBranch,\n          container,\n          anchor,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        suspense.resolve(true);\n      } else {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        }\n      }\n    }\n  } else {\n    if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n      patch(\n        activeBranch,\n        newBranch,\n        container,\n        anchor,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      setActiveBranch(suspense, newBranch);\n    } else {\n      triggerEvent(n2, \"onPending\");\n      suspense.pendingBranch = newBranch;\n      if (newBranch.shapeFlag & 512) {\n        suspense.pendingId = newBranch.component.suspenseId;\n      } else {\n        suspense.pendingId = suspenseId++;\n      }\n      patch(\n        null,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else {\n        const { timeout, pendingId } = suspense;\n        if (timeout > 0) {\n          setTimeout(() => {\n            if (suspense.pendingId === pendingId) {\n              suspense.fallback(newFallback);\n            }\n          }, timeout);\n        } else if (timeout === 0) {\n          suspense.fallback(newFallback);\n        }\n      }\n    }\n  }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n  if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n    hasWarned = true;\n    console[console.info ? \"info\" : \"log\"](\n      `<Suspense> is an experimental feature and its API will likely change.`\n    );\n  }\n  const {\n    p: patch,\n    m: move,\n    um: unmount,\n    n: next,\n    o: { parentNode, remove }\n  } = rendererInternals;\n  let parentSuspenseId;\n  const isSuspensible = isVNodeSuspensible(vnode);\n  if (isSuspensible) {\n    if (parentSuspense && parentSuspense.pendingBranch) {\n      parentSuspenseId = parentSuspense.pendingId;\n      parentSuspense.deps++;\n    }\n  }\n  const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    assertNumber(timeout, `Suspense timeout`);\n  }\n  const initialAnchor = anchor;\n  const suspense = {\n    vnode,\n    parent: parentSuspense,\n    parentComponent,\n    namespace,\n    container,\n    hiddenContainer,\n    deps: 0,\n    pendingId: suspenseId++,\n    timeout: typeof timeout === \"number\" ? timeout : -1,\n    activeBranch: null,\n    pendingBranch: null,\n    isInFallback: !isHydrating,\n    isHydrating,\n    isUnmounted: false,\n    effects: [],\n    resolve(resume = false, sync = false) {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        if (!resume && !suspense.pendingBranch) {\n          throw new Error(\n            `suspense.resolve() is called without a pending branch.`\n          );\n        }\n        if (suspense.isUnmounted) {\n          throw new Error(\n            `suspense.resolve() is called on an already unmounted suspense boundary.`\n          );\n        }\n      }\n      const {\n        vnode: vnode2,\n        activeBranch,\n        pendingBranch,\n        pendingId,\n        effects,\n        parentComponent: parentComponent2,\n        container: container2\n      } = suspense;\n      let delayEnter = false;\n      if (suspense.isHydrating) {\n        suspense.isHydrating = false;\n      } else if (!resume) {\n        delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n        if (delayEnter) {\n          activeBranch.transition.afterLeave = () => {\n            if (pendingId === suspense.pendingId) {\n              move(\n                pendingBranch,\n                container2,\n                anchor === initialAnchor ? next(activeBranch) : anchor,\n                0\n              );\n              queuePostFlushCb(effects);\n            }\n          };\n        }\n        if (activeBranch) {\n          if (parentNode(activeBranch.el) === container2) {\n            anchor = next(activeBranch);\n          }\n          unmount(activeBranch, parentComponent2, suspense, true);\n        }\n        if (!delayEnter) {\n          move(pendingBranch, container2, anchor, 0);\n        }\n      }\n      setActiveBranch(suspense, pendingBranch);\n      suspense.pendingBranch = null;\n      suspense.isInFallback = false;\n      let parent = suspense.parent;\n      let hasUnresolvedAncestor = false;\n      while (parent) {\n        if (parent.pendingBranch) {\n          parent.effects.push(...effects);\n          hasUnresolvedAncestor = true;\n          break;\n        }\n        parent = parent.parent;\n      }\n      if (!hasUnresolvedAncestor && !delayEnter) {\n        queuePostFlushCb(effects);\n      }\n      suspense.effects = [];\n      if (isSuspensible) {\n        if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n          parentSuspense.deps--;\n          if (parentSuspense.deps === 0 && !sync) {\n            parentSuspense.resolve();\n          }\n        }\n      }\n      triggerEvent(vnode2, \"onResolve\");\n    },\n    fallback(fallbackVNode) {\n      if (!suspense.pendingBranch) {\n        return;\n      }\n      const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n      triggerEvent(vnode2, \"onFallback\");\n      const anchor2 = next(activeBranch);\n      const mountFallback = () => {\n        if (!suspense.isInFallback) {\n          return;\n        }\n        patch(\n          null,\n          fallbackVNode,\n          container2,\n          anchor2,\n          parentComponent2,\n          null,\n          // fallback tree will not have suspense context\n          namespace2,\n          slotScopeIds,\n          optimized\n        );\n        setActiveBranch(suspense, fallbackVNode);\n      };\n      const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n      if (delayEnter) {\n        activeBranch.transition.afterLeave = mountFallback;\n      }\n      suspense.isInFallback = true;\n      unmount(\n        activeBranch,\n        parentComponent2,\n        null,\n        // no suspense so unmount hooks fire now\n        true\n        // shouldRemove\n      );\n      if (!delayEnter) {\n        mountFallback();\n      }\n    },\n    move(container2, anchor2, type) {\n      suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n      suspense.container = container2;\n    },\n    next() {\n      return suspense.activeBranch && next(suspense.activeBranch);\n    },\n    registerDep(instance, setupRenderEffect, optimized2) {\n      const isInPendingSuspense = !!suspense.pendingBranch;\n      if (isInPendingSuspense) {\n        suspense.deps++;\n      }\n      const hydratedEl = instance.vnode.el;\n      instance.asyncDep.catch((err) => {\n        handleError(err, instance, 0);\n      }).then((asyncSetupResult) => {\n        if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n          return;\n        }\n        instance.asyncResolved = true;\n        const { vnode: vnode2 } = instance;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(vnode2);\n        }\n        handleSetupResult(instance, asyncSetupResult, false);\n        if (hydratedEl) {\n          vnode2.el = hydratedEl;\n        }\n        const placeholder = !hydratedEl && instance.subTree.el;\n        setupRenderEffect(\n          instance,\n          vnode2,\n          // component may have been moved before resolve.\n          // if this is not a hydration, instance.subTree will be the comment\n          // placeholder.\n          parentNode(hydratedEl || instance.subTree.el),\n          // anchor will not be used if this is hydration, so only need to\n          // consider the comment placeholder case.\n          hydratedEl ? null : next(instance.subTree),\n          suspense,\n          namespace,\n          optimized2\n        );\n        if (placeholder) {\n          remove(placeholder);\n        }\n        updateHOCHostEl(instance, vnode2.el);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n        if (isInPendingSuspense && --suspense.deps === 0) {\n          suspense.resolve();\n        }\n      });\n    },\n    unmount(parentSuspense2, doRemove) {\n      suspense.isUnmounted = true;\n      if (suspense.activeBranch) {\n        unmount(\n          suspense.activeBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n      if (suspense.pendingBranch) {\n        unmount(\n          suspense.pendingBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n    }\n  };\n  return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    node.parentNode,\n    // eslint-disable-next-line no-restricted-globals\n    document.createElement(\"div\"),\n    null,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals,\n    true\n  );\n  const result = hydrateNode(\n    node,\n    suspense.pendingBranch = vnode.ssContent,\n    parentComponent,\n    suspense,\n    slotScopeIds,\n    optimized\n  );\n  if (suspense.deps === 0) {\n    suspense.resolve(false, true);\n  }\n  return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n  const { shapeFlag, children } = vnode;\n  const isSlotChildren = shapeFlag & 32;\n  vnode.ssContent = normalizeSuspenseSlot(\n    isSlotChildren ? children.default : children\n  );\n  vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n  let block;\n  if (isFunction(s)) {\n    const trackBlock = isBlockTreeEnabled && s._c;\n    if (trackBlock) {\n      s._d = false;\n      openBlock();\n    }\n    s = s();\n    if (trackBlock) {\n      s._d = true;\n      block = currentBlock;\n      closeBlock();\n    }\n  }\n  if (isArray(s)) {\n    const singleChild = filterSingleRoot(s);\n    if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n      warn$1(`<Suspense> slots expect a single root node.`);\n    }\n    s = singleChild;\n  }\n  s = normalizeVNode(s);\n  if (block && !s.dynamicChildren) {\n    s.dynamicChildren = block.filter((c) => c !== s);\n  }\n  return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n  if (suspense && suspense.pendingBranch) {\n    if (isArray(fn)) {\n      suspense.effects.push(...fn);\n    } else {\n      suspense.effects.push(fn);\n    }\n  } else {\n    queuePostFlushCb(fn);\n  }\n}\nfunction setActiveBranch(suspense, branch) {\n  suspense.activeBranch = branch;\n  const { vnode, parentComponent } = suspense;\n  let el = branch.el;\n  while (!el && branch.component) {\n    branch = branch.component.subTree;\n    el = branch.el;\n  }\n  vnode.el = el;\n  if (parentComponent && parentComponent.subTree === vnode) {\n    parentComponent.vnode.el = el;\n    updateHOCHostEl(parentComponent, el);\n  }\n}\nfunction isVNodeSuspensible(vnode) {\n  const suspensible = vnode.props && vnode.props.suspensible;\n  return suspensible != null && suspensible !== false;\n}\n\nconst Fragment = Symbol.for(\"v-fgt\");\nconst Text = Symbol.for(\"v-txt\");\nconst Comment = Symbol.for(\"v-cmt\");\nconst Static = Symbol.for(\"v-stc\");\nconst blockStack = [];\nlet currentBlock = null;\nfunction openBlock(disableTracking = false) {\n  blockStack.push(currentBlock = disableTracking ? null : []);\n}\nfunction closeBlock() {\n  blockStack.pop();\n  currentBlock = blockStack[blockStack.length - 1] || null;\n}\nlet isBlockTreeEnabled = 1;\nfunction setBlockTracking(value) {\n  isBlockTreeEnabled += value;\n  if (value < 0 && currentBlock) {\n    currentBlock.hasOnce = true;\n  }\n}\nfunction setupBlock(vnode) {\n  vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\n  closeBlock();\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n  return setupBlock(\n    createBaseVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      shapeFlag,\n      true\n    )\n  );\n}\nfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n  return setupBlock(\n    createVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      true\n    )\n  );\n}\nfunction isVNode(value) {\n  return value ? value.__v_isVNode === true : false;\n}\nfunction isSameVNodeType(n1, n2) {\n  if (!!(process.env.NODE_ENV !== \"production\") && n2.shapeFlag & 6 && n1.component) {\n    const dirtyInstances = hmrDirtyComponents.get(n2.type);\n    if (dirtyInstances && dirtyInstances.has(n1.component)) {\n      n1.shapeFlag &= ~256;\n      n2.shapeFlag &= ~512;\n      return false;\n    }\n  }\n  return n1.type === n2.type && n1.key === n2.key;\n}\nlet vnodeArgsTransformer;\nfunction transformVNodeArgs(transformer) {\n  vnodeArgsTransformer = transformer;\n}\nconst createVNodeWithArgsTransform = (...args) => {\n  return _createVNode(\n    ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args\n  );\n};\nconst normalizeKey = ({ key }) => key != null ? key : null;\nconst normalizeRef = ({\n  ref,\n  ref_key,\n  ref_for\n}) => {\n  if (typeof ref === \"number\") {\n    ref = \"\" + ref;\n  }\n  return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;\n};\nfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n  const vnode = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type,\n    props,\n    key: props && normalizeKey(props),\n    ref: props && normalizeRef(props),\n    scopeId: currentScopeId,\n    slotScopeIds: null,\n    children,\n    component: null,\n    suspense: null,\n    ssContent: null,\n    ssFallback: null,\n    dirs: null,\n    transition: null,\n    el: null,\n    anchor: null,\n    target: null,\n    targetStart: null,\n    targetAnchor: null,\n    staticCount: 0,\n    shapeFlag,\n    patchFlag,\n    dynamicProps,\n    dynamicChildren: null,\n    appContext: null,\n    ctx: currentRenderingInstance\n  };\n  if (needFullChildrenNormalization) {\n    normalizeChildren(vnode, children);\n    if (shapeFlag & 128) {\n      type.normalize(vnode);\n    }\n  } else if (children) {\n    vnode.shapeFlag |= isString(children) ? 8 : 16;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && vnode.key !== vnode.key) {\n    warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);\n  }\n  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself\n  !isBlockNode && // has current parent block\n  currentBlock && // presence of a patch flag indicates this node needs patching on updates.\n  // component nodes also should always be patched, because even if the\n  // component doesn't need to update, it needs to persist the instance on to\n  // the next vnode so that it can be properly unmounted later.\n  (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the\n  // vnode should not be considered dynamic due to handler caching.\n  vnode.patchFlag !== 32) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nconst createVNode = !!(process.env.NODE_ENV !== \"production\") ? createVNodeWithArgsTransform : _createVNode;\nfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n  if (!type || type === NULL_DYNAMIC_COMPONENT) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !type) {\n      warn$1(`Invalid vnode type when creating vnode: ${type}.`);\n    }\n    type = Comment;\n  }\n  if (isVNode(type)) {\n    const cloned = cloneVNode(\n      type,\n      props,\n      true\n      /* mergeRef: true */\n    );\n    if (children) {\n      normalizeChildren(cloned, children);\n    }\n    if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {\n      if (cloned.shapeFlag & 6) {\n        currentBlock[currentBlock.indexOf(type)] = cloned;\n      } else {\n        currentBlock.push(cloned);\n      }\n    }\n    cloned.patchFlag = -2;\n    return cloned;\n  }\n  if (isClassComponent(type)) {\n    type = type.__vccOpts;\n  }\n  if (props) {\n    props = guardReactiveProps(props);\n    let { class: klass, style } = props;\n    if (klass && !isString(klass)) {\n      props.class = normalizeClass(klass);\n    }\n    if (isObject(style)) {\n      if (isProxy(style) && !isArray(style)) {\n        style = extend({}, style);\n      }\n      props.style = normalizeStyle(style);\n    }\n  }\n  const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;\n  if (!!(process.env.NODE_ENV !== \"production\") && shapeFlag & 4 && isProxy(type)) {\n    type = toRaw(type);\n    warn$1(\n      `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \\`markRaw\\` or using \\`shallowRef\\` instead of \\`ref\\`.`,\n      `\nComponent that was made reactive: `,\n      type\n    );\n  }\n  return createBaseVNode(\n    type,\n    props,\n    children,\n    patchFlag,\n    dynamicProps,\n    shapeFlag,\n    isBlockNode,\n    true\n  );\n}\nfunction guardReactiveProps(props) {\n  if (!props) return null;\n  return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;\n}\nfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n  const { props, ref, patchFlag, children, transition } = vnode;\n  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n  const cloned = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type: vnode.type,\n    props: mergedProps,\n    key: mergedProps && normalizeKey(mergedProps),\n    ref: extraProps && extraProps.ref ? (\n      // #2078 in the case of <component :is=\"vnode\" ref=\"extra\"/>\n      // if the vnode itself already has a ref, cloneVNode will need to merge\n      // the refs so the single vnode can be set on multiple refs\n      mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)\n    ) : ref,\n    scopeId: vnode.scopeId,\n    slotScopeIds: vnode.slotScopeIds,\n    children: !!(process.env.NODE_ENV !== \"production\") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,\n    target: vnode.target,\n    targetStart: vnode.targetStart,\n    targetAnchor: vnode.targetAnchor,\n    staticCount: vnode.staticCount,\n    shapeFlag: vnode.shapeFlag,\n    // if the vnode is cloned with extra props, we can no longer assume its\n    // existing patch flag to be reliable and need to add the FULL_PROPS flag.\n    // note: preserve flag for fragments since they use the flag for children\n    // fast paths only.\n    patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n    dynamicProps: vnode.dynamicProps,\n    dynamicChildren: vnode.dynamicChildren,\n    appContext: vnode.appContext,\n    dirs: vnode.dirs,\n    transition,\n    // These should technically only be non-null on mounted VNodes. However,\n    // they *should* be copied for kept-alive vnodes. So we just always copy\n    // them since them being non-null during a mount doesn't affect the logic as\n    // they will simply be overwritten.\n    component: vnode.component,\n    suspense: vnode.suspense,\n    ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n    ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n    el: vnode.el,\n    anchor: vnode.anchor,\n    ctx: vnode.ctx,\n    ce: vnode.ce\n  };\n  if (transition && cloneTransition) {\n    setTransitionHooks(\n      cloned,\n      transition.clone(cloned)\n    );\n  }\n  return cloned;\n}\nfunction deepCloneVNode(vnode) {\n  const cloned = cloneVNode(vnode);\n  if (isArray(vnode.children)) {\n    cloned.children = vnode.children.map(deepCloneVNode);\n  }\n  return cloned;\n}\nfunction createTextVNode(text = \" \", flag = 0) {\n  return createVNode(Text, null, text, flag);\n}\nfunction createStaticVNode(content, numberOfNodes) {\n  const vnode = createVNode(Static, null, content);\n  vnode.staticCount = numberOfNodes;\n  return vnode;\n}\nfunction createCommentVNode(text = \"\", asBlock = false) {\n  return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n}\nfunction normalizeVNode(child) {\n  if (child == null || typeof child === \"boolean\") {\n    return createVNode(Comment);\n  } else if (isArray(child)) {\n    return createVNode(\n      Fragment,\n      null,\n      // #3666, avoid reference pollution when reusing vnode\n      child.slice()\n    );\n  } else if (isVNode(child)) {\n    return cloneIfMounted(child);\n  } else {\n    return createVNode(Text, null, String(child));\n  }\n}\nfunction cloneIfMounted(child) {\n  return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n}\nfunction normalizeChildren(vnode, children) {\n  let type = 0;\n  const { shapeFlag } = vnode;\n  if (children == null) {\n    children = null;\n  } else if (isArray(children)) {\n    type = 16;\n  } else if (typeof children === \"object\") {\n    if (shapeFlag & (1 | 64)) {\n      const slot = children.default;\n      if (slot) {\n        slot._c && (slot._d = false);\n        normalizeChildren(vnode, slot());\n        slot._c && (slot._d = true);\n      }\n      return;\n    } else {\n      type = 32;\n      const slotFlag = children._;\n      if (!slotFlag && !isInternalObject(children)) {\n        children._ctx = currentRenderingInstance;\n      } else if (slotFlag === 3 && currentRenderingInstance) {\n        if (currentRenderingInstance.slots._ === 1) {\n          children._ = 1;\n        } else {\n          children._ = 2;\n          vnode.patchFlag |= 1024;\n        }\n      }\n    }\n  } else if (isFunction(children)) {\n    children = { default: children, _ctx: currentRenderingInstance };\n    type = 32;\n  } else {\n    children = String(children);\n    if (shapeFlag & 64) {\n      type = 16;\n      children = [createTextVNode(children)];\n    } else {\n      type = 8;\n    }\n  }\n  vnode.children = children;\n  vnode.shapeFlag |= type;\n}\nfunction mergeProps(...args) {\n  const ret = {};\n  for (let i = 0; i < args.length; i++) {\n    const toMerge = args[i];\n    for (const key in toMerge) {\n      if (key === \"class\") {\n        if (ret.class !== toMerge.class) {\n          ret.class = normalizeClass([ret.class, toMerge.class]);\n        }\n      } else if (key === \"style\") {\n        ret.style = normalizeStyle([ret.style, toMerge.style]);\n      } else if (isOn(key)) {\n        const existing = ret[key];\n        const incoming = toMerge[key];\n        if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {\n          ret[key] = existing ? [].concat(existing, incoming) : incoming;\n        }\n      } else if (key !== \"\") {\n        ret[key] = toMerge[key];\n      }\n    }\n  }\n  return ret;\n}\nfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n  callWithAsyncErrorHandling(hook, instance, 7, [\n    vnode,\n    prevVNode\n  ]);\n}\n\nconst emptyAppContext = createAppContext();\nlet uid = 0;\nfunction createComponentInstance(vnode, parent, suspense) {\n  const type = vnode.type;\n  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n  const instance = {\n    uid: uid++,\n    vnode,\n    type,\n    parent,\n    appContext,\n    root: null,\n    // to be immediately set\n    next: null,\n    subTree: null,\n    // will be set synchronously right after creation\n    effect: null,\n    update: null,\n    // will be set synchronously right after creation\n    job: null,\n    scope: new EffectScope(\n      true\n      /* detached */\n    ),\n    render: null,\n    proxy: null,\n    exposed: null,\n    exposeProxy: null,\n    withProxy: null,\n    provides: parent ? parent.provides : Object.create(appContext.provides),\n    ids: parent ? parent.ids : [\"\", 0, 0],\n    accessCache: null,\n    renderCache: [],\n    // local resolved assets\n    components: null,\n    directives: null,\n    // resolved props and emits options\n    propsOptions: normalizePropsOptions(type, appContext),\n    emitsOptions: normalizeEmitsOptions(type, appContext),\n    // emit\n    emit: null,\n    // to be set immediately\n    emitted: null,\n    // props default value\n    propsDefaults: EMPTY_OBJ,\n    // inheritAttrs\n    inheritAttrs: type.inheritAttrs,\n    // state\n    ctx: EMPTY_OBJ,\n    data: EMPTY_OBJ,\n    props: EMPTY_OBJ,\n    attrs: EMPTY_OBJ,\n    slots: EMPTY_OBJ,\n    refs: EMPTY_OBJ,\n    setupState: EMPTY_OBJ,\n    setupContext: null,\n    // suspense related\n    suspense,\n    suspenseId: suspense ? suspense.pendingId : 0,\n    asyncDep: null,\n    asyncResolved: false,\n    // lifecycle hooks\n    // not using enums here because it results in computed properties\n    isMounted: false,\n    isUnmounted: false,\n    isDeactivated: false,\n    bc: null,\n    c: null,\n    bm: null,\n    m: null,\n    bu: null,\n    u: null,\n    um: null,\n    bum: null,\n    da: null,\n    a: null,\n    rtg: null,\n    rtc: null,\n    ec: null,\n    sp: null\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    instance.ctx = createDevRenderContext(instance);\n  } else {\n    instance.ctx = { _: instance };\n  }\n  instance.root = parent ? parent.root : instance;\n  instance.emit = emit.bind(null, instance);\n  if (vnode.ce) {\n    vnode.ce(instance);\n  }\n  return instance;\n}\nlet currentInstance = null;\nconst getCurrentInstance = () => currentInstance || currentRenderingInstance;\nlet internalSetCurrentInstance;\nlet setInSSRSetupState;\n{\n  const g = getGlobalThis();\n  const registerGlobalSetter = (key, setter) => {\n    let setters;\n    if (!(setters = g[key])) setters = g[key] = [];\n    setters.push(setter);\n    return (v) => {\n      if (setters.length > 1) setters.forEach((set) => set(v));\n      else setters[0](v);\n    };\n  };\n  internalSetCurrentInstance = registerGlobalSetter(\n    `__VUE_INSTANCE_SETTERS__`,\n    (v) => currentInstance = v\n  );\n  setInSSRSetupState = registerGlobalSetter(\n    `__VUE_SSR_SETTERS__`,\n    (v) => isInSSRComponentSetup = v\n  );\n}\nconst setCurrentInstance = (instance) => {\n  const prev = currentInstance;\n  internalSetCurrentInstance(instance);\n  instance.scope.on();\n  return () => {\n    instance.scope.off();\n    internalSetCurrentInstance(prev);\n  };\n};\nconst unsetCurrentInstance = () => {\n  currentInstance && currentInstance.scope.off();\n  internalSetCurrentInstance(null);\n};\nconst isBuiltInTag = /* @__PURE__ */ makeMap(\"slot,component\");\nfunction validateComponentName(name, { isNativeTag }) {\n  if (isBuiltInTag(name) || isNativeTag(name)) {\n    warn$1(\n      \"Do not use built-in or reserved HTML elements as component id: \" + name\n    );\n  }\n}\nfunction isStatefulComponent(instance) {\n  return instance.vnode.shapeFlag & 4;\n}\nlet isInSSRComponentSetup = false;\nfunction setupComponent(instance, isSSR = false, optimized = false) {\n  isSSR && setInSSRSetupState(isSSR);\n  const { props, children } = instance.vnode;\n  const isStateful = isStatefulComponent(instance);\n  initProps(instance, props, isStateful, isSSR);\n  initSlots(instance, children, optimized);\n  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n  isSSR && setInSSRSetupState(false);\n  return setupResult;\n}\nfunction setupStatefulComponent(instance, isSSR) {\n  var _a;\n  const Component = instance.type;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    if (Component.name) {\n      validateComponentName(Component.name, instance.appContext.config);\n    }\n    if (Component.components) {\n      const names = Object.keys(Component.components);\n      for (let i = 0; i < names.length; i++) {\n        validateComponentName(names[i], instance.appContext.config);\n      }\n    }\n    if (Component.directives) {\n      const names = Object.keys(Component.directives);\n      for (let i = 0; i < names.length; i++) {\n        validateDirectiveName(names[i]);\n      }\n    }\n    if (Component.compilerOptions && isRuntimeOnly()) {\n      warn$1(\n        `\"compilerOptions\" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`\n      );\n    }\n  }\n  instance.accessCache = /* @__PURE__ */ Object.create(null);\n  instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    exposePropsOnRenderContext(instance);\n  }\n  const { setup } = Component;\n  if (setup) {\n    pauseTracking();\n    const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n    const reset = setCurrentInstance(instance);\n    const setupResult = callWithErrorHandling(\n      setup,\n      instance,\n      0,\n      [\n        !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(instance.props) : instance.props,\n        setupContext\n      ]\n    );\n    const isAsyncSetup = isPromise(setupResult);\n    resetTracking();\n    reset();\n    if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {\n      markAsyncBoundary(instance);\n    }\n    if (isAsyncSetup) {\n      setupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n      if (isSSR) {\n        return setupResult.then((resolvedResult) => {\n          handleSetupResult(instance, resolvedResult, isSSR);\n        }).catch((e) => {\n          handleError(e, instance, 0);\n        });\n      } else {\n        instance.asyncDep = setupResult;\n        if (!!(process.env.NODE_ENV !== \"production\") && !instance.suspense) {\n          const name = (_a = Component.name) != null ? _a : \"Anonymous\";\n          warn$1(\n            `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`\n          );\n        }\n      }\n    } else {\n      handleSetupResult(instance, setupResult, isSSR);\n    }\n  } else {\n    finishComponentSetup(instance, isSSR);\n  }\n}\nfunction handleSetupResult(instance, setupResult, isSSR) {\n  if (isFunction(setupResult)) {\n    if (instance.type.__ssrInlineRender) {\n      instance.ssrRender = setupResult;\n    } else {\n      instance.render = setupResult;\n    }\n  } else if (isObject(setupResult)) {\n    if (!!(process.env.NODE_ENV !== \"production\") && isVNode(setupResult)) {\n      warn$1(\n        `setup() should not return VNodes directly - return a render function instead.`\n      );\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      instance.devtoolsRawSetupState = setupResult;\n    }\n    instance.setupState = proxyRefs(setupResult);\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      exposeSetupStateOnRenderContext(instance);\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\") && setupResult !== void 0) {\n    warn$1(\n      `setup() should return an object. Received: ${setupResult === null ? \"null\" : typeof setupResult}`\n    );\n  }\n  finishComponentSetup(instance, isSSR);\n}\nlet compile;\nlet installWithProxy;\nfunction registerRuntimeCompiler(_compile) {\n  compile = _compile;\n  installWithProxy = (i) => {\n    if (i.render._rc) {\n      i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);\n    }\n  };\n}\nconst isRuntimeOnly = () => !compile;\nfunction finishComponentSetup(instance, isSSR, skipOptions) {\n  const Component = instance.type;\n  if (!instance.render) {\n    if (!isSSR && compile && !Component.render) {\n      const template = Component.template || resolveMergedOptions(instance).template;\n      if (template) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `compile`);\n        }\n        const { isCustomElement, compilerOptions } = instance.appContext.config;\n        const { delimiters, compilerOptions: componentCompilerOptions } = Component;\n        const finalCompilerOptions = extend(\n          extend(\n            {\n              isCustomElement,\n              delimiters\n            },\n            compilerOptions\n          ),\n          componentCompilerOptions\n        );\n        Component.render = compile(template, finalCompilerOptions);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `compile`);\n        }\n      }\n    }\n    instance.render = Component.render || NOOP;\n    if (installWithProxy) {\n      installWithProxy(instance);\n    }\n  }\n  if (__VUE_OPTIONS_API__ && true) {\n    const reset = setCurrentInstance(instance);\n    pauseTracking();\n    try {\n      applyOptions(instance);\n    } finally {\n      resetTracking();\n      reset();\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && !Component.render && instance.render === NOOP && !isSSR) {\n    if (!compile && Component.template) {\n      warn$1(\n        `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".` )\n      );\n    } else {\n      warn$1(`Component is missing template or render function: `, Component);\n    }\n  }\n}\nconst attrsProxyHandlers = !!(process.env.NODE_ENV !== \"production\") ? {\n  get(target, key) {\n    markAttrsAccessed();\n    track(target, \"get\", \"\");\n    return target[key];\n  },\n  set() {\n    warn$1(`setupContext.attrs is readonly.`);\n    return false;\n  },\n  deleteProperty() {\n    warn$1(`setupContext.attrs is readonly.`);\n    return false;\n  }\n} : {\n  get(target, key) {\n    track(target, \"get\", \"\");\n    return target[key];\n  }\n};\nfunction getSlotsProxy(instance) {\n  return new Proxy(instance.slots, {\n    get(target, key) {\n      track(instance, \"get\", \"$slots\");\n      return target[key];\n    }\n  });\n}\nfunction createSetupContext(instance) {\n  const expose = (exposed) => {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      if (instance.exposed) {\n        warn$1(`expose() should be called only once per setup().`);\n      }\n      if (exposed != null) {\n        let exposedType = typeof exposed;\n        if (exposedType === \"object\") {\n          if (isArray(exposed)) {\n            exposedType = \"array\";\n          } else if (isRef(exposed)) {\n            exposedType = \"ref\";\n          }\n        }\n        if (exposedType !== \"object\") {\n          warn$1(\n            `expose() should be passed a plain object, received ${exposedType}.`\n          );\n        }\n      }\n    }\n    instance.exposed = exposed || {};\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    let attrsProxy;\n    let slotsProxy;\n    return Object.freeze({\n      get attrs() {\n        return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));\n      },\n      get slots() {\n        return slotsProxy || (slotsProxy = getSlotsProxy(instance));\n      },\n      get emit() {\n        return (event, ...args) => instance.emit(event, ...args);\n      },\n      expose\n    });\n  } else {\n    return {\n      attrs: new Proxy(instance.attrs, attrsProxyHandlers),\n      slots: instance.slots,\n      emit: instance.emit,\n      expose\n    };\n  }\n}\nfunction getComponentPublicInstance(instance) {\n  if (instance.exposed) {\n    return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\n      get(target, key) {\n        if (key in target) {\n          return target[key];\n        } else if (key in publicPropertiesMap) {\n          return publicPropertiesMap[key](instance);\n        }\n      },\n      has(target, key) {\n        return key in target || key in publicPropertiesMap;\n      }\n    }));\n  } else {\n    return instance.proxy;\n  }\n}\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, \"\");\nfunction getComponentName(Component, includeInferred = true) {\n  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;\n}\nfunction formatComponentName(instance, Component, isRoot = false) {\n  let name = getComponentName(Component);\n  if (!name && Component.__file) {\n    const match = Component.__file.match(/([^/\\\\]+)\\.\\w+$/);\n    if (match) {\n      name = match[1];\n    }\n  }\n  if (!name && instance && instance.parent) {\n    const inferFromRegistry = (registry) => {\n      for (const key in registry) {\n        if (registry[key] === Component) {\n          return key;\n        }\n      }\n    };\n    name = inferFromRegistry(\n      instance.components || instance.parent.type.components\n    ) || inferFromRegistry(instance.appContext.components);\n  }\n  return name ? classify(name) : isRoot ? `App` : `Anonymous`;\n}\nfunction isClassComponent(value) {\n  return isFunction(value) && \"__vccOpts\" in value;\n}\n\nconst computed = (getterOrOptions, debugOptions) => {\n  const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const i = getCurrentInstance();\n    if (i && i.appContext.config.warnRecursiveComputed) {\n      c._warnRecursive = true;\n    }\n  }\n  return c;\n};\n\nfunction h(type, propsOrChildren, children) {\n  const l = arguments.length;\n  if (l === 2) {\n    if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {\n      if (isVNode(propsOrChildren)) {\n        return createVNode(type, null, [propsOrChildren]);\n      }\n      return createVNode(type, propsOrChildren);\n    } else {\n      return createVNode(type, null, propsOrChildren);\n    }\n  } else {\n    if (l > 3) {\n      children = Array.prototype.slice.call(arguments, 2);\n    } else if (l === 3 && isVNode(children)) {\n      children = [children];\n    }\n    return createVNode(type, propsOrChildren, children);\n  }\n}\n\nfunction initCustomFormatter() {\n  if (!!!(process.env.NODE_ENV !== \"production\") || typeof window === \"undefined\") {\n    return;\n  }\n  const vueStyle = { style: \"color:#3ba776\" };\n  const numberStyle = { style: \"color:#1677ff\" };\n  const stringStyle = { style: \"color:#f5222d\" };\n  const keywordStyle = { style: \"color:#eb2f96\" };\n  const formatter = {\n    __vue_custom_formatter: true,\n    header(obj) {\n      if (!isObject(obj)) {\n        return null;\n      }\n      if (obj.__isVue) {\n        return [\"div\", vueStyle, `VueInstance`];\n      } else if (isRef(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, genRefFlag(obj)],\n          \"<\",\n          // avoid debugger accessing value affecting behavior\n          formatValue(\"_value\" in obj ? obj._value : obj),\n          `>`\n        ];\n      } else if (isReactive(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, isShallow(obj) ? \"ShallowReactive\" : \"Reactive\"],\n          \"<\",\n          formatValue(obj),\n          `>${isReadonly(obj) ? ` (readonly)` : ``}`\n        ];\n      } else if (isReadonly(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, isShallow(obj) ? \"ShallowReadonly\" : \"Readonly\"],\n          \"<\",\n          formatValue(obj),\n          \">\"\n        ];\n      }\n      return null;\n    },\n    hasBody(obj) {\n      return obj && obj.__isVue;\n    },\n    body(obj) {\n      if (obj && obj.__isVue) {\n        return [\n          \"div\",\n          {},\n          ...formatInstance(obj.$)\n        ];\n      }\n    }\n  };\n  function formatInstance(instance) {\n    const blocks = [];\n    if (instance.type.props && instance.props) {\n      blocks.push(createInstanceBlock(\"props\", toRaw(instance.props)));\n    }\n    if (instance.setupState !== EMPTY_OBJ) {\n      blocks.push(createInstanceBlock(\"setup\", instance.setupState));\n    }\n    if (instance.data !== EMPTY_OBJ) {\n      blocks.push(createInstanceBlock(\"data\", toRaw(instance.data)));\n    }\n    const computed = extractKeys(instance, \"computed\");\n    if (computed) {\n      blocks.push(createInstanceBlock(\"computed\", computed));\n    }\n    const injected = extractKeys(instance, \"inject\");\n    if (injected) {\n      blocks.push(createInstanceBlock(\"injected\", injected));\n    }\n    blocks.push([\n      \"div\",\n      {},\n      [\n        \"span\",\n        {\n          style: keywordStyle.style + \";opacity:0.66\"\n        },\n        \"$ (internal): \"\n      ],\n      [\"object\", { object: instance }]\n    ]);\n    return blocks;\n  }\n  function createInstanceBlock(type, target) {\n    target = extend({}, target);\n    if (!Object.keys(target).length) {\n      return [\"span\", {}];\n    }\n    return [\n      \"div\",\n      { style: \"line-height:1.25em;margin-bottom:0.6em\" },\n      [\n        \"div\",\n        {\n          style: \"color:#476582\"\n        },\n        type\n      ],\n      [\n        \"div\",\n        {\n          style: \"padding-left:1.25em\"\n        },\n        ...Object.keys(target).map((key) => {\n          return [\n            \"div\",\n            {},\n            [\"span\", keywordStyle, key + \": \"],\n            formatValue(target[key], false)\n          ];\n        })\n      ]\n    ];\n  }\n  function formatValue(v, asRaw = true) {\n    if (typeof v === \"number\") {\n      return [\"span\", numberStyle, v];\n    } else if (typeof v === \"string\") {\n      return [\"span\", stringStyle, JSON.stringify(v)];\n    } else if (typeof v === \"boolean\") {\n      return [\"span\", keywordStyle, v];\n    } else if (isObject(v)) {\n      return [\"object\", { object: asRaw ? toRaw(v) : v }];\n    } else {\n      return [\"span\", stringStyle, String(v)];\n    }\n  }\n  function extractKeys(instance, type) {\n    const Comp = instance.type;\n    if (isFunction(Comp)) {\n      return;\n    }\n    const extracted = {};\n    for (const key in instance.ctx) {\n      if (isKeyOfType(Comp, key, type)) {\n        extracted[key] = instance.ctx[key];\n      }\n    }\n    return extracted;\n  }\n  function isKeyOfType(Comp, key, type) {\n    const opts = Comp[type];\n    if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {\n      return true;\n    }\n    if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {\n      return true;\n    }\n    if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {\n      return true;\n    }\n  }\n  function genRefFlag(v) {\n    if (isShallow(v)) {\n      return `ShallowRef`;\n    }\n    if (v.effect) {\n      return `ComputedRef`;\n    }\n    return `Ref`;\n  }\n  if (window.devtoolsFormatters) {\n    window.devtoolsFormatters.push(formatter);\n  } else {\n    window.devtoolsFormatters = [formatter];\n  }\n}\n\nfunction withMemo(memo, render, cache, index) {\n  const cached = cache[index];\n  if (cached && isMemoSame(cached, memo)) {\n    return cached;\n  }\n  const ret = render();\n  ret.memo = memo.slice();\n  ret.cacheIndex = index;\n  return cache[index] = ret;\n}\nfunction isMemoSame(cached, memo) {\n  const prev = cached.memo;\n  if (prev.length != memo.length) {\n    return false;\n  }\n  for (let i = 0; i < prev.length; i++) {\n    if (hasChanged(prev[i], memo[i])) {\n      return false;\n    }\n  }\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(cached);\n  }\n  return true;\n}\n\nconst version = \"3.5.12\";\nconst warn = !!(process.env.NODE_ENV !== \"production\") ? warn$1 : NOOP;\nconst ErrorTypeStrings = ErrorTypeStrings$1 ;\nconst devtools = !!(process.env.NODE_ENV !== \"production\") || true ? devtools$1 : void 0;\nconst setDevtoolsHook = !!(process.env.NODE_ENV !== \"production\") || true ? setDevtoolsHook$1 : NOOP;\nconst _ssrUtils = {\n  createComponentInstance,\n  setupComponent,\n  renderComponentRoot,\n  setCurrentRenderingInstance,\n  isVNode: isVNode,\n  normalizeVNode,\n  getComponentPublicInstance,\n  ensureValidVNode,\n  pushWarningContext,\n  popWarningContext\n};\nconst ssrUtils = _ssrUtils ;\nconst resolveFilter = null;\nconst compatUtils = null;\nconst DeprecationTypes = null;\n\nexport { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };\n","/**\n* @vue/runtime-dom v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';\nexport * from '@vue/runtime-core';\nimport { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, isPlainObject, hasOwn, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';\n\nlet policy = void 0;\nconst tt = typeof window !== \"undefined\" && window.trustedTypes;\nif (tt) {\n  try {\n    policy = /* @__PURE__ */ tt.createPolicy(\"vue\", {\n      createHTML: (val) => val\n    });\n  } catch (e) {\n    !!(process.env.NODE_ENV !== \"production\") && warn(`Error creating trusted types policy: ${e}`);\n  }\n}\nconst unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;\nconst svgNS = \"http://www.w3.org/2000/svg\";\nconst mathmlNS = \"http://www.w3.org/1998/Math/MathML\";\nconst doc = typeof document !== \"undefined\" ? document : null;\nconst templateContainer = doc && /* @__PURE__ */ doc.createElement(\"template\");\nconst nodeOps = {\n  insert: (child, parent, anchor) => {\n    parent.insertBefore(child, anchor || null);\n  },\n  remove: (child) => {\n    const parent = child.parentNode;\n    if (parent) {\n      parent.removeChild(child);\n    }\n  },\n  createElement: (tag, namespace, is, props) => {\n    const el = namespace === \"svg\" ? doc.createElementNS(svgNS, tag) : namespace === \"mathml\" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);\n    if (tag === \"select\" && props && props.multiple != null) {\n      el.setAttribute(\"multiple\", props.multiple);\n    }\n    return el;\n  },\n  createText: (text) => doc.createTextNode(text),\n  createComment: (text) => doc.createComment(text),\n  setText: (node, text) => {\n    node.nodeValue = text;\n  },\n  setElementText: (el, text) => {\n    el.textContent = text;\n  },\n  parentNode: (node) => node.parentNode,\n  nextSibling: (node) => node.nextSibling,\n  querySelector: (selector) => doc.querySelector(selector),\n  setScopeId(el, id) {\n    el.setAttribute(id, \"\");\n  },\n  // __UNSAFE__\n  // Reason: innerHTML.\n  // Static content here can only come from compiled templates.\n  // As long as the user only uses trusted templates, this is safe.\n  insertStaticContent(content, parent, anchor, namespace, start, end) {\n    const before = anchor ? anchor.previousSibling : parent.lastChild;\n    if (start && (start === end || start.nextSibling)) {\n      while (true) {\n        parent.insertBefore(start.cloneNode(true), anchor);\n        if (start === end || !(start = start.nextSibling)) break;\n      }\n    } else {\n      templateContainer.innerHTML = unsafeToTrustedHTML(\n        namespace === \"svg\" ? `<svg>${content}</svg>` : namespace === \"mathml\" ? `<math>${content}</math>` : content\n      );\n      const template = templateContainer.content;\n      if (namespace === \"svg\" || namespace === \"mathml\") {\n        const wrapper = template.firstChild;\n        while (wrapper.firstChild) {\n          template.appendChild(wrapper.firstChild);\n        }\n        template.removeChild(wrapper);\n      }\n      parent.insertBefore(template, anchor);\n    }\n    return [\n      // first\n      before ? before.nextSibling : parent.firstChild,\n      // last\n      anchor ? anchor.previousSibling : parent.lastChild\n    ];\n  }\n};\n\nconst TRANSITION = \"transition\";\nconst ANIMATION = \"animation\";\nconst vtcKey = Symbol(\"_vtc\");\nconst DOMTransitionPropsValidators = {\n  name: String,\n  type: String,\n  css: {\n    type: Boolean,\n    default: true\n  },\n  duration: [String, Number, Object],\n  enterFromClass: String,\n  enterActiveClass: String,\n  enterToClass: String,\n  appearFromClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  leaveFromClass: String,\n  leaveActiveClass: String,\n  leaveToClass: String\n};\nconst TransitionPropsValidators = /* @__PURE__ */ extend(\n  {},\n  BaseTransitionPropsValidators,\n  DOMTransitionPropsValidators\n);\nconst decorate$1 = (t) => {\n  t.displayName = \"Transition\";\n  t.props = TransitionPropsValidators;\n  return t;\n};\nconst Transition = /* @__PURE__ */ decorate$1(\n  (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)\n);\nconst callHook = (hook, args = []) => {\n  if (isArray(hook)) {\n    hook.forEach((h2) => h2(...args));\n  } else if (hook) {\n    hook(...args);\n  }\n};\nconst hasExplicitCallback = (hook) => {\n  return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;\n};\nfunction resolveTransitionProps(rawProps) {\n  const baseProps = {};\n  for (const key in rawProps) {\n    if (!(key in DOMTransitionPropsValidators)) {\n      baseProps[key] = rawProps[key];\n    }\n  }\n  if (rawProps.css === false) {\n    return baseProps;\n  }\n  const {\n    name = \"v\",\n    type,\n    duration,\n    enterFromClass = `${name}-enter-from`,\n    enterActiveClass = `${name}-enter-active`,\n    enterToClass = `${name}-enter-to`,\n    appearFromClass = enterFromClass,\n    appearActiveClass = enterActiveClass,\n    appearToClass = enterToClass,\n    leaveFromClass = `${name}-leave-from`,\n    leaveActiveClass = `${name}-leave-active`,\n    leaveToClass = `${name}-leave-to`\n  } = rawProps;\n  const durations = normalizeDuration(duration);\n  const enterDuration = durations && durations[0];\n  const leaveDuration = durations && durations[1];\n  const {\n    onBeforeEnter,\n    onEnter,\n    onEnterCancelled,\n    onLeave,\n    onLeaveCancelled,\n    onBeforeAppear = onBeforeEnter,\n    onAppear = onEnter,\n    onAppearCancelled = onEnterCancelled\n  } = baseProps;\n  const finishEnter = (el, isAppear, done) => {\n    removeTransitionClass(el, isAppear ? appearToClass : enterToClass);\n    removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);\n    done && done();\n  };\n  const finishLeave = (el, done) => {\n    el._isLeaving = false;\n    removeTransitionClass(el, leaveFromClass);\n    removeTransitionClass(el, leaveToClass);\n    removeTransitionClass(el, leaveActiveClass);\n    done && done();\n  };\n  const makeEnterHook = (isAppear) => {\n    return (el, done) => {\n      const hook = isAppear ? onAppear : onEnter;\n      const resolve = () => finishEnter(el, isAppear, done);\n      callHook(hook, [el, resolve]);\n      nextFrame(() => {\n        removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);\n        addTransitionClass(el, isAppear ? appearToClass : enterToClass);\n        if (!hasExplicitCallback(hook)) {\n          whenTransitionEnds(el, type, enterDuration, resolve);\n        }\n      });\n    };\n  };\n  return extend(baseProps, {\n    onBeforeEnter(el) {\n      callHook(onBeforeEnter, [el]);\n      addTransitionClass(el, enterFromClass);\n      addTransitionClass(el, enterActiveClass);\n    },\n    onBeforeAppear(el) {\n      callHook(onBeforeAppear, [el]);\n      addTransitionClass(el, appearFromClass);\n      addTransitionClass(el, appearActiveClass);\n    },\n    onEnter: makeEnterHook(false),\n    onAppear: makeEnterHook(true),\n    onLeave(el, done) {\n      el._isLeaving = true;\n      const resolve = () => finishLeave(el, done);\n      addTransitionClass(el, leaveFromClass);\n      addTransitionClass(el, leaveActiveClass);\n      forceReflow();\n      nextFrame(() => {\n        if (!el._isLeaving) {\n          return;\n        }\n        removeTransitionClass(el, leaveFromClass);\n        addTransitionClass(el, leaveToClass);\n        if (!hasExplicitCallback(onLeave)) {\n          whenTransitionEnds(el, type, leaveDuration, resolve);\n        }\n      });\n      callHook(onLeave, [el, resolve]);\n    },\n    onEnterCancelled(el) {\n      finishEnter(el, false);\n      callHook(onEnterCancelled, [el]);\n    },\n    onAppearCancelled(el) {\n      finishEnter(el, true);\n      callHook(onAppearCancelled, [el]);\n    },\n    onLeaveCancelled(el) {\n      finishLeave(el);\n      callHook(onLeaveCancelled, [el]);\n    }\n  });\n}\nfunction normalizeDuration(duration) {\n  if (duration == null) {\n    return null;\n  } else if (isObject(duration)) {\n    return [NumberOf(duration.enter), NumberOf(duration.leave)];\n  } else {\n    const n = NumberOf(duration);\n    return [n, n];\n  }\n}\nfunction NumberOf(val) {\n  const res = toNumber(val);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    assertNumber(res, \"<transition> explicit duration\");\n  }\n  return res;\n}\nfunction addTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.add(c));\n  (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);\n}\nfunction removeTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.remove(c));\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.delete(cls);\n    if (!_vtc.size) {\n      el[vtcKey] = void 0;\n    }\n  }\n}\nfunction nextFrame(cb) {\n  requestAnimationFrame(() => {\n    requestAnimationFrame(cb);\n  });\n}\nlet endId = 0;\nfunction whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {\n  const id = el._endId = ++endId;\n  const resolveIfNotStale = () => {\n    if (id === el._endId) {\n      resolve();\n    }\n  };\n  if (explicitTimeout != null) {\n    return setTimeout(resolveIfNotStale, explicitTimeout);\n  }\n  const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n  if (!type) {\n    return resolve();\n  }\n  const endEvent = type + \"end\";\n  let ended = 0;\n  const end = () => {\n    el.removeEventListener(endEvent, onEnd);\n    resolveIfNotStale();\n  };\n  const onEnd = (e) => {\n    if (e.target === el && ++ended >= propCount) {\n      end();\n    }\n  };\n  setTimeout(() => {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(endEvent, onEnd);\n}\nfunction getTransitionInfo(el, expectedType) {\n  const styles = window.getComputedStyle(el);\n  const getStyleProperties = (key) => (styles[key] || \"\").split(\", \");\n  const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);\n  const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);\n  const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  const animationDelays = getStyleProperties(`${ANIMATION}Delay`);\n  const animationDurations = getStyleProperties(`${ANIMATION}Duration`);\n  const animationTimeout = getTimeout(animationDelays, animationDurations);\n  let type = null;\n  let timeout = 0;\n  let propCount = 0;\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;\n    propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;\n  }\n  const hasTransform = type === TRANSITION && /\\b(transform|all)(,|$)/.test(\n    getStyleProperties(`${TRANSITION}Property`).toString()\n  );\n  return {\n    type,\n    timeout,\n    propCount,\n    hasTransform\n  };\n}\nfunction getTimeout(delays, durations) {\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n  return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));\n}\nfunction toMs(s) {\n  if (s === \"auto\") return 0;\n  return Number(s.slice(0, -1).replace(\",\", \".\")) * 1e3;\n}\nfunction forceReflow() {\n  return document.body.offsetHeight;\n}\n\nfunction patchClass(el, value, isSVG) {\n  const transitionClasses = el[vtcKey];\n  if (transitionClasses) {\n    value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(\" \");\n  }\n  if (value == null) {\n    el.removeAttribute(\"class\");\n  } else if (isSVG) {\n    el.setAttribute(\"class\", value);\n  } else {\n    el.className = value;\n  }\n}\n\nconst vShowOriginalDisplay = Symbol(\"_vod\");\nconst vShowHidden = Symbol(\"_vsh\");\nconst vShow = {\n  beforeMount(el, { value }, { transition }) {\n    el[vShowOriginalDisplay] = el.style.display === \"none\" ? \"\" : el.style.display;\n    if (transition && value) {\n      transition.beforeEnter(el);\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  mounted(el, { value }, { transition }) {\n    if (transition && value) {\n      transition.enter(el);\n    }\n  },\n  updated(el, { value, oldValue }, { transition }) {\n    if (!value === !oldValue) return;\n    if (transition) {\n      if (value) {\n        transition.beforeEnter(el);\n        setDisplay(el, true);\n        transition.enter(el);\n      } else {\n        transition.leave(el, () => {\n          setDisplay(el, false);\n        });\n      }\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  beforeUnmount(el, { value }) {\n    setDisplay(el, value);\n  }\n};\nif (!!(process.env.NODE_ENV !== \"production\")) {\n  vShow.name = \"show\";\n}\nfunction setDisplay(el, value) {\n  el.style.display = value ? el[vShowOriginalDisplay] : \"none\";\n  el[vShowHidden] = !value;\n}\nfunction initVShowForSSR() {\n  vShow.getSSRProps = ({ value }) => {\n    if (!value) {\n      return { style: { display: \"none\" } };\n    }\n  };\n}\n\nconst CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"CSS_VAR_TEXT\" : \"\");\nfunction useCssVars(getter) {\n  const instance = getCurrentInstance();\n  if (!instance) {\n    !!(process.env.NODE_ENV !== \"production\") && warn(`useCssVars is called without current active component instance.`);\n    return;\n  }\n  const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {\n    Array.from(\n      document.querySelectorAll(`[data-v-owner=\"${instance.uid}\"]`)\n    ).forEach((node) => setVarsOnNode(node, vars));\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    instance.getCssVars = () => getter(instance.proxy);\n  }\n  const setVars = () => {\n    const vars = getter(instance.proxy);\n    if (instance.ce) {\n      setVarsOnNode(instance.ce, vars);\n    } else {\n      setVarsOnVNode(instance.subTree, vars);\n    }\n    updateTeleports(vars);\n  };\n  onBeforeMount(() => {\n    watchPostEffect(setVars);\n  });\n  onMounted(() => {\n    const ob = new MutationObserver(setVars);\n    ob.observe(instance.subTree.el.parentNode, { childList: true });\n    onUnmounted(() => ob.disconnect());\n  });\n}\nfunction setVarsOnVNode(vnode, vars) {\n  if (vnode.shapeFlag & 128) {\n    const suspense = vnode.suspense;\n    vnode = suspense.activeBranch;\n    if (suspense.pendingBranch && !suspense.isHydrating) {\n      suspense.effects.push(() => {\n        setVarsOnVNode(suspense.activeBranch, vars);\n      });\n    }\n  }\n  while (vnode.component) {\n    vnode = vnode.component.subTree;\n  }\n  if (vnode.shapeFlag & 1 && vnode.el) {\n    setVarsOnNode(vnode.el, vars);\n  } else if (vnode.type === Fragment) {\n    vnode.children.forEach((c) => setVarsOnVNode(c, vars));\n  } else if (vnode.type === Static) {\n    let { el, anchor } = vnode;\n    while (el) {\n      setVarsOnNode(el, vars);\n      if (el === anchor) break;\n      el = el.nextSibling;\n    }\n  }\n}\nfunction setVarsOnNode(el, vars) {\n  if (el.nodeType === 1) {\n    const style = el.style;\n    let cssText = \"\";\n    for (const key in vars) {\n      style.setProperty(`--${key}`, vars[key]);\n      cssText += `--${key}: ${vars[key]};`;\n    }\n    style[CSS_VAR_TEXT] = cssText;\n  }\n}\n\nconst displayRE = /(^|;)\\s*display\\s*:/;\nfunction patchStyle(el, prev, next) {\n  const style = el.style;\n  const isCssString = isString(next);\n  let hasControlledDisplay = false;\n  if (next && !isCssString) {\n    if (prev) {\n      if (!isString(prev)) {\n        for (const key in prev) {\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      } else {\n        for (const prevStyle of prev.split(\";\")) {\n          const key = prevStyle.slice(0, prevStyle.indexOf(\":\")).trim();\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      }\n    }\n    for (const key in next) {\n      if (key === \"display\") {\n        hasControlledDisplay = true;\n      }\n      setStyle(style, key, next[key]);\n    }\n  } else {\n    if (isCssString) {\n      if (prev !== next) {\n        const cssVarText = style[CSS_VAR_TEXT];\n        if (cssVarText) {\n          next += \";\" + cssVarText;\n        }\n        style.cssText = next;\n        hasControlledDisplay = displayRE.test(next);\n      }\n    } else if (prev) {\n      el.removeAttribute(\"style\");\n    }\n  }\n  if (vShowOriginalDisplay in el) {\n    el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : \"\";\n    if (el[vShowHidden]) {\n      style.display = \"none\";\n    }\n  }\n}\nconst semicolonRE = /[^\\\\];\\s*$/;\nconst importantRE = /\\s*!important$/;\nfunction setStyle(style, name, val) {\n  if (isArray(val)) {\n    val.forEach((v) => setStyle(style, name, v));\n  } else {\n    if (val == null) val = \"\";\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      if (semicolonRE.test(val)) {\n        warn(\n          `Unexpected semicolon at the end of '${name}' style value: '${val}'`\n        );\n      }\n    }\n    if (name.startsWith(\"--\")) {\n      style.setProperty(name, val);\n    } else {\n      const prefixed = autoPrefix(style, name);\n      if (importantRE.test(val)) {\n        style.setProperty(\n          hyphenate(prefixed),\n          val.replace(importantRE, \"\"),\n          \"important\"\n        );\n      } else {\n        style[prefixed] = val;\n      }\n    }\n  }\n}\nconst prefixes = [\"Webkit\", \"Moz\", \"ms\"];\nconst prefixCache = {};\nfunction autoPrefix(style, rawName) {\n  const cached = prefixCache[rawName];\n  if (cached) {\n    return cached;\n  }\n  let name = camelize(rawName);\n  if (name !== \"filter\" && name in style) {\n    return prefixCache[rawName] = name;\n  }\n  name = capitalize(name);\n  for (let i = 0; i < prefixes.length; i++) {\n    const prefixed = prefixes[i] + name;\n    if (prefixed in style) {\n      return prefixCache[rawName] = prefixed;\n    }\n  }\n  return rawName;\n}\n\nconst xlinkNS = \"http://www.w3.org/1999/xlink\";\nfunction patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {\n  if (isSVG && key.startsWith(\"xlink:\")) {\n    if (value == null) {\n      el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (value == null || isBoolean && !includeBooleanAttr(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(\n        key,\n        isBoolean ? \"\" : isSymbol(value) ? String(value) : value\n      );\n    }\n  }\n}\n\nfunction patchDOMProp(el, key, value, parentComponent, attrName) {\n  if (key === \"innerHTML\" || key === \"textContent\") {\n    if (value != null) {\n      el[key] = key === \"innerHTML\" ? unsafeToTrustedHTML(value) : value;\n    }\n    return;\n  }\n  const tag = el.tagName;\n  if (key === \"value\" && tag !== \"PROGRESS\" && // custom elements may use _value internally\n  !tag.includes(\"-\")) {\n    const oldValue = tag === \"OPTION\" ? el.getAttribute(\"value\") || \"\" : el.value;\n    const newValue = value == null ? (\n      // #11647: value should be set as empty string for null and undefined,\n      // but <input type=\"checkbox\"> should be set as 'on'.\n      el.type === \"checkbox\" ? \"on\" : \"\"\n    ) : String(value);\n    if (oldValue !== newValue || !(\"_value\" in el)) {\n      el.value = newValue;\n    }\n    if (value == null) {\n      el.removeAttribute(key);\n    }\n    el._value = value;\n    return;\n  }\n  let needRemove = false;\n  if (value === \"\" || value == null) {\n    const type = typeof el[key];\n    if (type === \"boolean\") {\n      value = includeBooleanAttr(value);\n    } else if (value == null && type === \"string\") {\n      value = \"\";\n      needRemove = true;\n    } else if (type === \"number\") {\n      value = 0;\n      needRemove = true;\n    }\n  }\n  try {\n    el[key] = value;\n  } catch (e) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !needRemove) {\n      warn(\n        `Failed setting prop \"${key}\" on <${tag.toLowerCase()}>: value ${value} is invalid.`,\n        e\n      );\n    }\n  }\n  needRemove && el.removeAttribute(attrName || key);\n}\n\nfunction addEventListener(el, event, handler, options) {\n  el.addEventListener(event, handler, options);\n}\nfunction removeEventListener(el, event, handler, options) {\n  el.removeEventListener(event, handler, options);\n}\nconst veiKey = Symbol(\"_vei\");\nfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\n  const invokers = el[veiKey] || (el[veiKey] = {});\n  const existingInvoker = invokers[rawName];\n  if (nextValue && existingInvoker) {\n    existingInvoker.value = !!(process.env.NODE_ENV !== \"production\") ? sanitizeEventValue(nextValue, rawName) : nextValue;\n  } else {\n    const [name, options] = parseName(rawName);\n    if (nextValue) {\n      const invoker = invokers[rawName] = createInvoker(\n        !!(process.env.NODE_ENV !== \"production\") ? sanitizeEventValue(nextValue, rawName) : nextValue,\n        instance\n      );\n      addEventListener(el, name, invoker, options);\n    } else if (existingInvoker) {\n      removeEventListener(el, name, existingInvoker, options);\n      invokers[rawName] = void 0;\n    }\n  }\n}\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\nfunction parseName(name) {\n  let options;\n  if (optionsModifierRE.test(name)) {\n    options = {};\n    let m;\n    while (m = name.match(optionsModifierRE)) {\n      name = name.slice(0, name.length - m[0].length);\n      options[m[0].toLowerCase()] = true;\n    }\n  }\n  const event = name[2] === \":\" ? name.slice(3) : hyphenate(name.slice(2));\n  return [event, options];\n}\nlet cachedNow = 0;\nconst p = /* @__PURE__ */ Promise.resolve();\nconst getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());\nfunction createInvoker(initialValue, instance) {\n  const invoker = (e) => {\n    if (!e._vts) {\n      e._vts = Date.now();\n    } else if (e._vts <= invoker.attached) {\n      return;\n    }\n    callWithAsyncErrorHandling(\n      patchStopImmediatePropagation(e, invoker.value),\n      instance,\n      5,\n      [e]\n    );\n  };\n  invoker.value = initialValue;\n  invoker.attached = getNow();\n  return invoker;\n}\nfunction sanitizeEventValue(value, propName) {\n  if (isFunction(value) || isArray(value)) {\n    return value;\n  }\n  warn(\n    `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`\n  );\n  return NOOP;\n}\nfunction patchStopImmediatePropagation(e, value) {\n  if (isArray(value)) {\n    const originalStop = e.stopImmediatePropagation;\n    e.stopImmediatePropagation = () => {\n      originalStop.call(e);\n      e._stopped = true;\n    };\n    return value.map(\n      (fn) => (e2) => !e2._stopped && fn && fn(e2)\n    );\n  } else {\n    return value;\n  }\n}\n\nconst isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter\nkey.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;\nconst patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {\n  const isSVG = namespace === \"svg\";\n  if (key === \"class\") {\n    patchClass(el, nextValue, isSVG);\n  } else if (key === \"style\") {\n    patchStyle(el, prevValue, nextValue);\n  } else if (isOn(key)) {\n    if (!isModelListener(key)) {\n      patchEvent(el, key, prevValue, nextValue, parentComponent);\n    }\n  } else if (key[0] === \".\" ? (key = key.slice(1), true) : key[0] === \"^\" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {\n    patchDOMProp(el, key, nextValue);\n    if (!el.tagName.includes(\"-\") && (key === \"value\" || key === \"checked\" || key === \"selected\")) {\n      patchAttr(el, key, nextValue, isSVG, parentComponent, key !== \"value\");\n    }\n  } else if (\n    // #11081 force set props for possible async custom element\n    el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))\n  ) {\n    patchDOMProp(el, camelize$1(key), nextValue, parentComponent, key);\n  } else {\n    if (key === \"true-value\") {\n      el._trueValue = nextValue;\n    } else if (key === \"false-value\") {\n      el._falseValue = nextValue;\n    }\n    patchAttr(el, key, nextValue, isSVG);\n  }\n};\nfunction shouldSetAsProp(el, key, value, isSVG) {\n  if (isSVG) {\n    if (key === \"innerHTML\" || key === \"textContent\") {\n      return true;\n    }\n    if (key in el && isNativeOn(key) && isFunction(value)) {\n      return true;\n    }\n    return false;\n  }\n  if (key === \"spellcheck\" || key === \"draggable\" || key === \"translate\") {\n    return false;\n  }\n  if (key === \"form\") {\n    return false;\n  }\n  if (key === \"list\" && el.tagName === \"INPUT\") {\n    return false;\n  }\n  if (key === \"type\" && el.tagName === \"TEXTAREA\") {\n    return false;\n  }\n  if (key === \"width\" || key === \"height\") {\n    const tag = el.tagName;\n    if (tag === \"IMG\" || tag === \"VIDEO\" || tag === \"CANVAS\" || tag === \"SOURCE\") {\n      return false;\n    }\n  }\n  if (isNativeOn(key) && isString(value)) {\n    return false;\n  }\n  return key in el;\n}\n\nconst REMOVAL = {};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineCustomElement(options, extraOptions, _createApp) {\n  const Comp = defineComponent(options, extraOptions);\n  if (isPlainObject(Comp)) extend(Comp, extraOptions);\n  class VueCustomElement extends VueElement {\n    constructor(initialProps) {\n      super(Comp, initialProps, _createApp);\n    }\n  }\n  VueCustomElement.def = Comp;\n  return VueCustomElement;\n}\n/*! #__NO_SIDE_EFFECTS__ */\nconst defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {\n  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);\n};\nconst BaseClass = typeof HTMLElement !== \"undefined\" ? HTMLElement : class {\n};\nclass VueElement extends BaseClass {\n  constructor(_def, _props = {}, _createApp = createApp) {\n    super();\n    this._def = _def;\n    this._props = _props;\n    this._createApp = _createApp;\n    this._isVueCE = true;\n    /**\n     * @internal\n     */\n    this._instance = null;\n    /**\n     * @internal\n     */\n    this._app = null;\n    /**\n     * @internal\n     */\n    this._nonce = this._def.nonce;\n    this._connected = false;\n    this._resolved = false;\n    this._numberProps = null;\n    this._styleChildren = /* @__PURE__ */ new WeakSet();\n    this._ob = null;\n    if (this.shadowRoot && _createApp !== createApp) {\n      this._root = this.shadowRoot;\n    } else {\n      if (!!(process.env.NODE_ENV !== \"production\") && this.shadowRoot) {\n        warn(\n          `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \\`defineSSRCustomElement\\`.`\n        );\n      }\n      if (_def.shadowRoot !== false) {\n        this.attachShadow({ mode: \"open\" });\n        this._root = this.shadowRoot;\n      } else {\n        this._root = this;\n      }\n    }\n    if (!this._def.__asyncLoader) {\n      this._resolveProps(this._def);\n    }\n  }\n  connectedCallback() {\n    if (!this.isConnected) return;\n    if (!this.shadowRoot) {\n      this._parseSlots();\n    }\n    this._connected = true;\n    let parent = this;\n    while (parent = parent && (parent.parentNode || parent.host)) {\n      if (parent instanceof VueElement) {\n        this._parent = parent;\n        break;\n      }\n    }\n    if (!this._instance) {\n      if (this._resolved) {\n        this._setParent();\n        this._update();\n      } else {\n        if (parent && parent._pendingResolve) {\n          this._pendingResolve = parent._pendingResolve.then(() => {\n            this._pendingResolve = void 0;\n            this._resolveDef();\n          });\n        } else {\n          this._resolveDef();\n        }\n      }\n    }\n  }\n  _setParent(parent = this._parent) {\n    if (parent) {\n      this._instance.parent = parent._instance;\n      this._instance.provides = parent._instance.provides;\n    }\n  }\n  disconnectedCallback() {\n    this._connected = false;\n    nextTick(() => {\n      if (!this._connected) {\n        if (this._ob) {\n          this._ob.disconnect();\n          this._ob = null;\n        }\n        this._app && this._app.unmount();\n        if (this._instance) this._instance.ce = void 0;\n        this._app = this._instance = null;\n      }\n    });\n  }\n  /**\n   * resolve inner component definition (handle possible async component)\n   */\n  _resolveDef() {\n    if (this._pendingResolve) {\n      return;\n    }\n    for (let i = 0; i < this.attributes.length; i++) {\n      this._setAttr(this.attributes[i].name);\n    }\n    this._ob = new MutationObserver((mutations) => {\n      for (const m of mutations) {\n        this._setAttr(m.attributeName);\n      }\n    });\n    this._ob.observe(this, { attributes: true });\n    const resolve = (def, isAsync = false) => {\n      this._resolved = true;\n      this._pendingResolve = void 0;\n      const { props, styles } = def;\n      let numberProps;\n      if (props && !isArray(props)) {\n        for (const key in props) {\n          const opt = props[key];\n          if (opt === Number || opt && opt.type === Number) {\n            if (key in this._props) {\n              this._props[key] = toNumber(this._props[key]);\n            }\n            (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true;\n          }\n        }\n      }\n      this._numberProps = numberProps;\n      if (isAsync) {\n        this._resolveProps(def);\n      }\n      if (this.shadowRoot) {\n        this._applyStyles(styles);\n      } else if (!!(process.env.NODE_ENV !== \"production\") && styles) {\n        warn(\n          \"Custom element style injection is not supported when using shadowRoot: false\"\n        );\n      }\n      this._mount(def);\n    };\n    const asyncDef = this._def.__asyncLoader;\n    if (asyncDef) {\n      this._pendingResolve = asyncDef().then(\n        (def) => resolve(this._def = def, true)\n      );\n    } else {\n      resolve(this._def);\n    }\n  }\n  _mount(def) {\n    if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) && !def.name) {\n      def.name = \"VueElement\";\n    }\n    this._app = this._createApp(def);\n    if (def.configureApp) {\n      def.configureApp(this._app);\n    }\n    this._app._ceVNode = this._createVNode();\n    this._app.mount(this._root);\n    const exposed = this._instance && this._instance.exposed;\n    if (!exposed) return;\n    for (const key in exposed) {\n      if (!hasOwn(this, key)) {\n        Object.defineProperty(this, key, {\n          // unwrap ref to be consistent with public instance behavior\n          get: () => unref(exposed[key])\n        });\n      } else if (!!(process.env.NODE_ENV !== \"production\")) {\n        warn(`Exposed property \"${key}\" already exists on custom element.`);\n      }\n    }\n  }\n  _resolveProps(def) {\n    const { props } = def;\n    const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});\n    for (const key of Object.keys(this)) {\n      if (key[0] !== \"_\" && declaredPropKeys.includes(key)) {\n        this._setProp(key, this[key]);\n      }\n    }\n    for (const key of declaredPropKeys.map(camelize$1)) {\n      Object.defineProperty(this, key, {\n        get() {\n          return this._getProp(key);\n        },\n        set(val) {\n          this._setProp(key, val, true, true);\n        }\n      });\n    }\n  }\n  _setAttr(key) {\n    if (key.startsWith(\"data-v-\")) return;\n    const has = this.hasAttribute(key);\n    let value = has ? this.getAttribute(key) : REMOVAL;\n    const camelKey = camelize$1(key);\n    if (has && this._numberProps && this._numberProps[camelKey]) {\n      value = toNumber(value);\n    }\n    this._setProp(camelKey, value, false, true);\n  }\n  /**\n   * @internal\n   */\n  _getProp(key) {\n    return this._props[key];\n  }\n  /**\n   * @internal\n   */\n  _setProp(key, val, shouldReflect = true, shouldUpdate = false) {\n    if (val !== this._props[key]) {\n      if (val === REMOVAL) {\n        delete this._props[key];\n      } else {\n        this._props[key] = val;\n        if (key === \"key\" && this._app) {\n          this._app._ceVNode.key = val;\n        }\n      }\n      if (shouldUpdate && this._instance) {\n        this._update();\n      }\n      if (shouldReflect) {\n        if (val === true) {\n          this.setAttribute(hyphenate(key), \"\");\n        } else if (typeof val === \"string\" || typeof val === \"number\") {\n          this.setAttribute(hyphenate(key), val + \"\");\n        } else if (!val) {\n          this.removeAttribute(hyphenate(key));\n        }\n      }\n    }\n  }\n  _update() {\n    render(this._createVNode(), this._root);\n  }\n  _createVNode() {\n    const baseProps = {};\n    if (!this.shadowRoot) {\n      baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);\n    }\n    const vnode = createVNode(this._def, extend(baseProps, this._props));\n    if (!this._instance) {\n      vnode.ce = (instance) => {\n        this._instance = instance;\n        instance.ce = this;\n        instance.isCE = true;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          instance.ceReload = (newStyles) => {\n            if (this._styles) {\n              this._styles.forEach((s) => this._root.removeChild(s));\n              this._styles.length = 0;\n            }\n            this._applyStyles(newStyles);\n            this._instance = null;\n            this._update();\n          };\n        }\n        const dispatch = (event, args) => {\n          this.dispatchEvent(\n            new CustomEvent(\n              event,\n              isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }\n            )\n          );\n        };\n        instance.emit = (event, ...args) => {\n          dispatch(event, args);\n          if (hyphenate(event) !== event) {\n            dispatch(hyphenate(event), args);\n          }\n        };\n        this._setParent();\n      };\n    }\n    return vnode;\n  }\n  _applyStyles(styles, owner) {\n    if (!styles) return;\n    if (owner) {\n      if (owner === this._def || this._styleChildren.has(owner)) {\n        return;\n      }\n      this._styleChildren.add(owner);\n    }\n    const nonce = this._nonce;\n    for (let i = styles.length - 1; i >= 0; i--) {\n      const s = document.createElement(\"style\");\n      if (nonce) s.setAttribute(\"nonce\", nonce);\n      s.textContent = styles[i];\n      this.shadowRoot.prepend(s);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        if (owner) {\n          if (owner.__hmrId) {\n            if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();\n            let entry = this._childStyles.get(owner.__hmrId);\n            if (!entry) {\n              this._childStyles.set(owner.__hmrId, entry = []);\n            }\n            entry.push(s);\n          }\n        } else {\n          (this._styles || (this._styles = [])).push(s);\n        }\n      }\n    }\n  }\n  /**\n   * Only called when shadowRoot is false\n   */\n  _parseSlots() {\n    const slots = this._slots = {};\n    let n;\n    while (n = this.firstChild) {\n      const slotName = n.nodeType === 1 && n.getAttribute(\"slot\") || \"default\";\n      (slots[slotName] || (slots[slotName] = [])).push(n);\n      this.removeChild(n);\n    }\n  }\n  /**\n   * Only called when shadowRoot is false\n   */\n  _renderSlots() {\n    const outlets = (this._teleportTarget || this).querySelectorAll(\"slot\");\n    const scopeId = this._instance.type.__scopeId;\n    for (let i = 0; i < outlets.length; i++) {\n      const o = outlets[i];\n      const slotName = o.getAttribute(\"name\") || \"default\";\n      const content = this._slots[slotName];\n      const parent = o.parentNode;\n      if (content) {\n        for (const n of content) {\n          if (scopeId && n.nodeType === 1) {\n            const id = scopeId + \"-s\";\n            const walker = document.createTreeWalker(n, 1);\n            n.setAttribute(id, \"\");\n            let child;\n            while (child = walker.nextNode()) {\n              child.setAttribute(id, \"\");\n            }\n          }\n          parent.insertBefore(n, o);\n        }\n      } else {\n        while (o.firstChild) parent.insertBefore(o.firstChild, o);\n      }\n      parent.removeChild(o);\n    }\n  }\n  /**\n   * @internal\n   */\n  _injectChildStyle(comp) {\n    this._applyStyles(comp.styles, comp);\n  }\n  /**\n   * @internal\n   */\n  _removeChildStyle(comp) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      this._styleChildren.delete(comp);\n      if (this._childStyles && comp.__hmrId) {\n        const oldStyles = this._childStyles.get(comp.__hmrId);\n        if (oldStyles) {\n          oldStyles.forEach((s) => this._root.removeChild(s));\n          oldStyles.length = 0;\n        }\n      }\n    }\n  }\n}\nfunction useHost(caller) {\n  const instance = getCurrentInstance();\n  const el = instance && instance.ce;\n  if (el) {\n    return el;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    if (!instance) {\n      warn(\n        `${caller || \"useHost\"} called without an active component instance.`\n      );\n    } else {\n      warn(\n        `${caller || \"useHost\"} can only be used in components defined via defineCustomElement.`\n      );\n    }\n  }\n  return null;\n}\nfunction useShadowRoot() {\n  const el = !!(process.env.NODE_ENV !== \"production\") ? useHost(\"useShadowRoot\") : useHost();\n  return el && el.shadowRoot;\n}\n\nfunction useCssModule(name = \"$style\") {\n  {\n    const instance = getCurrentInstance();\n    if (!instance) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`useCssModule must be called inside setup()`);\n      return EMPTY_OBJ;\n    }\n    const modules = instance.type.__cssModules;\n    if (!modules) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`Current instance does not have CSS modules injected.`);\n      return EMPTY_OBJ;\n    }\n    const mod = modules[name];\n    if (!mod) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`Current instance does not have CSS module named \"${name}\".`);\n      return EMPTY_OBJ;\n    }\n    return mod;\n  }\n}\n\nconst positionMap = /* @__PURE__ */ new WeakMap();\nconst newPositionMap = /* @__PURE__ */ new WeakMap();\nconst moveCbKey = Symbol(\"_moveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nconst decorate = (t) => {\n  delete t.props.mode;\n  return t;\n};\nconst TransitionGroupImpl = /* @__PURE__ */ decorate({\n  name: \"TransitionGroup\",\n  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {\n    tag: String,\n    moveClass: String\n  }),\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const state = useTransitionState();\n    let prevChildren;\n    let children;\n    onUpdated(() => {\n      if (!prevChildren.length) {\n        return;\n      }\n      const moveClass = props.moveClass || `${props.name || \"v\"}-move`;\n      if (!hasCSSTransform(\n        prevChildren[0].el,\n        instance.vnode.el,\n        moveClass\n      )) {\n        return;\n      }\n      prevChildren.forEach(callPendingCbs);\n      prevChildren.forEach(recordPosition);\n      const movedChildren = prevChildren.filter(applyTranslation);\n      forceReflow();\n      movedChildren.forEach((c) => {\n        const el = c.el;\n        const style = el.style;\n        addTransitionClass(el, moveClass);\n        style.transform = style.webkitTransform = style.transitionDuration = \"\";\n        const cb = el[moveCbKey] = (e) => {\n          if (e && e.target !== el) {\n            return;\n          }\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(\"transitionend\", cb);\n            el[moveCbKey] = null;\n            removeTransitionClass(el, moveClass);\n          }\n        };\n        el.addEventListener(\"transitionend\", cb);\n      });\n    });\n    return () => {\n      const rawProps = toRaw(props);\n      const cssTransitionProps = resolveTransitionProps(rawProps);\n      let tag = rawProps.tag || Fragment;\n      prevChildren = [];\n      if (children) {\n        for (let i = 0; i < children.length; i++) {\n          const child = children[i];\n          if (child.el && child.el instanceof Element) {\n            prevChildren.push(child);\n            setTransitionHooks(\n              child,\n              resolveTransitionHooks(\n                child,\n                cssTransitionProps,\n                state,\n                instance\n              )\n            );\n            positionMap.set(\n              child,\n              child.el.getBoundingClientRect()\n            );\n          }\n        }\n      }\n      children = slots.default ? getTransitionRawChildren(slots.default()) : [];\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        if (child.key != null) {\n          setTransitionHooks(\n            child,\n            resolveTransitionHooks(child, cssTransitionProps, state, instance)\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\") && child.type !== Text) {\n          warn(`<TransitionGroup> children must be keyed.`);\n        }\n      }\n      return createVNode(tag, null, children);\n    };\n  }\n});\nconst TransitionGroup = TransitionGroupImpl;\nfunction callPendingCbs(c) {\n  const el = c.el;\n  if (el[moveCbKey]) {\n    el[moveCbKey]();\n  }\n  if (el[enterCbKey]) {\n    el[enterCbKey]();\n  }\n}\nfunction recordPosition(c) {\n  newPositionMap.set(c, c.el.getBoundingClientRect());\n}\nfunction applyTranslation(c) {\n  const oldPos = positionMap.get(c);\n  const newPos = newPositionMap.get(c);\n  const dx = oldPos.left - newPos.left;\n  const dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    const s = c.el.style;\n    s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;\n    s.transitionDuration = \"0s\";\n    return c;\n  }\n}\nfunction hasCSSTransform(el, root, moveClass) {\n  const clone = el.cloneNode();\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.forEach((cls) => {\n      cls.split(/\\s+/).forEach((c) => c && clone.classList.remove(c));\n    });\n  }\n  moveClass.split(/\\s+/).forEach((c) => c && clone.classList.add(c));\n  clone.style.display = \"none\";\n  const container = root.nodeType === 1 ? root : root.parentNode;\n  container.appendChild(clone);\n  const { hasTransform } = getTransitionInfo(clone);\n  container.removeChild(clone);\n  return hasTransform;\n}\n\nconst getModelAssigner = (vnode) => {\n  const fn = vnode.props[\"onUpdate:modelValue\"] || false;\n  return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;\n};\nfunction onCompositionStart(e) {\n  e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n  const target = e.target;\n  if (target.composing) {\n    target.composing = false;\n    target.dispatchEvent(new Event(\"input\"));\n  }\n}\nconst assignKey = Symbol(\"_assign\");\nconst vModelText = {\n  created(el, { modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    const castToNumber = number || vnode.props && vnode.props.type === \"number\";\n    addEventListener(el, lazy ? \"change\" : \"input\", (e) => {\n      if (e.target.composing) return;\n      let domValue = el.value;\n      if (trim) {\n        domValue = domValue.trim();\n      }\n      if (castToNumber) {\n        domValue = looseToNumber(domValue);\n      }\n      el[assignKey](domValue);\n    });\n    if (trim) {\n      addEventListener(el, \"change\", () => {\n        el.value = el.value.trim();\n      });\n    }\n    if (!lazy) {\n      addEventListener(el, \"compositionstart\", onCompositionStart);\n      addEventListener(el, \"compositionend\", onCompositionEnd);\n      addEventListener(el, \"change\", onCompositionEnd);\n    }\n  },\n  // set value on mounted so it's after min/max for type=\"range\"\n  mounted(el, { value }) {\n    el.value = value == null ? \"\" : value;\n  },\n  beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (el.composing) return;\n    const elValue = (number || el.type === \"number\") && !/^0\\d/.test(el.value) ? looseToNumber(el.value) : el.value;\n    const newValue = value == null ? \"\" : value;\n    if (elValue === newValue) {\n      return;\n    }\n    if (document.activeElement === el && el.type !== \"range\") {\n      if (lazy && value === oldValue) {\n        return;\n      }\n      if (trim && el.value.trim() === newValue) {\n        return;\n      }\n    }\n    el.value = newValue;\n  }\n};\nconst vModelCheckbox = {\n  // #4096 array checkboxes need to be deep traversed\n  deep: true,\n  created(el, _, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      const modelValue = el._modelValue;\n      const elementValue = getValue(el);\n      const checked = el.checked;\n      const assign = el[assignKey];\n      if (isArray(modelValue)) {\n        const index = looseIndexOf(modelValue, elementValue);\n        const found = index !== -1;\n        if (checked && !found) {\n          assign(modelValue.concat(elementValue));\n        } else if (!checked && found) {\n          const filtered = [...modelValue];\n          filtered.splice(index, 1);\n          assign(filtered);\n        }\n      } else if (isSet(modelValue)) {\n        const cloned = new Set(modelValue);\n        if (checked) {\n          cloned.add(elementValue);\n        } else {\n          cloned.delete(elementValue);\n        }\n        assign(cloned);\n      } else {\n        assign(getCheckboxValue(el, checked));\n      }\n    });\n  },\n  // set initial checked on mount to wait for true-value/false-value\n  mounted: setChecked,\n  beforeUpdate(el, binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    setChecked(el, binding, vnode);\n  }\n};\nfunction setChecked(el, { value, oldValue }, vnode) {\n  el._modelValue = value;\n  let checked;\n  if (isArray(value)) {\n    checked = looseIndexOf(value, vnode.props.value) > -1;\n  } else if (isSet(value)) {\n    checked = value.has(vnode.props.value);\n  } else {\n    if (value === oldValue) return;\n    checked = looseEqual(value, getCheckboxValue(el, true));\n  }\n  if (el.checked !== checked) {\n    el.checked = checked;\n  }\n}\nconst vModelRadio = {\n  created(el, { value }, vnode) {\n    el.checked = looseEqual(value, vnode.props.value);\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      el[assignKey](getValue(el));\n    });\n  },\n  beforeUpdate(el, { value, oldValue }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (value !== oldValue) {\n      el.checked = looseEqual(value, vnode.props.value);\n    }\n  }\n};\nconst vModelSelect = {\n  // <select multiple> value need to be deep traversed\n  deep: true,\n  created(el, { value, modifiers: { number } }, vnode) {\n    const isSetModel = isSet(value);\n    addEventListener(el, \"change\", () => {\n      const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(\n        (o) => number ? looseToNumber(getValue(o)) : getValue(o)\n      );\n      el[assignKey](\n        el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]\n      );\n      el._assigning = true;\n      nextTick(() => {\n        el._assigning = false;\n      });\n    });\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  // set value in mounted & updated because <select> relies on its children\n  // <option>s.\n  mounted(el, { value }) {\n    setSelected(el, value);\n  },\n  beforeUpdate(el, _binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  updated(el, { value }) {\n    if (!el._assigning) {\n      setSelected(el, value);\n    }\n  }\n};\nfunction setSelected(el, value) {\n  const isMultiple = el.multiple;\n  const isArrayValue = isArray(value);\n  if (isMultiple && !isArrayValue && !isSet(value)) {\n    !!(process.env.NODE_ENV !== \"production\") && warn(\n      `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`\n    );\n    return;\n  }\n  for (let i = 0, l = el.options.length; i < l; i++) {\n    const option = el.options[i];\n    const optionValue = getValue(option);\n    if (isMultiple) {\n      if (isArrayValue) {\n        const optionType = typeof optionValue;\n        if (optionType === \"string\" || optionType === \"number\") {\n          option.selected = value.some((v) => String(v) === String(optionValue));\n        } else {\n          option.selected = looseIndexOf(value, optionValue) > -1;\n        }\n      } else {\n        option.selected = value.has(optionValue);\n      }\n    } else if (looseEqual(getValue(option), value)) {\n      if (el.selectedIndex !== i) el.selectedIndex = i;\n      return;\n    }\n  }\n  if (!isMultiple && el.selectedIndex !== -1) {\n    el.selectedIndex = -1;\n  }\n}\nfunction getValue(el) {\n  return \"_value\" in el ? el._value : el.value;\n}\nfunction getCheckboxValue(el, checked) {\n  const key = checked ? \"_trueValue\" : \"_falseValue\";\n  return key in el ? el[key] : checked;\n}\nconst vModelDynamic = {\n  created(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"created\");\n  },\n  mounted(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"mounted\");\n  },\n  beforeUpdate(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"beforeUpdate\");\n  },\n  updated(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"updated\");\n  }\n};\nfunction resolveDynamicModel(tagName, type) {\n  switch (tagName) {\n    case \"SELECT\":\n      return vModelSelect;\n    case \"TEXTAREA\":\n      return vModelText;\n    default:\n      switch (type) {\n        case \"checkbox\":\n          return vModelCheckbox;\n        case \"radio\":\n          return vModelRadio;\n        default:\n          return vModelText;\n      }\n  }\n}\nfunction callModelHook(el, binding, vnode, prevVNode, hook) {\n  const modelToUse = resolveDynamicModel(\n    el.tagName,\n    vnode.props && vnode.props.type\n  );\n  const fn = modelToUse[hook];\n  fn && fn(el, binding, vnode, prevVNode);\n}\nfunction initVModelForSSR() {\n  vModelText.getSSRProps = ({ value }) => ({ value });\n  vModelRadio.getSSRProps = ({ value }, vnode) => {\n    if (vnode.props && looseEqual(vnode.props.value, value)) {\n      return { checked: true };\n    }\n  };\n  vModelCheckbox.getSSRProps = ({ value }, vnode) => {\n    if (isArray(value)) {\n      if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {\n        return { checked: true };\n      }\n    } else if (isSet(value)) {\n      if (vnode.props && value.has(vnode.props.value)) {\n        return { checked: true };\n      }\n    } else if (value) {\n      return { checked: true };\n    }\n  };\n  vModelDynamic.getSSRProps = (binding, vnode) => {\n    if (typeof vnode.type !== \"string\") {\n      return;\n    }\n    const modelToUse = resolveDynamicModel(\n      // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase\n      vnode.type.toUpperCase(),\n      vnode.props && vnode.props.type\n    );\n    if (modelToUse.getSSRProps) {\n      return modelToUse.getSSRProps(binding, vnode);\n    }\n  };\n}\n\nconst systemModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\"];\nconst modifierGuards = {\n  stop: (e) => e.stopPropagation(),\n  prevent: (e) => e.preventDefault(),\n  self: (e) => e.target !== e.currentTarget,\n  ctrl: (e) => !e.ctrlKey,\n  shift: (e) => !e.shiftKey,\n  alt: (e) => !e.altKey,\n  meta: (e) => !e.metaKey,\n  left: (e) => \"button\" in e && e.button !== 0,\n  middle: (e) => \"button\" in e && e.button !== 1,\n  right: (e) => \"button\" in e && e.button !== 2,\n  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))\n};\nconst withModifiers = (fn, modifiers) => {\n  const cache = fn._withMods || (fn._withMods = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {\n    for (let i = 0; i < modifiers.length; i++) {\n      const guard = modifierGuards[modifiers[i]];\n      if (guard && guard(event, modifiers)) return;\n    }\n    return fn(event, ...args);\n  });\n};\nconst keyNames = {\n  esc: \"escape\",\n  space: \" \",\n  up: \"arrow-up\",\n  left: \"arrow-left\",\n  right: \"arrow-right\",\n  down: \"arrow-down\",\n  delete: \"backspace\"\n};\nconst withKeys = (fn, modifiers) => {\n  const cache = fn._withKeys || (fn._withKeys = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event) => {\n    if (!(\"key\" in event)) {\n      return;\n    }\n    const eventKey = hyphenate(event.key);\n    if (modifiers.some(\n      (k) => k === eventKey || keyNames[k] === eventKey\n    )) {\n      return fn(event);\n    }\n  });\n};\n\nconst rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);\nlet renderer;\nlet enabledHydration = false;\nfunction ensureRenderer() {\n  return renderer || (renderer = createRenderer(rendererOptions));\n}\nfunction ensureHydrationRenderer() {\n  renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);\n  enabledHydration = true;\n  return renderer;\n}\nconst render = (...args) => {\n  ensureRenderer().render(...args);\n};\nconst hydrate = (...args) => {\n  ensureHydrationRenderer().hydrate(...args);\n};\nconst createApp = (...args) => {\n  const app = ensureRenderer().createApp(...args);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    injectNativeTagCheck(app);\n    injectCompilerOptionsCheck(app);\n  }\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (!container) return;\n    const component = app._component;\n    if (!isFunction(component) && !component.render && !component.template) {\n      component.template = container.innerHTML;\n    }\n    if (container.nodeType === 1) {\n      container.textContent = \"\";\n    }\n    const proxy = mount(container, false, resolveRootNamespace(container));\n    if (container instanceof Element) {\n      container.removeAttribute(\"v-cloak\");\n      container.setAttribute(\"data-v-app\", \"\");\n    }\n    return proxy;\n  };\n  return app;\n};\nconst createSSRApp = (...args) => {\n  const app = ensureHydrationRenderer().createApp(...args);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    injectNativeTagCheck(app);\n    injectCompilerOptionsCheck(app);\n  }\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (container) {\n      return mount(container, true, resolveRootNamespace(container));\n    }\n  };\n  return app;\n};\nfunction resolveRootNamespace(container) {\n  if (container instanceof SVGElement) {\n    return \"svg\";\n  }\n  if (typeof MathMLElement === \"function\" && container instanceof MathMLElement) {\n    return \"mathml\";\n  }\n}\nfunction injectNativeTagCheck(app) {\n  Object.defineProperty(app.config, \"isNativeTag\", {\n    value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),\n    writable: false\n  });\n}\nfunction injectCompilerOptionsCheck(app) {\n  if (isRuntimeOnly()) {\n    const isCustomElement = app.config.isCustomElement;\n    Object.defineProperty(app.config, \"isCustomElement\", {\n      get() {\n        return isCustomElement;\n      },\n      set() {\n        warn(\n          `The \\`isCustomElement\\` config option is deprecated. Use \\`compilerOptions.isCustomElement\\` instead.`\n        );\n      }\n    });\n    const compilerOptions = app.config.compilerOptions;\n    const msg = `The \\`compilerOptions\\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka \"full build\"). Since you are using the runtime-only build, \\`compilerOptions\\` must be passed to \\`@vue/compiler-dom\\` in the build setup instead.\n- For vue-loader: pass it via vue-loader's \\`compilerOptions\\` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;\n    Object.defineProperty(app.config, \"compilerOptions\", {\n      get() {\n        warn(msg);\n        return compilerOptions;\n      },\n      set() {\n        warn(msg);\n      }\n    });\n  }\n}\nfunction normalizeContainer(container) {\n  if (isString(container)) {\n    const res = document.querySelector(container);\n    if (!!(process.env.NODE_ENV !== \"production\") && !res) {\n      warn(\n        `Failed to mount app: mount target selector \"${container}\" returned null.`\n      );\n    }\n    return res;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === \"closed\") {\n    warn(\n      `mounting on a ShadowRoot with \\`{mode: \"closed\"}\\` may lead to unpredictable bugs`\n    );\n  }\n  return container;\n}\nlet ssrDirectiveInitialized = false;\nconst initDirectivesForSSR = () => {\n  if (!ssrDirectiveInitialized) {\n    ssrDirectiveInitialized = true;\n    initVModelForSSR();\n    initVShowForSSR();\n  }\n} ;\n\nexport { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers };\n","import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n  if (Array.isArray(target)) {\n    target.length = Math.max(target.length, key)\n    target.splice(key, 1, val)\n    return val\n  }\n  target[key] = val\n  return val\n}\n\nexport function del(target, key) {\n  if (Array.isArray(target)) {\n    target.splice(key, 1)\n    return\n  }\n  delete target[key]\n}\n\nexport * from 'vue'\nexport {\n  Vue,\n  Vue2,\n  isVue2,\n  isVue3,\n  install,\n}\n","/*!\n * pinia v2.2.6\n * (c) 2024 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from 'vue-demi';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n    return (o &&\n        typeof o === 'object' &&\n        Object.prototype.toString.call(o) === '[object Object]' &&\n        typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n    /**\n     * Direct mutation of the state:\n     *\n     * - `store.name = 'new name'`\n     * - `store.$state.name = 'new name'`\n     * - `store.list.push('new item')`\n     */\n    MutationType[\"direct\"] = \"direct\";\n    /**\n     * Mutated the state with `$patch` and an object\n     *\n     * - `store.$patch({ name: 'newName' })`\n     */\n    MutationType[\"patchObject\"] = \"patch object\";\n    /**\n     * Mutated the state with `$patch` and a function\n     *\n     * - `store.$patch(state => state.name = 'newName')`\n     */\n    MutationType[\"patchFunction\"] = \"patch function\";\n    // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n    ? window\n    : typeof self === 'object' && self.self === self\n        ? self\n        : typeof global === 'object' && global.global === global\n            ? global\n            : typeof globalThis === 'object'\n                ? globalThis\n                : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n    // prepend BOM for UTF-8 XML and text/* types (including HTML)\n    // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n    if (autoBom &&\n        /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n        return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n    }\n    return blob;\n}\nfunction download(url, name, opts) {\n    const xhr = new XMLHttpRequest();\n    xhr.open('GET', url);\n    xhr.responseType = 'blob';\n    xhr.onload = function () {\n        saveAs(xhr.response, name, opts);\n    };\n    xhr.onerror = function () {\n        console.error('could not download file');\n    };\n    xhr.send();\n}\nfunction corsEnabled(url) {\n    const xhr = new XMLHttpRequest();\n    // use sync to avoid popup blocker\n    xhr.open('HEAD', url, false);\n    try {\n        xhr.send();\n    }\n    catch (e) { }\n    return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n    try {\n        node.dispatchEvent(new MouseEvent('click'));\n    }\n    catch (e) {\n        const evt = document.createEvent('MouseEvents');\n        evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n        node.dispatchEvent(evt);\n    }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n    /AppleWebKit/.test(_navigator.userAgent) &&\n    !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n    ? () => { } // noop\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n        typeof HTMLAnchorElement !== 'undefined' &&\n            'download' in HTMLAnchorElement.prototype &&\n            !isMacOSWebView\n            ? downloadSaveAs\n            : // Use msSaveOrOpenBlob as a second approach\n                'msSaveOrOpenBlob' in _navigator\n                    ? msSaveAs\n                    : // Fallback to using FileReader and a popup\n                        fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n    const a = document.createElement('a');\n    a.download = name;\n    a.rel = 'noopener'; // tabnabbing\n    // TODO: detect chrome extensions & packaged apps\n    // a.target = '_blank'\n    if (typeof blob === 'string') {\n        // Support regular links\n        a.href = blob;\n        if (a.origin !== location.origin) {\n            if (corsEnabled(a.href)) {\n                download(blob, name, opts);\n            }\n            else {\n                a.target = '_blank';\n                click(a);\n            }\n        }\n        else {\n            click(a);\n        }\n    }\n    else {\n        // Support blobs\n        a.href = URL.createObjectURL(blob);\n        setTimeout(function () {\n            URL.revokeObjectURL(a.href);\n        }, 4e4); // 40s\n        setTimeout(function () {\n            click(a);\n        }, 0);\n    }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n    if (typeof blob === 'string') {\n        if (corsEnabled(blob)) {\n            download(blob, name, opts);\n        }\n        else {\n            const a = document.createElement('a');\n            a.href = blob;\n            a.target = '_blank';\n            setTimeout(function () {\n                click(a);\n            });\n        }\n    }\n    else {\n        // @ts-ignore: works on windows\n        navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n    }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n    // Open a popup immediately do go around popup blocker\n    // Mostly only available on user interaction and the fileReader is async so...\n    popup = popup || open('', '_blank');\n    if (popup) {\n        popup.document.title = popup.document.body.innerText = 'downloading...';\n    }\n    if (typeof blob === 'string')\n        return download(blob, name, opts);\n    const force = blob.type === 'application/octet-stream';\n    const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n    const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n    if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n        typeof FileReader !== 'undefined') {\n        // Safari doesn't allow downloading of blob URLs\n        const reader = new FileReader();\n        reader.onloadend = function () {\n            let url = reader.result;\n            if (typeof url !== 'string') {\n                popup = null;\n                throw new Error('Wrong reader.result type');\n            }\n            url = isChromeIOS\n                ? url\n                : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n            if (popup) {\n                popup.location.href = url;\n            }\n            else {\n                location.assign(url);\n            }\n            popup = null; // reverse-tabnabbing #460\n        };\n        reader.readAsDataURL(blob);\n    }\n    else {\n        const url = URL.createObjectURL(blob);\n        if (popup)\n            popup.location.assign(url);\n        else\n            location.href = url;\n        popup = null; // reverse-tabnabbing #460\n        setTimeout(function () {\n            URL.revokeObjectURL(url);\n        }, 4e4); // 40s\n    }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n    const piniaMessage = '🍍 ' + message;\n    if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n        // No longer available :(\n        __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n    }\n    else if (type === 'error') {\n        console.error(piniaMessage);\n    }\n    else if (type === 'warn') {\n        console.warn(piniaMessage);\n    }\n    else {\n        console.log(piniaMessage);\n    }\n}\nfunction isPinia(o) {\n    return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n    if (!('clipboard' in navigator)) {\n        toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n        return true;\n    }\n}\nfunction checkNotFocusedError(error) {\n    if (error instanceof Error &&\n        error.message.toLowerCase().includes('document is not focused')) {\n        toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n        return true;\n    }\n    return false;\n}\nasync function actionGlobalCopyState(pinia) {\n    if (checkClipboardAccess())\n        return;\n    try {\n        await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n        toastMessage('Global state copied to clipboard.');\n    }\n    catch (error) {\n        if (checkNotFocusedError(error))\n            return;\n        toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nasync function actionGlobalPasteState(pinia) {\n    if (checkClipboardAccess())\n        return;\n    try {\n        loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n        toastMessage('Global state pasted from clipboard.');\n    }\n    catch (error) {\n        if (checkNotFocusedError(error))\n            return;\n        toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nasync function actionGlobalSaveState(pinia) {\n    try {\n        saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n            type: 'text/plain;charset=utf-8',\n        }), 'pinia-state.json');\n    }\n    catch (error) {\n        toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nlet fileInput;\nfunction getFileOpener() {\n    if (!fileInput) {\n        fileInput = document.createElement('input');\n        fileInput.type = 'file';\n        fileInput.accept = '.json';\n    }\n    function openFile() {\n        return new Promise((resolve, reject) => {\n            fileInput.onchange = async () => {\n                const files = fileInput.files;\n                if (!files)\n                    return resolve(null);\n                const file = files.item(0);\n                if (!file)\n                    return resolve(null);\n                return resolve({ text: await file.text(), file });\n            };\n            // @ts-ignore: TODO: changed from 4.3 to 4.4\n            fileInput.oncancel = () => resolve(null);\n            fileInput.onerror = reject;\n            fileInput.click();\n        });\n    }\n    return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n    try {\n        const open = getFileOpener();\n        const result = await open();\n        if (!result)\n            return;\n        const { text, file } = result;\n        loadStoresState(pinia, JSON.parse(text));\n        toastMessage(`Global state imported from \"${file.name}\".`);\n    }\n    catch (error) {\n        toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nfunction loadStoresState(pinia, state) {\n    for (const key in state) {\n        const storeState = pinia.state.value[key];\n        // store is already instantiated, patch it\n        if (storeState) {\n            Object.assign(storeState, state[key]);\n        }\n        else {\n            // store is not instantiated, set the initial state\n            pinia.state.value[key] = state[key];\n        }\n    }\n}\n\nfunction formatDisplay(display) {\n    return {\n        _custom: {\n            display,\n        },\n    };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n    return isPinia(store)\n        ? {\n            id: PINIA_ROOT_ID,\n            label: PINIA_ROOT_LABEL,\n        }\n        : {\n            id: store.$id,\n            label: store.$id,\n        };\n}\nfunction formatStoreForInspectorState(store) {\n    if (isPinia(store)) {\n        const storeNames = Array.from(store._s.keys());\n        const storeMap = store._s;\n        const state = {\n            state: storeNames.map((storeId) => ({\n                editable: true,\n                key: storeId,\n                value: store.state.value[storeId],\n            })),\n            getters: storeNames\n                .filter((id) => storeMap.get(id)._getters)\n                .map((id) => {\n                const store = storeMap.get(id);\n                return {\n                    editable: false,\n                    key: id,\n                    value: store._getters.reduce((getters, key) => {\n                        getters[key] = store[key];\n                        return getters;\n                    }, {}),\n                };\n            }),\n        };\n        return state;\n    }\n    const state = {\n        state: Object.keys(store.$state).map((key) => ({\n            editable: true,\n            key,\n            value: store.$state[key],\n        })),\n    };\n    // avoid adding empty getters\n    if (store._getters && store._getters.length) {\n        state.getters = store._getters.map((getterName) => ({\n            editable: false,\n            key: getterName,\n            value: store[getterName],\n        }));\n    }\n    if (store._customProperties.size) {\n        state.customProperties = Array.from(store._customProperties).map((key) => ({\n            editable: true,\n            key,\n            value: store[key],\n        }));\n    }\n    return state;\n}\nfunction formatEventData(events) {\n    if (!events)\n        return {};\n    if (Array.isArray(events)) {\n        // TODO: handle add and delete for arrays and objects\n        return events.reduce((data, event) => {\n            data.keys.push(event.key);\n            data.operations.push(event.type);\n            data.oldValue[event.key] = event.oldValue;\n            data.newValue[event.key] = event.newValue;\n            return data;\n        }, {\n            oldValue: {},\n            keys: [],\n            operations: [],\n            newValue: {},\n        });\n    }\n    else {\n        return {\n            operation: formatDisplay(events.type),\n            key: formatDisplay(events.key),\n            oldValue: events.oldValue,\n            newValue: events.newValue,\n        };\n    }\n}\nfunction formatMutationType(type) {\n    switch (type) {\n        case MutationType.direct:\n            return 'mutation';\n        case MutationType.patchFunction:\n            return '$patch';\n        case MutationType.patchObject:\n            return '$patch';\n        default:\n            return 'unknown';\n    }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n    setupDevtoolsPlugin({\n        id: 'dev.esm.pinia',\n        label: 'Pinia 🍍',\n        logo: 'https://pinia.vuejs.org/logo.svg',\n        packageName: 'pinia',\n        homepage: 'https://pinia.vuejs.org',\n        componentStateTypes,\n        app,\n    }, (api) => {\n        if (typeof api.now !== 'function') {\n            toastMessage('You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n        }\n        api.addTimelineLayer({\n            id: MUTATIONS_LAYER_ID,\n            label: `Pinia 🍍`,\n            color: 0xe5df88,\n        });\n        api.addInspector({\n            id: INSPECTOR_ID,\n            label: 'Pinia 🍍',\n            icon: 'storage',\n            treeFilterPlaceholder: 'Search stores',\n            actions: [\n                {\n                    icon: 'content_copy',\n                    action: () => {\n                        actionGlobalCopyState(pinia);\n                    },\n                    tooltip: 'Serialize and copy the state',\n                },\n                {\n                    icon: 'content_paste',\n                    action: async () => {\n                        await actionGlobalPasteState(pinia);\n                        api.sendInspectorTree(INSPECTOR_ID);\n                        api.sendInspectorState(INSPECTOR_ID);\n                    },\n                    tooltip: 'Replace the state with the content of your clipboard',\n                },\n                {\n                    icon: 'save',\n                    action: () => {\n                        actionGlobalSaveState(pinia);\n                    },\n                    tooltip: 'Save the state as a JSON file',\n                },\n                {\n                    icon: 'folder_open',\n                    action: async () => {\n                        await actionGlobalOpenStateFile(pinia);\n                        api.sendInspectorTree(INSPECTOR_ID);\n                        api.sendInspectorState(INSPECTOR_ID);\n                    },\n                    tooltip: 'Import the state from a JSON file',\n                },\n            ],\n            nodeActions: [\n                {\n                    icon: 'restore',\n                    tooltip: 'Reset the state (with \"$reset\")',\n                    action: (nodeId) => {\n                        const store = pinia._s.get(nodeId);\n                        if (!store) {\n                            toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n                        }\n                        else if (typeof store.$reset !== 'function') {\n                            toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n                        }\n                        else {\n                            store.$reset();\n                            toastMessage(`Store \"${nodeId}\" reset.`);\n                        }\n                    },\n                },\n            ],\n        });\n        api.on.inspectComponent((payload, ctx) => {\n            const proxy = (payload.componentInstance &&\n                payload.componentInstance.proxy);\n            if (proxy && proxy._pStores) {\n                const piniaStores = payload.componentInstance.proxy._pStores;\n                Object.values(piniaStores).forEach((store) => {\n                    payload.instanceData.state.push({\n                        type: getStoreType(store.$id),\n                        key: 'state',\n                        editable: true,\n                        value: store._isOptionsAPI\n                            ? {\n                                _custom: {\n                                    value: toRaw(store.$state),\n                                    actions: [\n                                        {\n                                            icon: 'restore',\n                                            tooltip: 'Reset the state of this store',\n                                            action: () => store.$reset(),\n                                        },\n                                    ],\n                                },\n                            }\n                            : // NOTE: workaround to unwrap transferred refs\n                                Object.keys(store.$state).reduce((state, key) => {\n                                    state[key] = store.$state[key];\n                                    return state;\n                                }, {}),\n                    });\n                    if (store._getters && store._getters.length) {\n                        payload.instanceData.state.push({\n                            type: getStoreType(store.$id),\n                            key: 'getters',\n                            editable: false,\n                            value: store._getters.reduce((getters, key) => {\n                                try {\n                                    getters[key] = store[key];\n                                }\n                                catch (error) {\n                                    // @ts-expect-error: we just want to show it in devtools\n                                    getters[key] = error;\n                                }\n                                return getters;\n                            }, {}),\n                        });\n                    }\n                });\n            }\n        });\n        api.on.getInspectorTree((payload) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                let stores = [pinia];\n                stores = stores.concat(Array.from(pinia._s.values()));\n                payload.rootNodes = (payload.filter\n                    ? stores.filter((store) => '$id' in store\n                        ? store.$id\n                            .toLowerCase()\n                            .includes(payload.filter.toLowerCase())\n                        : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n                    : stores).map(formatStoreForInspectorTree);\n            }\n        });\n        // Expose pinia instance as $pinia to window\n        globalThis.$pinia = pinia;\n        api.on.getInspectorState((payload) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n                    ? pinia\n                    : pinia._s.get(payload.nodeId);\n                if (!inspectedStore) {\n                    // this could be the selected store restored for a different project\n                    // so it's better not to say anything here\n                    return;\n                }\n                if (inspectedStore) {\n                    // Expose selected store as $store to window\n                    if (payload.nodeId !== PINIA_ROOT_ID)\n                        globalThis.$store = toRaw(inspectedStore);\n                    payload.state = formatStoreForInspectorState(inspectedStore);\n                }\n            }\n        });\n        api.on.editInspectorState((payload, ctx) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n                    ? pinia\n                    : pinia._s.get(payload.nodeId);\n                if (!inspectedStore) {\n                    return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n                }\n                const { path } = payload;\n                if (!isPinia(inspectedStore)) {\n                    // access only the state\n                    if (path.length !== 1 ||\n                        !inspectedStore._customProperties.has(path[0]) ||\n                        path[0] in inspectedStore.$state) {\n                        path.unshift('$state');\n                    }\n                }\n                else {\n                    // Root access, we can omit the `.value` because the devtools API does it for us\n                    path.unshift('state');\n                }\n                isTimelineActive = false;\n                payload.set(inspectedStore, path, payload.state.value);\n                isTimelineActive = true;\n            }\n        });\n        api.on.editComponentState((payload) => {\n            if (payload.type.startsWith('🍍')) {\n                const storeId = payload.type.replace(/^🍍\\s*/, '');\n                const store = pinia._s.get(storeId);\n                if (!store) {\n                    return toastMessage(`store \"${storeId}\" not found`, 'error');\n                }\n                const { path } = payload;\n                if (path[0] !== 'state') {\n                    return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n                }\n                // rewrite the first entry to be able to directly set the state as\n                // well as any other path\n                path[0] = '$state';\n                isTimelineActive = false;\n                payload.set(store, path, payload.state.value);\n                isTimelineActive = true;\n            }\n        });\n    });\n}\nfunction addStoreToDevtools(app, store) {\n    if (!componentStateTypes.includes(getStoreType(store.$id))) {\n        componentStateTypes.push(getStoreType(store.$id));\n    }\n    setupDevtoolsPlugin({\n        id: 'dev.esm.pinia',\n        label: 'Pinia 🍍',\n        logo: 'https://pinia.vuejs.org/logo.svg',\n        packageName: 'pinia',\n        homepage: 'https://pinia.vuejs.org',\n        componentStateTypes,\n        app,\n        settings: {\n            logStoreChanges: {\n                label: 'Notify about new/deleted stores',\n                type: 'boolean',\n                defaultValue: true,\n            },\n            // useEmojis: {\n            //   label: 'Use emojis in messages ⚡️',\n            //   type: 'boolean',\n            //   defaultValue: true,\n            // },\n        },\n    }, (api) => {\n        // gracefully handle errors\n        const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n        store.$onAction(({ after, onError, name, args }) => {\n            const groupId = runningActionId++;\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: {\n                    time: now(),\n                    title: '🛫 ' + name,\n                    subtitle: 'start',\n                    data: {\n                        store: formatDisplay(store.$id),\n                        action: formatDisplay(name),\n                        args,\n                    },\n                    groupId,\n                },\n            });\n            after((result) => {\n                activeAction = undefined;\n                api.addTimelineEvent({\n                    layerId: MUTATIONS_LAYER_ID,\n                    event: {\n                        time: now(),\n                        title: '🛬 ' + name,\n                        subtitle: 'end',\n                        data: {\n                            store: formatDisplay(store.$id),\n                            action: formatDisplay(name),\n                            args,\n                            result,\n                        },\n                        groupId,\n                    },\n                });\n            });\n            onError((error) => {\n                activeAction = undefined;\n                api.addTimelineEvent({\n                    layerId: MUTATIONS_LAYER_ID,\n                    event: {\n                        time: now(),\n                        logType: 'error',\n                        title: '💥 ' + name,\n                        subtitle: 'end',\n                        data: {\n                            store: formatDisplay(store.$id),\n                            action: formatDisplay(name),\n                            args,\n                            error,\n                        },\n                        groupId,\n                    },\n                });\n            });\n        }, true);\n        store._customProperties.forEach((name) => {\n            watch(() => unref(store[name]), (newValue, oldValue) => {\n                api.notifyComponentUpdate();\n                api.sendInspectorState(INSPECTOR_ID);\n                if (isTimelineActive) {\n                    api.addTimelineEvent({\n                        layerId: MUTATIONS_LAYER_ID,\n                        event: {\n                            time: now(),\n                            title: 'Change',\n                            subtitle: name,\n                            data: {\n                                newValue,\n                                oldValue,\n                            },\n                            groupId: activeAction,\n                        },\n                    });\n                }\n            }, { deep: true });\n        });\n        store.$subscribe(({ events, type }, state) => {\n            api.notifyComponentUpdate();\n            api.sendInspectorState(INSPECTOR_ID);\n            if (!isTimelineActive)\n                return;\n            // rootStore.state[store.id] = state\n            const eventData = {\n                time: now(),\n                title: formatMutationType(type),\n                data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n                groupId: activeAction,\n            };\n            if (type === MutationType.patchFunction) {\n                eventData.subtitle = '⤵️';\n            }\n            else if (type === MutationType.patchObject) {\n                eventData.subtitle = '🧩';\n            }\n            else if (events && !Array.isArray(events)) {\n                eventData.subtitle = events.type;\n            }\n            if (events) {\n                eventData.data['rawEvent(s)'] = {\n                    _custom: {\n                        display: 'DebuggerEvent',\n                        type: 'object',\n                        tooltip: 'raw DebuggerEvent[]',\n                        value: events,\n                    },\n                };\n            }\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: eventData,\n            });\n        }, { detached: true, flush: 'sync' });\n        const hotUpdate = store._hotUpdate;\n        store._hotUpdate = markRaw((newStore) => {\n            hotUpdate(newStore);\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: {\n                    time: now(),\n                    title: '🔥 ' + store.$id,\n                    subtitle: 'HMR update',\n                    data: {\n                        store: formatDisplay(store.$id),\n                        info: formatDisplay(`HMR update`),\n                    },\n                },\n            });\n            // update the devtools too\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(INSPECTOR_ID);\n            api.sendInspectorState(INSPECTOR_ID);\n        });\n        const { $dispose } = store;\n        store.$dispose = () => {\n            $dispose();\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(INSPECTOR_ID);\n            api.sendInspectorState(INSPECTOR_ID);\n            api.getSettings().logStoreChanges &&\n                toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n        };\n        // trigger an update so it can display new registered stores\n        api.notifyComponentUpdate();\n        api.sendInspectorTree(INSPECTOR_ID);\n        api.sendInspectorState(INSPECTOR_ID);\n        api.getSettings().logStoreChanges &&\n            toastMessage(`\"${store.$id}\" store installed 🆕`);\n    });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n    // original actions of the store as they are given by pinia. We are going to override them\n    const actions = actionNames.reduce((storeActions, actionName) => {\n        // use toRaw to avoid tracking #541\n        storeActions[actionName] = toRaw(store)[actionName];\n        return storeActions;\n    }, {});\n    for (const actionName in actions) {\n        store[actionName] = function () {\n            // the running action id is incremented in a before action hook\n            const _actionId = runningActionId;\n            const trackedStore = wrapWithProxy\n                ? new Proxy(store, {\n                    get(...args) {\n                        activeAction = _actionId;\n                        return Reflect.get(...args);\n                    },\n                    set(...args) {\n                        activeAction = _actionId;\n                        return Reflect.set(...args);\n                    },\n                })\n                : store;\n            // For Setup Stores we need https://github.com/tc39/proposal-async-context\n            activeAction = _actionId;\n            const retValue = actions[actionName].apply(trackedStore, arguments);\n            // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n            activeAction = undefined;\n            return retValue;\n        };\n    }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n    // HMR module\n    if (store.$id.startsWith('__hot:')) {\n        return;\n    }\n    // detect option api vs setup api\n    store._isOptionsAPI = !!options.state;\n    // Do not overwrite actions mocked by @pinia/testing (#2298)\n    if (!store._p._testing) {\n        patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n        // Upgrade the HMR to also update the new actions\n        const originalHotUpdate = store._hotUpdate;\n        toRaw(store)._hotUpdate = function (newStore) {\n            originalHotUpdate.apply(this, arguments);\n            patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n        };\n    }\n    addStoreToDevtools(app, \n    // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n    store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n    const scope = effectScope(true);\n    // NOTE: here we could check the window object for a state and directly set it\n    // if there is anything like it with Vue 3 SSR\n    const state = scope.run(() => ref({}));\n    let _p = [];\n    // plugins added before calling app.use(pinia)\n    let toBeInstalled = [];\n    const pinia = markRaw({\n        install(app) {\n            // this allows calling useStore() outside of a component setup after\n            // installing pinia's plugin\n            setActivePinia(pinia);\n            if (!isVue2) {\n                pinia._a = app;\n                app.provide(piniaSymbol, pinia);\n                app.config.globalProperties.$pinia = pinia;\n                /* istanbul ignore else */\n                if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n                    registerPiniaDevtools(app, pinia);\n                }\n                toBeInstalled.forEach((plugin) => _p.push(plugin));\n                toBeInstalled = [];\n            }\n        },\n        use(plugin) {\n            if (!this._a && !isVue2) {\n                toBeInstalled.push(plugin);\n            }\n            else {\n                _p.push(plugin);\n            }\n            return this;\n        },\n        _p,\n        // it's actually undefined here\n        // @ts-expect-error\n        _a: null,\n        _e: scope,\n        _s: new Map(),\n        state,\n    });\n    // pinia devtools rely on dev only features so they cannot be forced unless\n    // the dev build of Vue is used. Avoid old browsers like IE11.\n    if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && typeof Proxy !== 'undefined') {\n        pinia.use(devtoolsPlugin);\n    }\n    return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n    pinia._e.stop();\n    pinia._s.clear();\n    pinia._p.splice(0);\n    pinia.state.value = {};\n    // @ts-expect-error: non valid\n    pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n    return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n    // no need to go through symbols because they cannot be serialized anyway\n    for (const key in oldState) {\n        const subPatch = oldState[key];\n        // skip the whole sub tree\n        if (!(key in newState)) {\n            continue;\n        }\n        const targetValue = newState[key];\n        if (isPlainObject(targetValue) &&\n            isPlainObject(subPatch) &&\n            !isRef(subPatch) &&\n            !isReactive(subPatch)) {\n            newState[key] = patchObject(targetValue, subPatch);\n        }\n        else {\n            // objects are either a bit more complex (e.g. refs) or primitives, so we\n            // just set the whole thing\n            if (isVue2) {\n                set(newState, key, subPatch);\n            }\n            else {\n                newState[key] = subPatch;\n            }\n        }\n    }\n    return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n *   import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n    // strip as much as possible from iife.prod\n    if (!(process.env.NODE_ENV !== 'production')) {\n        return () => { };\n    }\n    return (newModule) => {\n        const pinia = hot.data.pinia || initialUseStore._pinia;\n        if (!pinia) {\n            // this store is still not used\n            return;\n        }\n        // preserve the pinia instance across loads\n        hot.data.pinia = pinia;\n        // console.log('got data', newStore)\n        for (const exportName in newModule) {\n            const useStore = newModule[exportName];\n            // console.log('checking for', exportName)\n            if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n                // console.log('Accepting update for', useStore.$id)\n                const id = useStore.$id;\n                if (id !== initialUseStore.$id) {\n                    console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n                    // return import.meta.hot.invalidate()\n                    return hot.invalidate();\n                }\n                const existingStore = pinia._s.get(id);\n                if (!existingStore) {\n                    console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n                    return;\n                }\n                useStore(pinia, existingStore);\n            }\n        }\n    };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n    subscriptions.push(callback);\n    const removeSubscription = () => {\n        const idx = subscriptions.indexOf(callback);\n        if (idx > -1) {\n            subscriptions.splice(idx, 1);\n            onCleanup();\n        }\n    };\n    if (!detached && getCurrentScope()) {\n        onScopeDispose(removeSubscription);\n    }\n    return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n    subscriptions.slice().forEach((callback) => {\n        callback(...args);\n    });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n    // Handle Map instances\n    if (target instanceof Map && patchToApply instanceof Map) {\n        patchToApply.forEach((value, key) => target.set(key, value));\n    }\n    else if (target instanceof Set && patchToApply instanceof Set) {\n        // Handle Set instances\n        patchToApply.forEach(target.add, target);\n    }\n    // no need to go through symbols because they cannot be serialized anyway\n    for (const key in patchToApply) {\n        if (!patchToApply.hasOwnProperty(key))\n            continue;\n        const subPatch = patchToApply[key];\n        const targetValue = target[key];\n        if (isPlainObject(targetValue) &&\n            isPlainObject(subPatch) &&\n            target.hasOwnProperty(key) &&\n            !isRef(subPatch) &&\n            !isReactive(subPatch)) {\n            // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n            // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n            // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n            target[key] = mergeReactiveObjects(targetValue, subPatch);\n        }\n        else {\n            // @ts-expect-error: subPatch is a valid value\n            target[key] = subPatch;\n        }\n    }\n    return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n    ? Symbol('pinia:skipHydration')\n    : /* istanbul ignore next */ Symbol();\nconst skipHydrateMap = /*#__PURE__*/ new WeakMap();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n    return isVue2\n        ? // in @vue/composition-api, the refs are sealed so defineProperty doesn't work...\n            /* istanbul ignore next */ skipHydrateMap.set(obj, 1) && obj\n        : Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n    return isVue2\n        ? /* istanbul ignore next */ !skipHydrateMap.has(obj)\n        : !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n    return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n    const { state, actions, getters } = options;\n    const initialState = pinia.state.value[id];\n    let store;\n    function setup() {\n        if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n            /* istanbul ignore if */\n            if (isVue2) {\n                set(pinia.state.value, id, state ? state() : {});\n            }\n            else {\n                pinia.state.value[id] = state ? state() : {};\n            }\n        }\n        // avoid creating a state in pinia.state.value\n        const localState = (process.env.NODE_ENV !== 'production') && hot\n            ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n                toRefs(ref(state ? state() : {}).value)\n            : toRefs(pinia.state.value[id]);\n        return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n            if ((process.env.NODE_ENV !== 'production') && name in localState) {\n                console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n            }\n            computedGetters[name] = markRaw(computed(() => {\n                setActivePinia(pinia);\n                // it was created just before\n                const store = pinia._s.get(id);\n                // allow cross using stores\n                /* istanbul ignore if */\n                if (isVue2 && !store._r)\n                    return;\n                // @ts-expect-error\n                // return getters![name].call(context, context)\n                // TODO: avoid reading the getter while assigning with a global variable\n                return getters[name].call(store, store);\n            }));\n            return computedGetters;\n        }, {}));\n    }\n    store = createSetupStore(id, setup, options, pinia, hot, true);\n    return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n    let scope;\n    const optionsForPlugin = assign({ actions: {} }, options);\n    /* istanbul ignore if */\n    if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n        throw new Error('Pinia destroyed');\n    }\n    // watcher options for $subscribe\n    const $subscribeOptions = { deep: true };\n    /* istanbul ignore else */\n    if ((process.env.NODE_ENV !== 'production') && !isVue2) {\n        $subscribeOptions.onTrigger = (event) => {\n            /* istanbul ignore else */\n            if (isListening) {\n                debuggerEvents = event;\n                // avoid triggering this while the store is being built and the state is being set in pinia\n            }\n            else if (isListening == false && !store._hotUpdating) {\n                // let patch send all the events together later\n                /* istanbul ignore else */\n                if (Array.isArray(debuggerEvents)) {\n                    debuggerEvents.push(event);\n                }\n                else {\n                    console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n                }\n            }\n        };\n    }\n    // internal state\n    let isListening; // set to true at the end\n    let isSyncListening; // set to true at the end\n    let subscriptions = [];\n    let actionSubscriptions = [];\n    let debuggerEvents;\n    const initialState = pinia.state.value[$id];\n    // avoid setting the state for option stores if it is set\n    // by the setup\n    if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n        /* istanbul ignore if */\n        if (isVue2) {\n            set(pinia.state.value, $id, {});\n        }\n        else {\n            pinia.state.value[$id] = {};\n        }\n    }\n    const hotState = ref({});\n    // avoid triggering too many listeners\n    // https://github.com/vuejs/pinia/issues/1129\n    let activeListener;\n    function $patch(partialStateOrMutator) {\n        let subscriptionMutation;\n        isListening = isSyncListening = false;\n        // reset the debugger events since patches are sync\n        /* istanbul ignore else */\n        if ((process.env.NODE_ENV !== 'production')) {\n            debuggerEvents = [];\n        }\n        if (typeof partialStateOrMutator === 'function') {\n            partialStateOrMutator(pinia.state.value[$id]);\n            subscriptionMutation = {\n                type: MutationType.patchFunction,\n                storeId: $id,\n                events: debuggerEvents,\n            };\n        }\n        else {\n            mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n            subscriptionMutation = {\n                type: MutationType.patchObject,\n                payload: partialStateOrMutator,\n                storeId: $id,\n                events: debuggerEvents,\n            };\n        }\n        const myListenerId = (activeListener = Symbol());\n        nextTick().then(() => {\n            if (activeListener === myListenerId) {\n                isListening = true;\n            }\n        });\n        isSyncListening = true;\n        // because we paused the watcher, we need to manually call the subscriptions\n        triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n    }\n    const $reset = isOptionsStore\n        ? function $reset() {\n            const { state } = options;\n            const newState = state ? state() : {};\n            // we use a patch to group all changes into one single subscription\n            this.$patch(($state) => {\n                // @ts-expect-error: FIXME: shouldn't error?\n                assign($state, newState);\n            });\n        }\n        : /* istanbul ignore next */\n            (process.env.NODE_ENV !== 'production')\n                ? () => {\n                    throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n                }\n                : noop;\n    function $dispose() {\n        scope.stop();\n        subscriptions = [];\n        actionSubscriptions = [];\n        pinia._s.delete($id);\n    }\n    /**\n     * Helper that wraps function so it can be tracked with $onAction\n     * @param fn - action to wrap\n     * @param name - name of the action\n     */\n    const action = (fn, name = '') => {\n        if (ACTION_MARKER in fn) {\n            fn[ACTION_NAME] = name;\n            return fn;\n        }\n        const wrappedAction = function () {\n            setActivePinia(pinia);\n            const args = Array.from(arguments);\n            const afterCallbackList = [];\n            const onErrorCallbackList = [];\n            function after(callback) {\n                afterCallbackList.push(callback);\n            }\n            function onError(callback) {\n                onErrorCallbackList.push(callback);\n            }\n            // @ts-expect-error\n            triggerSubscriptions(actionSubscriptions, {\n                args,\n                name: wrappedAction[ACTION_NAME],\n                store,\n                after,\n                onError,\n            });\n            let ret;\n            try {\n                ret = fn.apply(this && this.$id === $id ? this : store, args);\n                // handle sync errors\n            }\n            catch (error) {\n                triggerSubscriptions(onErrorCallbackList, error);\n                throw error;\n            }\n            if (ret instanceof Promise) {\n                return ret\n                    .then((value) => {\n                    triggerSubscriptions(afterCallbackList, value);\n                    return value;\n                })\n                    .catch((error) => {\n                    triggerSubscriptions(onErrorCallbackList, error);\n                    return Promise.reject(error);\n                });\n            }\n            // trigger after callbacks\n            triggerSubscriptions(afterCallbackList, ret);\n            return ret;\n        };\n        wrappedAction[ACTION_MARKER] = true;\n        wrappedAction[ACTION_NAME] = name; // will be set later\n        // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n        // because all the added properties are internals that are exposed through `$onAction()` only\n        return wrappedAction;\n    };\n    const _hmrPayload = /*#__PURE__*/ markRaw({\n        actions: {},\n        getters: {},\n        state: [],\n        hotState,\n    });\n    const partialStore = {\n        _p: pinia,\n        // _s: scope,\n        $id,\n        $onAction: addSubscription.bind(null, actionSubscriptions),\n        $patch,\n        $reset,\n        $subscribe(callback, options = {}) {\n            const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n            const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n                if (options.flush === 'sync' ? isSyncListening : isListening) {\n                    callback({\n                        storeId: $id,\n                        type: MutationType.direct,\n                        events: debuggerEvents,\n                    }, state);\n                }\n            }, assign({}, $subscribeOptions, options)));\n            return removeSubscription;\n        },\n        $dispose,\n    };\n    /* istanbul ignore if */\n    if (isVue2) {\n        // start as non ready\n        partialStore._r = false;\n    }\n    const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n        ? assign({\n            _hmrPayload,\n            _customProperties: markRaw(new Set()), // devtools custom properties\n        }, partialStore\n        // must be added later\n        // setupStore\n        )\n        : partialStore);\n    // store the partial store now so the setup of stores can instantiate each other before they are finished without\n    // creating infinite loops.\n    pinia._s.set($id, store);\n    const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n    // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n    const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n    // overwrite existing actions to support $onAction\n    for (const key in setupStore) {\n        const prop = setupStore[key];\n        if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n            // mark it as a piece of state to be serialized\n            if ((process.env.NODE_ENV !== 'production') && hot) {\n                set(hotState.value, key, toRef(setupStore, key));\n                // createOptionStore directly sets the state in pinia.state.value so we\n                // can just skip that\n            }\n            else if (!isOptionsStore) {\n                // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n                if (initialState && shouldHydrate(prop)) {\n                    if (isRef(prop)) {\n                        prop.value = initialState[key];\n                    }\n                    else {\n                        // probably a reactive object, lets recursively assign\n                        // @ts-expect-error: prop is unknown\n                        mergeReactiveObjects(prop, initialState[key]);\n                    }\n                }\n                // transfer the ref to the pinia state to keep everything in sync\n                /* istanbul ignore if */\n                if (isVue2) {\n                    set(pinia.state.value[$id], key, prop);\n                }\n                else {\n                    pinia.state.value[$id][key] = prop;\n                }\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                _hmrPayload.state.push(key);\n            }\n            // action\n        }\n        else if (typeof prop === 'function') {\n            const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n            // this a hot module replacement store because the hotUpdate method needs\n            // to do it with the right context\n            /* istanbul ignore if */\n            if (isVue2) {\n                set(setupStore, key, actionValue);\n            }\n            else {\n                // @ts-expect-error\n                setupStore[key] = actionValue;\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                _hmrPayload.actions[key] = prop;\n            }\n            // list actions so they can be used in plugins\n            // @ts-expect-error\n            optionsForPlugin.actions[key] = prop;\n        }\n        else if ((process.env.NODE_ENV !== 'production')) {\n            // add getters for devtools\n            if (isComputed(prop)) {\n                _hmrPayload.getters[key] = isOptionsStore\n                    ? // @ts-expect-error\n                        options.getters[key]\n                    : prop;\n                if (IS_CLIENT) {\n                    const getters = setupStore._getters ||\n                        // @ts-expect-error: same\n                        (setupStore._getters = markRaw([]));\n                    getters.push(key);\n                }\n            }\n        }\n    }\n    // add the state, getters, and action properties\n    /* istanbul ignore if */\n    if (isVue2) {\n        Object.keys(setupStore).forEach((key) => {\n            set(store, key, setupStore[key]);\n        });\n    }\n    else {\n        assign(store, setupStore);\n        // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n        // Make `storeToRefs()` work with `reactive()` #799\n        assign(toRaw(store), setupStore);\n    }\n    // use this instead of a computed with setter to be able to create it anywhere\n    // without linking the computed lifespan to wherever the store is first\n    // created.\n    Object.defineProperty(store, '$state', {\n        get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n        set: (state) => {\n            /* istanbul ignore if */\n            if ((process.env.NODE_ENV !== 'production') && hot) {\n                throw new Error('cannot set hotState');\n            }\n            $patch(($state) => {\n                // @ts-expect-error: FIXME: shouldn't error?\n                assign($state, state);\n            });\n        },\n    });\n    // add the hotUpdate before plugins to allow them to override it\n    /* istanbul ignore else */\n    if ((process.env.NODE_ENV !== 'production')) {\n        store._hotUpdate = markRaw((newStore) => {\n            store._hotUpdating = true;\n            newStore._hmrPayload.state.forEach((stateKey) => {\n                if (stateKey in store.$state) {\n                    const newStateTarget = newStore.$state[stateKey];\n                    const oldStateSource = store.$state[stateKey];\n                    if (typeof newStateTarget === 'object' &&\n                        isPlainObject(newStateTarget) &&\n                        isPlainObject(oldStateSource)) {\n                        patchObject(newStateTarget, oldStateSource);\n                    }\n                    else {\n                        // transfer the ref\n                        newStore.$state[stateKey] = oldStateSource;\n                    }\n                }\n                // patch direct access properties to allow store.stateProperty to work as\n                // store.$state.stateProperty\n                set(store, stateKey, toRef(newStore.$state, stateKey));\n            });\n            // remove deleted state properties\n            Object.keys(store.$state).forEach((stateKey) => {\n                if (!(stateKey in newStore.$state)) {\n                    del(store, stateKey);\n                }\n            });\n            // avoid devtools logging this as a mutation\n            isListening = false;\n            isSyncListening = false;\n            pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n            isSyncListening = true;\n            nextTick().then(() => {\n                isListening = true;\n            });\n            for (const actionName in newStore._hmrPayload.actions) {\n                const actionFn = newStore[actionName];\n                set(store, actionName, action(actionFn, actionName));\n            }\n            // TODO: does this work in both setup and option store?\n            for (const getterName in newStore._hmrPayload.getters) {\n                const getter = newStore._hmrPayload.getters[getterName];\n                const getterValue = isOptionsStore\n                    ? // special handling of options api\n                        computed(() => {\n                            setActivePinia(pinia);\n                            return getter.call(store, store);\n                        })\n                    : getter;\n                set(store, getterName, getterValue);\n            }\n            // remove deleted getters\n            Object.keys(store._hmrPayload.getters).forEach((key) => {\n                if (!(key in newStore._hmrPayload.getters)) {\n                    del(store, key);\n                }\n            });\n            // remove old actions\n            Object.keys(store._hmrPayload.actions).forEach((key) => {\n                if (!(key in newStore._hmrPayload.actions)) {\n                    del(store, key);\n                }\n            });\n            // update the values used in devtools and to allow deleting new properties later on\n            store._hmrPayload = newStore._hmrPayload;\n            store._getters = newStore._getters;\n            store._hotUpdating = false;\n        });\n    }\n    if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n        const nonEnumerable = {\n            writable: true,\n            configurable: true,\n            // avoid warning on devtools trying to display this property\n            enumerable: false,\n        };\n        ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n            Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n        });\n    }\n    /* istanbul ignore if */\n    if (isVue2) {\n        // mark the store as ready before plugins\n        store._r = true;\n    }\n    // apply all plugins\n    pinia._p.forEach((extender) => {\n        /* istanbul ignore else */\n        if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n            const extensions = scope.run(() => extender({\n                store: store,\n                app: pinia._a,\n                pinia,\n                options: optionsForPlugin,\n            }));\n            Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n            assign(store, extensions);\n        }\n        else {\n            assign(store, scope.run(() => extender({\n                store: store,\n                app: pinia._a,\n                pinia,\n                options: optionsForPlugin,\n            })));\n        }\n    });\n    if ((process.env.NODE_ENV !== 'production') &&\n        store.$state &&\n        typeof store.$state === 'object' &&\n        typeof store.$state.constructor === 'function' &&\n        !store.$state.constructor.toString().includes('[native code]')) {\n        console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n            `\\tstate: () => new MyClass()\\n` +\n            `Found in store \"${store.$id}\".`);\n    }\n    // only apply hydrate to option stores with an initial state in pinia\n    if (initialState &&\n        isOptionsStore &&\n        options.hydrate) {\n        options.hydrate(store.$state, initialState);\n    }\n    isListening = true;\n    isSyncListening = true;\n    return store;\n}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nidOrOptions, setup, setupOptions) {\n    let id;\n    let options;\n    const isSetupStore = typeof setup === 'function';\n    if (typeof idOrOptions === 'string') {\n        id = idOrOptions;\n        // the option store setup will contain the actual options in this case\n        options = isSetupStore ? setupOptions : setup;\n    }\n    else {\n        options = idOrOptions;\n        id = idOrOptions.id;\n        if ((process.env.NODE_ENV !== 'production') && typeof id !== 'string') {\n            throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n        }\n    }\n    function useStore(pinia, hot) {\n        const hasContext = hasInjectionContext();\n        pinia =\n            // in test mode, ignore the argument provided as we can always retrieve a\n            // pinia instance with getActivePinia()\n            ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n                (hasContext ? inject(piniaSymbol, null) : null);\n        if (pinia)\n            setActivePinia(pinia);\n        if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n            throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n                `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n                `This will fail in production.`);\n        }\n        pinia = activePinia;\n        if (!pinia._s.has(id)) {\n            // creating the store registers it in `pinia._s`\n            if (isSetupStore) {\n                createSetupStore(id, setup, options, pinia);\n            }\n            else {\n                createOptionsStore(id, options, pinia);\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                // @ts-expect-error: not the right inferred type\n                useStore._pinia = pinia;\n            }\n        }\n        const store = pinia._s.get(id);\n        if ((process.env.NODE_ENV !== 'production') && hot) {\n            const hotId = '__hot:' + id;\n            const newStore = isSetupStore\n                ? createSetupStore(hotId, setup, options, pinia, true)\n                : createOptionsStore(hotId, assign({}, options), pinia, true);\n            hot._hotUpdate(newStore);\n            // cleanup the state properties and the store from the cache\n            delete pinia.state.value[hotId];\n            pinia._s.delete(hotId);\n        }\n        if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n            const currentInstance = getCurrentInstance();\n            // save stores in instances to access them devtools\n            if (currentInstance &&\n                currentInstance.proxy &&\n                // avoid adding stores that are just built for hot module replacement\n                !hot) {\n                const vm = currentInstance.proxy;\n                const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n                cache[id] = store;\n            }\n        }\n        // StoreGeneric cannot be casted towards Store\n        return store;\n    }\n    useStore.$id = id;\n    return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n    mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n *   computed: {\n *     // other computed properties\n *     ...mapStores(useUserStore, useCartStore)\n *   },\n *\n *   created() {\n *     this.userStore // store with id \"user\"\n *     this.cartStore // store with id \"cart\"\n *   }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n    if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n        console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n            `Replace\\n` +\n            `\\tmapStores([useAuthStore, useCartStore])\\n` +\n            `with\\n` +\n            `\\tmapStores(useAuthStore, useCartStore)\\n` +\n            `This will fail in production if not fixed.`);\n        stores = stores[0];\n    }\n    return stores.reduce((reduced, useStore) => {\n        // @ts-expect-error: $id is added by defineStore\n        reduced[useStore.$id + mapStoreSuffix] = function () {\n            return useStore(this.$pinia);\n        };\n        return reduced;\n    }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            reduced[key] = function () {\n                // @ts-expect-error: FIXME: should work?\n                return useStore(this.$pinia)[key];\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function () {\n                const store = useStore(this.$pinia);\n                const storeKey = keysOrMapper[key];\n                // for some reason TS is unable to infer the type of storeKey to be a\n                // function\n                return typeof storeKey === 'function'\n                    ? storeKey.call(this, store)\n                    : // @ts-expect-error: FIXME: should work?\n                        store[storeKey];\n            };\n            return reduced;\n        }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function (...args) {\n                // @ts-expect-error: FIXME: should work?\n                return useStore(this.$pinia)[key](...args);\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function (...args) {\n                // @ts-expect-error: FIXME: should work?\n                return useStore(this.$pinia)[keysOrMapper[key]](...args);\n            };\n            return reduced;\n        }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            // @ts-ignore\n            reduced[key] = {\n                get() {\n                    // @ts-expect-error: FIXME: should work?\n                    return useStore(this.$pinia)[key];\n                },\n                set(value) {\n                    // @ts-expect-error: FIXME: should work?\n                    return (useStore(this.$pinia)[key] = value);\n                },\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-ignore\n            reduced[key] = {\n                get() {\n                    // @ts-expect-error: FIXME: should work?\n                    return useStore(this.$pinia)[keysOrMapper[key]];\n                },\n                set(value) {\n                    // @ts-expect-error: FIXME: should work?\n                    return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n                },\n            };\n            return reduced;\n        }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n    // See https://github.com/vuejs/pinia/issues/852\n    // It's easier to just use toRefs() even if it includes more stuff\n    if (isVue2) {\n        // @ts-expect-error: toRefs include methods and others\n        return toRefs(store);\n    }\n    else {\n        const rawStore = toRaw(store);\n        const refs = {};\n        for (const key in rawStore) {\n            const value = rawStore[key];\n            if (isRef(value) || isReactive(value)) {\n                // @ts-expect-error: the key is state or getter\n                refs[key] =\n                    // ---\n                    toRef(store, key);\n            }\n        }\n        return refs;\n    }\n}\n\n/**\n * Vue 2 Plugin that must be installed for pinia to work. Note **you don't need\n * this plugin if you are using Nuxt.js**. Use the `buildModule` instead:\n * https://pinia.vuejs.org/ssr/nuxt.html.\n *\n * @example\n * ```js\n * import Vue from 'vue'\n * import { PiniaVuePlugin, createPinia } from 'pinia'\n *\n * Vue.use(PiniaVuePlugin)\n * const pinia = createPinia()\n *\n * new Vue({\n *   el: '#app',\n *   // ...\n *   pinia,\n * })\n * ```\n *\n * @param _Vue - `Vue` imported from 'vue'.\n */\nconst PiniaVuePlugin = function (_Vue) {\n    // Equivalent of\n    // app.config.globalProperties.$pinia = pinia\n    _Vue.mixin({\n        beforeCreate() {\n            const options = this.$options;\n            if (options.pinia) {\n                const pinia = options.pinia;\n                // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/main/src/apis/inject.ts#L31\n                /* istanbul ignore else */\n                if (!this._provided) {\n                    const provideCache = {};\n                    Object.defineProperty(this, '_provided', {\n                        get: () => provideCache,\n                        set: (v) => Object.assign(provideCache, v),\n                    });\n                }\n                this._provided[piniaSymbol] = pinia;\n                // propagate the pinia instance in an SSR friendly way\n                // avoid adding it to nuxt twice\n                /* istanbul ignore else */\n                if (!this.$pinia) {\n                    this.$pinia = pinia;\n                }\n                pinia._a = this;\n                if (IS_CLIENT) {\n                    // this allows calling useStore() outside of a component setup after\n                    // installing pinia's plugin\n                    setActivePinia(pinia);\n                }\n                if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n                    registerPiniaDevtools(pinia._a, pinia);\n                }\n            }\n            else if (!this.$pinia && options.parent && options.parent.$pinia) {\n                this.$pinia = options.parent.$pinia;\n            }\n        },\n        destroyed() {\n            delete this._pStores;\n        },\n    });\n};\n\nexport { MutationType, PiniaVuePlugin, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","var E = Object.defineProperty, M = Object.defineProperties;\nvar x = Object.getOwnPropertyDescriptors;\nvar V = Object.getOwnPropertySymbols;\nvar I = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;\nvar C = (e, t, s) => t in e ? E(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, f = (e, t) => {\n  for (var s in t || (t = {}))\n    I.call(t, s) && C(e, s, t[s]);\n  if (V)\n    for (var s of V(t))\n      N.call(t, s) && C(e, s, t[s]);\n  return e;\n}, m = (e, t) => M(e, x(t));\nimport { openBlock as a, createElementBlock as h, createElementVNode as u, resolveDirective as K, normalizeClass as A, renderSlot as r, normalizeProps as d, guardReactiveProps as c, Fragment as B, renderList as L, createTextVNode as v, toDisplayString as D, createBlock as b, resolveDynamicComponent as _, createCommentVNode as O, mergeProps as k, toHandlers as j, withDirectives as w, vShow as P, createVNode as $, Transition as R, withCtx as z, withModifiers as F } from \"vue\";\nconst U = {\n  props: {\n    autoscroll: {\n      type: Boolean,\n      default: !0\n    }\n  },\n  watch: {\n    typeAheadPointer() {\n      this.autoscroll && this.maybeAdjustScroll();\n    },\n    open(e) {\n      this.autoscroll && e && this.$nextTick(() => this.maybeAdjustScroll());\n    }\n  },\n  methods: {\n    maybeAdjustScroll() {\n      var t;\n      const e = ((t = this.$refs.dropdownMenu) == null ? void 0 : t.children[this.typeAheadPointer]) || !1;\n      if (e) {\n        const s = this.getDropdownViewport(), { top: n, bottom: l, height: i } = e.getBoundingClientRect();\n        if (n < s.top)\n          return this.$refs.dropdownMenu.scrollTop = e.offsetTop;\n        if (l > s.bottom)\n          return this.$refs.dropdownMenu.scrollTop = e.offsetTop - (s.height - i);\n      }\n    },\n    getDropdownViewport() {\n      return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.getBoundingClientRect() : {\n        height: 0,\n        top: 0,\n        bottom: 0\n      };\n    }\n  }\n}, q = {\n  data() {\n    return {\n      typeAheadPointer: -1\n    };\n  },\n  watch: {\n    filteredOptions() {\n      for (let e = 0; e < this.filteredOptions.length; e++)\n        if (this.selectable(this.filteredOptions[e])) {\n          this.typeAheadPointer = e;\n          break;\n        }\n    },\n    open(e) {\n      e && this.typeAheadToLastSelected();\n    },\n    selectedValue() {\n      this.open && this.typeAheadToLastSelected();\n    }\n  },\n  methods: {\n    typeAheadUp() {\n      for (let e = this.typeAheadPointer - 1; e >= 0; e--)\n        if (this.selectable(this.filteredOptions[e])) {\n          this.typeAheadPointer = e;\n          break;\n        }\n    },\n    typeAheadDown() {\n      for (let e = this.typeAheadPointer + 1; e < this.filteredOptions.length; e++)\n        if (this.selectable(this.filteredOptions[e])) {\n          this.typeAheadPointer = e;\n          break;\n        }\n    },\n    typeAheadSelect() {\n      const e = this.filteredOptions[this.typeAheadPointer];\n      e && this.selectable(e) && this.select(e);\n    },\n    typeAheadToLastSelected() {\n      this.typeAheadPointer = this.selectedValue.length !== 0 ? this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length - 1]) : -1;\n    }\n  }\n}, J = {\n  props: {\n    loading: {\n      type: Boolean,\n      default: !1\n    }\n  },\n  data() {\n    return {\n      mutableLoading: !1\n    };\n  },\n  watch: {\n    search() {\n      this.$emit(\"search\", this.search, this.toggleLoading);\n    },\n    loading(e) {\n      this.mutableLoading = e;\n    }\n  },\n  methods: {\n    toggleLoading(e = null) {\n      return e == null ? this.mutableLoading = !this.mutableLoading : this.mutableLoading = e;\n    }\n  }\n}, S = (e, t) => {\n  const s = e.__vccOpts || e;\n  for (const [n, l] of t)\n    s[n] = l;\n  return s;\n}, H = {}, X = {\n  xmlns: \"http://www.w3.org/2000/svg\",\n  width: \"10\",\n  height: \"10\"\n}, Y = /* @__PURE__ */ u(\"path\", { d: \"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z\" }, null, -1), Q = [\n  Y\n];\nfunction G(e, t) {\n  return a(), h(\"svg\", X, Q);\n}\nconst W = /* @__PURE__ */ S(H, [[\"render\", G]]), Z = {}, ee = {\n  xmlns: \"http://www.w3.org/2000/svg\",\n  width: \"14\",\n  height: \"10\"\n}, te = /* @__PURE__ */ u(\"path\", { d: \"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z\" }, null, -1), se = [\n  te\n];\nfunction ie(e, t) {\n  return a(), h(\"svg\", ee, se);\n}\nconst oe = /* @__PURE__ */ S(Z, [[\"render\", ie]]), T = {\n  Deselect: W,\n  OpenIndicator: oe\n}, ne = {\n  mounted(e, { instance: t }) {\n    if (t.appendToBody) {\n      const {\n        height: s,\n        top: n,\n        left: l,\n        width: i\n      } = t.$refs.toggle.getBoundingClientRect();\n      let y = window.scrollX || window.pageXOffset, o = window.scrollY || window.pageYOffset;\n      e.unbindPosition = t.calculatePosition(e, t, {\n        width: i + \"px\",\n        left: y + l + \"px\",\n        top: o + n + s + \"px\"\n      }), document.body.appendChild(e);\n    }\n  },\n  unmounted(e, { instance: t }) {\n    t.appendToBody && (e.unbindPosition && typeof e.unbindPosition == \"function\" && e.unbindPosition(), e.parentNode && e.parentNode.removeChild(e));\n  }\n};\nfunction le(e) {\n  const t = {};\n  return Object.keys(e).sort().forEach((s) => {\n    t[s] = e[s];\n  }), JSON.stringify(t);\n}\nlet ae = 0;\nfunction re() {\n  return ++ae;\n}\nconst de = {\n  components: f({}, T),\n  directives: { appendToBody: ne },\n  mixins: [U, q, J],\n  compatConfig: {\n    MODE: 3\n  },\n  emits: [\n    \"open\",\n    \"close\",\n    \"update:modelValue\",\n    \"search\",\n    \"search:compositionstart\",\n    \"search:compositionend\",\n    \"search:keydown\",\n    \"search:blur\",\n    \"search:focus\",\n    \"search:input\",\n    \"option:created\",\n    \"option:selecting\",\n    \"option:selected\",\n    \"option:deselecting\",\n    \"option:deselected\"\n  ],\n  props: {\n    modelValue: {},\n    components: {\n      type: Object,\n      default: () => ({})\n    },\n    options: {\n      type: Array,\n      default() {\n        return [];\n      }\n    },\n    disabled: {\n      type: Boolean,\n      default: !1\n    },\n    clearable: {\n      type: Boolean,\n      default: !0\n    },\n    deselectFromDropdown: {\n      type: Boolean,\n      default: !1\n    },\n    searchable: {\n      type: Boolean,\n      default: !0\n    },\n    multiple: {\n      type: Boolean,\n      default: !1\n    },\n    placeholder: {\n      type: String,\n      default: \"\"\n    },\n    transition: {\n      type: String,\n      default: \"vs__fade\"\n    },\n    clearSearchOnSelect: {\n      type: Boolean,\n      default: !0\n    },\n    closeOnSelect: {\n      type: Boolean,\n      default: !0\n    },\n    label: {\n      type: String,\n      default: \"label\"\n    },\n    autocomplete: {\n      type: String,\n      default: \"off\"\n    },\n    reduce: {\n      type: Function,\n      default: (e) => e\n    },\n    selectable: {\n      type: Function,\n      default: (e) => !0\n    },\n    getOptionLabel: {\n      type: Function,\n      default(e) {\n        return typeof e == \"object\" ? e.hasOwnProperty(this.label) ? e[this.label] : console.warn(`[vue-select warn]: Label key \"option.${this.label}\" does not exist in options object ${JSON.stringify(e)}.\nhttps://vue-select.org/api/props.html#getoptionlabel`) : e;\n      }\n    },\n    getOptionKey: {\n      type: Function,\n      default(e) {\n        if (typeof e != \"object\")\n          return e;\n        try {\n          return e.hasOwnProperty(\"id\") ? e.id : le(e);\n        } catch (t) {\n          return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.\nhttps://vue-select.org/api/props.html#getoptionkey`, e, t);\n        }\n      }\n    },\n    onTab: {\n      type: Function,\n      default: function() {\n        this.selectOnTab && !this.isComposing && this.typeAheadSelect();\n      }\n    },\n    taggable: {\n      type: Boolean,\n      default: !1\n    },\n    tabindex: {\n      type: Number,\n      default: null\n    },\n    pushTags: {\n      type: Boolean,\n      default: !1\n    },\n    filterable: {\n      type: Boolean,\n      default: !0\n    },\n    filterBy: {\n      type: Function,\n      default(e, t, s) {\n        return (t || \"\").toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1;\n      }\n    },\n    filter: {\n      type: Function,\n      default(e, t) {\n        return e.filter((s) => {\n          let n = this.getOptionLabel(s);\n          return typeof n == \"number\" && (n = n.toString()), this.filterBy(s, n, t);\n        });\n      }\n    },\n    createOption: {\n      type: Function,\n      default(e) {\n        return typeof this.optionList[0] == \"object\" ? { [this.label]: e } : e;\n      }\n    },\n    resetOnOptionsChange: {\n      default: !1,\n      validator: (e) => [\"function\", \"boolean\"].includes(typeof e)\n    },\n    clearSearchOnBlur: {\n      type: Function,\n      default: function({ clearSearchOnSelect: e, multiple: t }) {\n        return e && !t;\n      }\n    },\n    noDrop: {\n      type: Boolean,\n      default: !1\n    },\n    inputId: {\n      type: String\n    },\n    dir: {\n      type: String,\n      default: \"auto\"\n    },\n    selectOnTab: {\n      type: Boolean,\n      default: !1\n    },\n    selectOnKeyCodes: {\n      type: Array,\n      default: () => [13]\n    },\n    searchInputQuerySelector: {\n      type: String,\n      default: \"[type=search]\"\n    },\n    mapKeydown: {\n      type: Function,\n      default: (e, t) => e\n    },\n    appendToBody: {\n      type: Boolean,\n      default: !1\n    },\n    calculatePosition: {\n      type: Function,\n      default(e, t, { width: s, top: n, left: l }) {\n        e.style.top = n, e.style.left = l, e.style.width = s;\n      }\n    },\n    dropdownShouldOpen: {\n      type: Function,\n      default({ noDrop: e, open: t, mutableLoading: s }) {\n        return e ? !1 : t && !s;\n      }\n    },\n    uid: {\n      type: [String, Number],\n      default: () => re()\n    }\n  },\n  data() {\n    return {\n      search: \"\",\n      open: !1,\n      isComposing: !1,\n      pushedTags: [],\n      _value: [],\n      deselectButtons: []\n    };\n  },\n  computed: {\n    isReducingValues() {\n      return this.$props.reduce !== this.$options.props.reduce.default;\n    },\n    isTrackingValues() {\n      return typeof this.modelValue == \"undefined\" || this.isReducingValues;\n    },\n    selectedValue() {\n      let e = this.modelValue;\n      return this.isTrackingValues && (e = this.$data._value), e != null && e !== \"\" ? [].concat(e) : [];\n    },\n    optionList() {\n      return this.options.concat(this.pushTags ? this.pushedTags : []);\n    },\n    searchEl() {\n      return this.$slots.search ? this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector) : this.$refs.search;\n    },\n    scope() {\n      const e = {\n        search: this.search,\n        loading: this.loading,\n        searching: this.searching,\n        filteredOptions: this.filteredOptions\n      };\n      return {\n        search: {\n          attributes: f({\n            disabled: this.disabled,\n            placeholder: this.searchPlaceholder,\n            tabindex: this.tabindex,\n            readonly: !this.searchable,\n            id: this.inputId,\n            \"aria-autocomplete\": \"list\",\n            \"aria-labelledby\": `vs${this.uid}__combobox`,\n            \"aria-controls\": `vs${this.uid}__listbox`,\n            ref: \"search\",\n            type: \"search\",\n            autocomplete: this.autocomplete,\n            value: this.search\n          }, this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? {\n            \"aria-activedescendant\": `vs${this.uid}__option-${this.typeAheadPointer}`\n          } : {}),\n          events: {\n            compositionstart: () => this.isComposing = !0,\n            compositionend: () => this.isComposing = !1,\n            keydown: this.onSearchKeyDown,\n            blur: this.onSearchBlur,\n            focus: this.onSearchFocus,\n            input: (t) => this.search = t.target.value\n          }\n        },\n        spinner: {\n          loading: this.mutableLoading\n        },\n        noOptions: {\n          search: this.search,\n          loading: this.mutableLoading,\n          searching: this.searching\n        },\n        openIndicator: {\n          attributes: {\n            ref: \"openIndicator\",\n            role: \"presentation\",\n            class: \"vs__open-indicator\"\n          }\n        },\n        listHeader: e,\n        listFooter: e,\n        header: m(f({}, e), { deselect: this.deselect }),\n        footer: m(f({}, e), { deselect: this.deselect })\n      };\n    },\n    childComponents() {\n      return f(f({}, T), this.components);\n    },\n    stateClasses() {\n      return {\n        \"vs--open\": this.dropdownOpen,\n        \"vs--single\": !this.multiple,\n        \"vs--multiple\": this.multiple,\n        \"vs--searching\": this.searching && !this.noDrop,\n        \"vs--searchable\": this.searchable && !this.noDrop,\n        \"vs--unsearchable\": !this.searchable,\n        \"vs--loading\": this.mutableLoading,\n        \"vs--disabled\": this.disabled\n      };\n    },\n    searching() {\n      return !!this.search;\n    },\n    dropdownOpen() {\n      return this.dropdownShouldOpen(this);\n    },\n    searchPlaceholder() {\n      return this.isValueEmpty && this.placeholder ? this.placeholder : void 0;\n    },\n    filteredOptions() {\n      const e = [].concat(this.optionList);\n      if (!this.filterable && !this.taggable)\n        return e;\n      const t = this.search.length ? this.filter(e, this.search, this) : e;\n      if (this.taggable && this.search.length) {\n        const s = this.createOption(this.search);\n        this.optionExists(s) || t.unshift(s);\n      }\n      return t;\n    },\n    isValueEmpty() {\n      return this.selectedValue.length === 0;\n    },\n    showClearButton() {\n      return !this.multiple && this.clearable && !this.open && !this.isValueEmpty;\n    }\n  },\n  watch: {\n    options(e, t) {\n      const s = () => typeof this.resetOnOptionsChange == \"function\" ? this.resetOnOptionsChange(e, t, this.selectedValue) : this.resetOnOptionsChange;\n      !this.taggable && s() && this.clearSelection(), this.modelValue && this.isTrackingValues && this.setInternalValueFromOptions(this.modelValue);\n    },\n    modelValue: {\n      immediate: !0,\n      handler(e) {\n        this.isTrackingValues && this.setInternalValueFromOptions(e);\n      }\n    },\n    multiple() {\n      this.clearSelection();\n    },\n    open(e) {\n      this.$emit(e ? \"open\" : \"close\");\n    }\n  },\n  created() {\n    this.mutableLoading = this.loading;\n  },\n  methods: {\n    setInternalValueFromOptions(e) {\n      Array.isArray(e) ? this.$data._value = e.map((t) => this.findOptionFromReducedValue(t)) : this.$data._value = this.findOptionFromReducedValue(e);\n    },\n    select(e) {\n      this.$emit(\"option:selecting\", e), this.isOptionSelected(e) ? this.deselectFromDropdown && (this.clearable || this.multiple && this.selectedValue.length > 1) && this.deselect(e) : (this.taggable && !this.optionExists(e) && (this.$emit(\"option:created\", e), this.pushTag(e)), this.multiple && (e = this.selectedValue.concat(e)), this.updateValue(e), this.$emit(\"option:selected\", e)), this.onAfterSelect(e);\n    },\n    deselect(e) {\n      this.$emit(\"option:deselecting\", e), this.updateValue(this.selectedValue.filter((t) => !this.optionComparator(t, e))), this.$emit(\"option:deselected\", e);\n    },\n    clearSelection() {\n      this.updateValue(this.multiple ? [] : null);\n    },\n    onAfterSelect(e) {\n      this.closeOnSelect && (this.open = !this.open, this.searchEl.blur()), this.clearSearchOnSelect && (this.search = \"\");\n    },\n    updateValue(e) {\n      typeof this.modelValue == \"undefined\" && (this.$data._value = e), e !== null && (Array.isArray(e) ? e = e.map((t) => this.reduce(t)) : e = this.reduce(e)), this.$emit(\"update:modelValue\", e);\n    },\n    toggleDropdown(e) {\n      const t = e.target !== this.searchEl;\n      t && e.preventDefault();\n      const s = [\n        ...this.deselectButtons || [],\n        this.$refs.clearButton\n      ];\n      if (this.searchEl === void 0 || s.filter(Boolean).some((n) => n.contains(e.target) || n === e.target)) {\n        e.preventDefault();\n        return;\n      }\n      this.open && t ? this.searchEl.blur() : this.disabled || (this.open = !0, this.searchEl.focus());\n    },\n    isOptionSelected(e) {\n      return this.selectedValue.some((t) => this.optionComparator(t, e));\n    },\n    isOptionDeselectable(e) {\n      return this.isOptionSelected(e) && this.deselectFromDropdown;\n    },\n    optionComparator(e, t) {\n      return this.getOptionKey(e) === this.getOptionKey(t);\n    },\n    findOptionFromReducedValue(e) {\n      const t = (n) => JSON.stringify(this.reduce(n)) === JSON.stringify(e), s = [...this.options, ...this.pushedTags].filter(t);\n      return s.length === 1 ? s[0] : s.find((n) => this.optionComparator(n, this.$data._value)) || e;\n    },\n    closeSearchOptions() {\n      this.open = !1, this.$emit(\"search:blur\");\n    },\n    maybeDeleteValue() {\n      if (!this.searchEl.value.length && this.selectedValue && this.selectedValue.length && this.clearable) {\n        let e = null;\n        this.multiple && (e = [\n          ...this.selectedValue.slice(0, this.selectedValue.length - 1)\n        ]), this.updateValue(e);\n      }\n    },\n    optionExists(e) {\n      return this.optionList.some((t) => this.optionComparator(t, e));\n    },\n    normalizeOptionForSlot(e) {\n      return typeof e == \"object\" ? e : { [this.label]: e };\n    },\n    pushTag(e) {\n      this.pushedTags.push(e);\n    },\n    onEscape() {\n      this.search.length ? this.search = \"\" : this.searchEl.blur();\n    },\n    onSearchBlur() {\n      if (this.mousedown && !this.searching)\n        this.mousedown = !1;\n      else {\n        const { clearSearchOnSelect: e, multiple: t } = this;\n        this.clearSearchOnBlur({ clearSearchOnSelect: e, multiple: t }) && (this.search = \"\"), this.closeSearchOptions();\n        return;\n      }\n      if (this.search.length === 0 && this.options.length === 0) {\n        this.closeSearchOptions();\n        return;\n      }\n    },\n    onSearchFocus() {\n      this.open = !0, this.$emit(\"search:focus\");\n    },\n    onMousedown() {\n      this.mousedown = !0;\n    },\n    onMouseUp() {\n      this.mousedown = !1;\n    },\n    onSearchKeyDown(e) {\n      const t = (l) => (l.preventDefault(), !this.isComposing && this.typeAheadSelect()), s = {\n        8: (l) => this.maybeDeleteValue(),\n        9: (l) => this.onTab(),\n        27: (l) => this.onEscape(),\n        38: (l) => (l.preventDefault(), this.typeAheadUp()),\n        40: (l) => (l.preventDefault(), this.typeAheadDown())\n      };\n      this.selectOnKeyCodes.forEach((l) => s[l] = t);\n      const n = this.mapKeydown(s, this);\n      if (typeof n[e.keyCode] == \"function\")\n        return n[e.keyCode](e);\n    }\n  }\n}, he = [\"dir\"], ce = [\"id\", \"aria-expanded\", \"aria-owns\"], ue = {\n  ref: \"selectedOptions\",\n  class: \"vs__selected-options\"\n}, pe = [\"disabled\", \"title\", \"aria-label\", \"onClick\"], fe = {\n  ref: \"actions\",\n  class: \"vs__actions\"\n}, ge = [\"disabled\"], ye = { class: \"vs__spinner\" }, me = [\"id\"], be = [\"id\", \"aria-selected\", \"onMouseover\", \"onClick\"], _e = {\n  key: 0,\n  class: \"vs__no-options\"\n}, Oe = /* @__PURE__ */ v(\" Sorry, no matching options. \"), we = [\"id\"];\nfunction ve(e, t, s, n, l, i) {\n  const y = K(\"append-to-body\");\n  return a(), h(\"div\", {\n    dir: s.dir,\n    class: A([\"v-select\", i.stateClasses])\n  }, [\n    r(e.$slots, \"header\", d(c(i.scope.header))),\n    u(\"div\", {\n      id: `vs${s.uid}__combobox`,\n      ref: \"toggle\",\n      class: \"vs__dropdown-toggle\",\n      role: \"combobox\",\n      \"aria-expanded\": i.dropdownOpen.toString(),\n      \"aria-owns\": `vs${s.uid}__listbox`,\n      \"aria-label\": \"Search for option\",\n      onMousedown: t[1] || (t[1] = (o) => i.toggleDropdown(o))\n    }, [\n      u(\"div\", ue, [\n        (a(!0), h(B, null, L(i.selectedValue, (o, p) => r(e.$slots, \"selected-option-container\", {\n          option: i.normalizeOptionForSlot(o),\n          deselect: i.deselect,\n          multiple: s.multiple,\n          disabled: s.disabled\n        }, () => [\n          (a(), h(\"span\", {\n            key: s.getOptionKey(o),\n            class: \"vs__selected\"\n          }, [\n            r(e.$slots, \"selected-option\", d(c(i.normalizeOptionForSlot(o))), () => [\n              v(D(s.getOptionLabel(o)), 1)\n            ]),\n            s.multiple ? (a(), h(\"button\", {\n              key: 0,\n              ref_for: !0,\n              ref: (g) => l.deselectButtons[p] = g,\n              disabled: s.disabled,\n              type: \"button\",\n              class: \"vs__deselect\",\n              title: `Deselect ${s.getOptionLabel(o)}`,\n              \"aria-label\": `Deselect ${s.getOptionLabel(o)}`,\n              onClick: (g) => i.deselect(o)\n            }, [\n              (a(), b(_(i.childComponents.Deselect)))\n            ], 8, pe)) : O(\"\", !0)\n          ]))\n        ])), 256)),\n        r(e.$slots, \"search\", d(c(i.scope.search)), () => [\n          u(\"input\", k({ class: \"vs__search\" }, i.scope.search.attributes, j(i.scope.search.events)), null, 16)\n        ])\n      ], 512),\n      u(\"div\", fe, [\n        w(u(\"button\", {\n          ref: \"clearButton\",\n          disabled: s.disabled,\n          type: \"button\",\n          class: \"vs__clear\",\n          title: \"Clear Selected\",\n          \"aria-label\": \"Clear Selected\",\n          onClick: t[0] || (t[0] = (...o) => i.clearSelection && i.clearSelection(...o))\n        }, [\n          (a(), b(_(i.childComponents.Deselect)))\n        ], 8, ge), [\n          [P, i.showClearButton]\n        ]),\n        r(e.$slots, \"open-indicator\", d(c(i.scope.openIndicator)), () => [\n          s.noDrop ? O(\"\", !0) : (a(), b(_(i.childComponents.OpenIndicator), d(k({ key: 0 }, i.scope.openIndicator.attributes)), null, 16))\n        ]),\n        r(e.$slots, \"spinner\", d(c(i.scope.spinner)), () => [\n          w(u(\"div\", ye, \"Loading...\", 512), [\n            [P, e.mutableLoading]\n          ])\n        ])\n      ], 512)\n    ], 40, ce),\n    $(R, { name: s.transition }, {\n      default: z(() => [\n        i.dropdownOpen ? w((a(), h(\"ul\", {\n          id: `vs${s.uid}__listbox`,\n          ref: \"dropdownMenu\",\n          key: `vs${s.uid}__listbox`,\n          class: \"vs__dropdown-menu\",\n          role: \"listbox\",\n          tabindex: \"-1\",\n          onMousedown: t[2] || (t[2] = F((...o) => i.onMousedown && i.onMousedown(...o), [\"prevent\"])),\n          onMouseup: t[3] || (t[3] = (...o) => i.onMouseUp && i.onMouseUp(...o))\n        }, [\n          r(e.$slots, \"list-header\", d(c(i.scope.listHeader))),\n          (a(!0), h(B, null, L(i.filteredOptions, (o, p) => (a(), h(\"li\", {\n            id: `vs${s.uid}__option-${p}`,\n            key: s.getOptionKey(o),\n            role: \"option\",\n            class: A([\"vs__dropdown-option\", {\n              \"vs__dropdown-option--deselect\": i.isOptionDeselectable(o) && p === e.typeAheadPointer,\n              \"vs__dropdown-option--selected\": i.isOptionSelected(o),\n              \"vs__dropdown-option--highlight\": p === e.typeAheadPointer,\n              \"vs__dropdown-option--disabled\": !s.selectable(o)\n            }]),\n            \"aria-selected\": p === e.typeAheadPointer ? !0 : null,\n            onMouseover: (g) => s.selectable(o) ? e.typeAheadPointer = p : null,\n            onClick: F((g) => s.selectable(o) ? i.select(o) : null, [\"prevent\", \"stop\"])\n          }, [\n            r(e.$slots, \"option\", d(c(i.normalizeOptionForSlot(o))), () => [\n              v(D(s.getOptionLabel(o)), 1)\n            ])\n          ], 42, be))), 128)),\n          i.filteredOptions.length === 0 ? (a(), h(\"li\", _e, [\n            r(e.$slots, \"no-options\", d(c(i.scope.noOptions)), () => [\n              Oe\n            ])\n          ])) : O(\"\", !0),\n          r(e.$slots, \"list-footer\", d(c(i.scope.listFooter)))\n        ], 40, me)), [\n          [y]\n        ]) : (a(), h(\"ul\", {\n          key: 1,\n          id: `vs${s.uid}__listbox`,\n          role: \"listbox\",\n          style: { display: \"none\", visibility: \"hidden\" }\n        }, null, 8, we))\n      ]),\n      _: 3\n    }, 8, [\"name\"]),\n    r(e.$slots, \"footer\", d(c(i.scope.footer)))\n  ], 10, he);\n}\nconst Ce = /* @__PURE__ */ S(de, [[\"render\", ve]]);\nexport {\n  Ce as default\n};\n","\n//Component colors\nexport const componentColors = {\n  DEFAULT: 'default',\n  PRIMARY: 'primary',\n  PRIMARY_MUTED: 'primaryMuted',\n  MUTED: 'muted',\n  LIGHT: 'light',\n  SUCCESS: 'success',\n  WARNING: 'warning',\n  DANGER: 'danger',\n  INFO: 'info',\n}\n\n//Component sizes\nexport const componentSizes = {\n  XS: 'xs',\n  S: 's',\n  M: 'm',\n  L: 'l',\n  XL: 'xl',\n  XXL: 'xxl',\n  XXXL: 'xxxl',\n}\n","<script setup>\nimport {componentColors, componentSizes} from '@/constants/components.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'click',\n])\nconst props = defineProps({\n  icon: {\n    type: String,\n    required: true,\n  },\n  size: {\n    type: String,\n    default: '',\n    validator(value) {\n      if (value === '') {\n        return true\n      }\n      return Object.values(componentSizes).includes(value)\n    },\n  },\n  color: {\n    type: String,\n    default: '',\n    validator(value) {\n      if (value === '') {\n        return true\n      }\n      return Object.values(componentColors).includes(value)\n    },\n  },\n  rotate: {\n    type: Number,\n    default: 0,\n    validator: (value) => value >= -360 && value <= 360,\n  },\n  isInline: {\n    type: Boolean,\n    default: false,\n  },\n  isOutlined: {\n    type: Boolean,\n    default: false,\n  },\n  noPointerEvents: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Extract props and determine transformation\nconst {rotate} = toRefs(props)\nconst transform = computed(() => rotate.value ? `rotate(${rotate.value}deg)` : '')\n</script>\n\n<template>\n  <span\n    :class=\"{\n      [$style.icon]: true,\n      [$style[size]]: !!size,\n      [$style[color]]: !!color,\n      [$style.inline]: isInline,\n      [$style.outlined]: isOutlined,\n    }\"\n    :style=\"{transform}\"\n    v-bind=\"$attrs\"\n    @click=\"$emit('click', $event)\"\n  >\n    {{ icon }}\n  </span>\n</template>\n\n<style module lang=\"scss\">\n.icon {\n  font-family: 'Material Symbols Outlined';\n  font-weight: normal;\n  font-style: normal;\n  font-display: block;\n  font-size: 24px; /* \"m\" */\n  width: 24px;\n  height: 24px;\n  vertical-align: top;\n  line-height: 1;\n  letter-spacing: normal;\n  text-transform: none;\n  display: inline-block;\n  cursor: default;\n  white-space: nowrap;\n  word-wrap: normal;\n  direction: ltr;\n  text-decoration: none !important;\n  transition: all var(--transition-cubic-fast);\n  font-feature-settings: 'liga';\n  -webkit-font-smoothing: antialiased;\n  font-variation-settings:\n    'FILL' 1,\n    'wght' 400,\n    'GRAD' 0,\n    'opsz' 24;\n\n  /* Outlined */\n  &.outlined {\n    font-variation-settings:\n      'FILL' 0,\n      'wght' 400,\n      'GRAD' 0,\n      'opsz' 24;\n  }\n\n  /* Colors */\n  &.default {\n    color: var(--color-elements);\n  }\n  &.primary {\n    color: var(--color-elements-primary);\n  }\n  &.primaryMuted {\n    color: var(--color-elements-primary-muted);\n  }\n  &.muted {\n    color: var(--color-elements-muted);\n  }\n  &.light {\n    color: var(--color-elements-light);\n  }\n  &.success {\n    color: var(--color-status-success);\n  }\n  &.warning {\n    color: var(--color-status-warning);\n  }\n  &.danger {\n    color: var(--color-status-danger);\n  }\n  &.info {\n    color: var(--color-status-info);\n  }\n\n  /* Sizing */\n  &.xs {\n    font-size: 16px;\n    width: 16px;\n    height: 16px;\n    &.inline {\n      transform: translateY(3px);\n    }\n  }\n  &.s {\n    font-size: 20px;\n    width: 20px;\n    height: 20px;\n  }\n  &.m {\n    font-size: 24px;\n    width: 24px;\n    height: 24px;\n  }\n  &.l {\n    font-size: 32px;\n    width: 32px;\n    height: 32px;\n  }\n  &.xl {\n    font-size: 48px;\n    width: 48px;\n    height: 48px;\n  }\n  &.xxl {\n    font-size: 64px;\n    width: 64px;\n    height: 64px;\n  }\n  &.xxxl {\n    font-size: 96px;\n    width: 96px;\n    height: 96px;\n  }\n}\n</style>\n","\n//App environments\nexport const environments = {\n  LOCAL: 'local',\n  DEV: 'dev',\n  QA: 'qa',\n  STAGING: 'staging',\n  PRODUCTION: 'production',\n}\n\n//App domains\nexport const domains = {\n  LOCAL: 'localhost',\n  DEV: 'dev.arist.app',\n  QA: 'qa.arist.app',\n  STAGING: 'staging.arist.app',\n  PRODUCTION: 'arist.app',\n}\n\n//Messenger URLs\nexport const messengerBaseUrls = {\n  LOCAL: 'http://localhost:8887',\n  DEV: 'https://messenger.dev.arist.app',\n  QA: 'https://messenger.qa.arist.app',\n  STAGING: 'https://messenger.staging.arist.app',\n  PRODUCTION: 'https://messenger.arist.app',\n}\n\n//API URL's\nexport const apiBaseUrls = {\n  LOCAL: 'http://localhost:8888',\n  DEV: 'https://dev.arist.app',\n  QA: 'https://qa.arist.app',\n  STAGING: 'https://staging.arist.app',\n  PRODUCTION: 'https://arist.app',\n}\n","import {environments, domains, messengerBaseUrls, apiBaseUrls} from '@/constants/app.js'\nimport {computed, ref} from 'vue'\n\n/**\n * Environment composable\n */\nexport function useEnv() {\n\n  //Origin and hostname\n  const href = computed(() => window.location.href)\n  const origin = computed(() => window.location.origin)\n  const hostname = computed(() => window.location.hostname)\n  const port = computed(() => window.location.port)\n\n  //Determine app environment. Ideally, this is set by the server as a\n  //global variable distinct from the NODE_ENV, but for now we'll just infer\n  //it from the hostname.\n  const env = computed(() => {\n    switch (hostname.value) {\n      case domains.LOCAL:\n        return environments.LOCAL\n      case domains.DEV:\n        return environments.DEV\n      case domains.QA:\n        return environments.QA\n      case domains.STAGING:\n        return environments.STAGING\n      case domains.PRODUCTION:\n      default:\n        return environments.PRODUCTION\n    }\n  })\n\n  //Git hash\n  const gitHash = ref(import.meta.env.VITE_APP_GIT_HASH)\n\n  //Messenger base URL\n  const messengerBaseUrl = computed(() => {\n    switch (env.value) {\n      case environments.LOCAL:\n        return messengerBaseUrls.LOCAL\n      case environments.DEV:\n        return messengerBaseUrls.DEV\n      case environments.QA:\n        return messengerBaseUrls.QA\n      case environments.STAGING:\n        return messengerBaseUrls.STAGING\n      case environments.PRODUCTION:\n        return messengerBaseUrls.PRODUCTION\n      default:\n        throw new Error(`Unknown environment: ${env.value}`)\n    }\n  })\n\n  //Helper refs\n  const isLocal = computed(() => env.value === environments.LOCAL)\n  const isDev = computed(() => env.value === environments.DEV)\n  const isQa = computed(() => env.value === environments.QA)\n  const isStaging = computed(() => env.value === environments.STAGING)\n  const isProduction = computed(() => env.value === environments.PRODUCTION)\n\n  //Special check for test suite\n  const isTest = computed(() => (\n    (hostname.value == 'localhost' || hostname.value == '127.0.0.1')\n    && port.value >= 8889\n  ))\n\n  //API base URL\n  const apiBaseUrl = computed(() => {\n    switch (env.value) {\n      case environments.LOCAL:\n        return apiBaseUrls.LOCAL\n      case environments.DEV:\n        return apiBaseUrls.DEV\n      case environments.QA:\n        return apiBaseUrls.QA\n      case environments.STAGING:\n        return apiBaseUrls.STAGING\n      case environments.PRODUCTION:\n        return apiBaseUrls.PRODUCTION\n      default:\n        throw new Error(`Unknown environment: ${env.value}`)\n    }\n  })\n\n  //Expose interface\n  return {\n    env,\n    href,\n    origin,\n    hostname,\n    port,\n    isLocal,\n    isDev,\n    isQa,\n    isStaging,\n    isProduction,\n    isTest,\n    gitHash,\n    messengerBaseUrl,\n    apiBaseUrl,\n  }\n}\n","<script setup>\nimport {useEnv} from '@/composables/use-env.js'\n\n//Emits and props\ndefineProps({\n  content: {\n    type: [String, Number, Object, Array],\n    default: '',\n  },\n})\n\n//Environment\nconst {isLocal, isDev, isQa} = useEnv()\n</script>\n\n<template>\n  <pre\n    v-if=\"isLocal || isDev || isQa\"\n    :class=\"$style.debug\"\n  ><slot>{{ content }}</slot></pre>\n</template>\n\n<style module lang=\"scss\">\n.debug {\n  margin: 1rem 0;\n  padding: 2rem;\n  background: var(--color-blue);\n  color: var(--color-white);\n  border-radius: var(--border-radius-m);\n  max-width: min(100%, 80vw); /* Prevent excessive width */\n  white-space: pre-wrap !important;\n}\n</style>\n","<script setup>\n\n//This is needed to prevent https://github.com/vuejs/vue/issues/11654\nconst beforeLeave = el => {\n  const {marginLeft, marginTop, width, height} = window.getComputedStyle(el)\n  el.style.left = `${el.offsetLeft - parseFloat(marginLeft, 10)}px`\n  el.style.top = `${el.offsetTop - parseFloat(marginTop, 10)}px`\n  el.style.width = width\n  el.style.height = height\n}\n</script>\n<template>\n  <TransitionGroup\n    tag=\"div\"\n    :class=\"$style.container\"\n    :move-class=\"$style.move\"\n    :enter-active-class=\"$style.from\"\n    :leave-active-class=\"$style.leaveActive\"\n    :enter-from-class=\"$style.to\"\n    :leave-to-class=\"$style.to\"\n    hide-empty\n    @before-leave=\"beforeLeave\"\n  >\n    <slot />\n  </TransitionGroup>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  position: fixed;\n  top: 0;\n  right: 0;\n  width: 100vw;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-end;\n  gap: 1rem;\n  padding: 2rem;\n  pointer-events: none;\n}\n.move, .from, .leaveActive {\n  transition: all var(--transition-cubic);\n}\n.to {\n  opacity: 0;\n  transform: translate(5rem, 0);\n}\n.leaveActive {\n  position: absolute;\n}\n</style>\n","export default \"__VITE_ASSET__CvxNQvHc__\"","<script setup>\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  count: {\n    type: [Number, String],\n    required: true,\n  },\n  showZero: {\n    type: Boolean,\n    default: false,\n  },\n  isActive: {\n    type: Boolean,\n    default: true,\n  },\n  isFlexible: {\n    type: Boolean,\n    default: false,\n  },\n  isInverse: {\n    type: Boolean,\n    default: false,\n  },\n  isLarge: {\n    type: Boolean,\n    default: false,\n  },\n  isClickable: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Handle click\nconst {isClickable} = toRefs(props)\nconst handleClick = event => {\n  if (isClickable.value) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    v-if=\"count || showZero\"\n    :class=\"{\n      [$style.count]: true,\n      [$style.active]: isActive,\n      [$style.large]: isLarge,\n      [$style.flexible]: isFlexible,\n      [$style.inverse]: isInverse,\n    }\"\n    :is-clickable=\"isClickable\"\n    is-default\n    @click=\"handleClick($event)\"\n  >\n    <span>{{ count }}</span>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.count {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 21px;\n  width: 21px;\n  min-width: 21px;\n  border-radius: var(--border-radius-s);\n  text-shadow: 0px 0px 1px var(--color-white); /* Bold text will shift the width of the button */\n  font-size: var(--font-size-text-small);\n  transition: background-color var(--transition-ease), color var(--transition-ease);\n  &[is-clickable]:not(.active):hover {\n    background-color: var(--bg-highlight-hover);\n  }\n  &.active {\n    color: var(--color-white);\n    background-color: var(--bg-primary);\n  }\n  &.large {\n    height: 31px;\n    width: 31px;\n    min-width: 31px;\n    font-size: var(--font-size-text-normal);\n  }\n  &.flexible {\n    width: auto;\n  }\n  &.inverse {\n    color: var(--color-primary);\n    background-color: var(--color-white);\n  }\n}\n</style>\n","<template>\n  <Transition\n    :enter-active-class=\"$style.from\"\n    :leave-active-class=\"$style.from\"\n    :enter-from-class=\"$style.to\"\n    :leave-to-class=\"$style.to\"\n    appear\n  >\n    <slot />\n  </Transition>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: all var(--transition-cubic-fast);\n}\n.to {\n  transform: scale(0.5);\n  opacity: 0;\n}\n</style>\n","import {computed, Comment, Fragment, Text, useSlots} from 'vue'\n\n/**\n * Helper to check if Node is empty\n */\nexport function vNodeIsEmpty (vnodes) {\n  return vnodes.every(node => {\n    if (node.type === Comment) {\n      return true\n    }\n    if (node.type === Text && !node.children.trim()) {\n      return true\n    }\n    if (node.type === Fragment && vNodeIsEmpty(node.children)) {\n      return true\n    }\n    return false\n  })\n}\n\n/**\n * Returns true if a slot has no content\n */\nexport function isEmpty(slot, props) {\n  if (!slot) {\n    return true\n  }\n  return vNodeIsEmpty(slot(props))\n}\n\n/**\n * Compo\n */\nexport function useEmptySlotsCheck(slotKey = 'default') {\n\n  //Get slots\n  const slots = useSlots()\n  const slot = slots[slotKey]\n\n  //Check if slot empty\n  const isSlotEmpty = computed(() => !slot || isEmpty(slot))\n  const emptySlots = computed(() => Object\n    .keys(slots)\n    .filter(key => isEmpty(slots[key]))\n    .reduce((obj, key) => {\n      obj[key] = true\n      return obj\n    }, {})\n  )\n\n  //Expose interface\n  return {\n    isSlotEmpty,\n    emptySlots,\n  }\n}\n","\n//Helper to open a page either in current tab or new tab\nexport function openUrl(url, params, blank = false) {\n\n  //Convert to string if URL object given\n  if (url instanceof URL) {\n    url = url.toString()\n  }\n\n  //Construct query string from params\n  if (params) {\n    const search = getURLSearchParams(params)\n    url = search.size ? `${url}?${search}` : url\n  }\n\n  //Open in new tab\n  if (blank) {\n    window.open(url, '_blank') //`_blank${Date.now()}`\n  }\n  else {\n    window.location.href = url\n  }\n}\n\n//Helper to join URL paths\nexport function joinPaths(...args) {\n  const paths = []\n  for (let path of args) {\n    if (path === null || path === undefined || path === '/') {\n      continue\n    }\n    path = String(path)\n    if (path !== '') {\n      paths.push(path)\n    }\n  }\n  return paths\n    .join('/')\n    .replace(/([^:])(\\/\\/+)/g, '$1/')\n    .replace(/^\\/\\//, '/')\n}\n\n//Get URL search params\nexport function getURLSearchParams(params) {\n\n  //Initialize\n  const search = new URLSearchParams()\n\n  //Nothing to append\n  if (!params) {\n    return search\n  }\n\n  //Append params (this must be done like this to properly handle arrays)\n  Object\n    .entries(params)\n    .forEach(([key, value]) => {\n      appendSearchParams(search, key, value)\n    })\n\n  //Return\n  return search\n}\n\n//Private helper to convert a value to string and append to search params\nfunction appendSearchParams(search, key, value) {\n  if (Array.isArray(value)) {\n    value.forEach((item) => {\n      appendSearchParams(search, `${key}[]`, item)\n    })\n  }\n  else if (typeof value === 'object' && value !== null) {\n    Object.entries(value).forEach(([subKey, subValue]) => {\n      appendSearchParams(search, `${key}[${subKey}]`, subValue)\n    })\n  }\n  else {\n    if (value?.toString) {\n      search.append(key, value.toString())\n    }\n  }\n}\n","\n/**\n * Local storage composable\n */\nexport function useLocalStorage() {\n\n  //Get item from local storage\n  const getFromLocalStorage = (key, defaultValue) => {\n    try {\n      const raw = localStorage.getItem(key)\n      if (raw === null) {\n        return defaultValue\n      }\n      if (raw.startsWith('{') || raw.startsWith('[') || raw.startsWith('\"')) {\n        return JSON.parse(raw)\n      }\n      if (typeof raw === 'string' && raw.match(/^-?\\d+$/)) {\n        return parseInt(raw)\n      }\n      if (raw === 'true') {\n        return true\n      }\n      if (raw === 'false') {\n        return false\n      }\n      return raw\n    }\n    catch {\n      return defaultValue\n    }\n  }\n\n  //Set item in local storage\n  const setInLocalStorage = (key, value) => {\n    try {\n      const raw = JSON.stringify(value)\n      localStorage.setItem(key, raw)\n    }\n    catch {\n      //Fall through\n    }\n  }\n\n  //Remove item from local storage\n  const removeFromLocalStorage = (key) => {\n    try {\n      localStorage.removeItem(key)\n    }\n    catch {\n      //Fall through\n    }\n  }\n\n  //Return interface\n  return {\n    getFromLocalStorage,\n    setInLocalStorage,\n    removeFromLocalStorage,\n  }\n}\n","/*!\n  * vue-router v4.4.5\n  * (c) 2024 Eduardo San Martin Morote\n  * @license MIT\n  */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n    return (typeof component === 'object' ||\n        'displayName' in component ||\n        'props' in component ||\n        '__vccOpts' in component);\n}\nfunction isESModule(obj) {\n    return (obj.__esModule ||\n        obj[Symbol.toStringTag] === 'Module' ||\n        // support CF with dynamic imports that do not\n        // add the Module string tag\n        (obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n    const newParams = {};\n    for (const key in params) {\n        const value = params[key];\n        newParams[key] = isArray(value)\n            ? value.map(fn)\n            : fn(value);\n    }\n    return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n    // avoid using ...args as it breaks in older Edge builds\n    const args = Array.from(arguments).slice(1);\n    console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n    return encodeURI('' + text)\n        .replace(ENC_PIPE_RE, '|')\n        .replace(ENC_BRACKET_OPEN_RE, '[')\n        .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n    return commonEncode(text)\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n    return (commonEncode(text)\n        // Encode the space as +, encode the + to differentiate it from the space\n        .replace(PLUS_RE, '%2B')\n        .replace(ENC_SPACE_RE, '+')\n        .replace(HASH_RE, '%23')\n        .replace(AMPERSAND_RE, '%26')\n        .replace(ENC_BACKTICK_RE, '`')\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n    return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n    return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n    return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n    try {\n        return decodeURIComponent('' + text);\n    }\n    catch (err) {\n        (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n    }\n    return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n    let path, query = {}, searchString = '', hash = '';\n    // Could use URL and URLSearchParams but IE 11 doesn't support it\n    // TODO: move to new URL()\n    const hashPos = location.indexOf('#');\n    let searchPos = location.indexOf('?');\n    // the hash appears before the search, so it's not part of the search string\n    if (hashPos < searchPos && hashPos >= 0) {\n        searchPos = -1;\n    }\n    if (searchPos > -1) {\n        path = location.slice(0, searchPos);\n        searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n        query = parseQuery(searchString);\n    }\n    if (hashPos > -1) {\n        path = path || location.slice(0, hashPos);\n        // keep the # character\n        hash = location.slice(hashPos, location.length);\n    }\n    // no search and no query\n    path = resolveRelativePath(path != null ? path : location, currentLocation);\n    // empty path means a relative query or hash `?foo=f`, `#thing`\n    return {\n        fullPath: path + (searchString && '?') + searchString + hash,\n        path,\n        query,\n        hash: decode(hash),\n    };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n    const query = location.query ? stringifyQuery(location.query) : '';\n    return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n    // no base or base is not found at the beginning\n    if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n        return pathname;\n    return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n    const aLastIndex = a.matched.length - 1;\n    const bLastIndex = b.matched.length - 1;\n    return (aLastIndex > -1 &&\n        aLastIndex === bLastIndex &&\n        isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n        isSameRouteLocationParams(a.params, b.params) &&\n        stringifyQuery(a.query) === stringifyQuery(b.query) &&\n        a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n    // since the original record has an undefined value for aliasOf\n    // but all aliases point to the original record, this will always compare\n    // the original record\n    return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n    if (Object.keys(a).length !== Object.keys(b).length)\n        return false;\n    for (const key in a) {\n        if (!isSameRouteLocationParamsValue(a[key], b[key]))\n            return false;\n    }\n    return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n    return isArray(a)\n        ? isEquivalentArray(a, b)\n        : isArray(b)\n            ? isEquivalentArray(b, a)\n            : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n    return isArray(b)\n        ? a.length === b.length && a.every((value, i) => value === b[i])\n        : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n    if (to.startsWith('/'))\n        return to;\n    if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n        warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n        return to;\n    }\n    if (!to)\n        return from;\n    const fromSegments = from.split('/');\n    const toSegments = to.split('/');\n    const lastToSegment = toSegments[toSegments.length - 1];\n    // make . and ./ the same (../ === .., ../../ === ../..)\n    // this is the same behavior as new URL()\n    if (lastToSegment === '..' || lastToSegment === '.') {\n        toSegments.push('');\n    }\n    let position = fromSegments.length - 1;\n    let toPosition;\n    let segment;\n    for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n        segment = toSegments[toPosition];\n        // we stay on the same position\n        if (segment === '.')\n            continue;\n        // go up in the from array\n        if (segment === '..') {\n            // we can't go below zero, but we still need to increment toPosition\n            if (position > 1)\n                position--;\n            // continue\n        }\n        // we reached a non-relative path, we stop here\n        else\n            break;\n    }\n    return (fromSegments.slice(0, position).join('/') +\n        '/' +\n        toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n *   if (from === START_LOCATION) {\n *     // initial navigation\n *   }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n    path: '/',\n    // TODO: could we use a symbol in the future?\n    name: undefined,\n    params: {},\n    query: {},\n    hash: '',\n    fullPath: '/',\n    matched: [],\n    meta: {},\n    redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n    NavigationType[\"pop\"] = \"pop\";\n    NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n    NavigationDirection[\"back\"] = \"back\";\n    NavigationDirection[\"forward\"] = \"forward\";\n    NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n    if (!base) {\n        if (isBrowser) {\n            // respect <base> tag\n            const baseEl = document.querySelector('base');\n            base = (baseEl && baseEl.getAttribute('href')) || '/';\n            // strip full URL origin\n            base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n        }\n        else {\n            base = '/';\n        }\n    }\n    // ensure leading slash when it was removed by the regex above avoid leading\n    // slash with hash because the file could be read from the disk like file://\n    // and the leading slash would cause problems\n    if (base[0] !== '/' && base[0] !== '#')\n        base = '/' + base;\n    // remove the trailing slash so all other method can just do `base + fullPath`\n    // to build an href\n    return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n    return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n    const docRect = document.documentElement.getBoundingClientRect();\n    const elRect = el.getBoundingClientRect();\n    return {\n        behavior: offset.behavior,\n        left: elRect.left - docRect.left - (offset.left || 0),\n        top: elRect.top - docRect.top - (offset.top || 0),\n    };\n}\nconst computeScrollPosition = () => ({\n    left: window.scrollX,\n    top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n    let scrollToOptions;\n    if ('el' in position) {\n        const positionEl = position.el;\n        const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n        /**\n         * `id`s can accept pretty much any characters, including CSS combinators\n         * like `>` or `~`. It's still possible to retrieve elements using\n         * `document.getElementById('~')` but it needs to be escaped when using\n         * `document.querySelector('#\\\\~')` for it to be valid. The only\n         * requirements for `id`s are them to be unique on the page and to not be\n         * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n         * be properly escaped for it to work with `querySelector`. We could check\n         * for the id selector to be simple (no CSS combinators `+ >~`) but that\n         * would make things inconsistent since they are valid characters for an\n         * `id` but would need to be escaped when using `querySelector`, breaking\n         * their usage and ending up in no selector returned. Selectors need to be\n         * escaped:\n         *\n         * - `#1-thing` becomes `#\\31 -thing`\n         * - `#with~symbols` becomes `#with\\\\~symbols`\n         *\n         * - More information about  the topic can be found at\n         *   https://mathiasbynens.be/notes/html5-id-class.\n         * - Practical example: https://mathiasbynens.be/demo/html5-id\n         */\n        if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n            if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n                try {\n                    const foundEl = document.querySelector(position.el);\n                    if (isIdSelector && foundEl) {\n                        warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n                        // return to avoid other warnings\n                        return;\n                    }\n                }\n                catch (err) {\n                    warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n                    // return to avoid other warnings\n                    return;\n                }\n            }\n        }\n        const el = typeof positionEl === 'string'\n            ? isIdSelector\n                ? document.getElementById(positionEl.slice(1))\n                : document.querySelector(positionEl)\n            : positionEl;\n        if (!el) {\n            (process.env.NODE_ENV !== 'production') &&\n                warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n            return;\n        }\n        scrollToOptions = getElementPosition(el, position);\n    }\n    else {\n        scrollToOptions = position;\n    }\n    if ('scrollBehavior' in document.documentElement.style)\n        window.scrollTo(scrollToOptions);\n    else {\n        window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n    }\n}\nfunction getScrollKey(path, delta) {\n    const position = history.state ? history.state.position - delta : -1;\n    return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n    scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n    const scroll = scrollPositions.get(key);\n    // consume it so it's not used again\n    scrollPositions.delete(key);\n    return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\n//   // returns a scroll position that can be saved in history\n//   compute(): ScrollPositionEntry\n//   // can take an extended ScrollPositionEntry\n//   scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler<ScrollPosition> = {\n//   compute: computeScroll,\n//   scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n    const { pathname, search, hash } = location;\n    // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n    const hashPos = base.indexOf('#');\n    if (hashPos > -1) {\n        let slicePos = hash.includes(base.slice(hashPos))\n            ? base.slice(hashPos).length\n            : 1;\n        let pathFromHash = hash.slice(slicePos);\n        // prepend the starting slash to hash so the url starts with /#\n        if (pathFromHash[0] !== '/')\n            pathFromHash = '/' + pathFromHash;\n        return stripBase(pathFromHash, '');\n    }\n    const path = stripBase(pathname, base);\n    return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n    let listeners = [];\n    let teardowns = [];\n    // TODO: should it be a stack? a Dict. Check if the popstate listener\n    // can trigger twice\n    let pauseState = null;\n    const popStateHandler = ({ state, }) => {\n        const to = createCurrentLocation(base, location);\n        const from = currentLocation.value;\n        const fromState = historyState.value;\n        let delta = 0;\n        if (state) {\n            currentLocation.value = to;\n            historyState.value = state;\n            // ignore the popstate and reset the pauseState\n            if (pauseState && pauseState === from) {\n                pauseState = null;\n                return;\n            }\n            delta = fromState ? state.position - fromState.position : 0;\n        }\n        else {\n            replace(to);\n        }\n        // Here we could also revert the navigation by calling history.go(-delta)\n        // this listener will have to be adapted to not trigger again and to wait for the url\n        // to be updated before triggering the listeners. Some kind of validation function would also\n        // need to be passed to the listeners so the navigation can be accepted\n        // call all listeners\n        listeners.forEach(listener => {\n            listener(currentLocation.value, from, {\n                delta,\n                type: NavigationType.pop,\n                direction: delta\n                    ? delta > 0\n                        ? NavigationDirection.forward\n                        : NavigationDirection.back\n                    : NavigationDirection.unknown,\n            });\n        });\n    };\n    function pauseListeners() {\n        pauseState = currentLocation.value;\n    }\n    function listen(callback) {\n        // set up the listener and prepare teardown callbacks\n        listeners.push(callback);\n        const teardown = () => {\n            const index = listeners.indexOf(callback);\n            if (index > -1)\n                listeners.splice(index, 1);\n        };\n        teardowns.push(teardown);\n        return teardown;\n    }\n    function beforeUnloadListener() {\n        const { history } = window;\n        if (!history.state)\n            return;\n        history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n    }\n    function destroy() {\n        for (const teardown of teardowns)\n            teardown();\n        teardowns = [];\n        window.removeEventListener('popstate', popStateHandler);\n        window.removeEventListener('beforeunload', beforeUnloadListener);\n    }\n    // set up the listeners and prepare teardown callbacks\n    window.addEventListener('popstate', popStateHandler);\n    // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n    // https://developer.chrome.com/blog/page-lifecycle-api/\n    window.addEventListener('beforeunload', beforeUnloadListener, {\n        passive: true,\n    });\n    return {\n        pauseListeners,\n        listen,\n        destroy,\n    };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n    return {\n        back,\n        current,\n        forward,\n        replaced,\n        position: window.history.length,\n        scroll: computeScroll ? computeScrollPosition() : null,\n    };\n}\nfunction useHistoryStateNavigation(base) {\n    const { history, location } = window;\n    // private variables\n    const currentLocation = {\n        value: createCurrentLocation(base, location),\n    };\n    const historyState = { value: history.state };\n    // build current history entry as this is a fresh navigation\n    if (!historyState.value) {\n        changeLocation(currentLocation.value, {\n            back: null,\n            current: currentLocation.value,\n            forward: null,\n            // the length is off by one, we need to decrease it\n            position: history.length - 1,\n            replaced: true,\n            // don't add a scroll as the user may have an anchor, and we want\n            // scrollBehavior to be triggered without a saved position\n            scroll: null,\n        }, true);\n    }\n    function changeLocation(to, state, replace) {\n        /**\n         * if a base tag is provided, and we are on a normal domain, we have to\n         * respect the provided `base` attribute because pushState() will use it and\n         * potentially erase anything before the `#` like at\n         * https://github.com/vuejs/router/issues/685 where a base of\n         * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n         * there is no host, the `<base>` tag makes no sense and if there isn't a\n         * base tag we can just use everything after the `#`.\n         */\n        const hashIndex = base.indexOf('#');\n        const url = hashIndex > -1\n            ? (location.host && document.querySelector('base')\n                ? base\n                : base.slice(hashIndex)) + to\n            : createBaseLocation() + base + to;\n        try {\n            // BROWSER QUIRK\n            // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n            history[replace ? 'replaceState' : 'pushState'](state, '', url);\n            historyState.value = state;\n        }\n        catch (err) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('Error with push/replace State', err);\n            }\n            else {\n                console.error(err);\n            }\n            // Force the navigation, this also resets the call count\n            location[replace ? 'replace' : 'assign'](url);\n        }\n    }\n    function replace(to, data) {\n        const state = assign({}, history.state, buildState(historyState.value.back, \n        // keep back and forward entries but override current position\n        to, historyState.value.forward, true), data, { position: historyState.value.position });\n        changeLocation(to, state, true);\n        currentLocation.value = to;\n    }\n    function push(to, data) {\n        // Add to current entry the information of where we are going\n        // as well as saving the current position\n        const currentState = assign({}, \n        // use current history state to gracefully handle a wrong call to\n        // history.replaceState\n        // https://github.com/vuejs/router/issues/366\n        historyState.value, history.state, {\n            forward: to,\n            scroll: computeScrollPosition(),\n        });\n        if ((process.env.NODE_ENV !== 'production') && !history.state) {\n            warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n                `history.replaceState(history.state, '', url)\\n\\n` +\n                `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n        }\n        changeLocation(currentState.current, currentState, true);\n        const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n        changeLocation(to, state, false);\n        currentLocation.value = to;\n    }\n    return {\n        location: currentLocation,\n        state: historyState,\n        push,\n        replace,\n    };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n    base = normalizeBase(base);\n    const historyNavigation = useHistoryStateNavigation(base);\n    const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n    function go(delta, triggerListeners = true) {\n        if (!triggerListeners)\n            historyListeners.pauseListeners();\n        history.go(delta);\n    }\n    const routerHistory = assign({\n        // it's overridden right after\n        location: '',\n        base,\n        go,\n        createHref: createHref.bind(null, base),\n    }, historyNavigation, historyListeners);\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => historyNavigation.location.value,\n    });\n    Object.defineProperty(routerHistory, 'state', {\n        enumerable: true,\n        get: () => historyNavigation.state.value,\n    });\n    return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n    let listeners = [];\n    let queue = [START];\n    let position = 0;\n    base = normalizeBase(base);\n    function setLocation(location) {\n        position++;\n        if (position !== queue.length) {\n            // we are in the middle, we remove everything from here in the queue\n            queue.splice(position);\n        }\n        queue.push(location);\n    }\n    function triggerListeners(to, from, { direction, delta }) {\n        const info = {\n            direction,\n            delta,\n            type: NavigationType.pop,\n        };\n        for (const callback of listeners) {\n            callback(to, from, info);\n        }\n    }\n    const routerHistory = {\n        // rewritten by Object.defineProperty\n        location: START,\n        // TODO: should be kept in queue\n        state: {},\n        base,\n        createHref: createHref.bind(null, base),\n        replace(to) {\n            // remove current entry and decrement position\n            queue.splice(position--, 1);\n            setLocation(to);\n        },\n        push(to, data) {\n            setLocation(to);\n        },\n        listen(callback) {\n            listeners.push(callback);\n            return () => {\n                const index = listeners.indexOf(callback);\n                if (index > -1)\n                    listeners.splice(index, 1);\n            };\n        },\n        destroy() {\n            listeners = [];\n            queue = [START];\n            position = 0;\n        },\n        go(delta, shouldTrigger = true) {\n            const from = this.location;\n            const direction = \n            // we are considering delta === 0 going forward, but in abstract mode\n            // using 0 for the delta doesn't make sense like it does in html5 where\n            // it reloads the page\n            delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n            position = Math.max(0, Math.min(position + delta, queue.length - 1));\n            if (shouldTrigger) {\n                triggerListeners(this.location, from, {\n                    direction,\n                    delta,\n                });\n            }\n        },\n    };\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => queue[position],\n    });\n    return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n    // Make sure this implementation is fine in terms of encoding, specially for IE11\n    // for `file://`, directly use the pathname and ignore the base\n    // location.pathname contains an initial `/` even at the root: `https://example.com`\n    base = location.host ? base || location.pathname + location.search : '';\n    // allow the user to provide a `#` in the middle: `/base/#/app`\n    if (!base.includes('#'))\n        base += '#';\n    if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n        warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n    }\n    return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n    return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n    return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n    /**\n     * An aborted navigation is a navigation that failed because a navigation\n     * guard returned `false` or called `next(false)`\n     */\n    NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n    /**\n     * A cancelled navigation is a navigation that failed because a more recent\n     * navigation finished started (not necessarily finished).\n     */\n    NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n    /**\n     * A duplicated navigation is a navigation that failed because it was\n     * initiated while already being at the exact same location.\n     */\n    NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n    [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n        return `No match for\\n ${JSON.stringify(location)}${currentLocation\n            ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n            : ''}`;\n    },\n    [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n        return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n    },\n    [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n        return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n    },\n    [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n        return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n    },\n    [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n        return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n    },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n    // keep full error messages in cjs versions\n    if ((process.env.NODE_ENV !== 'production') || !true) {\n        return assign(new Error(ErrorTypeMessages[type](params)), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n    else {\n        return assign(new Error(), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n}\nfunction isNavigationFailure(error, type) {\n    return (error instanceof Error &&\n        NavigationFailureSymbol in error &&\n        (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n    if (typeof to === 'string')\n        return to;\n    if (to.path != null)\n        return to.path;\n    const location = {};\n    for (const key of propertiesToLog) {\n        if (key in to)\n            location[key] = to[key];\n    }\n    return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n    sensitive: false,\n    strict: false,\n    start: true,\n    end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n    const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n    // the amount of scores is the same as the length of segments except for the root segment \"/\"\n    const score = [];\n    // the regexp as a string\n    let pattern = options.start ? '^' : '';\n    // extracted keys\n    const keys = [];\n    for (const segment of segments) {\n        // the root segment needs special treatment\n        const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n        // allow trailing slash\n        if (options.strict && !segment.length)\n            pattern += '/';\n        for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n            const token = segment[tokenIndex];\n            // resets the score if we are inside a sub-segment /:a-other-:b\n            let subSegmentScore = 40 /* PathScore.Segment */ +\n                (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n            if (token.type === 0 /* TokenType.Static */) {\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    pattern += '/';\n                pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n                subSegmentScore += 40 /* PathScore.Static */;\n            }\n            else if (token.type === 1 /* TokenType.Param */) {\n                const { value, repeatable, optional, regexp } = token;\n                keys.push({\n                    name: value,\n                    repeatable,\n                    optional,\n                });\n                const re = regexp ? regexp : BASE_PARAM_PATTERN;\n                // the user provided a custom regexp /:id(\\\\d+)\n                if (re !== BASE_PARAM_PATTERN) {\n                    subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n                    // make sure the regexp is valid before using it\n                    try {\n                        new RegExp(`(${re})`);\n                    }\n                    catch (err) {\n                        throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n                            err.message);\n                    }\n                }\n                // when we repeat we must take care of the repeating leading slash\n                let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    subPattern =\n                        // avoid an optional / if there are more segments e.g. /:p?-static\n                        // or /:p?-:p2\n                        optional && segment.length < 2\n                            ? `(?:/${subPattern})`\n                            : '/' + subPattern;\n                if (optional)\n                    subPattern += '?';\n                pattern += subPattern;\n                subSegmentScore += 20 /* PathScore.Dynamic */;\n                if (optional)\n                    subSegmentScore += -8 /* PathScore.BonusOptional */;\n                if (repeatable)\n                    subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n                if (re === '.*')\n                    subSegmentScore += -50 /* PathScore.BonusWildcard */;\n            }\n            segmentScores.push(subSegmentScore);\n        }\n        // an empty array like /home/ -> [[{home}], []]\n        // if (!segment.length) pattern += '/'\n        score.push(segmentScores);\n    }\n    // only apply the strict bonus to the last score\n    if (options.strict && options.end) {\n        const i = score.length - 1;\n        score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n    }\n    // TODO: dev only warn double trailing slash\n    if (!options.strict)\n        pattern += '/?';\n    if (options.end)\n        pattern += '$';\n    // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n    else if (options.strict)\n        pattern += '(?:/|$)';\n    const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n    function parse(path) {\n        const match = path.match(re);\n        const params = {};\n        if (!match)\n            return null;\n        for (let i = 1; i < match.length; i++) {\n            const value = match[i] || '';\n            const key = keys[i - 1];\n            params[key.name] = value && key.repeatable ? value.split('/') : value;\n        }\n        return params;\n    }\n    function stringify(params) {\n        let path = '';\n        // for optional parameters to allow to be empty\n        let avoidDuplicatedSlash = false;\n        for (const segment of segments) {\n            if (!avoidDuplicatedSlash || !path.endsWith('/'))\n                path += '/';\n            avoidDuplicatedSlash = false;\n            for (const token of segment) {\n                if (token.type === 0 /* TokenType.Static */) {\n                    path += token.value;\n                }\n                else if (token.type === 1 /* TokenType.Param */) {\n                    const { value, repeatable, optional } = token;\n                    const param = value in params ? params[value] : '';\n                    if (isArray(param) && !repeatable) {\n                        throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n                    }\n                    const text = isArray(param)\n                        ? param.join('/')\n                        : param;\n                    if (!text) {\n                        if (optional) {\n                            // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n                            if (segment.length < 2) {\n                                // remove the last slash as we could be at the end\n                                if (path.endsWith('/'))\n                                    path = path.slice(0, -1);\n                                // do not append a slash on the next iteration\n                                else\n                                    avoidDuplicatedSlash = true;\n                            }\n                        }\n                        else\n                            throw new Error(`Missing required param \"${value}\"`);\n                    }\n                    path += text;\n                }\n            }\n        }\n        // avoid empty path when we have multiple optional params\n        return path || '/';\n    }\n    return {\n        re,\n        score,\n        keys,\n        parse,\n        stringify,\n    };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n    let i = 0;\n    while (i < a.length && i < b.length) {\n        const diff = b[i] - a[i];\n        // only keep going if diff === 0\n        if (diff)\n            return diff;\n        i++;\n    }\n    // if the last subsegment was Static, the shorter segments should be sorted first\n    // otherwise sort the longest segment first\n    if (a.length < b.length) {\n        return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? -1\n            : 1;\n    }\n    else if (a.length > b.length) {\n        return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? 1\n            : -1;\n    }\n    return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n    let i = 0;\n    const aScore = a.score;\n    const bScore = b.score;\n    while (i < aScore.length && i < bScore.length) {\n        const comp = compareScoreArray(aScore[i], bScore[i]);\n        // do not return if both are equal\n        if (comp)\n            return comp;\n        i++;\n    }\n    if (Math.abs(bScore.length - aScore.length) === 1) {\n        if (isLastScoreNegative(aScore))\n            return 1;\n        if (isLastScoreNegative(bScore))\n            return -1;\n    }\n    // if a and b share the same score entries but b has more, sort b first\n    return bScore.length - aScore.length;\n    // this is the ternary version\n    // return aScore.length < bScore.length\n    //   ? 1\n    //   : aScore.length > bScore.length\n    //   ? -1\n    //   : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n    const last = score[score.length - 1];\n    return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n    type: 0 /* TokenType.Static */,\n    value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map<string, Token[][]>()\nfunction tokenizePath(path) {\n    if (!path)\n        return [[]];\n    if (path === '/')\n        return [[ROOT_TOKEN]];\n    if (!path.startsWith('/')) {\n        throw new Error((process.env.NODE_ENV !== 'production')\n            ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n            : `Invalid path \"${path}\"`);\n    }\n    // if (tokenCache.has(path)) return tokenCache.get(path)!\n    function crash(message) {\n        throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n    }\n    let state = 0 /* TokenizerState.Static */;\n    let previousState = state;\n    const tokens = [];\n    // the segment will always be valid because we get into the initial state\n    // with the leading /\n    let segment;\n    function finalizeSegment() {\n        if (segment)\n            tokens.push(segment);\n        segment = [];\n    }\n    // index on the path\n    let i = 0;\n    // char at index\n    let char;\n    // buffer of the value read\n    let buffer = '';\n    // custom regexp for a param\n    let customRe = '';\n    function consumeBuffer() {\n        if (!buffer)\n            return;\n        if (state === 0 /* TokenizerState.Static */) {\n            segment.push({\n                type: 0 /* TokenType.Static */,\n                value: buffer,\n            });\n        }\n        else if (state === 1 /* TokenizerState.Param */ ||\n            state === 2 /* TokenizerState.ParamRegExp */ ||\n            state === 3 /* TokenizerState.ParamRegExpEnd */) {\n            if (segment.length > 1 && (char === '*' || char === '+'))\n                crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n            segment.push({\n                type: 1 /* TokenType.Param */,\n                value: buffer,\n                regexp: customRe,\n                repeatable: char === '*' || char === '+',\n                optional: char === '*' || char === '?',\n            });\n        }\n        else {\n            crash('Invalid state to consume buffer');\n        }\n        buffer = '';\n    }\n    function addCharToBuffer() {\n        buffer += char;\n    }\n    while (i < path.length) {\n        char = path[i++];\n        if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n            previousState = state;\n            state = 4 /* TokenizerState.EscapeNext */;\n            continue;\n        }\n        switch (state) {\n            case 0 /* TokenizerState.Static */:\n                if (char === '/') {\n                    if (buffer) {\n                        consumeBuffer();\n                    }\n                    finalizeSegment();\n                }\n                else if (char === ':') {\n                    consumeBuffer();\n                    state = 1 /* TokenizerState.Param */;\n                }\n                else {\n                    addCharToBuffer();\n                }\n                break;\n            case 4 /* TokenizerState.EscapeNext */:\n                addCharToBuffer();\n                state = previousState;\n                break;\n            case 1 /* TokenizerState.Param */:\n                if (char === '(') {\n                    state = 2 /* TokenizerState.ParamRegExp */;\n                }\n                else if (VALID_PARAM_RE.test(char)) {\n                    addCharToBuffer();\n                }\n                else {\n                    consumeBuffer();\n                    state = 0 /* TokenizerState.Static */;\n                    // go back one character if we were not modifying\n                    if (char !== '*' && char !== '?' && char !== '+')\n                        i--;\n                }\n                break;\n            case 2 /* TokenizerState.ParamRegExp */:\n                // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n                // it already works by escaping the closing )\n                // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n                // is this really something people need since you can also write\n                // /prefix_:p()_suffix\n                if (char === ')') {\n                    // handle the escaped )\n                    if (customRe[customRe.length - 1] == '\\\\')\n                        customRe = customRe.slice(0, -1) + char;\n                    else\n                        state = 3 /* TokenizerState.ParamRegExpEnd */;\n                }\n                else {\n                    customRe += char;\n                }\n                break;\n            case 3 /* TokenizerState.ParamRegExpEnd */:\n                // same as finalizing a param\n                consumeBuffer();\n                state = 0 /* TokenizerState.Static */;\n                // go back one character if we were not modifying\n                if (char !== '*' && char !== '?' && char !== '+')\n                    i--;\n                customRe = '';\n                break;\n            default:\n                crash('Unknown state');\n                break;\n        }\n    }\n    if (state === 2 /* TokenizerState.ParamRegExp */)\n        crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n    consumeBuffer();\n    finalizeSegment();\n    // tokenCache.set(path, tokens)\n    return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n    const parser = tokensToParser(tokenizePath(record.path), options);\n    // warn against params with the same name\n    if ((process.env.NODE_ENV !== 'production')) {\n        const existingKeys = new Set();\n        for (const key of parser.keys) {\n            if (existingKeys.has(key.name))\n                warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n            existingKeys.add(key.name);\n        }\n    }\n    const matcher = assign(parser, {\n        record,\n        parent,\n        // these needs to be populated by the parent\n        children: [],\n        alias: [],\n    });\n    if (parent) {\n        // both are aliases or both are not aliases\n        // we don't want to mix them because the order is used when\n        // passing originalRecord in Matcher.addRoute\n        if (!matcher.record.aliasOf === !parent.record.aliasOf)\n            parent.children.push(matcher);\n    }\n    return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n    // normalized ordered array of matchers\n    const matchers = [];\n    const matcherMap = new Map();\n    globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n    function getRecordMatcher(name) {\n        return matcherMap.get(name);\n    }\n    function addRoute(record, parent, originalRecord) {\n        // used later on to remove by name\n        const isRootAdd = !originalRecord;\n        const mainNormalizedRecord = normalizeRouteRecord(record);\n        if ((process.env.NODE_ENV !== 'production')) {\n            checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n        }\n        // we might be the child of an alias\n        mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n        const options = mergeOptions(globalOptions, record);\n        // generate an array of records to correctly handle aliases\n        const normalizedRecords = [mainNormalizedRecord];\n        if ('alias' in record) {\n            const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n            for (const alias of aliases) {\n                normalizedRecords.push(\n                // we need to normalize again to ensure the `mods` property\n                // being non enumerable\n                normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n                    // this allows us to hold a copy of the `components` option\n                    // so that async components cache is hold on the original record\n                    components: originalRecord\n                        ? originalRecord.record.components\n                        : mainNormalizedRecord.components,\n                    path: alias,\n                    // we might be the child of an alias\n                    aliasOf: originalRecord\n                        ? originalRecord.record\n                        : mainNormalizedRecord,\n                    // the aliases are always of the same kind as the original since they\n                    // are defined on the same record\n                })));\n            }\n        }\n        let matcher;\n        let originalMatcher;\n        for (const normalizedRecord of normalizedRecords) {\n            const { path } = normalizedRecord;\n            // Build up the path for nested routes if the child isn't an absolute\n            // route. Only add the / delimiter if the child path isn't empty and if the\n            // parent path doesn't have a trailing slash\n            if (parent && path[0] !== '/') {\n                const parentPath = parent.record.path;\n                const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n                normalizedRecord.path =\n                    parent.record.path + (path && connectingSlash + path);\n            }\n            if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n                throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n                    'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n            }\n            // create the object beforehand, so it can be passed to children\n            matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n            if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n                checkMissingParamsInAbsolutePath(matcher, parent);\n            // if we are an alias we must tell the original record that we exist,\n            // so we can be removed\n            if (originalRecord) {\n                originalRecord.alias.push(matcher);\n                if ((process.env.NODE_ENV !== 'production')) {\n                    checkSameParams(originalRecord, matcher);\n                }\n            }\n            else {\n                // otherwise, the first record is the original and others are aliases\n                originalMatcher = originalMatcher || matcher;\n                if (originalMatcher !== matcher)\n                    originalMatcher.alias.push(matcher);\n                // remove the route if named and only for the top record (avoid in nested calls)\n                // this works because the original record is the first one\n                if (isRootAdd && record.name && !isAliasRecord(matcher))\n                    removeRoute(record.name);\n            }\n            // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n            // not be reached and pass through the catch all route\n            if (isMatchable(matcher)) {\n                insertMatcher(matcher);\n            }\n            if (mainNormalizedRecord.children) {\n                const children = mainNormalizedRecord.children;\n                for (let i = 0; i < children.length; i++) {\n                    addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n                }\n            }\n            // if there was no original record, then the first one was not an alias and all\n            // other aliases (if any) need to reference this record when adding children\n            originalRecord = originalRecord || matcher;\n            // TODO: add normalized records for more flexibility\n            // if (parent && isAliasRecord(originalRecord)) {\n            //   parent.children.push(originalRecord)\n            // }\n        }\n        return originalMatcher\n            ? () => {\n                // since other matchers are aliases, they should be removed by the original matcher\n                removeRoute(originalMatcher);\n            }\n            : noop;\n    }\n    function removeRoute(matcherRef) {\n        if (isRouteName(matcherRef)) {\n            const matcher = matcherMap.get(matcherRef);\n            if (matcher) {\n                matcherMap.delete(matcherRef);\n                matchers.splice(matchers.indexOf(matcher), 1);\n                matcher.children.forEach(removeRoute);\n                matcher.alias.forEach(removeRoute);\n            }\n        }\n        else {\n            const index = matchers.indexOf(matcherRef);\n            if (index > -1) {\n                matchers.splice(index, 1);\n                if (matcherRef.record.name)\n                    matcherMap.delete(matcherRef.record.name);\n                matcherRef.children.forEach(removeRoute);\n                matcherRef.alias.forEach(removeRoute);\n            }\n        }\n    }\n    function getRoutes() {\n        return matchers;\n    }\n    function insertMatcher(matcher) {\n        const index = findInsertionIndex(matcher, matchers);\n        matchers.splice(index, 0, matcher);\n        // only add the original record to the name map\n        if (matcher.record.name && !isAliasRecord(matcher))\n            matcherMap.set(matcher.record.name, matcher);\n    }\n    function resolve(location, currentLocation) {\n        let matcher;\n        let params = {};\n        let path;\n        let name;\n        if ('name' in location && location.name) {\n            matcher = matcherMap.get(location.name);\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                });\n            // warn if the user is passing invalid params so they can debug it better when they get removed\n            if ((process.env.NODE_ENV !== 'production')) {\n                const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n                if (invalidParams.length) {\n                    warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n                }\n            }\n            name = matcher.record.name;\n            params = assign(\n            // paramsFromLocation is a new object\n            paramsFromLocation(currentLocation.params, \n            // only keep params that exist in the resolved location\n            // only keep optional params coming from a parent record\n            matcher.keys\n                .filter(k => !k.optional)\n                .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n                .map(k => k.name)), \n            // discard any existing params in the current location that do not exist here\n            // #1497 this ensures better active/exact matching\n            location.params &&\n                paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n            // throws if cannot be stringified\n            path = matcher.stringify(params);\n        }\n        else if (location.path != null) {\n            // no need to resolve the path with the matcher as it was provided\n            // this also allows the user to control the encoding\n            path = location.path;\n            if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n                warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n            }\n            matcher = matchers.find(m => m.re.test(path));\n            // matcher should have a value after the loop\n            if (matcher) {\n                // we know the matcher works because we tested the regexp\n                params = matcher.parse(path);\n                name = matcher.record.name;\n            }\n            // location is a relative path\n        }\n        else {\n            // match by name or path of current route\n            matcher = currentLocation.name\n                ? matcherMap.get(currentLocation.name)\n                : matchers.find(m => m.re.test(currentLocation.path));\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                    currentLocation,\n                });\n            name = matcher.record.name;\n            // since we are navigating to the same location, we don't need to pick the\n            // params like when `name` is provided\n            params = assign({}, currentLocation.params, location.params);\n            path = matcher.stringify(params);\n        }\n        const matched = [];\n        let parentMatcher = matcher;\n        while (parentMatcher) {\n            // reversed order so parents are at the beginning\n            matched.unshift(parentMatcher.record);\n            parentMatcher = parentMatcher.parent;\n        }\n        return {\n            name,\n            path,\n            params,\n            matched,\n            meta: mergeMetaFields(matched),\n        };\n    }\n    // add initial routes\n    routes.forEach(route => addRoute(route));\n    function clearRoutes() {\n        matchers.length = 0;\n        matcherMap.clear();\n    }\n    return {\n        addRoute,\n        resolve,\n        removeRoute,\n        clearRoutes,\n        getRoutes,\n        getRecordMatcher,\n    };\n}\nfunction paramsFromLocation(params, keys) {\n    const newParams = {};\n    for (const key of keys) {\n        if (key in params)\n            newParams[key] = params[key];\n    }\n    return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n    const normalized = {\n        path: record.path,\n        redirect: record.redirect,\n        name: record.name,\n        meta: record.meta || {},\n        aliasOf: record.aliasOf,\n        beforeEnter: record.beforeEnter,\n        props: normalizeRecordProps(record),\n        children: record.children || [],\n        instances: {},\n        leaveGuards: new Set(),\n        updateGuards: new Set(),\n        enterCallbacks: {},\n        // must be declared afterwards\n        // mods: {},\n        components: 'components' in record\n            ? record.components || null\n            : record.component && { default: record.component },\n    };\n    // mods contain modules and shouldn't be copied,\n    // logged or anything. It's just used for internal\n    // advanced use cases like data loaders\n    Object.defineProperty(normalized, 'mods', {\n        value: {},\n    });\n    return normalized;\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n    const propsObject = {};\n    // props does not exist on redirect records, but we can set false directly\n    const props = record.props || false;\n    if ('component' in record) {\n        propsObject.default = props;\n    }\n    else {\n        // NOTE: we could also allow a function to be applied to every component.\n        // Would need user feedback for use cases\n        for (const name in record.components)\n            propsObject[name] = typeof props === 'object' ? props[name] : props;\n    }\n    return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n    while (record) {\n        if (record.record.aliasOf)\n            return true;\n        record = record.parent;\n    }\n    return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n    return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n    const options = {};\n    for (const key in defaults) {\n        options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n    }\n    return options;\n}\nfunction isSameParam(a, b) {\n    return (a.name === b.name &&\n        a.optional === b.optional &&\n        a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n    for (const key of a.keys) {\n        if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n    for (const key of b.keys) {\n        if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n    if (parent &&\n        parent.record.name &&\n        !mainNormalizedRecord.name &&\n        !mainNormalizedRecord.path) {\n        warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n    }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n    for (const key of parent.keys) {\n        if (!record.keys.find(isSameParam.bind(null, key)))\n            return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n    }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n    // First phase: binary search based on score\n    let lower = 0;\n    let upper = matchers.length;\n    while (lower !== upper) {\n        const mid = (lower + upper) >> 1;\n        const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n        if (sortOrder < 0) {\n            upper = mid;\n        }\n        else {\n            lower = mid + 1;\n        }\n    }\n    // Second phase: check for an ancestor with the same score\n    const insertionAncestor = getInsertionAncestor(matcher);\n    if (insertionAncestor) {\n        upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n        if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n            // This should never happen\n            warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n        }\n    }\n    return upper;\n}\nfunction getInsertionAncestor(matcher) {\n    let ancestor = matcher;\n    while ((ancestor = ancestor.parent)) {\n        if (isMatchable(ancestor) &&\n            comparePathParserScore(matcher, ancestor) === 0) {\n            return ancestor;\n        }\n    }\n    return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n    return !!(record.name ||\n        (record.components && Object.keys(record.components).length) ||\n        record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n    const query = {};\n    // avoid creating an object with an empty key and empty value\n    // because of split('&')\n    if (search === '' || search === '?')\n        return query;\n    const hasLeadingIM = search[0] === '?';\n    const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n    for (let i = 0; i < searchParams.length; ++i) {\n        // pre decode the + into space\n        const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n        // allow the = character\n        const eqPos = searchParam.indexOf('=');\n        const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n        const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n        if (key in query) {\n            // an extra variable for ts types\n            let currentValue = query[key];\n            if (!isArray(currentValue)) {\n                currentValue = query[key] = [currentValue];\n            }\n            currentValue.push(value);\n        }\n        else {\n            query[key] = value;\n        }\n    }\n    return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n    let search = '';\n    for (let key in query) {\n        const value = query[key];\n        key = encodeQueryKey(key);\n        if (value == null) {\n            // only null adds the value\n            if (value !== undefined) {\n                search += (search.length ? '&' : '') + key;\n            }\n            continue;\n        }\n        // keep null values\n        const values = isArray(value)\n            ? value.map(v => v && encodeQueryValue(v))\n            : [value && encodeQueryValue(value)];\n        values.forEach(value => {\n            // skip undefined values in arrays as if they were not present\n            // smaller code than using filter\n            if (value !== undefined) {\n                // only append & with non-empty search\n                search += (search.length ? '&' : '') + key;\n                if (value != null)\n                    search += '=' + value;\n            }\n        });\n    }\n    return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n    const normalizedQuery = {};\n    for (const key in query) {\n        const value = query[key];\n        if (value !== undefined) {\n            normalizedQuery[key] = isArray(value)\n                ? value.map(v => (v == null ? null : '' + v))\n                : value == null\n                    ? value\n                    : '' + value;\n        }\n    }\n    return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n    let handlers = [];\n    function add(handler) {\n        handlers.push(handler);\n        return () => {\n            const i = handlers.indexOf(handler);\n            if (i > -1)\n                handlers.splice(i, 1);\n        };\n    }\n    function reset() {\n        handlers = [];\n    }\n    return {\n        add,\n        list: () => handlers.slice(),\n        reset,\n    };\n}\n\nfunction registerGuard(record, name, guard) {\n    const removeFromList = () => {\n        record[name].delete(guard);\n    };\n    onUnmounted(removeFromList);\n    onDeactivated(removeFromList);\n    onActivated(() => {\n        record[name].add(guard);\n    });\n    record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n    // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n    const enterCallbackArray = record &&\n        // name is defined if record is because of the function overload\n        (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n    return () => new Promise((resolve, reject) => {\n        const next = (valid) => {\n            if (valid === false) {\n                reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n                    from,\n                    to,\n                }));\n            }\n            else if (valid instanceof Error) {\n                reject(valid);\n            }\n            else if (isRouteLocation(valid)) {\n                reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n                    from: to,\n                    to: valid,\n                }));\n            }\n            else {\n                if (enterCallbackArray &&\n                    // since enterCallbackArray is truthy, both record and name also are\n                    record.enterCallbacks[name] === enterCallbackArray &&\n                    typeof valid === 'function') {\n                    enterCallbackArray.push(valid);\n                }\n                resolve();\n            }\n        };\n        // wrapping with Promise.resolve allows it to work with both async and sync guards\n        const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n        let guardCall = Promise.resolve(guardReturn);\n        if (guard.length < 3)\n            guardCall = guardCall.then(next);\n        if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n            const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n            if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n                guardCall = guardCall.then(resolvedValue => {\n                    // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                    if (!next._called) {\n                        warn(message);\n                        return Promise.reject(new Error('Invalid navigation guard'));\n                    }\n                    return resolvedValue;\n                });\n            }\n            else if (guardReturn !== undefined) {\n                // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                if (!next._called) {\n                    warn(message);\n                    reject(new Error('Invalid navigation guard'));\n                    return;\n                }\n            }\n        }\n        guardCall.catch(err => reject(err));\n    });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n    let called = 0;\n    return function () {\n        if (called++ === 1)\n            warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n        // @ts-expect-error: we put it in the original one because it's easier to check\n        next._called = true;\n        if (called === 1)\n            next.apply(null, arguments);\n    };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n    const guards = [];\n    for (const record of matched) {\n        if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n            warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n                ` or \"children\" property.`);\n        }\n        for (const name in record.components) {\n            let rawComponent = record.components[name];\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (!rawComponent ||\n                    (typeof rawComponent !== 'object' &&\n                        typeof rawComponent !== 'function')) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n                        ` a valid component. Received \"${String(rawComponent)}\".`);\n                    // throw to ensure we stop here but warn to ensure the message isn't\n                    // missed by the user\n                    throw new Error('Invalid route component');\n                }\n                else if ('then' in rawComponent) {\n                    // warn if user wrote import('/component.vue') instead of () =>\n                    // import('./component.vue')\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n                        `Promise instead of a function that returns a Promise. Did you ` +\n                        `write \"import('./MyPage.vue')\" instead of ` +\n                        `\"() => import('./MyPage.vue')\" ? This will break in ` +\n                        `production if not fixed.`);\n                    const promise = rawComponent;\n                    rawComponent = () => promise;\n                }\n                else if (rawComponent.__asyncLoader &&\n                    // warn only once per component\n                    !rawComponent.__warnedDefineAsync) {\n                    rawComponent.__warnedDefineAsync = true;\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n                        `using \"defineAsyncComponent()\". ` +\n                        `Write \"() => import('./MyPage.vue')\" instead of ` +\n                        `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n                }\n            }\n            // skip update and leave guards if the route component is not mounted\n            if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n                continue;\n            if (isRouteComponent(rawComponent)) {\n                // __vccOpts is added by vue-class-component and contain the regular options\n                const options = rawComponent.__vccOpts || rawComponent;\n                const guard = options[guardType];\n                guard &&\n                    guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n            }\n            else {\n                // start requesting the chunk already\n                let componentPromise = rawComponent();\n                if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n                    componentPromise = Promise.resolve(componentPromise);\n                }\n                guards.push(() => componentPromise.then(resolved => {\n                    if (!resolved)\n                        throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n                    const resolvedComponent = isESModule(resolved)\n                        ? resolved.default\n                        : resolved;\n                    // keep the resolved module for plugins like data loaders\n                    record.mods[name] = resolved;\n                    // replace the function with the resolved component\n                    // cannot be null or undefined because we went into the for loop\n                    record.components[name] = resolvedComponent;\n                    // __vccOpts is added by vue-class-component and contain the regular options\n                    const options = resolvedComponent.__vccOpts || resolvedComponent;\n                    const guard = options[guardType];\n                    return (guard &&\n                        guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n                }));\n            }\n        }\n    }\n    return guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n    return route.matched.every(record => record.redirect)\n        ? Promise.reject(new Error('Cannot load a route that redirects.'))\n        : Promise.all(route.matched.map(record => record.components &&\n            Promise.all(Object.keys(record.components).reduce((promises, name) => {\n                const rawComponent = record.components[name];\n                if (typeof rawComponent === 'function' &&\n                    !('displayName' in rawComponent)) {\n                    promises.push(rawComponent().then(resolved => {\n                        if (!resolved)\n                            return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n                        const resolvedComponent = isESModule(resolved)\n                            ? resolved.default\n                            : resolved;\n                        // keep the resolved module for plugins like data loaders\n                        record.mods[name] = resolved;\n                        // replace the function with the resolved component\n                        // cannot be null or undefined because we went into the for loop\n                        record.components[name] = resolvedComponent;\n                        return;\n                    }));\n                }\n                return promises;\n            }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n    const router = inject(routerKey);\n    const currentRoute = inject(routeLocationKey);\n    let hasPrevious = false;\n    let previousTo = null;\n    const route = computed(() => {\n        const to = unref(props.to);\n        if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n            if (!isRouteLocation(to)) {\n                if (hasPrevious) {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n                }\n                else {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n                }\n            }\n            previousTo = to;\n            hasPrevious = true;\n        }\n        return router.resolve(to);\n    });\n    const activeRecordIndex = computed(() => {\n        const { matched } = route.value;\n        const { length } = matched;\n        const routeMatched = matched[length - 1];\n        const currentMatched = currentRoute.matched;\n        if (!routeMatched || !currentMatched.length)\n            return -1;\n        const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n        if (index > -1)\n            return index;\n        // possible parent record\n        const parentRecordPath = getOriginalPath(matched[length - 2]);\n        return (\n        // we are dealing with nested routes\n        length > 1 &&\n            // if the parent and matched route have the same path, this link is\n            // referring to the empty child. Or we currently are on a different\n            // child of the same parent\n            getOriginalPath(routeMatched) === parentRecordPath &&\n            // avoid comparing the child with its parent\n            currentMatched[currentMatched.length - 1].path !== parentRecordPath\n            ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n            : index);\n    });\n    const isActive = computed(() => activeRecordIndex.value > -1 &&\n        includesParams(currentRoute.params, route.value.params));\n    const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n        activeRecordIndex.value === currentRoute.matched.length - 1 &&\n        isSameRouteLocationParams(currentRoute.params, route.value.params));\n    function navigate(e = {}) {\n        if (guardEvent(e)) {\n            return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n            // avoid uncaught errors are they are logged anyway\n            ).catch(noop);\n        }\n        return Promise.resolve();\n    }\n    // devtools only\n    if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n        const instance = getCurrentInstance();\n        if (instance) {\n            const linkContextDevtools = {\n                route: route.value,\n                isActive: isActive.value,\n                isExactActive: isExactActive.value,\n                error: null,\n            };\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools = instance.__vrl_devtools || [];\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools.push(linkContextDevtools);\n            watchEffect(() => {\n                linkContextDevtools.route = route.value;\n                linkContextDevtools.isActive = isActive.value;\n                linkContextDevtools.isExactActive = isExactActive.value;\n                linkContextDevtools.error = isRouteLocation(unref(props.to))\n                    ? null\n                    : 'Invalid \"to\" value';\n            }, { flush: 'post' });\n        }\n    }\n    /**\n     * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n     */\n    return {\n        route,\n        href: computed(() => route.value.href),\n        isActive,\n        isExactActive,\n        navigate,\n    };\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterLink',\n    compatConfig: { MODE: 3 },\n    props: {\n        to: {\n            type: [String, Object],\n            required: true,\n        },\n        replace: Boolean,\n        activeClass: String,\n        // inactiveClass: String,\n        exactActiveClass: String,\n        custom: Boolean,\n        ariaCurrentValue: {\n            type: String,\n            default: 'page',\n        },\n    },\n    useLink,\n    setup(props, { slots }) {\n        const link = reactive(useLink(props));\n        const { options } = inject(routerKey);\n        const elClass = computed(() => ({\n            [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n            // [getLinkClass(\n            //   props.inactiveClass,\n            //   options.linkInactiveClass,\n            //   'router-link-inactive'\n            // )]: !link.isExactActive,\n            [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n        }));\n        return () => {\n            const children = slots.default && slots.default(link);\n            return props.custom\n                ? children\n                : h('a', {\n                    'aria-current': link.isExactActive\n                        ? props.ariaCurrentValue\n                        : null,\n                    href: link.href,\n                    // this would override user added attrs but Vue will still add\n                    // the listener, so we end up triggering both\n                    onClick: link.navigate,\n                    class: elClass.value,\n                }, children);\n        };\n    },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n    // don't redirect with control keys\n    if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n        return;\n    // don't redirect when preventDefault called\n    if (e.defaultPrevented)\n        return;\n    // don't redirect on right click\n    if (e.button !== undefined && e.button !== 0)\n        return;\n    // don't redirect if `target=\"_blank\"`\n    // @ts-expect-error getAttribute does exist\n    if (e.currentTarget && e.currentTarget.getAttribute) {\n        // @ts-expect-error getAttribute exists\n        const target = e.currentTarget.getAttribute('target');\n        if (/\\b_blank\\b/i.test(target))\n            return;\n    }\n    // this may be a Weex event which doesn't have this method\n    if (e.preventDefault)\n        e.preventDefault();\n    return true;\n}\nfunction includesParams(outer, inner) {\n    for (const key in inner) {\n        const innerValue = inner[key];\n        const outerValue = outer[key];\n        if (typeof innerValue === 'string') {\n            if (innerValue !== outerValue)\n                return false;\n        }\n        else {\n            if (!isArray(outerValue) ||\n                outerValue.length !== innerValue.length ||\n                innerValue.some((value, i) => value !== outerValue[i]))\n                return false;\n        }\n    }\n    return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n    return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n    ? propClass\n    : globalClass != null\n        ? globalClass\n        : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterView',\n    // #674 we manually inherit them\n    inheritAttrs: false,\n    props: {\n        name: {\n            type: String,\n            default: 'default',\n        },\n        route: Object,\n    },\n    // Better compat for @vue/compat users\n    // https://github.com/vuejs/router/issues/1315\n    compatConfig: { MODE: 3 },\n    setup(props, { attrs, slots }) {\n        (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n        const injectedRoute = inject(routerViewLocationKey);\n        const routeToDisplay = computed(() => props.route || injectedRoute.value);\n        const injectedDepth = inject(viewDepthKey, 0);\n        // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n        // that are used to reuse the `path` property\n        const depth = computed(() => {\n            let initialDepth = unref(injectedDepth);\n            const { matched } = routeToDisplay.value;\n            let matchedRoute;\n            while ((matchedRoute = matched[initialDepth]) &&\n                !matchedRoute.components) {\n                initialDepth++;\n            }\n            return initialDepth;\n        });\n        const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n        provide(viewDepthKey, computed(() => depth.value + 1));\n        provide(matchedRouteKey, matchedRouteRef);\n        provide(routerViewLocationKey, routeToDisplay);\n        const viewRef = ref();\n        // watch at the same time the component instance, the route record we are\n        // rendering, and the name\n        watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n            // copy reused instances\n            if (to) {\n                // this will update the instance for new instances as well as reused\n                // instances when navigating to a new route\n                to.instances[name] = instance;\n                // the component instance is reused for a different route or name, so\n                // we copy any saved update or leave guards. With async setup, the\n                // mounting component will mount before the matchedRoute changes,\n                // making instance === oldInstance, so we check if guards have been\n                // added before. This works because we remove guards when\n                // unmounting/deactivating components\n                if (from && from !== to && instance && instance === oldInstance) {\n                    if (!to.leaveGuards.size) {\n                        to.leaveGuards = from.leaveGuards;\n                    }\n                    if (!to.updateGuards.size) {\n                        to.updateGuards = from.updateGuards;\n                    }\n                }\n            }\n            // trigger beforeRouteEnter next callbacks\n            if (instance &&\n                to &&\n                // if there is no instance but to and from are the same this might be\n                // the first visit\n                (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n                (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n            }\n        }, { flush: 'post' });\n        return () => {\n            const route = routeToDisplay.value;\n            // we need the value at the time we render because when we unmount, we\n            // navigated to a different location so the value is different\n            const currentName = props.name;\n            const matchedRoute = matchedRouteRef.value;\n            const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n            if (!ViewComponent) {\n                return normalizeSlot(slots.default, { Component: ViewComponent, route });\n            }\n            // props from route configuration\n            const routePropsOption = matchedRoute.props[currentName];\n            const routeProps = routePropsOption\n                ? routePropsOption === true\n                    ? route.params\n                    : typeof routePropsOption === 'function'\n                        ? routePropsOption(route)\n                        : routePropsOption\n                : null;\n            const onVnodeUnmounted = vnode => {\n                // remove the instance reference to prevent leak\n                if (vnode.component.isUnmounted) {\n                    matchedRoute.instances[currentName] = null;\n                }\n            };\n            const component = h(ViewComponent, assign({}, routeProps, attrs, {\n                onVnodeUnmounted,\n                ref: viewRef,\n            }));\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                isBrowser &&\n                component.ref) {\n                // TODO: can display if it's an alias, its props\n                const info = {\n                    depth: depth.value,\n                    name: matchedRoute.name,\n                    path: matchedRoute.path,\n                    meta: matchedRoute.meta,\n                };\n                const internalInstances = isArray(component.ref)\n                    ? component.ref.map(r => r.i)\n                    : [component.ref.i];\n                internalInstances.forEach(instance => {\n                    // @ts-expect-error\n                    instance.__vrv_devtools = info;\n                });\n            }\n            return (\n            // pass the vnode to the slot as a prop.\n            // h and <component :is=\"...\"> both accept vnodes\n            normalizeSlot(slots.default, { Component: component, route }) ||\n                component);\n        };\n    },\n});\nfunction normalizeSlot(slot, data) {\n    if (!slot)\n        return null;\n    const slotContent = slot(data);\n    return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with <transition> & <keep-alive>\n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n    const instance = getCurrentInstance();\n    const parentName = instance.parent && instance.parent.type.name;\n    const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n    if (parentName &&\n        (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n        typeof parentSubTreeType === 'object' &&\n        parentSubTreeType.name === 'RouterView') {\n        const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n        warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\n            `Use slot props instead:\\n\\n` +\n            `<router-view v-slot=\"{ Component }\">\\n` +\n            `  <${comp}>\\n` +\n            `    <component :is=\"Component\" />\\n` +\n            `  </${comp}>\\n` +\n            `</router-view>`);\n    }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n    const copy = assign({}, routeLocation, {\n        // remove variables that can contain vue instances\n        matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n    });\n    return {\n        _custom: {\n            type: null,\n            readOnly: true,\n            display: routeLocation.fullPath,\n            tooltip,\n            value: copy,\n        },\n    };\n}\nfunction formatDisplay(display) {\n    return {\n        _custom: {\n            display,\n        },\n    };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n    // Take over router.beforeEach and afterEach\n    // make sure we are not registering the devtool twice\n    if (router.__hasDevtools)\n        return;\n    router.__hasDevtools = true;\n    // increment to support multiple router instances\n    const id = routerId++;\n    setupDevtoolsPlugin({\n        id: 'org.vuejs.router' + (id ? '.' + id : ''),\n        label: 'Vue Router',\n        packageName: 'vue-router',\n        homepage: 'https://router.vuejs.org',\n        logo: 'https://router.vuejs.org/logo.png',\n        componentStateTypes: ['Routing'],\n        app,\n    }, api => {\n        if (typeof api.now !== 'function') {\n            console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n        }\n        // display state added by the router\n        api.on.inspectComponent((payload, ctx) => {\n            if (payload.instanceData) {\n                payload.instanceData.state.push({\n                    type: 'Routing',\n                    key: '$route',\n                    editable: false,\n                    value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n                });\n            }\n        });\n        // mark router-link as active and display tags on router views\n        api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n            if (componentInstance.__vrv_devtools) {\n                const info = componentInstance.__vrv_devtools;\n                node.tags.push({\n                    label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n                    textColor: 0,\n                    tooltip: 'This component is rendered by &lt;router-view&gt;',\n                    backgroundColor: PINK_500,\n                });\n            }\n            // if multiple useLink are used\n            if (isArray(componentInstance.__vrl_devtools)) {\n                componentInstance.__devtoolsApi = api;\n                componentInstance.__vrl_devtools.forEach(devtoolsData => {\n                    let label = devtoolsData.route.path;\n                    let backgroundColor = ORANGE_400;\n                    let tooltip = '';\n                    let textColor = 0;\n                    if (devtoolsData.error) {\n                        label = devtoolsData.error;\n                        backgroundColor = RED_100;\n                        textColor = RED_700;\n                    }\n                    else if (devtoolsData.isExactActive) {\n                        backgroundColor = LIME_500;\n                        tooltip = 'This is exactly active';\n                    }\n                    else if (devtoolsData.isActive) {\n                        backgroundColor = BLUE_600;\n                        tooltip = 'This link is active';\n                    }\n                    node.tags.push({\n                        label,\n                        textColor,\n                        tooltip,\n                        backgroundColor,\n                    });\n                });\n            }\n        });\n        watch(router.currentRoute, () => {\n            // refresh active state\n            refreshRoutesView();\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(routerInspectorId);\n            api.sendInspectorState(routerInspectorId);\n        });\n        const navigationsLayerId = 'router:navigations:' + id;\n        api.addTimelineLayer({\n            id: navigationsLayerId,\n            label: `Router${id ? ' ' + id : ''} Navigations`,\n            color: 0x40a8c4,\n        });\n        // const errorsLayerId = 'router:errors'\n        // api.addTimelineLayer({\n        //   id: errorsLayerId,\n        //   label: 'Router Errors',\n        //   color: 0xea5455,\n        // })\n        router.onError((error, to) => {\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'Error during Navigation',\n                    subtitle: to.fullPath,\n                    logType: 'error',\n                    time: api.now(),\n                    data: { error },\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        // attached to `meta` and used to group events\n        let navigationId = 0;\n        router.beforeEach((to, from) => {\n            const data = {\n                guard: formatDisplay('beforeEach'),\n                from: formatRouteLocation(from, 'Current Location during this navigation'),\n                to: formatRouteLocation(to, 'Target location'),\n            };\n            // Used to group navigations together, hide from devtools\n            Object.defineProperty(to.meta, '__navigationId', {\n                value: navigationId++,\n            });\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    time: api.now(),\n                    title: 'Start of navigation',\n                    subtitle: to.fullPath,\n                    data,\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        router.afterEach((to, from, failure) => {\n            const data = {\n                guard: formatDisplay('afterEach'),\n            };\n            if (failure) {\n                data.failure = {\n                    _custom: {\n                        type: Error,\n                        readOnly: true,\n                        display: failure ? failure.message : '',\n                        tooltip: 'Navigation Failure',\n                        value: failure,\n                    },\n                };\n                data.status = formatDisplay('❌');\n            }\n            else {\n                data.status = formatDisplay('✅');\n            }\n            // we set here to have the right order\n            data.from = formatRouteLocation(from, 'Current Location during this navigation');\n            data.to = formatRouteLocation(to, 'Target location');\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'End of navigation',\n                    subtitle: to.fullPath,\n                    time: api.now(),\n                    data,\n                    logType: failure ? 'warning' : 'default',\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        /**\n         * Inspector of Existing routes\n         */\n        const routerInspectorId = 'router-inspector:' + id;\n        api.addInspector({\n            id: routerInspectorId,\n            label: 'Routes' + (id ? ' ' + id : ''),\n            icon: 'book',\n            treeFilterPlaceholder: 'Search routes',\n        });\n        function refreshRoutesView() {\n            // the routes view isn't active\n            if (!activeRoutesPayload)\n                return;\n            const payload = activeRoutesPayload;\n            // children routes will appear as nested\n            let routes = matcher.getRoutes().filter(route => !route.parent ||\n                // these routes have a parent with no component which will not appear in the view\n                // therefore we still need to include them\n                !route.parent.record.components);\n            // reset match state to false\n            routes.forEach(resetMatchStateOnRouteRecord);\n            // apply a match state if there is a payload\n            if (payload.filter) {\n                routes = routes.filter(route => \n                // save matches state based on the payload\n                isRouteMatching(route, payload.filter.toLowerCase()));\n            }\n            // mark active routes\n            routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n            payload.rootNodes = routes.map(formatRouteRecordForInspector);\n        }\n        let activeRoutesPayload;\n        api.on.getInspectorTree(payload => {\n            activeRoutesPayload = payload;\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                refreshRoutesView();\n            }\n        });\n        /**\n         * Display information about the currently selected route record\n         */\n        api.on.getInspectorState(payload => {\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                const routes = matcher.getRoutes();\n                const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n                if (route) {\n                    payload.state = {\n                        options: formatRouteRecordMatcherForStateInspector(route),\n                    };\n                }\n            }\n        });\n        api.sendInspectorTree(routerInspectorId);\n        api.sendInspectorState(routerInspectorId);\n    });\n}\nfunction modifierForKey(key) {\n    if (key.optional) {\n        return key.repeatable ? '*' : '?';\n    }\n    else {\n        return key.repeatable ? '+' : '';\n    }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n    const { record } = route;\n    const fields = [\n        { editable: false, key: 'path', value: record.path },\n    ];\n    if (record.name != null) {\n        fields.push({\n            editable: false,\n            key: 'name',\n            value: record.name,\n        });\n    }\n    fields.push({ editable: false, key: 'regexp', value: route.re });\n    if (route.keys.length) {\n        fields.push({\n            editable: false,\n            key: 'keys',\n            value: {\n                _custom: {\n                    type: null,\n                    readOnly: true,\n                    display: route.keys\n                        .map(key => `${key.name}${modifierForKey(key)}`)\n                        .join(' '),\n                    tooltip: 'Param keys',\n                    value: route.keys,\n                },\n            },\n        });\n    }\n    if (record.redirect != null) {\n        fields.push({\n            editable: false,\n            key: 'redirect',\n            value: record.redirect,\n        });\n    }\n    if (route.alias.length) {\n        fields.push({\n            editable: false,\n            key: 'aliases',\n            value: route.alias.map(alias => alias.record.path),\n        });\n    }\n    if (Object.keys(route.record.meta).length) {\n        fields.push({\n            editable: false,\n            key: 'meta',\n            value: route.record.meta,\n        });\n    }\n    fields.push({\n        key: 'score',\n        editable: false,\n        value: {\n            _custom: {\n                type: null,\n                readOnly: true,\n                display: route.score.map(score => score.join(', ')).join(' | '),\n                tooltip: 'Score used to sort routes',\n                value: route.score,\n            },\n        },\n    });\n    return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n    const tags = [];\n    const { record } = route;\n    if (record.name != null) {\n        tags.push({\n            label: String(record.name),\n            textColor: 0,\n            backgroundColor: CYAN_400,\n        });\n    }\n    if (record.aliasOf) {\n        tags.push({\n            label: 'alias',\n            textColor: 0,\n            backgroundColor: ORANGE_400,\n        });\n    }\n    if (route.__vd_match) {\n        tags.push({\n            label: 'matches',\n            textColor: 0,\n            backgroundColor: PINK_500,\n        });\n    }\n    if (route.__vd_exactActive) {\n        tags.push({\n            label: 'exact',\n            textColor: 0,\n            backgroundColor: LIME_500,\n        });\n    }\n    if (route.__vd_active) {\n        tags.push({\n            label: 'active',\n            textColor: 0,\n            backgroundColor: BLUE_600,\n        });\n    }\n    if (record.redirect) {\n        tags.push({\n            label: typeof record.redirect === 'string'\n                ? `redirect: ${record.redirect}`\n                : 'redirects',\n            textColor: 0xffffff,\n            backgroundColor: DARK,\n        });\n    }\n    // add an id to be able to select it. Using the `path` is not possible because\n    // empty path children would collide with their parents\n    let id = record.__vd_id;\n    if (id == null) {\n        id = String(routeRecordId++);\n        record.__vd_id = id;\n    }\n    return {\n        id,\n        label: record.path,\n        tags,\n        children: route.children.map(formatRouteRecordForInspector),\n    };\n}\n//  incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n    // no route will be active if matched is empty\n    // reset the matching state\n    const isExactActive = currentRoute.matched.length &&\n        isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n    route.__vd_exactActive = route.__vd_active = isExactActive;\n    if (!isExactActive) {\n        route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n    }\n    route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n    route.__vd_match = false;\n    route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n    const found = String(route.re).match(EXTRACT_REGEXP_RE);\n    route.__vd_match = false;\n    if (!found || found.length < 3) {\n        return false;\n    }\n    // use a regexp without $ at the end to match nested routes better\n    const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n    if (nonEndingRE.test(filter)) {\n        // mark children as matches\n        route.children.forEach(child => isRouteMatching(child, filter));\n        // exception case: `/`\n        if (route.record.path !== '/' || filter === '/') {\n            route.__vd_match = route.re.test(filter);\n            return true;\n        }\n        // hide the / route\n        return false;\n    }\n    const path = route.record.path.toLowerCase();\n    const decodedPath = decode(path);\n    // also allow partial matching on the path\n    if (!filter.startsWith('/') &&\n        (decodedPath.includes(filter) || path.includes(filter)))\n        return true;\n    if (decodedPath.startsWith(filter) || path.startsWith(filter))\n        return true;\n    if (route.record.name && String(route.record.name).includes(filter))\n        return true;\n    return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n    const ret = {};\n    for (const key in obj) {\n        if (!keys.includes(key)) {\n            // @ts-expect-error\n            ret[key] = obj[key];\n        }\n    }\n    return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n    const matcher = createRouterMatcher(options.routes, options);\n    const parseQuery$1 = options.parseQuery || parseQuery;\n    const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n    const routerHistory = options.history;\n    if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n        throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n            ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n    const beforeGuards = useCallbacks();\n    const beforeResolveGuards = useCallbacks();\n    const afterGuards = useCallbacks();\n    const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n    let pendingLocation = START_LOCATION_NORMALIZED;\n    // leave the scrollRestoration if no scrollBehavior is provided\n    if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n        history.scrollRestoration = 'manual';\n    }\n    const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n    const encodeParams = applyToParams.bind(null, encodeParam);\n    const decodeParams = \n    // @ts-expect-error: intentionally avoid the type check\n    applyToParams.bind(null, decode);\n    function addRoute(parentOrRoute, route) {\n        let parent;\n        let record;\n        if (isRouteName(parentOrRoute)) {\n            parent = matcher.getRecordMatcher(parentOrRoute);\n            if ((process.env.NODE_ENV !== 'production') && !parent) {\n                warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n            }\n            record = route;\n        }\n        else {\n            record = parentOrRoute;\n        }\n        return matcher.addRoute(record, parent);\n    }\n    function removeRoute(name) {\n        const recordMatcher = matcher.getRecordMatcher(name);\n        if (recordMatcher) {\n            matcher.removeRoute(recordMatcher);\n        }\n        else if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Cannot remove non-existent route \"${String(name)}\"`);\n        }\n    }\n    function getRoutes() {\n        return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n    }\n    function hasRoute(name) {\n        return !!matcher.getRecordMatcher(name);\n    }\n    function resolve(rawLocation, currentLocation) {\n        // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n        // const objectLocation = routerLocationAsObject(rawLocation)\n        // we create a copy to modify it later\n        currentLocation = assign({}, currentLocation || currentRoute.value);\n        if (typeof rawLocation === 'string') {\n            const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n            const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n            const href = routerHistory.createHref(locationNormalized.fullPath);\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (href.startsWith('//'))\n                    warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n                else if (!matchedRoute.matched.length) {\n                    warn(`No match found for location with path \"${rawLocation}\"`);\n                }\n            }\n            // locationNormalized is always a new object\n            return assign(locationNormalized, matchedRoute, {\n                params: decodeParams(matchedRoute.params),\n                hash: decode(locationNormalized.hash),\n                redirectedFrom: undefined,\n                href,\n            });\n        }\n        if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n            warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n            return resolve({});\n        }\n        let matcherLocation;\n        // path could be relative in object as well\n        if (rawLocation.path != null) {\n            if ((process.env.NODE_ENV !== 'production') &&\n                'params' in rawLocation &&\n                !('name' in rawLocation) &&\n                // @ts-expect-error: the type is never\n                Object.keys(rawLocation.params).length) {\n                warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n            }\n            matcherLocation = assign({}, rawLocation, {\n                path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n            });\n        }\n        else {\n            // remove any nullish param\n            const targetParams = assign({}, rawLocation.params);\n            for (const key in targetParams) {\n                if (targetParams[key] == null) {\n                    delete targetParams[key];\n                }\n            }\n            // pass encoded values to the matcher, so it can produce encoded path and fullPath\n            matcherLocation = assign({}, rawLocation, {\n                params: encodeParams(targetParams),\n            });\n            // current location params are decoded, we need to encode them in case the\n            // matcher merges the params\n            currentLocation.params = encodeParams(currentLocation.params);\n        }\n        const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n        const hash = rawLocation.hash || '';\n        if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n            warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n        }\n        // the matcher might have merged current location params, so\n        // we need to run the decoding again\n        matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n        const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n            hash: encodeHash(hash),\n            path: matchedRoute.path,\n        }));\n        const href = routerHistory.createHref(fullPath);\n        if ((process.env.NODE_ENV !== 'production')) {\n            if (href.startsWith('//')) {\n                warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n            }\n            else if (!matchedRoute.matched.length) {\n                warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n            }\n        }\n        return assign({\n            fullPath,\n            // keep the hash encoded so fullPath is effectively path + encodedQuery +\n            // hash\n            hash,\n            query: \n            // if the user is using a custom query lib like qs, we might have\n            // nested objects, so we keep the query as is, meaning it can contain\n            // numbers at `$route.query`, but at the point, the user will have to\n            // use their own type anyway.\n            // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n            stringifyQuery$1 === stringifyQuery\n                ? normalizeQuery(rawLocation.query)\n                : (rawLocation.query || {}),\n        }, matchedRoute, {\n            redirectedFrom: undefined,\n            href,\n        });\n    }\n    function locationAsObject(to) {\n        return typeof to === 'string'\n            ? parseURL(parseQuery$1, to, currentRoute.value.path)\n            : assign({}, to);\n    }\n    function checkCanceledNavigation(to, from) {\n        if (pendingLocation !== to) {\n            return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n                from,\n                to,\n            });\n        }\n    }\n    function push(to) {\n        return pushWithRedirect(to);\n    }\n    function replace(to) {\n        return push(assign(locationAsObject(to), { replace: true }));\n    }\n    function handleRedirectRecord(to) {\n        const lastMatched = to.matched[to.matched.length - 1];\n        if (lastMatched && lastMatched.redirect) {\n            const { redirect } = lastMatched;\n            let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n            if (typeof newTargetLocation === 'string') {\n                newTargetLocation =\n                    newTargetLocation.includes('?') || newTargetLocation.includes('#')\n                        ? (newTargetLocation = locationAsObject(newTargetLocation))\n                        : // force empty params\n                            { path: newTargetLocation };\n                // @ts-expect-error: force empty params when a string is passed to let\n                // the router parse them again\n                newTargetLocation.params = {};\n            }\n            if ((process.env.NODE_ENV !== 'production') &&\n                newTargetLocation.path == null &&\n                !('name' in newTargetLocation)) {\n                warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n                throw new Error('Invalid redirect');\n            }\n            return assign({\n                query: to.query,\n                hash: to.hash,\n                // avoid transferring params if the redirect has a path\n                params: newTargetLocation.path != null ? {} : to.params,\n            }, newTargetLocation);\n        }\n    }\n    function pushWithRedirect(to, redirectedFrom) {\n        const targetLocation = (pendingLocation = resolve(to));\n        const from = currentRoute.value;\n        const data = to.state;\n        const force = to.force;\n        // to could be a string where `replace` is a function\n        const replace = to.replace === true;\n        const shouldRedirect = handleRedirectRecord(targetLocation);\n        if (shouldRedirect)\n            return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n                state: typeof shouldRedirect === 'object'\n                    ? assign({}, data, shouldRedirect.state)\n                    : data,\n                force,\n                replace,\n            }), \n            // keep original redirectedFrom if it exists\n            redirectedFrom || targetLocation);\n        // if it was a redirect we already called `pushWithRedirect` above\n        const toLocation = targetLocation;\n        toLocation.redirectedFrom = redirectedFrom;\n        let failure;\n        if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n            failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n            // trigger scroll to allow scrolling to the same anchor\n            handleScroll(from, from, \n            // this is a push, the only way for it to be triggered from a\n            // history.listen is with a redirect, which makes it become a push\n            true, \n            // This cannot be the first navigation because the initial location\n            // cannot be manually navigated to\n            false);\n        }\n        return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n            .catch((error) => isNavigationFailure(error)\n            ? // navigation redirects still mark the router as ready\n                isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n                    ? error\n                    : markAsReady(error) // also returns the error\n            : // reject any unknown error\n                triggerError(error, toLocation, from))\n            .then((failure) => {\n            if (failure) {\n                if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    if ((process.env.NODE_ENV !== 'production') &&\n                        // we are redirecting to the same location we were already at\n                        isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n                        // and we have done it a couple of times\n                        redirectedFrom &&\n                        // @ts-expect-error: added only in dev\n                        (redirectedFrom._count = redirectedFrom._count\n                            ? // @ts-expect-error\n                                redirectedFrom._count + 1\n                            : 1) > 30) {\n                        warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n                        return Promise.reject(new Error('Infinite redirect in navigation guard'));\n                    }\n                    return pushWithRedirect(\n                    // keep options\n                    assign({\n                        // preserve an existing replacement but allow the redirect to override it\n                        replace,\n                    }, locationAsObject(failure.to), {\n                        state: typeof failure.to === 'object'\n                            ? assign({}, data, failure.to.state)\n                            : data,\n                        force,\n                    }), \n                    // preserve the original redirectedFrom if any\n                    redirectedFrom || toLocation);\n                }\n            }\n            else {\n                // if we fail we don't finalize the navigation\n                failure = finalizeNavigation(toLocation, from, true, replace, data);\n            }\n            triggerAfterEach(toLocation, from, failure);\n            return failure;\n        });\n    }\n    /**\n     * Helper to reject and skip all navigation guards if a new navigation happened\n     * @param to\n     * @param from\n     */\n    function checkCanceledNavigationAndReject(to, from) {\n        const error = checkCanceledNavigation(to, from);\n        return error ? Promise.reject(error) : Promise.resolve();\n    }\n    function runWithContext(fn) {\n        const app = installedApps.values().next().value;\n        // support Vue < 3.3\n        return app && typeof app.runWithContext === 'function'\n            ? app.runWithContext(fn)\n            : fn();\n    }\n    // TODO: refactor the whole before guards by internally using router.beforeEach\n    function navigate(to, from) {\n        let guards;\n        const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n        // all components here have been resolved once because we are leaving\n        guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n        // leavingRecords is already reversed\n        for (const record of leavingRecords) {\n            record.leaveGuards.forEach(guard => {\n                guards.push(guardToPromiseFn(guard, to, from));\n            });\n        }\n        const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n        guards.push(canceledNavigationCheck);\n        // run the queue of per route beforeRouteLeave guards\n        return (runGuardQueue(guards)\n            .then(() => {\n            // check global guards beforeEach\n            guards = [];\n            for (const guard of beforeGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check in components beforeRouteUpdate\n            guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n            for (const record of updatingRecords) {\n                record.updateGuards.forEach(guard => {\n                    guards.push(guardToPromiseFn(guard, to, from));\n                });\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check the route beforeEnter\n            guards = [];\n            for (const record of enteringRecords) {\n                // do not trigger beforeEnter on reused views\n                if (record.beforeEnter) {\n                    if (isArray(record.beforeEnter)) {\n                        for (const beforeEnter of record.beforeEnter)\n                            guards.push(guardToPromiseFn(beforeEnter, to, from));\n                    }\n                    else {\n                        guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n                    }\n                }\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\n            // clear existing enterCallbacks, these are added by extractComponentsGuards\n            to.matched.forEach(record => (record.enterCallbacks = {}));\n            // check in-component beforeRouteEnter\n            guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check global guards beforeResolve\n            guards = [];\n            for (const guard of beforeResolveGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            // catch any navigation canceled\n            .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n            ? err\n            : Promise.reject(err)));\n    }\n    function triggerAfterEach(to, from, failure) {\n        // navigation is confirmed, call afterGuards\n        // TODO: wrap with error handlers\n        afterGuards\n            .list()\n            .forEach(guard => runWithContext(() => guard(to, from, failure)));\n    }\n    /**\n     * - Cleans up any navigation guards\n     * - Changes the url if necessary\n     * - Calls the scrollBehavior\n     */\n    function finalizeNavigation(toLocation, from, isPush, replace, data) {\n        // a more recent navigation took place\n        const error = checkCanceledNavigation(toLocation, from);\n        if (error)\n            return error;\n        // only consider as push if it's not the first navigation\n        const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n        const state = !isBrowser ? {} : history.state;\n        // change URL only if the user did a push/replace and if it's not the initial navigation because\n        // it's just reflecting the url\n        if (isPush) {\n            // on the initial navigation, we want to reuse the scroll position from\n            // history state if it exists\n            if (replace || isFirstNavigation)\n                routerHistory.replace(toLocation.fullPath, assign({\n                    scroll: isFirstNavigation && state && state.scroll,\n                }, data));\n            else\n                routerHistory.push(toLocation.fullPath, data);\n        }\n        // accept current navigation\n        currentRoute.value = toLocation;\n        handleScroll(toLocation, from, isPush, isFirstNavigation);\n        markAsReady();\n    }\n    let removeHistoryListener;\n    // attach listener to history to trigger navigations\n    function setupListeners() {\n        // avoid setting up listeners twice due to an invalid first navigation\n        if (removeHistoryListener)\n            return;\n        removeHistoryListener = routerHistory.listen((to, _from, info) => {\n            if (!router.listening)\n                return;\n            // cannot be a redirect route because it was in history\n            const toLocation = resolve(to);\n            // due to dynamic routing, and to hash history with manual navigation\n            // (manually changing the url or calling history.hash = '#/somewhere'),\n            // there could be a redirect record in history\n            const shouldRedirect = handleRedirectRecord(toLocation);\n            if (shouldRedirect) {\n                pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n                return;\n            }\n            pendingLocation = toLocation;\n            const from = currentRoute.value;\n            // TODO: should be moved to web history?\n            if (isBrowser) {\n                saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n            }\n            navigate(toLocation, from)\n                .catch((error) => {\n                if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                    return error;\n                }\n                if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    // Here we could call if (info.delta) routerHistory.go(-info.delta,\n                    // false) but this is bug prone as we have no way to wait the\n                    // navigation to be finished before calling pushWithRedirect. Using\n                    // a setTimeout of 16ms seems to work but there is no guarantee for\n                    // it to work on every browser. So instead we do not restore the\n                    // history entry and trigger a new navigation as requested by the\n                    // navigation guard.\n                    // the error is already handled by router.push we just want to avoid\n                    // logging the error\n                    pushWithRedirect(error.to, toLocation\n                    // avoid an uncaught rejection, let push call triggerError\n                    )\n                        .then(failure => {\n                        // manual change in hash history #916 ending up in the URL not\n                        // changing, but it was changed by the manual url change, so we\n                        // need to manually change it ourselves\n                        if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n                            16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n                            !info.delta &&\n                            info.type === NavigationType.pop) {\n                            routerHistory.go(-1, false);\n                        }\n                    })\n                        .catch(noop);\n                    // avoid the then branch\n                    return Promise.reject();\n                }\n                // do not restore history on unknown direction\n                if (info.delta) {\n                    routerHistory.go(-info.delta, false);\n                }\n                // unrecognized error, transfer to the global handler\n                return triggerError(error, toLocation, from);\n            })\n                .then((failure) => {\n                failure =\n                    failure ||\n                        finalizeNavigation(\n                        // after navigation, all matched components are resolved\n                        toLocation, from, false);\n                // revert the navigation\n                if (failure) {\n                    if (info.delta &&\n                        // a new navigation has been triggered, so we do not want to revert, that will change the current history\n                        // entry while a different route is displayed\n                        !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                        routerHistory.go(-info.delta, false);\n                    }\n                    else if (info.type === NavigationType.pop &&\n                        isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n                        // manual change in hash history #916\n                        // it's like a push but lacks the information of the direction\n                        routerHistory.go(-1, false);\n                    }\n                }\n                triggerAfterEach(toLocation, from, failure);\n            })\n                // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n                .catch(noop);\n        });\n    }\n    // Initialization and Errors\n    let readyHandlers = useCallbacks();\n    let errorListeners = useCallbacks();\n    let ready;\n    /**\n     * Trigger errorListeners added via onError and throws the error as well\n     *\n     * @param error - error to throw\n     * @param to - location we were navigating to when the error happened\n     * @param from - location we were navigating from when the error happened\n     * @returns the error as a rejected promise\n     */\n    function triggerError(error, to, from) {\n        markAsReady(error);\n        const list = errorListeners.list();\n        if (list.length) {\n            list.forEach(handler => handler(error, to, from));\n        }\n        else {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('uncaught error during route navigation:');\n            }\n            console.error(error);\n        }\n        // reject the error no matter there were error listeners or not\n        return Promise.reject(error);\n    }\n    function isReady() {\n        if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n            return Promise.resolve();\n        return new Promise((resolve, reject) => {\n            readyHandlers.add([resolve, reject]);\n        });\n    }\n    function markAsReady(err) {\n        if (!ready) {\n            // still not ready if an error happened\n            ready = !err;\n            setupListeners();\n            readyHandlers\n                .list()\n                .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n            readyHandlers.reset();\n        }\n        return err;\n    }\n    // Scroll behavior\n    function handleScroll(to, from, isPush, isFirstNavigation) {\n        const { scrollBehavior } = options;\n        if (!isBrowser || !scrollBehavior)\n            return Promise.resolve();\n        const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n            ((isFirstNavigation || !isPush) &&\n                history.state &&\n                history.state.scroll) ||\n            null;\n        return nextTick()\n            .then(() => scrollBehavior(to, from, scrollPosition))\n            .then(position => position && scrollToPosition(position))\n            .catch(err => triggerError(err, to, from));\n    }\n    const go = (delta) => routerHistory.go(delta);\n    let started;\n    const installedApps = new Set();\n    const router = {\n        currentRoute,\n        listening: true,\n        addRoute,\n        removeRoute,\n        clearRoutes: matcher.clearRoutes,\n        hasRoute,\n        getRoutes,\n        resolve,\n        options,\n        push,\n        replace,\n        go,\n        back: () => go(-1),\n        forward: () => go(1),\n        beforeEach: beforeGuards.add,\n        beforeResolve: beforeResolveGuards.add,\n        afterEach: afterGuards.add,\n        onError: errorListeners.add,\n        isReady,\n        install(app) {\n            const router = this;\n            app.component('RouterLink', RouterLink);\n            app.component('RouterView', RouterView);\n            app.config.globalProperties.$router = router;\n            Object.defineProperty(app.config.globalProperties, '$route', {\n                enumerable: true,\n                get: () => unref(currentRoute),\n            });\n            // this initial navigation is only necessary on client, on server it doesn't\n            // make sense because it will create an extra unnecessary navigation and could\n            // lead to problems\n            if (isBrowser &&\n                // used for the initial navigation client side to avoid pushing\n                // multiple times when the router is used in multiple apps\n                !started &&\n                currentRoute.value === START_LOCATION_NORMALIZED) {\n                // see above\n                started = true;\n                push(routerHistory.location).catch(err => {\n                    if ((process.env.NODE_ENV !== 'production'))\n                        warn('Unexpected error when starting the router:', err);\n                });\n            }\n            const reactiveRoute = {};\n            for (const key in START_LOCATION_NORMALIZED) {\n                Object.defineProperty(reactiveRoute, key, {\n                    get: () => currentRoute.value[key],\n                    enumerable: true,\n                });\n            }\n            app.provide(routerKey, router);\n            app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n            app.provide(routerViewLocationKey, currentRoute);\n            const unmountApp = app.unmount;\n            installedApps.add(app);\n            app.unmount = function () {\n                installedApps.delete(app);\n                // the router is not attached to an app anymore\n                if (installedApps.size < 1) {\n                    // invalidate the current navigation\n                    pendingLocation = START_LOCATION_NORMALIZED;\n                    removeHistoryListener && removeHistoryListener();\n                    removeHistoryListener = null;\n                    currentRoute.value = START_LOCATION_NORMALIZED;\n                    started = false;\n                    ready = false;\n                }\n                unmountApp();\n            };\n            // TODO: this probably needs to be updated so it can be used by vue-termui\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n                addDevtools(app, router, matcher);\n            }\n        },\n    };\n    // TODO: type this as NavigationGuardReturn or similar instead of any\n    function runGuardQueue(guards) {\n        return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n    }\n    return router;\n}\nfunction extractChangingRecords(to, from) {\n    const leavingRecords = [];\n    const updatingRecords = [];\n    const enteringRecords = [];\n    const len = Math.max(from.matched.length, to.matched.length);\n    for (let i = 0; i < len; i++) {\n        const recordFrom = from.matched[i];\n        if (recordFrom) {\n            if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n                updatingRecords.push(recordFrom);\n            else\n                leavingRecords.push(recordFrom);\n        }\n        const recordTo = to.matched[i];\n        if (recordTo) {\n            // the type doesn't matter because we are comparing per reference\n            if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n                enteringRecords.push(recordTo);\n            }\n        }\n    }\n    return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n    return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n    return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","import {openUrl} from '@/helpers/url.js'\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {useRoute, useRouter, isNavigationFailure, NavigationFailureType} from 'vue-router'\nimport {computed, isRef, unref, watchEffect} from 'vue'\n\n/**\n * Routing composable\n */\nexport function useRouting() {\n\n  //Get route and router\n  const route = useRoute()\n  const router = useRouter()\n  const routeMeta = computed(() => route.meta)\n  const routeParams = computed(() => route.params)\n  const queryParams = computed(() => route.query)\n  const isEmbeddedRoute = computed(() => route?.matched.some(r => r.meta.isEmbedded))\n  const isMarketingRoute = computed(() => route?.matched.some(r => r.meta.isMarketing))\n\n  //Check if param is empty\n  const isParamEmpty = param => (param === null || param === undefined || param === '')\n\n  //Filter out undefined params\n  const cleanParams = params => {\n    const clean = {}\n    for (const key in params) {\n      const value = isRef(params[key]) ? unref(params[key]) : params[key]\n      if (!isParamEmpty(value)) {\n        clean[key] = value\n      }\n    }\n    return clean\n  }\n\n  //Ensure route is an object\n  const ensureObject = route => {\n    if (typeof route === 'string') {\n      return {name: route}\n    }\n    else if (route && typeof route === 'object') {\n      return route\n    }\n    throw new Error(`Invalid route parameter provided: ${route}`)\n  }\n\n  //With query params\n  const withQuery = (route, query) => {\n    route = ensureObject(route)\n    return {...route, query: cleanParams(query)}\n  }\n\n  //With router params\n  const withParams = (route, params) => {\n    route = ensureObject(route)\n    return {...route, params: cleanParams(params)}\n  }\n\n  //Handle routing error\n  const handleRoutingError = error => {\n    if (isNavigationFailure(error, NavigationFailureType.duplicated)) {\n      return\n    }\n    if (isNavigationFailure(error, NavigationFailureType.aborted)) {\n      return\n    }\n    throw error\n  }\n\n  //Push or replace a route, with handling of duplicated route errors\n  const pushRoute = async (route, event) => {\n\n    //Ensure route object\n    route = ensureObject(route)\n\n    //Event provided, check if we want to open this link/route in a new tab\n    if (event?.ctrlKey || event?.metaKey) {\n      openUrl(router.resolve(route).href, null, true)\n      return\n    }\n\n    //Go to route directly\n    try {\n      await router.push(route)\n    }\n    catch (error) {\n      handleRoutingError(error)\n    }\n  }\n  const replaceRoute = async route => {\n    route = ensureObject(route)\n    try {\n      await router.replace(route)\n    }\n    catch (error) {\n      handleRoutingError(error)\n    }\n  }\n\n  //Replace current route convenience helper\n  const replaceCurrentRoute = params => replaceRoute({name: route.name, params})\n\n  //Check if we're currently on a specified route\n  const checkRouteActive = name => route.matched.some(match => match.name === name)\n\n  //This is a pretty ugly work around to avoid a problem with a circular dependency\n  //that broke HMR. Basically the base.api.js cannot import the router as it creates\n  //a circular dependency. And we also can't use this composable outside of a Vue\n  //component, so we have no good way to detect whether the current route is a\n  //marketing route or not. So we watch the value here and just store it in local\n  //storage, so that the base.api.js can read it from there.\n  const {setInLocalStorage} = useLocalStorage()\n  watchEffect(() => setInLocalStorage('isMarketing', isMarketingRoute.value))\n\n  //Expose interface\n  return {\n    router,\n    route,\n    routeMeta,\n    routeParams,\n    queryParams,\n    isEmbeddedRoute,\n    isMarketingRoute,\n    checkRouteActive,\n    pushRoute,\n    replaceRoute,\n    replaceCurrentRoute,\n    withQuery,\n    withParams,\n    cleanParams,\n    handleRoutingError,\n  }\n}\n","<script setup>\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport CountIndicator from '@/components/shared/core/CountIndicator.vue'\nimport TransitionGrow from '@/components/shared/transitions/TransitionGrow.vue'\nimport {useEmptySlotsCheck} from '@/composables/use-empty-slots-check.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  type: {\n    type: String,\n    default: '',\n  },\n  label: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  iconSize: {\n    type: String,\n    default: 'm',\n  },\n  iconRotate: {\n    type: Number,\n    default: 0,\n    validator: (value) => value >= -360 && value <= 360,\n  },\n  isIconOutlined: {\n    type: Boolean,\n    default: false,\n  },\n  count: {\n    type: [Number, String],\n    default: 0,\n  },\n  route: {\n    type: [String, Object],\n    default: null,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  isBlock: {\n    type: Boolean,\n    default: false,\n  },\n  isSlim: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: { // NOTE: Only used for icon-only buttons\n    type: Boolean,\n    default: false,\n  },\n  isDanger: {\n    type: Boolean,\n    default: false,\n  },\n  hasSpinner: {\n    type: Boolean,\n    default: false,\n  },\n  isInverse: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Extract props and get router\nconst {isDisabled, route, type} = toRefs(props)\nconst {router} = useRouting()\n\n//Handle click\nconst handleClick = (event) => {\n\n  //Disabled\n  if (isDisabled.value) {\n    return\n  }\n\n  //Route provided\n  if (route.value) {\n    return router.push(route.value)\n  }\n\n  //Emit click event\n  emit('click', event)\n}\n\n//Spinner color\nconst spinnerColor = computed(() => {\n  if (type.value === 'primary') {\n    return 'white'\n  }\n  return ''\n})\n\n//Check if slots are empty\nconst {isSlotEmpty: isDefaultSlotEmpty} = useEmptySlotsCheck()\nconst {isSlotEmpty: isLabelSlotEmpty} = useEmptySlotsCheck('label')\n</script>\n\n<template>\n  <button\n    :test-id=\"testId\"\n    :disabled=\"isDisabled || hasSpinner\"\n    :has-spinner=\"hasSpinner\"\n    :class=\"{\n      [$style.button]: true,\n      [$style.block]: isBlock,\n      [$style.slim]: isSlim,\n      [$style.compact]: isCompact,\n      [$style.danger]: isDanger,\n      [$style[type]]: !!type,\n      [$style.withSpinner]: hasSpinner,\n      [$style.iconOnly]: (isDefaultSlotEmpty && isLabelSlotEmpty && !label),\n      [$style.inverse]: isInverse,\n    }\"\n    type=\"button\"\n    v-bind=\"$attrs\"\n    @click=\"handleClick($event)\"\n  >\n    <slot name=\"icon\">\n      <Icon\n        v-if=\"icon\"\n        :class=\"$style.icon\"\n        :icon=\"icon\"\n        :size=\"iconSize\"\n        :rotate=\"iconRotate\"\n        :is-outlined=\"isIconOutlined\"\n      />\n    </slot>\n    <span\n      :class=\"$style.label\"\n      hide-empty\n    >\n      <slot name=\"label\">{{ label }}</slot>\n    </span>\n    <slot />\n    <Spinner\n      v-if=\"hasSpinner\"\n      :class=\"$style.spinner\"\n      :color=\"spinnerColor\"\n      :test-id=\"testId ? `${testId}-spinner` : undefined\"\n    />\n    <TransitionGrow>\n      <CountIndicator\n        v-if=\"count\"\n        :count=\"count\"\n        :is-inverse=\"type === 'primary'\"\n      />\n    </TransitionGrow>\n  </button>\n</template>\n\n<style module lang=\"scss\">\n.button {\n\n  //Base button style\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 0.5rem;\n  height: var(--button-height);\n  padding: 0.5rem 1.5rem;\n  border: 1px solid transparent;\n  border-radius: var(--border-radius-m);\n  vertical-align: middle;\n  font-family: var(--font-family);\n  line-height: var(--font-size-buttons-normal);\n  font-size: var(--font-size-buttons-normal);\n  font-weight: var(--font-weight-normal);\n  background: transparent;\n  color: var(--color-text);\n  outline: none;\n  transform: none !important;\n  transition: all var(--transition-cubic-fast);\n  overflow: hidden;\n\n  //Block buttons\n  &.block {\n    display: flex;\n    width: 100%;\n  }\n\n  //Slim buttons\n  &.slim {\n    padding: 0.5rem 0.75rem;\n  }\n\n  //Icon only button\n  &.iconOnly {\n    padding: 0;\n    width: var(--button-height);\n    min-width: var(--button-height);\n    &.compact {\n      height: var(--button-height-compact);\n      width: var(--button-height-compact);\n      min-width: var(--button-height-compact);\n    }\n  }\n\n  //General modifier states\n  &:hover:not(:disabled) {\n    cursor: pointer;\n  }\n  &:active, &:focus {\n    outline: none;\n  }\n  &:active:not(:disabled) {\n    transform: translateX(1px) translateY(1px);\n  }\n  &:disabled {\n    cursor: not-allowed;\n    &.withSpinner {\n      color: transparent;\n    }\n    .spinner {\n      display: flex;\n    }\n  }\n\n  //Primary and secondary button types\n  &.primary {\n    background-color: var(--bg-primary);\n    color: var(--color-white);\n    text-shadow: 0px 0px 1px var(--color-white); /* Bold text will shift the width of the button */\n    &:hover:not(:disabled) {\n      background-color: var(--bg-primary-hover);\n      border-color: var(--bg-primary-hover);\n      color: var(--color-white);\n    }\n    &:disabled {\n      opacity: 0.5;\n    }\n  }\n  &.secondary {\n    color: var(--color-text);\n    border-color: var(--color-borders-button);\n    background: var(--color-white);\n    &:hover:not(:disabled) {\n      color: var(--color-text-primary);\n      border-color: var(--bg-primary-hover);\n      &.danger {\n        color: var(--color-text-danger);\n        border-color: var(--color-status-danger);\n      }\n    }\n    &:disabled {\n      color: var(--color-text-muted);\n      border-color: var(--color-borders-button-disabled);\n    }\n  }\n\n  //Text and link button types\n  &.text, &.link {\n    padding: 0;\n    border-radius: 0;\n    &:hover:not(:disabled) {\n      .label {\n        text-decoration: underline;\n      }\n    }\n    &:active:not(:disabled) {\n      transform: none;\n    }\n    &:disabled {\n      opacity: 0.5;\n    }\n  }\n  &.text {\n    color: var(--color-text-muted);\n    &:hover:not(:disabled) {\n      color: var(--color-text);\n      &.danger {\n        color: var(--color-text-danger);\n      }\n    }\n    &.inverse {\n      .label {\n        color: var(--color-text-on-dark-muted);\n      }\n      .icon {\n        color: var(--color-elements-light);\n      }\n      &:hover:not(:disabled) {\n        .label {\n          color: var(--color-text-on-dark);\n        }\n        .icon {\n          color: var(--color-elements-light-hover);\n        }\n      }\n    }\n  }\n  &.link {\n    color: var(--color-text-link);\n  }\n\n  //Test button\n  &.test {\n    background-color: var(--bg-test);\n    color: var(--color-white);\n    text-shadow: 0px 0px 1px var(--color-white); /* Bold text will shift the width of the button */\n    &:hover:not(:disabled) {\n      background-color: var(--bg-test-hover);\n      border-color: var(--bg-test-hover);\n      color: var(--color-white);\n    }\n    &:disabled {\n      opacity: 0.5;\n    }\n  }\n}\n.spinner {\n  display: none;\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  align-items: center;\n  justify-content: center;\n  background-color: inherit;\n  border-radius: var(--border-radius-m);\n}\n.label {\n  white-space: nowrap;\n}\n.icon, .label {\n  transition: color var(--transition-cubic-fast);\n}\n</style>\n","<script setup>\nimport CloseButton from '@/components/shared/buttons/CloseButton.vue'\nimport CloseBar from '@/components/shared/buttons/CloseBar.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {ref, toRefs, watch, nextTick} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n])\nconst props = defineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  isOpen: {\n    type: Boolean,\n    default: false,\n  },\n  isFlexible: {\n    type: Boolean,\n    default: false,\n  },\n  isFull: {\n    type: Boolean,\n    default: false,\n  },\n  closeOnClickOutside: {\n    type: Boolean,\n    default: false,\n  },\n  closeOnKey: {\n    type: Boolean,\n    default: false,\n  },\n  labelClose: {\n    type: String,\n    default: 'Close',\n  },\n  overflow: {\n    type: String,\n    default: 'auto',\n  },\n})\n\n//Modal ref and modal handlers\nconst {isOpen, closeOnClickOutside, closeOnKey} = toRefs(props)\nconst modal = ref(null)\n\n//Watch open state\nwatch(isOpen, () => {\n  if (isOpen.value) {\n    emit('open')\n    nextTick(() => modal.value?.showModal()) //HTMLDialogElement\n  }\n  else {\n    nextTick(() => modal.value?.close()) //HTMLDialogElement\n  }\n})\n\n//Handle close\nconst handleClose = (event, method) => {\n  if (method === 'click' && closeOnClickOutside.value && event.target === modal.value) {\n    emit('close', event)\n  }\n  else if (method === 'key' && closeOnKey.value) {\n    emit('close', event)\n  }\n}\n</script>\n\n<template>\n  <dialog\n    v-if=\"isOpen\"\n    ref=\"modal\"\n    :class=\"{\n      [$style.modal]: true,\n      [$style.flexible]: isFlexible,\n      [$style.full]: isFull,\n    }\"\n    @click=\"handleClose($event, 'click')\"\n    @keydown.esc.prevent=\"handleClose($event, 'key')\"\n  >\n    <div\n      :class=\"{\n        [$style.header]: true,\n      }\"\n    >\n      <div :class=\"$style.headerContent\">\n        <slot name=\"header\">\n          <slot name=\"icon\">\n            <Icon\n              v-if=\"icon\"\n              size=\"l\"\n              :icon=\"icon\"\n              color=\"muted\"\n            />\n          </slot>\n          <h3>{{ header }}</h3>\n        </slot>\n      </div>\n      <CloseButton\n        :class=\"$style.close\"\n        test-id=\"closeModal\"\n        @click=\"$emit('close', $event)\"\n      />\n    </div>\n\n    <div\n      test-id=\"modalBody\"\n      :class=\"$style.body\"\n      :style=\"{overflow}\"\n    >\n      <slot />\n    </div>\n\n    <div :class=\"$style.footer\">\n      <slot name=\"footer\">\n        <CloseBar\n          :label-close=\"labelClose\"\n          @close=\"$emit('close')\"\n        />\n      </slot>\n    </div>\n  </dialog>\n</template>\n\n<style module lang=\"scss\">\n.modal {\n  outline: none;\n  border: none;\n  padding: 1rem 1.5rem;\n  background: var(--color-white);\n  text-align: left;\n  height: 100vh;\n  width: 100vw;\n  max-width: 100vw;\n  max-height: 100vh;\n  animation: zoom-in .3s;\n  color: var(--color-text);\n  overscroll-behavior: contain;\n  &::backdrop {\n    background: var(--color-black);\n    animation: fade-in .3s;\n    opacity: 0.3;\n  }\n  &[open] {\n    display: flex;\n    flex-direction: column;\n  }\n\n  //Desktop\n  @media (min-width: 800px) {\n    height: fit-content;\n    box-shadow: var(--box-shadow-strong);\n    border-radius: var(--border-radius-m);\n    width: 600px;\n    max-height: 90vh;\n    max-width: 600px;\n    &.flexible {\n      width: fit-content;\n      max-width: 90vw;\n    }\n    &.full {\n      width: 90vw;\n      max-width: 90vw;\n      height: 90vh;\n      .body {\n        height: 100%;\n      }\n    }\n  }\n}\n.header {\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  padding: 0.25rem 0;\n}\n.headerContent {\n  flex: 1;\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  h3 {\n    margin: 0;\n  }\n}\n.close {\n  margin-top: -0.75rem;\n  margin-right: -1rem;\n}\n.body {\n  margin-left: -1rem;\n  margin-right: -1rem;\n  padding: 1rem;\n}\n.footer {\n  margin-top: 1rem;\n  padding-bottom: 0.5rem;\n}\n\n@keyframes fade-in {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.3;\n  }\n}\n\n@keyframes zoom-in {\n  from {\n    opacity: 0;\n    transform: scale(.5);\n  }\n  to {\n    opacity: 1;\n    transform: scale(1);\n  }\n}\n</style>\n","import {useRouting} from '@/composables/use-routing.js'\n\n/**\n * Navigation helpers for moving across the app\n */\nexport function useNavigation() {\n\n  //Routing\n  const {pushRoute, withQuery, withParams} = useRouting()\n\n  //Cohort management routes\n  const goToCohortsOverview = (...args) => pushRoute('cohorts-overview', ...args)\n  const goToManageCohort = (cohortId, ...args) => pushRoute(\n    withParams('cohort-view', {id: cohortId}), ...args\n  )\n  const goToAnalyzeCohort = (cohortId, ...args) => pushRoute(\n    withQuery('analytics-dashboard', {cohortIds: cohortId}), ...args\n  )\n\n  //Course management routes\n  const goToCoursesOverview = (...args) => pushRoute('courses-overview', ...args)\n  const goToCreateCourse = (query, ...args) => pushRoute(\n    withQuery('course-create', query), ...args\n  )\n  const goToViewCourse = (courseId, ...args) => pushRoute(\n    withParams('course-view', {id: courseId}), ...args\n  )\n  const goToEditCourse = (courseId, ...args) => pushRoute(\n    withParams('course-edit.details', {id: courseId}), ...args\n  )\n  const goToEditCourseLessons = (courseId, ...args) => pushRoute(\n    withParams('course-edit.lessons', {id: courseId}), ...args\n  )\n  const goToScheduleCourse = (courseId, scheduleId, ...args) => {\n    if (scheduleId) {\n      return pushRoute(\n        withQuery(\n          withParams('schedule-edit', {id: scheduleId}),\n          {courseId}\n        ), ...args\n      )\n    }\n    return pushRoute(\n      withQuery('schedule-create', {courseId}), ...args\n    )\n  }\n  const goToAnalyzeCourse = (courseId, ...args) => pushRoute(\n    withQuery('analytics-dashboard', {courseIds: courseId}), ...args\n  )\n\n  //Course catalog routes\n  const goToCourseCatalogOverview = (orgSlug, ...args) => pushRoute(\n    withParams('course-catalog-overview', {orgSlug}), ...args\n  )\n  const goToCourseCatalogView = (orgSlug, distributionId, ...args) => pushRoute(\n    withParams('course-catalog-view', {orgSlug, distributionId}), ...args\n  )\n\n  //Go to content library\n  const goToContentLibraryOverview = (...args) => pushRoute('content-library-overview', ...args)\n  const goToContentLibraryView = (courseId, ...args) => pushRoute(\n    withParams('content-library-view', {id: courseId}), ...args\n  )\n\n  //Schedule management routes\n  const goToSchedulesOverview = (...args) => pushRoute('schedules-overview', ...args)\n  const goToSchedulesOverviewForCohort = (cohortId, ...args) => pushRoute(\n    withQuery('schedules-overview', {cohortId}), ...args\n  )\n  const goToSchedulesOverviewForCourse = (courseId, ...args) => pushRoute(\n    withQuery('schedules-overview', {courseId}), ...args\n  )\n  const goToCreateSchedule = (...args) => pushRoute('schedule-create', ...args)\n  const goToEditSchedule = (scheduleId, ...args) => pushRoute(\n    withParams('schedule-edit', {id: scheduleId}), ...args\n  )\n  const goToScheduleDelivery = (scheduleId, ...args) => pushRoute(\n    withParams('schedule-delivery', {id: scheduleId}), ...args\n  )\n  const goToScheduleEnrollment = (scheduleId, ...args) => pushRoute(\n    withParams('schedule-enrollment', {id: scheduleId}), ...args\n  )\n  const goToAnalyzeSchedule = (scheduleId, ...args) => pushRoute(\n    withQuery('analytics-dashboard', {scheduleIds: scheduleId}), ...args\n  )\n\n  //AI course generation flows\n  const goToBuildCourseWithAI = (query, ...args) => pushRoute(\n    withQuery('course-ai-build.describe', query), ...args\n  )\n  const goToTranslateCourseWithAI = (query, ...args) => pushRoute(\n    withQuery('course-ai-translate.select-language', query), ...args\n  )\n  const goToModifyCourseWithAI = (query, ...args) => pushRoute(\n    withQuery('course-ai-modify.describe', query), ...args\n  )\n  const goToBuildCourseWithAIGenerationStep = (llmTaskId, ...args) => pushRoute(\n    withQuery('course-ai-build.generate', {llmTaskId}), ...args\n  )\n  const goToTranslateCourseWithAIGenerationStep = (llmTaskId, ...args) => pushRoute(\n    withQuery('course-ai-translate.generate', {llmTaskId}), ...args\n  )\n  const goToModifyCourseWithAIGenerationStep = (llmTaskId, ...args) => pushRoute(\n    withQuery('course-ai-modify.generate', {llmTaskId}), ...args\n  )\n\n  //Learner (user) routes\n  const goToViewLearner = (learnerId, ...args) => pushRoute(\n    withParams('learner-view', {id: learnerId}), ...args\n  )\n  const goToAnalyzeLearner = (learnerId, ...args) => pushRoute(\n    withQuery('analytics-dashboard', {learnerIds: learnerId}), ...args\n  )\n\n  //My enrollment routes\n  const goToMyEnrollmentsOverview = (...args) => pushRoute('my-enrollments-overview', ...args)\n  const goToMyEnrollmentView = (enrollmentId, ...args) => pushRoute(\n    withParams('my-enrollment-view', {id: enrollmentId}), ...args\n  )\n\n  //Analytics routes\n  const goToAnalytics = (...args) => pushRoute('analytics-dashboard', ...args)\n\n  //Automation routes\n  const goToAutomationsOverview = (...args) => pushRoute('automations-overview', ...args)\n  const goToCreateAutomation = (query, ...args) => pushRoute(\n    withQuery('automation-create', query), ...args\n  )\n  const goToEditAutomation = (automationId, ...args) => pushRoute(\n    withParams('automation-edit', {id: automationId}), ...args\n  )\n\n  //Expose interface\n  return {\n\n    //Cohorts\n    goToCohortsOverview,\n    goToManageCohort,\n    goToAnalyzeCohort,\n\n    //Courses\n    goToCoursesOverview,\n    goToCreateCourse,\n    goToViewCourse,\n    goToEditCourse,\n    goToEditCourseLessons,\n    goToScheduleCourse,\n    goToAnalyzeCourse,\n\n    //Course catalog\n    goToCourseCatalogOverview,\n    goToCourseCatalogView,\n\n    //Content library\n    goToContentLibraryOverview,\n    goToContentLibraryView,\n\n    //Schedules\n    goToSchedulesOverview,\n    goToSchedulesOverviewForCohort,\n    goToSchedulesOverviewForCourse,\n    goToCreateSchedule,\n    goToEditSchedule,\n    goToAnalyzeSchedule,\n    goToScheduleDelivery,\n    goToScheduleEnrollment,\n\n    //AI course generation\n    goToBuildCourseWithAI,\n    goToTranslateCourseWithAI,\n    goToModifyCourseWithAI,\n    goToBuildCourseWithAIGenerationStep,\n    goToTranslateCourseWithAIGenerationStep,\n    goToModifyCourseWithAIGenerationStep,\n\n    //Learners\n    goToViewLearner,\n    goToAnalyzeLearner,\n\n    //My enrollments\n    goToMyEnrollmentsOverview,\n    goToMyEnrollmentView,\n\n    //Analytics\n    goToAnalytics,\n\n    //Automations\n    goToAutomationsOverview,\n    goToCreateAutomation,\n    goToEditAutomation,\n  }\n}\n","export class HTTPError extends Error {\n    response;\n    request;\n    options;\n    constructor(response, request, options) {\n        const code = (response.status || response.status === 0) ? response.status : '';\n        const title = response.statusText || '';\n        const status = `${code} ${title}`.trim();\n        const reason = status ? `status code ${status}` : 'an unknown error';\n        super(`Request failed with ${reason}: ${request.method} ${request.url}`);\n        this.name = 'HTTPError';\n        this.response = response;\n        this.request = request;\n        this.options = options;\n    }\n}\n//# sourceMappingURL=HTTPError.js.map","export class TimeoutError extends Error {\n    request;\n    constructor(request) {\n        super(`Request timed out: ${request.method} ${request.url}`);\n        this.name = 'TimeoutError';\n        this.request = request;\n    }\n}\n//# sourceMappingURL=TimeoutError.js.map","// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isObject = (value) => value !== null && typeof value === 'object';\n//# sourceMappingURL=is.js.map","import { isObject } from './is.js';\nexport const validateAndMerge = (...sources) => {\n    for (const source of sources) {\n        if ((!isObject(source) || Array.isArray(source)) && source !== undefined) {\n            throw new TypeError('The `options` argument must be an object');\n        }\n    }\n    return deepMerge({}, ...sources);\n};\nexport const mergeHeaders = (source1 = {}, source2 = {}) => {\n    const result = new globalThis.Headers(source1);\n    const isHeadersInstance = source2 instanceof globalThis.Headers;\n    const source = new globalThis.Headers(source2);\n    for (const [key, value] of source.entries()) {\n        if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n            result.delete(key);\n        }\n        else {\n            result.set(key, value);\n        }\n    }\n    return result;\n};\nfunction newHookValue(original, incoming, property) {\n    return (Object.hasOwn(incoming, property) && incoming[property] === undefined)\n        ? []\n        : deepMerge(original[property] ?? [], incoming[property] ?? []);\n}\nexport const mergeHooks = (original = {}, incoming = {}) => ({\n    beforeRequest: newHookValue(original, incoming, 'beforeRequest'),\n    beforeRetry: newHookValue(original, incoming, 'beforeRetry'),\n    afterResponse: newHookValue(original, incoming, 'afterResponse'),\n    beforeError: newHookValue(original, incoming, 'beforeError'),\n});\n// TODO: Make this strongly-typed (no `any`).\nexport const deepMerge = (...sources) => {\n    let returnValue = {};\n    let headers = {};\n    let hooks = {};\n    for (const source of sources) {\n        if (Array.isArray(source)) {\n            if (!Array.isArray(returnValue)) {\n                returnValue = [];\n            }\n            returnValue = [...returnValue, ...source];\n        }\n        else if (isObject(source)) {\n            for (let [key, value] of Object.entries(source)) {\n                if (isObject(value) && key in returnValue) {\n                    value = deepMerge(returnValue[key], value);\n                }\n                returnValue = { ...returnValue, [key]: value };\n            }\n            if (isObject(source.hooks)) {\n                hooks = mergeHooks(hooks, source.hooks);\n                returnValue.hooks = hooks;\n            }\n            if (isObject(source.headers)) {\n                headers = mergeHeaders(headers, source.headers);\n                returnValue.headers = headers;\n            }\n        }\n    }\n    return returnValue;\n};\n//# sourceMappingURL=merge.js.map","export const supportsRequestStreams = (() => {\n    let duplexAccessed = false;\n    let hasContentType = false;\n    const supportsReadableStream = typeof globalThis.ReadableStream === 'function';\n    const supportsRequest = typeof globalThis.Request === 'function';\n    if (supportsReadableStream && supportsRequest) {\n        try {\n            hasContentType = new globalThis.Request('https://empty.invalid', {\n                body: new globalThis.ReadableStream(),\n                method: 'POST',\n                // @ts-expect-error - Types are outdated.\n                get duplex() {\n                    duplexAccessed = true;\n                    return 'half';\n                },\n            }).headers.has('Content-Type');\n        }\n        catch (error) {\n            // QQBrowser on iOS throws \"unsupported BodyInit type\" error (see issue #581)\n            if (error instanceof Error && error.message === 'unsupported BodyInit type') {\n                return false;\n            }\n            throw error;\n        }\n    }\n    return duplexAccessed && !hasContentType;\n})();\nexport const supportsAbortController = typeof globalThis.AbortController === 'function';\nexport const supportsResponseStreams = typeof globalThis.ReadableStream === 'function';\nexport const supportsFormData = typeof globalThis.FormData === 'function';\nexport const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\nconst validate = () => undefined;\nvalidate();\nexport const responseTypes = {\n    json: 'application/json',\n    text: 'text/*',\n    formData: 'multipart/form-data',\n    arrayBuffer: '*/*',\n    blob: '*/*',\n};\n// The maximum value of a 32bit int (see issue #117)\nexport const maxSafeTimeout = 2_147_483_647;\nexport const stop = Symbol('stop');\nexport const kyOptionKeys = {\n    json: true,\n    parseJson: true,\n    stringifyJson: true,\n    searchParams: true,\n    prefixUrl: true,\n    retry: true,\n    timeout: true,\n    hooks: true,\n    throwHttpErrors: true,\n    onDownloadProgress: true,\n    fetch: true,\n};\nexport const requestOptionsRegistry = {\n    method: true,\n    headers: true,\n    body: true,\n    mode: true,\n    credentials: true,\n    cache: true,\n    redirect: true,\n    referrer: true,\n    referrerPolicy: true,\n    integrity: true,\n    keepalive: true,\n    signal: true,\n    window: true,\n    dispatcher: true,\n    duplex: true,\n    priority: true,\n};\n//# sourceMappingURL=constants.js.map","import { requestMethods } from '../core/constants.js';\nexport const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\nconst retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\nconst retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\nconst retryAfterStatusCodes = [413, 429, 503];\nconst defaultRetryOptions = {\n    limit: 2,\n    methods: retryMethods,\n    statusCodes: retryStatusCodes,\n    afterStatusCodes: retryAfterStatusCodes,\n    maxRetryAfter: Number.POSITIVE_INFINITY,\n    backoffLimit: Number.POSITIVE_INFINITY,\n    delay: attemptCount => 0.3 * (2 ** (attemptCount - 1)) * 1000,\n};\nexport const normalizeRetryOptions = (retry = {}) => {\n    if (typeof retry === 'number') {\n        return {\n            ...defaultRetryOptions,\n            limit: retry,\n        };\n    }\n    if (retry.methods && !Array.isArray(retry.methods)) {\n        throw new Error('retry.methods must be an array');\n    }\n    if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n        throw new Error('retry.statusCodes must be an array');\n    }\n    return {\n        ...defaultRetryOptions,\n        ...retry,\n    };\n};\n//# sourceMappingURL=normalize.js.map","import { TimeoutError } from '../errors/TimeoutError.js';\n// `Promise.race()` workaround (#91)\nexport default async function timeout(request, init, abortController, options) {\n    return new Promise((resolve, reject) => {\n        const timeoutId = setTimeout(() => {\n            if (abortController) {\n                abortController.abort();\n            }\n            reject(new TimeoutError(request));\n        }, options.timeout);\n        void options\n            .fetch(request, init)\n            .then(resolve)\n            .catch(reject)\n            .then(() => {\n            clearTimeout(timeoutId);\n        });\n    });\n}\n//# sourceMappingURL=timeout.js.map","// https://github.com/sindresorhus/delay/tree/ab98ae8dfcb38e1593286c94d934e70d14a4e111\nexport default async function delay(ms, { signal }) {\n    return new Promise((resolve, reject) => {\n        if (signal) {\n            signal.throwIfAborted();\n            signal.addEventListener('abort', abortHandler, { once: true });\n        }\n        function abortHandler() {\n            clearTimeout(timeoutId);\n            reject(signal.reason);\n        }\n        const timeoutId = setTimeout(() => {\n            signal?.removeEventListener('abort', abortHandler);\n            resolve();\n        }, ms);\n    });\n}\n//# sourceMappingURL=delay.js.map","import { kyOptionKeys, requestOptionsRegistry } from '../core/constants.js';\nexport const findUnknownOptions = (request, options) => {\n    const unknownOptions = {};\n    for (const key in options) {\n        if (!(key in requestOptionsRegistry) && !(key in kyOptionKeys) && !(key in request)) {\n            unknownOptions[key] = options[key];\n        }\n    }\n    return unknownOptions;\n};\n//# sourceMappingURL=options.js.map","import { HTTPError } from '../errors/HTTPError.js';\nimport { TimeoutError } from '../errors/TimeoutError.js';\nimport { mergeHeaders, mergeHooks } from '../utils/merge.js';\nimport { normalizeRequestMethod, normalizeRetryOptions } from '../utils/normalize.js';\nimport timeout from '../utils/timeout.js';\nimport delay from '../utils/delay.js';\nimport { findUnknownOptions } from '../utils/options.js';\nimport { maxSafeTimeout, responseTypes, stop, supportsAbortController, supportsFormData, supportsResponseStreams, supportsRequestStreams, } from './constants.js';\nexport class Ky {\n    static create(input, options) {\n        const ky = new Ky(input, options);\n        const function_ = async () => {\n            if (typeof ky._options.timeout === 'number' && ky._options.timeout > maxSafeTimeout) {\n                throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n            }\n            // Delay the fetch so that body method shortcuts can set the Accept header\n            await Promise.resolve();\n            let response = await ky._fetch();\n            for (const hook of ky._options.hooks.afterResponse) {\n                // eslint-disable-next-line no-await-in-loop\n                const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n                if (modifiedResponse instanceof globalThis.Response) {\n                    response = modifiedResponse;\n                }\n            }\n            ky._decorateResponse(response);\n            if (!response.ok && ky._options.throwHttpErrors) {\n                let error = new HTTPError(response, ky.request, ky._options);\n                for (const hook of ky._options.hooks.beforeError) {\n                    // eslint-disable-next-line no-await-in-loop\n                    error = await hook(error);\n                }\n                throw error;\n            }\n            // If `onDownloadProgress` is passed, it uses the stream API internally\n            /* istanbul ignore next */\n            if (ky._options.onDownloadProgress) {\n                if (typeof ky._options.onDownloadProgress !== 'function') {\n                    throw new TypeError('The `onDownloadProgress` option must be a function');\n                }\n                if (!supportsResponseStreams) {\n                    throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n                }\n                return ky._stream(response.clone(), ky._options.onDownloadProgress);\n            }\n            return response;\n        };\n        const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n        const result = (isRetriableMethod ? ky._retry(function_) : function_());\n        for (const [type, mimeType] of Object.entries(responseTypes)) {\n            result[type] = async () => {\n                // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n                ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n                const awaitedResult = await result;\n                const response = awaitedResult.clone();\n                if (type === 'json') {\n                    if (response.status === 204) {\n                        return '';\n                    }\n                    const arrayBuffer = await response.clone().arrayBuffer();\n                    const responseSize = arrayBuffer.byteLength;\n                    if (responseSize === 0) {\n                        return '';\n                    }\n                    if (options.parseJson) {\n                        return options.parseJson(await response.text());\n                    }\n                }\n                return response[type]();\n            };\n        }\n        return result;\n    }\n    request;\n    abortController;\n    _retryCount = 0;\n    _input;\n    _options;\n    // eslint-disable-next-line complexity\n    constructor(input, options = {}) {\n        this._input = input;\n        this._options = {\n            ...options,\n            headers: mergeHeaders(this._input.headers, options.headers),\n            hooks: mergeHooks({\n                beforeRequest: [],\n                beforeRetry: [],\n                beforeError: [],\n                afterResponse: [],\n            }, options.hooks),\n            method: normalizeRequestMethod(options.method ?? this._input.method),\n            // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n            prefixUrl: String(options.prefixUrl || ''),\n            retry: normalizeRetryOptions(options.retry),\n            throwHttpErrors: options.throwHttpErrors !== false,\n            timeout: options.timeout ?? 10_000,\n            fetch: options.fetch ?? globalThis.fetch.bind(globalThis),\n        };\n        if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n            throw new TypeError('`input` must be a string, URL, or Request');\n        }\n        if (this._options.prefixUrl && typeof this._input === 'string') {\n            if (this._input.startsWith('/')) {\n                throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n            }\n            if (!this._options.prefixUrl.endsWith('/')) {\n                this._options.prefixUrl += '/';\n            }\n            this._input = this._options.prefixUrl + this._input;\n        }\n        if (supportsAbortController) {\n            this.abortController = new globalThis.AbortController();\n            const originalSignal = this._options.signal ?? this._input.signal;\n            originalSignal?.addEventListener('abort', () => {\n                this.abortController.abort(originalSignal.reason);\n            });\n            this._options.signal = this.abortController.signal;\n        }\n        if (supportsRequestStreams) {\n            // @ts-expect-error - Types are outdated.\n            this._options.duplex = 'half';\n        }\n        if (this._options.json !== undefined) {\n            this._options.body = this._options.stringifyJson?.(this._options.json) ?? JSON.stringify(this._options.json);\n            this._options.headers.set('content-type', this._options.headers.get('content-type') ?? 'application/json');\n        }\n        this.request = new globalThis.Request(this._input, this._options);\n        if (this._options.searchParams) {\n            // eslint-disable-next-line unicorn/prevent-abbreviations\n            const textSearchParams = typeof this._options.searchParams === 'string'\n                ? this._options.searchParams.replace(/^\\?/, '')\n                : new URLSearchParams(this._options.searchParams).toString();\n            // eslint-disable-next-line unicorn/prevent-abbreviations\n            const searchParams = '?' + textSearchParams;\n            const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n            // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n            if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n                || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n                this.request.headers.delete('content-type');\n            }\n            // The spread of `this.request` is required as otherwise it misses the `duplex` option for some reason and throws.\n            this.request = new globalThis.Request(new globalThis.Request(url, { ...this.request }), this._options);\n        }\n    }\n    _calculateRetryDelay(error) {\n        this._retryCount++;\n        if (this._retryCount > this._options.retry.limit || error instanceof TimeoutError) {\n            throw error;\n        }\n        if (error instanceof HTTPError) {\n            if (!this._options.retry.statusCodes.includes(error.response.status)) {\n                throw error;\n            }\n            const retryAfter = error.response.headers.get('Retry-After')\n                ?? error.response.headers.get('RateLimit-Reset')\n                ?? error.response.headers.get('X-RateLimit-Reset') // GitHub\n                ?? error.response.headers.get('X-Rate-Limit-Reset'); // Twitter\n            if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n                let after = Number(retryAfter) * 1000;\n                if (Number.isNaN(after)) {\n                    after = Date.parse(retryAfter) - Date.now();\n                }\n                else if (after >= Date.parse('2024-01-01')) {\n                    // A large number is treated as a timestamp (fixed threshold protects against clock skew)\n                    after -= Date.now();\n                }\n                const max = this._options.retry.maxRetryAfter ?? after;\n                return after < max ? after : max;\n            }\n            if (error.response.status === 413) {\n                throw error;\n            }\n        }\n        const retryDelay = this._options.retry.delay(this._retryCount);\n        return Math.min(this._options.retry.backoffLimit, retryDelay);\n    }\n    _decorateResponse(response) {\n        if (this._options.parseJson) {\n            response.json = async () => this._options.parseJson(await response.text());\n        }\n        return response;\n    }\n    async _retry(function_) {\n        try {\n            return await function_();\n        }\n        catch (error) {\n            const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n            if (this._retryCount < 1) {\n                throw error;\n            }\n            await delay(ms, { signal: this._options.signal });\n            for (const hook of this._options.hooks.beforeRetry) {\n                // eslint-disable-next-line no-await-in-loop\n                const hookResult = await hook({\n                    request: this.request,\n                    options: this._options,\n                    error: error,\n                    retryCount: this._retryCount,\n                });\n                // If `stop` is returned from the hook, the retry process is stopped\n                if (hookResult === stop) {\n                    return;\n                }\n            }\n            return this._retry(function_);\n        }\n    }\n    async _fetch() {\n        for (const hook of this._options.hooks.beforeRequest) {\n            // eslint-disable-next-line no-await-in-loop\n            const result = await hook(this.request, this._options);\n            if (result instanceof Request) {\n                this.request = result;\n                break;\n            }\n            if (result instanceof Response) {\n                return result;\n            }\n        }\n        const nonRequestOptions = findUnknownOptions(this.request, this._options);\n        // Cloning is done here to prepare in advance for retries\n        const mainRequest = this.request;\n        this.request = mainRequest.clone();\n        if (this._options.timeout === false) {\n            return this._options.fetch(mainRequest, nonRequestOptions);\n        }\n        return timeout(mainRequest, nonRequestOptions, this.abortController, this._options);\n    }\n    /* istanbul ignore next */\n    _stream(response, onDownloadProgress) {\n        const totalBytes = Number(response.headers.get('content-length')) || 0;\n        let transferredBytes = 0;\n        if (response.status === 204) {\n            if (onDownloadProgress) {\n                onDownloadProgress({ percent: 1, totalBytes, transferredBytes }, new Uint8Array());\n            }\n            return new globalThis.Response(null, {\n                status: response.status,\n                statusText: response.statusText,\n                headers: response.headers,\n            });\n        }\n        return new globalThis.Response(new globalThis.ReadableStream({\n            async start(controller) {\n                const reader = response.body.getReader();\n                if (onDownloadProgress) {\n                    onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n                }\n                async function read() {\n                    const { done, value } = await reader.read();\n                    if (done) {\n                        controller.close();\n                        return;\n                    }\n                    if (onDownloadProgress) {\n                        transferredBytes += value.byteLength;\n                        const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n                        onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n                    }\n                    controller.enqueue(value);\n                    await read();\n                }\n                await read();\n            },\n        }), {\n            status: response.status,\n            statusText: response.statusText,\n            headers: response.headers,\n        });\n    }\n}\n//# sourceMappingURL=Ky.js.map","/*! MIT License © Sindre Sorhus */\nimport { Ky } from './core/Ky.js';\nimport { requestMethods, stop } from './core/constants.js';\nimport { validateAndMerge } from './utils/merge.js';\nconst createInstance = (defaults) => {\n    // eslint-disable-next-line @typescript-eslint/promise-function-async\n    const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n    for (const method of requestMethods) {\n        // eslint-disable-next-line @typescript-eslint/promise-function-async\n        ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n    }\n    ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n    ky.extend = (newDefaults) => {\n        if (typeof newDefaults === 'function') {\n            newDefaults = newDefaults(defaults ?? {});\n        }\n        return createInstance(validateAndMerge(defaults, newDefaults));\n    };\n    ky.stop = stop;\n    return ky;\n};\nconst ky = createInstance();\nexport default ky;\nexport { HTTPError } from './errors/HTTPError.js';\nexport { TimeoutError } from './errors/TimeoutError.js';\n//# sourceMappingURL=index.js.map","\n//Map of http status codes to error names\nexport const errorNames = {\n  400: 'Bad request',\n  401: 'Unauthenticated',\n  403: 'Unauthorized',\n  404: 'Not found',\n  408: 'Request timeout',\n  409: 'Conflict',\n  422: 'Validation error',\n  429: 'Too many requests',\n  500: 'Internal server error',\n  501: 'Not implemented',\n  502: 'Bad gateway',\n  503: 'Service unavailable',\n  504: 'Gateway timeout',\n}\n","import {errorNames} from '@/constants/errors.js'\n\n/**\n * Response error\n */\nexport class ResponseError extends Error {\n\n  /**\n   * Constructor\n   */\n  constructor(response, config, data) {\n\n    //Create message\n    const {status} = response\n    const message = ResponseError.getErrorMessage(data, status)\n\n    //Parent constructor\n    super(message)\n\n    //Set props\n    this.name = ResponseError.getErrorName(status)\n    this.response = response\n    this.config = config\n    this.status = status\n    this.data = data\n    this.message = message\n\n    //Capture stack trace\n    if (!this.stack) {\n      Error.captureStackTrace(this, this.constructor)\n    }\n  }\n\n  //Ignore server errors in Sentry unless we're not expecting them\n  get ignoreInSentry() {\n    return (\n      this.isServerError ||\n      this.isNetworkError ||\n      this.isUnauthenticatedError ||\n      this.isUnauthorizedError\n    )\n  }\n\n  //Error type helpers\n  get isResponseError() {\n    return true\n  }\n  get isClientError() {\n    return this.status >= 400 && this.status <= 499\n  }\n  get isServerError() {\n    return this.status >= 500 && this.status <= 599\n  }\n  get isNetworkError() {\n    return this.status === 0 || this.status === -1\n  }\n  get isBadRequestError() {\n    return this.status === 400\n  }\n  get isUnauthenticatedError() {\n    return this.status === 401\n  }\n  get isUnauthorizedError() {\n    return this.status === 403\n  }\n  get isNotFoundError() {\n    return this.status === 404\n  }\n  get isRequestTimeoutError() {\n    return this.status === 408\n  }\n  get isConflictError() {\n    return this.status === 409\n  }\n  get isValidationError() {\n    return this.status === 422\n  }\n  get isTooManyRequestsError() {\n    return this.status === 429\n  }\n  get isInternalServerError() {\n    return this.status === 500\n  }\n  get isNotImplementedError() {\n    return this.status === 501\n  }\n  get isGatewayError() {\n    return this.status === 502\n  }\n  get isServiceUnavailableError() {\n    return this.status === 503\n  }\n  get isGatewayTimeoutError() {\n    return this.status === 504\n  }\n\n  /**\n   * Error name generator\n   */\n  static getErrorName(status) {\n    if (errorNames[status]) {\n      return errorNames[status]\n    }\n    if (status >= 400 && status <= 499) {\n      return `Client error (${status})`\n    }\n    if (status >= 500 && status <= 599) {\n      return `Server error (${status})`\n    }\n    if (status === 0 || status === -1) {\n      return 'Network error'\n    }\n    return `Response error (${status})`\n  }\n\n  /**\n   * Error message generator\n   */\n  static getErrorMessage(data, status) {\n\n    //Check for message or error in data\n    if (data?.message && typeof data.message === 'string') {\n      return data.message\n    }\n    if (data?.error && typeof data.error === 'string') {\n      return data.error\n    }\n    if (data?.errors && typeof data.errors === 'string') {\n      return data.errors\n    }\n    if (data?.errors && Array.isArray(data.errors)) {\n      return data.errors.join(', ')\n    }\n\n    //Use status specific error name\n    return ResponseError.getErrorName(status)\n  }\n}\n","import ky from 'ky'\nimport {ResponseError} from '@/services/response-error.js'\nimport {getURLSearchParams} from '@/helpers/url.js'\n\n/**\n * Http service class – This is a base wrapper around ky, and facilitates Ky\n * setup, request & response handling, and error processing. It should not\n * be used directly, but instead via the API service classes which provide an\n * additional layer of abstraction, shared logic and convenience helpers.\n */\nclass HttpService {\n\n  /**\n   * Constructor\n   */\n  constructor() {\n    this.setupService()\n  }\n\n  /**\n   * Setup service\n   */\n  setupService() {\n    this.ky = ky.create({\n      timeout: 27500, //Ky uses 10000 by default\n      retry: {\n        statusCodes: [408, 502, 503, 504], //Ky includes 500 by default\n      },\n    })\n  }\n\n  /**************************************************************************\n   * Request & response handling\n   ***/\n\n  /**\n   * Generic request wrapper\n   */\n  async request(url, config = {}) {\n\n    //Process config\n    this.appendJsonHeaders(config)\n    this.appendSearchParams(config)\n    this.appendCacheControl(config)\n\n    //Perform request\n    try {\n      const response = await this.ky(url, config)\n      const data = await this.processSuccessfulResponse(response, config)\n      return data\n    }\n    catch (error) {\n      await this.processFailedResponse(error, config)\n    }\n  }\n\n  /**\n   * Get response data\n   */\n  async getResponseData(response) {\n    const contentType = response.headers.get('content-type')\n    if (contentType && contentType.includes('application/json')) {\n      return await response.clone().json()\n    }\n    return await response.clone().text()\n  }\n\n  /**\n   * Process response\n   */\n  async processSuccessfulResponse(response, config) {\n\n    //Get data\n    const data = await this.getResponseData(response)\n\n    //Successful response (2xx) from server, but actually an error?\n    if (data && typeof data === 'object' && (data.errors || data.error)) {\n      throw this.createError(response, config, data)\n    }\n\n    //Return data\n    return data\n  }\n\n  /**\n   * Process error response\n   */\n  async processFailedResponse(responseError, config) {\n\n    //Not a response error? Process as is\n    //Could have been thrown from successful response processing\n    if (!responseError.response) {\n      await this.processError(responseError)\n      return\n    }\n\n    //Get response data\n    const {response} = responseError\n    const data = await this.getResponseData(response)\n\n    //Process error\n    const error = this.createError(response, config, data)\n    await this.processError(error)\n  }\n\n  /**\n   * Create error\n   */\n  createError(response, config, data) {\n    return new ResponseError(response, config, data)\n  }\n\n  /**\n   * Process error\n   */\n  async processError(error) {\n\n    //No data, rethrow as is\n    const {data} = error\n    if (typeof data !== 'object') {\n      throw error\n    }\n\n    //Normalize errors in data to always be an array\n    if (data.error && typeof data.error === 'string') {\n      data.errors = [data.error]\n    }\n    else if (data.errors && typeof data.errors === 'string') {\n      data.errors = [data.errors]\n    }\n\n    //Rethrow\n    throw error\n  }\n\n  /**************************************************************************\n   * Config helpers\n   ***/\n\n  /**\n   * Append JSON headers\n   */\n  appendJsonHeaders(config) {\n    if (config.json) {\n      config.headers ??= {}\n      config.headers['Content-Type'] = 'application/json'\n    }\n  }\n\n  /**\n   * Append search params\n   */\n  appendSearchParams(config) {\n    if (config.params) {\n      config.searchParams ??= getURLSearchParams(config.params)\n    }\n  }\n\n  /**\n   * Append cache control\n   */\n  appendCacheControl(config) {\n    if (config.ignoreCache) {\n      config.cache ??= 'no-store'\n    }\n  }\n}\n\n//Export singleton instance\nexport const http = new HttpService()\n","import {DateTime} from 'luxon'\n\n//Test for ISO date string\nexport function isISODateString(str) {\n  return str.match(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.*/)\n}\n\n//Helper to convert a value from JSON\nexport function valueFromJSON(value) {\n  if (Array.isArray(value)) {\n    return value.map(valueFromJSON)\n  }\n  else if (typeof value === 'string') {\n    if (isISODateString(value)) {\n      const date = DateTime.fromISO(value)\n      if (date.isValid) {\n        return date\n      }\n    }\n    if (value === 'true') {\n      return true\n    }\n    else if (value === 'false') {\n      return false\n    }\n    return value\n  }\n  else if (value && typeof value === 'object') {\n    if (value.isModel || value.isLuxonDateTime) {\n      return value\n    }\n    const copy = {}\n    for (const key in value) {\n      if (Object.prototype.hasOwnProperty.call(value, key)) {\n        copy[key] = valueFromJSON(value[key])\n      }\n    }\n    return copy\n  }\n  return value\n}\n\n//Helper to convert a value to JSON\nexport function valueToJSON(value) {\n  if (Array.isArray(value)) {\n    return value.map(valueToJSON)\n  }\n  else if (value && typeof value === 'object') {\n    if (value instanceof File) {\n      return value\n    }\n    if (value.isModel) {\n      return value.toJson()\n    }\n    else if (value.isLuxonDateTime) {\n      return value.toISO()\n    }\n    const copy = {}\n    for (const key in value) {\n      if (Object.prototype.hasOwnProperty.call(value, key)) {\n        copy[key] = valueToJSON(value[key])\n      }\n    }\n    return copy\n  }\n  return value\n}\n\n//Convert string to camel case\nexport function toCamelCase(str) {\n  if (typeof str === 'number') {\n    return String(str)\n  }\n  else if (typeof str !== 'string') {\n    return ''\n  }\n  if ((str = String(str).trim()) === '') {\n    return ''\n  }\n  return str\n    .replace(/_+|-+/g, ' ')\n    .replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, (match, index) => {\n      if (Number(match) === 0) {\n        return ''\n      }\n      return (index === 0) ?\n        match.toLowerCase() : match.toUpperCase()\n    })\n}\n\n//Convert string to snake case\nexport function toSnakeCase(str, uppercase = false) {\n  if (typeof str === 'number') {\n    return String(str)\n  }\n  else if (typeof str !== 'string') {\n    return ''\n  }\n  if ((str = String(str).trim()) === '') {\n    return ''\n  }\n  str = str.replace(/(\\s*-*\\b\\w|[A-Z])/g, ($1) => {\n    $1 = $1.trim().toLowerCase().replace('-', '')\n    return ($1[0] === '_' ? '' : '_') + $1\n  }).slice(1)\n  if (uppercase) {\n    return str.toUpperCase()\n  }\n  return str\n}\n\n//Uppercase first letter\nexport function toUpperCaseFirst(str) {\n  if (str === '') {\n    return ''\n  }\n  const first = str[0].toUpperCase()\n  const rest = str.substring(1)\n  return `${first}${rest}`\n}\n\n//Replace unicode characters by strings\nexport function replaceUnicode(str) {\n  return JSON.parse(`[\"${str}\"]`)[0]\n}\n\n//Truncate a string\nexport function truncate(str, maxCharacters, ending = '...') {\n  if (str.length <= maxCharacters) {\n    return str\n  }\n  return `${str.slice(0, maxCharacters)}${ending}`\n}\n\n//Get number of line breaks in a string\nexport function getNumLineBreaks(str) {\n  return str.match(/(?:\\r\\n|\\r|\\n)/g)?.length || 0\n}\n\n//Get character count including line breaks\nexport function getCharacterCount(...args) {\n  const str = args.join('')\n  return str.length + getNumLineBreaks(str)\n}\n\n//Check if character count is over the limit\nexport function isOverCharacterLimit(str, limit) {\n  return getCharacterCount(str) > limit\n}\n\n//Levenshtein distance between two strings\nexport function levenshteinDistance(s, t) {\n  if (!s.length) {\n    return t.length\n  }\n  if (!t.length) {\n    return s.length\n  }\n  const arr = []\n  for (let i = 0; i <= t.length; i++) {\n    arr[i] = [i]\n    for (let j = 1; j <= s.length; j++) {\n      arr[i][j] =\n        i === 0\n          ? j\n          : Math.min(\n            arr[i - 1][j] + 1,\n            arr[i][j - 1] + 1,\n            arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)\n          )\n    }\n  }\n  return arr[t.length][s.length]\n}\n\n//Pluralize a word\nexport function pluralize(noun) {\n  const immutable = [\n    'media',\n  ]\n  if (immutable.includes(noun)) {\n    return noun\n  }\n  else if (noun.endsWith('y')) {\n    return `${noun.substring(0, noun.length - 1)}ies`\n  }\n  else if (\n    noun.endsWith('ch') ||\n    noun.endsWith('sh') ||\n    noun.endsWith('x') ||\n    noun.endsWith('z') ||\n    noun.endsWith('s') ||\n    noun.endsWith('o')\n  ) {\n    return `${noun}es`\n  }\n  return `${noun}s`\n}\n\n//Inflection helper\nexport function inflect(noun, count, includeCount = false) {\n  const inflected = count === 1 ? noun : pluralize(noun)\n  return includeCount ? `${count} ${inflected}` : inflected\n}\n\n//Strip HTML\nexport function stripHtml(str) {\n  const doc = new DOMParser().parseFromString(str, 'text/html')\n  return doc.body.textContent || ''\n}\n","import {DateTime} from 'luxon'\nimport {toSnakeCase, toCamelCase} from '@/helpers/string.js'\n\n//Lookup dotted path in an object\nexport function get(obj, path, defaultValue = undefined) {\n\n  //Empty path, return object\n  if (!path) {\n    return obj\n  }\n\n  //Split path in object keys to traverse\n  const keys = path.split('.')\n  for (let i = 0; i < keys.length && obj !== undefined; i++) {\n    const key = keys[i]\n    obj = (obj !== null) ? obj[key] : undefined\n  }\n\n  //Return default value if undefined\n  if (obj === undefined) {\n    return defaultValue\n  }\n\n  //Return reference\n  return obj\n}\n\n//Set dotted path value in an object\nexport function set(obj, path, value) {\n\n  //Empty path\n  if (!path) {\n    return\n  }\n\n  //Split path in object keys to traverse\n  const keys = path.split('.')\n  for (let i = 0; i < (keys.length - 1); i++) {\n    const key = keys[i]\n    if (!obj[key]) {\n      obj[key] = {}\n    }\n    obj = obj[key]\n  }\n\n  //Get last key\n  const prop = keys[keys.length - 1]\n  obj[prop] = value\n}\n\n//Simple object check\nexport function isObject(value) {\n  return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\n//Check if object is empty\nexport function isEmptyObject(obj) {\n\n  //Non-objects and null are not considered to be empty\n  if (typeof obj !== 'object' || obj === null) {\n    return false\n  }\n\n  //Check instance of DateTime\n  if (obj.isLuxonDateTime) {\n    return false\n  }\n\n  //Check arrays\n  if (Array.isArray(obj)) {\n    return obj.length === 0 || obj.some(val => isEmptyObject(val))\n  }\n\n  //Check if object has any keys\n  if (Object.keys(obj).length === 0) {\n    return true\n  }\n\n  //Check if any values are empty (recursive)\n  return Object.values(obj).some(val => val === '' || isEmptyObject(val))\n}\n\n//Create form data from object\nexport function createFormData(obj) {\n  if (obj instanceof FormData) {\n    return obj\n  }\n  const formData = new FormData()\n  for (const key in obj) {\n    formData.append(key, obj[key])\n  }\n  return formData\n}\n\n//Convert form data keys\nexport function convertFormDataKeys(form, fn) {\n  const clone = new FormData()\n  for (const [key, value] of form.entries()) {\n    const newKey = fn(key)\n    clone.append(newKey, value)\n  }\n  return clone\n}\n\n//Convert object keys recursively\nexport function convertKeys(obj, fn, ignore) {\n\n  //No conversion needed\n  if (typeof obj !== 'object' || obj === null || obj instanceof File) {\n    return obj\n  }\n\n  //Form data given, use special helper\n  if (obj instanceof FormData) {\n    return convertFormDataKeys(obj, fn)\n  }\n\n  //Array given\n  if (Array.isArray(obj)) {\n    return obj.map(item => convertKeys(item, fn, ignore))\n  }\n\n  //Create new object and convert keys\n  const clone = {}\n  for (const key in obj) {\n    const shouldIgnore = Array.isArray(ignore) && ignore.includes(key)\n    const newKey = shouldIgnore ? key : fn(key)\n    clone[newKey] = convertKeys(obj[key], fn, ignore)\n  }\n\n  //Return clone\n  return clone\n}\n\n//Convert object keys to snake case\nexport function convertKeysToSnakeCase(obj, ignore) {\n  return convertKeys(obj, toSnakeCase, ignore)\n}\n\n//Convert object keys to camel case\nexport function convertKeysToCamelCase(obj, ignore) {\n  return convertKeys(obj, toCamelCase, ignore)\n}\n\n//Convert object to ID only\nexport function idOnly(obj) {\n  if (typeof obj === 'object' && obj !== null) {\n    return obj.id\n  }\n  return obj\n}\n\n//Helper to copy a value\nexport function copyValue(value) {\n  if (Array.isArray(value)) {\n    return value.map((value, index) => copyValue(value, index))\n  }\n  if (typeof value === 'object' && value !== null) {\n    if (value instanceof DateTime) {\n      return DateTime.fromObject(value.toObject())\n    }\n    if (value.isModel) {\n      return value.clone()\n    }\n    return cloneObject(value)\n  }\n  return value\n}\n\n//Helper to copy an object (for cloning)\nexport function cloneObject(obj) {\n  const clone = {}\n  for (const key in obj) {\n    clone[key] = copyValue(obj[key])\n  }\n  return clone\n}\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","// This is a magic string replaced by rollup\n\nconst SDK_VERSION = \"8.50.0\" ;\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { SDK_VERSION } from './version.js';\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ = globalThis ;\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n  const gbl = (obj || GLOBAL_OBJ) ;\n  const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n  const versionedCarrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n  return versionedCarrier[name] || (versionedCarrier[name] = creator());\n}\n\nexport { GLOBAL_OBJ, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { getGlobalSingleton, GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n  'debug',\n  'info',\n  'warn',\n  'error',\n  'log',\n  'assert',\n  'trace',\n] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n  if (!('console' in GLOBAL_OBJ)) {\n    return callback();\n  }\n\n  const console = GLOBAL_OBJ.console ;\n  const wrappedFuncs = {};\n\n  const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n  // Restore all wrapped console methods\n  wrappedLevels.forEach(level => {\n    const originalConsoleMethod = originalConsoleMethods[level] ;\n    wrappedFuncs[level] = console[level] ;\n    console[level] = originalConsoleMethod;\n  });\n\n  try {\n    return callback();\n  } finally {\n    // Revert restoration to wrapped state\n    wrappedLevels.forEach(level => {\n      console[level] = wrappedFuncs[level] ;\n    });\n  }\n}\n\nfunction makeLogger() {\n  let enabled = false;\n  const logger = {\n    enable: () => {\n      enabled = true;\n    },\n    disable: () => {\n      enabled = false;\n    },\n    isEnabled: () => enabled,\n  };\n\n  if (DEBUG_BUILD) {\n    CONSOLE_LEVELS.forEach(name => {\n      logger[name] = (...args) => {\n        if (enabled) {\n          consoleSandbox(() => {\n            GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n          });\n        }\n      };\n    });\n  } else {\n    CONSOLE_LEVELS.forEach(name => {\n      logger[name] = () => undefined;\n    });\n  }\n\n  return logger ;\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nconst logger = getGlobalSingleton('logger', makeLogger);\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n  const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n  return (stack, skipFirstLines = 0, framesToPop = 0) => {\n    const frames = [];\n    const lines = stack.split('\\n');\n\n    for (let i = skipFirstLines; i < lines.length; i++) {\n      const line = lines[i] ;\n      // Ignore lines over 1kb as they are unlikely to be stack frames.\n      // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n      // input size. Huge strings can result in hangs/Denial of Service:\n      // https://github.com/getsentry/sentry-javascript/issues/2286\n      if (line.length > 1024) {\n        continue;\n      }\n\n      // https://github.com/getsentry/sentry-javascript/issues/5459\n      // Remove webpack (error: *) wrappers\n      const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n      // https://github.com/getsentry/sentry-javascript/issues/7813\n      // Skip Error: lines\n      if (cleanedLine.match(/\\S*Error: /)) {\n        continue;\n      }\n\n      for (const parser of sortedParsers) {\n        const frame = parser(cleanedLine);\n\n        if (frame) {\n          frames.push(frame);\n          break;\n        }\n      }\n\n      if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n        break;\n      }\n    }\n\n    return stripSentryFramesAndReverse(frames.slice(framesToPop));\n  };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n  if (Array.isArray(stackParser)) {\n    return createStackParser(...stackParser);\n  }\n  return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n  if (!stack.length) {\n    return [];\n  }\n\n  const localStack = Array.from(stack);\n\n  // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n  if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n  }\n\n  // Reversing in the middle of the procedure allows us to just pop the values off the stack\n  localStack.reverse();\n\n  // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n  if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n    localStack.pop();\n\n    // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n    // is produced within the hub itself, making it:\n    //\n    //   Sentry.captureException()\n    //   getCurrentHub().captureException()\n    //\n    // instead of just the top `Sentry` call itself.\n    // This forces us to possibly strip an additional frame in the exact same was as above.\n    if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n      localStack.pop();\n    }\n  }\n\n  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n    ...frame,\n    filename: frame.filename || getLastStackFrame(localStack).filename,\n    function: frame.function || UNKNOWN_FUNCTION,\n  }));\n}\n\nfunction getLastStackFrame(arr) {\n  return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n  try {\n    if (!fn || typeof fn !== 'function') {\n      return defaultFunctionName;\n    }\n    return fn.name || defaultFunctionName;\n  } catch (e) {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    return defaultFunctionName;\n  }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nfunction getFramesFromEvent(event) {\n  const exception = event.exception;\n\n  if (exception) {\n    const frames = [];\n    try {\n      // @ts-expect-error Object could be undefined\n      exception.values.forEach(value => {\n        // @ts-expect-error Value could be undefined\n        if (value.stacktrace.frames) {\n          // @ts-expect-error Value could be undefined\n          frames.push(...value.stacktrace.frames);\n        }\n      });\n      return frames;\n    } catch (_oO) {\n      return undefined;\n    }\n  }\n  return undefined;\n}\n\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n  handlers[type] = handlers[type] || [];\n  (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n  Object.keys(handlers).forEach(key => {\n    handlers[key ] = undefined;\n  });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n  if (!instrumented[type]) {\n    instrumented[type] = true;\n    try {\n      instrumentFn();\n    } catch (e) {\n      DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n    }\n  }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n  const typeHandlers = type && handlers[type];\n  if (!typeHandlers) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        logger.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=handlers.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n  const type = 'error';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n  _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n  // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n  // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n  GLOBAL_OBJ.onerror = function (\n    msg,\n    url,\n    line,\n    column,\n    error,\n  ) {\n    const handlerData = {\n      column,\n      error,\n      line,\n      msg,\n      url,\n    };\n    triggerHandlers('error', handlerData);\n\n    if (_oldOnErrorHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnErrorHandler.apply(this, arguments);\n    }\n\n    return false;\n  };\n\n  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n  handler,\n) {\n  const type = 'unhandledrejection';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n  _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n  // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n  // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n  GLOBAL_OBJ.onunhandledrejection = function (e) {\n    const handlerData = e;\n    triggerHandlers('unhandledrejection', handlerData);\n\n    if (_oldOnUnhandledRejectionHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n    }\n\n    return true;\n  };\n\n  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","import { SDK_VERSION } from './utils-hoist/version.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n  // This ensures a Sentry carrier exists\n  getSentryCarrier(GLOBAL_OBJ);\n  return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nfunction getSentryCarrier(carrier) {\n  const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n  // For now: First SDK that sets the .version property wins\n  __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n  // Intentionally populating and returning the version of \"this\" SDK instance\n  // rather than what's set in .version so that \"this\" SDK always gets its carrier\n  return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\nexport { getMainCarrier, getSentryCarrier };\n//# sourceMappingURL=carrier.js.map\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n  switch (objectToString.call(wat)) {\n    case '[object Error]':\n    case '[object Exception]':\n    case '[object DOMException]':\n    case '[object WebAssembly.Exception]':\n      return true;\n    default:\n      return isInstanceOf(wat, Error);\n  }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n  return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n  return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n  return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n  return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n  return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n  return (\n    typeof wat === 'object' &&\n    wat !== null &&\n    '__sentry_template_string__' in wat &&\n    '__sentry_template_values__' in wat\n  );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n  return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n  return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n  return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n  return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n  return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n  return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n  try {\n    return wat instanceof base;\n  } catch (_e) {\n    return false;\n  }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n  // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n  return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n  elem,\n  options = {},\n) {\n  if (!elem) {\n    return '<unknown>';\n  }\n\n  // try/catch both:\n  // - accessing event.target (see getsentry/raven-js#838, #768)\n  // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n  // - can throw an exception in some circumstances.\n  try {\n    let currentElem = elem ;\n    const MAX_TRAVERSE_HEIGHT = 5;\n    const out = [];\n    let height = 0;\n    let len = 0;\n    const separator = ' > ';\n    const sepLength = separator.length;\n    let nextStr;\n    const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n    const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n    while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n      nextStr = _htmlElementAsString(currentElem, keyAttrs);\n      // bail out if\n      // - nextStr is the 'html' element\n      // - the length of the string that would be created exceeds maxStringLength\n      //   (ignore this limit if we are on the first iteration)\n      if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n        break;\n      }\n\n      out.push(nextStr);\n\n      len += nextStr.length;\n      currentElem = currentElem.parentNode;\n    }\n\n    return out.reverse().join(separator);\n  } catch (_oO) {\n    return '<unknown>';\n  }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n  const elem = el\n\n;\n\n  const out = [];\n\n  if (!elem || !elem.tagName) {\n    return '';\n  }\n\n  // @ts-expect-error WINDOW has HTMLElement\n  if (WINDOW.HTMLElement) {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (elem instanceof HTMLElement && elem.dataset) {\n      if (elem.dataset['sentryComponent']) {\n        return elem.dataset['sentryComponent'];\n      }\n      if (elem.dataset['sentryElement']) {\n        return elem.dataset['sentryElement'];\n      }\n    }\n  }\n\n  out.push(elem.tagName.toLowerCase());\n\n  // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n  const keyAttrPairs =\n    keyAttrs && keyAttrs.length\n      ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n      : null;\n\n  if (keyAttrPairs && keyAttrPairs.length) {\n    keyAttrPairs.forEach(keyAttrPair => {\n      out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n    });\n  } else {\n    if (elem.id) {\n      out.push(`#${elem.id}`);\n    }\n\n    const className = elem.className;\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n  for (const k of allowedAttrs) {\n    const attr = elem.getAttribute(k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\n  }\n\n  return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n  try {\n    return WINDOW.document.location.href;\n  } catch (oO) {\n    return '';\n  }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existence of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n *\n * @deprecated This method is deprecated and will be removed in the next major version.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n  if (WINDOW.document && WINDOW.document.querySelector) {\n    return WINDOW.document.querySelector(selector) ;\n  }\n  return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n  // @ts-expect-error WINDOW has HTMLElement\n  if (!WINDOW.HTMLElement) {\n    return null;\n  }\n\n  let currentElem = elem ;\n  const MAX_TRAVERSE_HEIGHT = 5;\n  for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n    if (!currentElem) {\n      return null;\n    }\n\n    if (currentElem instanceof HTMLElement) {\n      if (currentElem.dataset['sentryComponent']) {\n        return currentElem.dataset['sentryComponent'];\n      }\n      if (currentElem.dataset['sentryElement']) {\n        return currentElem.dataset['sentryElement'];\n      }\n    }\n\n    currentElem = currentElem.parentNode;\n  }\n\n  return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n  if (typeof str !== 'string' || max === 0) {\n    return str;\n  }\n  return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n  let newLine = line;\n  const lineLength = newLine.length;\n  if (lineLength <= 150) {\n    return newLine;\n  }\n  if (colno > lineLength) {\n    // eslint-disable-next-line no-param-reassign\n    colno = lineLength;\n  }\n\n  let start = Math.max(colno - 60, 0);\n  if (start < 5) {\n    start = 0;\n  }\n\n  let end = Math.min(start + 140, lineLength);\n  if (end > lineLength - 5) {\n    end = lineLength;\n  }\n  if (end === lineLength) {\n    start = Math.max(end - 140, 0);\n  }\n\n  newLine = newLine.slice(start, end);\n  if (start > 0) {\n    newLine = `'{snip} ${newLine}`;\n  }\n  if (end < lineLength) {\n    newLine += ' {snip}';\n  }\n\n  return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nfunction safeJoin(input, delimiter) {\n  if (!Array.isArray(input)) {\n    return '';\n  }\n\n  const output = [];\n  // eslint-disable-next-line @typescript-eslint/prefer-for-of\n  for (let i = 0; i < input.length; i++) {\n    const value = input[i];\n    try {\n      // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n      // console warnings. This happens when a Vue template is rendered with\n      // an undeclared variable, which we try to stringify, ultimately causing\n      // Vue to issue another warning which repeats indefinitely.\n      // see: https://github.com/getsentry/sentry-javascript/pull/8981\n      if (isVueViewModel(value)) {\n        output.push('[VueViewModel]');\n      } else {\n        output.push(String(value));\n      }\n    } catch (e) {\n      output.push('[value cannot be serialized]');\n    }\n  }\n\n  return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n  value,\n  pattern,\n  requireExactStringMatch = false,\n) {\n  if (!isString(value)) {\n    return false;\n  }\n\n  if (isRegExp(pattern)) {\n    return pattern.test(value);\n  }\n  if (isString(pattern)) {\n    return requireExactStringMatch ? value === pattern : value.includes(pattern);\n  }\n\n  return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n  testString,\n  patterns = [],\n  requireExactStringMatch = false,\n) {\n  return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n  if (!(name in source)) {\n    return;\n  }\n\n  const original = source[name] ;\n  const wrapped = replacementFactory(original) ;\n\n  // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n  // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n  if (typeof wrapped === 'function') {\n    markFunctionWrapped(wrapped, original);\n  }\n\n  try {\n    source[name] = wrapped;\n  } catch (e) {\n    DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n  }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n  try {\n    Object.defineProperty(obj, name, {\n      // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n      value: value,\n      writable: true,\n      configurable: true,\n    });\n  } catch (o_O) {\n    DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n  }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n  try {\n    const proto = original.prototype || {};\n    wrapped.prototype = original.prototype = proto;\n    addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n  } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available.  See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction getOriginalFunction(func) {\n  return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n *\n * @deprecated This function is deprecated and will be removed in the next major version of the SDK.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction urlEncode(object) {\n  return Object.entries(object)\n    .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n    .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n *  an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n  if (isError(value)) {\n    return {\n      message: value.message,\n      name: value.name,\n      stack: value.stack,\n      ...getOwnProperties(value),\n    };\n  } else if (isEvent(value)) {\n    const newObj\n\n = {\n      type: value.type,\n      target: serializeEventTarget(value.target),\n      currentTarget: serializeEventTarget(value.currentTarget),\n      ...getOwnProperties(value),\n    };\n\n    if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n      newObj.detail = value.detail;\n    }\n\n    return newObj;\n  } else {\n    return value;\n  }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n  try {\n    return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n  } catch (_oO) {\n    return '<unknown>';\n  }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n  if (typeof obj === 'object' && obj !== null) {\n    const extractedProps = {};\n    for (const property in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, property)) {\n        extractedProps[property] = (obj )[property];\n      }\n    }\n    return extractedProps;\n  } else {\n    return {};\n  }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n  const keys = Object.keys(convertToPlainObject(exception));\n  keys.sort();\n\n  const firstKey = keys[0];\n\n  if (!firstKey) {\n    return '[object has no keys]';\n  }\n\n  if (firstKey.length >= maxLength) {\n    return truncate(firstKey, maxLength);\n  }\n\n  for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n    const serialized = keys.slice(0, includedKeys).join(', ');\n    if (serialized.length > maxLength) {\n      continue;\n    }\n    if (includedKeys === keys.length) {\n      return serialized;\n    }\n    return truncate(serialized, maxLength);\n  }\n\n  return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n  // This map keeps track of what already visited nodes map to.\n  // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n  // references as the input object.\n  const memoizationMap = new Map();\n\n  // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n  return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n  if (isPojo(inputValue)) {\n    // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n    const memoVal = memoizationMap.get(inputValue);\n    if (memoVal !== undefined) {\n      return memoVal ;\n    }\n\n    const returnValue = {};\n    // Store the mapping of this value in case we visit it again, in case of circular data\n    memoizationMap.set(inputValue, returnValue);\n\n    for (const key of Object.getOwnPropertyNames(inputValue)) {\n      if (typeof inputValue[key] !== 'undefined') {\n        returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n      }\n    }\n\n    return returnValue ;\n  }\n\n  if (Array.isArray(inputValue)) {\n    // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n    const memoVal = memoizationMap.get(inputValue);\n    if (memoVal !== undefined) {\n      return memoVal ;\n    }\n\n    const returnValue = [];\n    // Store the mapping of this value in case we visit it again, in case of circular data\n    memoizationMap.set(inputValue, returnValue);\n\n    inputValue.forEach((item) => {\n      returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n    });\n\n    return returnValue ;\n  }\n\n  return inputValue;\n}\n\nfunction isPojo(input) {\n  if (!isPlainObject(input)) {\n    return false;\n  }\n\n  try {\n    const name = (Object.getPrototypeOf(input) ).constructor.name;\n    return !name || name === 'Object';\n  } catch (e2) {\n    return true;\n  }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n  let objectified;\n  switch (true) {\n    // this will catch both undefined and null\n    case wat == undefined:\n      objectified = new String(wat);\n      break;\n\n    // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n    // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n    // an object in order to wrap it.\n    case typeof wat === 'symbol' || typeof wat === 'bigint':\n      objectified = Object(wat);\n      break;\n\n    // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n    case isPrimitive(wat):\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      objectified = new (wat ).constructor(wat);\n      break;\n\n    // by process of elimination, at this point we know that `wat` must already be an object\n    default:\n      objectified = wat;\n      break;\n  }\n  return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n  return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n  const { performance } = GLOBAL_OBJ ;\n  if (!performance || !performance.now) {\n    return dateTimestampInSeconds;\n  }\n\n  // Some browser and environments don't have a timeOrigin, so we fallback to\n  // using Date.now() to compute the starting time.\n  const approxStartingTimeOrigin = Date.now() - performance.now();\n  const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n  // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n  // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n  //\n  // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n  // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n  // correct for this.\n  // See: https://github.com/getsentry/sentry-javascript/issues/2590\n  // See: https://github.com/mdn/content/issues/4713\n  // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n  return () => {\n    return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n  };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n *\n * @deprecated This variable will be removed in the next major version.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n  // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n  // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n  // data as reliable if they are within a reasonable threshold of the current time.\n\n  const { performance } = GLOBAL_OBJ ;\n  if (!performance || !performance.now) {\n    // eslint-disable-next-line deprecation/deprecation\n    _browserPerformanceTimeOriginMode = 'none';\n    return undefined;\n  }\n\n  const threshold = 3600 * 1000;\n  const performanceNow = performance.now();\n  const dateNow = Date.now();\n\n  // if timeOrigin isn't available set delta to threshold so it isn't used\n  const timeOriginDelta = performance.timeOrigin\n    ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n    : threshold;\n  const timeOriginIsReliable = timeOriginDelta < threshold;\n\n  // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n  // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n  // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n  // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n  // Date API.\n  // eslint-disable-next-line deprecation/deprecation\n  const navigationStart = performance.timing && performance.timing.navigationStart;\n  const hasNavigationStart = typeof navigationStart === 'number';\n  // if navigationStart isn't available set delta to threshold so it isn't used\n  const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n  const navigationStartIsReliable = navigationStartDelta < threshold;\n\n  if (timeOriginIsReliable || navigationStartIsReliable) {\n    // Use the more reliable time origin\n    if (timeOriginDelta <= navigationStartDelta) {\n      // eslint-disable-next-line deprecation/deprecation\n      _browserPerformanceTimeOriginMode = 'timeOrigin';\n      return performance.timeOrigin;\n    } else {\n      // eslint-disable-next-line deprecation/deprecation\n      _browserPerformanceTimeOriginMode = 'navigationStart';\n      return navigationStart;\n    }\n  }\n\n  // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n  // eslint-disable-next-line deprecation/deprecation\n  _browserPerformanceTimeOriginMode = 'dateNow';\n  return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n//# sourceMappingURL=time.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n  const gbl = GLOBAL_OBJ ;\n  const crypto = gbl.crypto || gbl.msCrypto;\n\n  let getRandomByte = () => Math.random() * 16;\n  try {\n    if (crypto && crypto.randomUUID) {\n      return crypto.randomUUID().replace(/-/g, '');\n    }\n    if (crypto && crypto.getRandomValues) {\n      getRandomByte = () => {\n        // crypto.getRandomValues might return undefined instead of the typed array\n        // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n        // However, `typedArray` is still filled in-place.\n        // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n        const typedArray = new Uint8Array(1);\n        crypto.getRandomValues(typedArray);\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        return typedArray[0];\n      };\n    }\n  } catch (_) {\n    // some runtimes can crash invoking crypto\n    // https://github.com/getsentry/sentry-javascript/issues/8935\n  }\n\n  // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n  // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n  return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n    // eslint-disable-next-line no-bitwise\n    ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n  );\n}\n\nfunction getFirstException(event) {\n  return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n  const { message, event_id: eventId } = event;\n  if (message) {\n    return message;\n  }\n\n  const firstException = getFirstException(event);\n  if (firstException) {\n    if (firstException.type && firstException.value) {\n      return `${firstException.type}: ${firstException.value}`;\n    }\n    return firstException.type || firstException.value || eventId || '<unknown>';\n  }\n  return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n  const exception = (event.exception = event.exception || {});\n  const values = (exception.values = exception.values || []);\n  const firstException = (values[0] = values[0] || {});\n  if (!firstException.value) {\n    firstException.value = value || '';\n  }\n  if (!firstException.type) {\n    firstException.type = type || 'Error';\n  }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n  const firstException = getFirstException(event);\n  if (!firstException) {\n    return;\n  }\n\n  const defaultMechanism = { type: 'generic', handled: true };\n  const currentMechanism = firstException.mechanism;\n  firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n  if (newMechanism && 'data' in newMechanism) {\n    const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n    firstException.mechanism.data = mergedData;\n  }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n  /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\nfunction _parseInt(input) {\n  return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n  const match = input.match(SEMVER_REGEXP) || [];\n  const major = _parseInt(match[1]);\n  const minor = _parseInt(match[2]);\n  const patch = _parseInt(match[3]);\n  return {\n    buildmetadata: match[5],\n    major: isNaN(major) ? undefined : major,\n    minor: isNaN(minor) ? undefined : minor,\n    patch: isNaN(patch) ? undefined : patch,\n    prerelease: match[4],\n  };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n  // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n  if (frame.lineno === undefined) {\n    return;\n  }\n\n  const maxLines = lines.length;\n  const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n  frame.pre_context = lines\n    .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n    .map((line) => snipLine(line, 0));\n\n  // We guard here to ensure this is not larger than the existing number of lines\n  const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  frame.context_line = snipLine(lines[lineIndex], frame.colno || 0);\n\n  frame.post_context = lines\n    .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n    .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n  if (isAlreadyCaptured(exception)) {\n    return true;\n  }\n\n  try {\n    // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n    // `ExtraErrorData` integration\n    addNonEnumerableProperty(exception , '__sentry_captured__', true);\n  } catch (err) {\n    // `exception` is a primitive, so we can't mark it seen\n  }\n\n  return false;\n}\n\nfunction isAlreadyCaptured(exception) {\n  try {\n    return (exception ).__sentry_captured__;\n  } catch (e) {} // eslint-disable-line no-empty\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n *\n * @deprecated This function has been deprecated and will not be replaced.\n */\nfunction arrayify(maybeArray) {\n  return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n  /** Pending */\n  const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n  /** Resolved / OK */\n  const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n  /** Rejected / Error */\n  const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n  return new SyncPromise(resolve => {\n    resolve(value);\n  });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n  return new SyncPromise((_, reject) => {\n    reject(reason);\n  });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n   constructor(\n    executor,\n  ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n    this._state = States.PENDING;\n    this._handlers = [];\n\n    try {\n      executor(this._resolve, this._reject);\n    } catch (e) {\n      this._reject(e);\n    }\n  }\n\n  /** JSDoc */\n   then(\n    onfulfilled,\n    onrejected,\n  ) {\n    return new SyncPromise((resolve, reject) => {\n      this._handlers.push([\n        false,\n        result => {\n          if (!onfulfilled) {\n            // TODO: ¯\\_(ツ)_/¯\n            // TODO: FIXME\n            resolve(result );\n          } else {\n            try {\n              resolve(onfulfilled(result));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n        reason => {\n          if (!onrejected) {\n            reject(reason);\n          } else {\n            try {\n              resolve(onrejected(reason));\n            } catch (e) {\n              reject(e);\n            }\n          }\n        },\n      ]);\n      this._executeHandlers();\n    });\n  }\n\n  /** JSDoc */\n   catch(\n    onrejected,\n  ) {\n    return this.then(val => val, onrejected);\n  }\n\n  /** JSDoc */\n   finally(onfinally) {\n    return new SyncPromise((resolve, reject) => {\n      let val;\n      let isRejected;\n\n      return this.then(\n        value => {\n          isRejected = false;\n          val = value;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n        reason => {\n          isRejected = true;\n          val = reason;\n          if (onfinally) {\n            onfinally();\n          }\n        },\n      ).then(() => {\n        if (isRejected) {\n          reject(val);\n          return;\n        }\n\n        resolve(val );\n      });\n    });\n  }\n\n  /** JSDoc */\n    __init() {this._resolve = (value) => {\n    this._setResult(States.RESOLVED, value);\n  };}\n\n  /** JSDoc */\n    __init2() {this._reject = (reason) => {\n    this._setResult(States.REJECTED, reason);\n  };}\n\n  /** JSDoc */\n    __init3() {this._setResult = (state, value) => {\n    if (this._state !== States.PENDING) {\n      return;\n    }\n\n    if (isThenable(value)) {\n      void (value ).then(this._resolve, this._reject);\n      return;\n    }\n\n    this._state = state;\n    this._value = value;\n\n    this._executeHandlers();\n  };}\n\n  /** JSDoc */\n    __init4() {this._executeHandlers = () => {\n    if (this._state === States.PENDING) {\n      return;\n    }\n\n    const cachedHandlers = this._handlers.slice();\n    this._handlers = [];\n\n    cachedHandlers.forEach(handler => {\n      if (handler[0]) {\n        return;\n      }\n\n      if (this._state === States.RESOLVED) {\n        handler[1](this._value );\n      }\n\n      if (this._state === States.REJECTED) {\n        handler[2](this._value);\n      }\n\n      handler[0] = true;\n    });\n  };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import './utils-hoist/version.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport './utils-hoist/syncpromise.js';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n  // Both timestamp and started are in seconds since the UNIX epoch.\n  const startingTime = timestampInSeconds();\n\n  const session = {\n    sid: uuid4(),\n    init: true,\n    timestamp: startingTime,\n    started: startingTime,\n    duration: 0,\n    status: 'ok',\n    errors: 0,\n    ignoreDuration: false,\n    toJSON: () => sessionToJSON(session),\n  };\n\n  if (context) {\n    updateSession(session, context);\n  }\n\n  return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n  if (context.user) {\n    if (!session.ipAddress && context.user.ip_address) {\n      session.ipAddress = context.user.ip_address;\n    }\n\n    if (!session.did && !context.did) {\n      session.did = context.user.id || context.user.email || context.user.username;\n    }\n  }\n\n  session.timestamp = context.timestamp || timestampInSeconds();\n\n  if (context.abnormal_mechanism) {\n    session.abnormal_mechanism = context.abnormal_mechanism;\n  }\n\n  if (context.ignoreDuration) {\n    session.ignoreDuration = context.ignoreDuration;\n  }\n  if (context.sid) {\n    // Good enough uuid validation. — Kamil\n    session.sid = context.sid.length === 32 ? context.sid : uuid4();\n  }\n  if (context.init !== undefined) {\n    session.init = context.init;\n  }\n  if (!session.did && context.did) {\n    session.did = `${context.did}`;\n  }\n  if (typeof context.started === 'number') {\n    session.started = context.started;\n  }\n  if (session.ignoreDuration) {\n    session.duration = undefined;\n  } else if (typeof context.duration === 'number') {\n    session.duration = context.duration;\n  } else {\n    const duration = session.timestamp - session.started;\n    session.duration = duration >= 0 ? duration : 0;\n  }\n  if (context.release) {\n    session.release = context.release;\n  }\n  if (context.environment) {\n    session.environment = context.environment;\n  }\n  if (!session.ipAddress && context.ipAddress) {\n    session.ipAddress = context.ipAddress;\n  }\n  if (!session.userAgent && context.userAgent) {\n    session.userAgent = context.userAgent;\n  }\n  if (typeof context.errors === 'number') {\n    session.errors = context.errors;\n  }\n  if (context.status) {\n    session.status = context.status;\n  }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n *               this function will keep the previously set status, unless it was `'ok'` in which case\n *               it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n  let context = {};\n  if (status) {\n    context = { status };\n  } else if (session.status === 'ok') {\n    context = { status: 'exited' };\n  }\n\n  updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n  return dropUndefinedKeys({\n    sid: `${session.sid}`,\n    init: session.init,\n    // Make sure that sec is converted to ms for date constructor\n    started: new Date(session.started * 1000).toISOString(),\n    timestamp: new Date(session.timestamp * 1000).toISOString(),\n    status: session.status,\n    errors: session.errors,\n    did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n    duration: session.duration,\n    abnormal_mechanism: session.abnormal_mechanism,\n    attrs: {\n      release: session.release,\n      environment: session.environment,\n      ip_address: session.ipAddress,\n      user_agent: session.userAgent,\n    },\n  });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { uuid4 } from './misc.js';\n\n/**\n * Returns a new minimal propagation context.\n *\n * @deprecated Use `generateTraceId` and `generateSpanId` instead.\n */\nfunction generatePropagationContext() {\n  return {\n    traceId: generateTraceId(),\n    spanId: generateSpanId(),\n  };\n}\n\n/**\n * Generate a random, valid trace ID.\n */\nfunction generateTraceId() {\n  return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nfunction generateSpanId() {\n  return uuid4().substring(16);\n}\n\nexport { generatePropagationContext, generateSpanId, generateTraceId };\n//# sourceMappingURL=propagationContext.js.map\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nfunction merge(initialObj, mergeObj, levels = 2) {\n  // If the merge value is not an object, or we have no merge levels left,\n  // we just set the value to the merge value\n  if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n    return mergeObj;\n  }\n\n  // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n  if (initialObj && mergeObj && Object.keys(mergeObj).length === 0) {\n    return initialObj;\n  }\n\n  // Clone object\n  const output = { ...initialObj };\n\n  // Merge values into output, resursively\n  for (const key in mergeObj) {\n    if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n      output[key] = merge(output[key], mergeObj[key], levels - 1);\n    }\n  }\n\n  return output;\n}\n\nexport { merge };\n//# sourceMappingURL=merge.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _setSpanForScope(scope, span) {\n  if (span) {\n    addNonEnumerableProperty(scope , SCOPE_SPAN_FIELD, span);\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete (scope )[SCOPE_SPAN_FIELD];\n  }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _getSpanForScope(scope) {\n  return scope[SCOPE_SPAN_FIELD];\n}\n\nexport { _getSpanForScope, _setSpanForScope };\n//# sourceMappingURL=spanOnScope.js.map\n","import { updateSession } from './session.js';\nimport { isPlainObject } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { generateTraceId, generateSpanId } from './utils-hoist/propagationContext.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\nimport { merge } from './utils/merge.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information.\n */\nclass ScopeClass  {\n  /** Flag if notifying is happening. */\n\n  /** Callback for client to receive scope changes. */\n\n  /** Callback list that will be called during event processing. */\n\n  /** Array of breadcrumbs. */\n\n  /** User */\n\n  /** Tags */\n\n  /** Extra */\n\n  /** Contexts */\n\n  /** Attachments */\n\n  /** Propagation Context for distributed tracing */\n\n  /**\n   * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n   * sent to Sentry\n   */\n\n  /** Fingerprint */\n\n  /** Severity */\n\n  /**\n   * Transaction Name\n   *\n   * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n   * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n   */\n\n  /** Session */\n\n  /** Request Mode Session Status */\n  // eslint-disable-next-line deprecation/deprecation\n\n  /** The client on this scope */\n\n  /** Contains the last event id of a captured event.  */\n\n  // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n   constructor() {\n    this._notifyingListeners = false;\n    this._scopeListeners = [];\n    this._eventProcessors = [];\n    this._breadcrumbs = [];\n    this._attachments = [];\n    this._user = {};\n    this._tags = {};\n    this._extra = {};\n    this._contexts = {};\n    this._sdkProcessingMetadata = {};\n    this._propagationContext = {\n      traceId: generateTraceId(),\n      spanId: generateSpanId(),\n    };\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clone() {\n    const newScope = new ScopeClass();\n    newScope._breadcrumbs = [...this._breadcrumbs];\n    newScope._tags = { ...this._tags };\n    newScope._extra = { ...this._extra };\n    newScope._contexts = { ...this._contexts };\n    if (this._contexts.flags) {\n      // We need to copy the `values` array so insertions on a cloned scope\n      // won't affect the original array.\n      newScope._contexts.flags = {\n        values: [...this._contexts.flags.values],\n      };\n    }\n\n    newScope._user = this._user;\n    newScope._level = this._level;\n    newScope._session = this._session;\n    newScope._transactionName = this._transactionName;\n    newScope._fingerprint = this._fingerprint;\n    newScope._eventProcessors = [...this._eventProcessors];\n    newScope._requestSession = this._requestSession;\n    newScope._attachments = [...this._attachments];\n    newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n    newScope._propagationContext = { ...this._propagationContext };\n    newScope._client = this._client;\n    newScope._lastEventId = this._lastEventId;\n\n    _setSpanForScope(newScope, _getSpanForScope(this));\n\n    return newScope;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setClient(client) {\n    this._client = client;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setLastEventId(lastEventId) {\n    this._lastEventId = lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getClient() {\n    return this._client ;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   lastEventId() {\n    return this._lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addScopeListener(callback) {\n    this._scopeListeners.push(callback);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addEventProcessor(callback) {\n    this._eventProcessors.push(callback);\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setUser(user) {\n    // If null is passed we want to unset everything, but still define keys,\n    // so that later down in the pipeline any existing values are cleared.\n    this._user = user || {\n      email: undefined,\n      id: undefined,\n      ip_address: undefined,\n      username: undefined,\n    };\n\n    if (this._session) {\n      updateSession(this._session, { user });\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getUser() {\n    return this._user;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  // eslint-disable-next-line deprecation/deprecation\n   getRequestSession() {\n    return this._requestSession;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  // eslint-disable-next-line deprecation/deprecation\n   setRequestSession(requestSession) {\n    this._requestSession = requestSession;\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setTags(tags) {\n    this._tags = {\n      ...this._tags,\n      ...tags,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setTag(key, value) {\n    this._tags = { ...this._tags, [key]: value };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setExtras(extras) {\n    this._extra = {\n      ...this._extra,\n      ...extras,\n    };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setExtra(key, extra) {\n    this._extra = { ...this._extra, [key]: extra };\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setFingerprint(fingerprint) {\n    this._fingerprint = fingerprint;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setLevel(level) {\n    this._level = level;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setTransactionName(name) {\n    this._transactionName = name;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setContext(key, context) {\n    if (context === null) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._contexts[key];\n    } else {\n      this._contexts[key] = context;\n    }\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setSession(session) {\n    if (!session) {\n      delete this._session;\n    } else {\n      this._session = session;\n    }\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getSession() {\n    return this._session;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   update(captureContext) {\n    if (!captureContext) {\n      return this;\n    }\n\n    const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n    const [scopeInstance, requestSession] =\n      scopeToMerge instanceof Scope\n        ? // eslint-disable-next-line deprecation/deprecation\n          [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()]\n        : isPlainObject(scopeToMerge)\n          ? [captureContext , (captureContext ).requestSession]\n          : [];\n\n    const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};\n\n    this._tags = { ...this._tags, ...tags };\n    this._extra = { ...this._extra, ...extra };\n    this._contexts = { ...this._contexts, ...contexts };\n\n    if (user && Object.keys(user).length) {\n      this._user = user;\n    }\n\n    if (level) {\n      this._level = level;\n    }\n\n    if (fingerprint.length) {\n      this._fingerprint = fingerprint;\n    }\n\n    if (propagationContext) {\n      this._propagationContext = propagationContext;\n    }\n\n    if (requestSession) {\n      this._requestSession = requestSession;\n    }\n\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clear() {\n    // client is not cleared here on purpose!\n    this._breadcrumbs = [];\n    this._tags = {};\n    this._extra = {};\n    this._user = {};\n    this._contexts = {};\n    this._level = undefined;\n    this._transactionName = undefined;\n    this._fingerprint = undefined;\n    this._requestSession = undefined;\n    this._session = undefined;\n    _setSpanForScope(this, undefined);\n    this._attachments = [];\n    this.setPropagationContext({ traceId: generateTraceId() });\n\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n    const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n    // No data has been changed, so don't notify scope listeners\n    if (maxCrumbs <= 0) {\n      return this;\n    }\n\n    const mergedBreadcrumb = {\n      timestamp: dateTimestampInSeconds(),\n      ...breadcrumb,\n    };\n\n    const breadcrumbs = this._breadcrumbs;\n    breadcrumbs.push(mergedBreadcrumb);\n    this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n    this._notifyScopeListeners();\n\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getLastBreadcrumb() {\n    return this._breadcrumbs[this._breadcrumbs.length - 1];\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clearBreadcrumbs() {\n    this._breadcrumbs = [];\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addAttachment(attachment) {\n    this._attachments.push(attachment);\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clearAttachments() {\n    this._attachments = [];\n    return this;\n  }\n\n  /** @inheritDoc */\n   getScopeData() {\n    return {\n      breadcrumbs: this._breadcrumbs,\n      attachments: this._attachments,\n      contexts: this._contexts,\n      tags: this._tags,\n      extra: this._extra,\n      user: this._user,\n      level: this._level,\n      fingerprint: this._fingerprint || [],\n      eventProcessors: this._eventProcessors,\n      propagationContext: this._propagationContext,\n      sdkProcessingMetadata: this._sdkProcessingMetadata,\n      transactionName: this._transactionName,\n      span: _getSpanForScope(this),\n    };\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setSDKProcessingMetadata(newData) {\n    this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setPropagationContext(\n    context,\n  ) {\n    this._propagationContext = {\n      // eslint-disable-next-line deprecation/deprecation\n      spanId: generateSpanId(),\n      ...context,\n    };\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getPropagationContext() {\n    return this._propagationContext;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureException(exception, hint) {\n    const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture exception!');\n      return eventId;\n    }\n\n    const syntheticException = new Error('Sentry syntheticException');\n\n    this._client.captureException(\n      exception,\n      {\n        originalException: exception,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureMessage(message, level, hint) {\n    const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture message!');\n      return eventId;\n    }\n\n    const syntheticException = new Error(message);\n\n    this._client.captureMessage(\n      message,\n      level,\n      {\n        originalException: message,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureEvent(event, hint) {\n    const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture event!');\n      return eventId;\n    }\n\n    this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n    return eventId;\n  }\n\n  /**\n   * This will be called on every set call.\n   */\n   _notifyScopeListeners() {\n    // We need this check for this._notifyingListeners to be able to work on scope during updates\n    // If this check is not here we'll produce endless recursion when something is done with the scope\n    // during the callback.\n    if (!this._notifyingListeners) {\n      this._notifyingListeners = true;\n      this._scopeListeners.forEach(callback => {\n        callback(this);\n      });\n      this._notifyingListeners = false;\n    }\n  }\n}\n\n/**\n * Holds additional event information.\n */\nconst Scope = ScopeClass;\n\n/**\n * Holds additional event information.\n */\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { Scope } from './scope.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/** Get the default current scope. */\nfunction getDefaultCurrentScope() {\n  return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nfunction getDefaultIsolationScope() {\n  return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n//# sourceMappingURL=defaultScopes.js.map\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { isThenable } from '../utils-hoist/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\n/**\n * This is an object that holds a stack of scopes.\n */\nclass AsyncContextStack {\n\n   constructor(scope, isolationScope) {\n    let assignedScope;\n    if (!scope) {\n      assignedScope = new Scope();\n    } else {\n      assignedScope = scope;\n    }\n\n    let assignedIsolationScope;\n    if (!isolationScope) {\n      assignedIsolationScope = new Scope();\n    } else {\n      assignedIsolationScope = isolationScope;\n    }\n\n    // scope stack for domains or the process\n    this._stack = [{ scope: assignedScope }];\n    this._isolationScope = assignedIsolationScope;\n  }\n\n  /**\n   * Fork a scope for the stack.\n   */\n   withScope(callback) {\n    const scope = this._pushScope();\n\n    let maybePromiseResult;\n    try {\n      maybePromiseResult = callback(scope);\n    } catch (e) {\n      this._popScope();\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      // @ts-expect-error - isThenable returns the wrong type\n      return maybePromiseResult.then(\n        res => {\n          this._popScope();\n          return res;\n        },\n        e => {\n          this._popScope();\n          throw e;\n        },\n      );\n    }\n\n    this._popScope();\n    return maybePromiseResult;\n  }\n\n  /**\n   * Get the client of the stack.\n   */\n   getClient() {\n    return this.getStackTop().client ;\n  }\n\n  /**\n   * Returns the scope of the top stack.\n   */\n   getScope() {\n    return this.getStackTop().scope;\n  }\n\n  /**\n   * Get the isolation scope for the stack.\n   */\n   getIsolationScope() {\n    return this._isolationScope;\n  }\n\n  /**\n   * Returns the topmost scope layer in the order domain > local > process.\n   */\n   getStackTop() {\n    return this._stack[this._stack.length - 1] ;\n  }\n\n  /**\n   * Push a scope to the stack.\n   */\n   _pushScope() {\n    // We want to clone the content of prev scope\n    const scope = this.getScope().clone();\n    this._stack.push({\n      client: this.getClient(),\n      scope,\n    });\n    return scope;\n  }\n\n  /**\n   * Pop a scope from the stack.\n   */\n   _popScope() {\n    if (this._stack.length <= 1) return false;\n    return !!this._stack.pop();\n  }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack() {\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n\n  return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope(callback) {\n  return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope(scope, callback) {\n  const stack = getAsyncContextStack() ;\n  return stack.withScope(() => {\n    stack.getStackTop().scope = scope;\n    return callback(scope);\n  });\n}\n\nfunction withIsolationScope(callback) {\n  return getAsyncContextStack().withScope(() => {\n    return callback(getAsyncContextStack().getIsolationScope());\n  });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nfunction getStackAsyncContextStrategy() {\n  return {\n    withIsolationScope,\n    withScope,\n    withSetScope,\n    withSetIsolationScope: (_isolationScope, callback) => {\n      return withIsolationScope(callback);\n    },\n    getCurrentScope: () => getAsyncContextStack().getScope(),\n    getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n  };\n}\n\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n//# sourceMappingURL=stackStrategy.js.map\n","import { getMainCarrier, getSentryCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n  // Get main carrier (global for every environment)\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n  sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nfunction getAsyncContextStrategy(carrier) {\n  const sentry = getSentryCarrier(carrier);\n\n  if (sentry.acs) {\n    return sentry.acs;\n  }\n\n  // Otherwise, use the default one (stack)\n  return getStackAsyncContextStrategy();\n}\n\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n//# sourceMappingURL=index.js.map\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier } from './carrier.js';\nimport { Scope } from './scope.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nfunction getIsolationScope() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n  return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n  ...rest\n) {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [scope, callback] = rest;\n\n    if (!scope) {\n      return acs.withScope(callback);\n    }\n\n    return acs.withSetScope(scope, callback);\n  }\n\n  return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\n\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nfunction withIsolationScope(\n  ...rest\n\n) {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [isolationScope, callback] = rest;\n\n    if (!isolationScope) {\n      return acs.withIsolationScope(callback);\n    }\n\n    return acs.withSetIsolationScope(isolationScope, callback);\n  }\n\n  return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n  return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nfunction getTraceContextFromScope(scope) {\n  const propagationContext = scope.getPropagationContext();\n\n  // TODO(v9): Use generateSpanId() instead of spanId\n  // eslint-disable-next-line deprecation/deprecation\n  const { traceId, spanId, parentSpanId } = propagationContext;\n\n  const traceContext = dropUndefinedKeys({\n    trace_id: traceId,\n    span_id: spanId,\n    parent_span_id: parentSpanId,\n  });\n\n  return traceContext;\n}\n\nexport { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };\n//# sourceMappingURL=currentScopes.js.map\n","import { dropUndefinedKeys } from '../utils-hoist/object.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nconst METRICS_SPAN_FIELD = '_sentryMetrics';\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n  const storage = (span )[METRICS_SPAN_FIELD];\n\n  if (!storage) {\n    return undefined;\n  }\n  const output = {};\n\n  for (const [, [exportKey, summary]] of storage) {\n    const arr = output[exportKey] || (output[exportKey] = []);\n    arr.push(dropUndefinedKeys(summary));\n  }\n\n  return output;\n}\n\n/**\n * Updates the metric summary on a span.\n */\nfunction updateMetricSummaryOnSpan(\n  span,\n  metricType,\n  sanitizedName,\n  value,\n  unit,\n  tags,\n  bucketKey,\n) {\n  const existingStorage = (span )[METRICS_SPAN_FIELD];\n  const storage =\n    existingStorage ||\n    ((span )[METRICS_SPAN_FIELD] = new Map());\n\n  const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n  const bucketItem = storage.get(bucketKey);\n\n  if (bucketItem) {\n    const [, summary] = bucketItem;\n    storage.set(bucketKey, [\n      exportKey,\n      {\n        min: Math.min(summary.min, value),\n        max: Math.max(summary.max, value),\n        count: (summary.count += 1),\n        sum: (summary.sum += value),\n        tags: summary.tags,\n      },\n    ]);\n  } else {\n    storage.set(bucketKey, [\n      exportKey,\n      {\n        min: value,\n        max: value,\n        count: 1,\n        sum: value,\n        tags,\n      },\n    ]);\n  }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan };\n//# sourceMappingURL=metric-summary.js.map\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nconst SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\nexport { SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL };\n//# sourceMappingURL=semanticAttributes.js.map\n","const SPAN_STATUS_UNSET = 0;\nconst SPAN_STATUS_OK = 1;\nconst SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nfunction getSpanStatusFromHttpCode(httpStatus) {\n  if (httpStatus < 400 && httpStatus >= 100) {\n    return { code: SPAN_STATUS_OK };\n  }\n\n  if (httpStatus >= 400 && httpStatus < 500) {\n    switch (httpStatus) {\n      case 401:\n        return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n      case 403:\n        return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n      case 404:\n        return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n      case 409:\n        return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n      case 413:\n        return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n      case 429:\n        return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n      case 499:\n        return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n    }\n  }\n\n  if (httpStatus >= 500 && httpStatus < 600) {\n    switch (httpStatus) {\n      case 501:\n        return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n      case 503:\n        return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n      case 504:\n        return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n    }\n  }\n\n  return { code: SPAN_STATUS_ERROR, message: 'unknown_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n  span.setAttribute('http.response.status_code', httpStatus);\n\n  const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n  if (spanStatus.message !== 'unknown_error') {\n    span.setStatus(spanStatus);\n  }\n}\n\nexport { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus };\n//# sourceMappingURL=spanstatus.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\n/**\n * @deprecated Use a `\"baggage\"` string directly\n */\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n  // Very liberal definition of what any incoming header might look like\n  baggageHeader,\n) {\n  const baggageObject = parseBaggageHeader(baggageHeader);\n\n  if (!baggageObject) {\n    return undefined;\n  }\n\n  // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n  const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n    if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n      const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n      acc[nonPrefixedKey] = value;\n    }\n    return acc;\n  }, {});\n\n  // Only return a dynamic sampling context object if there are keys in it.\n  // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n  if (Object.keys(dynamicSamplingContext).length > 0) {\n    return dynamicSamplingContext ;\n  } else {\n    return undefined;\n  }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n  // this also takes undefined for convenience and bundle size in other places\n  dynamicSamplingContext,\n) {\n  if (!dynamicSamplingContext) {\n    return undefined;\n  }\n\n  // Prefix all DSC keys with \"sentry-\" and put them into a new object\n  const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n    (acc, [dscKey, dscValue]) => {\n      if (dscValue) {\n        acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n      }\n      return acc;\n    },\n    {},\n  );\n\n  return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nfunction parseBaggageHeader(\n  baggageHeader,\n) {\n  if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n    return undefined;\n  }\n\n  if (Array.isArray(baggageHeader)) {\n    // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n    return baggageHeader.reduce((acc, curr) => {\n      const currBaggageObject = baggageHeaderToObject(curr);\n      Object.entries(currBaggageObject).forEach(([key, value]) => {\n        acc[key] = value;\n      });\n      return acc;\n    }, {});\n  }\n\n  return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n  return baggageHeader\n    .split(',')\n    .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n    .reduce((acc, [key, value]) => {\n      if (key && value) {\n        acc[key] = value;\n      }\n      return acc;\n    }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n  if (Object.keys(object).length === 0) {\n    // An empty baggage header is not spec compliant: We return undefined.\n    return undefined;\n  }\n\n  return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n    const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n    const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n    if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        logger.warn(\n          `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n        );\n      return baggageHeader;\n    } else {\n      return newBaggageHeader;\n    }\n  }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { generateTraceId, generateSpanId } from './propagationContext.js';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\nconst TRACEPARENT_REGEXP = new RegExp(\n  '^[ \\\\t]*' + // whitespace\n    '([0-9a-f]{32})?' + // trace_id\n    '-?([0-9a-f]{16})?' + // span_id\n    '-?([01])?' + // sampled\n    '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n  if (!traceparent) {\n    return undefined;\n  }\n\n  const matches = traceparent.match(TRACEPARENT_REGEXP);\n  if (!matches) {\n    return undefined;\n  }\n\n  let parentSampled;\n  if (matches[3] === '1') {\n    parentSampled = true;\n  } else if (matches[3] === '0') {\n    parentSampled = false;\n  }\n\n  return {\n    traceId: matches[1],\n    parentSampled,\n    parentSpanId: matches[2],\n  };\n}\n\n/**\n * Create a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nfunction propagationContextFromHeaders(\n  sentryTrace,\n  baggage,\n) {\n  const traceparentData = extractTraceparentData(sentryTrace);\n  const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n  if (!traceparentData || !traceparentData.traceId) {\n    return { traceId: generateTraceId(), spanId: generateSpanId() };\n  }\n\n  const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n  const virtualSpanId = generateSpanId();\n\n  return {\n    traceId,\n    parentSpanId,\n    spanId: virtualSpanId,\n    sampled: parentSampled,\n    dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n  };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n  traceId = generateTraceId(),\n  spanId = generateSpanId(),\n  sampled,\n) {\n  let sampledString = '';\n  if (sampled !== undefined) {\n    sampledString = sampled ? '-1' : '-0';\n  }\n  return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { consoleSandbox } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n// todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nfunction spanToTransactionTraceContext(span) {\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n  const { data, op, parent_span_id, status, origin } = spanToJSON(span);\n\n  return dropUndefinedKeys({\n    parent_span_id,\n    span_id,\n    trace_id,\n    data,\n    op,\n    status,\n    origin,\n  });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nfunction spanToTraceContext(span) {\n  const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n  // If the span is remote, we use a random/virtual span as span_id to the trace context,\n  // and the remote span as parent_span_id\n  const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n  const span_id = isRemote ? generateSpanId() : spanId;\n\n  return dropUndefinedKeys({\n    parent_span_id,\n    span_id,\n    trace_id,\n  });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n  if (typeof input === 'number') {\n    return ensureTimestampInSeconds(input);\n  }\n\n  if (Array.isArray(input)) {\n    // See {@link HrTime} for the array-based time format\n    return input[0] + input[1] / 1e9;\n  }\n\n  if (input instanceof Date) {\n    return ensureTimestampInSeconds(input.getTime());\n  }\n\n  return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nfunction spanToJSON(span) {\n  if (spanIsSentrySpan(span)) {\n    return span.getSpanJSON();\n  }\n\n  try {\n    const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n    // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n    if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n      const { attributes, startTime, name, endTime, parentSpanId, status } = span;\n\n      return dropUndefinedKeys({\n        span_id,\n        trace_id,\n        data: attributes,\n        description: name,\n        parent_span_id: parentSpanId,\n        start_timestamp: spanTimeInputToSeconds(startTime),\n        // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n        timestamp: spanTimeInputToSeconds(endTime) || undefined,\n        status: getStatusMessage(status),\n        op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n        origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n        _metrics_summary: getMetricSummaryJsonForSpan(span),\n      });\n    }\n\n    // Finally, at least we have `spanContext()`....\n    return {\n      span_id,\n      trace_id,\n    };\n  } catch (e) {\n    return {};\n  }\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n  const castSpan = span ;\n  return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span) {\n  return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n  // We align our trace flags with the ones OpenTelemetry use\n  // So we also check for sampled the same way they do.\n  const { traceFlags } = span.spanContext();\n  return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nfunction getStatusMessage(status) {\n  if (!status || status.code === SPAN_STATUS_UNSET) {\n    return undefined;\n  }\n\n  if (status.code === SPAN_STATUS_OK) {\n    return 'ok';\n  }\n\n  return status.message || 'unknown_error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\n/**\n * Adds an opaque child span reference to a span.\n */\nfunction addChildSpanToSpan(span, childSpan) {\n  // We store the root span reference on the child span\n  // We need this for `getRootSpan()` to work\n  const rootSpan = span[ROOT_SPAN_FIELD] || span;\n  addNonEnumerableProperty(childSpan , ROOT_SPAN_FIELD, rootSpan);\n\n  // We store a list of child spans on the parent span\n  // We need this for `getSpanDescendants()` to work\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].add(childSpan);\n  } else {\n    addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n  }\n}\n\n/** This is only used internally by Idle Spans. */\nfunction removeChildSpanFromSpan(span, childSpan) {\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].delete(childSpan);\n  }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nfunction getSpanDescendants(span) {\n  const resultSet = new Set();\n\n  function addSpanChildren(span) {\n    // This exit condition is required to not infinitely loop in case of a circular dependency.\n    if (resultSet.has(span)) {\n      return;\n      // We want to ignore unsampled spans (e.g. non recording spans)\n    } else if (spanIsSampled(span)) {\n      resultSet.add(span);\n      const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n      for (const childSpan of childSpans) {\n        addSpanChildren(childSpan);\n      }\n    }\n  }\n\n  addSpanChildren(span);\n\n  return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nfunction getRootSpan(span) {\n  return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getActiveSpan) {\n    return acs.getActiveSpan();\n  }\n\n  return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n  metricType,\n  sanitizedName,\n  value,\n  unit,\n  tags,\n  bucketKey,\n) {\n  const span = getActiveSpan();\n  if (span) {\n    updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey);\n  }\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n *\n * todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`.\n */\nfunction showSpanDropWarning() {\n  if (!hasShownSpanDropWarning) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.warn(\n        '[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.',\n      );\n    });\n    hasShownSpanDropWarning = true;\n  }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nfunction updateSpanName(span, name) {\n  span.updateName(name);\n  span.setAttributes({\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n    [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n  });\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader, spanToTransactionTraceContext, updateMetricSummaryOnActiveSpan, updateSpanName };\n//# sourceMappingURL=spanUtils.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { addGlobalErrorInstrumentationHandler } from '../utils-hoist/instrument/globalError.js';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../utils-hoist/instrument/globalUnhandledRejection.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nfunction registerSpanErrorInstrumentation() {\n  if (errorsInstrumented) {\n    return;\n  }\n\n  errorsInstrumented = true;\n  addGlobalErrorInstrumentationHandler(errorCallback);\n  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active root span as failed\n */\nfunction errorCallback() {\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n  if (rootSpan) {\n    const message = 'internal_error';\n    DEBUG_BUILD && logger.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n    rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\n  }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerSpanErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n  if (span) {\n    addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n    addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n  }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n  return {\n    scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n    isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n  };\n}\n\nexport { getCapturedScopesOnSpan, setCapturedScopesOnSpan };\n//# sourceMappingURL=utils.js.map\n","import { getClient } from '../currentScopes.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n  maybeOptions,\n) {\n  if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n    return false;\n  }\n\n  const client = getClient();\n  const options = maybeOptions || (client && client.getOptions());\n  // eslint-disable-next-line deprecation/deprecation\n  return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","import { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nclass SentryNonRecordingSpan  {\n\n   constructor(spanContext = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n  }\n\n  /** @inheritdoc */\n   spanContext() {\n    return {\n      spanId: this._spanId,\n      traceId: this._traceId,\n      traceFlags: TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n   end(_timestamp) {}\n\n  /** @inheritdoc */\n   setAttribute(_key, _value) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   setAttributes(_values) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   setStatus(_status) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   updateName(_name) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   isRecording() {\n    return false;\n  }\n\n  /** @inheritdoc */\n   addEvent(\n    _name,\n    _attributesOrStartTime,\n    _startTime,\n  ) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLink(_link) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLinks(_links) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   recordException(_exception, _time) {\n    // noop\n  }\n}\n\nexport { SentryNonRecordingSpan };\n//# sourceMappingURL=sentryNonRecordingSpan.js.map\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\n/**\n * Freeze the given DSC on the given span.\n */\nfunction freezeDscOnSpan(span, dsc) {\n  const spanWithMaybeDsc = span ;\n  addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n  const options = client.getOptions();\n\n  const { publicKey: public_key } = client.getDsn() || {};\n\n  const dsc = dropUndefinedKeys({\n    environment: options.environment || DEFAULT_ENVIRONMENT,\n    release: options.release,\n    public_key,\n    trace_id,\n  }) ;\n\n  client.emit('createDsc', dsc);\n\n  return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nfunction getDynamicSamplingContextFromScope(client, scope) {\n  const propagationContext = scope.getPropagationContext();\n  return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n  const client = getClient();\n  if (!client) {\n    return {};\n  }\n\n  const rootSpan = getRootSpan(span);\n\n  // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n  const frozenDsc = (rootSpan )[FROZEN_DSC_FIELD];\n  if (frozenDsc) {\n    return frozenDsc;\n  }\n\n  // For OpenTelemetry, we freeze the DSC on the trace state\n  const traceState = rootSpan.spanContext().traceState;\n  const traceStateDsc = traceState && traceState.get('sentry.dsc');\n\n  // If the span has a DSC, we want it to take precedence\n  const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n  if (dscOnTraceState) {\n    return dscOnTraceState;\n  }\n\n  // Else, we generate it from the span\n  const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n  const jsonSpan = spanToJSON(rootSpan);\n  const attributes = jsonSpan.data || {};\n  const maybeSampleRate = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n\n  if (maybeSampleRate != null) {\n    dsc.sample_rate = `${maybeSampleRate}`;\n  }\n\n  // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n  const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n  // after JSON conversion, txn.name becomes jsonSpan.description\n  const name = jsonSpan.description;\n  if (source !== 'url' && name) {\n    dsc.transaction = name;\n  }\n\n  // How can we even land here with hasTracingEnabled() returning false?\n  // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n  // So we end up with an active span that is not sampled (neither positively nor negatively)\n  if (hasTracingEnabled()) {\n    dsc.sampled = String(spanIsSampled(rootSpan));\n  }\n\n  client.emit('createDsc', dsc, rootSpan);\n\n  return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nfunction spanToBaggageHeader(span) {\n  const dsc = getDynamicSamplingContextFromSpan(span);\n  return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { spanToJSON, spanIsSampled, getRootSpan } from '../utils/spanUtils.js';\n\n/**\n * Print a log message for a started span.\n */\nfunction logSpanStart(span) {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n\n  const sampled = spanIsSampled(span);\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n  const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n  if (parentSpanId) {\n    infoParts.push(`parent ID: ${parentSpanId}`);\n  }\n\n  if (!isRootSpan) {\n    const { op, description } = spanToJSON(rootSpan);\n    infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n    if (op) {\n      infoParts.push(`root op: ${op}`);\n    }\n    if (description) {\n      infoParts.push(`root description: ${description}`);\n    }\n  }\n\n  logger.log(`${header}\n  ${infoParts.join('\\n  ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nfunction logSpanEnd(span) {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n  logger.log(msg);\n}\n\nexport { logSpanEnd, logSpanStart };\n//# sourceMappingURL=logSpans.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\n\n/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nfunction parseSampleRate(sampleRate) {\n  if (typeof sampleRate === 'boolean') {\n    return Number(sampleRate);\n  }\n\n  const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n  if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          sampleRate,\n        )} of type ${JSON.stringify(typeof sampleRate)}.`,\n      );\n    return undefined;\n  }\n\n  return rate;\n}\n\nexport { parseSampleRate };\n//# sourceMappingURL=parseSampleRate.js.map\n","import { getIsolationScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nfunction sampleSpan(\n  options,\n  samplingContext,\n) {\n  // nothing to do if tracing is not enabled\n  if (!hasTracingEnabled(options)) {\n    return [false];\n  }\n\n  // Casting this from unknown, as the type of `sdkProcessingMetadata` is only changed in v9 and `normalizedRequest` is set in SentryHttpInstrumentation\n  const normalizedRequest = getIsolationScope().getScopeData().sdkProcessingMetadata\n    .normalizedRequest ;\n\n  const enhancedSamplingContext = {\n    ...samplingContext,\n    normalizedRequest: samplingContext.normalizedRequest || normalizedRequest,\n  };\n\n  // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n  // work; prefer the hook if so\n  let sampleRate;\n  if (typeof options.tracesSampler === 'function') {\n    sampleRate = options.tracesSampler(enhancedSamplingContext);\n  } else if (enhancedSamplingContext.parentSampled !== undefined) {\n    sampleRate = enhancedSamplingContext.parentSampled;\n  } else if (typeof options.tracesSampleRate !== 'undefined') {\n    sampleRate = options.tracesSampleRate;\n  } else {\n    // When `enableTracing === true`, we use a sample rate of 100%\n    sampleRate = 1;\n  }\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n  // (The only valid values are booleans or numbers between 0 and 1.)\n  const parsedSampleRate = parseSampleRate(sampleRate);\n\n  if (parsedSampleRate === undefined) {\n    DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n    return [false];\n  }\n\n  // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n  if (!parsedSampleRate) {\n    DEBUG_BUILD &&\n      logger.log(\n        `[Tracing] Discarding transaction because ${\n          typeof options.tracesSampler === 'function'\n            ? 'tracesSampler returned 0 or false'\n            : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n        }`,\n      );\n    return [false, parsedSampleRate];\n  }\n\n  // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n  // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n  const shouldSample = Math.random() < parsedSampleRate;\n\n  // if we're not going to keep it, we're done\n  if (!shouldSample) {\n    DEBUG_BUILD &&\n      logger.log(\n        `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n          sampleRate,\n        )})`,\n      );\n    return [false, parsedSampleRate];\n  }\n\n  return [true, parsedSampleRate];\n}\n\nexport { sampleSpan };\n//# sourceMappingURL=sampling.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n  return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n  const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n  return (\n    `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n    `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n  );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n  const match = DSN_REGEX.exec(str);\n\n  if (!match) {\n    // This should be logged to the console\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(`Invalid Sentry Dsn: ${str}`);\n    });\n    return undefined;\n  }\n\n  const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n  let path = '';\n  let projectId = lastPath;\n\n  const split = projectId.split('/');\n  if (split.length > 1) {\n    path = split.slice(0, -1).join('/');\n    projectId = split.pop() ;\n  }\n\n  if (projectId) {\n    const projectMatch = projectId.match(/^\\d+/);\n    if (projectMatch) {\n      projectId = projectMatch[0];\n    }\n  }\n\n  return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n  return {\n    protocol: components.protocol,\n    publicKey: components.publicKey || '',\n    pass: components.pass || '',\n    host: components.host,\n    port: components.port || '',\n    path: components.path || '',\n    projectId: components.projectId,\n  };\n}\n\nfunction validateDsn(dsn) {\n  if (!DEBUG_BUILD) {\n    return true;\n  }\n\n  const { port, projectId, protocol } = dsn;\n\n  const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n  const hasMissingRequiredComponent = requiredComponents.find(component => {\n    if (!dsn[component]) {\n      logger.error(`Invalid Sentry Dsn: ${component} missing`);\n      return true;\n    }\n    return false;\n  });\n\n  if (hasMissingRequiredComponent) {\n    return false;\n  }\n\n  if (!projectId.match(/^\\d+$/)) {\n    logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n    return false;\n  }\n\n  if (!isValidProtocol(protocol)) {\n    logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n    return false;\n  }\n\n  if (port && isNaN(parseInt(port, 10))) {\n    logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n  const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n  if (!components || !validateDsn(components)) {\n    return undefined;\n  }\n  return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n *\n * @deprecated This function is deprecated and will be removed in the next major version.\n */\n// TODO(v9): Move this function into normalize() directly\nfunction memoBuilder() {\n  const hasWeakSet = typeof WeakSet === 'function';\n  const inner = hasWeakSet ? new WeakSet() : [];\n  function memoize(obj) {\n    if (hasWeakSet) {\n      if (inner.has(obj)) {\n        return true;\n      }\n      inner.add(obj);\n      return false;\n    }\n    // eslint-disable-next-line @typescript-eslint/prefer-for-of\n    for (let i = 0; i < inner.length; i++) {\n      const value = inner[i];\n      if (value === obj) {\n        return true;\n      }\n    }\n    inner.push(obj);\n    return false;\n  }\n\n  function unmemoize(obj) {\n    if (hasWeakSet) {\n      inner.delete(obj);\n    } else {\n      for (let i = 0; i < inner.length; i++) {\n        if (inner[i] === obj) {\n          inner.splice(i, 1);\n          break;\n        }\n      }\n    }\n  }\n  return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n//# sourceMappingURL=memo.js.map\n","import { isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n  try {\n    // since we're at the outermost level, we don't provide a key\n    return visit('', input, depth, maxProperties);\n  } catch (err) {\n    return { ERROR: `**non-serializable** (${err})` };\n  }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  object,\n  // Default Node.js REPL depth\n  depth = 3,\n  // 100kB, as 200kB is max payload size, so half sounds reasonable\n  maxSize = 100 * 1024,\n) {\n  const normalized = normalize(object, depth);\n\n  if (jsonSize(normalized) > maxSize) {\n    return normalizeToSize(object, depth - 1, maxSize);\n  }\n\n  return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n  key,\n  value,\n  depth = +Infinity,\n  maxProperties = +Infinity,\n  // eslint-disable-next-line deprecation/deprecation\n  memo = memoBuilder(),\n) {\n  const [memoize, unmemoize] = memo;\n\n  // Get the simple cases out of the way first\n  if (\n    value == null || // this matches null and undefined -> eqeq not eqeqeq\n    ['boolean', 'string'].includes(typeof value) ||\n    (typeof value === 'number' && Number.isFinite(value))\n  ) {\n    return value ;\n  }\n\n  const stringified = stringifyValue(key, value);\n\n  // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n  // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n  if (!stringified.startsWith('[object ')) {\n    return stringified;\n  }\n\n  // From here on, we can assert that `value` is either an object or an array.\n\n  // Do not normalize objects that we know have already been normalized. As a general rule, the\n  // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n  // have already been normalized.\n  if ((value )['__sentry_skip_normalization__']) {\n    return value ;\n  }\n\n  // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n  // We keep a certain amount of depth.\n  // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n  const remainingDepth =\n    typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n      ? ((value )['__sentry_override_normalization_depth__'] )\n      : depth;\n\n  // We're also done if we've reached the max depth\n  if (remainingDepth === 0) {\n    // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n    return stringified.replace('object ', '');\n  }\n\n  // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n  if (memoize(value)) {\n    return '[Circular ~]';\n  }\n\n  // If the value has a `toJSON` method, we call it to extract more information\n  const valueWithToJSON = value ;\n  if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n    try {\n      const jsonValue = valueWithToJSON.toJSON();\n      // We need to normalize the return value of `.toJSON()` in case it has circular references\n      return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n    } catch (err) {\n      // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n    }\n  }\n\n  // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n  // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n  // property/entry, and keep track of the number of items we add to it.\n  const normalized = (Array.isArray(value) ? [] : {}) ;\n  let numAdded = 0;\n\n  // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n  // properties are non-enumerable and otherwise would get missed.\n  const visitable = convertToPlainObject(value );\n\n  for (const visitKey in visitable) {\n    // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n    if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n      continue;\n    }\n\n    if (numAdded >= maxProperties) {\n      normalized[visitKey] = '[MaxProperties ~]';\n      break;\n    }\n\n    // Recursively visit all the child nodes\n    const visitValue = visitable[visitKey];\n    normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n    numAdded++;\n  }\n\n  // Once we've visited all the branches, remove the parent from memo storage\n  unmemoize(value);\n\n  // Return accumulated values\n  return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n  key,\n  // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n  // our internal use, it'll do\n  value,\n) {\n  try {\n    if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n      return '[Domain]';\n    }\n\n    if (key === 'domainEmitter') {\n      return '[DomainEmitter]';\n    }\n\n    // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n    // which won't throw if they are not present.\n\n    if (typeof global !== 'undefined' && value === global) {\n      return '[Global]';\n    }\n\n    // eslint-disable-next-line no-restricted-globals\n    if (typeof window !== 'undefined' && value === window) {\n      return '[Window]';\n    }\n\n    // eslint-disable-next-line no-restricted-globals\n    if (typeof document !== 'undefined' && value === document) {\n      return '[Document]';\n    }\n\n    if (isVueViewModel(value)) {\n      return '[VueViewModel]';\n    }\n\n    // React's SyntheticEvent thingy\n    if (isSyntheticEvent(value)) {\n      return '[SyntheticEvent]';\n    }\n\n    if (typeof value === 'number' && !Number.isFinite(value)) {\n      return `[${value}]`;\n    }\n\n    if (typeof value === 'function') {\n      return `[Function: ${getFunctionName(value)}]`;\n    }\n\n    if (typeof value === 'symbol') {\n      return `[${String(value)}]`;\n    }\n\n    // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n    if (typeof value === 'bigint') {\n      return `[BigInt: ${String(value)}]`;\n    }\n\n    // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n    // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n    // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n    // we can make sure that only plain objects come out that way.\n    const objName = getConstructorName(value);\n\n    // Handle HTML Elements\n    if (/^HTML(\\w*)Element$/.test(objName)) {\n      return `[HTMLElement: ${objName}]`;\n    }\n\n    return `[object ${objName}]`;\n  } catch (err) {\n    return `**non-serializable** (${err})`;\n  }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n  const prototype = Object.getPrototypeOf(value);\n\n  return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n  // eslint-disable-next-line no-bitwise\n  return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n  return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n  const escapedBase = basePath\n    // Backslash to forward\n    .replace(/\\\\/g, '/')\n    // Escape RegExp special characters\n    .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n  let newUrl = url;\n  try {\n    newUrl = decodeURI(url);\n  } catch (_Oo) {\n    // Sometime this breaks\n  }\n  return (\n    newUrl\n      .replace(/\\\\/g, '/')\n      .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n      // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n      .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n  );\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase };\n//# sourceMappingURL=normalize.js.map\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n  return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n  const [headers, items] = envelope;\n  return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n  envelope,\n  callback,\n) {\n  const envelopeItems = envelope[1];\n\n  for (const envelopeItem of envelopeItems) {\n    const envelopeItemType = envelopeItem[0].type;\n    const result = callback(envelopeItem, envelopeItemType);\n\n    if (result) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n  return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input) {\n  return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.encodePolyfill\n    ? GLOBAL_OBJ.__SENTRY__.encodePolyfill(input)\n    : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n  return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.decodePolyfill\n    ? GLOBAL_OBJ.__SENTRY__.decodePolyfill(input)\n    : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\n  const [envHeaders, items] = envelope;\n\n  // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n  let parts = JSON.stringify(envHeaders);\n\n  function append(next) {\n    if (typeof parts === 'string') {\n      parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n    } else {\n      parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n    }\n  }\n\n  for (const item of items) {\n    const [itemHeaders, payload] = item;\n\n    append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n    if (typeof payload === 'string' || payload instanceof Uint8Array) {\n      append(payload);\n    } else {\n      let stringifiedPayload;\n      try {\n        stringifiedPayload = JSON.stringify(payload);\n      } catch (e) {\n        // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n        // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n        // performance impact but in this case a performance hit is better than throwing.\n        stringifiedPayload = JSON.stringify(normalize(payload));\n      }\n      append(stringifiedPayload);\n    }\n  }\n\n  return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n  const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n  const merged = new Uint8Array(totalLength);\n  let offset = 0;\n  for (const buffer of buffers) {\n    merged.set(buffer, offset);\n    offset += buffer.length;\n  }\n\n  return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(env) {\n  let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n  function readBinary(length) {\n    const bin = buffer.subarray(0, length);\n    // Replace the buffer with the remaining data excluding trailing newline\n    buffer = buffer.subarray(length + 1);\n    return bin;\n  }\n\n  function readJson() {\n    let i = buffer.indexOf(0xa);\n    // If we couldn't find a newline, we must have found the end of the buffer\n    if (i < 0) {\n      i = buffer.length;\n    }\n\n    return JSON.parse(decodeUTF8(readBinary(i))) ;\n  }\n\n  const envelopeHeader = readJson();\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  const items = [];\n\n  while (buffer.length) {\n    const itemHeader = readJson();\n    const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n    items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n  }\n\n  return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n  const spanHeaders = {\n    type: 'span',\n  };\n\n  return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n  const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n  return [\n    dropUndefinedKeys({\n      type: 'attachment',\n      length: buffer.length,\n      filename: attachment.filename,\n      content_type: attachment.contentType,\n      attachment_type: attachment.attachmentType,\n    }),\n    buffer,\n  ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n  session: 'session',\n  sessions: 'session',\n  attachment: 'attachment',\n  transaction: 'transaction',\n  event: 'error',\n  client_report: 'internal',\n  user_report: 'default',\n  profile: 'profile',\n  profile_chunk: 'profile',\n  replay_event: 'replay',\n  replay_recording: 'replay',\n  check_in: 'monitor',\n  feedback: 'feedback',\n  span: 'span',\n  statsd: 'metric_bucket',\n  raw_security: 'security',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n  return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n  if (!metadataOrEvent || !metadataOrEvent.sdk) {\n    return;\n  }\n  const { name, version } = metadataOrEvent.sdk;\n  return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n  event,\n  sdkInfo,\n  tunnel,\n  dsn,\n) {\n  const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n  return {\n    event_id: event.event_id ,\n    sent_at: new Date().toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n    ...(dynamicSamplingContext && {\n      trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n    }),\n  };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/version.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n  if (!sdkInfo) {\n    return event;\n  }\n  event.sdk = event.sdk || {};\n  event.sdk.name = event.sdk.name || sdkInfo.name;\n  event.sdk.version = event.sdk.version || sdkInfo.version;\n  event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n  event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n  return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n  session,\n  dsn,\n  metadata,\n  tunnel,\n) {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n  const envelopeHeaders = {\n    sent_at: new Date().toISOString(),\n    ...(sdkInfo && { sdk: sdkInfo }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const envelopeItem =\n    'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n  return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n  event,\n  dsn,\n  metadata,\n  tunnel,\n) {\n  const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n  /*\n    Note: Due to TS, event.type may be `replay_event`, theoretically.\n    In practice, we never call `createEventEnvelope` with `replay_event` type,\n    and we'd have to adjust a looot of types to make this work properly.\n    We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n    So the safe choice is to really guard against the replay_event type here.\n  */\n  const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n  enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n  const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n  // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n  // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n  // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n  // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n  delete event.sdkProcessingMetadata;\n\n  const eventItem = [{ type: eventType }, event];\n  return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n  function dscHasRequiredProps(dsc) {\n    return !!dsc.trace_id && !!dsc.public_key;\n  }\n\n  // For the moment we'll obtain the DSC from the first span in the array\n  // This might need to be changed if we permit sending multiple spans from\n  // different segments in one envelope\n  const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n  const dsn = client && client.getDsn();\n  const tunnel = client && client.getOptions().tunnel;\n\n  const headers = {\n    sent_at: new Date().toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const beforeSendSpan = client && client.getOptions().beforeSendSpan;\n  const convertToSpanJSON = beforeSendSpan\n    ? (span) => {\n        const spanJson = beforeSendSpan(spanToJSON(span) );\n        if (!spanJson) {\n          showSpanDropWarning();\n        }\n        return spanJson;\n      }\n    : (span) => spanToJSON(span);\n\n  const items = [];\n  for (const span of spans) {\n    const spanJson = convertToSpanJSON(span);\n    if (spanJson) {\n      items.push(createSpanEnvelopeItem(spanJson));\n    }\n  }\n\n  return createEnvelope(headers, items);\n}\n\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getRootSpan, getActiveSpan } from '../utils/spanUtils.js';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nfunction setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n  if (rootSpan) {\n    DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n    rootSpan.addEvent(name, {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,\n    });\n  }\n}\n\n/**\n * Convert timed events to measurements.\n */\nfunction timedEventsToMeasurements(events) {\n  if (!events || events.length === 0) {\n    return undefined;\n  }\n\n  const measurements = {};\n  events.forEach(event => {\n    const attributes = event.attributes || {};\n    const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;\n    const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;\n\n    if (typeof unit === 'string' && typeof value === 'number') {\n      measurements[event.name] = { value, unit };\n    }\n  });\n\n  return measurements;\n}\n\nexport { setMeasurement, timedEventsToMeasurements };\n//# sourceMappingURL=measurement.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { createSpanEnvelope } from '../envelope.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanTimeInputToSeconds, getStatusMessage, getRootSpan, spanToJSON, getSpanDescendants, spanToTransactionTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { logSpanEnd } from './logSpans.js';\nimport { timedEventsToMeasurements } from './measurement.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nclass SentrySpan  {\n\n  /** Epoch timestamp in seconds when the span started. */\n\n  /** Epoch timestamp in seconds when the span ended. */\n\n  /** Internal keeper of the status */\n\n  /** The timed events added to this span. */\n\n  /** if true, treat span as a standalone span (not part of a transaction) */\n\n  /**\n   * You should never call the constructor manually, always use `Sentry.startSpan()`\n   * or other span methods.\n   * @internal\n   * @hideconstructor\n   * @hidden\n   */\n   constructor(spanContext = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this._startTime = spanContext.startTimestamp || timestampInSeconds();\n\n    this._attributes = {};\n    this.setAttributes({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n      ...spanContext.attributes,\n    });\n\n    this._name = spanContext.name;\n\n    if (spanContext.parentSpanId) {\n      this._parentSpanId = spanContext.parentSpanId;\n    }\n    // We want to include booleans as well here\n    if ('sampled' in spanContext) {\n      this._sampled = spanContext.sampled;\n    }\n    if (spanContext.endTimestamp) {\n      this._endTime = spanContext.endTimestamp;\n    }\n\n    this._events = [];\n\n    this._isStandaloneSpan = spanContext.isStandalone;\n\n    // If the span is already ended, ensure we finalize the span immediately\n    if (this._endTime) {\n      this._onSpanEnded();\n    }\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLink(_link) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLinks(_links) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   recordException(_exception, _time) {\n    // noop\n  }\n\n  /** @inheritdoc */\n   spanContext() {\n    const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n    return {\n      spanId,\n      traceId,\n      traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n   setAttribute(key, value) {\n    if (value === undefined) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n    } else {\n      this._attributes[key] = value;\n    }\n\n    return this;\n  }\n\n  /** @inheritdoc */\n   setAttributes(attributes) {\n    Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for browser tracing where we want to adjust the start time afterwards.\n   * USE THIS WITH CAUTION!\n   *\n   * @hidden\n   * @internal\n   */\n   updateStartTime(timeInput) {\n    this._startTime = spanTimeInputToSeconds(timeInput);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setStatus(value) {\n    this._status = value;\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   updateName(name) {\n    this._name = name;\n    this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n    return this;\n  }\n\n  /** @inheritdoc */\n   end(endTimestamp) {\n    // If already ended, skip\n    if (this._endTime) {\n      return;\n    }\n\n    this._endTime = spanTimeInputToSeconds(endTimestamp);\n    logSpanEnd(this);\n\n    this._onSpanEnded();\n  }\n\n  /**\n   * Get JSON representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToJSON(span)` instead.\n   */\n   getSpanJSON() {\n    return dropUndefinedKeys({\n      data: this._attributes,\n      description: this._name,\n      op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      parent_span_id: this._parentSpanId,\n      span_id: this._spanId,\n      start_timestamp: this._startTime,\n      status: getStatusMessage(this._status),\n      timestamp: this._endTime,\n      trace_id: this._traceId,\n      origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n      _metrics_summary: getMetricSummaryJsonForSpan(this),\n      profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n      exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n      measurements: timedEventsToMeasurements(this._events),\n      is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n      segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n    });\n  }\n\n  /** @inheritdoc */\n   isRecording() {\n    return !this._endTime && !!this._sampled;\n  }\n\n  /**\n   * @inheritdoc\n   */\n   addEvent(\n    name,\n    attributesOrStartTime,\n    startTime,\n  ) {\n    DEBUG_BUILD && logger.log('[Tracing] Adding an event to span:', name);\n\n    const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n    const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n    const event = {\n      name,\n      time: spanTimeInputToSeconds(time),\n      attributes,\n    };\n\n    this._events.push(event);\n\n    return this;\n  }\n\n  /**\n   * This method should generally not be used,\n   * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n   * USE THIS WITH CAUTION!\n   * @internal\n   * @hidden\n   * @experimental\n   */\n   isStandaloneSpan() {\n    return !!this._isStandaloneSpan;\n  }\n\n  /** Emit `spanEnd` when the span is ended. */\n   _onSpanEnded() {\n    const client = getClient();\n    if (client) {\n      client.emit('spanEnd', this);\n    }\n\n    // A segment span is basically the root span of a local span tree.\n    // So for now, this is either what we previously refer to as the root span,\n    // or a standalone span.\n    const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);\n\n    if (!isSegmentSpan) {\n      return;\n    }\n\n    // if this is a standalone span, we send it immediately\n    if (this._isStandaloneSpan) {\n      if (this._sampled) {\n        sendSpanEnvelope(createSpanEnvelope([this], client));\n      } else {\n        DEBUG_BUILD &&\n          logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n        if (client) {\n          client.recordDroppedEvent('sample_rate', 'span');\n        }\n      }\n      return;\n    }\n\n    const transactionEvent = this._convertSpanToTransaction();\n    if (transactionEvent) {\n      const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n      scope.captureEvent(transactionEvent);\n    }\n  }\n\n  /**\n   * Finish the transaction & prepare the event to send to Sentry.\n   */\n   _convertSpanToTransaction() {\n    // We can only convert finished spans\n    if (!isFullFinishedSpan(spanToJSON(this))) {\n      return undefined;\n    }\n\n    if (!this._name) {\n      DEBUG_BUILD && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n      this._name = '<unlabeled transaction>';\n    }\n\n    const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n    const scope = capturedSpanScope || getCurrentScope();\n    const client = scope.getClient() || getClient();\n\n    if (this._sampled !== true) {\n      // At this point if `sampled !== true` we want to discard the transaction.\n      DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n      if (client) {\n        client.recordDroppedEvent('sample_rate', 'transaction');\n      }\n\n      return undefined;\n    }\n\n    // The transaction span itself as well as any potential standalone spans should be filtered out\n    const finishedSpans = getSpanDescendants(this).filter(span => span !== this && !isStandaloneSpan(span));\n\n    const spans = finishedSpans.map(span => spanToJSON(span)).filter(isFullFinishedSpan);\n\n    const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ;\n\n    // remove internal root span attributes we don't need to send.\n    /* eslint-disable @typescript-eslint/no-dynamic-delete */\n    delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    spans.forEach(span => {\n      span.data && delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    });\n    // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n    const transaction = {\n      contexts: {\n        trace: spanToTransactionTraceContext(this),\n      },\n      spans:\n        // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n        // we do not use spans anymore after this point\n        spans.length > MAX_SPAN_COUNT\n          ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n          : spans,\n      start_timestamp: this._startTime,\n      timestamp: this._endTime,\n      transaction: this._name,\n      type: 'transaction',\n      sdkProcessingMetadata: {\n        capturedSpanScope,\n        capturedSpanIsolationScope,\n        ...dropUndefinedKeys({\n          dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n        }),\n      },\n      _metrics_summary: getMetricSummaryJsonForSpan(this),\n      ...(source && {\n        transaction_info: {\n          source,\n        },\n      }),\n    };\n\n    const measurements = timedEventsToMeasurements(this._events);\n    const hasMeasurements = measurements && Object.keys(measurements).length;\n\n    if (hasMeasurements) {\n      DEBUG_BUILD &&\n        logger.log(\n          '[Measurements] Adding measurements to transaction event',\n          JSON.stringify(measurements, undefined, 2),\n        );\n      transaction.measurements = measurements;\n    }\n\n    return transaction;\n  }\n}\n\nfunction isSpanTimeInput(value) {\n  return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input) {\n  return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span) {\n  return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope) {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const spanItems = envelope[1];\n  if (!spanItems || spanItems.length === 0) {\n    client.recordDroppedEvent('before_send', 'span');\n    return;\n  }\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\nexport { SentrySpan };\n//# sourceMappingURL=sentrySpan.js.map\n","import { getMainCarrier } from '../carrier.js';\nimport { withScope, getCurrentScope, getIsolationScope, getClient } from '../currentScopes.js';\nimport { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { generateTraceId } from '../utils-hoist/propagationContext.js';\nimport { propagationContextFromHeaders } from '../utils-hoist/tracing.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope, _getSpanForScope } from '../utils/spanOnScope.js';\nimport { spanToJSON, addChildSpanToSpan, spanIsSampled, spanTimeInputToSeconds, getRootSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { logSpanStart } from './logSpans.js';\nimport { sampleSpan } from './sampling.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SentrySpan } from './sentrySpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { setCapturedScopesOnSpan } from './utils.js';\n\nconst SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpan(options, callback) {\n  const acs = getAcs();\n  if (acs.startSpan) {\n    return acs.startSpan(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  return withScope(options.scope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope);\n\n      const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n      const activeSpan = shouldSkipSpan\n        ? new SentryNonRecordingSpan()\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      _setSpanForScope(scope, activeSpan);\n\n      return handleCallbackErrors(\n        () => callback(activeSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n        () => activeSpan.end(),\n      );\n    });\n  });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. You'll have to call `span.end()` manually.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpanManual(options, callback) {\n  const acs = getAcs();\n  if (acs.startSpanManual) {\n    return acs.startSpanManual(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  return withScope(options.scope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope);\n\n      const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n      const activeSpan = shouldSkipSpan\n        ? new SentryNonRecordingSpan()\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      _setSpanForScope(scope, activeSpan);\n\n      function finishAndSetSpan() {\n        activeSpan.end();\n      }\n\n      return handleCallbackErrors(\n        () => callback(activeSpan, finishAndSetSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n      );\n    });\n  });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startInactiveSpan(options) {\n  const acs = getAcs();\n  if (acs.startInactiveSpan) {\n    return acs.startInactiveSpan(options);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  // If `options.scope` is defined, we use this as as a wrapper,\n  // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n  const wrapper = options.scope\n    ? (callback) => withScope(options.scope, callback)\n    : customParentSpan !== undefined\n      ? (callback) => withActiveSpan(customParentSpan, callback)\n      : (callback) => callback();\n\n  return wrapper(() => {\n    const scope = getCurrentScope();\n    const parentSpan = getParentSpan(scope);\n\n    const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n\n    if (shouldSkipSpan) {\n      return new SentryNonRecordingSpan();\n    }\n\n    return createChildOrRootSpan({\n      parentSpan,\n      spanArguments,\n      forceTransaction,\n      scope,\n    });\n  });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from `<meta name=\"sentry-trace\">`\n * and `<meta name=\"baggage\">` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nconst continueTrace = (\n  options\n\n,\n  callback,\n) => {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.continueTrace) {\n    return acs.continueTrace(options, callback);\n  }\n\n  const { sentryTrace, baggage } = options;\n\n  return withScope(scope => {\n    const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n    scope.setPropagationContext(propagationContext);\n    return callback();\n  });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n  const acs = getAcs();\n  if (acs.withActiveSpan) {\n    return acs.withActiveSpan(span, callback);\n  }\n\n  return withScope(scope => {\n    _setSpanForScope(scope, span || undefined);\n    return callback(scope);\n  });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nfunction suppressTracing(callback) {\n  const acs = getAcs();\n\n  if (acs.suppressTracing) {\n    return acs.suppressTracing(callback);\n  }\n\n  return withScope(scope => {\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n    return callback();\n  });\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n *            or page will automatically create a new trace.\n */\nfunction startNewTrace(callback) {\n  return withScope(scope => {\n    scope.setPropagationContext({ traceId: generateTraceId() });\n    DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n    return withActiveSpan(null, callback);\n  });\n}\n\nfunction createChildOrRootSpan({\n  parentSpan,\n  spanArguments,\n  forceTransaction,\n  scope,\n}\n\n) {\n  if (!hasTracingEnabled()) {\n    return new SentryNonRecordingSpan();\n  }\n\n  const isolationScope = getIsolationScope();\n\n  let span;\n  if (parentSpan && !forceTransaction) {\n    span = _startChildSpan(parentSpan, scope, spanArguments);\n    addChildSpanToSpan(parentSpan, span);\n  } else if (parentSpan) {\n    // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n    const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n    const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n    const parentSampled = spanIsSampled(parentSpan);\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      parentSampled,\n    );\n\n    freezeDscOnSpan(span, dsc);\n  } else {\n    const {\n      traceId,\n      dsc,\n      parentSpanId,\n      sampled: parentSampled,\n    } = {\n      ...isolationScope.getPropagationContext(),\n      ...scope.getPropagationContext(),\n    };\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      parentSampled,\n    );\n\n    if (dsc) {\n      freezeDscOnSpan(span, dsc);\n    }\n  }\n\n  logSpanStart(span);\n\n  setCapturedScopesOnSpan(span, scope, isolationScope);\n\n  return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options) {\n  const exp = options.experimental || {};\n  const initialCtx = {\n    isStandalone: exp.standalone,\n    ...options,\n  };\n\n  if (options.startTime) {\n    const ctx = { ...initialCtx };\n    ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n    delete ctx.startTime;\n    return ctx;\n  }\n\n  return initialCtx;\n}\n\nfunction getAcs() {\n  const carrier = getMainCarrier();\n  return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(spanArguments, scope, parentSampled) {\n  const client = getClient();\n  const options = (client && client.getOptions()) || {};\n\n  const { name = '', attributes } = spanArguments;\n  const [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY]\n    ? [false]\n    : sampleSpan(options, {\n        name,\n        parentSampled,\n        attributes,\n        transactionContext: {\n          name,\n          parentSampled,\n        },\n      });\n\n  const rootSpan = new SentrySpan({\n    ...spanArguments,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n      ...spanArguments.attributes,\n    },\n    sampled,\n  });\n  if (sampleRate !== undefined) {\n    rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\n  }\n\n  if (client) {\n    client.emit('spanStart', rootSpan);\n  }\n\n  return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(parentSpan, scope, spanArguments) {\n  const { spanId, traceId } = parentSpan.spanContext();\n  const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);\n\n  const childSpan = sampled\n    ? new SentrySpan({\n        ...spanArguments,\n        parentSpanId: spanId,\n        traceId,\n        sampled,\n      })\n    : new SentryNonRecordingSpan({ traceId });\n\n  addChildSpanToSpan(parentSpan, childSpan);\n\n  const client = getClient();\n  if (client) {\n    client.emit('spanStart', childSpan);\n    // If it has an endTimestamp, it's already ended\n    if (spanArguments.endTimestamp) {\n      client.emit('spanEnd', childSpan);\n    }\n  }\n\n  return childSpan;\n}\n\nfunction getParentSpan(scope) {\n  const span = _getSpanForScope(scope) ;\n\n  if (!span) {\n    return undefined;\n  }\n\n  const client = getClient();\n  const options = client ? client.getOptions() : {};\n  if (options.parentSpanIsAlwaysRootSpan) {\n    return getRootSpan(span) ;\n  }\n\n  return span;\n}\n\nfunction getActiveSpanWrapper(parentSpan) {\n  return parentSpan !== undefined\n    ? (callback) => {\n        return withActiveSpan(parentSpan, callback);\n      }\n    : (callback) => callback();\n}\n\nexport { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };\n//# sourceMappingURL=trace.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope } from '../utils/spanOnScope.js';\nimport { getActiveSpan, spanTimeInputToSeconds, getSpanDescendants, spanToJSON, removeChildSpanFromSpan } from '../utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { startInactiveSpan } from './trace.js';\n\nconst TRACING_DEFAULTS = {\n  idleTimeout: 1000,\n  finalTimeout: 30000,\n  childSpanTimeout: 15000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nfunction startIdleSpan(startSpanOptions, options = {}) {\n  // Activities store a list of active spans\n  const activities = new Map();\n\n  // We should not use heartbeat if we finished a span\n  let _finished = false;\n\n  // Timer that tracks idleTimeout\n  let _idleTimeoutID;\n\n  // The reason why the span was finished\n  let _finishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n  let _autoFinishAllowed = !options.disableAutoFinish;\n\n  const _cleanupHooks = [];\n\n  const {\n    idleTimeout = TRACING_DEFAULTS.idleTimeout,\n    finalTimeout = TRACING_DEFAULTS.finalTimeout,\n    childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n    beforeSpanEnd,\n  } = options;\n\n  const client = getClient();\n\n  if (!client || !hasTracingEnabled()) {\n    return new SentryNonRecordingSpan();\n  }\n\n  const scope = getCurrentScope();\n  const previousActiveSpan = getActiveSpan();\n  const span = _startIdleSpan(startSpanOptions);\n\n  // We patch span.end to ensure we can run some things before the span is ended\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args) {\n      if (beforeSpanEnd) {\n        beforeSpanEnd(span);\n      }\n\n      // Just ensuring that this keeps working, even if we ever have more arguments here\n      const [definedEndTimestamp, ...rest] = args;\n      const timestamp = definedEndTimestamp || timestampInSeconds();\n      const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n      // Ensure we end with the last span timestamp, if possible\n      const spans = getSpanDescendants(span).filter(child => child !== span);\n\n      // If we have no spans, we just end, nothing else to do here\n      if (!spans.length) {\n        onIdleSpanEnded(spanEndTimestamp);\n        return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n      }\n\n      const childEndTimestamps = spans\n        .map(span => spanToJSON(span).timestamp)\n        .filter(timestamp => !!timestamp) ;\n      const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n\n      // In reality this should always exist here, but type-wise it may be undefined...\n      const spanStartTimestamp = spanToJSON(span).start_timestamp;\n\n      // The final endTimestamp should:\n      // * Never be before the span start timestamp\n      // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n      // * Otherwise be the passed end timestamp\n      // Final timestamp can never be after finalTimeout\n      const endTimestamp = Math.min(\n        spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n        Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n      );\n\n      onIdleSpanEnded(endTimestamp);\n      return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n    },\n  });\n\n  /**\n   * Cancels the existing idle timeout, if there is one.\n   */\n  function _cancelIdleTimeout() {\n    if (_idleTimeoutID) {\n      clearTimeout(_idleTimeoutID);\n      _idleTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Restarts idle timeout, if there is no running idle timeout it will start one.\n   */\n  function _restartIdleTimeout(endTimestamp) {\n    _cancelIdleTimeout();\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n        span.end(endTimestamp);\n      }\n    }, idleTimeout);\n  }\n\n  /**\n   * Restarts child span timeout, if there is none running it will start one.\n   */\n  function _restartChildSpanTimeout(endTimestamp) {\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n        span.end(endTimestamp);\n      }\n    }, childSpanTimeout);\n  }\n\n  /**\n   * Start tracking a specific activity.\n   * @param spanId The span id that represents the activity\n   */\n  function _pushActivity(spanId) {\n    _cancelIdleTimeout();\n    activities.set(spanId, true);\n\n    const endTimestamp = timestampInSeconds();\n    // We need to add the timeout here to have the real endtimestamp of the idle span\n    // Remember timestampInSeconds is in seconds, timeout is in ms\n    _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n  }\n\n  /**\n   * Remove an activity from usage\n   * @param spanId The span id that represents the activity\n   */\n  function _popActivity(spanId) {\n    if (activities.has(spanId)) {\n      activities.delete(spanId);\n    }\n\n    if (activities.size === 0) {\n      const endTimestamp = timestampInSeconds();\n      // We need to add the timeout here to have the real endtimestamp of the idle span\n      // Remember timestampInSeconds is in seconds, timeout is in ms\n      _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n    }\n  }\n\n  function onIdleSpanEnded(endTimestamp) {\n    _finished = true;\n    activities.clear();\n\n    _cleanupHooks.forEach(cleanup => cleanup());\n\n    _setSpanForScope(scope, previousActiveSpan);\n\n    const spanJSON = spanToJSON(span);\n\n    const { start_timestamp: startTimestamp } = spanJSON;\n    // This should never happen, but to make TS happy...\n    if (!startTimestamp) {\n      return;\n    }\n\n    const attributes = spanJSON.data || {};\n    if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n    }\n\n    logger.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n    const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n    let discardedSpans = 0;\n    childSpans.forEach(childSpan => {\n      // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n      if (childSpan.isRecording()) {\n        childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n        childSpan.end(endTimestamp);\n        DEBUG_BUILD &&\n          logger.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n      }\n\n      const childSpanJSON = spanToJSON(childSpan);\n      const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n      const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n      // Add a delta with idle timeout so that we prevent false positives\n      const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n      const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n      if (DEBUG_BUILD) {\n        const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n        if (!spanStartedBeforeIdleSpanEnd) {\n          logger.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n        } else if (!spanEndedBeforeFinalTimeout) {\n          logger.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n        }\n      }\n\n      if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n        removeChildSpanFromSpan(span, childSpan);\n        discardedSpans++;\n      }\n    });\n\n    if (discardedSpans > 0) {\n      span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n    }\n  }\n\n  _cleanupHooks.push(\n    client.on('spanStart', startedSpan => {\n      // If we already finished the idle span,\n      // or if this is the idle span itself being started,\n      // or if the started span has already been closed,\n      // we don't care about it for activity\n      if (_finished || startedSpan === span || !!spanToJSON(startedSpan).timestamp) {\n        return;\n      }\n\n      const allSpans = getSpanDescendants(span);\n\n      // If the span that was just started is a child of the idle span, we should track it\n      if (allSpans.includes(startedSpan)) {\n        _pushActivity(startedSpan.spanContext().spanId);\n      }\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('spanEnd', endedSpan => {\n      if (_finished) {\n        return;\n      }\n\n      _popActivity(endedSpan.spanContext().spanId);\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n      if (spanToAllowAutoFinish === span) {\n        _autoFinishAllowed = true;\n        _restartIdleTimeout();\n\n        if (activities.size) {\n          _restartChildSpanTimeout();\n        }\n      }\n    }),\n  );\n\n  // We only start the initial idle timeout if we are not delaying the auto finish\n  if (!options.disableAutoFinish) {\n    _restartIdleTimeout();\n  }\n\n  setTimeout(() => {\n    if (!_finished) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n      _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n      span.end();\n    }\n  }, finalTimeout);\n\n  return span;\n}\n\nfunction _startIdleSpan(options) {\n  const span = startInactiveSpan(options);\n\n  _setSpanForScope(getCurrentScope(), span);\n\n  DEBUG_BUILD && logger.log('[Tracing] Started span is an idle span');\n\n  return span;\n}\n\nexport { TRACING_DEFAULTS, startIdleSpan };\n//# sourceMappingURL=idleSpan.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { SyncPromise } from './utils-hoist/syncpromise.js';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n  processors,\n  event,\n  hint,\n  index = 0,\n) {\n  return new SyncPromise((resolve, reject) => {\n    const processor = processors[index];\n    if (event === null || typeof processor !== 'function') {\n      resolve(event);\n    } else {\n      const result = processor({ ...event }, hint) ;\n\n      DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n      if (isThenable(result)) {\n        void result\n          .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n          .then(null, reject);\n      } else {\n        void notifyEventProcessors(processors, result, hint, index + 1)\n          .then(resolve)\n          .then(null, reject);\n      }\n    }\n  });\n}\n\nexport { notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nlet parsedStackResults;\nlet lastKeysCount;\nlet cachedFilenameDebugIds;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nfunction getFilenameToDebugIdMap(stackParser) {\n  const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n  if (!debugIdMap) {\n    return {};\n  }\n\n  const debugIdKeys = Object.keys(debugIdMap);\n\n  // If the count of registered globals hasn't changed since the last call, we\n  // can just return the cached result.\n  if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n    return cachedFilenameDebugIds;\n  }\n\n  lastKeysCount = debugIdKeys.length;\n\n  // Build a map of filename -> debug_id.\n  cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {\n    if (!parsedStackResults) {\n      parsedStackResults = {};\n    }\n\n    const result = parsedStackResults[stackKey];\n\n    if (result) {\n      acc[result[0]] = result[1];\n    } else {\n      const parsedStack = stackParser(stackKey);\n\n      for (let i = parsedStack.length - 1; i >= 0; i--) {\n        const stackFrame = parsedStack[i];\n        const filename = stackFrame && stackFrame.filename;\n        const debugId = debugIdMap[stackKey];\n\n        if (filename && debugId) {\n          acc[filename] = debugId;\n          parsedStackResults[stackKey] = [filename, debugId];\n          break;\n        }\n      }\n    }\n\n    return acc;\n  }, {});\n\n  return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nfunction getDebugImagesForResources(\n  stackParser,\n  resource_paths,\n) {\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  if (!filenameDebugIdMap) {\n    return [];\n  }\n\n  const images = [];\n  for (const path of resource_paths) {\n    if (path && filenameDebugIdMap[path]) {\n      images.push({\n        type: 'sourcemap',\n        code_file: path,\n        debug_id: filenameDebugIdMap[path] ,\n      });\n    }\n  }\n\n  return images;\n}\n\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n//# sourceMappingURL=debug-ids.js.map\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n  // Apply general data\n  applyDataToEvent(event, data);\n\n  // We want to set the trace context for normal events only if there isn't already\n  // a trace context on the event. There is a product feature in place where we link\n  // errors with transaction and it relies on that.\n  if (span) {\n    applySpanToEvent(event, span);\n  }\n\n  applyFingerprintToEvent(event, fingerprint);\n  applyBreadcrumbsToEvent(event, breadcrumbs);\n  applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n  const {\n    extra,\n    tags,\n    user,\n    contexts,\n    level,\n    sdkProcessingMetadata,\n    breadcrumbs,\n    fingerprint,\n    eventProcessors,\n    attachments,\n    propagationContext,\n    transactionName,\n    span,\n  } = mergeData;\n\n  mergeAndOverwriteScopeData(data, 'extra', extra);\n  mergeAndOverwriteScopeData(data, 'tags', tags);\n  mergeAndOverwriteScopeData(data, 'user', user);\n  mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n  data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n  if (level) {\n    data.level = level;\n  }\n\n  if (transactionName) {\n    data.transactionName = transactionName;\n  }\n\n  if (span) {\n    data.span = span;\n  }\n\n  if (breadcrumbs.length) {\n    data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n  }\n\n  if (fingerprint.length) {\n    data.fingerprint = [...data.fingerprint, ...fingerprint];\n  }\n\n  if (eventProcessors.length) {\n    data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n  }\n\n  if (attachments.length) {\n    data.attachments = [...data.attachments, ...attachments];\n  }\n\n  data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n  data[prop] = merge(data[prop], mergeVal, 1);\n}\n\nfunction applyDataToEvent(event, data) {\n  const { extra, tags, user, contexts, level, transactionName } = data;\n\n  const cleanedExtra = dropUndefinedKeys(extra);\n  if (cleanedExtra && Object.keys(cleanedExtra).length) {\n    event.extra = { ...cleanedExtra, ...event.extra };\n  }\n\n  const cleanedTags = dropUndefinedKeys(tags);\n  if (cleanedTags && Object.keys(cleanedTags).length) {\n    event.tags = { ...cleanedTags, ...event.tags };\n  }\n\n  const cleanedUser = dropUndefinedKeys(user);\n  if (cleanedUser && Object.keys(cleanedUser).length) {\n    event.user = { ...cleanedUser, ...event.user };\n  }\n\n  const cleanedContexts = dropUndefinedKeys(contexts);\n  if (cleanedContexts && Object.keys(cleanedContexts).length) {\n    event.contexts = { ...cleanedContexts, ...event.contexts };\n  }\n\n  if (level) {\n    event.level = level;\n  }\n\n  // transaction events get their `transaction` from the root span name\n  if (transactionName && event.type !== 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n  const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n  event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n  event.sdkProcessingMetadata = {\n    ...event.sdkProcessingMetadata,\n    ...sdkProcessingMetadata,\n  };\n}\n\nfunction applySpanToEvent(event, span) {\n  event.contexts = {\n    trace: spanToTraceContext(span),\n    ...event.contexts,\n  };\n\n  event.sdkProcessingMetadata = {\n    dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n    ...event.sdkProcessingMetadata,\n  };\n\n  const rootSpan = getRootSpan(span);\n  const transactionName = spanToJSON(rootSpan).description;\n  if (transactionName && !event.transaction && event.type === 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n  // Make sure it's an array first and we actually have something in place\n  event.fingerprint = event.fingerprint\n    ? Array.isArray(event.fingerprint)\n      ? event.fingerprint\n      : [event.fingerprint]\n    : [];\n\n  // If we have something on the scope, then merge it with event\n  if (fingerprint) {\n    event.fingerprint = event.fingerprint.concat(fingerprint);\n  }\n\n  // If we have no data at all, remove empty array default\n  if (event.fingerprint && !event.fingerprint.length) {\n    delete event.fingerprint;\n  }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n//# sourceMappingURL=applyScopeDataToEvent.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalScope } from '../currentScopes.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids.js';\nimport { uuid4, addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { truncate } from '../utils-hoist/string.js';\nimport { dateTimestampInSeconds } from '../utils-hoist/time.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n  options,\n  event,\n  hint,\n  scope,\n  client,\n  isolationScope,\n) {\n  const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n  const prepared = {\n    ...event,\n    event_id: event.event_id || hint.event_id || uuid4(),\n    timestamp: event.timestamp || dateTimestampInSeconds(),\n  };\n  const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n  applyClientOptions(prepared, options);\n  applyIntegrationsMetadata(prepared, integrations);\n\n  if (client) {\n    client.emit('applyFrameMetadata', event);\n  }\n\n  // Only put debug IDs onto frames for error events.\n  if (event.type === undefined) {\n    applyDebugIds(prepared, options.stackParser);\n  }\n\n  // If we have scope given to us, use it as the base for further modifications.\n  // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n  const finalScope = getFinalScope(scope, hint.captureContext);\n\n  if (hint.mechanism) {\n    addExceptionMechanism(prepared, hint.mechanism);\n  }\n\n  const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n  // This should be the last thing called, since we want that\n  // {@link Scope.addEventProcessor} gets the finished prepared event.\n  // Merge scope data together\n  const data = getGlobalScope().getScopeData();\n\n  if (isolationScope) {\n    const isolationData = isolationScope.getScopeData();\n    mergeScopeData(data, isolationData);\n  }\n\n  if (finalScope) {\n    const finalScopeData = finalScope.getScopeData();\n    mergeScopeData(data, finalScopeData);\n  }\n\n  const attachments = [...(hint.attachments || []), ...data.attachments];\n  if (attachments.length) {\n    hint.attachments = attachments;\n  }\n\n  applyScopeDataToEvent(prepared, data);\n\n  const eventProcessors = [\n    ...clientEventProcessors,\n    // Run scope event processors _after_ all other processors\n    ...data.eventProcessors,\n  ];\n\n  const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n  return result.then(evt => {\n    if (evt) {\n      // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n      // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n      // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n      // any new data\n      applyDebugMeta(evt);\n    }\n\n    if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n      return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n    }\n    return evt;\n  });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n  const { environment, release, dist, maxValueLength = 250 } = options;\n\n  // empty strings do not make sense for environment, release, and dist\n  // so we handle them the same as if they were not provided\n  event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n  if (!event.release && release) {\n    event.release = release;\n  }\n\n  if (!event.dist && dist) {\n    event.dist = dist;\n  }\n\n  if (event.message) {\n    event.message = truncate(event.message, maxValueLength);\n  }\n\n  const exception = event.exception && event.exception.values && event.exception.values[0];\n  if (exception && exception.value) {\n    exception.value = truncate(exception.value, maxValueLength);\n  }\n\n  const request = event.request;\n  if (request && request.url) {\n    request.url = truncate(request.url, maxValueLength);\n  }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n  // Build a map of filename -> debug_id\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    event.exception.values.forEach(exception => {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      exception.stacktrace.frames.forEach(frame => {\n        if (filenameDebugIdMap && frame.filename) {\n          frame.debug_id = filenameDebugIdMap[frame.filename];\n        }\n      });\n    });\n  } catch (e) {\n    // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n  }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n  // Extract debug IDs and filenames from the stack frames on the event.\n  const filenameDebugIdMap = {};\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    event.exception.values.forEach(exception => {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      exception.stacktrace.frames.forEach(frame => {\n        if (frame.debug_id) {\n          if (frame.abs_path) {\n            filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n          } else if (frame.filename) {\n            filenameDebugIdMap[frame.filename] = frame.debug_id;\n          }\n          delete frame.debug_id;\n        }\n      });\n    });\n  } catch (e) {\n    // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n  }\n\n  if (Object.keys(filenameDebugIdMap).length === 0) {\n    return;\n  }\n\n  // Fill debug_meta information\n  event.debug_meta = event.debug_meta || {};\n  event.debug_meta.images = event.debug_meta.images || [];\n  const images = event.debug_meta.images;\n  Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n    images.push({\n      type: 'sourcemap',\n      code_file: filename,\n      debug_id,\n    });\n  });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n  if (integrationNames.length > 0) {\n    event.sdk = event.sdk || {};\n    event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n  }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n  if (!event) {\n    return null;\n  }\n\n  const normalized = {\n    ...event,\n    ...(event.breadcrumbs && {\n      breadcrumbs: event.breadcrumbs.map(b => ({\n        ...b,\n        ...(b.data && {\n          data: normalize(b.data, depth, maxBreadth),\n        }),\n      })),\n    }),\n    ...(event.user && {\n      user: normalize(event.user, depth, maxBreadth),\n    }),\n    ...(event.contexts && {\n      contexts: normalize(event.contexts, depth, maxBreadth),\n    }),\n    ...(event.extra && {\n      extra: normalize(event.extra, depth, maxBreadth),\n    }),\n  };\n\n  // event.contexts.trace stores information about a Transaction. Similarly,\n  // event.spans[] stores information about child Spans. Given that a\n  // Transaction is conceptually a Span, normalization should apply to both\n  // Transactions and Spans consistently.\n  // For now the decision is to skip normalization of Transactions and Spans,\n  // so this block overwrites the normalized event to add back the original\n  // Transaction information prior to normalization.\n  if (event.contexts && event.contexts.trace && normalized.contexts) {\n    normalized.contexts.trace = event.contexts.trace;\n\n    // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n    if (event.contexts.trace.data) {\n      normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n    }\n  }\n\n  // event.spans[].data may contain circular/dangerous data so we need to normalize it\n  if (event.spans) {\n    normalized.spans = event.spans.map(span => {\n      return {\n        ...span,\n        ...(span.data && {\n          data: normalize(span.data, depth, maxBreadth),\n        }),\n      };\n    });\n  }\n\n  // event.contexts.flags (FeatureFlagContext) stores context for our feature\n  // flag integrations. It has a greater nesting depth than our other typed\n  // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n  // to skip this in case of conflicting, user-provided context.\n  if (event.contexts && event.contexts.flags && normalized.contexts) {\n    normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n  }\n\n  return normalized;\n}\n\nfunction getFinalScope(\n  scope,\n  captureContext,\n) {\n  if (!captureContext) {\n    return scope;\n  }\n\n  const finalScope = scope ? scope.clone() : new Scope();\n  finalScope.update(captureContext);\n  return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n  hint,\n) {\n  if (!hint) {\n    return undefined;\n  }\n\n  // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n  if (hintIsScopeOrFunction(hint)) {\n    return { captureContext: hint };\n  }\n\n  if (hintIsScopeContext(hint)) {\n    return {\n      captureContext: hint,\n    };\n  }\n\n  return hint;\n}\n\nfunction hintIsScopeOrFunction(\n  hint,\n) {\n  return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n  'user',\n  'level',\n  'extra',\n  'contexts',\n  'tags',\n  'fingerprint',\n  'requestSession',\n  'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n  return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getCurrentScope, getIsolationScope, getClient, withIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(exception, hint) {\n  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(message, captureContext) {\n  // This is necessary to provide explicit scopes upgrade, without changing the original\n  // arity of the `captureMessage(message, level)` method.\n  const level = typeof captureContext === 'string' ? captureContext : undefined;\n  const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n  return getCurrentScope().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n  return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nfunction setContext(name, context) {\n  getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n  getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n  getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n  getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n  getIsolationScope().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n  getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nfunction lastEventId() {\n  return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n  const scope = getCurrentScope();\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n  } else if (!client.captureCheckIn) {\n    DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n  } else {\n    return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n  }\n\n  return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n  monitorSlug,\n  callback,\n  upsertMonitorConfig,\n) {\n  const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n  const now = timestampInSeconds();\n\n  function finishCheckIn(status) {\n    captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n  }\n\n  return withIsolationScope(() => {\n    let maybePromiseResult;\n    try {\n      maybePromiseResult = callback();\n    } catch (e) {\n      finishCheckIn('error');\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      Promise.resolve(maybePromiseResult).then(\n        () => {\n          finishCheckIn('ok');\n        },\n        e => {\n          finishCheckIn('error');\n          throw e;\n        },\n      );\n    } else {\n      finishCheckIn('ok');\n    }\n\n    return maybePromiseResult;\n  });\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n  const client = getClient();\n  if (client) {\n    return client.flush(timeout);\n  }\n  DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n  const client = getClient();\n  if (client) {\n    return client.close(timeout);\n  }\n  DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n  return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nfunction isEnabled() {\n  const client = getClient();\n  return !!client && client.getOptions().enabled !== false && !!client.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nfunction addEventProcessor(callback) {\n  getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\n  const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n  // Will fetch userAgent if called from browser sdk\n  const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n  const session = makeSession({\n    release,\n    environment,\n    user: currentScope.getUser() || isolationScope.getUser(),\n    ...(userAgent && { userAgent }),\n    ...context,\n  });\n\n  // End existing session if there's one\n  const currentSession = isolationScope.getSession();\n  if (currentSession && currentSession.status === 'ok') {\n    updateSession(currentSession, { status: 'exited' });\n  }\n\n  endSession();\n\n  // Afterwards we set the new session on the scope\n  isolationScope.setSession(session);\n\n  // TODO (v8): Remove this and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  currentScope.setSession(session);\n\n  return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session) {\n    closeSession(session);\n  }\n  _sendSessionUpdate();\n\n  // the session is over; take it off of the scope\n  isolationScope.setSession();\n\n  // TODO (v8): Remove this and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n  const client = getClient();\n  // TODO (v8): Remove currentScope and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session && client) {\n    client.captureSession(session);\n  }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n *            Defaults to `false`.\n */\nfunction captureSession(end = false) {\n  // both send the update and pull the session from the scope\n  if (end) {\n    endSession();\n    return;\n  }\n\n  // only send the update\n  _sendSessionUpdate();\n}\n\nexport { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor };\n//# sourceMappingURL=exports.js.map\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n  const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n  const port = dsn.port ? `:${dsn.port}` : '';\n  return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n  return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n  const params = {\n    sentry_version: SENTRY_API_VERSION,\n  };\n\n  if (dsn.publicKey) {\n    // We send only the minimum set of required information. See\n    // https://github.com/getsentry/sentry-javascript/issues/2572.\n    params.sentry_key = dsn.publicKey;\n  }\n\n  if (sdkInfo) {\n    params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n  }\n\n  return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n  return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n  dsnLike,\n  dialogOptions\n\n,\n) {\n  const dsn = makeDsn(dsnLike);\n  if (!dsn) {\n    return '';\n  }\n\n  const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n  let encodedOptions = `dsn=${dsnToString(dsn)}`;\n  for (const key in dialogOptions) {\n    if (key === 'dsn') {\n      continue;\n    }\n\n    if (key === 'onClose') {\n      continue;\n    }\n\n    if (key === 'user') {\n      const user = dialogOptions.user;\n      if (!user) {\n        continue;\n      }\n      if (user.name) {\n        encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n      }\n      if (user.email) {\n        encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n      }\n    } else {\n      encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n    }\n  }\n\n  return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n  const integrationsByName = {};\n\n  integrations.forEach((currentInstance) => {\n    const { name } = currentInstance;\n\n    const existingInstance = integrationsByName[name];\n\n    // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n    // default instance to overwrite an existing user instance\n    if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n      return;\n    }\n\n    integrationsByName[name] = currentInstance;\n  });\n\n  return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n  const defaultIntegrations = options.defaultIntegrations || [];\n  const userIntegrations = options.integrations;\n\n  // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n  defaultIntegrations.forEach((integration) => {\n    integration.isDefaultInstance = true;\n  });\n\n  let integrations;\n\n  if (Array.isArray(userIntegrations)) {\n    integrations = [...defaultIntegrations, ...userIntegrations];\n  } else if (typeof userIntegrations === 'function') {\n    const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n    integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n  } else {\n    integrations = defaultIntegrations;\n  }\n\n  const finalIntegrations = filterDuplicates(integrations);\n\n  // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n  // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n  // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n  // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n  const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n  if (debugIndex > -1) {\n    const [debugInstance] = finalIntegrations.splice(debugIndex, 1) ;\n    finalIntegrations.push(debugInstance);\n  }\n\n  return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n  const integrationIndex = {};\n\n  integrations.forEach(integration => {\n    // guard against empty provided integrations\n    if (integration) {\n      setupIntegration(client, integration, integrationIndex);\n    }\n  });\n\n  return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n  for (const integration of integrations) {\n    // guard against empty provided integrations\n    if (integration && integration.afterAllSetup) {\n      integration.afterAllSetup(client);\n    }\n  }\n}\n\n/** Setup a single integration.  */\nfunction setupIntegration(client, integration, integrationIndex) {\n  if (integrationIndex[integration.name]) {\n    DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n    return;\n  }\n  integrationIndex[integration.name] = integration;\n\n  // `setupOnce` is only called the first time\n  if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n    integration.setupOnce();\n    installedIntegrations.push(integration.name);\n  }\n\n  // `setup` is run for each client\n  if (integration.setup && typeof integration.setup === 'function') {\n    integration.setup(client);\n  }\n\n  if (typeof integration.preprocessEvent === 'function') {\n    const callback = integration.preprocessEvent.bind(integration) ;\n    client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n  }\n\n  if (typeof integration.processEvent === 'function') {\n    const callback = integration.processEvent.bind(integration) ;\n\n    const processor = Object.assign((event, hint) => callback(event, hint, client), {\n      id: integration.name,\n    });\n\n    client.addEventProcessor(processor);\n  }\n\n  DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n  const client = getClient();\n\n  if (!client) {\n    DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n    return;\n  }\n\n  client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n  return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n  discarded_events,\n  dsn,\n  timestamp,\n) {\n  const clientReportItem = [\n    { type: 'client_report' },\n    {\n      timestamp: timestamp || dateTimestampInSeconds(),\n      discarded_events,\n    },\n  ];\n  return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n  /** Display name of this error instance. */\n\n   constructor(\n     message,\n    logLevel = 'warn',\n  ) {\n    super(message);this.message = message;\n    this.name = new.target.prototype.constructor.name;\n    // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n    // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n    // instances of `SentryError` fail `obj instanceof SentryError` checks.\n    Object.setPrototypeOf(this, new.target.prototype);\n    this.logLevel = logLevel;\n  }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeOptions> {\n *   public constructor(options: NodeOptions) {\n *     super(options);\n *   }\n *\n *   // ...\n * }\n */\nclass BaseClient {\n  /** Options passed to the SDK. */\n\n  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n  /** Array of set up integrations. */\n\n  /** Number of calls being processed */\n\n  /** Holds flushable  */\n\n  // eslint-disable-next-line @typescript-eslint/ban-types\n\n  /**\n   * Initializes this client instance.\n   *\n   * @param options Options for the client.\n   */\n   constructor(options) {\n    this._options = options;\n    this._integrations = {};\n    this._numProcessing = 0;\n    this._outcomes = {};\n    this._hooks = {};\n    this._eventProcessors = [];\n\n    if (options.dsn) {\n      this._dsn = makeDsn(options.dsn);\n    } else {\n      DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n    }\n\n    if (this._dsn) {\n      const url = getEnvelopeEndpointWithUrlEncodedAuth(\n        this._dsn,\n        options.tunnel,\n        options._metadata ? options._metadata.sdk : undefined,\n      );\n      this._transport = options.transport({\n        tunnel: this._options.tunnel,\n        recordDroppedEvent: this.recordDroppedEvent.bind(this),\n        ...options.transportOptions,\n        url,\n      });\n    }\n\n    // TODO(v9): Remove this deprecation warning\n    const tracingOptions = ['enableTracing', 'tracesSampleRate', 'tracesSampler'] ;\n    const undefinedOption = tracingOptions.find(option => option in options && options[option] == undefined);\n    if (undefinedOption) {\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn(\n          `[Sentry] Deprecation warning: \\`${undefinedOption}\\` is set to undefined, which leads to tracing being enabled. In v9, a value of \\`undefined\\` will result in tracing being disabled.`,\n        );\n      });\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureException(exception, hint, scope) {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (checkOrSetAlreadyCaught(exception)) {\n      DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    this._process(\n      this.eventFromException(exception, hintWithEventId).then(event =>\n        this._captureEvent(event, hintWithEventId, scope),\n      ),\n    );\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureMessage(\n    message,\n    level,\n    hint,\n    currentScope,\n  ) {\n    const hintWithEventId = {\n      event_id: uuid4(),\n      ...hint,\n    };\n\n    const eventMessage = isParameterizedString(message) ? message : String(message);\n\n    const promisedEvent = isPrimitive(message)\n      ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n      : this.eventFromException(message, hintWithEventId);\n\n    this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureEvent(event, hint, currentScope) {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n      DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n    const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n\n    this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope));\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureSession(session) {\n    if (!(typeof session.release === 'string')) {\n      DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n    } else {\n      this.sendSession(session);\n      // After sending, we set init false to indicate it's not the first occurrence\n      updateSession(session, { init: false });\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getDsn() {\n    return this._dsn;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getOptions() {\n    return this._options;\n  }\n\n  /**\n   * @see SdkMetadata\n   *\n   * @return The metadata of the SDK\n   */\n   getSdkMetadata() {\n    return this._options._metadata;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getTransport() {\n    return this._transport;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   flush(timeout) {\n    const transport = this._transport;\n    if (transport) {\n      this.emit('flush');\n      return this._isClientDoneProcessing(timeout).then(clientFinished => {\n        return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n      });\n    } else {\n      return resolvedSyncPromise(true);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   close(timeout) {\n    return this.flush(timeout).then(result => {\n      this.getOptions().enabled = false;\n      this.emit('close');\n      return result;\n    });\n  }\n\n  /** Get all installed event processors. */\n   getEventProcessors() {\n    return this._eventProcessors;\n  }\n\n  /** @inheritDoc */\n   addEventProcessor(eventProcessor) {\n    this._eventProcessors.push(eventProcessor);\n  }\n\n  /** @inheritdoc */\n   init() {\n    if (\n      this._isEnabled() ||\n      // Force integrations to be setup even if no DSN was set when we have\n      // Spotlight enabled. This is particularly important for browser as we\n      // don't support the `spotlight` option there and rely on the users\n      // adding the `spotlightBrowserIntegration()` to their integrations which\n      // wouldn't get initialized with the check below when there's no DSN set.\n      this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n    ) {\n      this._setupIntegrations();\n    }\n  }\n\n  /**\n   * Gets an installed integration by its name.\n   *\n   * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n   */\n   getIntegrationByName(integrationName) {\n    return this._integrations[integrationName] ;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addIntegration(integration) {\n    const isAlreadyInstalled = this._integrations[integration.name];\n\n    // This hook takes care of only installing if not already installed\n    setupIntegration(this, integration, this._integrations);\n    // Here we need to check manually to make sure to not run this multiple times\n    if (!isAlreadyInstalled) {\n      afterSetupIntegrations(this, [integration]);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   sendEvent(event, hint = {}) {\n    this.emit('beforeSendEvent', event, hint);\n\n    let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n    for (const attachment of hint.attachments || []) {\n      env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n    }\n\n    const promise = this.sendEnvelope(env);\n    if (promise) {\n      promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   sendSession(session) {\n    const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(env);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   recordDroppedEvent(reason, category, eventOrCount) {\n    if (this._options.sendClientReports) {\n      // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload\n      // If event is passed as third argument, we assume this is a count of 1\n      const count = typeof eventOrCount === 'number' ? eventOrCount : 1;\n\n      // We want to track each category (error, transaction, session, replay_event) separately\n      // but still keep the distinction between different type of outcomes.\n      // We could use nested maps, but it's much easier to read and type this way.\n      // A correct type for map-based implementation if we want to go that route\n      // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n      // With typescript 4.1 we could even use template literal types\n      const key = `${reason}:${category}`;\n      DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n      this._outcomes[key] = (this._outcomes[key] || 0) + count;\n    }\n  }\n\n  // Keep on() & emit() signatures in sync with types' client.ts interface\n  /* eslint-disable @typescript-eslint/unified-signatures */\n\n  /** @inheritdoc */\n\n  /** @inheritdoc */\n   on(hook, callback) {\n    const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n    // @ts-expect-error We assume the types are correct\n    hooks.push(callback);\n\n    // This function returns a callback execution handler that, when invoked,\n    // deregisters a callback. This is crucial for managing instances where callbacks\n    // need to be unregistered to prevent self-referencing in callback closures,\n    // ensuring proper garbage collection.\n    return () => {\n      // @ts-expect-error We assume the types are correct\n      const cbIndex = hooks.indexOf(callback);\n      if (cbIndex > -1) {\n        hooks.splice(cbIndex, 1);\n      }\n    };\n  }\n\n  /** @inheritdoc */\n\n  /** @inheritdoc */\n   emit(hook, ...rest) {\n    const callbacks = this._hooks[hook];\n    if (callbacks) {\n      callbacks.forEach(callback => callback(...rest));\n    }\n  }\n\n  /**\n   * @inheritdoc\n   */\n   sendEnvelope(envelope) {\n    this.emit('beforeEnvelope', envelope);\n\n    if (this._isEnabled() && this._transport) {\n      return this._transport.send(envelope).then(null, reason => {\n        DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n        return reason;\n      });\n    }\n\n    DEBUG_BUILD && logger.error('Transport disabled');\n\n    return resolvedSyncPromise({});\n  }\n\n  /* eslint-enable @typescript-eslint/unified-signatures */\n\n  /** Setup integrations for this client. */\n   _setupIntegrations() {\n    const { integrations } = this._options;\n    this._integrations = setupIntegrations(this, integrations);\n    afterSetupIntegrations(this, integrations);\n  }\n\n  /** Updates existing session based on the provided event */\n   _updateSessionFromEvent(session, event) {\n    let crashed = false;\n    let errored = false;\n    const exceptions = event.exception && event.exception.values;\n\n    if (exceptions) {\n      errored = true;\n\n      for (const ex of exceptions) {\n        const mechanism = ex.mechanism;\n        if (mechanism && mechanism.handled === false) {\n          crashed = true;\n          break;\n        }\n      }\n    }\n\n    // A session is updated and that session update is sent in only one of the two following scenarios:\n    // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n    // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n    const sessionNonTerminal = session.status === 'ok';\n    const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n    if (shouldUpdateAndSend) {\n      updateSession(session, {\n        ...(crashed && { status: 'crashed' }),\n        errors: session.errors || Number(errored || crashed),\n      });\n      this.captureSession(session);\n    }\n  }\n\n  /**\n   * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n   * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n   *\n   * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n   * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n   * `true`.\n   * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n   * `false` otherwise\n   */\n   _isClientDoneProcessing(timeout) {\n    return new SyncPromise(resolve => {\n      let ticked = 0;\n      const tick = 1;\n\n      const interval = setInterval(() => {\n        if (this._numProcessing == 0) {\n          clearInterval(interval);\n          resolve(true);\n        } else {\n          ticked += tick;\n          if (timeout && ticked >= timeout) {\n            clearInterval(interval);\n            resolve(false);\n          }\n        }\n      }, tick);\n    });\n  }\n\n  /** Determines whether this SDK is enabled and a transport is present. */\n   _isEnabled() {\n    return this.getOptions().enabled !== false && this._transport !== undefined;\n  }\n\n  /**\n   * Adds common information to events.\n   *\n   * The information includes release and environment from `options`,\n   * breadcrumbs and context (extra, tags and user) from the scope.\n   *\n   * Information that is already present in the event is never overwritten. For\n   * nested objects, such as the context, keys are merged.\n   *\n   * @param event The original event.\n   * @param hint May contain additional information about the original exception.\n   * @param currentScope A scope containing event metadata.\n   * @returns A new event with more information.\n   */\n   _prepareEvent(\n    event,\n    hint,\n    currentScope = getCurrentScope(),\n    isolationScope = getIsolationScope(),\n  ) {\n    const options = this.getOptions();\n    const integrations = Object.keys(this._integrations);\n    if (!hint.integrations && integrations.length > 0) {\n      hint.integrations = integrations;\n    }\n\n    this.emit('preprocessEvent', event, hint);\n\n    if (!event.type) {\n      isolationScope.setLastEventId(event.event_id || hint.event_id);\n    }\n\n    return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n      if (evt === null) {\n        return evt;\n      }\n\n      evt.contexts = {\n        trace: getTraceContextFromScope(currentScope),\n        ...evt.contexts,\n      };\n\n      const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n      evt.sdkProcessingMetadata = {\n        dynamicSamplingContext,\n        ...evt.sdkProcessingMetadata,\n      };\n\n      return evt;\n    });\n  }\n\n  /**\n   * Processes the event and logs an error in case of rejection\n   * @param event\n   * @param hint\n   * @param scope\n   */\n   _captureEvent(event, hint = {}, scope) {\n    return this._processEvent(event, hint, scope).then(\n      finalEvent => {\n        return finalEvent.event_id;\n      },\n      reason => {\n        if (DEBUG_BUILD) {\n          // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n          // control flow, log just the message (no stack) as a log-level log.\n          const sentryError = reason ;\n          if (sentryError.logLevel === 'log') {\n            logger.log(sentryError.message);\n          } else {\n            logger.warn(sentryError);\n          }\n        }\n        return undefined;\n      },\n    );\n  }\n\n  /**\n   * Processes an event (either error or message) and sends it to Sentry.\n   *\n   * This also adds breadcrumbs and context information to the event. However,\n   * platform specific meta data (such as the User's IP address) must be added\n   * by the SDK implementor.\n   *\n   *\n   * @param event The event to send to Sentry.\n   * @param hint May contain additional information about the original exception.\n   * @param currentScope A scope containing event metadata.\n   * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n   */\n   _processEvent(event, hint, currentScope) {\n    const options = this.getOptions();\n    const { sampleRate } = options;\n\n    const isTransaction = isTransactionEvent(event);\n    const isError = isErrorEvent(event);\n    const eventType = event.type || 'error';\n    const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n    // 1.0 === 100% events are sent\n    // 0.0 === 0% events are sent\n    // Sampling for transaction happens somewhere else\n    const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n    if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n      this.recordDroppedEvent('sample_rate', 'error', event);\n      return rejectedSyncPromise(\n        new SentryError(\n          `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n          'log',\n        ),\n      );\n    }\n\n    const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n    const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n    return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope)\n      .then(prepared => {\n        if (prepared === null) {\n          this.recordDroppedEvent('event_processor', dataCategory, event);\n          throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n        }\n\n        const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n        if (isInternalException) {\n          return prepared;\n        }\n\n        const result = processBeforeSend(this, options, prepared, hint);\n        return _validateBeforeSendResult(result, beforeSendLabel);\n      })\n      .then(processedEvent => {\n        if (processedEvent === null) {\n          this.recordDroppedEvent('before_send', dataCategory, event);\n          if (isTransaction) {\n            const spans = event.spans || [];\n            // the transaction itself counts as one span, plus all the child spans that are added\n            const spanCount = 1 + spans.length;\n            this.recordDroppedEvent('before_send', 'span', spanCount);\n          }\n          throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n        }\n\n        const session = currentScope && currentScope.getSession();\n        if (!isTransaction && session) {\n          this._updateSessionFromEvent(session, processedEvent);\n        }\n\n        if (isTransaction) {\n          const spanCountBefore =\n            (processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing) ||\n            0;\n          const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n          const droppedSpanCount = spanCountBefore - spanCountAfter;\n          if (droppedSpanCount > 0) {\n            this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n          }\n        }\n\n        // None of the Sentry built event processor will update transaction name,\n        // so if the transaction name has been changed by an event processor, we know\n        // it has to come from custom event processor added by a user\n        const transactionInfo = processedEvent.transaction_info;\n        if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n          const source = 'custom';\n          processedEvent.transaction_info = {\n            ...transactionInfo,\n            source,\n          };\n        }\n\n        this.sendEvent(processedEvent, hint);\n        return processedEvent;\n      })\n      .then(null, reason => {\n        if (reason instanceof SentryError) {\n          throw reason;\n        }\n\n        this.captureException(reason, {\n          data: {\n            __sentry__: true,\n          },\n          originalException: reason,\n        });\n        throw new SentryError(\n          `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n        );\n      });\n  }\n\n  /**\n   * Occupies the client with processing and event\n   */\n   _process(promise) {\n    this._numProcessing++;\n    void promise.then(\n      value => {\n        this._numProcessing--;\n        return value;\n      },\n      reason => {\n        this._numProcessing--;\n        return reason;\n      },\n    );\n  }\n\n  /**\n   * Clears outcomes on this client and returns them.\n   */\n   _clearOutcomes() {\n    const outcomes = this._outcomes;\n    this._outcomes = {};\n    return Object.entries(outcomes).map(([key, quantity]) => {\n      const [reason, category] = key.split(':') ;\n      return {\n        reason,\n        category,\n        quantity,\n      };\n    });\n  }\n\n  /**\n   * Sends client reports as an envelope.\n   */\n   _flushOutcomes() {\n    DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n    const outcomes = this._clearOutcomes();\n\n    if (outcomes.length === 0) {\n      DEBUG_BUILD && logger.log('No outcomes to send');\n      return;\n    }\n\n    // This is really the only place where we want to check for a DSN and only send outcomes then\n    if (!this._dsn) {\n      DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n      return;\n    }\n\n    DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n    const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(envelope);\n  }\n\n  /**\n   * @inheritDoc\n   */\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n  beforeSendResult,\n  beforeSendLabel,\n) {\n  const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n  if (isThenable(beforeSendResult)) {\n    return beforeSendResult.then(\n      event => {\n        if (!isPlainObject(event) && event !== null) {\n          throw new SentryError(invalidValueError);\n        }\n        return event;\n      },\n      e => {\n        throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n      },\n    );\n  } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n    throw new SentryError(invalidValueError);\n  }\n  return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n  client,\n  options,\n  event,\n  hint,\n) {\n  const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n\n  if (isErrorEvent(event) && beforeSend) {\n    return beforeSend(event, hint);\n  }\n\n  if (isTransactionEvent(event)) {\n    if (event.spans && beforeSendSpan) {\n      const processedSpans = [];\n      for (const span of event.spans) {\n        const processedSpan = beforeSendSpan(span);\n        if (processedSpan) {\n          processedSpans.push(processedSpan);\n        } else {\n          showSpanDropWarning();\n          client.recordDroppedEvent('before_send', 'span');\n        }\n      }\n      event.spans = processedSpans;\n    }\n\n    if (beforeSendTransaction) {\n      if (event.spans) {\n        // We store the # of spans before processing in SDK metadata,\n        // so we can compare it afterwards to determine how many spans were dropped\n        const spanCountBefore = event.spans.length;\n        event.sdkProcessingMetadata = {\n          ...event.sdkProcessingMetadata,\n          spanCountBeforeProcessing: spanCountBefore,\n        };\n      }\n      return beforeSendTransaction(event, hint);\n    }\n  }\n\n  return event;\n}\n\nfunction isErrorEvent(event) {\n  return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n  return event.type === 'transaction';\n}\n\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n  clientClass,\n  options,\n) {\n  if (options.debug === true) {\n    if (DEBUG_BUILD) {\n      logger.enable();\n    } else {\n      // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n      });\n    }\n  }\n  const scope = getCurrentScope();\n  scope.update(options.initialScope);\n\n  const client = new clientClass(options);\n  setCurrentClient(client);\n  client.init();\n  return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n  getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n//# sourceMappingURL=sdk.js.map\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n  const buffer = [];\n\n  function isReady() {\n    return limit === undefined || buffer.length < limit;\n  }\n\n  /**\n   * Remove a promise from the queue.\n   *\n   * @param task Can be any PromiseLike<T>\n   * @returns Removed promise.\n   */\n  function remove(task) {\n    return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n  }\n\n  /**\n   * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n   *\n   * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n   *        PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n   *        functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n   *        requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n   *        limit check.\n   * @returns The original promise.\n   */\n  function add(taskProducer) {\n    if (!isReady()) {\n      return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n    }\n\n    // start the task and add its promise to the queue\n    const task = taskProducer();\n    if (buffer.indexOf(task) === -1) {\n      buffer.push(task);\n    }\n    void task\n      .then(() => remove(task))\n      // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n      // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n      // have promises, so TS has to polyfill when down-compiling.)\n      .then(null, () =>\n        remove(task).then(null, () => {\n          // We have to add another catch here because `remove()` starts a new promise chain.\n        }),\n      );\n    return task;\n  }\n\n  /**\n   * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n   *\n   * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n   * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n   * `true`.\n   * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n   * `false` otherwise\n   */\n  function drain(timeout) {\n    return new SyncPromise((resolve, reject) => {\n      let counter = buffer.length;\n\n      if (!counter) {\n        return resolve(true);\n      }\n\n      // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n      const capturedSetTimeout = setTimeout(() => {\n        if (timeout && timeout > 0) {\n          resolve(false);\n        }\n      }, timeout);\n\n      // if all promises resolve in time, cancel the timer and resolve to `true`\n      buffer.forEach(item => {\n        void resolvedSyncPromise(item).then(() => {\n          if (!--counter) {\n            clearTimeout(capturedSetTimeout);\n            resolve(true);\n          }\n        }, reject);\n      });\n    });\n  }\n\n  return {\n    $: buffer,\n    add,\n    drain,\n  };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n  const headerDelay = parseInt(`${header}`, 10);\n  if (!isNaN(headerDelay)) {\n    return headerDelay * 1000;\n  }\n\n  const headerDate = Date.parse(`${header}`);\n  if (!isNaN(headerDate)) {\n    return headerDate - now;\n  }\n\n  return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, dataCategory) {\n  return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n  return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n  limits,\n  { statusCode, headers },\n  now = Date.now(),\n) {\n  const updatedRateLimits = {\n    ...limits,\n  };\n\n  // \"The name is case-insensitive.\"\n  // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n  const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n  const retryAfterHeader = headers && headers['retry-after'];\n\n  if (rateLimitHeader) {\n    /**\n     * rate limit headers are of the form\n     *     <header>,<header>,..\n     * where each <header> is of the form\n     *     <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>\n     * where\n     *     <retry_after> is a delay in seconds\n     *     <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n     *         <category>;<category>;...\n     *     <scope> is what's being limited (org, project, or key) - ignored by SDK\n     *     <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n     *     <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n     *         Only present if rate limit applies to the metric_bucket data category.\n     */\n    for (const limit of rateLimitHeader.trim().split(',')) {\n      const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;\n      const headerDelay = parseInt(retryAfter, 10);\n      const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n      if (!categories) {\n        updatedRateLimits.all = now + delay;\n      } else {\n        for (const category of categories.split(';')) {\n          if (category === 'metric_bucket') {\n            // namespaces will be present when category === 'metric_bucket'\n            if (!namespaces || namespaces.split(';').includes('custom')) {\n              updatedRateLimits[category] = now + delay;\n            }\n          } else {\n            updatedRateLimits[category] = now + delay;\n          }\n        }\n      }\n    }\n  } else if (retryAfterHeader) {\n    updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n  } else if (statusCode === 429) {\n    updatedRateLimits.all = now + 60 * 1000;\n  }\n\n  return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n  options,\n  makeRequest,\n  buffer = makePromiseBuffer(\n    options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n  ),\n) {\n  let rateLimits = {};\n  const flush = (timeout) => buffer.drain(timeout);\n\n  function send(envelope) {\n    const filteredEnvelopeItems = [];\n\n    // Drop rate limited items from envelope\n    forEachEnvelopeItem(envelope, (item, type) => {\n      const dataCategory = envelopeItemTypeToDataCategory(type);\n      if (isRateLimited(rateLimits, dataCategory)) {\n        const event = getEventForEnvelopeItem(item, type);\n        options.recordDroppedEvent('ratelimit_backoff', dataCategory, event);\n      } else {\n        filteredEnvelopeItems.push(item);\n      }\n    });\n\n    // Skip sending if envelope is empty after filtering out rate limited events\n    if (filteredEnvelopeItems.length === 0) {\n      return resolvedSyncPromise({});\n    }\n\n    const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n    // Creates client report for each item in an envelope\n    const recordEnvelopeLoss = (reason) => {\n      forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n        const event = getEventForEnvelopeItem(item, type);\n        options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n      });\n    };\n\n    const requestTask = () =>\n      makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n        response => {\n          // We don't want to throw on NOK responses, but we want to at least log them\n          if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n            DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n          }\n\n          rateLimits = updateRateLimits(rateLimits, response);\n          return response;\n        },\n        error => {\n          recordEnvelopeLoss('network_error');\n          throw error;\n        },\n      );\n\n    return buffer.add(requestTask).then(\n      result => result,\n      error => {\n        if (error instanceof SentryError) {\n          DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n          recordEnvelopeLoss('queue_overflow');\n          return resolvedSyncPromise({});\n        } else {\n          throw error;\n        }\n      },\n    );\n  }\n\n  return {\n    send,\n    flush,\n  };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n  if (type !== 'event' && type !== 'transaction') {\n    return undefined;\n  }\n\n  return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n  const metadata = options._metadata || {};\n\n  if (!metadata.sdk) {\n    metadata.sdk = {\n      name: `sentry.javascript.${name}`,\n      packages: names.map(name => ({\n        name: `${source}:@sentry/${name}`,\n        version: SDK_VERSION,\n      })),\n      version: SDK_VERSION,\n    };\n  }\n\n  options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getClient, getCurrentScope } from '../currentScopes.js';\nimport { isEnabled } from '../exports.js';\nimport '../tracing/errors.js';\nimport '../utils-hoist/version.js';\nimport '../utils-hoist/debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport '../debug-build.js';\nimport '../utils-hoist/time.js';\nimport { getActiveSpan, spanToTraceHeader } from './spanUtils.js';\nimport { TRACEPARENT_REGEXP, generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope } from '../tracing/dynamicSamplingContext.js';\nimport { dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values to strings. These values can be used to propagate\n * a trace via our tracing Http headers or Html `<meta>` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nfunction getTraceData(options = {}) {\n  const client = getClient();\n  if (!isEnabled() || !client) {\n    return {};\n  }\n\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getTraceData) {\n    return acs.getTraceData(options);\n  }\n\n  const scope = getCurrentScope();\n  const span = options.span || getActiveSpan();\n  const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n  const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n  if (!isValidSentryTraceHeader) {\n    logger.warn('Invalid sentry-trace data. Cannot generate trace data');\n    return {};\n  }\n\n  return {\n    'sentry-trace': sentryTrace,\n    baggage,\n  };\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope) {\n  // TODO(v9): Use generateSpanId() instead of spanId\n  // eslint-disable-next-line deprecation/deprecation\n  const { traceId, sampled, spanId } = scope.getPropagationContext();\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\nexport { getTraceData };\n//# sourceMappingURL=traceData.js.map\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nfunction addBreadcrumb(breadcrumb, hint) {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n\n  if (!client) return;\n\n  const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n  if (maxBreadcrumbs <= 0) return;\n\n  const timestamp = dateTimestampInSeconds();\n  const mergedBreadcrumb = { timestamp, ...breadcrumb };\n  const finalBreadcrumb = beforeBreadcrumb\n    ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n    : mergedBreadcrumb;\n\n  if (finalBreadcrumb === null) return;\n\n  if (client.emit) {\n    client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n  }\n\n  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      originalFunctionToString = Function.prototype.toString;\n\n      // intrinsics (like Function.prototype) might be immutable in some environments\n      // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n      try {\n        Function.prototype.toString = function ( ...args) {\n          const originalFunction = getOriginalFunction(this);\n          const context =\n            SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;\n          return originalFunctionToString.apply(context, args);\n        };\n      } catch (e) {\n        // ignore errors here, just don't patch this\n      }\n    },\n    setup(client) {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n *   integrations: [\n *     functionToStringIntegration(),\n *   ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n//# sourceMappingURL=functiontostring.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n  /^Script error\\.?$/,\n  /^Javascript error: Script error\\.? on line 0$/,\n  /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n  /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n  \"undefined is not an object (evaluating 'a.L')\", // Random error that happens but not actionable or noticeable to end-users.\n  'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n  \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n  \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n  /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n];\n\n/** Options for the InboundFilters integration */\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options = {}) => {\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, _hint, client) {\n      const clientOptions = client.getOptions();\n      const mergedOptions = _mergeOptions(options, clientOptions);\n      return _shouldDropEvent(event, mergedOptions) ? null : event;\n    },\n  };\n}) ;\n\nconst inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n\nfunction _mergeOptions(\n  internalOptions = {},\n  clientOptions = {},\n) {\n  return {\n    allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n    denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n    ignoreErrors: [\n      ...(internalOptions.ignoreErrors || []),\n      ...(clientOptions.ignoreErrors || []),\n      ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n    ],\n    ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n    ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n  };\n}\n\nfunction _shouldDropEvent(event, options) {\n  if (options.ignoreInternal && _isSentryError(event)) {\n    DEBUG_BUILD &&\n      logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n    return true;\n  }\n  if (_isIgnoredError(event, options.ignoreErrors)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n      );\n    return true;\n  }\n  if (_isUselessError(event)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n          event,\n        )}`,\n      );\n    return true;\n  }\n  if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n      );\n    return true;\n  }\n  if (_isDeniedUrl(event, options.denyUrls)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n      );\n    return true;\n  }\n  if (!_isAllowedUrl(event, options.allowUrls)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n      );\n    return true;\n  }\n  return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n  // If event.type, this is not an error\n  if (event.type || !ignoreErrors || !ignoreErrors.length) {\n    return false;\n  }\n\n  return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n  if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n    return false;\n  }\n\n  const name = event.transaction;\n  return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n  // TODO: Use Glob instead?\n  if (!denyUrls || !denyUrls.length) {\n    return false;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n  // TODO: Use Glob instead?\n  if (!allowUrls || !allowUrls.length) {\n    return true;\n  }\n  const url = _getEventFilterUrl(event);\n  return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n  const possibleMessages = [];\n\n  if (event.message) {\n    possibleMessages.push(event.message);\n  }\n\n  let lastException;\n  try {\n    // @ts-expect-error Try catching to save bundle size\n    lastException = event.exception.values[event.exception.values.length - 1];\n  } catch (e) {\n    // try catching to save bundle size checking existence of variables\n  }\n\n  if (lastException) {\n    if (lastException.value) {\n      possibleMessages.push(lastException.value);\n      if (lastException.type) {\n        possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n      }\n    }\n  }\n\n  return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n  try {\n    // @ts-expect-error can't be a sentry error if undefined\n    return event.exception.values[0].type === 'SentryError';\n  } catch (e) {\n    // ignore\n  }\n  return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n  for (let i = frames.length - 1; i >= 0; i--) {\n    const frame = frames[i];\n\n    if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n      return frame.filename || null;\n    }\n  }\n\n  return null;\n}\n\nfunction _getEventFilterUrl(event) {\n  try {\n    let frames;\n    try {\n      // @ts-expect-error we only care about frames if the whole thing here is defined\n      frames = event.exception.values[0].stacktrace.frames;\n    } catch (e) {\n      // ignore\n    }\n    return frames ? _getLastValidUrl(frames) : null;\n  } catch (oO) {\n    DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n    return null;\n  }\n}\n\nfunction _isUselessError(event) {\n  if (event.type) {\n    // event is not an error\n    return false;\n  }\n\n  // We only want to consider events for dropping that actually have recorded exception values.\n  if (!event.exception || !event.exception.values || event.exception.values.length === 0) {\n    return false;\n  }\n\n  return (\n    // No top-level message\n    !event.message &&\n    // There are no exception values that have a stacktrace, a non-generic-Error type or value\n    !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n  );\n}\n\nexport { inboundFiltersIntegration };\n//# sourceMappingURL=inboundfilters.js.map\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n  exceptionFromErrorImplementation,\n  parser,\n  maxValueLimit = 250,\n  key,\n  limit,\n  event,\n  hint,\n) {\n  if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n    return;\n  }\n\n  // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n  const originalException =\n    event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n  // We only create exception grouping if there is an exception in the event.\n  if (originalException) {\n    event.exception.values = truncateAggregateExceptions(\n      aggregateExceptionsFromError(\n        exceptionFromErrorImplementation,\n        parser,\n        limit,\n        hint.originalException ,\n        key,\n        event.exception.values,\n        originalException,\n        0,\n      ),\n      maxValueLimit,\n    );\n  }\n}\n\nfunction aggregateExceptionsFromError(\n  exceptionFromErrorImplementation,\n  parser,\n  limit,\n  error,\n  key,\n  prevExceptions,\n  exception,\n  exceptionId,\n) {\n  if (prevExceptions.length >= limit + 1) {\n    return prevExceptions;\n  }\n\n  let newExceptions = [...prevExceptions];\n\n  // Recursively call this function in order to walk down a chain of errors\n  if (isInstanceOf(error[key], Error)) {\n    applyExceptionGroupFieldsForParentException(exception, exceptionId);\n    const newException = exceptionFromErrorImplementation(parser, error[key]);\n    const newExceptionId = newExceptions.length;\n    applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n    newExceptions = aggregateExceptionsFromError(\n      exceptionFromErrorImplementation,\n      parser,\n      limit,\n      error[key],\n      key,\n      [newException, ...newExceptions],\n      newException,\n      newExceptionId,\n    );\n  }\n\n  // This will create exception grouping for AggregateErrors\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n  if (Array.isArray(error.errors)) {\n    error.errors.forEach((childError, i) => {\n      if (isInstanceOf(childError, Error)) {\n        applyExceptionGroupFieldsForParentException(exception, exceptionId);\n        const newException = exceptionFromErrorImplementation(parser, childError);\n        const newExceptionId = newExceptions.length;\n        applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n        newExceptions = aggregateExceptionsFromError(\n          exceptionFromErrorImplementation,\n          parser,\n          limit,\n          childError,\n          key,\n          [newException, ...newExceptions],\n          newException,\n          newExceptionId,\n        );\n      }\n    });\n  }\n\n  return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n  // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n  exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n  exception.mechanism = {\n    ...exception.mechanism,\n    ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n    exception_id: exceptionId,\n  };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n  exception,\n  source,\n  exceptionId,\n  parentId,\n) {\n  // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n  exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n  exception.mechanism = {\n    ...exception.mechanism,\n    type: 'chained',\n    source,\n    exception_id: exceptionId,\n    parent_id: parentId,\n  };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n  return exceptions.map(exception => {\n    if (exception.value) {\n      exception.value = truncate(exception.value, maxValueLength);\n    }\n    return exception;\n  });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n  if (!url) {\n    return {};\n  }\n\n  const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n  if (!match) {\n    return {};\n  }\n\n  // coerce to undefined values to empty string so we don't get 'undefined'\n  const query = match[6] || '';\n  const fragment = match[8] || '';\n  return {\n    host: match[4],\n    path: match[5],\n    protocol: match[2],\n    search: query,\n    hash: fragment,\n    relative: match[5] + query + fragment, // everything minus origin\n  };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n  return (urlPath.split(/[?#]/, 1) )[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n *\n * @deprecated This function will be removed in the next major version.\n */\n// TODO(v9): Hoist this function into the places where we use it. (as it stands only react router v6 instrumentation)\nfunction getNumberOfUrlSegments(url) {\n  // split at '/' or at '\\/' to split regex urls correctly\n  return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n  const { protocol, host, path } = url;\n\n  const filteredHost =\n    (host &&\n      host\n        // Always filter out authority\n        .replace(/^.*@/, '[filtered]:[filtered]@')\n        // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n        // TODO: Use new URL global if it exists\n        .replace(/(:80)$/, '')\n        .replace(/(:443)$/, '')) ||\n    '';\n\n  return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n  const type = 'console';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole() {\n  if (!('console' in GLOBAL_OBJ)) {\n    return;\n  }\n\n  CONSOLE_LEVELS.forEach(function (level) {\n    if (!(level in GLOBAL_OBJ.console)) {\n      return;\n    }\n\n    fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n      originalConsoleMethods[level] = originalConsoleMethod;\n\n      return function (...args) {\n        const handlerData = { args, level };\n        triggerHandlers('console', handlerData);\n\n        const log = originalConsoleMethods[level];\n        log && log.apply(GLOBAL_OBJ.console, args);\n      };\n    });\n  });\n}\n\nexport { addConsoleInstrumentationHandler };\n//# sourceMappingURL=console.js.map\n","/**\n * @deprecated This variable has been deprecated and will be removed in the next major version.\n */\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n  return (\n    level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n  ) ;\n}\n\nexport { severityLevelFromString, validSeverityLevels };\n//# sourceMappingURL=severity.js.map\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n  let previousEvent;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(currentEvent) {\n      // We want to ignore any non-error type events, e.g. transactions or replays\n      // These should never be deduped, and also not be compared against as _previousEvent.\n      if (currentEvent.type) {\n        return currentEvent;\n      }\n\n      // Juuust in case something goes wrong\n      try {\n        if (_shouldDropEvent(currentEvent, previousEvent)) {\n          DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n          return null;\n        }\n      } catch (_oO) {} // eslint-disable-line no-empty\n\n      return (previousEvent = currentEvent);\n    },\n  };\n}) ;\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n  if (!previousEvent) {\n    return false;\n  }\n\n  if (_isSameMessageEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n  const currentMessage = currentEvent.message;\n  const previousMessage = previousEvent.message;\n\n  // If neither event has a message property, they were both exceptions, so bail out\n  if (!currentMessage && !previousMessage) {\n    return false;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n    return false;\n  }\n\n  if (currentMessage !== previousMessage) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n  const previousException = _getExceptionFromEvent(previousEvent);\n  const currentException = _getExceptionFromEvent(currentEvent);\n\n  if (!previousException || !currentException) {\n    return false;\n  }\n\n  if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n    return false;\n  }\n\n  if (!_isSameFingerprint(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  if (!_isSameStacktrace(currentEvent, previousEvent)) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n  let currentFrames = getFramesFromEvent(currentEvent);\n  let previousFrames = getFramesFromEvent(previousEvent);\n\n  // If neither event has a stacktrace, they are assumed to be the same\n  if (!currentFrames && !previousFrames) {\n    return true;\n  }\n\n  // If only one event has a stacktrace, but not the other one, they are not the same\n  if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n    return false;\n  }\n\n  currentFrames = currentFrames ;\n  previousFrames = previousFrames ;\n\n  // If number of frames differ, they are not the same\n  if (previousFrames.length !== currentFrames.length) {\n    return false;\n  }\n\n  // Otherwise, compare the two\n  for (let i = 0; i < previousFrames.length; i++) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameA = previousFrames[i];\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameB = currentFrames[i];\n\n    if (\n      frameA.filename !== frameB.filename ||\n      frameA.lineno !== frameB.lineno ||\n      frameA.colno !== frameB.colno ||\n      frameA.function !== frameB.function\n    ) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n  let currentFingerprint = currentEvent.fingerprint;\n  let previousFingerprint = previousEvent.fingerprint;\n\n  // If neither event has a fingerprint, they are assumed to be the same\n  if (!currentFingerprint && !previousFingerprint) {\n    return true;\n  }\n\n  // If only one event has a fingerprint, but not the other one, they are not the same\n  if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n    return false;\n  }\n\n  currentFingerprint = currentFingerprint ;\n  previousFingerprint = previousFingerprint ;\n\n  // Otherwise, compare the two\n  try {\n    return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n  } catch (_oO) {\n    return false;\n  }\n}\n\nfunction _getExceptionFromEvent(event) {\n  return event.exception && event.exception.values && event.exception.values[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n//# sourceMappingURL=dedupe.js.map\n","import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from './semanticAttributes.js';\nimport './tracing/errors.js';\nimport { isInstanceOf } from './utils-hoist/is.js';\nimport './utils-hoist/version.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport './utils-hoist/time.js';\nimport './utils-hoist/syncpromise.js';\nimport { parseUrl } from './utils-hoist/url.js';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage.js';\nimport './debug-build.js';\nimport { hasTracingEnabled } from './utils/hasTracingEnabled.js';\nimport { getActiveSpan } from './utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js';\nimport { setHttpStatus, SPAN_STATUS_ERROR } from './tracing/spanstatus.js';\nimport { startInactiveSpan } from './tracing/trace.js';\nimport { getTraceData } from './utils/traceData.js';\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n  handlerData,\n  shouldCreateSpan,\n  shouldAttachHeaders,\n  spans,\n  spanOrigin = 'auto.http.browser',\n) {\n  if (!handlerData.fetchData) {\n    return undefined;\n  }\n\n  const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url);\n\n  if (handlerData.endTimestamp && shouldCreateSpanResult) {\n    const spanId = handlerData.fetchData.__span;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n    if (span) {\n      endSpan(span, handlerData);\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n    return undefined;\n  }\n\n  const { method, url } = handlerData.fetchData;\n\n  const fullUrl = getFullURL(url);\n  const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n  const hasParent = !!getActiveSpan();\n\n  const span =\n    shouldCreateSpanResult && hasParent\n      ? startInactiveSpan({\n          name: `${method} ${url}`,\n          attributes: {\n            url,\n            type: 'fetch',\n            'http.method': method,\n            'http.url': fullUrl,\n            'server.address': host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  handlerData.fetchData.__span = span.spanContext().spanId;\n  spans[span.spanContext().spanId] = span;\n\n  if (shouldAttachHeaders(handlerData.fetchData.url)) {\n    const request = handlerData.args[0];\n\n    const options = handlerData.args[1] || {};\n\n    const headers = _addTracingHeadersToFetchRequest(\n      request,\n      options,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasTracingEnabled() && hasParent ? span : undefined,\n    );\n    if (headers) {\n      // Ensure this is actually set, if no options have been passed previously\n      handlerData.args[1] = options;\n      options.headers = headers;\n    }\n  }\n\n  return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n */\nfunction _addTracingHeadersToFetchRequest(\n  request,\n  fetchOptionsObj\n\n,\n  span,\n) {\n  const traceHeaders = getTraceData({ span });\n  const sentryTrace = traceHeaders['sentry-trace'];\n  const baggage = traceHeaders.baggage;\n\n  // Nothing to do, when we return undefined here, the original headers will be used\n  if (!sentryTrace) {\n    return undefined;\n  }\n\n  const headers = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n  if (!headers) {\n    return { ...traceHeaders };\n  } else if (isHeaders(headers)) {\n    const newHeaders = new Headers(headers);\n    newHeaders.set('sentry-trace', sentryTrace);\n\n    if (baggage) {\n      const prevBaggageHeader = newHeaders.get('baggage');\n      if (prevBaggageHeader) {\n        const prevHeaderStrippedFromSentryBaggage = stripBaggageHeaderOfSentryBaggageValues(prevBaggageHeader);\n        newHeaders.set(\n          'baggage',\n          // If there are non-sentry entries (i.e. if the stripped string is non-empty/truthy) combine the stripped header and sentry baggage header\n          // otherwise just set the sentry baggage header\n          prevHeaderStrippedFromSentryBaggage ? `${prevHeaderStrippedFromSentryBaggage},${baggage}` : baggage,\n        );\n      } else {\n        newHeaders.set('baggage', baggage);\n      }\n    }\n\n    return newHeaders;\n  } else if (Array.isArray(headers)) {\n    const newHeaders = [\n      ...headers\n        // Remove any existing sentry-trace headers\n        .filter(header => {\n          return !(Array.isArray(header) && header[0] === 'sentry-trace');\n        })\n        // Get rid of previous sentry baggage values in baggage header\n        .map(header => {\n          if (Array.isArray(header) && header[0] === 'baggage' && typeof header[1] === 'string') {\n            const [headerName, headerValue, ...rest] = header;\n            return [headerName, stripBaggageHeaderOfSentryBaggageValues(headerValue), ...rest];\n          } else {\n            return header;\n          }\n        }),\n      // Attach the new sentry-trace header\n      ['sentry-trace', sentryTrace],\n    ];\n\n    if (baggage) {\n      // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n      // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n      newHeaders.push(['baggage', baggage]);\n    }\n\n    return newHeaders ;\n  } else {\n    const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n    let newBaggageHeaders = [];\n\n    if (Array.isArray(existingBaggageHeader)) {\n      newBaggageHeaders = existingBaggageHeader\n        .map(headerItem =>\n          typeof headerItem === 'string' ? stripBaggageHeaderOfSentryBaggageValues(headerItem) : headerItem,\n        )\n        .filter(headerItem => headerItem === '');\n    } else if (existingBaggageHeader) {\n      newBaggageHeaders.push(stripBaggageHeaderOfSentryBaggageValues(existingBaggageHeader));\n    }\n\n    if (baggage) {\n      newBaggageHeaders.push(baggage);\n    }\n\n    return {\n      ...(headers ),\n      'sentry-trace': sentryTrace,\n      baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n    };\n  }\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n *\n * @deprecated This function will not be exported anymore in v9.\n */\nfunction addTracingHeadersToFetchRequest(\n  request,\n  _client,\n  _scope,\n  fetchOptionsObj\n\n,\n  span,\n) {\n  return _addTracingHeadersToFetchRequest(request , fetchOptionsObj, span);\n}\n\nfunction getFullURL(url) {\n  try {\n    const parsed = new URL(url);\n    return parsed.href;\n  } catch (e) {\n    return undefined;\n  }\n}\n\nfunction endSpan(span, handlerData) {\n  if (handlerData.response) {\n    setHttpStatus(span, handlerData.response.status);\n\n    const contentLength =\n      handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n    if (contentLength) {\n      const contentLengthNum = parseInt(contentLength);\n      if (contentLengthNum > 0) {\n        span.setAttribute('http.response_content_length', contentLengthNum);\n      }\n    }\n  } else if (handlerData.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n  }\n  span.end();\n}\n\nfunction stripBaggageHeaderOfSentryBaggageValues(baggageHeader) {\n  return (\n    baggageHeader\n      .split(',')\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      .filter(baggageEntry => !baggageEntry.split('=')[0].startsWith(SENTRY_BAGGAGE_KEY_PREFIX))\n      .join(',')\n  );\n}\n\nfunction isRequest(request) {\n  return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n\nfunction isHeaders(headers) {\n  return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\nexport { addTracingHeadersToFetchRequest, instrumentFetchRequest };\n//# sourceMappingURL=fetch.js.map\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n  // NOTE: undefined defaults to 'info' in Sentry\n  if (statusCode === undefined) {\n    return undefined;\n  } else if (statusCode >= 400 && statusCode < 500) {\n    return 'warning';\n  } else if (statusCode >= 500) {\n    return 'error';\n  } else {\n    return undefined;\n  }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n//# sourceMappingURL=breadcrumb-log-level.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n  try {\n    new ErrorEvent('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n  try {\n    // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n    // 1 argument required, but only 0 present.\n    // @ts-expect-error It really needs 1 argument, not 0.\n    new DOMError('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n  try {\n    new DOMException('');\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n  if (!('fetch' in WINDOW)) {\n    return false;\n  }\n\n  try {\n    new Headers();\n    new Request('http://www.example.com');\n    new Response();\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n  return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n  if (typeof EdgeRuntime === 'string') {\n    return true;\n  }\n\n  if (!supportsFetch()) {\n    return false;\n  }\n\n  // Fast path to avoid DOM I/O\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  if (isNativeFunction(WINDOW.fetch)) {\n    return true;\n  }\n\n  // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n  // so create a \"pure\" iframe to see if that has native fetch\n  let result = false;\n  const doc = WINDOW.document;\n  // eslint-disable-next-line deprecation/deprecation\n  if (doc && typeof (doc.createElement ) === 'function') {\n    try {\n      const sandbox = doc.createElement('iframe');\n      sandbox.hidden = true;\n      doc.head.appendChild(sandbox);\n      if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n        // eslint-disable-next-line @typescript-eslint/unbound-method\n        result = isNativeFunction(sandbox.contentWindow.fetch);\n      }\n      doc.head.removeChild(sandbox);\n    } catch (err) {\n      DEBUG_BUILD &&\n        logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n  return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n  // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n  // (see https://caniuse.com/#feat=referrer-policy),\n  // it doesn't. And it throws an exception instead of ignoring this parameter...\n  // REF: https://github.com/getsentry/raven-js/issues/1233\n\n  if (!supportsFetch()) {\n    return false;\n  }\n\n  try {\n    new Request('_', {\n      referrerPolicy: 'origin' ,\n    });\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(\n  handler,\n  skipNativeFetchCheck,\n) {\n  const type = 'fetch';\n  addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n  const type = 'fetch-body-resolved';\n  addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n  if (skipNativeFetchCheck && !supportsNativeFetch()) {\n    return;\n  }\n\n  fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n    return function (...args) {\n      // We capture the error right here and not in the Promise error callback because Safari (and probably other\n      // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your fetch call did not\n      //       have a stack trace, so the SDK backfilled the stack trace so\n      //       you can see which fetch call failed.\n      const virtualError = new Error();\n\n      const { method, url } = parseFetchArgs(args);\n      const handlerData = {\n        args,\n        fetchData: {\n          method,\n          url,\n        },\n        startTimestamp: timestampInSeconds() * 1000,\n        // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n        virtualError,\n      };\n\n      // if there is no callback, fetch is instrumented directly\n      if (!onFetchResolved) {\n        triggerHandlers('fetch', {\n          ...handlerData,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      return originalFetch.apply(GLOBAL_OBJ, args).then(\n        async (response) => {\n          if (onFetchResolved) {\n            onFetchResolved(response);\n          } else {\n            triggerHandlers('fetch', {\n              ...handlerData,\n              endTimestamp: timestampInSeconds() * 1000,\n              response,\n            });\n          }\n\n          return response;\n        },\n        (error) => {\n          triggerHandlers('fetch', {\n            ...handlerData,\n            endTimestamp: timestampInSeconds() * 1000,\n            error,\n          });\n\n          if (isError(error) && error.stack === undefined) {\n            // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n            //       it means the error, that was caused by your fetch call did not\n            //       have a stack trace, so the SDK backfilled the stack trace so\n            //       you can see which fetch call failed.\n            error.stack = virtualError.stack;\n            addNonEnumerableProperty(error, 'framesToPop', 1);\n          }\n\n          // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n          //       it means the sentry.javascript SDK caught an error invoking your application code.\n          //       This is expected behavior and NOT indicative of a bug with sentry.javascript.\n          throw error;\n        },\n      );\n    };\n  });\n}\n\nasync function resolveResponse(res, onFinishedResolving) {\n  if (res && res.body) {\n    const body = res.body;\n    const responseReader = body.getReader();\n\n    // Define a maximum duration after which we just cancel\n    const maxFetchDurationTimeout = setTimeout(\n      () => {\n        body.cancel().then(null, () => {\n          // noop\n        });\n      },\n      90 * 1000, // 90s\n    );\n\n    let readingActive = true;\n    while (readingActive) {\n      let chunkTimeout;\n      try {\n        // abort reading if read op takes more than 5s\n        chunkTimeout = setTimeout(() => {\n          body.cancel().then(null, () => {\n            // noop on error\n          });\n        }, 5000);\n\n        // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n        const { done } = await responseReader.read();\n\n        clearTimeout(chunkTimeout);\n\n        if (done) {\n          onFinishedResolving();\n          readingActive = false;\n        }\n      } catch (error) {\n        readingActive = false;\n      } finally {\n        clearTimeout(chunkTimeout);\n      }\n    }\n\n    clearTimeout(maxFetchDurationTimeout);\n\n    responseReader.releaseLock();\n    body.cancel().then(null, () => {\n      // noop on error\n    });\n  }\n}\n\nfunction streamHandler(response) {\n  // clone response for awaiting stream\n  let clonedResponseForResolving;\n  try {\n    clonedResponseForResolving = response.clone();\n  } catch (e) {\n    return;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  resolveResponse(clonedResponseForResolving, () => {\n    triggerHandlers('fetch-body-resolved', {\n      endTimestamp: timestampInSeconds() * 1000,\n      response,\n    });\n  });\n}\n\nfunction hasProp(obj, prop) {\n  return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n  if (typeof resource === 'string') {\n    return resource;\n  }\n\n  if (!resource) {\n    return '';\n  }\n\n  if (hasProp(resource, 'url')) {\n    return resource.url;\n  }\n\n  if (resource.toString) {\n    return resource.toString();\n  }\n\n  return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n  if (fetchArgs.length === 0) {\n    return { method: 'GET', url: '' };\n  }\n\n  if (fetchArgs.length === 2) {\n    const [url, options] = fetchArgs ;\n\n    return {\n      url: getUrlFromResource(url),\n      method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n    };\n  }\n\n  const arg = fetchArgs[0];\n  return {\n    url: getUrlFromResource(arg ),\n    method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n  };\n}\n\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser.  We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n  return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n  // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n  /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n  // NOTE: in Chrome App environment, touching history.pushState, *even inside\n  //       a try/catch block*, will cause Chrome to output an error to console.error\n  // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n  // TODO(v9): Remove this custom check, it is pretty old and likely not needed anymore\n  const chromeVar = (WINDOW ).chrome;\n  const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\n  const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n  return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n//# sourceMappingURL=supportsHistory.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n  return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n  // onerror should trigger before setTimeout\n  ignoreOnError++;\n  setTimeout(() => {\n    ignoreOnError--;\n  });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n  fn,\n  options\n\n = {},\n) {\n  // for future readers what this does is wrap a function and then create\n  // a bi-directional wrapping between them.\n  //\n  // example: wrapped = wrap(original);\n  //  original.__sentry_wrapped__ -> wrapped\n  //  wrapped.__sentry_original__ -> original\n\n  function isFunction(fn) {\n    return typeof fn === 'function';\n  }\n\n  if (!isFunction(fn)) {\n    return fn;\n  }\n\n  try {\n    // if we're dealing with a function that was previously wrapped, return\n    // the original wrapper.\n    const wrapper = (fn ).__sentry_wrapped__;\n    if (wrapper) {\n      if (typeof wrapper === 'function') {\n        return wrapper;\n      } else {\n        // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n        // that something messed with it. In that case we want to return the originally passed function.\n        return fn;\n      }\n    }\n\n    // We don't wanna wrap it twice\n    if (getOriginalFunction(fn)) {\n      return fn;\n    }\n  } catch (e) {\n    // Just accessing custom props in some Selenium environments\n    // can cause a \"Permission denied\" exception (see raven-js#495).\n    // Bail on wrapping and return the function as-is (defers to window.onerror).\n    return fn;\n  }\n\n  // Wrap the function itself\n  // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n  const sentryWrapped = function ( ...args) {\n    try {\n      // Also wrap arguments that are themselves functions\n      const wrappedArguments = args.map(arg => wrap(arg, options));\n\n      // Attempt to invoke user-land function\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n      //       means the sentry.javascript SDK caught an error invoking your application code. This\n      //       is expected behavior and NOT indicative of a bug with sentry.javascript.\n      return fn.apply(this, wrappedArguments);\n    } catch (ex) {\n      ignoreNextOnError();\n\n      withScope(scope => {\n        scope.addEventProcessor(event => {\n          if (options.mechanism) {\n            addExceptionTypeValue(event, undefined, undefined);\n            addExceptionMechanism(event, options.mechanism);\n          }\n\n          event.extra = {\n            ...event.extra,\n            arguments: args,\n          };\n\n          return event;\n        });\n\n        captureException(ex);\n      });\n\n      throw ex;\n    }\n  } ;\n\n  // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n  try {\n    for (const property in fn) {\n      if (Object.prototype.hasOwnProperty.call(fn, property)) {\n        sentryWrapped[property ] = fn[property ];\n      }\n    }\n  } catch (e2) {\n    // Accessing some objects may throw\n    // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n  }\n\n  // Signal that this function has been wrapped/filled already\n  // for both debugging and to prevent it to being wrapped/filled twice\n  markFunctionWrapped(sentryWrapped, fn);\n\n  addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n  // Restore original function name (not all browsers allow that)\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n    if (descriptor.configurable) {\n      Object.defineProperty(sentryWrapped, 'name', {\n        get() {\n          return fn.name;\n        },\n      });\n    }\n  } catch (e3) {\n    // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n    // to save some bytes we simply try-catch this\n  }\n\n  return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n  // Get the frames first since Opera can lose the stack if we touch anything else first\n  const frames = parseStackFrames(stackParser, ex);\n\n  const exception = {\n    type: extractType(ex),\n    value: extractMessage(ex),\n  };\n\n  if (frames.length) {\n    exception.stacktrace = { frames };\n  }\n\n  if (exception.type === undefined && exception.value === '') {\n    exception.value = 'Unrecoverable error caught';\n  }\n\n  return exception;\n}\n\nfunction eventFromPlainObject(\n  stackParser,\n  exception,\n  syntheticException,\n  isUnhandledRejection,\n) {\n  const client = getClient();\n  const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n  // If we can, we extract an exception from the object properties\n  const errorFromProp = getErrorPropertyFromObject(exception);\n\n  const extra = {\n    __serialized__: normalizeToSize(exception, normalizeDepth),\n  };\n\n  if (errorFromProp) {\n    return {\n      exception: {\n        values: [exceptionFromError(stackParser, errorFromProp)],\n      },\n      extra,\n    };\n  }\n\n  const event = {\n    exception: {\n      values: [\n        {\n          type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n          value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n        } ,\n      ],\n    },\n    extra,\n  } ;\n\n  if (syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      // event.exception.values[0] has been set above\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      event.exception.values[0].stacktrace = { frames };\n    }\n  }\n\n  return event;\n}\n\nfunction eventFromError(stackParser, ex) {\n  return {\n    exception: {\n      values: [exceptionFromError(stackParser, ex)],\n    },\n  };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n  stackParser,\n  ex,\n) {\n  // Access and store the stacktrace property before doing ANYTHING\n  // else to it because Opera is not very good at providing it\n  // reliably in other circumstances.\n  const stacktrace = ex.stacktrace || ex.stack || '';\n\n  const skipLines = getSkipFirstStackStringLines(ex);\n  const framesToPop = getPopFirstTopFrames(ex);\n\n  try {\n    return stackParser(stacktrace, skipLines, framesToPop);\n  } catch (e) {\n    // no-empty\n  }\n\n  return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n  if (ex && reactMinifiedRegexp.test(ex.message)) {\n    return 1;\n  }\n\n  return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n  if (typeof ex.framesToPop === 'number') {\n    return ex.framesToPop;\n  }\n\n  return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n  // Check for support\n  // @ts-expect-error - WebAssembly.Exception is a valid class\n  if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n    // @ts-expect-error - WebAssembly.Exception is a valid class\n    return exception instanceof WebAssembly.Exception;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n  const name = ex && ex.name;\n\n  // The name for WebAssembly.Exception Errors needs to be extracted differently.\n  // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n  if (!name && isWebAssemblyException(ex)) {\n    // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n    return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n  }\n\n  return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n  const message = ex && ex.message;\n\n  if (!message) {\n    return 'No error message';\n  }\n\n  if (message.error && typeof message.error.message === 'string') {\n    return message.error.message;\n  }\n\n  // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n  if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {\n    return ex.message[1];\n  }\n\n  return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n  stackParser,\n  exception,\n  hint,\n  attachStacktrace,\n) {\n  const syntheticException = (hint && hint.syntheticException) || undefined;\n  const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n  addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n  event.level = 'error';\n  if (hint && hint.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n  stackParser,\n  message,\n  level = 'info',\n  hint,\n  attachStacktrace,\n) {\n  const syntheticException = (hint && hint.syntheticException) || undefined;\n  const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n  event.level = level;\n  if (hint && hint.event_id) {\n    event.event_id = hint.event_id;\n  }\n  return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n  stackParser,\n  exception,\n  syntheticException,\n  attachStacktrace,\n  isUnhandledRejection,\n) {\n  let event;\n\n  if (isErrorEvent(exception ) && (exception ).error) {\n    // If it is an ErrorEvent with `error` property, extract it to get actual Error\n    const errorEvent = exception ;\n    return eventFromError(stackParser, errorEvent.error );\n  }\n\n  // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n  // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n  // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n  //\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n  // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n  // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n  if (isDOMError(exception) || isDOMException(exception )) {\n    const domException = exception ;\n\n    if ('stack' in (exception )) {\n      event = eventFromError(stackParser, exception );\n    } else {\n      const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n      const message = domException.message ? `${name}: ${domException.message}` : name;\n      event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n      addExceptionTypeValue(event, message);\n    }\n    if ('code' in domException) {\n      // eslint-disable-next-line deprecation/deprecation\n      event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n    }\n\n    return event;\n  }\n  if (isError(exception)) {\n    // we have a real Error object, do nothing\n    return eventFromError(stackParser, exception);\n  }\n  if (isPlainObject(exception) || isEvent(exception)) {\n    // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n    // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n    // group on any key/value change.\n    const objectException = exception ;\n    event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n    addExceptionMechanism(event, {\n      synthetic: true,\n    });\n    return event;\n  }\n\n  // If none of previous checks were valid, then it means that it's not:\n  // - an instance of DOMError\n  // - an instance of DOMException\n  // - an instance of Event\n  // - an instance of Error\n  // - a valid ErrorEvent (one with an error property)\n  // - a plain Object\n  //\n  // So bail out and capture it as a simple message:\n  event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n  addExceptionTypeValue(event, `${exception}`, undefined);\n  addExceptionMechanism(event, {\n    synthetic: true,\n  });\n\n  return event;\n}\n\nfunction eventFromString(\n  stackParser,\n  message,\n  syntheticException,\n  attachStacktrace,\n) {\n  const event = {};\n\n  if (attachStacktrace && syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [{ value: message, stacktrace: { frames } }],\n      };\n    }\n    addExceptionMechanism(event, { synthetic: true });\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n  exception,\n  { isUnhandledRejection },\n) {\n  const keys = extractExceptionKeysForMessage(exception);\n  const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n  // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n  // We still want to try to get a decent message for these cases\n  if (isErrorEvent(exception)) {\n    return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n  }\n\n  if (isEvent(exception)) {\n    const className = getObjectClassName(exception);\n    return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n  }\n\n  return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n  try {\n    const prototype = Object.getPrototypeOf(obj);\n    return prototype ? prototype.constructor.name : undefined;\n  } catch (e) {\n    // ignore errors here\n  }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n  for (const prop in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n      const value = obj[prop];\n      if (value instanceof Error) {\n        return value;\n      }\n    }\n  }\n\n  return undefined;\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { dsnToString, createEnvelope } from '@sentry/core';\n\n/**\n * Creates an envelope from a user feedback.\n */\nfunction createUserFeedbackEnvelope(\n  feedback,\n  {\n    metadata,\n    tunnel,\n    dsn,\n  }\n\n,\n) {\n  const headers = {\n    event_id: feedback.event_id,\n    sent_at: new Date().toISOString(),\n    ...(metadata &&\n      metadata.sdk && {\n        sdk: {\n          name: metadata.sdk.name,\n          version: metadata.sdk.version,\n        },\n      }),\n    ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n  };\n  const item = createUserFeedbackEnvelopeItem(feedback);\n\n  return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n  const feedbackHeaders = {\n    type: 'user_report',\n  };\n  return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };\n//# sourceMappingURL=userfeedback.js.map\n","import { BaseClient, getSDKSource, applySdkMetadata, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends BaseClient {\n  /**\n   * Creates a new Browser SDK instance.\n   *\n   * @param options Configuration options for this SDK.\n   */\n   constructor(options) {\n    const opts = {\n      // We default this to true, as it is the safer scenario\n      parentSpanIsAlwaysRootSpan: true,\n      ...options,\n    };\n    const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n    applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n    super(opts);\n\n    if (opts.sendClientReports && WINDOW.document) {\n      WINDOW.document.addEventListener('visibilitychange', () => {\n        if (WINDOW.document.visibilityState === 'hidden') {\n          this._flushOutcomes();\n        }\n      });\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   eventFromException(exception, hint) {\n    return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   eventFromMessage(\n    message,\n    level = 'info',\n    hint,\n  ) {\n    return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n  }\n\n  /**\n   * Sends user feedback to Sentry.\n   *\n   * @deprecated Use `captureFeedback` instead.\n   */\n   captureUserFeedback(feedback) {\n    if (!this._isEnabled()) {\n      DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n      return;\n    }\n\n    const envelope = createUserFeedbackEnvelope(feedback, {\n      metadata: this.getSdkMetadata(),\n      dsn: this.getDsn(),\n      tunnel: this.getOptions().tunnel,\n    });\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(envelope);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   _prepareEvent(event, hint, scope) {\n    event.platform = event.platform || 'javascript';\n    return super._prepareEvent(event, hint, scope);\n  }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","const getRating = (value, thresholds) => {\n  if (value > thresholds[1]) {\n    return 'poor';\n  }\n  if (value > thresholds[0]) {\n    return 'needs-improvement';\n  }\n  return 'good';\n};\n\nconst bindReporter = (\n  callback,\n  metric,\n  thresholds,\n  reportAllChanges,\n) => {\n  let prevValue;\n  let delta;\n  return (forceReport) => {\n    if (metric.value >= 0) {\n      if (forceReport || reportAllChanges) {\n        delta = metric.value - (prevValue || 0);\n\n        // Report the metric if there's a non-zero delta or if no previous\n        // value exists (which can happen in the case of the document becoming\n        // hidden when the metric value is 0).\n        // See: https://github.com/GoogleChrome/web-vitals/issues/14\n        if (delta || prevValue === undefined) {\n          prevValue = metric.value;\n          metric.delta = delta;\n          metric.rating = getRating(metric.value, thresholds);\n          callback(metric);\n        }\n      }\n    }\n  };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n  return `v4-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nconst getNavigationEntry = (checkResponseStart = true) => {\n  const navigationEntry =\n    WINDOW.performance && WINDOW.performance.getEntriesByType && WINDOW.performance.getEntriesByType('navigation')[0];\n  // Check to ensure the `responseStart` property is present and valid.\n  // In some cases no value is reported by the browser (for\n  // privacy/security reasons), and in other cases (bugs) the value is\n  // negative or is larger than the current page time. Ignore these cases:\n  // https://github.com/GoogleChrome/web-vitals/issues/137\n  // https://github.com/GoogleChrome/web-vitals/issues/162\n  // https://github.com/GoogleChrome/web-vitals/issues/275\n  if (\n    // sentry-specific change:\n    // We don't want to check for responseStart for our own use of `getNavigationEntry`\n    !checkResponseStart ||\n    (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n  ) {\n    return navigationEntry;\n  }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst getActivationStart = () => {\n  const navEntry = getNavigationEntry();\n  return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst initMetric = (name, value) => {\n  const navEntry = getNavigationEntry();\n  let navigationType = 'navigate';\n\n  if (navEntry) {\n    if ((WINDOW.document && WINDOW.document.prerendering) || getActivationStart() > 0) {\n      navigationType = 'prerender';\n    } else if (WINDOW.document && WINDOW.document.wasDiscarded) {\n      navigationType = 'restore';\n    } else if (navEntry.type) {\n      navigationType = navEntry.type.replace(/_/g, '-') ;\n    }\n  }\n\n  // Use `entries` type specific for the metric.\n  const entries = [];\n\n  return {\n    name,\n    value: typeof value === 'undefined' ? -1 : value,\n    rating: 'good' , // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n    delta: 0,\n    entries,\n    id: generateUniqueID(),\n    navigationType,\n  };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n  type,\n  callback,\n  opts,\n) => {\n  try {\n    if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n      const po = new PerformanceObserver(list => {\n        // Delay by a microtask to workaround a bug in Safari where the\n        // callback is invoked immediately, rather than in a separate task.\n        // See: https://github.com/GoogleChrome/web-vitals/issues/277\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        Promise.resolve().then(() => {\n          callback(list.getEntries() );\n        });\n      });\n      po.observe(\n        Object.assign(\n          {\n            type,\n            buffered: true,\n          },\n          opts || {},\n        ) ,\n      );\n      return po;\n    }\n  } catch (e) {\n    // Do nothing.\n  }\n  return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// Sentry-specific change:\n// This function's logic was NOT updated to web-vitals 4.2.4 but we continue\n// to use the web-vitals 3.5.2 due to us having stricter browser support.\n// PR with context that made the changes: https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n// The PR removed listening to the `pagehide` event, in favour of only listening to `visibilitychange` event.\n// This is \"more correct\" but some browsers we still support (Safari 12.1-14.0) don't fully support `visibilitychange`\n// or have known bugs w.r.t the `visibilitychange` event.\n// TODO (v9): If we decide to drop support for Safari 12.1-14.0, we can use the logic from web-vitals 4.2.4\n// In this case, we also need to update the integration tests that currently trigger the `pagehide` event to\n// simulate the page being hidden.\nconst onHidden = (cb) => {\n  const onHiddenOrPageHide = (event) => {\n    if (event.type === 'pagehide' || (WINDOW.document && WINDOW.document.visibilityState === 'hidden')) {\n      cb(event);\n    }\n  };\n\n  if (WINDOW.document) {\n    addEventListener('visibilitychange', onHiddenOrPageHide, true);\n    // Some browsers have buggy implementations of visibilitychange,\n    // so we use pagehide in addition, just to be safe.\n    addEventListener('pagehide', onHiddenOrPageHide, true);\n  }\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst runOnce = (cb) => {\n  let called = false;\n  return () => {\n    if (!called) {\n      cb();\n      called = true;\n    }\n  };\n};\n\nexport { runOnce };\n//# sourceMappingURL=runOnce.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n  // If the document is hidden when this code runs, assume it was always\n  // hidden and the page was loaded in the background, with the one exception\n  // that visibility state is always 'hidden' during prerendering, so we have\n  // to ignore that case until prerendering finishes (see: `prerenderingchange`\n  // event logic below).\n  return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event) => {\n  // If the document is 'hidden' and no previous hidden timestamp has been\n  // set, update it based on the current event data.\n  if (WINDOW.document.visibilityState === 'hidden' && firstHiddenTime > -1) {\n    // If the event is a 'visibilitychange' event, it means the page was\n    // visible prior to this change, so the event timestamp is the first\n    // hidden time.\n    // However, if the event is not a 'visibilitychange' event, then it must\n    // be a 'prerenderingchange' event, and the fact that the document is\n    // still 'hidden' from the above check means the tab was activated\n    // in a background state and so has always been hidden.\n    firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n    // Remove all listeners now that a `firstHiddenTime` value has been set.\n    removeChangeListeners();\n  }\n};\n\nconst addChangeListeners = () => {\n  addEventListener('visibilitychange', onVisibilityUpdate, true);\n  // IMPORTANT: when a page is prerendering, its `visibilityState` is\n  // 'hidden', so in order to account for cases where this module checks for\n  // visibility during prerendering, an additional check after prerendering\n  // completes is also required.\n  addEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst removeChangeListeners = () => {\n  removeEventListener('visibilitychange', onVisibilityUpdate, true);\n  removeEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst getVisibilityWatcher = () => {\n  if (WINDOW.document && firstHiddenTime < 0) {\n    // If the document is hidden when this code runs, assume it was hidden\n    // since navigation start. This isn't a perfect heuristic, but it's the\n    // best we can do until an API is available to support querying past\n    // visibilityState.\n    firstHiddenTime = initHiddenTime();\n    addChangeListeners();\n  }\n  return {\n    get firstHiddenTime() {\n      return firstHiddenTime;\n    },\n  };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nconst whenActivated = (callback) => {\n  if (WINDOW.document && WINDOW.document.prerendering) {\n    addEventListener('prerenderingchange', () => callback(), true);\n  } else {\n    callback();\n  }\n};\n\nexport { whenActivated };\n//# sourceMappingURL=whenActivated.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nconst FCPThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nconst onFCP = (onReport, opts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('FCP');\n    let report;\n\n    const handleEntries = (entries) => {\n      entries.forEach(entry => {\n        if (entry.name === 'first-contentful-paint') {\n          po.disconnect();\n\n          // Only report if the page wasn't hidden prior to the first paint.\n          if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n            // The activationStart reference is used because FCP should be\n            // relative to page activation rather than navigation start if the\n            // page was prerendered. But in cases where `activationStart` occurs\n            // after the FCP, this time should be clamped at 0.\n            metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n            metric.entries.push(entry);\n            report(true);\n          }\n        }\n      });\n    };\n\n    const po = observe('paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n    }\n  });\n};\n\nexport { FCPThresholds, onFCP };\n//# sourceMappingURL=onFCP.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nconst CLSThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport, opts = {}) => {\n  // Start monitoring FCP so we can only report CLS if FCP is also reported.\n  // Note: this is done to match the current behavior of CrUX.\n  onFCP(\n    runOnce(() => {\n      const metric = initMetric('CLS', 0);\n      let report;\n\n      let sessionValue = 0;\n      let sessionEntries = [];\n\n      const handleEntries = (entries) => {\n        entries.forEach(entry => {\n          // Only count layout shifts without recent user input.\n          if (!entry.hadRecentInput) {\n            const firstSessionEntry = sessionEntries[0];\n            const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n            // If the entry occurred less than 1 second after the previous entry\n            // and less than 5 seconds after the first entry in the session,\n            // include the entry in the current session. Otherwise, start a new\n            // session.\n            if (\n              sessionValue &&\n              firstSessionEntry &&\n              lastSessionEntry &&\n              entry.startTime - lastSessionEntry.startTime < 1000 &&\n              entry.startTime - firstSessionEntry.startTime < 5000\n            ) {\n              sessionValue += entry.value;\n              sessionEntries.push(entry);\n            } else {\n              sessionValue = entry.value;\n              sessionEntries = [entry];\n            }\n          }\n        });\n\n        // If the current session value is larger than the current CLS value,\n        // update CLS and the entries contributing to it.\n        if (sessionValue > metric.value) {\n          metric.value = sessionValue;\n          metric.entries = sessionEntries;\n          report();\n        }\n      };\n\n      const po = observe('layout-shift', handleEntries);\n      if (po) {\n        report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n        onHidden(() => {\n          handleEntries(po.takeRecords() );\n          report(true);\n        });\n\n        // Queue a task to report (if nothing else triggers a report first).\n        // This allows CLS to be reported as soon as FCP fires when\n        // `reportAllChanges` is true.\n        setTimeout(report, 0);\n      }\n    }),\n  );\n};\n\nexport { CLSThresholds, onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */\nconst FIDThresholds = [100, 300];\n\n/**\n * Calculates the [FID](https://web.dev/articles/fid) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport, opts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('FID');\n    // eslint-disable-next-line prefer-const\n    let report;\n\n    const handleEntry = (entry) => {\n      // Only report if the page wasn't hidden prior to the first input.\n      if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n        metric.value = entry.processingStart - entry.startTime;\n        metric.entries.push(entry);\n        report(true);\n      }\n    };\n\n    const handleEntries = (entries) => {\n      (entries ).forEach(handleEntry);\n    };\n\n    const po = observe('first-input', handleEntries);\n\n    report = bindReporter(onReport, metric, FIDThresholds, opts.reportAllChanges);\n\n    if (po) {\n      onHidden(\n        runOnce(() => {\n          handleEntries(po.takeRecords() );\n          po.disconnect();\n        }),\n      );\n    }\n  });\n};\n\nexport { FIDThresholds, onFID };\n//# sourceMappingURL=getFID.js.map\n","import { observe } from '../observe.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n  entries.forEach(e => {\n    if (e.interactionId) {\n      minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n      maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n      interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n    }\n  });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n  return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n  if ('interactionCount' in performance || po) return;\n\n  po = observe('event', updateEstimate, {\n    type: 'event',\n    buffered: true,\n    durationThreshold: 0,\n  } );\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };\n//# sourceMappingURL=interactionCountPolyfill.js.map\n","import { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = new Map();\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n  return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n  const candidateInteractionIndex = Math.min(\n    longestInteractionList.length - 1,\n    Math.floor(getInteractionCountForNavigation() / 50),\n  );\n\n  return longestInteractionList[candidateInteractionIndex];\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n/**\n * A list of callback functions to run before each entry is processed.\n * Exposing this list allows the attribution build to hook into the\n * entry processing pipeline.\n */\nconst entryPreProcessingCallbacks = [];\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processInteractionEntry = (entry) => {\n  entryPreProcessingCallbacks.forEach(cb => cb(entry));\n\n  // Skip further processing for entries that cannot be INP candidates.\n  if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n  // The least-long of the 10 longest interactions.\n  const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n  const existingInteraction = longestInteractionMap.get(entry.interactionId);\n\n  // Only process the entry if it's possibly one of the ten longest,\n  // or if it's part of an existing interaction.\n  if (\n    existingInteraction ||\n    longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n    (minLongestInteraction && entry.duration > minLongestInteraction.latency)\n  ) {\n    // If the interaction already exists, update it. Otherwise create one.\n    if (existingInteraction) {\n      // If the new entry has a longer duration, replace the old entries,\n      // otherwise add to the array.\n      if (entry.duration > existingInteraction.latency) {\n        existingInteraction.entries = [entry];\n        existingInteraction.latency = entry.duration;\n      } else if (\n        entry.duration === existingInteraction.latency &&\n        entry.startTime === (existingInteraction.entries[0] && existingInteraction.entries[0].startTime)\n      ) {\n        existingInteraction.entries.push(entry);\n      }\n    } else {\n      const interaction = {\n        id: entry.interactionId,\n        latency: entry.duration,\n        entries: [entry],\n      };\n      longestInteractionMap.set(interaction.id, interaction);\n      longestInteractionList.push(interaction);\n    }\n\n    // Sort the entries by latency (descending) and keep only the top ten.\n    longestInteractionList.sort((a, b) => b.latency - a.latency);\n    if (longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n      longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => longestInteractionMap.delete(i.id));\n    }\n  }\n};\n\nexport { DEFAULT_DURATION_THRESHOLD, entryPreProcessingCallbacks, estimateP98LongestInteraction, longestInteractionList, longestInteractionMap, processInteractionEntry };\n//# sourceMappingURL=interactions.js.map\n","import { WINDOW } from '../../../types.js';\nimport { onHidden } from './onHidden.js';\nimport { runOnce } from './runOnce.js';\n\n/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nconst whenIdle = (cb) => {\n  const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n  let handle = -1;\n  // eslint-disable-next-line no-param-reassign\n  cb = runOnce(cb) ;\n  // If the document is hidden, run the callback immediately, otherwise\n  // race an idle callback with the next `visibilitychange` event.\n  if (WINDOW.document && WINDOW.document.visibilityState === 'hidden') {\n    cb();\n  } else {\n    handle = rIC(cb);\n    onHidden(cb);\n  }\n  return handle;\n};\n\nexport { whenIdle };\n//# sourceMappingURL=whenIdle.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { DEFAULT_DURATION_THRESHOLD, processInteractionEntry, estimateP98LongestInteraction } from './lib/interactions.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nconst INPThresholds = [200, 500];\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts = {}) => {\n  // Return if the browser doesn't support all APIs needed to measure INP.\n  if (!('PerformanceEventTiming' in WINDOW && 'interactionId' in PerformanceEventTiming.prototype)) {\n    return;\n  }\n\n  whenActivated(() => {\n    // TODO(philipwalton): remove once the polyfill is no longer needed.\n    initInteractionCountPolyfill();\n\n    const metric = initMetric('INP');\n    // eslint-disable-next-line prefer-const\n    let report;\n\n    const handleEntries = (entries) => {\n      // Queue the `handleEntries()` callback in the next idle task.\n      // This is needed to increase the chances that all event entries that\n      // occurred between the user interaction and the next paint\n      // have been dispatched. Note: there is currently an experiment\n      // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n      // 123+ that if rolled out fully may make this no longer necessary.\n      whenIdle(() => {\n        entries.forEach(processInteractionEntry);\n\n        const inp = estimateP98LongestInteraction();\n\n        if (inp && inp.latency !== metric.value) {\n          metric.value = inp.latency;\n          metric.entries = inp.entries;\n          report();\n        }\n      });\n    };\n\n    const po = observe('event', handleEntries, {\n      // Event Timing entries have their durations rounded to the nearest 8ms,\n      // so a duration of 40ms would be any event that spans 2.5 or more frames\n      // at 60Hz. This threshold is chosen to strike a balance between usefulness\n      // and performance. Running this callback for any interaction that spans\n      // just one or two frames is likely not worth the insight that could be\n      // gained.\n      durationThreshold: opts.durationThreshold != null ? opts.durationThreshold : DEFAULT_DURATION_THRESHOLD,\n    });\n\n    report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n    if (po) {\n      // Also observe entries of type `first-input`. This is useful in cases\n      // where the first interaction is less than the `durationThreshold`.\n      po.observe({ type: 'first-input', buffered: true });\n\n      onHidden(() => {\n        handleEntries(po.takeRecords() );\n        report(true);\n      });\n    }\n  });\n};\n\nexport { INPThresholds, onINP };\n//# sourceMappingURL=getINP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nconst LCPThresholds = [2500, 4000];\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nconst onLCP = (onReport, opts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('LCP');\n    let report;\n\n    const handleEntries = (entries) => {\n      // If reportAllChanges is set then call this function for each entry,\n      // otherwise only consider the last one.\n      if (!opts.reportAllChanges) {\n        // eslint-disable-next-line no-param-reassign\n        entries = entries.slice(-1);\n      }\n\n      entries.forEach(entry => {\n        // Only report if the page wasn't hidden prior to LCP.\n        if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n          // The startTime attribute returns the value of the renderTime if it is\n          // not 0, and the value of the loadTime otherwise. The activationStart\n          // reference is used because LCP should be relative to page activation\n          // rather than navigation start if the page was pre-rendered. But in cases\n          // where `activationStart` occurs after the LCP, this time should be\n          // clamped at 0.\n          metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n          metric.entries = [entry];\n          report();\n        }\n      });\n    };\n\n    const po = observe('largest-contentful-paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n      const stopListening = runOnce(() => {\n        if (!reportedMetricIDs[metric.id]) {\n          handleEntries(po.takeRecords() );\n          po.disconnect();\n          reportedMetricIDs[metric.id] = true;\n          report(true);\n        }\n      });\n\n      // Stop listening after input. Note: while scrolling is an input that\n      // stops LCP observation, it's unreliable since it can be programmatically\n      // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n      ['keydown', 'click'].forEach(type => {\n        // Wrap in a setTimeout so the callback is run in a separate task\n        // to avoid extending the keyboard/click handler to reduce INP impact\n        // https://github.com/GoogleChrome/web-vitals/issues/383\n        if (WINDOW.document) {\n          addEventListener(type, () => whenIdle(stopListening ), {\n            once: true,\n            capture: true,\n          });\n        }\n      });\n\n      onHidden(stopListening);\n    }\n  });\n};\n\nexport { LCPThresholds, onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nconst TTFBThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n  if (WINDOW.document && WINDOW.document.prerendering) {\n    whenActivated(() => whenReady(callback));\n  } else if (WINDOW.document && WINDOW.document.readyState !== 'complete') {\n    addEventListener('load', () => whenReady(callback), true);\n  } else {\n    // Queue a task so the callback runs after `loadEventEnd`.\n    setTimeout(callback, 0);\n  }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nconst onTTFB = (onReport, opts = {}) => {\n  const metric = initMetric('TTFB');\n  const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n  whenReady(() => {\n    const navigationEntry = getNavigationEntry();\n\n    if (navigationEntry) {\n      // The activationStart reference is used because TTFB should be\n      // relative to page activation rather than navigation start if the\n      // page was prerendered. But in cases where `activationStart` occurs\n      // after the first byte is received, this time should be clamped at 0.\n      metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n      metric.entries = [navigationEntry];\n      report(true);\n    }\n  });\n};\n\nexport { TTFBThresholds, onTTFB };\n//# sourceMappingURL=onTTFB.js.map\n","import { logger, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n  callback,\n  stopOnCallback = false,\n) {\n  return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n  callback,\n  stopOnCallback = false,\n) {\n  return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n  return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n */\nfunction addTtfbInstrumentationHandler(callback) {\n  return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n  callback,\n) {\n  return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n  type,\n  callback,\n) {\n  addHandler(type, callback);\n\n  if (!instrumented[type]) {\n    instrumentPerformanceObserver(type);\n    instrumented[type] = true;\n  }\n\n  return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n  const typeHandlers = handlers[type];\n\n  if (!typeHandlers || !typeHandlers.length) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        logger.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nfunction instrumentCls() {\n  return onCLS(\n    metric => {\n      triggerHandlers('cls', {\n        metric,\n      });\n      _previousCls = metric;\n    },\n    // We want the callback to be called whenever the CLS value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentFid() {\n  return onFID(metric => {\n    triggerHandlers('fid', {\n      metric,\n    });\n    _previousFid = metric;\n  });\n}\n\nfunction instrumentLcp() {\n  return onLCP(\n    metric => {\n      triggerHandlers('lcp', {\n        metric,\n      });\n      _previousLcp = metric;\n    },\n    // We want the callback to be called whenever the LCP value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentTtfb() {\n  return onTTFB(metric => {\n    triggerHandlers('ttfb', {\n      metric,\n    });\n    _previousTtfb = metric;\n  });\n}\n\nfunction instrumentInp() {\n  return onINP(metric => {\n    triggerHandlers('inp', {\n      metric,\n    });\n    _previousInp = metric;\n  });\n}\n\nfunction addMetricObserver(\n  type,\n  callback,\n  instrumentFn,\n  previousValue,\n  stopOnCallback = false,\n) {\n  addHandler(type, callback);\n\n  let stopListening;\n\n  if (!instrumented[type]) {\n    stopListening = instrumentFn();\n    instrumented[type] = true;\n  }\n\n  if (previousValue) {\n    callback({ metric: previousValue });\n  }\n\n  return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n  const options = {};\n\n  // Special per-type options we want to use\n  if (type === 'event') {\n    options.durationThreshold = 0;\n  }\n\n  observe(\n    type,\n    entries => {\n      triggerHandlers(type, { entries });\n    },\n    options,\n  );\n}\n\nfunction addHandler(type, handler) {\n  handlers[type] = handlers[type] || [];\n  (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n  type,\n  callback,\n  stopListening,\n) {\n  return () => {\n    if (stopListening) {\n      stopListening();\n    }\n\n    const typeHandlers = handlers[type];\n\n    if (!typeHandlers) {\n      return;\n    }\n\n    const index = typeHandlers.indexOf(callback);\n    if (index !== -1) {\n      typeHandlers.splice(index, 1);\n    }\n  };\n}\n\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nfunction isPerformanceEventTiming(entry) {\n  return 'duration' in entry;\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler, isPerformanceEventTiming };\n//# sourceMappingURL=instrument.js.map\n","import { spanToJSON, withActiveSpan, startInactiveSpan, getClient, getCurrentScope } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n  return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction startAndEndSpan(\n  parentSpan,\n  startTimeInSeconds,\n  endTime,\n  { ...ctx },\n) {\n  const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n  if (parentStartTime && parentStartTime > startTimeInSeconds) {\n    // We can only do this for SentrySpans...\n    if (typeof (parentSpan ).updateStartTime === 'function') {\n      (parentSpan ).updateStartTime(startTimeInSeconds);\n    }\n  }\n\n  // The return value only exists for tests\n  return withActiveSpan(parentSpan, () => {\n    const span = startInactiveSpan({\n      startTime: startTimeInSeconds,\n      ...ctx,\n    });\n\n    if (span) {\n      span.end(endTime);\n    }\n\n    return span;\n  });\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nfunction startStandaloneWebVitalSpan(options) {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n  const { release, environment } = client.getOptions();\n  // We need to get the replay, user, and activeTransaction from the current scope\n  // so that we can associate replay id, profile id, and a user display to the span\n  const replay = client.getIntegrationByName('Replay');\n  const replayId = replay && replay.getReplayId();\n\n  const scope = getCurrentScope();\n\n  const user = scope.getUser();\n  const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n  let profileId;\n  try {\n    // @ts-expect-error skip optional chaining to save bundle size with try catch\n    profileId = scope.getScopeData().contexts.profile.profile_id;\n  } catch (e) {\n    // do nothing\n  }\n\n  const attributes = {\n    release,\n    environment,\n\n    user: userDisplay || undefined,\n    profile_id: profileId || undefined,\n    replay_id: replayId || undefined,\n\n    transaction,\n\n    // Web vital score calculation relies on the user agent to account for different\n    // browsers setting different thresholds for what is considered a good/meh/bad value.\n    // For example: Chrome vs. Chrome Mobile\n    'user_agent.original': WINDOW.navigator && WINDOW.navigator.userAgent,\n\n    ...passedAttributes,\n  };\n\n  return startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    experimental: {\n      standalone: true,\n    },\n  });\n}\n\n/** Get the browser performance API. */\nfunction getBrowserPerformanceAPI() {\n  // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n  return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n  return time / 1000;\n}\n\nexport { getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan, startStandaloneWebVitalSpan };\n//# sourceMappingURL=utils.js.map\n","import { getClient, getActiveSpan, getRootSpan, spanToJSON, logger, browserPerformanceTimeOrigin, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { addClsInstrumentationHandler } from './instrument.js';\nimport { msToSec, startStandaloneWebVitalSpan } from './utils.js';\nimport { onHidden } from './web-vitals/lib/onHidden.js';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nfunction trackClsAsStandaloneSpan() {\n  let standaloneCLsValue = 0;\n  let standaloneClsEntry;\n  let pageloadSpanId;\n\n  if (!supportsLayoutShift()) {\n    return;\n  }\n\n  let sentSpan = false;\n  function _collectClsOnce() {\n    if (sentSpan) {\n      return;\n    }\n    sentSpan = true;\n    if (pageloadSpanId) {\n      sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId);\n    }\n    cleanupClsHandler();\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] ;\n    if (!entry) {\n      return;\n    }\n    standaloneCLsValue = metric.value;\n    standaloneClsEntry = entry;\n  }, true);\n\n  // use pagehide event from web-vitals\n  onHidden(() => {\n    _collectClsOnce();\n  });\n\n  // Since the call chain of this function is synchronous and evaluates before the SDK client is created,\n  // we need to wait with subscribing to a client hook until the client is created. Therefore, we defer\n  // to the next tick after the SDK setup.\n  setTimeout(() => {\n    const client = getClient();\n\n    if (!client) {\n      return;\n    }\n\n    const unsubscribeStartNavigation = client.on('startNavigationSpan', () => {\n      _collectClsOnce();\n      unsubscribeStartNavigation && unsubscribeStartNavigation();\n    });\n\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    const spanJSON = rootSpan && spanToJSON(rootSpan);\n    if (spanJSON && spanJSON.op === 'pageload') {\n      pageloadSpanId = rootSpan.spanContext().spanId;\n    }\n  }, 0);\n}\n\nfunction sendStandaloneClsSpan(clsValue, entry, pageloadSpanId) {\n  DEBUG_BUILD && logger.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin || 0) + ((entry && entry.startTime) || 0));\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.sources[0] && entry.sources[0].node) : 'Layout shift';\n\n  const attributes = dropUndefinedKeys({\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: (entry && entry.duration) || 0,\n    // attach the pageload span id to the CLS span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n  });\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('cls', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n    });\n\n    // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n    // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n    span.end(startTime);\n  }\n}\n\nfunction supportsLayoutShift() {\n  try {\n    return PerformanceObserver.supportedEntryTypes.includes('layout-shift');\n  } catch (e) {\n    return false;\n  }\n}\n\nexport { trackClsAsStandaloneSpan };\n//# sourceMappingURL=cls.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, spanToJSON, setMeasurement, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, parseUrl, htmlTreeAsString, getComponentName } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nimport { trackClsAsStandaloneSpan } from './cls.js';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler, addTtfbInstrumentationHandler } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startAndEndSpan, isMeasurementValue } from './utils.js';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart.js';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry.js';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher.js';\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals({ recordClsStandaloneSpans }) {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin) {\n    // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n    if (performance.mark) {\n      WINDOW.performance.mark('sentry-tracing-init');\n    }\n    const fidCleanupCallback = _trackFID();\n    const lcpCleanupCallback = _trackLCP();\n    const ttfbCleanupCallback = _trackTtfb();\n    const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan() : _trackCLS();\n\n    return () => {\n      fidCleanupCallback();\n      lcpCleanupCallback();\n      ttfbCleanupCallback();\n      clsCleanupCallback && clsCleanupCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n  addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n\n    const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n    for (const entry of entries) {\n      const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n      const duration = msToSec(entry.duration);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding a span if the long task started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-task',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\n      });\n    }\n  });\n}\n\n/**\n * Start tracking long animation frames.\n */\nfunction startTrackingLongAnimationFrames() {\n  // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n  // we directly observe `long-animation-frame` events instead of through the web-vitals\n  // `observe` helper function.\n  const observer = new PerformanceObserver(list => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of list.getEntries() ) {\n      if (!entry.scripts[0]) {\n        continue;\n      }\n\n      const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n\n      const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding the span if the long animation frame started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      const duration = msToSec(entry.duration);\n\n      const attributes = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      };\n\n      const initialScript = entry.scripts[0];\n      const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n      attributes['browser.script.invoker'] = invoker;\n      attributes['browser.script.invoker_type'] = invokerType;\n      if (sourceURL) {\n        attributes['code.filepath'] = sourceURL;\n      }\n      if (sourceFunctionName) {\n        attributes['code.function'] = sourceFunctionName;\n      }\n      if (sourceCharPosition !== -1) {\n        attributes['browser.script.source_char_position'] = sourceCharPosition;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-animation-frame',\n        attributes,\n      });\n    }\n  });\n\n  observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n  addPerformanceInstrumentationHandler('event', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of entries) {\n      if (entry.name === 'click') {\n        const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n        const duration = msToSec(entry.duration);\n\n        const spanOptions = {\n          name: htmlTreeAsString(entry.target),\n          op: `ui.interaction.${entry.name}`,\n          startTime: startTime,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n          },\n        };\n\n        const componentName = getComponentName(entry.target);\n        if (componentName) {\n          spanOptions.attributes['ui.component_name'] = componentName;\n        }\n\n        startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n      }\n    }\n  });\n}\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS() {\n  return addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] ;\n    if (!entry) {\n      return;\n    }\n    _measurements['cls'] = { value: metric.value, unit: '' };\n    _clsEntry = entry;\n  }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n  return addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n    _lcpEntry = entry ;\n  }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n  return addFidInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n    const startTime = msToSec(entry.startTime);\n    _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n    _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n  });\n}\n\nfunction _trackTtfb() {\n  return addTtfbInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n  });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(span, options) {\n  const performance = getBrowserPerformanceAPI();\n  if (!performance || !performance.getEntries || !browserPerformanceTimeOrigin) {\n    // Gatekeeper if performance API not available\n    return;\n  }\n\n  const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n  const performanceEntries = performance.getEntries();\n\n  const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n  performanceEntries.slice(_performanceCursor).forEach(entry => {\n    const startTime = msToSec(entry.startTime);\n    const duration = msToSec(\n      // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n      // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n      // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n      // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n      Math.max(0, entry.duration),\n    );\n\n    if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n      return;\n    }\n\n    switch (entry.entryType) {\n      case 'navigation': {\n        _addNavigationSpans(span, entry , timeOrigin);\n        break;\n      }\n      case 'mark':\n      case 'paint':\n      case 'measure': {\n        _addMeasureSpans(span, entry, startTime, duration, timeOrigin);\n\n        // capture web vitals\n        const firstHidden = getVisibilityWatcher();\n        // Only report if the page wasn't hidden prior to the web vital.\n        const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n        if (entry.name === 'first-paint' && shouldRecord) {\n          _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n        }\n        if (entry.name === 'first-contentful-paint' && shouldRecord) {\n          _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n        }\n        break;\n      }\n      case 'resource': {\n        _addResourceSpans(span, entry , entry.name, startTime, duration, timeOrigin);\n        break;\n      }\n      // Ignore other entry types.\n    }\n  });\n\n  _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n  _trackNavigator(span);\n\n  // Measurements are only available for pageload transactions\n  if (op === 'pageload') {\n    _addTtfbRequestTimeToMeasurements(_measurements);\n\n    const fidMark = _measurements['mark.fid'];\n    if (fidMark && _measurements['fid']) {\n      // create span for FID\n      startAndEndSpan(span, fidMark.value, fidMark.value + msToSec(_measurements['fid'].value), {\n        name: 'first input delay',\n        op: 'ui.action',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\n      });\n\n      // Delete mark.fid as we don't want it to be part of final payload\n      delete _measurements['mark.fid'];\n    }\n\n    // If FCP is not recorded we should not record the cls value\n    // according to the new definition of CLS.\n    // TODO: Check if the first condition is still necessary: `onCLS` already only fires once `onFCP` was called.\n    if (!('fcp' in _measurements) || !options.recordClsOnPageloadSpan) {\n      delete _measurements.cls;\n    }\n\n    Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n      setMeasurement(measurementName, measurement.value, measurement.unit);\n    });\n\n    // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n    span.setAttribute('performance.timeOrigin', timeOrigin);\n\n    // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n    // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n    // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n    // time where the user actively started the navigation, for example by clicking a link.\n    // This is user action is called \"activation\" and the time between navigation and activation is stored in\n    // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n    span.setAttribute('performance.activationStart', getActivationStart());\n\n    _setWebVitalAttributes(span);\n  }\n\n  _lcpEntry = undefined;\n  _clsEntry = undefined;\n  _measurements = {};\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nfunction _addMeasureSpans(\n  span,\n  entry,\n  startTime,\n  duration,\n  timeOrigin,\n) {\n  const navEntry = getNavigationEntry(false);\n  const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n  // Because performance.measure accepts arbitrary timestamps it can produce\n  // spans that happen before the browser even makes a request for the page.\n  //\n  // An example of this is the automatically generated Next.js-before-hydration\n  // spans created by the Next.js framework.\n  //\n  // To prevent this we will pin the start timestamp to the request start time\n  // This does make duration inaccurate, so if this does happen, we will add\n  // an attribute to the span\n  const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n  const startTimeStamp = timeOrigin + startTime;\n  const measureEndTimestamp = startTimeStamp + duration;\n\n  const attributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  if (measureStartTimestamp !== startTimeStamp) {\n    attributes['sentry.browser.measure_happened_before_request'] = true;\n    attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n  }\n\n  startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n    name: entry.name ,\n    op: entry.entryType ,\n    attributes,\n  });\n\n  return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\nfunction _addNavigationSpans(span, entry, timeOrigin) {\n  (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] ).forEach(event => {\n    _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n  });\n  _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n  _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n  _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n  _addRequest(span, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n  span,\n  entry,\n  event,\n  timeOrigin,\n  name = event,\n) {\n  const eventEnd = _getEndPropertyNameForNavigationTiming(event) ;\n  const end = entry[eventEnd];\n  const start = entry[`${event}Start`];\n  if (!start || !end) {\n    return;\n  }\n  startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n    op: `browser.${name}`,\n    name: entry.name,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n    },\n  });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event) {\n  if (event === 'secureConnection') {\n    return 'connectEnd';\n  }\n  if (event === 'fetch') {\n    return 'domainLookupStart';\n  }\n  return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span, entry, timeOrigin) {\n  const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart );\n  const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd );\n  const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart );\n  if (entry.responseEnd) {\n    // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n    // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n    // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n    // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n    startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n      op: 'browser.request',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n\n    startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n      op: 'browser.response',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n  }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nfunction _addResourceSpans(\n  span,\n  entry,\n  resourceUrl,\n  startTime,\n  duration,\n  timeOrigin,\n) {\n  // we already instrument based on fetch and xhr, so we don't need to\n  // duplicate spans here.\n  if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n    return;\n  }\n\n  const parsedUrl = parseUrl(resourceUrl);\n\n  const attributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n  setResourceEntrySizeData(attributes, entry, 'transferSize', 'http.response_transfer_size');\n  setResourceEntrySizeData(attributes, entry, 'encodedBodySize', 'http.response_content_length');\n  setResourceEntrySizeData(attributes, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n  // `deliveryType` is experimental and does not exist everywhere\n  const deliveryType = (entry ).deliveryType;\n  if (deliveryType != null) {\n    attributes['http.response_delivery_type'] = deliveryType;\n  }\n\n  // Types do not reflect this property yet\n  const renderBlockingStatus = (entry )\n    .renderBlockingStatus;\n  if (renderBlockingStatus) {\n    attributes['resource.render_blocking_status'] = renderBlockingStatus;\n  }\n\n  if (parsedUrl.protocol) {\n    attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n  }\n\n  if (parsedUrl.host) {\n    attributes['server.address'] = parsedUrl.host;\n  }\n\n  attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n  const startTimestamp = timeOrigin + startTime;\n  const endTimestamp = startTimestamp + duration;\n\n  startAndEndSpan(span, startTimestamp, endTimestamp, {\n    name: resourceUrl.replace(WINDOW.location.origin, ''),\n    op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n    attributes,\n  });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(span) {\n  const navigator = WINDOW.navigator ;\n  if (!navigator) {\n    return;\n  }\n\n  // track network connectivity\n  const connection = navigator.connection;\n  if (connection) {\n    if (connection.effectiveType) {\n      span.setAttribute('effectiveConnectionType', connection.effectiveType);\n    }\n\n    if (connection.type) {\n      span.setAttribute('connectionType', connection.type);\n    }\n\n    if (isMeasurementValue(connection.rtt)) {\n      _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n    }\n  }\n\n  if (isMeasurementValue(navigator.deviceMemory)) {\n    span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n  }\n\n  if (isMeasurementValue(navigator.hardwareConcurrency)) {\n    span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n  }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span) {\n  if (_lcpEntry) {\n    // Capture Properties of the LCP element that contributes to the LCP.\n\n    if (_lcpEntry.element) {\n      span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n    }\n\n    if (_lcpEntry.id) {\n      span.setAttribute('lcp.id', _lcpEntry.id);\n    }\n\n    if (_lcpEntry.url) {\n      // Trim URL to the first 200 characters.\n      span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n    }\n\n    if (_lcpEntry.loadTime != null) {\n      // loadTime is the time of LCP that's related to receiving the LCP element response..\n      span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n    }\n\n    if (_lcpEntry.renderTime != null) {\n      // renderTime is loadTime + rendering time\n      // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n      // `Timing-Allow-Origin` header.\n      span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n    }\n\n    span.setAttribute('lcp.size', _lcpEntry.size);\n  }\n\n  // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n  if (_clsEntry && _clsEntry.sources) {\n    _clsEntry.sources.forEach((source, index) =>\n      span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n    );\n  }\n}\n\nfunction setResourceEntrySizeData(\n  attributes,\n  entry,\n  key,\n  dataKey,\n) {\n  const entryVal = entry[key];\n  if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n    attributes[dataKey] = entryVal;\n  }\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements) {\n  const navEntry = getNavigationEntry(false);\n  if (!navEntry) {\n    return;\n  }\n\n  const { responseStart, requestStart } = navEntry;\n\n  if (requestStart <= responseStart) {\n    _measurements['ttfb.requestTime'] = {\n      value: responseStart - requestStart,\n      unit: 'millisecond',\n    };\n  }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=browserMetrics.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n  const type = 'dom';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n  if (!WINDOW.document) {\n    return;\n  }\n\n  // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n  // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n  // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n  const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n  const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n  WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n  WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n  // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n  // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n  // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n  // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n  // guaranteed to fire at least once.)\n  ['EventTarget', 'Node'].forEach((target) => {\n    const globalObject = WINDOW ;\n    const targetObj = globalObject[target];\n    const proto = targetObj && targetObj.prototype;\n\n    // eslint-disable-next-line no-prototype-builtins\n    if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function (originalAddEventListener) {\n      return function ( type, listener, options) {\n        if (type === 'click' || type == 'keypress') {\n          try {\n            const handlers = (this.__sentry_instrumentation_handlers__ =\n              this.__sentry_instrumentation_handlers__ || {});\n            const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n            if (!handlerForType.handler) {\n              const handler = makeDOMEventHandler(triggerDOMHandler);\n              handlerForType.handler = handler;\n              originalAddEventListener.call(this, type, handler, options);\n            }\n\n            handlerForType.refCount++;\n          } catch (e) {\n            // Accessing dom properties is always fragile.\n            // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n          }\n        }\n\n        return originalAddEventListener.call(this, type, listener, options);\n      };\n    });\n\n    fill(\n      proto,\n      'removeEventListener',\n      function (originalRemoveEventListener) {\n        return function ( type, listener, options) {\n          if (type === 'click' || type == 'keypress') {\n            try {\n              const handlers = this.__sentry_instrumentation_handlers__ || {};\n              const handlerForType = handlers[type];\n\n              if (handlerForType) {\n                handlerForType.refCount--;\n                // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n                if (handlerForType.refCount <= 0) {\n                  originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n                  handlerForType.handler = undefined;\n                  delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n                }\n\n                // If there are no longer any custom handlers of any type on this element, cleanup everything.\n                if (Object.keys(handlers).length === 0) {\n                  delete this.__sentry_instrumentation_handlers__;\n                }\n              }\n            } catch (e) {\n              // Accessing dom properties is always fragile.\n              // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n            }\n          }\n\n          return originalRemoveEventListener.call(this, type, listener, options);\n        };\n      },\n    );\n  });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n  // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n  if (event.type !== lastCapturedEventType) {\n    return false;\n  }\n\n  try {\n    // If both events have the same type, it's still possible that actions were performed on different targets.\n    // e.g. 2 clicks on different buttons.\n    if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n      return false;\n    }\n  } catch (e) {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n  }\n\n  // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n  // to which an event listener was attached), we treat them as the same action, as we want to capture\n  // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n  return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n  // We are only interested in filtering `keypress` events for now.\n  if (eventType !== 'keypress') {\n    return false;\n  }\n\n  if (!target || !target.tagName) {\n    return true;\n  }\n\n  // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n  // e.g.tabbing through elements, hotkeys, etc.\n  if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n  handler,\n  globalListener = false,\n) {\n  return (event) => {\n    // It's possible this handler might trigger multiple times for the same\n    // event (e.g. event propagation through node ancestors).\n    // Ignore if we've already captured that event.\n    if (!event || event['_sentryCaptured']) {\n      return;\n    }\n\n    const target = getEventTarget(event);\n\n    // We always want to skip _some_ events.\n    if (shouldSkipDOMEvent(event.type, target)) {\n      return;\n    }\n\n    // Mark event as \"seen\"\n    addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n    if (target && !target._sentryId) {\n      // Add UUID to event target so we can identify if\n      addNonEnumerableProperty(target, '_sentryId', uuid4());\n    }\n\n    const name = event.type === 'keypress' ? 'input' : event.type;\n\n    // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n    // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n    // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n    if (!isSimilarToLastCapturedEvent(event)) {\n      const handlerData = { event, name, global: globalListener };\n      handler(handlerData);\n      lastCapturedEventType = event.type;\n      lastCapturedEventTargetId = target ? target._sentryId : undefined;\n    }\n\n    // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n    clearTimeout(debounceTimerID);\n    debounceTimerID = WINDOW.setTimeout(() => {\n      lastCapturedEventTargetId = undefined;\n      lastCapturedEventType = undefined;\n    }, DEBOUNCE_DURATION);\n  };\n}\n\nfunction getEventTarget(event) {\n  try {\n    return event.target ;\n  } catch (e) {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n    return null;\n  }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n//# sourceMappingURL=dom.js.map\n","import { addHandler, maybeInstrument, supportsHistory, triggerHandlers, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n  const type = 'history';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n  if (!supportsHistory()) {\n    return;\n  }\n\n  const oldOnPopState = WINDOW.onpopstate;\n  WINDOW.onpopstate = function ( ...args) {\n    const to = WINDOW.location.href;\n    // keep track of the current URL state, as we always receive only the updated state\n    const from = lastHref;\n    lastHref = to;\n    const handlerData = { from, to };\n    triggerHandlers('history', handlerData);\n    if (oldOnPopState) {\n      // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n      // https://github.com/getsentry/sentry-javascript/issues/3344\n      // https://github.com/bugsnag/bugsnag-js/issues/469\n      try {\n        return oldOnPopState.apply(this, args);\n      } catch (_oO) {\n        // no-empty\n      }\n    }\n  };\n\n  function historyReplacementFunction(originalHistoryFunction) {\n    return function ( ...args) {\n      const url = args.length > 2 ? args[2] : undefined;\n      if (url) {\n        // coerce to string (this is what pushState does)\n        const from = lastHref;\n        const to = String(url);\n        // keep track of the current URL state, as we always receive only the updated state\n        lastHref = to;\n        const handlerData = { from, to };\n        triggerHandlers('history', handlerData);\n      }\n      return originalHistoryFunction.apply(this, args);\n    };\n  }\n\n  fill(WINDOW.history, 'pushState', historyReplacementFunction);\n  fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n//# sourceMappingURL=history.js.map\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(\n  name,\n) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n\n  let impl = WINDOW[name] ;\n\n  // Fast path to avoid DOM I/O\n  if (isNativeFunction(impl)) {\n    return (cachedImplementations[name] = impl.bind(WINDOW) );\n  }\n\n  const document = WINDOW.document;\n  // eslint-disable-next-line deprecation/deprecation\n  if (document && typeof document.createElement === 'function') {\n    try {\n      const sandbox = document.createElement('iframe');\n      sandbox.hidden = true;\n      document.head.appendChild(sandbox);\n      const contentWindow = sandbox.contentWindow;\n      if (contentWindow && contentWindow[name]) {\n        impl = contentWindow[name] ;\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n      // Could not create sandbox iframe, just use window.xxx\n      DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n    }\n  }\n\n  // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n  // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n  if (!impl) {\n    return impl;\n  }\n\n  return (cachedImplementations[name] = impl.bind(WINDOW) );\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n  cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n *   const p = f.apply(this, arguments);\n *\n *   p.then(function() {\n *     console.log('hi.');\n *   });\n *\n *   return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome:  Failed to fetch\n * Edge:    Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari:  resource blocked by content blocker\n */\nfunction fetch(...rest) {\n  return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n  return getNativeImplementation('setTimeout')(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n  const type = 'xhr';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n  if (!(WINDOW ).XMLHttpRequest) {\n    return;\n  }\n\n  const xhrproto = XMLHttpRequest.prototype;\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.open = new Proxy(xhrproto.open, {\n    apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your XHR call did not\n      //       have a stack trace. If you are using HttpClient integration,\n      //       this is the expected behavior, as we are using this virtual error to capture\n      //       the location of your XHR call, and group your HttpClient events accordingly.\n      const virtualError = new Error();\n\n      const startTimestamp = timestampInSeconds() * 1000;\n\n      // open() should always be called with two or more arguments\n      // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n      const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n      const url = parseUrl(xhrOpenArgArray[1]);\n\n      if (!method || !url) {\n        return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n      }\n\n      xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n        method,\n        url,\n        request_headers: {},\n      };\n\n      // if Sentry key appears in URL, don't capture it as a request\n      if (method === 'POST' && url.match(/sentry_key/)) {\n        xhrOpenThisArg.__sentry_own_request__ = true;\n      }\n\n      const onreadystatechangeHandler = () => {\n        // For whatever reason, this is not the same instance here as from the outer method\n        const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n        if (!xhrInfo) {\n          return;\n        }\n\n        if (xhrOpenThisArg.readyState === 4) {\n          try {\n            // touching statusCode in some platforms throws\n            // an exception\n            xhrInfo.status_code = xhrOpenThisArg.status;\n          } catch (e) {\n            /* do nothing */\n          }\n\n          const handlerData = {\n            endTimestamp: timestampInSeconds() * 1000,\n            startTimestamp,\n            xhr: xhrOpenThisArg,\n            virtualError,\n          };\n          triggerHandlers('xhr', handlerData);\n        }\n      };\n\n      if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n        xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n          apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n            onreadystatechangeHandler();\n            return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n          },\n        });\n      } else {\n        xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n      }\n\n      // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n      // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n      // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n      xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n        apply(\n          originalSetRequestHeader,\n          setRequestHeaderThisArg,\n          setRequestHeaderArgArray,\n        ) {\n          const [header, value] = setRequestHeaderArgArray;\n\n          const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n          if (xhrInfo && isString(header) && isString(value)) {\n            xhrInfo.request_headers[header.toLowerCase()] = value;\n          }\n\n          return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n        },\n      });\n\n      return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.send = new Proxy(xhrproto.send, {\n    apply(originalSend, sendThisArg, sendArgArray) {\n      const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n      if (!sentryXhrData) {\n        return originalSend.apply(sendThisArg, sendArgArray);\n      }\n\n      if (sendArgArray[0] !== undefined) {\n        sentryXhrData.body = sendArgArray[0];\n      }\n\n      const handlerData = {\n        startTimestamp: timestampInSeconds() * 1000,\n        xhr: sendThisArg,\n      };\n      triggerHandlers('xhr', handlerData);\n\n      return originalSend.apply(sendThisArg, sendArgArray);\n    },\n  });\n}\n\nfunction parseUrl(url) {\n  if (isString(url)) {\n    return url;\n  }\n\n  try {\n    // url can be a string or URL\n    // but since URL is not available in IE11, we do not check for it,\n    // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n    // If that fails, we just return undefined\n    return (url ).toString();\n  } catch (e2) {} // eslint-disable-line no-empty\n\n  return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, getRootSpan, spanToJSON, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { addInpInstrumentationHandler, addPerformanceInstrumentationHandler, isPerformanceEventTiming } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils.js';\n\nconst LAST_INTERACTIONS = [];\nconst INTERACTIONS_SPAN_MAP = new Map();\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP() {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin) {\n    const inpCallback = _trackINP();\n\n    return () => {\n      inpCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\nconst INP_ENTRY_MAP = {\n  click: 'click',\n  pointerdown: 'click',\n  pointerup: 'click',\n  mousedown: 'click',\n  mouseup: 'click',\n  touchstart: 'click',\n  touchend: 'click',\n  mouseover: 'hover',\n  mouseout: 'hover',\n  mouseenter: 'hover',\n  mouseleave: 'hover',\n  pointerover: 'hover',\n  pointerout: 'hover',\n  pointerenter: 'hover',\n  pointerleave: 'hover',\n  dragstart: 'drag',\n  dragend: 'drag',\n  drag: 'drag',\n  dragenter: 'drag',\n  dragleave: 'drag',\n  dragover: 'drag',\n  drop: 'drag',\n  keydown: 'press',\n  keyup: 'press',\n  keypress: 'press',\n  input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP() {\n  return addInpInstrumentationHandler(({ metric }) => {\n    if (metric.value == undefined) {\n      return;\n    }\n\n    const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n    if (!entry) {\n      return;\n    }\n\n    const { interactionId } = entry;\n    const interactionType = INP_ENTRY_MAP[entry.name];\n\n    /** Build the INP span, create an envelope from the span, and then send the envelope */\n    const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n    const duration = msToSec(metric.value);\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n    // We first try to lookup the span from our INTERACTIONS_SPAN_MAP,\n    // where we cache the route per interactionId\n    const cachedSpan = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n    const spanToUse = cachedSpan || rootSpan;\n\n    // Else, we try to use the active span.\n    // Finally, we fall back to look at the transactionName on the scope\n    const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n    const name = htmlTreeAsString(entry.target);\n    const attributes = dropUndefinedKeys({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n      [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n    });\n\n    const span = startStandaloneWebVitalSpan({\n      name,\n      transaction: routeName,\n      attributes,\n      startTime,\n    });\n\n    if (span) {\n      span.addEvent('inp', {\n        [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n        [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n      });\n\n      span.end(startTime + duration);\n    }\n  });\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n * TODO(v9): `latestRoute` no longer needs to be passed in and will be removed in v9.\n */\nfunction registerInpInteractionListener(_latestRoute) {\n  const handleEntries = ({ entries }) => {\n    const activeSpan = getActiveSpan();\n    const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n    entries.forEach(entry => {\n      if (!isPerformanceEventTiming(entry) || !activeRootSpan) {\n        return;\n      }\n\n      const interactionId = entry.interactionId;\n      if (interactionId == null) {\n        return;\n      }\n\n      // If the interaction was already recorded before, nothing more to do\n      if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n        return;\n      }\n\n      // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n      if (LAST_INTERACTIONS.length > 10) {\n        const last = LAST_INTERACTIONS.shift() ;\n        INTERACTIONS_SPAN_MAP.delete(last);\n      }\n\n      // We add the interaction to the list of recorded interactions\n      // and store the span for this interaction\n      LAST_INTERACTIONS.push(interactionId);\n      INTERACTIONS_SPAN_MAP.set(interactionId, activeRootSpan);\n    });\n  };\n\n  addPerformanceInstrumentationHandler('event', handleEntries);\n  addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n\nexport { registerInpInteractionListener, startTrackingINP };\n//# sourceMappingURL=inp.js.map\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n  options,\n  nativeFetch = getNativeImplementation('fetch'),\n) {\n  let pendingBodySize = 0;\n  let pendingCount = 0;\n\n  function makeRequest(request) {\n    const requestSize = request.body.length;\n    pendingBodySize += requestSize;\n    pendingCount++;\n\n    const requestOptions = {\n      body: request.body,\n      method: 'POST',\n      referrerPolicy: 'origin',\n      headers: options.headers,\n      // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n      // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n      // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n      // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n      // Gotchas:\n      // - `keepalive` isn't supported by Firefox\n      // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n      //   If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n      //   We will therefore only activate the flag when we're below that limit.\n      // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n      // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n      keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n      ...options.fetchOptions,\n    };\n\n    if (!nativeFetch) {\n      clearCachedImplementation('fetch');\n      return rejectedSyncPromise('No fetch implementation available');\n    }\n\n    try {\n      // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n      return nativeFetch(options.url, requestOptions).then(response => {\n        pendingBodySize -= requestSize;\n        pendingCount--;\n        return {\n          statusCode: response.status,\n          headers: {\n            'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n            'retry-after': response.headers.get('Retry-After'),\n          },\n        };\n      });\n    } catch (e) {\n      clearCachedImplementation('fetch');\n      pendingBodySize -= requestSize;\n      pendingCount--;\n      return rejectedSyncPromise(e);\n    }\n  }\n\n  return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n  const frame = {\n    filename,\n    function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,\n    in_app: true, // All browser frames are considered in_app\n  };\n\n  if (lineno !== undefined) {\n    frame.lineno = lineno;\n  }\n\n  if (colno !== undefined) {\n    frame.colno = colno;\n  }\n\n  return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n  /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n  // If the stack line has no function name, we need to parse it differently\n  const noFnParts = chromeRegexNoFnName.exec(line) ;\n\n  if (noFnParts) {\n    const [, filename, line, col] = noFnParts;\n    return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n  }\n\n  const parts = chromeRegex.exec(line) ;\n\n  if (parts) {\n    const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n    if (isEval) {\n      const subMatch = chromeEvalRegex.exec(parts[2]) ;\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line/column number\n        parts[2] = subMatch[1]; // url\n        parts[3] = subMatch[2]; // line\n        parts[4] = subMatch[3]; // column\n      }\n    }\n\n    // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n    // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n    const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n    return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n  }\n\n  return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n  /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n  const parts = geckoREgex.exec(line) ;\n\n  if (parts) {\n    const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n    if (isEval) {\n      const subMatch = geckoEvalRegex.exec(parts[3]) ;\n\n      if (subMatch) {\n        // throw out eval line/column and use top-most line number\n        parts[1] = parts[1] || 'eval';\n        parts[3] = subMatch[1];\n        parts[4] = subMatch[2];\n        parts[5] = ''; // no column when eval\n      }\n    }\n\n    let filename = parts[3];\n    let func = parts[1] || UNKNOWN_FUNCTION;\n    [func, filename] = extractSafariExtensionDetails(func, filename);\n\n    return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n  }\n\n  return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n  const parts = winjsRegex.exec(line) ;\n\n  return parts\n    ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n    : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n  const parts = opera10Regex.exec(line) ;\n  return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n  / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n  const parts = opera11Regex.exec(line) ;\n  return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n *   at function@url:row:col\n *   at function@url:row:col\n *   at function@url:row:col\n *\n * it produces something like:\n *\n *   function@url:row:col\n *   function@url:row:col\n *   function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n  const isSafariExtension = func.indexOf('safari-extension') !== -1;\n  const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n  return isSafariExtension || isSafariWebExtension\n    ? [\n        func.indexOf('@') !== -1 ? (func.split('@')[0] ) : UNKNOWN_FUNCTION,\n        isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n      ]\n    : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","import { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options = {}) => {\n  const _options = {\n    console: true,\n    dom: true,\n    fetch: true,\n    history: true,\n    sentry: true,\n    xhr: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      if (_options.console) {\n        addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n      }\n      if (_options.dom) {\n        addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n      }\n      if (_options.xhr) {\n        addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n      }\n      if (_options.fetch) {\n        addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n      }\n      if (_options.history) {\n        addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n      }\n      if (_options.sentry) {\n        client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n      }\n    },\n  };\n}) ;\n\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n  return function addSentryBreadcrumb(event) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    addBreadcrumb(\n      {\n        category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n        event_id: event.event_id,\n        level: event.level,\n        message: getEventDescription(event),\n      },\n      {\n        event,\n      },\n    );\n  };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n  client,\n  dom,\n) {\n  return function _innerDomBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let target;\n    let componentName;\n    let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n    let maxStringLength =\n      typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n    if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        logger.warn(\n          `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n        );\n      maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n    }\n\n    if (typeof keyAttrs === 'string') {\n      keyAttrs = [keyAttrs];\n    }\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      const event = handlerData.event ;\n      const element = _isEvent(event) ? event.target : event;\n\n      target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n      componentName = getComponentName(element);\n    } catch (e) {\n      target = '<unknown>';\n    }\n\n    if (target.length === 0) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: `ui.${handlerData.name}`,\n      message: target,\n    };\n\n    if (componentName) {\n      breadcrumb.data = { 'ui.component_name': componentName };\n    }\n\n    addBreadcrumb(breadcrumb, {\n      event: handlerData.event,\n      name: handlerData.name,\n      global: handlerData.global,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n  return function _consoleBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: 'console',\n      data: {\n        arguments: handlerData.args,\n        logger: 'console',\n      },\n      level: severityLevelFromString(handlerData.level),\n      message: safeJoin(handlerData.args, ' '),\n    };\n\n    if (handlerData.level === 'assert') {\n      if (handlerData.args[0] === false) {\n        breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n        breadcrumb.data.arguments = handlerData.args.slice(1);\n      } else {\n        // Don't capture a breadcrumb for passed assertions\n        return;\n      }\n    }\n\n    addBreadcrumb(breadcrumb, {\n      input: handlerData.args,\n      level: handlerData.level,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n  return function _xhrBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n    // We only capture complete, non-sentry requests\n    if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n      return;\n    }\n\n    const { method, url, status_code, body } = sentryXhrData;\n\n    const data = {\n      method,\n      url,\n      status_code,\n    };\n\n    const hint = {\n      xhr: handlerData.xhr,\n      input: body,\n      startTimestamp,\n      endTimestamp,\n    };\n\n    const level = getBreadcrumbLogLevelFromHttpStatusCode(status_code);\n\n    addBreadcrumb(\n      {\n        category: 'xhr',\n        data,\n        type: 'http',\n        level,\n      },\n      hint,\n    );\n  };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n  return function _fetchBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const { startTimestamp, endTimestamp } = handlerData;\n\n    // We only capture complete fetch requests\n    if (!endTimestamp) {\n      return;\n    }\n\n    if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n      // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n      return;\n    }\n\n    if (handlerData.error) {\n      const data = handlerData.fetchData;\n      const hint = {\n        data: handlerData.error,\n        input: handlerData.args,\n        startTimestamp,\n        endTimestamp,\n      };\n\n      addBreadcrumb(\n        {\n          category: 'fetch',\n          data,\n          level: 'error',\n          type: 'http',\n        },\n        hint,\n      );\n    } else {\n      const response = handlerData.response ;\n      const data = {\n        ...handlerData.fetchData,\n        status_code: response && response.status,\n      };\n      const hint = {\n        input: handlerData.args,\n        response,\n        startTimestamp,\n        endTimestamp,\n      };\n      const level = getBreadcrumbLogLevelFromHttpStatusCode(data.status_code);\n\n      addBreadcrumb(\n        {\n          category: 'fetch',\n          data,\n          type: 'http',\n          level,\n        },\n        hint,\n      );\n    }\n  };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n  return function _historyBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let from = handlerData.from;\n    let to = handlerData.to;\n    const parsedLoc = parseUrl(WINDOW.location.href);\n    let parsedFrom = from ? parseUrl(from) : undefined;\n    const parsedTo = parseUrl(to);\n\n    // Initial pushState doesn't provide `from` information\n    if (!parsedFrom || !parsedFrom.path) {\n      parsedFrom = parsedLoc;\n    }\n\n    // Use only the path component of the URL if the URL matches the current\n    // document (almost all the time when using pushState)\n    if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n      to = parsedTo.relative;\n    }\n    if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n      from = parsedFrom.relative;\n    }\n\n    addBreadcrumb({\n      category: 'navigation',\n      data: {\n        from,\n        to,\n      },\n    });\n  };\n}\n\nfunction _isEvent(event) {\n  return !!event && !!(event ).target;\n}\n\nexport { breadcrumbsIntegration };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n  'EventTarget',\n  'Window',\n  'Node',\n  'ApplicationCache',\n  'AudioTrackList',\n  'BroadcastChannel',\n  'ChannelMergerNode',\n  'CryptoOperation',\n  'EventSource',\n  'FileReader',\n  'HTMLUnknownElement',\n  'IDBDatabase',\n  'IDBRequest',\n  'IDBTransaction',\n  'KeyOperation',\n  'MediaController',\n  'MessagePort',\n  'ModalWindow',\n  'Notification',\n  'SVGElementInstance',\n  'Screen',\n  'SharedWorker',\n  'TextTrack',\n  'TextTrackCue',\n  'TextTrackList',\n  'WebSocket',\n  'WebSocketWorker',\n  'Worker',\n  'XMLHttpRequest',\n  'XMLHttpRequestEventTarget',\n  'XMLHttpRequestUpload',\n];\n\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\nconst _browserApiErrorsIntegration = ((options = {}) => {\n  const _options = {\n    XMLHttpRequest: true,\n    eventTarget: true,\n    requestAnimationFrame: true,\n    setInterval: true,\n    setTimeout: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    // TODO: This currently only works for the first client this is setup\n    // We may want to adjust this to check for client etc.\n    setupOnce() {\n      if (_options.setTimeout) {\n        fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n      }\n\n      if (_options.setInterval) {\n        fill(WINDOW, 'setInterval', _wrapTimeFunction);\n      }\n\n      if (_options.requestAnimationFrame) {\n        fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n      }\n\n      if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n        fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n      }\n\n      const eventTargetOption = _options.eventTarget;\n      if (eventTargetOption) {\n        const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n        eventTarget.forEach(_wrapEventTarget);\n      }\n    },\n  };\n}) ;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\n  return function ( ...args) {\n    const originalCallback = args[0];\n    args[0] = wrap(originalCallback, {\n      mechanism: {\n        data: { function: getFunctionName(original) },\n        handled: false,\n        type: 'instrument',\n      },\n    });\n    return original.apply(this, args);\n  };\n}\n\nfunction _wrapRAF(original) {\n  return function ( callback) {\n    return original.apply(this, [\n      wrap(callback, {\n        mechanism: {\n          data: {\n            function: 'requestAnimationFrame',\n            handler: getFunctionName(original),\n          },\n          handled: false,\n          type: 'instrument',\n        },\n      }),\n    ]);\n  };\n}\n\nfunction _wrapXHR(originalSend) {\n  return function ( ...args) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const xhr = this;\n    const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n    xmlHttpRequestProps.forEach(prop => {\n      if (prop in xhr && typeof xhr[prop] === 'function') {\n        fill(xhr, prop, function (original) {\n          const wrapOptions = {\n            mechanism: {\n              data: {\n                function: prop,\n                handler: getFunctionName(original),\n              },\n              handled: false,\n              type: 'instrument',\n            },\n          };\n\n          // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n          const originalFunction = getOriginalFunction(original);\n          if (originalFunction) {\n            wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n          }\n\n          // Otherwise wrap directly\n          return wrap(original, wrapOptions);\n        });\n      }\n    });\n\n    return originalSend.apply(this, args);\n  };\n}\n\nfunction _wrapEventTarget(target) {\n  const globalObject = WINDOW ;\n  const targetObj = globalObject[target];\n  const proto = targetObj && targetObj.prototype;\n\n  // eslint-disable-next-line no-prototype-builtins\n  if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n    return;\n  }\n\n  fill(proto, 'addEventListener', function (original)\n\n {\n    return function ( eventName, fn, options) {\n      try {\n        if (isEventListenerObject(fn)) {\n          // ESlint disable explanation:\n          //  First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n          //  introduce a bug here, because bind returns a new function that doesn't have our\n          //  flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n          //  Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n          // eslint-disable-next-line @typescript-eslint/unbound-method\n          fn.handleEvent = wrap(fn.handleEvent, {\n            mechanism: {\n              data: {\n                function: 'handleEvent',\n                handler: getFunctionName(fn),\n                target,\n              },\n              handled: false,\n              type: 'instrument',\n            },\n          });\n        }\n      } catch (e2) {\n        // can sometimes get 'Permission denied to access property \"handle Event'\n      }\n\n      return original.apply(this, [\n        eventName,\n        wrap(fn, {\n          mechanism: {\n            data: {\n              function: 'addEventListener',\n              handler: getFunctionName(fn),\n              target,\n            },\n            handled: false,\n            type: 'instrument',\n          },\n        }),\n        options,\n      ]);\n    };\n  });\n\n  fill(proto, 'removeEventListener', function (originalRemoveEventListener)\n\n {\n    return function ( eventName, fn, options) {\n      /**\n       * There are 2 possible scenarios here:\n       *\n       * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n       * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n       * as a pass-through, and call original `removeEventListener` with it.\n       *\n       * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n       * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n       * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n       * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n       * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n       *\n       * When someone adds a handler prior to initialization, and then do it again, but after,\n       * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n       * to get rid of the initial handler and it'd stick there forever.\n       */\n      try {\n        const originalEventHandler = (fn ).__sentry_wrapped__;\n        if (originalEventHandler) {\n          originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n        }\n      } catch (e) {\n        // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n      }\n      return originalRemoveEventListener.call(this, eventName, fn, options);\n    };\n  });\n}\n\nfunction isEventListenerObject(obj) {\n  return typeof (obj ).handleEvent === 'function';\n}\n\nexport { browserApiErrorsIntegration };\n//# sourceMappingURL=browserapierrors.js.map\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n  return {\n    name: 'BrowserSession',\n    setupOnce() {\n      if (typeof WINDOW.document === 'undefined') {\n        DEBUG_BUILD &&\n          logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n        return;\n      }\n\n      // The session duration for browser sessions does not track a meaningful\n      // concept that can be used as a metric.\n      // Automatically captured sessions are akin to page views, and thus we\n      // discard their duration.\n      startSession({ ignoreDuration: true });\n      captureSession();\n\n      // We want to create a session for every navigation as well\n      addHistoryInstrumentationHandler(({ from, to }) => {\n        // Don't create an additional session for the initial route or if the location did not change\n        if (from !== undefined && from !== to) {\n          startSession({ ignoreDuration: true });\n          captureSession();\n        }\n      });\n    },\n  };\n});\n\nexport { browserSessionIntegration };\n//# sourceMappingURL=browsersession.js.map\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options = {}) => {\n  const _options = {\n    onerror: true,\n    onunhandledrejection: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      Error.stackTraceLimit = 50;\n    },\n    setup(client) {\n      if (_options.onerror) {\n        _installGlobalOnErrorHandler(client);\n        globalHandlerLog('onerror');\n      }\n      if (_options.onunhandledrejection) {\n        _installGlobalOnUnhandledRejectionHandler(client);\n        globalHandlerLog('onunhandledrejection');\n      }\n    },\n  };\n}) ;\n\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n  addGlobalErrorInstrumentationHandler(data => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const { msg, url, line, column, error } = data;\n\n    const event = _enhanceEventWithInitialFrame(\n      eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n      url,\n      line,\n      column,\n    );\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'onerror',\n      },\n    });\n  });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n  addGlobalUnhandledRejectionInstrumentationHandler(e => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const error = _getUnhandledRejectionError(e );\n\n    const event = isPrimitive(error)\n      ? _eventFromRejectionWithPrimitive(error)\n      : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'onunhandledrejection',\n      },\n    });\n  });\n}\n\nfunction _getUnhandledRejectionError(error) {\n  if (isPrimitive(error)) {\n    return error;\n  }\n\n  // dig the object of the rejection out of known event types\n  try {\n\n    // PromiseRejectionEvents store the object of the rejection under 'reason'\n    // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n    if ('reason' in (error )) {\n      return (error ).reason;\n    }\n\n    // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n    // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n    // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n    // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n    // https://github.com/getsentry/sentry-javascript/issues/2380\n    if ('detail' in (error ) && 'reason' in (error ).detail) {\n      return (error ).detail.reason;\n    }\n  } catch (e2) {} // eslint-disable-line no-empty\n\n  return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n  return {\n    exception: {\n      values: [\n        {\n          type: 'UnhandledRejection',\n          // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n          value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n        },\n      ],\n    },\n  };\n}\n\nfunction _enhanceEventWithInitialFrame(\n  event,\n  url,\n  line,\n  column,\n) {\n  // event.exception\n  const e = (event.exception = event.exception || {});\n  // event.exception.values\n  const ev = (e.values = e.values || []);\n  // event.exception.values[0]\n  const ev0 = (ev[0] = ev[0] || {});\n  // event.exception.values[0].stacktrace\n  const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n  // event.exception.values[0].stacktrace.frames\n  const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n  const colno = column;\n  const lineno = line;\n  const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n  // event.exception.values[0].stacktrace.frames\n  if (ev0sf.length === 0) {\n    ev0sf.push({\n      colno,\n      filename,\n      function: UNKNOWN_FUNCTION,\n      in_app: true,\n      lineno,\n    });\n  }\n\n  return event;\n}\n\nfunction globalHandlerLog(type) {\n  DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions() {\n  const client = getClient();\n  const options = (client && client.getOptions()) || {\n    stackParser: () => [],\n    attachStacktrace: false,\n  };\n  return options;\n}\n\nexport { globalHandlersIntegration };\n//# sourceMappingURL=globalhandlers.js.map\n","import { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n  return {\n    name: 'HttpContext',\n    preprocessEvent(event) {\n      // if none of the information we want exists, don't bother\n      if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n        return;\n      }\n\n      // grab as much info as exists and add it to the event\n      const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n      const { referrer } = WINDOW.document || {};\n      const { userAgent } = WINDOW.navigator || {};\n\n      const headers = {\n        ...(event.request && event.request.headers),\n        ...(referrer && { Referer: referrer }),\n        ...(userAgent && { 'User-Agent': userAgent }),\n      };\n      const request = { ...event.request, ...(url && { url }), headers };\n\n      event.request = request;\n    },\n  };\n});\n\nexport { httpContextIntegration };\n//# sourceMappingURL=httpcontext.js.map\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n  const limit = options.limit || DEFAULT_LIMIT;\n  const key = options.key || DEFAULT_KEY;\n\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event, hint, client) {\n      const options = client.getOptions();\n\n      applyAggregateErrorsToEvent(\n        // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n        exceptionFromError,\n        options.stackParser,\n        options.maxValueLength,\n        key,\n        limit,\n        event,\n        hint,\n      );\n    },\n  };\n}) ;\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n//# sourceMappingURL=linkederrors.js.map\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getClient } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(options) {\n  /**\n   * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n   * `getDefaultIntegrations` but with an adjusted set of integrations.\n   */\n  const integrations = [\n    inboundFiltersIntegration(),\n    functionToStringIntegration(),\n    browserApiErrorsIntegration(),\n    breadcrumbsIntegration(),\n    globalHandlersIntegration(),\n    linkedErrorsIntegration(),\n    dedupeIntegration(),\n    httpContextIntegration(),\n  ];\n\n  // eslint-disable-next-line deprecation/deprecation\n  if (options.autoSessionTracking !== false) {\n    integrations.push(browserSessionIntegration());\n  }\n\n  return integrations;\n}\n\nfunction applyDefaultOptions(optionsArg = {}) {\n  const defaultOptions = {\n    defaultIntegrations: getDefaultIntegrations(optionsArg),\n    release:\n      typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n        ? __SENTRY_RELEASE__\n        : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n          ? WINDOW.SENTRY_RELEASE.id\n          : undefined,\n    autoSessionTracking: true,\n    sendClientReports: true,\n  };\n\n  // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n  // call `dropUndefinedKeys` on the entire `optionsArg`.\n  // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n  // first as it differentiates between `undefined` and the key not being in the object.\n  if (optionsArg.defaultIntegrations == null) {\n    delete optionsArg.defaultIntegrations;\n  }\n\n  return { ...defaultOptions, ...optionsArg };\n}\n\nfunction shouldShowBrowserExtensionError() {\n  const windowWithMaybeExtension =\n    typeof WINDOW.window !== 'undefined' && (WINDOW );\n  if (!windowWithMaybeExtension) {\n    // No need to show the error if we're not in a browser window environment (e.g. service workers)\n    return false;\n  }\n\n  const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n  const extensionObject = windowWithMaybeExtension[extensionKey];\n\n  const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n  const href = (WINDOW.location && WINDOW.location.href) || '';\n\n  const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n  // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n  const isDedicatedExtensionPage =\n    !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n  // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n  // see: https://github.com/getsentry/sentry-javascript/issues/12668\n  const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n  return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n *   dsn: '__DSN__',\n *   // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n *   message: 'My Breadcrumb',\n *   // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n *   message: 'Manual',\n *   stacktrace: [\n *     // ...\n *   ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(browserOptions = {}) {\n  const options = applyDefaultOptions(browserOptions);\n\n  if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(\n        '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n      );\n    });\n    return;\n  }\n\n  if (DEBUG_BUILD) {\n    if (!supportsFetch()) {\n      logger.warn(\n        'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n      );\n    }\n  }\n  const clientOptions = {\n    ...options,\n    stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n    integrations: getIntegrationsToSetup(options),\n    transport: options.transport || makeFetchTransport,\n  };\n\n  return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * All properties the report dialog supports\n */\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}) {\n  // doesn't work without a document (React Native)\n  if (!WINDOW.document) {\n    DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n    return;\n  }\n\n  const scope = getCurrentScope();\n  const client = scope.getClient();\n  const dsn = client && client.getDsn();\n\n  if (!dsn) {\n    DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n    return;\n  }\n\n  if (scope) {\n    options.user = {\n      ...scope.getUser(),\n      ...options.user,\n    };\n  }\n\n  if (!options.eventId) {\n    const eventId = lastEventId();\n    if (eventId) {\n      options.eventId = eventId;\n    }\n  }\n\n  const script = WINDOW.document.createElement('script');\n  script.async = true;\n  script.crossOrigin = 'anonymous';\n  script.src = getReportDialogEndpoint(dsn, options);\n\n  if (options.onLoad) {\n    script.onload = options.onLoad;\n  }\n\n  const { onClose } = options;\n  if (onClose) {\n    const reportDialogClosedMessageHandler = (event) => {\n      if (event.data === '__sentry_reportdialog_closed__') {\n        try {\n          onClose();\n        } finally {\n          WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n        }\n      }\n    };\n    WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n  }\n\n  const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n  if (injectionPoint) {\n    injectionPoint.appendChild(script);\n  } else {\n    DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n  }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n  // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n  callback();\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nfunction captureUserFeedback(feedback) {\n  const client = getClient();\n  if (client) {\n    // eslint-disable-next-line deprecation/deprecation\n    client.captureUserFeedback(feedback);\n  }\n}\n\nexport { captureUserFeedback, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n//# sourceMappingURL=sdk.js.map\n","import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasTracingEnabled, setHttpStatus, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getTraceData, stringMatchesSomePattern } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/** Options for Request Instrumentation */\n\nconst responseToSpanId = new WeakMap();\nconst spanIdToEndTimestamp = new Map();\n\nconst defaultRequestInstrumentationOptions = {\n  traceFetch: true,\n  traceXHR: true,\n  enableHTTPTimings: true,\n  trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests  */\nfunction instrumentOutgoingRequests(client, _options) {\n  const {\n    traceFetch,\n    traceXHR,\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    tracePropagationTargets,\n  } = {\n    traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n    traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n    trackFetchStreamPerformance: defaultRequestInstrumentationOptions.trackFetchStreamPerformance,\n    ..._options,\n  };\n\n  const shouldCreateSpan =\n    typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n  const shouldAttachHeadersWithTargets = (url) => shouldAttachHeaders(url, tracePropagationTargets);\n\n  const spans = {};\n\n  if (traceFetch) {\n    // Keeping track of http requests, whose body payloads resolved later than the initial resolved request\n    // e.g. streaming using server sent events (SSE)\n    client.addEventProcessor(event => {\n      if (event.type === 'transaction' && event.spans) {\n        event.spans.forEach(span => {\n          if (span.op === 'http.client') {\n            const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id);\n            if (updatedTimestamp) {\n              span.timestamp = updatedTimestamp / 1000;\n              spanIdToEndTimestamp.delete(span.span_id);\n            }\n          }\n        });\n      }\n      return event;\n    });\n\n    if (trackFetchStreamPerformance) {\n      addFetchEndInstrumentationHandler(handlerData => {\n        if (handlerData.response) {\n          const span = responseToSpanId.get(handlerData.response);\n          if (span && handlerData.endTimestamp) {\n            spanIdToEndTimestamp.set(span, handlerData.endTimestamp);\n          }\n        }\n      });\n    }\n\n    addFetchInstrumentationHandler(handlerData => {\n      const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n\n      if (handlerData.response && handlerData.fetchData.__span) {\n        responseToSpanId.set(handlerData.response, handlerData.fetchData.__span);\n      }\n\n      // We cannot use `window.location` in the generic fetch instrumentation,\n      // but we need it for reliable `server.address` attribute.\n      // so we extend this in here\n      if (createdSpan) {\n        const fullUrl = getFullURL(handlerData.fetchData.url);\n        const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n        createdSpan.setAttributes({\n          'http.url': fullUrl,\n          'server.address': host,\n        });\n      }\n\n      if (enableHTTPTimings && createdSpan) {\n        addHTTPTimings(createdSpan);\n      }\n    });\n  }\n\n  if (traceXHR) {\n    addXhrInstrumentationHandler(handlerData => {\n      const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n      if (enableHTTPTimings && createdSpan) {\n        addHTTPTimings(createdSpan);\n      }\n    });\n  }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n  return (\n    entry.entryType === 'resource' &&\n    'initiatorType' in entry &&\n    typeof (entry ).nextHopProtocol === 'string' &&\n    (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n  );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n  const { url } = spanToJSON(span).data || {};\n\n  if (!url || typeof url !== 'string') {\n    return;\n  }\n\n  const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n    entries.forEach(entry => {\n      if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n        const spanData = resourceTimingEntryToSpanData(entry);\n        spanData.forEach(data => span.setAttribute(...data));\n        // In the next tick, clean this handler up\n        // We have to wait here because otherwise this cleans itself up before it is fully done\n        setTimeout(cleanup);\n      }\n    });\n  });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n  let name = 'unknown';\n  let version = 'unknown';\n  let _name = '';\n  for (const char of nextHopProtocol) {\n    // http/1.1 etc.\n    if (char === '/') {\n      [name, version] = nextHopProtocol.split('/') ;\n      break;\n    }\n    // h2, h3 etc.\n    if (!isNaN(Number(char))) {\n      name = _name === 'h' ? 'http' : _name;\n      version = nextHopProtocol.split(_name)[1] ;\n      break;\n    }\n    _name += char;\n  }\n  if (_name === nextHopProtocol) {\n    // webrtc, ftp, etc.\n    name = _name;\n  }\n  return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n  return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n  const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n  const timingSpanData = [];\n\n  timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n  if (!browserPerformanceTimeOrigin) {\n    return timingSpanData;\n  }\n  return [\n    ...timingSpanData,\n    ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n    ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n    ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n    ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n    ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n    ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n    ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n    ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n    ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n    ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n  ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * We only export this function for testing purposes.\n */\nfunction shouldAttachHeaders(\n  targetUrl,\n  tracePropagationTargets,\n) {\n  // window.location.href not being defined is an edge case in the browser but we need to handle it.\n  // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n  const href = WINDOW.location && WINDOW.location.href;\n\n  if (!href) {\n    // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n    // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n    // so we need a to exclude those requests, because they might be cross origin.\n    const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n    if (!tracePropagationTargets) {\n      return isRelativeSameOriginRequest;\n    } else {\n      return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n    }\n  } else {\n    let resolvedUrl;\n    let currentOrigin;\n\n    // URL parsing may fail, we default to not attaching trace headers in that case.\n    try {\n      resolvedUrl = new URL(targetUrl, href);\n      currentOrigin = new URL(href).origin;\n    } catch (e) {\n      return false;\n    }\n\n    const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n    if (!tracePropagationTargets) {\n      return isSameOriginRequest;\n    } else {\n      return (\n        stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n        (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n      );\n    }\n  }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction xhrCallback(\n  handlerData,\n  shouldCreateSpan,\n  shouldAttachHeaders,\n  spans,\n) {\n  const xhr = handlerData.xhr;\n  const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n  if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n    return undefined;\n  }\n\n  const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(sentryXhrData.url);\n\n  // check first if the request has finished and is tracked by an existing span which should now end\n  if (handlerData.endTimestamp && shouldCreateSpanResult) {\n    const spanId = xhr.__sentry_xhr_span_id__;\n    if (!spanId) return;\n\n    const span = spans[spanId];\n    if (span && sentryXhrData.status_code !== undefined) {\n      setHttpStatus(span, sentryXhrData.status_code);\n      span.end();\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n    return undefined;\n  }\n\n  const fullUrl = getFullURL(sentryXhrData.url);\n  const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n  const hasParent = !!getActiveSpan();\n\n  const span =\n    shouldCreateSpanResult && hasParent\n      ? startInactiveSpan({\n          name: `${sentryXhrData.method} ${sentryXhrData.url}`,\n          attributes: {\n            type: 'xhr',\n            'http.method': sentryXhrData.method,\n            'http.url': fullUrl,\n            url: sentryXhrData.url,\n            'server.address': host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n  spans[xhr.__sentry_xhr_span_id__] = span;\n\n  if (shouldAttachHeaders(sentryXhrData.url)) {\n    addTracingHeadersToXhrRequest(\n      xhr,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasTracingEnabled() && hasParent ? span : undefined,\n    );\n  }\n\n  return span;\n}\n\nfunction addTracingHeadersToXhrRequest(xhr, span) {\n  const { 'sentry-trace': sentryTrace, baggage } = getTraceData({ span });\n\n  if (sentryTrace) {\n    setHeaderOnXhr(xhr, sentryTrace, baggage);\n  }\n}\n\nfunction setHeaderOnXhr(\n  xhr,\n  sentryTraceHeader,\n  sentryBaggageHeader,\n) {\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n    if (sentryBaggageHeader) {\n      // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n      // We can therefore simply set a baggage header without checking what was there before\n      // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      xhr.setRequestHeader('baggage', sentryBaggageHeader);\n    }\n  } catch (_) {\n    // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n  }\n}\n\nfunction getFullURL(url) {\n  try {\n    // By adding a base URL to new URL(), this will also work for relative urls\n    // If `url` is a full URL, the base URL is ignored anyhow\n    const parsed = new URL(url, WINDOW.location.origin);\n    return parsed.href;\n  } catch (e2) {\n    return undefined;\n  }\n}\n\nexport { defaultRequestInstrumentationOptions, extractNetworkProtocol, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { getActiveSpan, getRootSpan, spanToJSON, logger, SPAN_STATUS_ERROR } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n  if (WINDOW && WINDOW.document) {\n    WINDOW.document.addEventListener('visibilitychange', () => {\n      const activeSpan = getActiveSpan();\n      if (!activeSpan) {\n        return;\n      }\n\n      const rootSpan = getRootSpan(activeSpan);\n\n      if (WINDOW.document.hidden && rootSpan) {\n        const cancelledStatus = 'cancelled';\n\n        const { op, status } = spanToJSON(rootSpan);\n\n        if (DEBUG_BUILD) {\n          logger.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n        }\n\n        // We should not set status if it is already set, this prevent important statuses like\n        // error or data loss from being overwritten on transaction.\n        if (!status) {\n          rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n        }\n\n        rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n        rootSpan.end();\n      }\n    });\n  } else {\n    DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n  }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","import { startTrackingWebVitals, startTrackingINP, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingInteractions, addHistoryInstrumentationHandler, registerInpInteractionListener, addPerformanceEntries } from '@sentry-internal/browser-utils';\nimport { TRACING_DEFAULTS, registerSpanErrorInstrumentation, GLOBAL_OBJ, getClient, propagationContextFromHeaders, getCurrentScope, spanToJSON, getRootSpan, spanIsSampled, getDynamicSamplingContextFromSpan, browserPerformanceTimeOrigin, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan, getIsolationScope, generateTraceId, getDomElement, startIdleSpan, logger, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\n\n/* eslint-disable max-lines */\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n  ...TRACING_DEFAULTS,\n  instrumentNavigation: true,\n  instrumentPageLoad: true,\n  markBackgroundSpan: true,\n  enableLongTask: true,\n  enableLongAnimationFrame: true,\n  enableInp: true,\n  _experiments: {},\n  ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nconst browserTracingIntegration = ((_options = {}) => {\n  registerSpanErrorInstrumentation();\n\n  const {\n    enableInp,\n    enableLongTask,\n    enableLongAnimationFrame,\n    _experiments: { enableInteractions, enableStandaloneClsSpans },\n    beforeStartSpan,\n    idleTimeout,\n    finalTimeout,\n    childSpanTimeout,\n    markBackgroundSpan,\n    traceFetch,\n    traceXHR,\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    instrumentPageLoad,\n    instrumentNavigation,\n  } = {\n    ...DEFAULT_BROWSER_TRACING_OPTIONS,\n    ..._options,\n  };\n\n  const _collectWebVitals = startTrackingWebVitals({ recordClsStandaloneSpans: enableStandaloneClsSpans || false });\n\n  if (enableInp) {\n    startTrackingINP();\n  }\n\n  if (\n    enableLongAnimationFrame &&\n    GLOBAL_OBJ.PerformanceObserver &&\n    PerformanceObserver.supportedEntryTypes &&\n    PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')\n  ) {\n    startTrackingLongAnimationFrames();\n  } else if (enableLongTask) {\n    startTrackingLongTasks();\n  }\n\n  if (enableInteractions) {\n    startTrackingInteractions();\n  }\n\n  const latestRoute = {\n    name: undefined,\n    source: undefined,\n  };\n\n  /** Create routing idle transaction. */\n  function _createRouteSpan(client, startSpanOptions) {\n    const isPageloadTransaction = startSpanOptions.op === 'pageload';\n\n    const finalStartSpanOptions = beforeStartSpan\n      ? beforeStartSpan(startSpanOptions)\n      : startSpanOptions;\n\n    const attributes = finalStartSpanOptions.attributes || {};\n\n    // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n    // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n    if (startSpanOptions.name !== finalStartSpanOptions.name) {\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n      finalStartSpanOptions.attributes = attributes;\n    }\n\n    latestRoute.name = finalStartSpanOptions.name;\n    latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    const idleSpan = startIdleSpan(finalStartSpanOptions, {\n      idleTimeout,\n      finalTimeout,\n      childSpanTimeout,\n      // should wait for finish signal if it's a pageload transaction\n      disableAutoFinish: isPageloadTransaction,\n      beforeSpanEnd: span => {\n        _collectWebVitals();\n        addPerformanceEntries(span, { recordClsOnPageloadSpan: !enableStandaloneClsSpans });\n      },\n    });\n\n    function emitFinish() {\n      if (['interactive', 'complete'].includes(WINDOW.document.readyState)) {\n        client.emit('idleSpanEnableAutoFinish', idleSpan);\n      }\n    }\n\n    if (isPageloadTransaction && WINDOW.document) {\n      WINDOW.document.addEventListener('readystatechange', () => {\n        emitFinish();\n      });\n\n      emitFinish();\n    }\n\n    return idleSpan;\n  }\n\n  return {\n    name: BROWSER_TRACING_INTEGRATION_ID,\n    afterAllSetup(client) {\n      let activeSpan;\n      let startingUrl = WINDOW.location && WINDOW.location.href;\n\n      function maybeEndActiveSpan() {\n        if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n          DEBUG_BUILD && logger.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n          // If there's an open active span, we need to finish it before creating an new one.\n          activeSpan.end();\n        }\n      }\n\n      client.on('startNavigationSpan', startSpanOptions => {\n        if (getClient() !== client) {\n          return;\n        }\n\n        maybeEndActiveSpan();\n\n        activeSpan = _createRouteSpan(client, {\n          op: 'navigation',\n          ...startSpanOptions,\n        });\n      });\n\n      client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n        if (getClient() !== client) {\n          return;\n        }\n        maybeEndActiveSpan();\n\n        const sentryTrace = traceOptions.sentryTrace || getMetaContent('sentry-trace');\n        const baggage = traceOptions.baggage || getMetaContent('baggage');\n\n        const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n        getCurrentScope().setPropagationContext(propagationContext);\n\n        activeSpan = _createRouteSpan(client, {\n          op: 'pageload',\n          ...startSpanOptions,\n        });\n      });\n\n      // A trace should to stay the consistent over the entire time span of one route.\n      // Therefore, when the initial pageload or navigation root span ends, we update the\n      // scope's propagation context to keep span-specific attributes like the `sampled` decision and\n      // the dynamic sampling context valid, even after the root span has ended.\n      // This ensures that the trace data is consistent for the entire duration of the route.\n      client.on('spanEnd', span => {\n        const op = spanToJSON(span).op;\n        if (span !== getRootSpan(span) || (op !== 'navigation' && op !== 'pageload')) {\n          return;\n        }\n\n        const scope = getCurrentScope();\n        const oldPropagationContext = scope.getPropagationContext();\n\n        scope.setPropagationContext({\n          ...oldPropagationContext,\n          sampled: oldPropagationContext.sampled !== undefined ? oldPropagationContext.sampled : spanIsSampled(span),\n          dsc: oldPropagationContext.dsc || getDynamicSamplingContextFromSpan(span),\n        });\n      });\n\n      if (WINDOW.location) {\n        if (instrumentPageLoad) {\n          startBrowserTracingPageLoadSpan(client, {\n            name: WINDOW.location.pathname,\n            // pageload should always start at timeOrigin (and needs to be in s, not ms)\n            startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n            attributes: {\n              [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n            },\n          });\n        }\n\n        if (instrumentNavigation) {\n          addHistoryInstrumentationHandler(({ to, from }) => {\n            /**\n             * This early return is there to account for some cases where a navigation transaction starts right after\n             * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n             * create an uneccessary navigation transaction.\n             *\n             * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n             * only be caused in certain development environments where the usage of a hot module reloader is causing\n             * errors.\n             */\n            if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n              startingUrl = undefined;\n              return;\n            }\n\n            if (from !== to) {\n              startingUrl = undefined;\n              startBrowserTracingNavigationSpan(client, {\n                name: WINDOW.location.pathname,\n                attributes: {\n                  [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n                  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n                },\n              });\n            }\n          });\n        }\n      }\n\n      if (markBackgroundSpan) {\n        registerBackgroundTabDetection();\n      }\n\n      if (enableInteractions) {\n        registerInteractionListener(idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n      }\n\n      if (enableInp) {\n        registerInpInteractionListener();\n      }\n\n      instrumentOutgoingRequests(client, {\n        traceFetch,\n        traceXHR,\n        trackFetchStreamPerformance,\n        tracePropagationTargets: client.getOptions().tracePropagationTargets,\n        shouldCreateSpanForRequest,\n        enableHTTPTimings,\n      });\n    },\n  };\n}) ;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the <meta> tags.\n */\nfunction startBrowserTracingPageLoadSpan(\n  client,\n  spanOptions,\n  traceOptions,\n) {\n  client.emit('startPageLoadSpan', spanOptions, traceOptions);\n\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const span = getActiveSpan();\n  const op = span && spanToJSON(span).op;\n  return op === 'pageload' ? span : undefined;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nfunction startBrowserTracingNavigationSpan(client, spanOptions) {\n  getIsolationScope().setPropagationContext({ traceId: generateTraceId() });\n  getCurrentScope().setPropagationContext({ traceId: generateTraceId() });\n\n  client.emit('startNavigationSpan', spanOptions);\n\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const span = getActiveSpan();\n  const op = span && spanToJSON(span).op;\n  return op === 'navigation' ? span : undefined;\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n  // Can't specify generic to `getDomElement` because tracing can be used\n  // in a variety of environments, have to disable `no-unsafe-member-access`\n  // as a result.\n  // eslint-disable-next-line deprecation/deprecation\n  const metaTag = getDomElement(`meta[name=${metaName}]`);\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n  idleTimeout,\n  finalTimeout,\n  childSpanTimeout,\n  latestRoute,\n) {\n  let inflightInteractionSpan;\n  const registerInteractionTransaction = () => {\n    const op = 'ui.action.click';\n\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    if (rootSpan) {\n      const currentRootSpanOp = spanToJSON(rootSpan).op;\n      if (['navigation', 'pageload'].includes(currentRootSpanOp )) {\n        DEBUG_BUILD &&\n          logger.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n        return undefined;\n      }\n    }\n\n    if (inflightInteractionSpan) {\n      inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n      inflightInteractionSpan.end();\n      inflightInteractionSpan = undefined;\n    }\n\n    if (!latestRoute.name) {\n      DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n      return undefined;\n    }\n\n    inflightInteractionSpan = startIdleSpan(\n      {\n        name: latestRoute.name,\n        op,\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n        },\n      },\n      {\n        idleTimeout,\n        finalTimeout,\n        childSpanTimeout,\n      },\n    );\n  };\n\n  if (WINDOW.document) {\n    addEventListener('click', registerInteractionTransaction, { once: false, capture: true });\n  }\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, browserTracingIntegration, getMetaContent, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan };\n//# sourceMappingURL=browserTracingIntegration.js.map\n","const DEFAULT_HOOKS = ['activate', 'mount', 'update'];\n\nexport { DEFAULT_HOOKS };\n//# sourceMappingURL=constants.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","// Vendored from https://github.com/vuejs/vue/blob/612fb89547711cacb030a3893a0065b785802860/src/core/util/debug.js\n// with types only changes.\n\n// The MIT License (MIT)\n\n// Copyright (c) 2013-present, Yuxi (Evan) You\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n\nconst ROOT_COMPONENT_NAME = '<Root>';\nconst ANONYMOUS_COMPONENT_NAME = '<Anonymous>';\n\nconst repeat = (str, n) => {\n  return str.repeat(n);\n};\n\nconst formatComponentName = (vm, includeFile) => {\n  if (!vm) {\n    return ANONYMOUS_COMPONENT_NAME;\n  }\n\n  if (vm.$root === vm) {\n    return ROOT_COMPONENT_NAME;\n  }\n\n  // https://github.com/getsentry/sentry-javascript/issues/5204 $options can be undefined\n  if (!vm.$options) {\n    return ANONYMOUS_COMPONENT_NAME;\n  }\n\n  const options = vm.$options;\n\n  let name = options.name || options._componentTag || options.__name;\n  const file = options.__file;\n  if (!name && file) {\n    const match = file.match(/([^/\\\\]+)\\.vue$/);\n    if (match) {\n      name = match[1];\n    }\n  }\n\n  return (\n    (name ? `<${classify(name)}>` : ANONYMOUS_COMPONENT_NAME) + (file && includeFile !== false ? ` at ${file}` : '')\n  );\n};\n\nconst generateComponentTrace = (vm) => {\n  if (vm && (vm._isVue || vm.__isVue) && vm.$parent) {\n    const tree = [];\n    let currentRecursiveSequence = 0;\n    while (vm) {\n      if (tree.length > 0) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const last = tree[tree.length - 1] ;\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n        if (last.constructor === vm.constructor) {\n          currentRecursiveSequence++;\n          vm = vm.$parent; // eslint-disable-line no-param-reassign\n          continue;\n        } else if (currentRecursiveSequence > 0) {\n          tree[tree.length - 1] = [last, currentRecursiveSequence];\n          currentRecursiveSequence = 0;\n        }\n      }\n      tree.push(vm);\n      vm = vm.$parent; // eslint-disable-line no-param-reassign\n    }\n\n    const formattedTree = tree\n      .map(\n        (vm, i) =>\n          `${\n            (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) +\n            (Array.isArray(vm)\n              ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n              : formatComponentName(vm))\n          }`,\n      )\n      .join('\\n');\n\n    return `\\n\\nfound in\\n\\n${formattedTree}`;\n  }\n\n  return `\\n\\n(found in ${formatComponentName(vm)})`;\n};\n\nexport { formatComponentName, generateComponentTrace };\n//# sourceMappingURL=components.js.map\n","import { captureException, consoleSandbox } from '@sentry/core';\nimport { formatComponentName, generateComponentTrace } from './vendor/components.js';\n\nconst attachErrorHandler = (app, options) => {\n  const { errorHandler: originalErrorHandler, warnHandler, silent } = app.config;\n\n  app.config.errorHandler = (error, vm, lifecycleHook) => {\n    const componentName = formatComponentName(vm, false);\n    const trace = vm ? generateComponentTrace(vm) : '';\n    const metadata = {\n      componentName,\n      lifecycleHook,\n      trace,\n    };\n\n    if (options.attachProps && vm) {\n      // Vue2 - $options.propsData\n      // Vue3 - $props\n      if (vm.$options && vm.$options.propsData) {\n        metadata.propsData = vm.$options.propsData;\n      } else if (vm.$props) {\n        metadata.propsData = vm.$props;\n      }\n    }\n\n    // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n    setTimeout(() => {\n      captureException(error, {\n        captureContext: { contexts: { vue: metadata } },\n        mechanism: { handled: !!originalErrorHandler, type: 'vue' },\n      });\n    });\n\n    // Check if the current `app.config.errorHandler` is explicitly set by the user before calling it.\n    if (typeof originalErrorHandler === 'function' && app.config.errorHandler) {\n      (originalErrorHandler ).call(app, error, vm, lifecycleHook);\n    } // TODO(v9): Always throw when no user-defined error handler is provided (this will log the error to the console as well). Delete the Code with logErrors below\n    /* else {\n      throw error;\n    } */\n\n    if (!originalErrorHandler) {\n      throw error;\n      // eslint-disable-next-line deprecation/deprecation\n    } else if (options.logErrors) {\n      const hasConsole = typeof console !== 'undefined';\n      const message = `Error in ${lifecycleHook}: \"${error && error.toString()}\"`;\n\n      if (warnHandler) {\n        (warnHandler ).call(null, message, vm, trace);\n      } else if (hasConsole && !silent) {\n        consoleSandbox(() => {\n          // eslint-disable-next-line no-console\n          console.error(`[Vue warn]: ${message}${trace}`);\n        });\n      }\n    }\n  };\n};\n\nexport { attachErrorHandler };\n//# sourceMappingURL=errorhandler.js.map\n","import { startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan } from '@sentry/browser';\nimport { logger, timestampInSeconds } from '@sentry/core';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { formatComponentName } from './vendor/components.js';\n\nconst VUE_OP = 'ui.vue';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS = {\n  activate: ['activated', 'deactivated'],\n  create: ['beforeCreate', 'created'],\n  // Vue 3\n  unmount: ['beforeUnmount', 'unmounted'],\n  // Vue 2\n  destroy: ['beforeDestroy', 'destroyed'],\n  mount: ['beforeMount', 'mounted'],\n  update: ['beforeUpdate', 'updated'],\n};\n\n/** Finish top-level span and activity with a debounce configured using `timeout` option */\nfunction finishRootSpan(vm, timestamp, timeout) {\n  if (vm.$_sentryRootSpanTimer) {\n    clearTimeout(vm.$_sentryRootSpanTimer);\n  }\n\n  vm.$_sentryRootSpanTimer = setTimeout(() => {\n    if (vm.$root && vm.$root.$_sentryRootSpan) {\n      vm.$root.$_sentryRootSpan.end(timestamp);\n      vm.$root.$_sentryRootSpan = undefined;\n    }\n  }, timeout);\n}\n\n/** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */\nfunction findTrackComponent(trackComponents, formattedName) {\n  function extractComponentName(name) {\n    return name.replace(/^<([^\\s]*)>(?: at [^\\s]*)?$/, '$1');\n  }\n\n  const isMatched = trackComponents.some(compo => {\n    return extractComponentName(formattedName) === extractComponentName(compo);\n  });\n\n  return isMatched;\n}\n\nconst createTracingMixins = (options) => {\n  const hooks = (options.hooks || [])\n    .concat(DEFAULT_HOOKS)\n    // Removing potential duplicates\n    .filter((value, index, self) => self.indexOf(value) === index);\n\n  const mixins = {};\n\n  for (const operation of hooks) {\n    // Retrieve corresponding hooks from Vue lifecycle.\n    // eg. mount => ['beforeMount', 'mounted']\n    const internalHooks = HOOKS[operation];\n    if (!internalHooks) {\n      DEBUG_BUILD && logger.warn(`Unknown hook: ${operation}`);\n      continue;\n    }\n\n    for (const internalHook of internalHooks) {\n      mixins[internalHook] = function () {\n        const isRoot = this.$root === this;\n\n        if (isRoot) {\n          this.$_sentryRootSpan =\n            this.$_sentryRootSpan ||\n            startInactiveSpan({\n              name: 'Application Render',\n              op: `${VUE_OP}.render`,\n              attributes: {\n                [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',\n              },\n              onlyIfParent: true,\n            });\n        }\n\n        // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n        const name = formatComponentName(this, false);\n\n        const shouldTrack = Array.isArray(options.trackComponents)\n          ? findTrackComponent(options.trackComponents, name)\n          : options.trackComponents;\n\n        // We always want to track root component\n        if (!isRoot && !shouldTrack) {\n          return;\n        }\n\n        this.$_sentrySpans = this.$_sentrySpans || {};\n\n        // Start a new span if current hook is a 'before' hook.\n        // Otherwise, retrieve the current span and finish it.\n        if (internalHook == internalHooks[0]) {\n          const activeSpan = (this.$root && this.$root.$_sentryRootSpan) || getActiveSpan();\n          if (activeSpan) {\n            // Cancel old span for this hook operation in case it didn't get cleaned up. We're not actually sure if it\n            // will ever be the case that cleanup hooks re not called, but we had users report that spans didn't get\n            // finished so we finish the span before starting a new one, just to be sure.\n            const oldSpan = this.$_sentrySpans[operation];\n            if (oldSpan) {\n              oldSpan.end();\n            }\n\n            this.$_sentrySpans[operation] = startInactiveSpan({\n              name: `Vue ${name}`,\n              op: `${VUE_OP}.${operation}`,\n              attributes: {\n                [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',\n              },\n              // UI spans should only be created if there is an active root span (transaction)\n              onlyIfParent: true,\n            });\n          }\n        } else {\n          // The span should already be added via the first handler call (in the 'before' hook)\n          const span = this.$_sentrySpans[operation];\n          // The before hook did not start the tracking span, so the span was not added.\n          // This is probably because it happened before there is an active transaction\n          if (!span) return;\n          span.end();\n\n          finishRootSpan(this, timestampInSeconds(), options.timeout);\n        }\n      };\n    }\n  }\n\n  return mixins;\n};\n\nexport { createTracingMixins, findTrackComponent };\n//# sourceMappingURL=tracing.js.map\n","import { defineIntegration, consoleSandbox, hasTracingEnabled, GLOBAL_OBJ } from '@sentry/core';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { attachErrorHandler } from './errorhandler.js';\nimport { createTracingMixins } from './tracing.js';\n\nconst globalWithVue = GLOBAL_OBJ ;\n\nconst DEFAULT_CONFIG = {\n  Vue: globalWithVue.Vue,\n  attachProps: true,\n  logErrors: true,\n  attachErrorHandler: true,\n  hooks: DEFAULT_HOOKS,\n  timeout: 2000,\n  trackComponents: false,\n};\n\nconst INTEGRATION_NAME = 'Vue';\n\nconst vueIntegration = defineIntegration((integrationOptions = {}) => {\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      const options = { ...DEFAULT_CONFIG, ...client.getOptions(), ...integrationOptions };\n      if (!options.Vue && !options.app) {\n        consoleSandbox(() => {\n          // eslint-disable-next-line no-console\n          console.warn(\n            '[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).',\n          );\n        });\n        return;\n      }\n\n      if (options.app) {\n        const apps = Array.isArray(options.app) ? options.app : [options.app];\n        apps.forEach(app => vueInit(app, options));\n      } else if (options.Vue) {\n        vueInit(options.Vue, options);\n      }\n    },\n  };\n});\n\nconst vueInit = (app, options) => {\n  if (DEBUG_BUILD) {\n    // Check app is not mounted yet - should be mounted _after_ init()!\n    // This is _somewhat_ private, but in the case that this doesn't exist we simply ignore it\n    // See: https://github.com/vuejs/core/blob/eb2a83283caa9de0a45881d860a3cbd9d0bdd279/packages/runtime-core/src/component.ts#L394\n    const appWithInstance = app\n\n;\n\n    const isMounted = appWithInstance._instance && appWithInstance._instance.isMounted;\n    if (isMounted === true) {\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn(\n          '[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.',\n        );\n      });\n    }\n  }\n\n  if (options.attachErrorHandler) {\n    attachErrorHandler(app, options);\n  }\n\n  if (hasTracingEnabled(options)) {\n    app.mixin(\n      createTracingMixins({\n        ...options,\n        // eslint-disable-next-line deprecation/deprecation\n        ...options.tracingOptions,\n      }),\n    );\n  }\n};\n\nexport { vueIntegration };\n//# sourceMappingURL=integration.js.map\n","import { SDK_VERSION, getDefaultIntegrations, init as init$1 } from '@sentry/browser';\nimport { vueIntegration } from './integration.js';\n\n/**\n * Inits the Vue SDK\n */\nfunction init(\n  config\n\n = {},\n) {\n  const options = {\n    _metadata: {\n      sdk: {\n        name: 'sentry.javascript.vue',\n        packages: [\n          {\n            name: 'npm:@sentry/vue',\n            version: SDK_VERSION,\n          },\n        ],\n        version: SDK_VERSION,\n      },\n    },\n    defaultIntegrations: [...getDefaultIntegrations(config), vueIntegration()],\n    ...config,\n  };\n\n  return init$1(options);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","import { captureException } from '@sentry/browser';\nimport { getCurrentScope, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan, getRootSpan } from '@sentry/core';\n\n// The following type is an intersection of the Route type from VueRouter v2, v3, and v4.\n// This is not great, but kinda necessary to make it work with all versions at the same time.\n\n/**\n * Instrument the Vue router to create navigation spans.\n */\nfunction instrumentVueRouter(\n  router,\n  options\n\n,\n  startNavigationSpanFn,\n) {\n  let isFirstPageLoad = true;\n\n  router.onError(error => captureException(error, { mechanism: { handled: false } }));\n\n  router.beforeEach((to, from, next) => {\n    // According to docs we could use `from === VueRouter.START_LOCATION` but I couldn't get it working for Vue 2\n    // https://router.vuejs.org/api/#router-start-location\n    // https://next.router.vuejs.org/api/#start-location\n    // Additionally, Nuxt does not provide the possibility to check for `from.matched.length === 0` (this is never 0).\n    // Therefore, a flag was added to track the page-load: isFirstPageLoad\n\n    // from.name:\n    // - Vue 2: null\n    // - Vue 3: undefined\n    // - Nuxt: undefined\n    // hence only '==' instead of '===', because `undefined == null` evaluates to `true`\n    const isPageLoadNavigation =\n      (from.name == null && from.matched.length === 0) || (from.name === undefined && isFirstPageLoad);\n\n    if (isFirstPageLoad) {\n      isFirstPageLoad = false;\n    }\n\n    const attributes = {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.vue',\n    };\n\n    for (const key of Object.keys(to.params)) {\n      attributes[`params.${key}`] = to.params[key];\n    }\n    for (const key of Object.keys(to.query)) {\n      const value = to.query[key];\n      if (value) {\n        attributes[`query.${key}`] = value;\n      }\n    }\n\n    // Determine a name for the routing transaction and where that name came from\n    let spanName = to.path;\n    let transactionSource = 'url';\n    if (to.name && options.routeLabel !== 'path') {\n      spanName = to.name.toString();\n      transactionSource = 'custom';\n    } else if (to.matched.length > 0) {\n      const lastIndex = to.matched.length - 1;\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      spanName = to.matched[lastIndex].path;\n      transactionSource = 'route';\n    }\n\n    getCurrentScope().setTransactionName(spanName);\n\n    if (options.instrumentPageLoad && isPageLoadNavigation) {\n      const activeRootSpan = getActiveRootSpan();\n      if (activeRootSpan) {\n        const existingAttributes = spanToJSON(activeRootSpan).data || {};\n        if (existingAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== 'custom') {\n          activeRootSpan.updateName(spanName);\n          activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, transactionSource);\n        }\n        // Set router attributes on the existing pageload transaction\n        // This will override the origin, and add params & query attributes\n        activeRootSpan.setAttributes({\n          ...attributes,\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.vue',\n        });\n      }\n    }\n\n    if (options.instrumentNavigation && !isPageLoadNavigation) {\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = transactionSource;\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.navigation.vue';\n      startNavigationSpanFn({\n        name: spanName,\n        op: 'navigation',\n        attributes,\n      });\n    }\n\n    // Vue Router 4 no longer exposes the `next` function, so we need to\n    // check if it's available before calling it.\n    // `next` needs to be called in Vue Router 3 so that the hook is resolved.\n    if (next) {\n      next();\n    }\n  });\n}\n\nfunction getActiveRootSpan() {\n  const span = getActiveSpan();\n  const rootSpan = span && getRootSpan(span);\n\n  if (!rootSpan) {\n    return undefined;\n  }\n\n  const op = spanToJSON(rootSpan).op;\n\n  // Only use this root span if it is a pageload or navigation span\n  return op === 'navigation' || op === 'pageload' ? rootSpan : undefined;\n}\n\nexport { instrumentVueRouter };\n//# sourceMappingURL=router.js.map\n","import { browserTracingIntegration as browserTracingIntegration$1, startBrowserTracingNavigationSpan } from '@sentry/browser';\nimport { instrumentVueRouter } from './router.js';\n\n// The following type is an intersection of the Route type from VueRouter v2, v3, and v4.\n// This is not great, but kinda necessary to make it work with all versions at the same time.\n\n/**\n * A custom browser tracing integrations for Vue.\n */\nfunction browserTracingIntegration(options = {}) {\n  // If router is not passed, we just use the normal implementation\n  if (!options.router) {\n    return browserTracingIntegration$1(options);\n  }\n\n  const integration = browserTracingIntegration$1({\n    ...options,\n    instrumentNavigation: false,\n  });\n\n  const { router, instrumentNavigation = true, instrumentPageLoad = true, routeLabel = 'name' } = options;\n\n  return {\n    ...integration,\n    afterAllSetup(client) {\n      integration.afterAllSetup(client);\n\n      const startNavigationSpan = (options) => {\n        startBrowserTracingNavigationSpan(client, options);\n      };\n\n      instrumentVueRouter(router, { routeLabel, instrumentNavigation, instrumentPageLoad }, startNavigationSpan);\n    },\n  };\n}\n\nexport { browserTracingIntegration };\n//# sourceMappingURL=browserTracingIntegration.js.map\n","import * as Sentry from '@sentry/vue'\n\n/**\n * Error handling composable\n */\nexport function useErrorHandling() {\n\n  //Process an error\n  const processError = error => {\n\n    //Ensure error in error processing doesn't trigger an error itself\n    try {\n\n      //No error? 🤨\n      if (!error) {\n        Sentry.captureMessage(`Error is empty`)\n        return\n      }\n\n      //Ensure error is an object\n      if (typeof error !== 'object') {\n        Sentry.captureMessage(`Error is not an object: ${error}`)\n        return\n      }\n\n      //Already processed?\n      if (error.isProcessed) {\n        return\n      }\n\n      //Log to console\n      console.error(error)\n\n      //Capture in Sentry\n      if (!error.ignoreInSentry) {\n        Sentry.captureException(error)\n      }\n\n      //Flag as processed\n      error.isProcessed = true\n    }\n    catch {\n      //Fall through\n    }\n  }\n\n  //Capture a message\n  const captureMessage = message => {\n\n    //Log to console\n    console.log(message)\n\n    //Capture in Sentry\n    Sentry.captureMessage(message)\n  }\n\n  //Register global event listeners\n  const registerGlobalErrorListeners = () => {\n\n    //Add event listener for general errors outside of Vue's scope\n    window.addEventListener('error', event => {\n      if (event instanceof PromiseRejectionEvent) {\n        processError(event.reason)\n      }\n      else {\n        processError(event.error)\n      }\n    })\n\n    //Add event listener for unhandled rejections\n    window.addEventListener('unhandledrejection', event => {\n      if (event.reason && !event.reason.ignoreUnhandledRejection) {\n        processError(event.reason)\n      }\n    })\n  }\n\n  //Expose interface\n  return {\n    processError,\n    captureMessage,\n    registerGlobalErrorListeners,\n  }\n}\n","import {joinPaths, openUrl} from '@/helpers/url.js'\nimport {useEnv} from '@/composables/use-env.js'\n\n/**\n * Authentication composable\n */\nexport function useAuth() {\n\n  //Get origin\n  const {origin, href} = useEnv()\n\n  //Authenticate with redirect\n  const redirectToLogin = async () => {\n    const loginUrl = joinPaths(origin.value, 'login')\n    const redirectUrl = encodeURIComponent(href.value)\n    return openUrl(loginUrl, {redirect_url: redirectUrl})\n  }\n\n  //Expose interface\n  return {\n    redirectToLogin,\n  }\n}\n","import {http} from '@/services/http.js'\nimport {joinPaths, openUrl} from '@/helpers/url.js'\nimport {createFormData, convertKeysToCamelCase, convertKeysToSnakeCase} from '@/helpers/object.js'\nimport {valueToJSON, toSnakeCase} from '@/helpers/string.js'\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useAuth} from '@/composables/use-auth.js'\nimport {useEnv} from '@/composables/use-env.js'\n\n//Ignore keys\nconst ignoreKeys = [\n  '_destroy',\n]\n\n/**\n * Base API class\n */\nexport class BaseApi {\n\n  //Props\n  basePath = ''\n  convertParamKeys = false\n  convertDataKeys = false\n  convertJsonKeys = false\n\n  /**\n   * Generic request handler\n   */\n  async request(path, method, params, data, config) {\n    const url = await this.makeUrl(path)\n    const cfg = await this.makeRequestConfig(url, method, params, data, config)\n    return http\n      .request(url, cfg)\n      .then(json => this.convertJson(json))\n      .catch(error => this.handleError(error))\n  }\n\n  /**\n   * Handle error\n   */\n  handleError(error) {\n\n    //Extract error data\n    const {status, config} = error\n\n    //Ignore certain errors (rethrow these directly without processing or special handling)\n    if (config?.ignoreErrors?.includes(status)) {\n      console.warn(`Ignoring ${error.status} response error for ${config.method.toUpperCase()} ${config.path}`)\n      throw error\n    }\n\n    //Handle 401\n    if (status === 401) {\n      const {redirectToLogin} = useAuth()\n      return redirectToLogin()\n    }\n\n    //Run through processor\n    const {processError} = useErrorHandling()\n    processError(error)\n\n    //Rethrow so that the error can be handled by the caller\n    throw error\n  }\n\n  /**************************************************************************\n   * Convenience helper methods\n   ***/\n\n  /**\n   * Helper wrapper for generic GET requests\n   */\n  async get(path, params, config) {\n    return this.request(path, 'get', params, null, config)\n  }\n\n  /**\n   * Helper wrapper for generic POST requests\n   */\n  async post(path, data, config) {\n    return this.request(path, 'post', null, data, config)\n  }\n\n  /**\n   * Helper wrapper for generic PATCH requests\n   */\n  async patch(path, data, config) {\n    return this.request(path, 'patch', null, data, config)\n  }\n\n  /**\n   * Helper wrapper for generic PUT requests\n   */\n  async put(path, data, config) {\n    return this.request(path, 'put', null, data, config)\n  }\n\n  /**\n   * Helper wrapper for generic DELETE requests\n   */\n  async delete(path, params, config) {\n    return this.request(path, 'delete', params, null, config)\n  }\n\n  /**\n   * Helper wrapper for generic file upload requests\n   */\n  async upload(path, data, config = {}) {\n    config.timeout = config.timeout ?? false\n    config.body = this.createFormData(data)\n    return this.request(path, 'post', null, null, config)\n  }\n\n  /**************************************************************************\n   * URL opening helpers\n   ***/\n\n  /**\n   * Helper wrapper to open URL with param conversion\n   */\n  openUrl(path, params, blank = false) {\n    params = this.convertParams(params)\n    const url = this.makeUrl(path)\n    openUrl(url, params, blank)\n  }\n\n  /**\n   * Helper wrapper to download a csv with filename\n   */\n  downloadCsv(path, params, filename = 'download', blank = false) {\n    if (!filename.endsWith('.csv')) {\n      filename = `${filename}.csv`\n    }\n    params = {\n      filename,\n      ...params,\n    }\n    this.openUrl(path, params, blank)\n  }\n\n  /**************************************************************************\n   * Request helpers\n   ***/\n\n  /**\n   * Helper to make URL for a request based on relative path\n   */\n  makeUrl(path) {\n\n    //No base path\n    const {basePath} = this\n    if (!basePath) {\n      return path\n    }\n\n    //Full path is absolute\n    if (path.startsWith('https')) {\n      return path\n    }\n\n    //Base path is absolute\n    if (basePath.startsWith('https')) {\n      return joinPaths(basePath, path)\n    }\n\n    //Prepend origin\n    const {origin} = useEnv()\n    return joinPaths(origin.value, basePath, path)\n  }\n\n  /**\n   * Helper to make request config\n   */\n  async makeRequestConfig(path, method, params, data, config = {}) {\n\n    //Append data\n    config.path = path\n    config.method = method\n    config.params = this.convertParams(params)\n    config.json = this.convertData(data)\n\n    //Append default headers\n    await this.appendDefaultHeaders(config)\n\n    //Return\n    return config\n  }\n\n  /**\n   * Append default headers\n   */\n  async appendDefaultHeaders(config) {\n\n    //Ensure headers object is present\n    config.headers ??= {}\n\n    //Get marketing flag and CSRF token\n    const {getFromLocalStorage} = useLocalStorage()\n    const csrfToken = getFromLocalStorage('csrfToken')\n    const isMarketing = getFromLocalStorage('isMarketing')\n\n    //Append to headers\n    Object.assign(config.headers, {\n      'X-CSRF-Token': csrfToken,\n    })\n\n    //Marketing request flag\n    if (isMarketing) {\n      Object.assign(config.headers, {\n        'X-Marketing-Request': 'true',\n      })\n    }\n  }\n\n  /**************************************************************************\n   * Conversion helpers\n   ***/\n\n  /**\n   * Convert incoming JSON data for the front-end\n   */\n  convertJson(json) {\n\n    //No JSON\n    if (!json) {\n      return undefined\n    }\n\n    //Convert keys\n    if (this.convertJsonKeys) {\n      json = convertKeysToCamelCase(json, ignoreKeys)\n    }\n\n    //Pass on the JSON\n    return json\n  }\n\n  /**\n   * Convert outgoing data for the backend\n   */\n  convertData(data) {\n\n    //No data\n    if (!data) {\n      return undefined\n    }\n\n    //Convert to JSON\n    if (data && typeof data === 'object' && !(data instanceof FormData)) {\n      data = valueToJSON(data)\n    }\n\n    //Convert keys\n    if (this.convertDataKeys) {\n      data = convertKeysToSnakeCase(data, ignoreKeys)\n    }\n\n    //Pass on the data\n    return data\n  }\n\n  /**\n   * Convert outgoing params for the backend\n   */\n  convertParams(params) {\n\n    //No params\n    if (!params) {\n      return undefined\n    }\n\n    //Convert to JSON\n    if (params && typeof params === 'object') {\n      params = valueToJSON(params)\n    }\n\n    //Convert keys\n    if (this.convertParamKeys) {\n      params = convertKeysToSnakeCase(params)\n      if (params) {\n        if (params.sort) {\n          params.sort = this.convertSortParam(params.sort)\n        }\n        if (params.fields) {\n          params.fields = this.convertFieldsParam(params.fields)\n        }\n      }\n    }\n\n    //Pass on the params\n    return params\n  }\n\n  /**\n   * Convert fields param\n   */\n  convertFieldsParam(fields) {\n    return fields.map(field => toSnakeCase(field))\n  }\n\n  /**\n   * Convert sort param\n   */\n  convertSortParam(sort) {\n    return sort\n      .split(',')\n      .map(() => {\n        const isDesc = sort.match(/^-/)\n        const snake = toSnakeCase(sort)\n        return isDesc ? `-${snake}` : snake\n      })\n      .join(',')\n  }\n\n  /**\n   * Create form data\n   */\n  createFormData(data) {\n    data = this.convertData(data)\n    return createFormData(data)\n  }\n}\n","import {BaseApi} from '@/api/base.api.js'\n\n/**\n * Model API class\n */\nexport class ModelApi extends BaseApi {\n\n  //Props\n  basePath = ''\n  itemKey = 'item'\n  itemsKey = 'items'\n  ModelClass = null\n  convertParamKeys = true\n  convertDataKeys = true\n  convertJsonKeys = true\n\n  /**\n   * Query\n   */\n  query(params, options, path = '/') {\n    return this\n      .get(path, params, options)\n      .then(json => this.toModelCollection(json))\n  }\n\n  /**\n   * Find by ID\n   */\n  findById(id) {\n    if (!id) {\n      throw new Error('Missing ID')\n    }\n    return this\n      .get(`${id}`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Create\n   */\n  create(data, params) {\n    const {itemKey} = this\n    return this\n      .post('/', {[itemKey]: data}, {params})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Update by ID\n   */\n  updateById(id, data, params) {\n    if (!id) {\n      throw new Error('Missing ID')\n    }\n    const {itemKey} = this\n    return this\n      .patch(`${id}`, {[itemKey]: data}, {params})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Remove by ID\n   */\n  removeById(id, params) {\n    if (!id) {\n      throw new Error('Missing ID')\n    }\n    return this\n      .delete(`${id}`, params)\n  }\n\n  /**\n   * Remove many by ID\n   */\n  removeManyById(ids) {\n    return this\n      .post('/remove_many', {ids})\n  }\n\n  /**\n   * Check exists\n   */\n  checkExists(data) {\n    return this\n      .post('/check_exists', data)\n      .then(data => data.exists)\n  }\n\n  /**************************************************************************\n   * Data conversion helpers\n   ***/\n\n  /**\n   * Transform response JSON data to a model collection\n   */\n  toModelCollection(json) {\n    const {itemsKey} = this\n    if (!json) {\n      throw new Error(`Missing JSON data in response with model collection`)\n    }\n    if (!json[itemsKey]) {\n      throw new Error(`Missing items key ${itemsKey} in response JSON`)\n    }\n    const items = json[itemsKey].map(item => this.createModel(item))\n    return {\n      meta: json.meta,\n      [itemsKey]: items,\n      items,\n    }\n  }\n\n  /**\n   * Transform response JSON data to model instance\n   */\n  toModelInstance(json) {\n    const {itemKey} = this\n    if (!json) {\n      throw new Error(`Missing JSON data in response with model instance`)\n    }\n    if (!json[itemKey]) {\n      throw new Error(`Missing item key ${itemKey} in response JSON`)\n    }\n    if (json.meta) {\n      return this.toModelInstanceWithMeta(json)\n    }\n    return this.createModel(json[itemKey])\n  }\n\n  /**\n   * Transform response JSON data to model instance and preserves meta data\n   */\n  toModelInstanceWithMeta(json) {\n    const {itemKey} = this\n    if (!json) {\n      throw new Error(`Missing JSON data in response with model instance`)\n    }\n    if (!json[itemKey]) {\n      throw new Error(`Missing item key ${itemKey} in response JSON`)\n    }\n    const item = this.createModel(json[itemKey])\n    return {\n      meta: json.meta,\n      [itemKey]: item,\n      item,\n    }\n  }\n\n  /**\n   * Create model instance from given JSON data\n   */\n  createModel(json) {\n    const {ModelClass} = this\n    if (!ModelClass) {\n      return json\n    }\n    return ModelClass.createFrom(json)\n  }\n}\n","import {valueFromJSON} from '@/helpers/string.js'\nimport {get, set, copyValue} from '@/helpers/object.js'\n\n/**\n * Base model\n */\nexport class BaseModel {\n\n  //JSON key map (to convert incoming JSON keys to model keys)\n  static jsonKeyMap = {}\n\n  //JSON parsers (to convert incoming JSON values to model values)\n  static jsonParsers = {}\n\n  //Sub models\n  static subModels = {}\n\n  /**\n   * Constructor\n   */\n  constructor() {\n\n    //Model flag\n    Object.defineProperty(this, 'isModel', {\n      enumerable: false,\n      get() {\n        return true\n      },\n    })\n\n    //JSON\n    Object.defineProperty(this, 'json', {\n      enumerable: false,\n      writable: true,\n    })\n  }\n\n  /**\n   * Get value of property at given path\n   */\n  get(path, defaultValue) {\n    return get(this, path, defaultValue)\n  }\n\n  /**\n   * Set value of property at given path\n   */\n  set(path, value) {\n    return set(this, path, value)\n  }\n\n  /**\n   * Clone model\n   */\n  clone(data = {}) {\n\n    //Create new instance of this model\n    const clone = new this.constructor()\n\n    //Assign properties\n    //NOTE: Not doing this via JSON conversion, because we may not be sending all\n    //data to the server as JSON, and the structure might mismatch. So just doing\n    //a manual copy here, which will mostly try to be reasonable smart in handling\n    //objects, submodels and arrays etc.\n    for (const key in this) {\n      clone[key] = copyValue(this[key])\n    }\n\n    //Set any passed in data now with a shallow assignment\n    if (data && Object.keys(data).length) {\n      Object.assign(clone, data)\n    }\n\n    //Return the clone\n    return clone\n  }\n\n  /**************************************************************************\n   * To JSON conversion\n   ***/\n\n  /**\n   * Default to JSON conversion simply relies on the received JSON object,\n   * e.g. treating models as immutable. This method can be extended in other\n   * child classes to provide more advanced conversion.\n   */\n  toJson(data = {}) {\n    const {json} = this\n    return Object.assign({}, json, data)\n  }\n\n  /**************************************************************************\n   * From JSON conversion\n   ***/\n\n  /**\n   * Initialize model from JSON\n   */\n  fromJson(json) {\n\n    //Store JSON\n    this.json = json\n\n    //Process JSON\n    if (json && typeof json === 'object') {\n      for (const key in json) {\n        this.setJsonValue(key, json[key], json)\n      }\n    }\n\n    //Ensure all submodels are created (not all keys may be present in JSON)\n    for (const key in this.constructor.subModels) {\n      if (typeof this[key] === 'undefined') {\n        this[key] = this.constructor.createSubModel(this.constructor.subModels[key])\n      }\n    }\n  }\n\n  /**\n   * Set JSON value of a given key\n   */\n  setJsonValue(key, value, json) {\n\n    //Convert key\n    if (this.constructor.jsonKeyMap[key]) {\n      key = this.constructor.jsonKeyMap[key]\n    }\n\n    //Run through mapping function\n    if (this.constructor.jsonParsers[key]) {\n      value = this.constructor.jsonParsers[key](value, json)\n    }\n\n    //Create sub model\n    if (this.constructor.subModels[key]) {\n      value = this.constructor.createSubModel(\n        this.constructor.subModels[key], value\n      )\n    }\n\n    //Set value\n    this[key] = valueFromJSON(value)\n  }\n\n  /**************************************************************************\n   * Static helpers\n   ***/\n\n  /**\n   * Create a sub model\n   */\n  static createSubModel(model, value) {\n\n    //Check if array given\n    const isArray = Array.isArray(model)\n    const Model = isArray ? model[0] : model\n\n    //If undefined, check what we were expecting\n    if (typeof value === 'undefined') {\n      return isArray ? [] : null\n    }\n\n    //Expecting an array but no array given\n    if (isArray && !Array.isArray(value)) {\n      value = value ? [value] : []\n    }\n\n    //If no model specified or null, return as is\n    if (!Model || value === null) {\n      return value\n    }\n\n    //Convert to model\n    return Model.createFrom(value)\n  }\n\n  /**\n   * Create models from given JSON data\n   */\n  static createFrom(json = {}) {\n\n    //Array of data\n    if (Array.isArray(json)) {\n      return json.map(item => this.createFrom(item))\n    }\n\n    //Ensure plain object given\n    if (json instanceof BaseModel) {\n      throw new Error(`Cannot use createFrom() to create a model from another model. Use model.clone() instead.`)\n    }\n\n    //Single model\n    const model = new this()\n    model.fromJson(json)\n    return model\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * User model\n */\nexport class User extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'person'\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {User} from '@/models/user.model.js'\n\n/**\n * User API service\n *\n * NOTE: This API is for the current user (singular)\n */\nexport class UserApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/user'\n  itemKey = 'user'\n  ModelClass = User\n\n  /**\n   * Get current user\n   */\n  getCurrent() {\n    return this\n      .get(`/`, null, {ignoreErrors: [401, 403]})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Update current user\n   */\n  update(data) {\n    return this\n      .patch(`/`, {[this.itemKey]: data})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Get preview enrollment for current user by course ID\n   */\n  previewEnrollment(params) {\n    return this\n      .get(`/preview_enrollment`, params)\n  }\n}\n\n//Export singleton instance\nexport const userApi = new UserApi()\n","import {defineStore} from 'pinia'\nimport {ref, unref} from 'vue'\n\n/**\n * Data store\n */\nexport const useDataStore = defineStore('data', () => {\n\n  //Refs\n  const organization = ref(null)\n  const user = ref(null)\n  const contentTypes = ref([])\n  const globalTags = ref([])\n  const organizationTags = ref([])\n\n  //Mutators\n  const setOrganization = value => organization.value = unref(value)\n  const setUser = value => user.value = unref(value)\n  const setContentTypes = value => contentTypes.value = unref(value)\n  const setGlobalTags = value => globalTags.value = unref(value)\n  const setOrganizationTags = value => organizationTags.value = unref(value)\n\n  //Expose interface\n  return {\n\n    //Refs\n    organization,\n    user,\n    contentTypes,\n    globalTags,\n    organizationTags,\n\n    //Mutators\n    setOrganization,\n    setUser,\n    setContentTypes,\n    setGlobalTags,\n    setOrganizationTags,\n  }\n})\n","import {userApi} from '@/api/user.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDataStore} from '@/store/data.store.js'\nimport {storeToRefs} from 'pinia'\nimport {ref, computed} from 'vue'\n\n//Loading flag is global for all composable instances\nconst isLoadingUser = ref(false)\n\n/**\n * Use current user composable\n */\nexport function useCurrentUser() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get store\n  const store = useDataStore()\n  const {user} = storeToRefs(store)\n  const {setUser} = store\n\n  //Load user\n  const loadUser = async (force = false) => {\n\n    //Already loaded, we don't need to load again unless forcing to reload\n    if (user.value && !force) {\n      return\n    }\n\n    //Already loading\n    if (isLoadingUser.value) {\n      return\n    }\n\n    //Load user\n    try {\n      isLoadingUser.value = true\n      const loadedUser = await userApi.getCurrent()\n\n      //NOTE: There seems to be a delay between setting via the store setter,\n      //and manually setting the value of the ref, which is causing problems\n      //for the global resolve hook. Setting the ref value manually for now\n      //seems to work around this issue.\n      user.value = loadedUser\n      setUser(loadedUser)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingUser.value = false\n    }\n  }\n\n  //Clear user\n  const clearUser = () => setUser(null)\n\n  //Update user\n  const updateUser = async data => {\n    try {\n      const user = await userApi.update(data)\n      setUser(user)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n  }\n\n  //Expose user data as refs\n  const userId = computed(() => user.value?.id)\n  const addresses = computed(() => user.value?.addresses)\n  const timezone = computed(() => user.value?.timezone)\n  const email = computed(() => user.value?.email)\n\n  //Flags\n  const isSuperAdmin = computed(() => user.value?.isSuperAdmin)\n  const isAdmin = computed(() => user.value?.isAdmin)\n  const hasEmail = computed(() => !!user.value?.email)\n  const hasSeenSenderIdWarning = computed(() => user.value?.hasSeenSenderIdWarning)\n  const hasDismissedGetStarted = computed(() => user.value?.hasDismissedGetStarted)\n  const shouldShowGetStarted = computed(() => user.value?.shouldShowGetStarted)\n  const sawTos = computed(() => user.value?.sawTos)\n\n  //Permissions\n  const canEditTemplateLibrary = computed(() => user.value?.canEditTemplateLibrary)\n  const canManageInteractions = computed(() => user.value?.canManageInteractions)\n  const canManageAutomations = computed(() => user.value?.canManageAutomations)\n  const canManageEnrollments = computed(() => user.value?.canManageEnrollments)\n  const canManageSchedules = computed(() => user.value?.canManageSchedules)\n  const canManageCourses = computed(() => user.value?.canManageCourses)\n  const canManageMembers = computed(() => user.value?.canManageMembers)\n  const canManageAdmins = computed(() => user.value?.canManageAdmins)\n\n  //Expose interface\n  return {\n\n    //Data\n    user,\n    userId,\n    addresses,\n    timezone,\n    email,\n\n    //Flags\n    isLoadingUser,\n    isSuperAdmin,\n    isAdmin,\n    hasEmail,\n    hasSeenSenderIdWarning,\n    hasDismissedGetStarted,\n    shouldShowGetStarted,\n    sawTos,\n\n    //Permissions\n    canEditTemplateLibrary,\n    canManageInteractions,\n    canManageAutomations,\n    canManageEnrollments,\n    canManageSchedules,\n    canManageCourses,\n    canManageMembers,\n    canManageAdmins,\n\n    //Methods\n    loadUser,\n    clearUser,\n    updateUser,\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Organization model\n */\nexport class Organization extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Organization} from '@/models/organization.model.js'\n\n/**\n * Organization API service\n *\n * NOTE: This API is for the current organization (singular)\n */\nexport class OrganizationApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/organization'\n  itemKey = 'organization'\n  ModelClass = Organization\n\n  /**\n   * Get current organization\n   */\n  getCurrent() {\n    return this\n      .get(`/`, null, {ignoreErrors: [401, 403]})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Switch the current organization\n   */\n  switchCurrent(organizationId) {\n    return this\n      .post(`/switch_current_organization`, {organizationId})\n      .then(json => this.toModelInstance(json))\n  }\n}\n\n//Export singleton instance\nexport const organizationApi = new OrganizationApi()\n","export default \"data:image/svg+xml,%3csvg%20width='30'%20height='25'%20viewBox='0%200%2030%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.2%205.5H23.4M5.2%2010H17.8M2%2019.0968H6.3C6.46569%2019.0968%206.6%2019.2311%206.6%2019.3968V23.9085C6.6%2024.3364%207.10253%2024.5666%207.42656%2024.2871L13.163%2019.3395C13.3446%2019.1829%2013.5763%2019.0968%2013.8161%2019.0968H28C28.5523%2019.0968%2029%2018.6491%2029%2018.0968V2C29%201.44772%2028.5523%201%2028%201H2C1.44772%201%201%201.44771%201%202V18.0968C1%2018.6491%201.44771%2019.0968%202%2019.0968Z'%20stroke='%23262B40'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20width='26'%20height='26'%20viewBox='0%200%2026%2026'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.5798%206.71077C11.3767%206.91894%2011.1471%207.10105%2010.8963%207.25161C11.1471%207.40217%2011.3767%207.58428%2011.5798%207.79245V6.71077ZM6.79247%206.77073C6.16213%206.15589%205.77075%205.29721%205.77075%204.34712C5.77075%202.47742%207.28644%200.961731%209.15614%200.961731C10.2184%200.961731%2011.1664%201.45096%2011.787%202.21639C12.263%200.922732%2013.5063%200%2014.9652%200C16.8349%200%2018.3505%201.51569%2018.3505%203.38539V6.79246C18.9654%206.16217%2019.824%205.77081%2020.7741%205.77081C22.6438%205.77081%2024.1595%207.2865%2024.1595%209.1562C24.1595%2010.2184%2023.6703%2011.1663%2022.9049%2011.787C24.1986%2012.263%2025.1213%2013.5063%2025.1213%2014.9651C25.1213%2016.8348%2023.6056%2018.3505%2021.7359%2018.3505H18.3288C18.9592%2018.9654%2019.3505%2019.824%2019.3505%2020.7741C19.3505%2022.6438%2017.8349%2024.1595%2015.9652%2024.1595C14.9029%2024.1595%2013.955%2023.6703%2013.3343%2022.9049C12.8583%2024.1986%2011.615%2025.1213%2010.1561%2025.1213C8.28644%2025.1213%206.77075%2023.6056%206.77075%2021.7359V18.3289C6.15592%2018.9592%205.29727%2019.3505%204.34721%2019.3505C2.47751%2019.3505%200.961823%2017.8349%200.961823%2015.9652C0.961823%2014.9029%201.45105%2013.955%202.21647%2013.3343C0.92277%2012.8583%200%2011.615%200%2010.1561C0%208.28642%201.51569%206.77073%203.38539%206.77073L6.79247%206.77073ZM7.25167%2014.2249C7.10111%2013.9742%206.91901%2013.7445%206.71084%2013.5415H7.79251C7.58434%2013.7445%207.40223%2013.9742%207.25167%2014.2249ZM14.225%2017.8696C13.9742%2017.7191%2013.7446%2017.537%2013.5415%2017.3288V18.4105C13.7446%2018.2023%2013.9742%2018.0202%2014.225%2017.8696ZM17.8696%2010.8964C18.0201%2011.1471%2018.2022%2011.3767%2018.4104%2011.5798H17.3288C17.537%2011.3767%2017.7191%2011.1471%2017.8696%2010.8964ZM13.8226%2012.3439C13.2388%2012.1346%2012.7292%2011.7695%2012.3439%2011.2987C12.1346%2011.8825%2011.7695%2012.3921%2011.2987%2012.7774C11.8825%2012.9867%2012.3921%2013.3518%2012.7774%2013.8226C12.9867%2013.2388%2013.3518%2012.7292%2013.8226%2012.3439ZM12.5798%203.38539C12.5798%202.06798%2013.6477%201%2014.9652%201C16.2826%201%2017.3505%202.06797%2017.3505%203.38539V9.15616C17.3505%2010.4736%2016.2826%2011.5415%2014.9652%2011.5415C13.6477%2011.5415%2012.5798%2010.4736%2012.5798%209.15616V3.38539ZM3.38539%2012.5415C2.06798%2012.5415%201%2011.4735%201%2010.1561C1%208.83871%202.06797%207.77073%203.38539%207.77073L9.15616%207.77073C10.4736%207.77073%2011.5415%208.83871%2011.5415%2010.1561C11.5415%2011.4735%2010.4736%2012.5415%209.15616%2012.5415H3.38539ZM10.1561%2013.5798C8.83873%2013.5798%207.77075%2014.6477%207.77075%2015.9652V21.7359C7.77075%2023.0533%208.83873%2024.1213%2010.1561%2024.1213C11.4735%2024.1213%2012.5415%2023.0533%2012.5415%2021.7359V15.9652C12.5415%2014.6477%2011.4735%2013.5798%2010.1561%2013.5798ZM15.9652%2017.3505C14.6477%2017.3505%2013.5798%2016.2826%2013.5798%2014.9651C13.5798%2013.6477%2014.6477%2012.5798%2015.9652%2012.5798H21.7359C23.0533%2012.5798%2024.1213%2013.6477%2024.1213%2014.9651C24.1213%2016.2826%2023.0533%2017.3505%2021.7359%2017.3505H15.9652ZM20.7741%206.77081C19.4567%206.77081%2018.3887%207.83879%2018.3887%209.1562C18.3887%2010.4736%2019.4567%2011.5416%2020.7741%2011.5416C22.0915%2011.5416%2023.1595%2010.4736%2023.1595%209.1562C23.1595%207.83879%2022.0915%206.77081%2020.7741%206.77081ZM13.5798%2020.7741C13.5798%2019.4567%2014.6477%2018.3887%2015.9652%2018.3887C17.2826%2018.3887%2018.3505%2019.4567%2018.3505%2020.7741C18.3505%2022.0915%2017.2826%2023.1595%2015.9652%2023.1595C14.6477%2023.1595%2013.5798%2022.0915%2013.5798%2020.7741ZM4.34721%2013.5798C3.0298%2013.5798%201.96182%2014.6477%201.96182%2015.9652C1.96182%2017.2826%203.0298%2018.3505%204.34721%2018.3505C5.66462%2018.3505%206.73259%2017.2826%206.73259%2015.9652C6.73259%2014.6477%205.66462%2013.5798%204.34721%2013.5798ZM6.77075%204.34712C6.77075%203.0297%207.83873%201.96173%209.15614%201.96173C10.4736%201.96173%2011.5415%203.0297%2011.5415%204.34712C11.5415%205.66453%2010.4736%206.7325%209.15614%206.7325C7.83873%206.7325%206.77075%205.66453%206.77075%204.34712Z'%20fill='%23262B40'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20width='22'%20height='20'%20viewBox='0%200%2022%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.899%206.41935H11.6237C13.1202%206.41935%2014.3333%205.20619%2014.3333%203.70968V3.70968C14.3333%202.21316%2013.1202%201%2011.6237%201H11.5051C9.94303%201%208.67677%202.26627%208.67677%203.82828V5.25806M10.899%206.41935V6.41935C10.899%205.77799%2010.3791%205.25806%209.7377%205.25806H8.67677M10.899%206.41935V8.16129M8.67677%205.25806H2C1.44771%205.25806%201%205.70578%201%206.25806V13.7419C1%2014.2942%201.44772%2014.7419%202%2014.7419H6.85859M10.899%208.16129V13.7419C10.899%2014.2942%2010.4513%2014.7419%209.89899%2014.7419H6.85859M10.899%208.16129H16.5556M16.5556%208.16129H20.026C20.5639%208.16129%2021%208.59736%2021%209.13528V12.2811C21%2014.1747%2019.465%2015.7097%2017.5714%2015.7097V15.7097C17.0104%2015.7097%2016.5556%2015.2549%2016.5556%2014.6938V13.5806M16.5556%208.16129V13.5806M6.85859%2014.7419V14.7419C6.85859%2017.0936%208.76499%2019%2011.1167%2019H11.7071C14.3848%2019%2016.5556%2016.8293%2016.5556%2014.1515V13.5806M3.82828%209V7.3871H8.07071V9H7V12.4194H5V9H3.82828ZM18.087%206.03226H18.2564C19.3254%206.03226%2020.1919%205.16571%2020.1919%204.09677V4.09677C20.1919%203.02784%2019.3254%202.16129%2018.2564%202.16129H18.087C17.0181%202.16129%2016.1515%203.02784%2016.1515%204.09677V4.09677C16.1515%205.16571%2017.0181%206.03226%2018.087%206.03226Z'%20stroke='black'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20width='28'%20height='22'%20viewBox='0%200%2028%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.72222%201.30769L13.3501%2011.2519C13.7243%2011.5719%2014.2757%2011.5719%2014.6499%2011.2519L26.2778%201.30769M27%201.5V20.5C27%2021.0523%2026.5523%2021.5%2026%2021.5H2C1.44772%2021.5%201%2021.0523%201%2020.5V1.5C1%200.947715%201.44772%200.5%202%200.5H26C26.5523%200.5%2027%200.947715%2027%201.5Z'%20stroke='%23262B40'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.90909%2013.6591C12.7955%2016.8977%2015.6023%2016.6818%2016.4659%2014.9545M10.2015%209.59816C10.303%209.42894%2010.2955%209.21584%2010.1823%209.05418L8.67098%206.89509C8.6152%206.8154%208.53738%206.75371%208.44706%206.71758C8.21508%206.62479%207.97494%206.65341%207.79779%206.69884C7.60942%206.74714%207.42076%206.83279%207.24818%206.93355C6.90778%207.13229%206.55754%207.43275%206.33397%207.7681C6.32378%207.78339%206.31286%207.79962%206.3013%207.81678C6.07057%208.15931%205.58847%208.87502%205.71365%209.9391C5.84334%2011.0415%206.60357%2012.3887%208.589%2014.0432C10.5724%2015.6961%2012.337%2016.5172%2013.7692%2016.6663C15.2245%2016.8179%2016.3686%2016.2672%2016.9131%2015.1782C17.0058%2014.9929%2017.1141%2014.6969%2017.1468%2014.3796C17.1784%2014.0729%2017.1483%2013.6343%2016.8195%2013.3055C16.6772%2013.1633%2016.4694%2013.0375%2016.2757%2012.934C16.0696%2012.8239%2015.8295%2012.7136%2015.5874%2012.6106C15.1027%2012.4045%2014.5824%2012.2163%2014.249%2012.1052C14.0538%2012.0401%2013.8386%2012.1013%2013.7068%2012.2595L12.8668%2013.2674C12.3804%2013.0416%2011.749%2012.6883%2011.1625%2012.2372C10.4909%2011.7206%209.93264%2011.1172%209.67429%2010.4768L10.2015%209.59816ZM12.8257%2014.3392C13.0268%2014.4197%2013.2568%2014.3615%2013.3955%2014.1951L14.2539%2013.165C14.5366%2013.2659%2014.8762%2013.3948%2015.1961%2013.5309C15.4236%2013.6276%2015.6343%2013.7251%2015.8046%2013.8161C15.9874%2013.9137%2016.0819%2013.9821%2016.1124%2014.0126C16.129%2014.0293%2016.1709%2014.0945%2016.1521%2014.2772C16.1343%2014.4493%2016.07%2014.6283%2016.0187%2014.7309C15.6996%2015.3691%2015.0085%2015.79%2013.8728%2015.6717C12.7141%2015.551%2011.1321%2014.8608%209.22918%2013.275C7.32825%2011.6909%206.79302%2010.5551%206.7068%209.82226C6.62544%209.1307%206.9245%208.68378%207.14165%208.35927C7.1499%208.34694%207.15804%208.33479%207.16603%208.3228C7.28791%208.13997%207.51343%207.93665%207.75239%207.79713C7.84713%207.74182%207.93194%207.7037%208.00047%207.68101L9.17706%209.36186L8.69625%2010.1632C8.62387%2010.2838%208.60566%2010.4294%208.64609%2010.5641C8.94991%2011.5769%209.75021%2012.4124%2010.5528%2013.0298C11.3656%2013.6551%2012.2489%2014.1085%2012.8257%2014.3392ZM20.5%2011.5C20.5%2016.4706%2016.4706%2020.5%2011.5%2020.5C9.85988%2020.5%208.32363%2020.0617%207.00036%2019.2963C6.78759%2019.1732%206.54059%2019.1606%206.35448%2019.1684C6.15218%2019.1769%205.92899%2019.215%205.70569%2019.2656C5.25849%2019.3669%204.73823%2019.5356%204.25352%2019.6976C4.16949%2019.7257%204.08664%2019.7535%204.00525%2019.7809C3.60477%2019.9155%203.23952%2020.0382%202.9421%2020.1197C2.91502%2020.1271%202.88907%2020.134%202.86424%2020.1404C2.87029%2020.118%202.87676%2020.0946%202.88366%2020.0703C2.96302%2019.7908%203.0796%2019.4519%203.20824%2019.0779C3.24268%2018.9778%203.27798%2018.8751%203.31367%2018.7704C3.478%2018.2884%203.64841%2017.7682%203.74866%2017.3157C3.79876%2017.0896%203.83555%2016.8624%203.84124%2016.6544C3.84659%2016.4586%203.82713%2016.213%203.70373%2015.9996C2.93826%2014.6764%202.5%2013.1401%202.5%2011.5C2.5%206.52944%206.52944%202.5%2011.5%202.5C16.4706%202.5%2020.5%206.52944%2020.5%2011.5Z'%20stroke='%23262B40'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\"","import smsImage from '@/images/sms-custom.svg'\nimport slackImage from '@/images/slack.svg'\nimport teamsImage from '@/images/ms-teams.svg'\nimport emailImage from '@/images/email.svg'\nimport whatsappImage from '@/images/whatsapp.svg'\n\n//Address types\nexport const addressTypes = {\n  TEAMS: 'teams',\n  SLACK: 'slack',\n  SMS: 'sms',\n  WHATSAPP: 'sms_whatsapp',\n  EMAIL: 'email',\n}\n\n//Basic address types subset\nexport const basicAddressTypes = [\n  addressTypes.SMS,\n  addressTypes.WHATSAPP,\n  addressTypes.EMAIL,\n]\n\n//Integration address types subset\nexport const integrationAddressTypes = [\n  addressTypes.TEAMS,\n  addressTypes.SLACK,\n]\n\n//Address type options array\nexport const addressTypeOptions = [\n  {label: 'Teams', value: addressTypes.TEAMS, image: teamsImage},\n  {label: 'Slack', value: addressTypes.SLACK, image: slackImage},\n  {label: 'SMS', value: addressTypes.SMS, image: smsImage},\n  {label: 'WhatsApp', value: addressTypes.WHATSAPP, image: whatsappImage},\n  {label: 'Email', value: addressTypes.EMAIL, image: emailImage},\n]\n\n//Basic address type options array\nexport const basicAddressTypeOptions = addressTypeOptions\n  .filter(option => basicAddressTypes.includes(option.value))\n","import {organizationApi} from '@/api/organization.api.js'\nimport {addressTypeOptions} from '@/constants/address-types.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDataStore} from '@/store/data.store.js'\nimport {storeToRefs} from 'pinia'\nimport {ref, computed} from 'vue'\n\n//Loading flag is global for all composable instances\nconst isLoadingOrganization = ref(false)\n\n/**\n * Current organization composable\n */\nexport function useCurrentOrganization() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get store\n  const store = useDataStore()\n  const {organization} = storeToRefs(store)\n  const {setOrganization} = store\n\n  //Load organization\n  const loadOrganization = async (force = false) => {\n\n    //Already loaded, we don't need to load again unless forcing to reload\n    if (organization.value && !force) {\n      return\n    }\n\n    //Already loading\n    if (isLoadingOrganization.value) {\n      return\n    }\n\n    //Load org\n    try {\n      isLoadingOrganization.value = true\n      const loadedOrganization = await organizationApi.getCurrent()\n\n      //NOTE: There seems to be a delay between setting via the store setter,\n      //and manually setting the value of the ref, which is causing problems\n      //for the global resolve hook. Setting the ref value manually for now\n      //seems to work around this issue.\n      organization.value = loadedOrganization\n      setOrganization(loadedOrganization)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingOrganization.value = false\n    }\n  }\n\n  //Clear organization\n  const clearOrganization = () => setOrganization(null)\n\n  //Switch to a different organization\n  const switchOrganization = async organization => {\n    try {\n      await organizationApi.switchCurrent(organization.id)\n      window.location.reload()\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n  }\n\n  //Expose organization data as refs\n  const organizationId = computed(() => organization.value?.id)\n  const isNudgesEnabled = computed(() => organization.value?.isNudgesEnabled)\n  const isAiEnabled = computed(() => organization.value?.isAiEnabled)\n  const isExternalManagerEnabled = computed(() => organization.value?.isExternalManagerEnabled)\n  const isRatingQuestionEnabled = computed(() => organization.value?.isRatingQuestionEnabled)\n  const isConfidenceLiftEnabled = computed(() => organization.value?.isConfidenceLiftEnabled)\n  const isNpsSurveyEnabled = computed(() => organization.value?.isNpsSurveyEnabled)\n  const isLearnerSentimentEnabled = computed(() => organization.value?.isLearnerSentimentEnabled)\n  const isBlankDaysEnabled = computed(() => organization.value?.isBlankDaysEnabled)\n  const isEmailRequiredInCsv = computed(() => organization.value?.isEmailRequiredInCsv)\n  const hasChannels = computed(() => organization.value?.hasChannels)\n  const hasCohorts = computed(() => organization.value?.hasCohorts)\n  const availableAddressTypes = computed(() => organization.value?.availableAddressTypes)\n  const availableAddressTypeOptions = computed(() => addressTypeOptions.filter(option => availableAddressTypes.value?.includes(option.value)))\n  const anonymizePii = computed(() => organization.value?.anonymizePii)\n\n  //Expose interface\n  return {\n\n    //Refs\n    organization,\n    organizationId,\n    isLoadingOrganization,\n    isNudgesEnabled,\n    isAiEnabled,\n    isExternalManagerEnabled,\n    isRatingQuestionEnabled,\n    isConfidenceLiftEnabled,\n    isNpsSurveyEnabled,\n    isLearnerSentimentEnabled,\n    isBlankDaysEnabled,\n    isEmailRequiredInCsv,\n    hasChannels,\n    hasCohorts,\n    availableAddressTypes,\n    availableAddressTypeOptions,\n    anonymizePii,\n\n    //Methods\n    loadOrganization,\n    clearOrganization,\n    switchOrganization,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport ModalBlockButton from '@/components/shared/modals/ModalBlockButton.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {openUrl} from '@/helpers/url.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n])\n\n//Get user/org data\nconst {updateUser} = useCurrentUser()\nconst {isAiEnabled} = useCurrentOrganization()\n\n//Navigation helpers\nconst {\n  goToAnalytics,\n  goToBuildCourseWithAI,\n  goToContentLibraryOverview,\n} = useNavigation()\n\n//Create course with AI\nconst createCourseWithAi = event => {\n  if (isAiEnabled.value) {\n    goToBuildCourseWithAI(event)\n    emit('close')\n  }\n  else {\n    openUrl('https://arist.link/ai-creator-demo', null, true)\n  }\n}\n\n//Navigate to analytics and close modal\nconst analyticsAndClose = event => {\n  goToAnalytics(event)\n  emit('close')\n}\n\n//Dismiss and close\nconst dismissAndClose = () => {\n  try {\n    updateUser({hasDismissedGetStarted: true})\n    emit('close')\n  }\n  catch {\n    //Fall through\n  }\n}\n</script>\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Get started\"\n    is-flexible\n    close-on-key\n    close-on-click-outside\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <div :class=\"$style.body\">\n      <div :class=\"$style.left\">\n        <FlexColumn>\n          <ModalBlockButton\n            header=\"How do I use Arist?\"\n            subheader=\"Watch a quick 5-minute video walkthrough of the platform.\"\n            icon=\"play_circle\"\n            @click=\"openUrl('https://arist.link/product', null, true)\"\n          />\n          <ModalBlockButton\n            header=\"Make courses quickly using our generative AI tool\"\n            subheader=\"Create Arist learning experiences in &lt;5 minutes using AI.\"\n            icon=\"smart_toy\"\n            @click=\"createCourseWithAi($event)\"\n          />\n          <ModalBlockButton\n            header=\"Build your first course\"\n            subheader=\"Use our template course to guide you through building your first course in Arist.\"\n            icon=\"content_paste\"\n            @click=\"goToContentLibraryOverview()\"\n          />\n          <ModalBlockButton\n            header=\"Arist help center\"\n            subheader=\"Get advice and answers from the Arist team to optimize your learning.\"\n            icon=\"help\"\n            @click=\"openUrl('https://arist.helpcenter.io', null, true)\"\n          />\n          <ModalBlockButton\n            header=\"Explore analytics\"\n            subheader=\"Take a quick tour of our analytics dashboard and manage your data properly.\"\n            icon=\"monitoring\"\n            @click=\"analyticsAndClose($event)\"\n          />\n        </FlexColumn>\n      </div>\n      <div :class=\"$style.right\">\n        <img src=\"@/images/getStartedIllus.png\">\n      </div>\n    </div>\n\n    <template #footer>\n      <slot name=\"footer\">\n        <CancelConfirmBar\n          label-cancel=\"Don't show again\"\n          label-confirm=\"Ok, got it!\"\n          @cancel=\"dismissAndClose()\"\n          @confirm=\"$emit('close')\"\n        />\n      </slot>\n    </template>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.body {\n  display: flex;\n  justify-content: space-between;\n  gap: 2rem;\n}\n.left {\n  flex: 1;\n}\n.right {\n  flex: 0 0 376px;\n}\n</style>\n","import {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {ref, computed} from 'vue'\n\n/**\n * Timezone composable\n */\nexport function useTimezone() {\n\n  //Get current user and organization\n  const {user} = useCurrentUser()\n  const {organization} = useCurrentOrganization()\n\n  //Timezone to use throughout the app\n  const defaultTimezone = ref('America/New_York')\n  const timezone = computed(() => {\n    return user.value?.timezone || organization.value?.timezone || defaultTimezone.value\n  })\n\n  //Expose interface\n  return {\n    defaultTimezone,\n    timezone,\n  }\n}\n","\n//Ensure a value is an array\nexport function ensureArray(array) {\n  if (Array.isArray(array)) {\n    return array\n  }\n  if (array === null || array === undefined) {\n    return []\n  }\n  return [array]\n}\n\n//Toggle value (returns a new array)\nexport function toggleValueInArray(array, value) {\n  if (!Array.isArray(array)) {\n    array = []\n  }\n  const clone = [...array]\n  toggleValueInArrayInPlace(clone, value)\n  return clone\n}\n\n//Toggle value (modifies existing array)\nexport function toggleValueInArrayInPlace(array, value) {\n  if (!Array.isArray(array)) {\n    return\n  }\n  const i = array.indexOf(value)\n  if (i === -1) {\n    array.push(value)\n  }\n  else {\n    array.splice(i, 1)\n  }\n}\n\n//Check if two arrays contain the same values\nexport function arraysMatch(array1, array2) {\n  if (array1.length !== array2.length) {\n    return false\n  }\n  return (\n    array1.every(value => array2.includes(value)) &&\n    array2.every(value => array1.includes(value))\n  )\n}\n\n//Check if two arrays match exactly (including order)\nexport function arraysMatchExactly(array1, array2) {\n  if (!Array.isArray(array1) || !Array.isArray(array2)) {\n    return false\n  }\n  if (array1.length !== array2.length) {\n    return false\n  }\n  return array1.every((value, index) => value === array2[index])\n}\n\n//Create an array with a sequence of numbers\nexport function arraySequence(start, end, step = 1) {\n  return Array\n    .from(Array(Math.floor((end - start + 1) / step)).keys())\n    .map(i => i + start)\n}\n\n//Set value at index and return a new array\nexport function setValueAtIndex(array, index, value) {\n  return [\n    ...array.slice(0, index),\n    value,\n    ...array.slice(index + 1),\n  ]\n}\n\n//Remove value from array at specified index, and return as new array\nexport function removeValueAtIndex(array, index) {\n  return [\n    ...array.slice(0, index),\n    ...array.slice(index + 1),\n  ]\n}\n\n//Insert value at index\nexport function insertValueAtIndex(array, index, value) {\n  return [\n    ...array.slice(0, index),\n    value,\n    ...array.slice(index),\n  ]\n}\n\n//Insert value in array after another value\nexport function insertAfter(array, afterValue, value) {\n  const i = array.indexOf(afterValue)\n  if (i === -1) {\n    return [...array, value]\n  }\n  return [\n    ...array.slice(0, i),\n    value,\n    ...array.slice(i),\n  ]\n}\n\n//Split an array of items into batches of a specific size\nexport function splitIntoBatches(array, batchSize) {\n  const batches = []\n  for (let i = 0; i < array.length; i += batchSize) {\n    batches.push(array.slice(i, i + batchSize))\n  }\n  return batches\n}\n\n//Summarize an array of numbers\n//For an array of say [1, 2, 3, 4, 5], this will return \"1-5\"\n//For an array of [1, 2, 5, 8, 9, 10, 13], this will return \"1-2, 5, 8-10, 13\"\nexport function summarizeNumbers(array) {\n  const summary = []\n  let start = array[0]\n  let end = array[0]\n  for (let i = 1; i < array.length; i++) {\n    if (array[i] === end + 1) {\n      end = array[i]\n    }\n    else {\n      if (start === end) {\n        summary.push(start)\n      }\n      else {\n        summary.push(`${start}-${end}`)\n      }\n      start = end = array[i]\n    }\n  }\n  if (start === end) {\n    summary.push(start)\n  }\n  else {\n    summary.push(`${start}-${end}`)\n  }\n  return summary.join(', ')\n}\n\n//Apply a function onto a value, or onto each value in an array\nexport function mapFn(value, fn, arrayFn) {\n  if (Array.isArray(value)) {\n    const arr = value.map(fn)\n    if (arrayFn) {\n      return arrayFn(arr)\n    }\n    return arr\n  }\n  return fn(value)\n}\n\n//Sort an array by a property\nexport function sortByProperty(array, prop) {\n  return [...array].sort((a, b) => a[prop].localeCompare(b[prop]))\n}\n","\n/**\n * Convert a flat array into label/value pairs\n */\nexport function flatArrayToOptions(array) {\n  if (!Array.isArray(array)) {\n    throw new Error(`Not an array provided for flatArrayToOptions`)\n  }\n  return array.map(value => ({value, label: value}))\n}\n\n/**\n * Convert an array of objects into label/value pairs\n */\nexport function convertToOptions(array, valueKey = 'id', labelKey = 'name') {\n  if (!Array.isArray(array)) {\n    throw new Error(`Not an array provided for convertToOptions`)\n  }\n  return array.map(item => ({\n    value: item[valueKey],\n    label: item[labelKey],\n  }))\n}\n\n/**\n * Get option label for a given value\n */\nexport function getOptionLabel(options, value, labelKey = 'label', unknown = 'Unknown') {\n  const option = options.find(option => option.value === value)\n  return (option && typeof option[labelKey] !== 'undefined') ? option[labelKey] : unknown\n}\n","import {arraySequence} from '@/helpers/array.js'\nimport {flatArrayToOptions} from '@/helpers/options.js'\n\n//Date formats\nexport const dateFormats = {\n  DATE: 'MMM d yyyy',\n  TIME: 'h:mm a',\n  TIME_24: 'HH:mm',\n  DATE_AND_TIME: 'MMM d yyyy, h:mm a',\n  ISO_DATE_ONLY: 'yyyy-MM-dd',\n  MONTH_YEAR: 'MMMM yyyy',\n  DATE_SHORT_US: 'MM/dd/yyyy',\n  DATE_SHORT_INT: 'dd/MM/yyyy',\n}\n\n//Date tokens\nexport const dateTokens = {\n  NOW: 'now',\n  START_OF_YEAR: 'startOf@year',\n  END_OF_YEAR: 'endOf@year',\n  START_OF_MONTH: 'startOf@month',\n  END_OF_MONTH: 'endOf@month',\n  START_OF_LAST_MONTH: 'minus@{\"month\":1}|startOf@month',\n  END_OF_LAST_MONTH: 'minus@{\"month\":1}|endOf@month',\n  START_OF_WEEK: 'startOf@week',\n  END_OF_WEEK: 'endOf@week',\n  START_OF_LAST_WEEK: 'minus@{\"week\":1}|startOf@week',\n  END_OF_LAST_WEEK: 'minus@{\"week\":1}|endOf@week',\n  START_OF_DAY: 'startOf@day',\n  END_OF_DAY: 'endOf@day',\n  THIRTY_DAYS_AGO: 'minus@{\"days\":30}',\n  SIXTY_DAYS_AGO: 'minus@{\"days\":60}',\n  NINETY_DAYS_AGO: 'minus@{\"days\":90}',\n}\n\n//Date units\nexport const dateUnits = {\n  DAYS: 'days',\n  WEEKS: 'weeks',\n  MONTHS: 'months',\n  YEARS: 'years',\n}\n\n//Date signs\nexport const dateSigns = {\n  PAST: '-',\n  FUTURE: '+',\n}\n\n//Meridiem\nexport const meridiems = {\n  AM: 'AM',\n  PM: 'PM',\n}\n\n//Time options\nexport const hourOptions = flatArrayToOptions(arraySequence(1, 12).map(String))\nexport const minuteOptions = flatArrayToOptions(['00', '15', '30', '45'])\nexport const meridiemOptions = flatArrayToOptions([meridiems.AM, meridiems.PM])\n","import {DateTime} from 'luxon'\nimport {dateTokens} from '@/constants/date-and-time.js'\nimport {isISODateString} from '@/helpers/string.js'\n\n//Convert date and time tokens into DateTime objects\nexport function tokenToDateTime(token, timezone) {\n  if (typeof token !== 'string') {\n    return token\n  }\n  if (token === dateTokens.NOW) {\n    return DateTime.now().setZone(timezone)\n  }\n  return token\n    .split('|')\n    .reduce((date, instruction) => {\n      const [method, arg] = instruction.split('@')\n      const isJson = arg.startsWith('{') || arg.startsWith('[')\n      return date[method](isJson ? JSON.parse(arg) : arg)\n    }, DateTime.now().setZone(timezone))\n}\n\n//Get formatted date\nexport const formatDate = (date, format, timezone, locale = 'en') => {\n  if (Array.isArray(date)) {\n    return date\n      .map(value => formatDate(value, format, timezone, locale))\n      .join(' – ')\n  }\n  if (typeof date === 'string') {\n    date = DateTime.fromISO(date)\n  }\n  if (!(date instanceof DateTime) || date.invalid) {\n    return ''\n  }\n  if (timezone) {\n    date = date.setZone(timezone)\n  }\n  return date.toFormat(format, {locale})\n}\n\n//Check if a date is withing a certain number of days from today\nexport const dateIsWithinNumDays = (date, numDays) => {\n  if (!(date instanceof DateTime) || !date.isValid) {\n    throw new Error(`Invalid date`)\n  }\n  const today = DateTime.now().startOf('day')\n  const endDate = date.plus({days: numDays})\n  return today <= endDate\n}\n\n//Convert input value to DateTime instance with UTC timezone\nexport const inputValueToUTCDateTime = (value, format, timezone) => {\n\n  //Already a DateTime instance\n  if (value instanceof DateTime) {\n    return value.setZone('utc')\n  }\n\n  //No value\n  if (!value) {\n    return null\n  }\n\n  //Full ISO string, including time and timezone representations\n  if (isISODateString(value)) {\n    const dt = DateTime.fromISO(value).setZone('utc')\n    return dt.invalid ? null : dt\n  }\n\n  //Date only string, parse using expected input format\n  //The timezone is passed in case the string provided does not contain\n  //timezone information, which is the case for some of the backend responses.\n  //In those  cases, the expected outcome is a timezone agnostic modification of\n  //a date, with the date being represented in the same manner, irrespective of\n  //timezone. So since a date input field will display dates in the user's\n  //timezone, we initiate the DateTime object with the user's timezone as well,\n  //to avoid any unwanted conversion taking place.\n  const dt = DateTime.fromFormat(value, format, {\n    zone: timezone,\n  }).setZone('utc')\n  return dt.invalid ? null : dt\n}\n\n//Round minute value to nearest 15, but convert 60 to 00\nexport const roundMinute = minute => {\n  if (minute % 15 !== 0) {\n    return Math.round(minute / 15) * 15\n  }\n  return minute === 60 ? 0 : minute\n}\n","import {useTimezone} from '@/composables/use-timezone.js'\nimport {formatDate} from '@/helpers/date-and-time.js'\nimport {computed} from 'vue'\n\n/**\n * Date composable\n */\nexport function useDate(date, format) {\n\n  //Get timezone\n  const {timezone} = useTimezone()\n\n  //Formatted date reference\n  const formattedDate = computed(() => formatDate(date.value, format.value, timezone.value))\n\n  //Expose interface\n  return {\n    formattedDate,\n  }\n}\n","<script setup>\nimport {useDate} from '@/composables/use-date.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {toRefs} from 'vue'\n\n//Props\nconst props = defineProps({\n  date: {\n    type: [Object, String],\n    default: null,\n  },\n  format: {\n    type: String,\n    default: dateFormats.DATE,\n  },\n  emptyLabel: {\n    type: String,\n    default: '',\n  },\n})\n\n//Composables\nconst {date, format} = toRefs(props)\nconst {formattedDate} = useDate(date, format)\n</script>\n\n<template>\n  <span>{{ formattedDate || emptyLabel }}</span>\n</template>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  url: {\n    type: String,\n    default: '#',\n  },\n  text: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  isIconOutlined: {\n    type: Boolean,\n    default: false,\n  },\n  secondaryIcon: {\n    type: String,\n    default: '',\n  },\n  isSecondaryIconOutlined: {\n    type: Boolean,\n    default: false,\n  },\n  isClickable: {\n    type: Boolean,\n    default: true,\n  },\n  isInline: {\n    type: Boolean,\n    default: false,\n  },\n  openInNewWindow: {\n    type: Boolean,\n    default: false,\n  },\n})\n\nconst {isClickable} = toRefs(props)\n\n//Methods\nconst handleClick = (event) => {\n  if (!isClickable.value) {\n    event.preventDefault()\n  }\n  event.stopPropagation()\n  emit('click', event)\n}\n</script>\n\n<template>\n  <a\n    :href=\"url\"\n    :class=\"{\n      [$style.link]: true,\n      [$style.noPointerEvents]: !isClickable,\n      [$style.inline]: isInline,\n    }\"\n    :target=\"openInNewWindow ? '_blank' : '_self'\"\n    @click=\"handleClick($event)\"\n  >\n    <slot name=\"icon\">\n      <Icon\n        v-if=\"icon\"\n        :icon=\"icon\"\n        :is-outlined=\"isIconOutlined\"\n        size=\"m\"\n        color=\"primary\"\n      />\n    </slot>\n    <span :class=\"$style.text\"><slot>{{ text || url }}</slot></span>\n    <slot name=\"secondaryIcon\">\n      <Icon\n        v-if=\"secondaryIcon\"\n        :icon=\"secondaryIcon\"\n        :is-outlined=\"isSecondaryIconOutlined\"\n        size=\"xs\"\n        color=\"muted\"\n      />\n    </slot>\n  </a>\n</template>\n\n<style module lang=\"scss\">\n.link {\n  color: var(--color-text-link);\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  min-width: 0; /* Trick to force text to wrap */\n  &.inline {\n    display: inline-flex;\n  }\n  &:hover {\n    color: var(--color-text-link);\n    text-decoration: none !important;\n    .text {\n      text-decoration: underline;\n    }\n  }\n}\n.text {\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.noPointerEvents {\n  pointer-events: none;\n  cursor: default;\n}\n.inline {\n  display: inline-flex;\n}\n</style>\n","import {unref} from 'vue'\n\n/**\n * Document composable\n */\nexport function useDocument() {\n\n  //Set document props\n  const setDocumentTitle = title => document.title = unref(title)\n\n  //Set inner text of an element\n  const setElementText = (el, text) => {\n    if (typeof el === 'string') {\n      el = document.querySelector(el)\n    }\n    if (el) {\n      el.innerText = text\n    }\n  }\n\n  //Set a generic meta tag\n  const setMetaTagContent = (name, value) => {\n    document\n      .querySelector(`meta[name=\"${unref(name)}\"]`)\n      ?.setAttribute('content', unref(value))\n  }\n\n  //Get value of generic meta tag\n  const getMetaTagContent = name => {\n    return document\n      .querySelector(`meta[name=\"${unref(name)}\"]`)\n      ?.getAttribute('content')\n  }\n\n  //Append external script to head\n  const appendScript = src => {\n    const script = document.createElement('script')\n    script.src = src\n    script.async = true\n    script.defer = true\n    document.head.appendChild(script)\n  }\n\n  //Expose interface\n  return {\n    setDocumentTitle,\n    setElementText,\n    setMetaTagContent,\n    getMetaTagContent,\n    appendScript,\n  }\n}\n","import {defineStore} from 'pinia'\nimport {ref, unref} from 'vue'\n\n/**\n * Page store\n */\nexport const usePageStore = defineStore('page', () => {\n\n  //Refs\n  const header = ref('')\n\n  //Mutators\n  const setHeader = value => header.value = unref(value)\n\n  //Expose interface\n  return {\n    header,\n    setHeader,\n  }\n})\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, inject, provide, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n  var _a;\n  const result = shallowRef();\n  watchEffect(() => {\n    result.value = fn();\n  }, {\n    ...options,\n    flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n  });\n  return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n  let v = void 0;\n  let track;\n  let trigger;\n  const dirty = ref(true);\n  const update = () => {\n    dirty.value = true;\n    trigger();\n  };\n  watch(source, update, { flush: \"sync\" });\n  const get = typeof fn === \"function\" ? fn : fn.get;\n  const set = typeof fn === \"function\" ? void 0 : fn.set;\n  const result = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        if (dirty.value) {\n          v = get(v);\n          dirty.value = false;\n        }\n        track();\n        return v;\n      },\n      set(v2) {\n        set == null ? void 0 : set(v2);\n      }\n    };\n  });\n  if (Object.isExtensible(result))\n    result.trigger = update;\n  return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n  if (getCurrentScope()) {\n    onScopeDispose(fn);\n    return true;\n  }\n  return false;\n}\n\nfunction createEventHook() {\n  const fns = /* @__PURE__ */ new Set();\n  const off = (fn) => {\n    fns.delete(fn);\n  };\n  const on = (fn) => {\n    fns.add(fn);\n    const offFn = () => off(fn);\n    tryOnScopeDispose(offFn);\n    return {\n      off: offFn\n    };\n  };\n  const trigger = (...args) => {\n    return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n  };\n  return {\n    on,\n    off,\n    trigger\n  };\n}\n\nfunction createGlobalState(stateFactory) {\n  let initialized = false;\n  let state;\n  const scope = effectScope(true);\n  return (...args) => {\n    if (!initialized) {\n      state = scope.run(() => stateFactory(...args));\n      initialized = true;\n    }\n    return state;\n  };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst injectLocal = (...args) => {\n  var _a;\n  const key = args[0];\n  const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n  if (instance == null)\n    throw new Error(\"injectLocal must be called in setup\");\n  if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n    return localProvidedStateMap.get(instance)[key];\n  return inject(...args);\n};\n\nconst provideLocal = (key, value) => {\n  var _a;\n  const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n  if (instance == null)\n    throw new Error(\"provideLocal must be called in setup\");\n  if (!localProvidedStateMap.has(instance))\n    localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n  const localProvidedState = localProvidedStateMap.get(instance);\n  localProvidedState[key] = value;\n  provide(key, value);\n};\n\nfunction createInjectionState(composable, options) {\n  const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n  const defaultValue = options == null ? void 0 : options.defaultValue;\n  const useProvidingState = (...args) => {\n    const state = composable(...args);\n    provideLocal(key, state);\n    return state;\n  };\n  const useInjectedState = () => injectLocal(key, defaultValue);\n  return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n  let subscribers = 0;\n  let state;\n  let scope;\n  const dispose = () => {\n    subscribers -= 1;\n    if (scope && subscribers <= 0) {\n      scope.stop();\n      state = void 0;\n      scope = void 0;\n    }\n  };\n  return (...args) => {\n    subscribers += 1;\n    if (!scope) {\n      scope = effectScope(true);\n      state = scope.run(() => composable(...args));\n    }\n    tryOnScopeDispose(dispose);\n    return state;\n  };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n  if (!isVue3 && !version.startsWith(\"2.7.\")) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n    return;\n  }\n  for (const [key, value] of Object.entries(extend)) {\n    if (key === \"value\")\n      continue;\n    if (isRef(value) && unwrap) {\n      Object.defineProperty(ref, key, {\n        get() {\n          return value.value;\n        },\n        set(v) {\n          value.value = v;\n        },\n        enumerable\n      });\n    } else {\n      Object.defineProperty(ref, key, { value, enumerable });\n    }\n  }\n  return ref;\n}\n\nfunction get(obj, key) {\n  if (key == null)\n    return unref(obj);\n  return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n  return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n  if (typeof Symbol !== \"undefined\") {\n    const clone = { ...obj };\n    Object.defineProperty(clone, Symbol.iterator, {\n      enumerable: false,\n      value() {\n        let index = 0;\n        return {\n          next: () => ({\n            value: arr[index++],\n            done: index > arr.length\n          })\n        };\n      }\n    });\n    return clone;\n  } else {\n    return Object.assign([...arr], obj);\n  }\n}\n\nfunction toValue(r) {\n  return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n  const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n  return function(...args) {\n    return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n  };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n  let keys = [];\n  let options;\n  if (Array.isArray(optionsOrKeys)) {\n    keys = optionsOrKeys;\n  } else {\n    options = optionsOrKeys;\n    const { includeOwnProperties = true } = optionsOrKeys;\n    keys.push(...Object.keys(obj));\n    if (includeOwnProperties)\n      keys.push(...Object.getOwnPropertyNames(obj));\n  }\n  return Object.fromEntries(\n    keys.map((key) => {\n      const value = obj[key];\n      return [\n        key,\n        typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n      ];\n    })\n  );\n}\n\nfunction toReactive(objectRef) {\n  if (!isRef(objectRef))\n    return reactive(objectRef);\n  const proxy = new Proxy({}, {\n    get(_, p, receiver) {\n      return unref(Reflect.get(objectRef.value, p, receiver));\n    },\n    set(_, p, value) {\n      if (isRef(objectRef.value[p]) && !isRef(value))\n        objectRef.value[p].value = value;\n      else\n        objectRef.value[p] = value;\n      return true;\n    },\n    deleteProperty(_, p) {\n      return Reflect.deleteProperty(objectRef.value, p);\n    },\n    has(_, p) {\n      return Reflect.has(objectRef.value, p);\n    },\n    ownKeys() {\n      return Object.keys(objectRef.value);\n    },\n    getOwnPropertyDescriptor() {\n      return {\n        enumerable: true,\n        configurable: true\n      };\n    }\n  });\n  return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n  return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n  const flatKeys = keys.flat();\n  const predicate = flatKeys[0];\n  return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst directiveHooks = {\n  mounted: isVue3 ? \"mounted\" : \"inserted\",\n  updated: isVue3 ? \"updated\" : \"componentUpdated\",\n  unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n  if (!condition)\n    console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n  min = Math.ceil(min);\n  max = Math.floor(max);\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n  var _a, _b;\n  return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n  function wrapper(...args) {\n    return new Promise((resolve, reject) => {\n      Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n    });\n  }\n  return wrapper;\n}\nconst bypassFilter = (invoke) => {\n  return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n  let timer;\n  let maxTimer;\n  let lastRejector = noop;\n  const _clearTimeout = (timer2) => {\n    clearTimeout(timer2);\n    lastRejector();\n    lastRejector = noop;\n  };\n  const filter = (invoke) => {\n    const duration = toValue(ms);\n    const maxDuration = toValue(options.maxWait);\n    if (timer)\n      _clearTimeout(timer);\n    if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n      if (maxTimer) {\n        _clearTimeout(maxTimer);\n        maxTimer = null;\n      }\n      return Promise.resolve(invoke());\n    }\n    return new Promise((resolve, reject) => {\n      lastRejector = options.rejectOnCancel ? reject : resolve;\n      if (maxDuration && !maxTimer) {\n        maxTimer = setTimeout(() => {\n          if (timer)\n            _clearTimeout(timer);\n          maxTimer = null;\n          resolve(invoke());\n        }, maxDuration);\n      }\n      timer = setTimeout(() => {\n        if (maxTimer)\n          _clearTimeout(maxTimer);\n        maxTimer = null;\n        resolve(invoke());\n      }, duration);\n    });\n  };\n  return filter;\n}\nfunction throttleFilter(...args) {\n  let lastExec = 0;\n  let timer;\n  let isLeading = true;\n  let lastRejector = noop;\n  let lastValue;\n  let ms;\n  let trailing;\n  let leading;\n  let rejectOnCancel;\n  if (!isRef(args[0]) && typeof args[0] === \"object\")\n    ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n  else\n    [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n  const clear = () => {\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n      lastRejector();\n      lastRejector = noop;\n    }\n  };\n  const filter = (_invoke) => {\n    const duration = toValue(ms);\n    const elapsed = Date.now() - lastExec;\n    const invoke = () => {\n      return lastValue = _invoke();\n    };\n    clear();\n    if (duration <= 0) {\n      lastExec = Date.now();\n      return invoke();\n    }\n    if (elapsed > duration && (leading || !isLeading)) {\n      lastExec = Date.now();\n      invoke();\n    } else if (trailing) {\n      lastValue = new Promise((resolve, reject) => {\n        lastRejector = rejectOnCancel ? reject : resolve;\n        timer = setTimeout(() => {\n          lastExec = Date.now();\n          isLeading = true;\n          resolve(invoke());\n          clear();\n        }, Math.max(0, duration - elapsed));\n      });\n    }\n    if (!leading && !timer)\n      timer = setTimeout(() => isLeading = true, duration);\n    isLeading = false;\n    return lastValue;\n  };\n  return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n  const isActive = ref(true);\n  function pause() {\n    isActive.value = false;\n  }\n  function resume() {\n    isActive.value = true;\n  }\n  const eventFilter = (...args) => {\n    if (isActive.value)\n      extendFilter(...args);\n  };\n  return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction cacheStringFunction(fn) {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n  return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n  return new Promise((resolve, reject) => {\n    if (throwOnTimeout)\n      setTimeout(() => reject(reason), ms);\n    else\n      setTimeout(resolve, ms);\n  });\n}\nfunction identity(arg) {\n  return arg;\n}\nfunction createSingletonPromise(fn) {\n  let _promise;\n  function wrapper() {\n    if (!_promise)\n      _promise = fn();\n    return _promise;\n  }\n  wrapper.reset = async () => {\n    const _prev = _promise;\n    _promise = void 0;\n    if (_prev)\n      await _prev;\n  };\n  return wrapper;\n}\nfunction invoke(fn) {\n  return fn();\n}\nfunction containsProp(obj, ...props) {\n  return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n  var _a;\n  if (typeof target === \"number\")\n    return target + delta;\n  const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n  const unit = target.slice(value.length);\n  const result = Number.parseFloat(value) + delta;\n  if (Number.isNaN(result))\n    return target;\n  return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n  return keys.reduce((n, k) => {\n    if (k in obj) {\n      if (!omitUndefined || obj[k] !== void 0)\n        n[k] = obj[k];\n    }\n    return n;\n  }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n  return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n    return (!omitUndefined || value !== void 0) && !keys.includes(key);\n  }));\n}\nfunction objectEntries(obj) {\n  return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n  return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n  if (args.length !== 1)\n    return toRef$1(...args);\n  const r = args[0];\n  return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n  const flatKeys = keys.flat();\n  const predicate = flatKeys[0];\n  return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n  return customRef((track, trigger) => {\n    let value = toValue(defaultValue);\n    let timer;\n    const resetAfter = () => setTimeout(() => {\n      value = toValue(defaultValue);\n      trigger();\n    }, toValue(afterMs));\n    tryOnScopeDispose(() => {\n      clearTimeout(timer);\n    });\n    return {\n      get() {\n        track();\n        return value;\n      },\n      set(newValue) {\n        value = newValue;\n        trigger();\n        clearTimeout(timer);\n        timer = resetAfter();\n      }\n    };\n  });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n  return createFilterWrapper(\n    debounceFilter(ms, options),\n    fn\n  );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n  const debounced = ref(value.value);\n  const updater = useDebounceFn(() => {\n    debounced.value = value.value;\n  }, ms, options);\n  watch(value, () => updater());\n  return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n  return computed({\n    get() {\n      var _a;\n      return (_a = source.value) != null ? _a : defaultValue;\n    },\n    set(value) {\n      source.value = value;\n    }\n  });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n  return createFilterWrapper(\n    throttleFilter(ms, trailing, leading, rejectOnCancel),\n    fn\n  );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n  if (delay <= 0)\n    return value;\n  const throttled = ref(value.value);\n  const updater = useThrottleFn(() => {\n    throttled.value = value.value;\n  }, delay, trailing, leading);\n  watch(value, () => updater());\n  return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n  let source = initial;\n  let track;\n  let trigger;\n  const ref = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        return get();\n      },\n      set(v) {\n        set(v);\n      }\n    };\n  });\n  function get(tracking = true) {\n    if (tracking)\n      track();\n    return source;\n  }\n  function set(value, triggering = true) {\n    var _a, _b;\n    if (value === source)\n      return;\n    const old = source;\n    if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n      return;\n    source = value;\n    (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n    if (triggering)\n      trigger();\n  }\n  const untrackedGet = () => get(false);\n  const silentSet = (v) => set(v, false);\n  const peek = () => get(false);\n  const lay = (v) => set(v, false);\n  return extendRef(\n    ref,\n    {\n      get,\n      set,\n      untrackedGet,\n      silentSet,\n      peek,\n      lay\n    },\n    { enumerable: true }\n  );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n  if (args.length === 2) {\n    const [ref, value] = args;\n    ref.value = value;\n  }\n  if (args.length === 3) {\n    if (isVue2) {\n      set$1(...args);\n    } else {\n      const [target, key, value] = args;\n      target[key] = value;\n    }\n  }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n  const {\n    eventFilter = bypassFilter,\n    ...watchOptions\n  } = options;\n  return watch(\n    source,\n    createFilterWrapper(\n      eventFilter,\n      cb\n    ),\n    watchOptions\n  );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n  const {\n    eventFilter: filter,\n    ...watchOptions\n  } = options;\n  const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n  const stop = watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter\n    }\n  );\n  return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true,\n    direction = \"both\",\n    transform = {}\n  } = options || {};\n  const watchers = [];\n  const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n  const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n  if (direction === \"both\" || direction === \"ltr\") {\n    watchers.push(watchPausable(\n      left,\n      (newValue) => {\n        watchers.forEach((w) => w.pause());\n        right.value = transformLTR(newValue);\n        watchers.forEach((w) => w.resume());\n      },\n      { flush, deep, immediate }\n    ));\n  }\n  if (direction === \"both\" || direction === \"rtl\") {\n    watchers.push(watchPausable(\n      right,\n      (newValue) => {\n        watchers.forEach((w) => w.pause());\n        left.value = transformRTL(newValue);\n        watchers.forEach((w) => w.resume());\n      },\n      { flush, deep, immediate }\n    ));\n  }\n  const stop = () => {\n    watchers.forEach((w) => w.stop());\n  };\n  return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true\n  } = options;\n  if (!Array.isArray(targets))\n    targets = [targets];\n  return watch(\n    source,\n    (newValue) => targets.forEach((target) => target.value = newValue),\n    { flush, deep, immediate }\n  );\n}\n\nfunction toRefs(objectRef, options = {}) {\n  if (!isRef(objectRef))\n    return toRefs$1(objectRef);\n  const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n  for (const key in objectRef.value) {\n    result[key] = customRef(() => ({\n      get() {\n        return objectRef.value[key];\n      },\n      set(v) {\n        var _a;\n        const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n        if (replaceRef) {\n          if (Array.isArray(objectRef.value)) {\n            const copy = [...objectRef.value];\n            copy[key] = v;\n            objectRef.value = copy;\n          } else {\n            const newObject = { ...objectRef.value, [key]: v };\n            Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n            objectRef.value = newObject;\n          }\n        } else {\n          objectRef.value[key] = v;\n        }\n      }\n    }));\n  }\n  return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onBeforeMount(fn, target);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n  const instance = getLifeCycleTarget();\n  if (instance)\n    onMounted(fn, target);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n  function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch(\n        r,\n        (v) => {\n          if (condition(v) !== isNot) {\n            if (stop)\n              stop();\n            else\n              nextTick(() => stop == null ? void 0 : stop());\n            resolve(v);\n          }\n        },\n        {\n          flush,\n          deep,\n          immediate: true\n        }\n      );\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(\n        promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n      );\n    }\n    return Promise.race(promises);\n  }\n  function toBe(value, options) {\n    if (!isRef(value))\n      return toMatch((v) => v === value, options);\n    const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch(\n        [r, value],\n        ([v1, v2]) => {\n          if (isNot !== (v1 === v2)) {\n            if (stop)\n              stop();\n            else\n              nextTick(() => stop == null ? void 0 : stop());\n            resolve(v1);\n          }\n        },\n        {\n          flush,\n          deep,\n          immediate: true\n        }\n      );\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(\n        promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n          stop == null ? void 0 : stop();\n          return toValue(r);\n        })\n      );\n    }\n    return Promise.race(promises);\n  }\n  function toBeTruthy(options) {\n    return toMatch((v) => Boolean(v), options);\n  }\n  function toBeNull(options) {\n    return toBe(null, options);\n  }\n  function toBeUndefined(options) {\n    return toBe(void 0, options);\n  }\n  function toBeNaN(options) {\n    return toMatch(Number.isNaN, options);\n  }\n  function toContains(value, options) {\n    return toMatch((v) => {\n      const array = Array.from(v);\n      return array.includes(value) || array.includes(toValue(value));\n    }, options);\n  }\n  function changed(options) {\n    return changedTimes(1, options);\n  }\n  function changedTimes(n = 1, options) {\n    let count = -1;\n    return toMatch(() => {\n      count += 1;\n      return count >= n;\n    }, options);\n  }\n  if (Array.isArray(toValue(r))) {\n    const instance = {\n      toMatch,\n      toContains,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  } else {\n    const instance = {\n      toMatch,\n      toBe,\n      toBeTruthy,\n      toBeNull,\n      toBeNaN,\n      toBeUndefined,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  }\n}\nfunction until(r) {\n  return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n  return value === othVal;\n}\nfunction useArrayDifference(...args) {\n  var _a;\n  const list = args[0];\n  const values = args[1];\n  let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n  if (typeof compareFn === \"string\") {\n    const key = compareFn;\n    compareFn = (value, othVal) => value[key] === othVal[key];\n  }\n  return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n  return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n  return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n  return computed(() => toValue(\n    toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n  ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n  return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n  let index = arr.length;\n  while (index-- > 0) {\n    if (cb(arr[index], index, arr))\n      return arr[index];\n  }\n  return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n  return computed(() => toValue(\n    !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n  ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n  return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n  var _a;\n  const list = args[0];\n  const value = args[1];\n  let comparator = args[2];\n  let formIndex = 0;\n  if (isArrayIncludesOptions(comparator)) {\n    formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n    comparator = comparator.comparator;\n  }\n  if (typeof comparator === \"string\") {\n    const key = comparator;\n    comparator = (element, value2) => element[key] === toValue(value2);\n  }\n  comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n  return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n    toValue(element),\n    toValue(value),\n    index,\n    toValue(array)\n  )));\n}\n\nfunction useArrayJoin(list, separator) {\n  return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n  return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n  const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n  return computed(() => {\n    const resolved = toValue(list);\n    return args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);\n  });\n}\n\nfunction useArraySome(list, fn) {\n  return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n  return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n  return array.reduce((acc, v) => {\n    if (!acc.some((x) => fn(v, x, array)))\n      acc.push(v);\n    return acc;\n  }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n  return computed(() => {\n    const resolvedList = toValue(list).map((element) => toValue(element));\n    return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n  });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n  let _initialValue = unref(initialValue);\n  const count = ref(initialValue);\n  const {\n    max = Number.POSITIVE_INFINITY,\n    min = Number.NEGATIVE_INFINITY\n  } = options;\n  const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n  const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n  const get = () => count.value;\n  const set = (val) => count.value = Math.max(min, Math.min(max, val));\n  const reset = (val = _initialValue) => {\n    _initialValue = val;\n    return set(val);\n  };\n  return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n  let m = hours < 12 ? \"AM\" : \"PM\";\n  if (hasPeriod)\n    m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n  return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n  const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n  const v = num % 100;\n  return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n  var _a;\n  const years = date.getFullYear();\n  const month = date.getMonth();\n  const days = date.getDate();\n  const hours = date.getHours();\n  const minutes = date.getMinutes();\n  const seconds = date.getSeconds();\n  const milliseconds = date.getMilliseconds();\n  const day = date.getDay();\n  const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n  const matches = {\n    Yo: () => formatOrdinal(years),\n    YY: () => String(years).slice(-2),\n    YYYY: () => years,\n    M: () => month + 1,\n    Mo: () => formatOrdinal(month + 1),\n    MM: () => `${month + 1}`.padStart(2, \"0\"),\n    MMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n    MMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n    D: () => String(days),\n    Do: () => formatOrdinal(days),\n    DD: () => `${days}`.padStart(2, \"0\"),\n    H: () => String(hours),\n    Ho: () => formatOrdinal(hours),\n    HH: () => `${hours}`.padStart(2, \"0\"),\n    h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n    ho: () => formatOrdinal(hours % 12 || 12),\n    hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n    m: () => String(minutes),\n    mo: () => formatOrdinal(minutes),\n    mm: () => `${minutes}`.padStart(2, \"0\"),\n    s: () => String(seconds),\n    so: () => formatOrdinal(seconds),\n    ss: () => `${seconds}`.padStart(2, \"0\"),\n    SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n    d: () => day,\n    dd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n    ddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n    dddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n    A: () => meridiem(hours, minutes),\n    AA: () => meridiem(hours, minutes, false, true),\n    a: () => meridiem(hours, minutes, true),\n    aa: () => meridiem(hours, minutes, true, true)\n  };\n  return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n    var _a2, _b;\n    return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n  });\n}\nfunction normalizeDate(date) {\n  if (date === null)\n    return new Date(Number.NaN);\n  if (date === void 0)\n    return /* @__PURE__ */ new Date();\n  if (date instanceof Date)\n    return new Date(date);\n  if (typeof date === \"string\" && !/Z$/i.test(date)) {\n    const d = date.match(REGEX_PARSE);\n    if (d) {\n      const m = d[2] - 1 || 0;\n      const ms = (d[7] || \"0\").substring(0, 3);\n      return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n    }\n  }\n  return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n  return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n  const {\n    immediate = true,\n    immediateCallback = false\n  } = options;\n  let timer = null;\n  const isActive = ref(false);\n  function clean() {\n    if (timer) {\n      clearInterval(timer);\n      timer = null;\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    clean();\n  }\n  function resume() {\n    const intervalValue = toValue(interval);\n    if (intervalValue <= 0)\n      return;\n    isActive.value = true;\n    if (immediateCallback)\n      cb();\n    clean();\n    if (isActive.value)\n      timer = setInterval(cb, intervalValue);\n  }\n  if (immediate && isClient)\n    resume();\n  if (isRef(interval) || typeof interval === \"function\") {\n    const stopWatch = watch(interval, () => {\n      if (isActive.value && isClient)\n        resume();\n    });\n    tryOnScopeDispose(stopWatch);\n  }\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    immediate = true,\n    callback\n  } = options;\n  const counter = ref(0);\n  const update = () => counter.value += 1;\n  const reset = () => {\n    counter.value = 0;\n  };\n  const controls = useIntervalFn(\n    callback ? () => {\n      update();\n      callback(counter.value);\n    } : update,\n    interval,\n    { immediate }\n  );\n  if (exposeControls) {\n    return {\n      counter,\n      reset,\n      ...controls\n    };\n  } else {\n    return counter;\n  }\n}\n\nfunction useLastChanged(source, options = {}) {\n  var _a;\n  const ms = ref((_a = options.initialValue) != null ? _a : null);\n  watch(\n    source,\n    () => ms.value = timestamp(),\n    options\n  );\n  return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n  const {\n    immediate = true\n  } = options;\n  const isPending = ref(false);\n  let timer = null;\n  function clear() {\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n  }\n  function stop() {\n    isPending.value = false;\n    clear();\n  }\n  function start(...args) {\n    clear();\n    isPending.value = true;\n    timer = setTimeout(() => {\n      isPending.value = false;\n      timer = null;\n      cb(...args);\n    }, toValue(interval));\n  }\n  if (immediate) {\n    isPending.value = true;\n    if (isClient)\n      start();\n  }\n  tryOnScopeDispose(stop);\n  return {\n    isPending: readonly(isPending),\n    start,\n    stop\n  };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    callback\n  } = options;\n  const controls = useTimeoutFn(\n    callback != null ? callback : noop,\n    interval,\n    options\n  );\n  const ready = computed(() => !controls.isPending.value);\n  if (exposeControls) {\n    return {\n      ready,\n      ...controls\n    };\n  } else {\n    return ready;\n  }\n}\n\nfunction useToNumber(value, options = {}) {\n  const {\n    method = \"parseFloat\",\n    radix,\n    nanToZero\n  } = options;\n  return computed(() => {\n    let resolved = toValue(value);\n    if (typeof resolved === \"string\")\n      resolved = Number[method](resolved, radix);\n    if (nanToZero && Number.isNaN(resolved))\n      resolved = 0;\n    return resolved;\n  });\n}\n\nfunction useToString(value) {\n  return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n  const {\n    truthyValue = true,\n    falsyValue = false\n  } = options;\n  const valueIsRef = isRef(initialValue);\n  const _value = ref(initialValue);\n  function toggle(value) {\n    if (arguments.length) {\n      _value.value = value;\n      return _value.value;\n    } else {\n      const truthy = toValue(truthyValue);\n      _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n      return _value.value;\n    }\n  }\n  if (valueIsRef)\n    return toggle;\n  else\n    return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n  let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n  return watch(source, (newList, _, onCleanup) => {\n    const oldListRemains = Array.from({ length: oldList.length });\n    const added = [];\n    for (const obj of newList) {\n      let found = false;\n      for (let i = 0; i < oldList.length; i++) {\n        if (!oldListRemains[i] && obj === oldList[i]) {\n          oldListRemains[i] = true;\n          found = true;\n          break;\n        }\n      }\n      if (!found)\n        added.push(obj);\n    }\n    const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n    cb(newList, oldList, added, removed, onCleanup);\n    oldList = [...newList];\n  }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n  const {\n    count,\n    ...watchOptions\n  } = options;\n  const current = ref(0);\n  const stop = watchWithFilter(\n    source,\n    (...args) => {\n      current.value += 1;\n      if (current.value >= toValue(count))\n        nextTick(() => stop());\n      cb(...args);\n    },\n    watchOptions\n  );\n  return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n  const {\n    debounce = 0,\n    maxWait = void 0,\n    ...watchOptions\n  } = options;\n  return watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter: debounceFilter(debounce, { maxWait })\n    }\n  );\n}\n\nfunction watchDeep(source, cb, options) {\n  return watch(\n    source,\n    cb,\n    {\n      ...options,\n      deep: true\n    }\n  );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n  const {\n    eventFilter = bypassFilter,\n    ...watchOptions\n  } = options;\n  const filteredCb = createFilterWrapper(\n    eventFilter,\n    cb\n  );\n  let ignoreUpdates;\n  let ignorePrevAsyncUpdates;\n  let stop;\n  if (watchOptions.flush === \"sync\") {\n    const ignore = ref(false);\n    ignorePrevAsyncUpdates = () => {\n    };\n    ignoreUpdates = (updater) => {\n      ignore.value = true;\n      updater();\n      ignore.value = false;\n    };\n    stop = watch(\n      source,\n      (...args) => {\n        if (!ignore.value)\n          filteredCb(...args);\n      },\n      watchOptions\n    );\n  } else {\n    const disposables = [];\n    const ignoreCounter = ref(0);\n    const syncCounter = ref(0);\n    ignorePrevAsyncUpdates = () => {\n      ignoreCounter.value = syncCounter.value;\n    };\n    disposables.push(\n      watch(\n        source,\n        () => {\n          syncCounter.value++;\n        },\n        { ...watchOptions, flush: \"sync\" }\n      )\n    );\n    ignoreUpdates = (updater) => {\n      const syncCounterPrev = syncCounter.value;\n      updater();\n      ignoreCounter.value += syncCounter.value - syncCounterPrev;\n    };\n    disposables.push(\n      watch(\n        source,\n        (...args) => {\n          const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n          ignoreCounter.value = 0;\n          syncCounter.value = 0;\n          if (ignore)\n            return;\n          filteredCb(...args);\n        },\n        watchOptions\n      )\n    );\n    stop = () => {\n      disposables.forEach((fn) => fn());\n    };\n  }\n  return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n  return watch(\n    source,\n    cb,\n    {\n      ...options,\n      immediate: true\n    }\n  );\n}\n\nfunction watchOnce(source, cb, options) {\n  const stop = watch(source, (...args) => {\n    nextTick(() => stop());\n    return cb(...args);\n  }, options);\n  return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n  const {\n    throttle = 0,\n    trailing = true,\n    leading = true,\n    ...watchOptions\n  } = options;\n  return watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter: throttleFilter(throttle, trailing, leading)\n    }\n  );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n  let cleanupFn;\n  function onEffect() {\n    if (!cleanupFn)\n      return;\n    const fn = cleanupFn;\n    cleanupFn = void 0;\n    fn();\n  }\n  function onCleanup(callback) {\n    cleanupFn = callback;\n  }\n  const _cb = (value, oldValue) => {\n    onEffect();\n    return cb(value, oldValue, onCleanup);\n  };\n  const res = watchIgnorable(source, _cb, options);\n  const { ignoreUpdates } = res;\n  const trigger = () => {\n    let res2;\n    ignoreUpdates(() => {\n      res2 = _cb(getWatchSources(source), getOldValue(source));\n    });\n    return res2;\n  };\n  return {\n    ...res,\n    trigger\n  };\n}\nfunction getWatchSources(sources) {\n  if (isReactive(sources))\n    return sources;\n  if (Array.isArray(sources))\n    return sources.map((item) => toValue(item));\n  return toValue(sources);\n}\nfunction getOldValue(source) {\n  return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n  const stop = watch(\n    source,\n    (v, ov, onInvalidate) => {\n      if (v) {\n        if (options == null ? void 0 : options.once)\n          nextTick(() => stop());\n        cb(v, ov, onInvalidate);\n      }\n    },\n    {\n      ...options,\n      once: false\n    }\n  );\n  return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, tryOnUnmounted, clamp, syncRef, objectPick, watchWithFilter, tryOnBeforeUnmount, identity, isDef, whenever, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, reactive, toRaw, nextTick, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n  let options;\n  if (isRef(optionsOrRef)) {\n    options = {\n      evaluating: optionsOrRef\n    };\n  } else {\n    options = optionsOrRef || {};\n  }\n  const {\n    lazy = false,\n    evaluating = void 0,\n    shallow = true,\n    onError = noop\n  } = options;\n  const started = ref(!lazy);\n  const current = shallow ? shallowRef(initialState) : ref(initialState);\n  let counter = 0;\n  watchEffect(async (onInvalidate) => {\n    if (!started.value)\n      return;\n    counter++;\n    const counterAtBeginning = counter;\n    let hasFinished = false;\n    if (evaluating) {\n      Promise.resolve().then(() => {\n        evaluating.value = true;\n      });\n    }\n    try {\n      const result = await evaluationCallback((cancelCallback) => {\n        onInvalidate(() => {\n          if (evaluating)\n            evaluating.value = false;\n          if (!hasFinished)\n            cancelCallback();\n        });\n      });\n      if (counterAtBeginning === counter)\n        current.value = result;\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (evaluating && counterAtBeginning === counter)\n        evaluating.value = false;\n      hasFinished = true;\n    }\n  });\n  if (lazy) {\n    return computed(() => {\n      started.value = true;\n      return current.value;\n    });\n  } else {\n    return current;\n  }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n  let source = inject(key);\n  if (defaultSource)\n    source = inject(key, defaultSource);\n  if (treatDefaultAsFactory)\n    source = inject(key, defaultSource, treatDefaultAsFactory);\n  if (typeof options === \"function\") {\n    return computed((ctx) => options(source, ctx));\n  } else {\n    return computed({\n      get: (ctx) => options.get(source, ctx),\n      set: options.set\n    });\n  }\n}\n\nfunction createReusableTemplate(options = {}) {\n  if (!isVue3 && !version.startsWith(\"2.7.\")) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n    return;\n  }\n  const {\n    inheritAttrs = true\n  } = options;\n  const render = shallowRef();\n  const define = /* #__PURE__ */ defineComponent({\n    setup(_, { slots }) {\n      return () => {\n        render.value = slots.default;\n      };\n    }\n  });\n  const reuse = /* #__PURE__ */ defineComponent({\n    inheritAttrs,\n    setup(_, { attrs, slots }) {\n      return () => {\n        var _a;\n        if (!render.value && process.env.NODE_ENV !== \"production\")\n          throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n        const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n        return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n      };\n    }\n  });\n  return makeDestructurable(\n    { define, reuse },\n    [define, reuse]\n  );\n}\nfunction keysToCamelKebabCase(obj) {\n  const newObj = {};\n  for (const key in obj)\n    newObj[camelize(key)] = obj[key];\n  return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n  if (!isVue3) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n    return;\n  }\n  let index = 0;\n  const instances = ref([]);\n  function create(...args) {\n    const props = shallowReactive({\n      key: index++,\n      args,\n      promise: void 0,\n      resolve: () => {\n      },\n      reject: () => {\n      },\n      isResolving: false,\n      options\n    });\n    instances.value.push(props);\n    props.promise = new Promise((_resolve, _reject) => {\n      props.resolve = (v) => {\n        props.isResolving = true;\n        return _resolve(v);\n      };\n      props.reject = _reject;\n    }).finally(() => {\n      props.promise = void 0;\n      const index2 = instances.value.indexOf(props);\n      if (index2 !== -1)\n        instances.value.splice(index2, 1);\n    });\n    return props.promise;\n  }\n  function start(...args) {\n    if (options.singleton && instances.value.length > 0)\n      return instances.value[0].promise;\n    return create(...args);\n  }\n  const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n    const renderList = () => instances.value.map((props) => {\n      var _a;\n      return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n    });\n    if (options.transition)\n      return () => h(TransitionGroup, options.transition, renderList);\n    return renderList;\n  });\n  component.start = start;\n  return component;\n}\n\nfunction createUnrefFn(fn) {\n  return function(...args) {\n    return fn.apply(this, args.map((i) => toValue(i)));\n  };\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction unrefElement(elRef) {\n  var _a;\n  const plain = toValue(elRef);\n  return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nfunction useEventListener(...args) {\n  let target;\n  let events;\n  let listeners;\n  let options;\n  if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n    [events, listeners, options] = args;\n    target = defaultWindow;\n  } else {\n    [target, events, listeners, options] = args;\n  }\n  if (!target)\n    return noop;\n  if (!Array.isArray(events))\n    events = [events];\n  if (!Array.isArray(listeners))\n    listeners = [listeners];\n  const cleanups = [];\n  const cleanup = () => {\n    cleanups.forEach((fn) => fn());\n    cleanups.length = 0;\n  };\n  const register = (el, event, listener, options2) => {\n    el.addEventListener(event, listener, options2);\n    return () => el.removeEventListener(event, listener, options2);\n  };\n  const stopWatch = watch(\n    () => [unrefElement(target), toValue(options)],\n    ([el, options2]) => {\n      cleanup();\n      if (!el)\n        return;\n      const optionsClone = isObject(options2) ? { ...options2 } : options2;\n      cleanups.push(\n        ...events.flatMap((event) => {\n          return listeners.map((listener) => register(el, event, listener, optionsClone));\n        })\n      );\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const stop = () => {\n    stopWatch();\n    cleanup();\n  };\n  tryOnScopeDispose(stop);\n  return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n  const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n  if (!window)\n    return noop;\n  if (isIOS && !_iOSWorkaround) {\n    _iOSWorkaround = true;\n    Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n    window.document.documentElement.addEventListener(\"click\", noop);\n  }\n  let shouldListen = true;\n  const shouldIgnore = (event) => {\n    return toValue(ignore).some((target2) => {\n      if (typeof target2 === \"string\") {\n        return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n      } else {\n        const el = unrefElement(target2);\n        return el && (event.target === el || event.composedPath().includes(el));\n      }\n    });\n  };\n  const listener = (event) => {\n    const el = unrefElement(target);\n    if (!el || el === event.target || event.composedPath().includes(el))\n      return;\n    if (event.detail === 0)\n      shouldListen = !shouldIgnore(event);\n    if (!shouldListen) {\n      shouldListen = true;\n      return;\n    }\n    handler(event);\n  };\n  let isProcessingClick = false;\n  const cleanup = [\n    useEventListener(window, \"click\", (event) => {\n      if (!isProcessingClick) {\n        isProcessingClick = true;\n        setTimeout(() => {\n          isProcessingClick = false;\n        }, 0);\n        listener(event);\n      }\n    }, { passive: true, capture }),\n    useEventListener(window, \"pointerdown\", (e) => {\n      const el = unrefElement(target);\n      shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n    }, { passive: true }),\n    detectIframe && useEventListener(window, \"blur\", (event) => {\n      setTimeout(() => {\n        var _a;\n        const el = unrefElement(target);\n        if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n          handler(event);\n        }\n      }, 0);\n    })\n  ].filter(Boolean);\n  const stop = () => cleanup.forEach((fn) => fn());\n  return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n  if (typeof keyFilter === \"function\")\n    return keyFilter;\n  else if (typeof keyFilter === \"string\")\n    return (event) => event.key === keyFilter;\n  else if (Array.isArray(keyFilter))\n    return (event) => keyFilter.includes(event.key);\n  return () => true;\n}\nfunction onKeyStroke(...args) {\n  let key;\n  let handler;\n  let options = {};\n  if (args.length === 3) {\n    key = args[0];\n    handler = args[1];\n    options = args[2];\n  } else if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      key = true;\n      handler = args[0];\n      options = args[1];\n    } else {\n      key = args[0];\n      handler = args[1];\n    }\n  } else {\n    key = true;\n    handler = args[0];\n  }\n  const {\n    target = defaultWindow,\n    eventName = \"keydown\",\n    passive = false,\n    dedupe = false\n  } = options;\n  const predicate = createKeyPredicate(key);\n  const listener = (e) => {\n    if (e.repeat && toValue(dedupe))\n      return;\n    if (predicate(e))\n      handler(e);\n  };\n  return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n  var _a, _b;\n  const elementRef = computed(() => unrefElement(target));\n  let timeout;\n  let posStart;\n  let startTimestamp;\n  let hasLongPressed = false;\n  function clear() {\n    if (timeout) {\n      clearTimeout(timeout);\n      timeout = void 0;\n    }\n    posStart = void 0;\n    startTimestamp = void 0;\n    hasLongPressed = false;\n  }\n  function onRelease(ev) {\n    var _a2, _b2, _c;\n    const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n    clear();\n    if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n      return;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    const dx = ev.x - _posStart.x;\n    const dy = ev.y - _posStart.y;\n    const distance = Math.sqrt(dx * dx + dy * dy);\n    options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n  }\n  function onDown(ev) {\n    var _a2, _b2, _c, _d;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    clear();\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    posStart = {\n      x: ev.x,\n      y: ev.y\n    };\n    startTimestamp = ev.timeStamp;\n    timeout = setTimeout(\n      () => {\n        hasLongPressed = true;\n        handler(ev);\n      },\n      (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n    );\n  }\n  function onMove(ev) {\n    var _a2, _b2, _c, _d;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n      return;\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    const dx = ev.x - posStart.x;\n    const dy = ev.y - posStart.y;\n    const distance = Math.sqrt(dx * dx + dy * dy);\n    if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n      clear();\n  }\n  const listenerOptions = {\n    capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n    once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n  };\n  const cleanup = [\n    useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n    useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n    useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n  ];\n  const stop = () => cleanup.forEach((fn) => fn());\n  return stop;\n}\n\nfunction isFocusedElementEditable() {\n  const { activeElement, body } = document;\n  if (!activeElement)\n    return false;\n  if (activeElement === body)\n    return false;\n  switch (activeElement.tagName) {\n    case \"INPUT\":\n    case \"TEXTAREA\":\n      return true;\n  }\n  return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n  keyCode,\n  metaKey,\n  ctrlKey,\n  altKey\n}) {\n  if (metaKey || ctrlKey || altKey)\n    return false;\n  if (keyCode >= 48 && keyCode <= 57)\n    return true;\n  if (keyCode >= 65 && keyCode <= 90)\n    return true;\n  if (keyCode >= 97 && keyCode <= 122)\n    return true;\n  return false;\n}\nfunction onStartTyping(callback, options = {}) {\n  const { document: document2 = defaultDocument } = options;\n  const keydown = (event) => {\n    if (!isFocusedElementEditable() && isTypedCharValid(event)) {\n      callback(event);\n    }\n  };\n  if (document2)\n    useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n  const instance = getCurrentInstance();\n  let _trigger = () => {\n  };\n  const element = customRef((track, trigger) => {\n    _trigger = trigger;\n    return {\n      get() {\n        var _a, _b;\n        track();\n        return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n      },\n      set() {\n      }\n    };\n  });\n  tryOnMounted(_trigger);\n  onUpdated(_trigger);\n  return element;\n}\n\nfunction useMounted() {\n  const isMounted = ref(false);\n  const instance = getCurrentInstance();\n  if (instance) {\n    onMounted(() => {\n      isMounted.value = true;\n    }, isVue2 ? void 0 : instance);\n  }\n  return isMounted;\n}\n\nfunction useSupported(callback) {\n  const isMounted = useMounted();\n  return computed(() => {\n    isMounted.value;\n    return Boolean(callback());\n  });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n  const { window = defaultWindow, ...mutationOptions } = options;\n  let observer;\n  const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const targets = computed(() => {\n    const value = toValue(target);\n    const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n    return new Set(items);\n  });\n  const stopWatch = watch(\n    () => targets.value,\n    (targets2) => {\n      cleanup();\n      if (isSupported.value && targets2.size) {\n        observer = new MutationObserver(callback);\n        targets2.forEach((el) => observer.observe(el, mutationOptions));\n      }\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const takeRecords = () => {\n    return observer == null ? void 0 : observer.takeRecords();\n  };\n  const stop = () => {\n    stopWatch();\n    cleanup();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop,\n    takeRecords\n  };\n}\n\nfunction useActiveElement(options = {}) {\n  var _a;\n  const {\n    window = defaultWindow,\n    deep = true,\n    triggerOnRemoval = false\n  } = options;\n  const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n  const getDeepActiveElement = () => {\n    var _a2;\n    let element = document == null ? void 0 : document.activeElement;\n    if (deep) {\n      while (element == null ? void 0 : element.shadowRoot)\n        element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n    }\n    return element;\n  };\n  const activeElement = ref();\n  const trigger = () => {\n    activeElement.value = getDeepActiveElement();\n  };\n  if (window) {\n    useEventListener(window, \"blur\", (event) => {\n      if (event.relatedTarget !== null)\n        return;\n      trigger();\n    }, true);\n    useEventListener(window, \"focus\", trigger, true);\n  }\n  if (triggerOnRemoval) {\n    useMutationObserver(document, (mutations) => {\n      mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n        if (node === activeElement.value)\n          trigger();\n      });\n    }, {\n      childList: true,\n      subtree: true\n    });\n  }\n  trigger();\n  return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n  const {\n    immediate = true,\n    fpsLimit = void 0,\n    window = defaultWindow\n  } = options;\n  const isActive = ref(false);\n  const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n  let previousFrameTimestamp = 0;\n  let rafId = null;\n  function loop(timestamp) {\n    if (!isActive.value || !window)\n      return;\n    if (!previousFrameTimestamp)\n      previousFrameTimestamp = timestamp;\n    const delta = timestamp - previousFrameTimestamp;\n    if (intervalLimit && delta < intervalLimit) {\n      rafId = window.requestAnimationFrame(loop);\n      return;\n    }\n    previousFrameTimestamp = timestamp;\n    fn({ delta, timestamp });\n    rafId = window.requestAnimationFrame(loop);\n  }\n  function resume() {\n    if (!isActive.value && window) {\n      isActive.value = true;\n      previousFrameTimestamp = 0;\n      rafId = window.requestAnimationFrame(loop);\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    if (rafId != null && window) {\n      window.cancelAnimationFrame(rafId);\n      rafId = null;\n    }\n  }\n  if (immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive: readonly(isActive),\n    pause,\n    resume\n  };\n}\n\nfunction useAnimate(target, keyframes, options) {\n  let config;\n  let animateOptions;\n  if (isObject(options)) {\n    config = options;\n    animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n  } else {\n    config = { duration: options };\n    animateOptions = options;\n  }\n  const {\n    window = defaultWindow,\n    immediate = true,\n    commitStyles,\n    persist,\n    playbackRate: _playbackRate = 1,\n    onReady,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = config;\n  const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n  const animate = shallowRef(void 0);\n  const store = shallowReactive({\n    startTime: null,\n    currentTime: null,\n    timeline: null,\n    playbackRate: _playbackRate,\n    pending: false,\n    playState: immediate ? \"idle\" : \"paused\",\n    replaceState: \"active\"\n  });\n  const pending = computed(() => store.pending);\n  const playState = computed(() => store.playState);\n  const replaceState = computed(() => store.replaceState);\n  const startTime = computed({\n    get() {\n      return store.startTime;\n    },\n    set(value) {\n      store.startTime = value;\n      if (animate.value)\n        animate.value.startTime = value;\n    }\n  });\n  const currentTime = computed({\n    get() {\n      return store.currentTime;\n    },\n    set(value) {\n      store.currentTime = value;\n      if (animate.value) {\n        animate.value.currentTime = value;\n        syncResume();\n      }\n    }\n  });\n  const timeline = computed({\n    get() {\n      return store.timeline;\n    },\n    set(value) {\n      store.timeline = value;\n      if (animate.value)\n        animate.value.timeline = value;\n    }\n  });\n  const playbackRate = computed({\n    get() {\n      return store.playbackRate;\n    },\n    set(value) {\n      store.playbackRate = value;\n      if (animate.value)\n        animate.value.playbackRate = value;\n    }\n  });\n  const play = () => {\n    if (animate.value) {\n      try {\n        animate.value.play();\n        syncResume();\n      } catch (e) {\n        syncPause();\n        onError(e);\n      }\n    } else {\n      update();\n    }\n  };\n  const pause = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.pause();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  const reverse = () => {\n    var _a;\n    if (!animate.value)\n      update();\n    try {\n      (_a = animate.value) == null ? void 0 : _a.reverse();\n      syncResume();\n    } catch (e) {\n      syncPause();\n      onError(e);\n    }\n  };\n  const finish = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.finish();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  const cancel = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.cancel();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  watch(() => unrefElement(target), (el) => {\n    if (el)\n      update();\n  });\n  watch(() => keyframes, (value) => {\n    if (animate.value)\n      update();\n    if (!unrefElement(target) && animate.value) {\n      animate.value.effect = new KeyframeEffect(\n        unrefElement(target),\n        toValue(value),\n        animateOptions\n      );\n    }\n  }, { deep: true });\n  tryOnMounted(() => update(true), false);\n  tryOnScopeDispose(cancel);\n  function update(init) {\n    const el = unrefElement(target);\n    if (!isSupported.value || !el)\n      return;\n    if (!animate.value)\n      animate.value = el.animate(toValue(keyframes), animateOptions);\n    if (persist)\n      animate.value.persist();\n    if (_playbackRate !== 1)\n      animate.value.playbackRate = _playbackRate;\n    if (init && !immediate)\n      animate.value.pause();\n    else\n      syncResume();\n    onReady == null ? void 0 : onReady(animate.value);\n  }\n  useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n  useEventListener(animate, \"finish\", () => {\n    var _a;\n    if (commitStyles)\n      (_a = animate.value) == null ? void 0 : _a.commitStyles();\n  });\n  const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n    if (!animate.value)\n      return;\n    store.pending = animate.value.pending;\n    store.playState = animate.value.playState;\n    store.replaceState = animate.value.replaceState;\n    store.startTime = animate.value.startTime;\n    store.currentTime = animate.value.currentTime;\n    store.timeline = animate.value.timeline;\n    store.playbackRate = animate.value.playbackRate;\n  }, { immediate: false });\n  function syncResume() {\n    if (isSupported.value)\n      resumeRef();\n  }\n  function syncPause() {\n    if (isSupported.value && window)\n      window.requestAnimationFrame(pauseRef);\n  }\n  return {\n    isSupported,\n    animate,\n    // actions\n    play,\n    pause,\n    reverse,\n    finish,\n    cancel,\n    // state\n    pending,\n    playState,\n    replaceState,\n    startTime,\n    currentTime,\n    timeline,\n    playbackRate\n  };\n}\n\nfunction useAsyncQueue(tasks, options) {\n  const {\n    interrupt = true,\n    onError = noop,\n    onFinished = noop,\n    signal\n  } = options || {};\n  const promiseState = {\n    aborted: \"aborted\",\n    fulfilled: \"fulfilled\",\n    pending: \"pending\",\n    rejected: \"rejected\"\n  };\n  const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n  const result = reactive(initialResult);\n  const activeIndex = ref(-1);\n  if (!tasks || tasks.length === 0) {\n    onFinished();\n    return {\n      activeIndex,\n      result\n    };\n  }\n  function updateResult(state, res) {\n    activeIndex.value++;\n    result[activeIndex.value].data = res;\n    result[activeIndex.value].state = state;\n  }\n  tasks.reduce((prev, curr) => {\n    return prev.then((prevRes) => {\n      var _a;\n      if (signal == null ? void 0 : signal.aborted) {\n        updateResult(promiseState.aborted, new Error(\"aborted\"));\n        return;\n      }\n      if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n        onFinished();\n        return;\n      }\n      const done = curr(prevRes).then((currentRes) => {\n        updateResult(promiseState.fulfilled, currentRes);\n        if (activeIndex.value === tasks.length - 1)\n          onFinished();\n        return currentRes;\n      });\n      if (!signal)\n        return done;\n      return Promise.race([done, whenAborted(signal)]);\n    }).catch((e) => {\n      if (signal == null ? void 0 : signal.aborted) {\n        updateResult(promiseState.aborted, e);\n        return e;\n      }\n      updateResult(promiseState.rejected, e);\n      onError();\n      return e;\n    });\n  }, Promise.resolve());\n  return {\n    activeIndex,\n    result\n  };\n}\nfunction whenAborted(signal) {\n  return new Promise((resolve, reject) => {\n    const error = new Error(\"aborted\");\n    if (signal.aborted)\n      reject(error);\n    else\n      signal.addEventListener(\"abort\", () => reject(error), { once: true });\n  });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n  const {\n    immediate = true,\n    delay = 0,\n    onError = noop,\n    onSuccess = noop,\n    resetOnExecute = true,\n    shallow = true,\n    throwError\n  } = options != null ? options : {};\n  const state = shallow ? shallowRef(initialState) : ref(initialState);\n  const isReady = ref(false);\n  const isLoading = ref(false);\n  const error = shallowRef(void 0);\n  async function execute(delay2 = 0, ...args) {\n    if (resetOnExecute)\n      state.value = initialState;\n    error.value = void 0;\n    isReady.value = false;\n    isLoading.value = true;\n    if (delay2 > 0)\n      await promiseTimeout(delay2);\n    const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n    try {\n      const data = await _promise;\n      state.value = data;\n      isReady.value = true;\n      onSuccess(data);\n    } catch (e) {\n      error.value = e;\n      onError(e);\n      if (throwError)\n        throw e;\n    } finally {\n      isLoading.value = false;\n    }\n    return state.value;\n  }\n  if (immediate)\n    execute(delay);\n  const shell = {\n    state,\n    isReady,\n    isLoading,\n    error,\n    execute\n  };\n  function waitUntilIsLoaded() {\n    return new Promise((resolve, reject) => {\n      until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n    });\n  }\n  return {\n    ...shell,\n    then(onFulfilled, onRejected) {\n      return waitUntilIsLoaded().then(onFulfilled, onRejected);\n    }\n  };\n}\n\nconst defaults = {\n  array: (v) => JSON.stringify(v),\n  object: (v) => JSON.stringify(v),\n  set: (v) => JSON.stringify(Array.from(v)),\n  map: (v) => JSON.stringify(Object.fromEntries(v)),\n  null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n  if (!target)\n    return defaults.null;\n  if (target instanceof Map)\n    return defaults.map;\n  else if (target instanceof Set)\n    return defaults.set;\n  else if (Array.isArray(target))\n    return defaults.array;\n  else\n    return defaults.object;\n}\n\nfunction useBase64(target, options) {\n  const base64 = ref(\"\");\n  const promise = ref();\n  function execute() {\n    if (!isClient)\n      return;\n    promise.value = new Promise((resolve, reject) => {\n      try {\n        const _target = toValue(target);\n        if (_target == null) {\n          resolve(\"\");\n        } else if (typeof _target === \"string\") {\n          resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n        } else if (_target instanceof Blob) {\n          resolve(blobToBase64(_target));\n        } else if (_target instanceof ArrayBuffer) {\n          resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n        } else if (_target instanceof HTMLCanvasElement) {\n          resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n        } else if (_target instanceof HTMLImageElement) {\n          const img = _target.cloneNode(false);\n          img.crossOrigin = \"Anonymous\";\n          imgLoaded(img).then(() => {\n            const canvas = document.createElement(\"canvas\");\n            const ctx = canvas.getContext(\"2d\");\n            canvas.width = img.width;\n            canvas.height = img.height;\n            ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n            resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n          }).catch(reject);\n        } else if (typeof _target === \"object\") {\n          const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n          const serialized = _serializeFn(_target);\n          return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n        } else {\n          reject(new Error(\"target is unsupported types\"));\n        }\n      } catch (error) {\n        reject(error);\n      }\n    });\n    promise.value.then((res) => base64.value = res);\n    return promise.value;\n  }\n  if (isRef(target) || typeof target === \"function\")\n    watch(target, execute, { immediate: true });\n  else\n    execute();\n  return {\n    base64,\n    promise,\n    execute\n  };\n}\nfunction imgLoaded(img) {\n  return new Promise((resolve, reject) => {\n    if (!img.complete) {\n      img.onload = () => {\n        resolve();\n      };\n      img.onerror = reject;\n    } else {\n      resolve();\n    }\n  });\n}\nfunction blobToBase64(blob) {\n  return new Promise((resolve, reject) => {\n    const fr = new FileReader();\n    fr.onload = (e) => {\n      resolve(e.target.result);\n    };\n    fr.onerror = reject;\n    fr.readAsDataURL(blob);\n  });\n}\n\nfunction useBattery(options = {}) {\n  const { navigator = defaultNavigator } = options;\n  const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n  const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n  const charging = ref(false);\n  const chargingTime = ref(0);\n  const dischargingTime = ref(0);\n  const level = ref(1);\n  let battery;\n  function updateBatteryInfo() {\n    charging.value = this.charging;\n    chargingTime.value = this.chargingTime || 0;\n    dischargingTime.value = this.dischargingTime || 0;\n    level.value = this.level;\n  }\n  if (isSupported.value) {\n    navigator.getBattery().then((_battery) => {\n      battery = _battery;\n      updateBatteryInfo.call(battery);\n      useEventListener(battery, events, updateBatteryInfo, { passive: true });\n    });\n  }\n  return {\n    isSupported,\n    charging,\n    chargingTime,\n    dischargingTime,\n    level\n  };\n}\n\nfunction useBluetooth(options) {\n  let {\n    acceptAllDevices = false\n  } = options || {};\n  const {\n    filters = void 0,\n    optionalServices = void 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n  const device = shallowRef(void 0);\n  const error = shallowRef(null);\n  watch(device, () => {\n    connectToBluetoothGATTServer();\n  });\n  async function requestDevice() {\n    if (!isSupported.value)\n      return;\n    error.value = null;\n    if (filters && filters.length > 0)\n      acceptAllDevices = false;\n    try {\n      device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n        acceptAllDevices,\n        filters,\n        optionalServices\n      }));\n    } catch (err) {\n      error.value = err;\n    }\n  }\n  const server = ref();\n  const isConnected = computed(() => {\n    var _a;\n    return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n  });\n  async function connectToBluetoothGATTServer() {\n    error.value = null;\n    if (device.value && device.value.gatt) {\n      device.value.addEventListener(\"gattserverdisconnected\", () => {\n      });\n      try {\n        server.value = await device.value.gatt.connect();\n      } catch (err) {\n        error.value = err;\n      }\n    }\n  }\n  tryOnMounted(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.connect();\n  });\n  tryOnScopeDispose(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n  });\n  return {\n    isSupported,\n    isConnected,\n    // Device:\n    device,\n    requestDevice,\n    // Server:\n    server,\n    // Errors:\n    error\n  };\n}\n\nfunction useMediaQuery(query, options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n  let mediaQuery;\n  const matches = ref(false);\n  const handler = (event) => {\n    matches.value = event.matches;\n  };\n  const cleanup = () => {\n    if (!mediaQuery)\n      return;\n    if (\"removeEventListener\" in mediaQuery)\n      mediaQuery.removeEventListener(\"change\", handler);\n    else\n      mediaQuery.removeListener(handler);\n  };\n  const stopWatch = watchEffect(() => {\n    if (!isSupported.value)\n      return;\n    cleanup();\n    mediaQuery = window.matchMedia(toValue(query));\n    if (\"addEventListener\" in mediaQuery)\n      mediaQuery.addEventListener(\"change\", handler);\n    else\n      mediaQuery.addListener(handler);\n    matches.value = mediaQuery.matches;\n  });\n  tryOnScopeDispose(() => {\n    stopWatch();\n    cleanup();\n    mediaQuery = void 0;\n  });\n  return matches;\n}\n\nconst breakpointsTailwind = {\n  \"sm\": 640,\n  \"md\": 768,\n  \"lg\": 1024,\n  \"xl\": 1280,\n  \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n  xs: 0,\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n  xs: 0,\n  sm: 600,\n  md: 960,\n  lg: 1264,\n  xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n  xs: 0,\n  sm: 600,\n  md: 960,\n  lg: 1280,\n  xl: 1920,\n  xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n  xs: 480,\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1600\n};\nconst breakpointsQuasar = {\n  xs: 0,\n  sm: 600,\n  md: 1024,\n  lg: 1440,\n  xl: 1920\n};\nconst breakpointsSematic = {\n  mobileS: 320,\n  mobileM: 375,\n  mobileL: 425,\n  tablet: 768,\n  laptop: 1024,\n  laptopL: 1440,\n  desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n  \"3xs\": 360,\n  \"2xs\": 480,\n  \"xs\": 600,\n  \"sm\": 768,\n  \"md\": 1024,\n  \"lg\": 1280,\n  \"xl\": 1440,\n  \"2xl\": 1600,\n  \"3xl\": 1920,\n  \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200\n};\nconst breakpointsElement = {\n  xs: 0,\n  sm: 768,\n  md: 992,\n  lg: 1200,\n  xl: 1920\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n  function getValue(k, delta) {\n    let v = toValue(breakpoints[toValue(k)]);\n    if (delta != null)\n      v = increaseWithUnit(v, delta);\n    if (typeof v === \"number\")\n      v = `${v}px`;\n    return v;\n  }\n  const { window = defaultWindow, strategy = \"min-width\" } = options;\n  function match(query) {\n    if (!window)\n      return false;\n    return window.matchMedia(query).matches;\n  }\n  const greaterOrEqual = (k) => {\n    return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n  };\n  const smallerOrEqual = (k) => {\n    return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n  };\n  const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n    Object.defineProperty(shortcuts, k, {\n      get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n      enumerable: true,\n      configurable: true\n    });\n    return shortcuts;\n  }, {});\n  function current() {\n    const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n    return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n  }\n  return Object.assign(shortcutMethods, {\n    greaterOrEqual,\n    smallerOrEqual,\n    greater(k) {\n      return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n    },\n    smaller(k) {\n      return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n    },\n    between(a, b) {\n      return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n    },\n    isGreater(k) {\n      return match(`(min-width: ${getValue(k, 0.1)})`);\n    },\n    isGreaterOrEqual(k) {\n      return match(`(min-width: ${getValue(k)})`);\n    },\n    isSmaller(k) {\n      return match(`(max-width: ${getValue(k, -0.1)})`);\n    },\n    isSmallerOrEqual(k) {\n      return match(`(max-width: ${getValue(k)})`);\n    },\n    isInBetween(a, b) {\n      return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n    },\n    current,\n    active() {\n      const bps = current();\n      return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n    }\n  });\n}\n\nfunction useBroadcastChannel(options) {\n  const {\n    name,\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n  const isClosed = ref(false);\n  const channel = ref();\n  const data = ref();\n  const error = shallowRef(null);\n  const post = (data2) => {\n    if (channel.value)\n      channel.value.postMessage(data2);\n  };\n  const close = () => {\n    if (channel.value)\n      channel.value.close();\n    isClosed.value = true;\n  };\n  if (isSupported.value) {\n    tryOnMounted(() => {\n      error.value = null;\n      channel.value = new BroadcastChannel(name);\n      channel.value.addEventListener(\"message\", (e) => {\n        data.value = e.data;\n      }, { passive: true });\n      channel.value.addEventListener(\"messageerror\", (e) => {\n        error.value = e;\n      }, { passive: true });\n      channel.value.addEventListener(\"close\", () => {\n        isClosed.value = true;\n      });\n    });\n  }\n  tryOnScopeDispose(() => {\n    close();\n  });\n  return {\n    isSupported,\n    channel,\n    data,\n    post,\n    close,\n    error,\n    isClosed\n  };\n}\n\nconst WRITABLE_PROPERTIES = [\n  \"hash\",\n  \"host\",\n  \"hostname\",\n  \"href\",\n  \"pathname\",\n  \"port\",\n  \"protocol\",\n  \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n  const { window = defaultWindow } = options;\n  const refs = Object.fromEntries(\n    WRITABLE_PROPERTIES.map((key) => [key, ref()])\n  );\n  for (const [key, ref2] of objectEntries(refs)) {\n    watch(ref2, (value) => {\n      if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n        return;\n      window.location[key] = value;\n    });\n  }\n  const buildState = (trigger) => {\n    var _a;\n    const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n    const { origin } = (window == null ? void 0 : window.location) || {};\n    for (const key of WRITABLE_PROPERTIES)\n      refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n    return reactive({\n      trigger,\n      state: state2,\n      length,\n      origin,\n      ...refs\n    });\n  };\n  const state = ref(buildState(\"load\"));\n  if (window) {\n    useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n    useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n  }\n  return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n  const cachedValue = ref(refValue.value);\n  watch(() => refValue.value, (value) => {\n    if (!comparator(value, cachedValue.value))\n      cachedValue.value = value;\n  }, watchOptions);\n  return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n  const {\n    controls = false,\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n  const permissionStatus = shallowRef();\n  const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n  const state = shallowRef();\n  const update = () => {\n    var _a, _b;\n    state.value = (_b = (_a = permissionStatus.value) == null ? void 0 : _a.state) != null ? _b : \"prompt\";\n  };\n  useEventListener(permissionStatus, \"change\", update);\n  const query = createSingletonPromise(async () => {\n    if (!isSupported.value)\n      return;\n    if (!permissionStatus.value) {\n      try {\n        permissionStatus.value = await navigator.permissions.query(desc);\n      } catch (e) {\n        permissionStatus.value = void 0;\n      } finally {\n        update();\n      }\n    }\n    if (controls)\n      return toRaw(permissionStatus.value);\n  });\n  query();\n  if (controls) {\n    return {\n      state,\n      isSupported,\n      query\n    };\n  } else {\n    return state;\n  }\n}\n\nfunction useClipboard(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    read = false,\n    source,\n    copiedDuring = 1500,\n    legacy = false\n  } = options;\n  const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n  const permissionRead = usePermission(\"clipboard-read\");\n  const permissionWrite = usePermission(\"clipboard-write\");\n  const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n  const text = ref(\"\");\n  const copied = ref(false);\n  const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n  function updateText() {\n    if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n      navigator.clipboard.readText().then((value) => {\n        text.value = value;\n      });\n    } else {\n      text.value = legacyRead();\n    }\n  }\n  if (isSupported.value && read)\n    useEventListener([\"copy\", \"cut\"], updateText);\n  async function copy(value = toValue(source)) {\n    if (isSupported.value && value != null) {\n      if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n        await navigator.clipboard.writeText(value);\n      else\n        legacyCopy(value);\n      text.value = value;\n      copied.value = true;\n      timeout.start();\n    }\n  }\n  function legacyCopy(value) {\n    const ta = document.createElement(\"textarea\");\n    ta.value = value != null ? value : \"\";\n    ta.style.position = \"absolute\";\n    ta.style.opacity = \"0\";\n    document.body.appendChild(ta);\n    ta.select();\n    document.execCommand(\"copy\");\n    ta.remove();\n  }\n  function legacyRead() {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n  }\n  function isAllowed(status) {\n    return status === \"granted\" || status === \"prompt\";\n  }\n  return {\n    isSupported,\n    text,\n    copied,\n    copy\n  };\n}\n\nfunction useClipboardItems(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    read = false,\n    source,\n    copiedDuring = 1500\n  } = options;\n  const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n  const content = ref([]);\n  const copied = ref(false);\n  const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n  function updateContent() {\n    if (isSupported.value) {\n      navigator.clipboard.read().then((items) => {\n        content.value = items;\n      });\n    }\n  }\n  if (isSupported.value && read)\n    useEventListener([\"copy\", \"cut\"], updateContent);\n  async function copy(value = toValue(source)) {\n    if (isSupported.value && value != null) {\n      await navigator.clipboard.write(value);\n      content.value = value;\n      copied.value = true;\n      timeout.start();\n    }\n  }\n  return {\n    isSupported,\n    content,\n    copied,\n    copy\n  };\n}\n\nfunction cloneFnJSON(source) {\n  return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n  const cloned = ref({});\n  const {\n    manual,\n    clone = cloneFnJSON,\n    // watch options\n    deep = true,\n    immediate = true\n  } = options;\n  function sync() {\n    cloned.value = clone(toValue(source));\n  }\n  if (!manual && (isRef(source) || typeof source === \"function\")) {\n    watch(source, sync, {\n      ...options,\n      deep,\n      immediate\n    });\n  } else {\n    sync();\n  }\n  return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n  if (!(globalKey in _global))\n    _global[globalKey] = _global[globalKey] || {};\n  return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n  return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n  handlers[key] = fn;\n}\n\nfunction usePreferredDark(options) {\n  return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction guessSerializerType(rawInit) {\n  return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n  boolean: {\n    read: (v) => v === \"true\",\n    write: (v) => String(v)\n  },\n  object: {\n    read: (v) => JSON.parse(v),\n    write: (v) => JSON.stringify(v)\n  },\n  number: {\n    read: (v) => Number.parseFloat(v),\n    write: (v) => String(v)\n  },\n  any: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  string: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  map: {\n    read: (v) => new Map(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v.entries()))\n  },\n  set: {\n    read: (v) => new Set(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v))\n  },\n  date: {\n    read: (v) => new Date(v),\n    write: (v) => v.toISOString()\n  }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    },\n    initOnMounted\n  } = options;\n  const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorage\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  if (!storage)\n    return data;\n  const rawInit = toValue(defaults);\n  const type = guessSerializerType(rawInit);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n    data,\n    () => write(data.value),\n    { flush, deep, eventFilter }\n  );\n  if (window && listenToStorageChanges) {\n    tryOnMounted(() => {\n      if (storage instanceof Storage)\n        useEventListener(window, \"storage\", update);\n      else\n        useEventListener(window, customStorageEventName, updateFromCustomEvent);\n      if (initOnMounted)\n        update();\n    });\n  }\n  if (!initOnMounted)\n    update();\n  function dispatchWriteEvent(oldValue, newValue) {\n    if (window) {\n      const payload = {\n        key,\n        oldValue,\n        newValue,\n        storageArea: storage\n      };\n      window.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, {\n        detail: payload\n      }));\n    }\n  }\n  function write(v) {\n    try {\n      const oldValue = storage.getItem(key);\n      if (v == null) {\n        dispatchWriteEvent(oldValue, null);\n        storage.removeItem(key);\n      } else {\n        const serialized = serializer.write(v);\n        if (oldValue !== serialized) {\n          storage.setItem(key, serialized);\n          dispatchWriteEvent(oldValue, serialized);\n        }\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  function read(event) {\n    const rawValue = event ? event.newValue : storage.getItem(key);\n    if (rawValue == null) {\n      if (writeDefaults && rawInit != null)\n        storage.setItem(key, serializer.write(rawInit));\n      return rawInit;\n    } else if (!event && mergeDefaults) {\n      const value = serializer.read(rawValue);\n      if (typeof mergeDefaults === \"function\")\n        return mergeDefaults(value, rawInit);\n      else if (type === \"object\" && !Array.isArray(value))\n        return { ...rawInit, ...value };\n      return value;\n    } else if (typeof rawValue !== \"string\") {\n      return rawValue;\n    } else {\n      return serializer.read(rawValue);\n    }\n  }\n  function update(event) {\n    if (event && event.storageArea !== storage)\n      return;\n    if (event && event.key == null) {\n      data.value = rawInit;\n      return;\n    }\n    if (event && event.key !== key)\n      return;\n    pauseWatch();\n    try {\n      if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n        data.value = read(event);\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (event)\n        nextTick(resumeWatch);\n      else\n        resumeWatch();\n    }\n  }\n  function updateFromCustomEvent(event) {\n    update(event.detail);\n  }\n  return data;\n}\n\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\nfunction useColorMode(options = {}) {\n  const {\n    selector = \"html\",\n    attribute = \"class\",\n    initialValue = \"auto\",\n    window = defaultWindow,\n    storage,\n    storageKey = \"vueuse-color-scheme\",\n    listenToStorageChanges = true,\n    storageRef,\n    emitAuto,\n    disableTransition = true\n  } = options;\n  const modes = {\n    auto: \"\",\n    light: \"light\",\n    dark: \"dark\",\n    ...options.modes || {}\n  };\n  const preferredDark = usePreferredDark({ window });\n  const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n  const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n  const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n  const updateHTMLAttrs = getSSRHandler(\n    \"updateHTMLAttrs\",\n    (selector2, attribute2, value) => {\n      const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n      if (!el)\n        return;\n      const classesToAdd = /* @__PURE__ */ new Set();\n      const classesToRemove = /* @__PURE__ */ new Set();\n      let attributeToChange = null;\n      if (attribute2 === \"class\") {\n        const current = value.split(/\\s/g);\n        Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n          if (current.includes(v))\n            classesToAdd.add(v);\n          else\n            classesToRemove.add(v);\n        });\n      } else {\n        attributeToChange = { key: attribute2, value };\n      }\n      if (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null)\n        return;\n      let style;\n      if (disableTransition) {\n        style = window.document.createElement(\"style\");\n        style.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n        window.document.head.appendChild(style);\n      }\n      for (const c of classesToAdd) {\n        el.classList.add(c);\n      }\n      for (const c of classesToRemove) {\n        el.classList.remove(c);\n      }\n      if (attributeToChange) {\n        el.setAttribute(attributeToChange.key, attributeToChange.value);\n      }\n      if (disableTransition) {\n        window.getComputedStyle(style).opacity;\n        document.head.removeChild(style);\n      }\n    }\n  );\n  function defaultOnChanged(mode) {\n    var _a;\n    updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n  }\n  function onChanged(mode) {\n    if (options.onChanged)\n      options.onChanged(mode, defaultOnChanged);\n    else\n      defaultOnChanged(mode);\n  }\n  watch(state, onChanged, { flush: \"post\", immediate: true });\n  tryOnMounted(() => onChanged(state.value));\n  const auto = computed({\n    get() {\n      return emitAuto ? store.value : state.value;\n    },\n    set(v) {\n      store.value = v;\n    }\n  });\n  try {\n    return Object.assign(auto, { store, system, state });\n  } catch (e) {\n    return auto;\n  }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n  const confirmHook = createEventHook();\n  const cancelHook = createEventHook();\n  const revealHook = createEventHook();\n  let _resolve = noop;\n  const reveal = (data) => {\n    revealHook.trigger(data);\n    revealed.value = true;\n    return new Promise((resolve) => {\n      _resolve = resolve;\n    });\n  };\n  const confirm = (data) => {\n    revealed.value = false;\n    confirmHook.trigger(data);\n    _resolve({ data, isCanceled: false });\n  };\n  const cancel = (data) => {\n    revealed.value = false;\n    cancelHook.trigger(data);\n    _resolve({ data, isCanceled: true });\n  };\n  return {\n    isRevealed: computed(() => revealed.value),\n    reveal,\n    confirm,\n    cancel,\n    onReveal: revealHook.on,\n    onConfirm: confirmHook.on,\n    onCancel: cancelHook.on\n  };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n  const { window = defaultWindow, initialValue, observe = false } = options;\n  const variable = ref(initialValue);\n  const elRef = computed(() => {\n    var _a;\n    return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n  });\n  function updateCssVar() {\n    var _a;\n    const key = toValue(prop);\n    const el = toValue(elRef);\n    if (el && window && key) {\n      const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n      variable.value = value || initialValue;\n    }\n  }\n  if (observe) {\n    useMutationObserver(elRef, updateCssVar, {\n      attributeFilter: [\"style\", \"class\"],\n      window\n    });\n  }\n  watch(\n    [elRef, () => toValue(prop)],\n    (_, old) => {\n      if (old[0] && old[1])\n        old[0].style.removeProperty(old[1]);\n      updateCssVar();\n    },\n    { immediate: true }\n  );\n  watch(\n    variable,\n    (val) => {\n      var _a;\n      const raw_prop = toValue(prop);\n      if (((_a = elRef.value) == null ? void 0 : _a.style) && raw_prop) {\n        if (val == null)\n          elRef.value.style.removeProperty(raw_prop);\n        else\n          elRef.value.style.setProperty(raw_prop, val);\n      }\n    }\n  );\n  return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n  const vm = getCurrentInstance();\n  const currentElement = computedWithControl(\n    () => null,\n    () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n  );\n  onUpdated(currentElement.trigger);\n  onMounted(currentElement.trigger);\n  return currentElement;\n}\n\nfunction useCycleList(list, options) {\n  const state = shallowRef(getInitialValue());\n  const listRef = toRef(list);\n  const index = computed({\n    get() {\n      var _a;\n      const targetList = listRef.value;\n      let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n      if (index2 < 0)\n        index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n      return index2;\n    },\n    set(v) {\n      set(v);\n    }\n  });\n  function set(i) {\n    const targetList = listRef.value;\n    const length = targetList.length;\n    const index2 = (i % length + length) % length;\n    const value = targetList[index2];\n    state.value = value;\n    return value;\n  }\n  function shift(delta = 1) {\n    return set(index.value + delta);\n  }\n  function next(n = 1) {\n    return shift(n);\n  }\n  function prev(n = 1) {\n    return shift(-n);\n  }\n  function getInitialValue() {\n    var _a, _b;\n    return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n  }\n  watch(listRef, () => set(index.value));\n  return {\n    state,\n    index,\n    next,\n    prev,\n    go: set\n  };\n}\n\nfunction useDark(options = {}) {\n  const {\n    valueDark = \"dark\",\n    valueLight = \"\",\n    window = defaultWindow\n  } = options;\n  const mode = useColorMode({\n    ...options,\n    onChanged: (mode2, defaultHandler) => {\n      var _a;\n      if (options.onChanged)\n        (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n      else\n        defaultHandler(mode2);\n    },\n    modes: {\n      dark: valueDark,\n      light: valueLight\n    }\n  });\n  const system = computed(() => {\n    if (mode.system) {\n      return mode.system.value;\n    } else {\n      const preferredDark = usePreferredDark({ window });\n      return preferredDark.value ? \"dark\" : \"light\";\n    }\n  });\n  const isDark = computed({\n    get() {\n      return mode.value === \"dark\";\n    },\n    set(v) {\n      const modeVal = v ? \"dark\" : \"light\";\n      if (system.value === modeVal)\n        mode.value = \"auto\";\n      else\n        mode.value = modeVal;\n    }\n  });\n  return isDark;\n}\n\nfunction fnBypass(v) {\n  return v;\n}\nfunction fnSetSource(source, value) {\n  return source.value = value;\n}\nfunction defaultDump(clone) {\n  return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n  return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n  const {\n    clone = false,\n    dump = defaultDump(clone),\n    parse = defaultParse(clone),\n    setSource = fnSetSource\n  } = options;\n  function _createHistoryRecord() {\n    return markRaw({\n      snapshot: dump(source.value),\n      timestamp: timestamp()\n    });\n  }\n  const last = ref(_createHistoryRecord());\n  const undoStack = ref([]);\n  const redoStack = ref([]);\n  const _setSource = (record) => {\n    setSource(source, parse(record.snapshot));\n    last.value = record;\n  };\n  const commit = () => {\n    undoStack.value.unshift(last.value);\n    last.value = _createHistoryRecord();\n    if (options.capacity && undoStack.value.length > options.capacity)\n      undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n    if (redoStack.value.length)\n      redoStack.value.splice(0, redoStack.value.length);\n  };\n  const clear = () => {\n    undoStack.value.splice(0, undoStack.value.length);\n    redoStack.value.splice(0, redoStack.value.length);\n  };\n  const undo = () => {\n    const state = undoStack.value.shift();\n    if (state) {\n      redoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const redo = () => {\n    const state = redoStack.value.shift();\n    if (state) {\n      undoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const reset = () => {\n    _setSource(last.value);\n  };\n  const history = computed(() => [last.value, ...undoStack.value]);\n  const canUndo = computed(() => undoStack.value.length > 0);\n  const canRedo = computed(() => redoStack.value.length > 0);\n  return {\n    source,\n    undoStack,\n    redoStack,\n    last,\n    history,\n    canUndo,\n    canRedo,\n    clear,\n    commit,\n    reset,\n    undo,\n    redo\n  };\n}\n\nfunction useRefHistory(source, options = {}) {\n  const {\n    deep = false,\n    flush = \"pre\",\n    eventFilter\n  } = options;\n  const {\n    eventFilter: composedFilter,\n    pause,\n    resume: resumeTracking,\n    isActive: isTracking\n  } = pausableFilter(eventFilter);\n  const {\n    ignoreUpdates,\n    ignorePrevAsyncUpdates,\n    stop\n  } = watchIgnorable(\n    source,\n    commit,\n    { deep, flush, eventFilter: composedFilter }\n  );\n  function setSource(source2, value) {\n    ignorePrevAsyncUpdates();\n    ignoreUpdates(() => {\n      source2.value = value;\n    });\n  }\n  const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n  const { clear, commit: manualCommit } = manualHistory;\n  function commit() {\n    ignorePrevAsyncUpdates();\n    manualCommit();\n  }\n  function resume(commitNow) {\n    resumeTracking();\n    if (commitNow)\n      commit();\n  }\n  function batch(fn) {\n    let canceled = false;\n    const cancel = () => canceled = true;\n    ignoreUpdates(() => {\n      fn(cancel);\n    });\n    if (!canceled)\n      commit();\n  }\n  function dispose() {\n    stop();\n    clear();\n  }\n  return {\n    ...manualHistory,\n    isTracking,\n    pause,\n    resume,\n    commit,\n    batch,\n    dispose\n  };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n  const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n  const history = useRefHistory(source, { ...options, eventFilter: filter });\n  return {\n    ...history\n  };\n}\n\nfunction useDeviceMotion(options = {}) {\n  const {\n    window = defaultWindow,\n    eventFilter = bypassFilter\n  } = options;\n  const acceleration = ref({ x: null, y: null, z: null });\n  const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n  const interval = ref(0);\n  const accelerationIncludingGravity = ref({\n    x: null,\n    y: null,\n    z: null\n  });\n  if (window) {\n    const onDeviceMotion = createFilterWrapper(\n      eventFilter,\n      (event) => {\n        acceleration.value = event.acceleration;\n        accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n        rotationRate.value = event.rotationRate;\n        interval.value = event.interval;\n      }\n    );\n    useEventListener(window, \"devicemotion\", onDeviceMotion);\n  }\n  return {\n    acceleration,\n    accelerationIncludingGravity,\n    rotationRate,\n    interval\n  };\n}\n\nfunction useDeviceOrientation(options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n  const isAbsolute = ref(false);\n  const alpha = ref(null);\n  const beta = ref(null);\n  const gamma = ref(null);\n  if (window && isSupported.value) {\n    useEventListener(window, \"deviceorientation\", (event) => {\n      isAbsolute.value = event.absolute;\n      alpha.value = event.alpha;\n      beta.value = event.beta;\n      gamma.value = event.gamma;\n    });\n  }\n  return {\n    isSupported,\n    isAbsolute,\n    alpha,\n    beta,\n    gamma\n  };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const pixelRatio = ref(1);\n  if (window) {\n    let observe2 = function() {\n      pixelRatio.value = window.devicePixelRatio;\n      cleanup2();\n      media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n      media.addEventListener(\"change\", observe2, { once: true });\n    }, cleanup2 = function() {\n      media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n    };\n    let media;\n    observe2();\n    tryOnScopeDispose(cleanup2);\n  }\n  return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    requestPermissions = false,\n    constraints = { audio: true, video: true },\n    onUpdated\n  } = options;\n  const devices = ref([]);\n  const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n  const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n  const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n  const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n  const permissionGranted = ref(false);\n  let stream;\n  async function update() {\n    if (!isSupported.value)\n      return;\n    devices.value = await navigator.mediaDevices.enumerateDevices();\n    onUpdated == null ? void 0 : onUpdated(devices.value);\n    if (stream) {\n      stream.getTracks().forEach((t) => t.stop());\n      stream = null;\n    }\n  }\n  async function ensurePermissions() {\n    if (!isSupported.value)\n      return false;\n    if (permissionGranted.value)\n      return true;\n    const { state, query } = usePermission(\"camera\", { controls: true });\n    await query();\n    if (state.value !== \"granted\") {\n      let granted = true;\n      try {\n        stream = await navigator.mediaDevices.getUserMedia(constraints);\n      } catch (e) {\n        stream = null;\n        granted = false;\n      }\n      update();\n      permissionGranted.value = granted;\n    } else {\n      permissionGranted.value = true;\n    }\n    return permissionGranted.value;\n  }\n  if (isSupported.value) {\n    if (requestPermissions)\n      ensurePermissions();\n    useEventListener(navigator.mediaDevices, \"devicechange\", update);\n    update();\n  }\n  return {\n    devices,\n    ensurePermissions,\n    permissionGranted,\n    videoInputs,\n    audioInputs,\n    audioOutputs,\n    isSupported\n  };\n}\n\nfunction useDisplayMedia(options = {}) {\n  var _a;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const video = options.video;\n  const audio = options.audio;\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n  });\n  const constraint = { audio, video };\n  const stream = shallowRef();\n  async function _start() {\n    var _a2;\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n    return stream.value;\n  }\n  async function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  watch(\n    enabled,\n    (v) => {\n      if (v)\n        _start();\n      else\n        _stop();\n    },\n    { immediate: true }\n  );\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    enabled\n  };\n}\n\nfunction useDocumentVisibility(options = {}) {\n  const { document = defaultDocument } = options;\n  if (!document)\n    return ref(\"visible\");\n  const visibility = ref(document.visibilityState);\n  useEventListener(document, \"visibilitychange\", () => {\n    visibility.value = document.visibilityState;\n  });\n  return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n  var _a, _b;\n  const {\n    pointerTypes,\n    preventDefault,\n    stopPropagation,\n    exact,\n    onMove,\n    onEnd,\n    onStart,\n    initialValue,\n    axis = \"both\",\n    draggingElement = defaultWindow,\n    containerElement,\n    handle: draggingHandle = target,\n    buttons = [0]\n  } = options;\n  const position = ref(\n    (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n  );\n  const pressedDelta = ref();\n  const filterEvent = (e) => {\n    if (pointerTypes)\n      return pointerTypes.includes(e.pointerType);\n    return true;\n  };\n  const handleEvent = (e) => {\n    if (toValue(preventDefault))\n      e.preventDefault();\n    if (toValue(stopPropagation))\n      e.stopPropagation();\n  };\n  const start = (e) => {\n    var _a2;\n    if (!toValue(buttons).includes(e.button))\n      return;\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (toValue(exact) && e.target !== toValue(target))\n      return;\n    const container = toValue(containerElement);\n    const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n    const targetRect = toValue(target).getBoundingClientRect();\n    const pos = {\n      x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n      y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n    };\n    if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n      return;\n    pressedDelta.value = pos;\n    handleEvent(e);\n  };\n  const move = (e) => {\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    const container = toValue(containerElement);\n    const targetRect = toValue(target).getBoundingClientRect();\n    let { x, y } = position.value;\n    if (axis === \"x\" || axis === \"both\") {\n      x = e.clientX - pressedDelta.value.x;\n      if (container)\n        x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n    }\n    if (axis === \"y\" || axis === \"both\") {\n      y = e.clientY - pressedDelta.value.y;\n      if (container)\n        y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n    }\n    position.value = {\n      x,\n      y\n    };\n    onMove == null ? void 0 : onMove(position.value, e);\n    handleEvent(e);\n  };\n  const end = (e) => {\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    pressedDelta.value = void 0;\n    onEnd == null ? void 0 : onEnd(position.value, e);\n    handleEvent(e);\n  };\n  if (isClient) {\n    const config = { capture: (_b = options.capture) != null ? _b : true };\n    useEventListener(draggingHandle, \"pointerdown\", start, config);\n    useEventListener(draggingElement, \"pointermove\", move, config);\n    useEventListener(draggingElement, \"pointerup\", end, config);\n  }\n  return {\n    ...toRefs(position),\n    position,\n    isDragging: computed(() => !!pressedDelta.value),\n    style: computed(\n      () => `left:${position.value.x}px;top:${position.value.y}px;`\n    )\n  };\n}\n\nfunction useDropZone(target, options = {}) {\n  var _a, _b;\n  const isOverDropZone = ref(false);\n  const files = shallowRef(null);\n  let counter = 0;\n  let isValid = true;\n  if (isClient) {\n    const _options = typeof options === \"function\" ? { onDrop: options } : options;\n    const multiple = (_a = _options.multiple) != null ? _a : true;\n    const preventDefaultForUnhandled = (_b = _options.preventDefaultForUnhandled) != null ? _b : false;\n    const getFiles = (event) => {\n      var _a2, _b2;\n      const list = Array.from((_b2 = (_a2 = event.dataTransfer) == null ? void 0 : _a2.files) != null ? _b2 : []);\n      return list.length === 0 ? null : multiple ? list : [list[0]];\n    };\n    const checkDataTypes = (types) => {\n      if (_options.dataTypes) {\n        const dataTypes = unref(_options.dataTypes);\n        return typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n      }\n      return true;\n    };\n    const checkValidity = (event) => {\n      var _a2, _b2;\n      const items = Array.from((_b2 = (_a2 = event.dataTransfer) == null ? void 0 : _a2.items) != null ? _b2 : []);\n      const types = items.map((item) => item.type);\n      const dataTypesValid = checkDataTypes(types);\n      const multipleFilesValid = multiple || items.length <= 1;\n      return dataTypesValid && multipleFilesValid;\n    };\n    const handleDragEvent = (event, eventType) => {\n      var _a2, _b2, _c, _d;\n      isValid = checkValidity(event);\n      if (!isValid) {\n        if (preventDefaultForUnhandled) {\n          event.preventDefault();\n        }\n        if (event.dataTransfer) {\n          event.dataTransfer.dropEffect = \"none\";\n        }\n        return;\n      }\n      event.preventDefault();\n      if (event.dataTransfer) {\n        event.dataTransfer.dropEffect = \"copy\";\n      }\n      const currentFiles = getFiles(event);\n      switch (eventType) {\n        case \"enter\":\n          counter += 1;\n          isOverDropZone.value = true;\n          (_a2 = _options.onEnter) == null ? void 0 : _a2.call(_options, null, event);\n          break;\n        case \"over\":\n          (_b2 = _options.onOver) == null ? void 0 : _b2.call(_options, null, event);\n          break;\n        case \"leave\":\n          counter -= 1;\n          if (counter === 0)\n            isOverDropZone.value = false;\n          (_c = _options.onLeave) == null ? void 0 : _c.call(_options, null, event);\n          break;\n        case \"drop\":\n          counter = 0;\n          isOverDropZone.value = false;\n          if (isValid) {\n            files.value = currentFiles;\n            (_d = _options.onDrop) == null ? void 0 : _d.call(_options, currentFiles, event);\n          }\n          break;\n      }\n    };\n    useEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n    useEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n    useEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n    useEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n  }\n  return {\n    files,\n    isOverDropZone\n  };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n  const { window = defaultWindow, ...observerOptions } = options;\n  let observer;\n  const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const targets = computed(() => {\n    const _targets = toValue(target);\n    return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n  });\n  const stopWatch = watch(\n    targets,\n    (els) => {\n      cleanup();\n      if (isSupported.value && window) {\n        observer = new ResizeObserver(callback);\n        for (const _el of els) {\n          if (_el)\n            observer.observe(_el, observerOptions);\n        }\n      }\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const stop = () => {\n    cleanup();\n    stopWatch();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop\n  };\n}\n\nfunction useElementBounding(target, options = {}) {\n  const {\n    reset = true,\n    windowResize = true,\n    windowScroll = true,\n    immediate = true,\n    updateTiming = \"sync\"\n  } = options;\n  const height = ref(0);\n  const bottom = ref(0);\n  const left = ref(0);\n  const right = ref(0);\n  const top = ref(0);\n  const width = ref(0);\n  const x = ref(0);\n  const y = ref(0);\n  function recalculate() {\n    const el = unrefElement(target);\n    if (!el) {\n      if (reset) {\n        height.value = 0;\n        bottom.value = 0;\n        left.value = 0;\n        right.value = 0;\n        top.value = 0;\n        width.value = 0;\n        x.value = 0;\n        y.value = 0;\n      }\n      return;\n    }\n    const rect = el.getBoundingClientRect();\n    height.value = rect.height;\n    bottom.value = rect.bottom;\n    left.value = rect.left;\n    right.value = rect.right;\n    top.value = rect.top;\n    width.value = rect.width;\n    x.value = rect.x;\n    y.value = rect.y;\n  }\n  function update() {\n    if (updateTiming === \"sync\")\n      recalculate();\n    else if (updateTiming === \"next-frame\")\n      requestAnimationFrame(() => recalculate());\n  }\n  useResizeObserver(target, update);\n  watch(() => unrefElement(target), (ele) => !ele && update());\n  useMutationObserver(target, update, {\n    attributeFilter: [\"style\", \"class\"]\n  });\n  if (windowScroll)\n    useEventListener(\"scroll\", update, { capture: true, passive: true });\n  if (windowResize)\n    useEventListener(\"resize\", update, { passive: true });\n  tryOnMounted(() => {\n    if (immediate)\n      update();\n  });\n  return {\n    height,\n    bottom,\n    left,\n    right,\n    top,\n    width,\n    x,\n    y,\n    update\n  };\n}\n\nfunction useElementByPoint(options) {\n  const {\n    x,\n    y,\n    document = defaultDocument,\n    multiple,\n    interval = \"requestAnimationFrame\",\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => {\n    if (toValue(multiple))\n      return document && \"elementsFromPoint\" in document;\n    return document && \"elementFromPoint\" in document;\n  });\n  const element = ref(null);\n  const cb = () => {\n    var _a, _b;\n    element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n  };\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n  return {\n    isSupported,\n    element,\n    ...controls\n  };\n}\n\nfunction useElementHover(el, options = {}) {\n  const {\n    delayEnter = 0,\n    delayLeave = 0,\n    window = defaultWindow\n  } = options;\n  const isHovered = ref(false);\n  let timer;\n  const toggle = (entering) => {\n    const delay = entering ? delayEnter : delayLeave;\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n    }\n    if (delay)\n      timer = setTimeout(() => isHovered.value = entering, delay);\n    else\n      isHovered.value = entering;\n  };\n  if (!window)\n    return isHovered;\n  useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n  useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n  return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n  const { window = defaultWindow, box = \"content-box\" } = options;\n  const isSVG = computed(() => {\n    var _a, _b;\n    return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n  });\n  const width = ref(initialSize.width);\n  const height = ref(initialSize.height);\n  const { stop: stop1 } = useResizeObserver(\n    target,\n    ([entry]) => {\n      const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n      if (window && isSVG.value) {\n        const $elem = unrefElement(target);\n        if ($elem) {\n          const rect = $elem.getBoundingClientRect();\n          width.value = rect.width;\n          height.value = rect.height;\n        }\n      } else {\n        if (boxSize) {\n          const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n          width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n          height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n        } else {\n          width.value = entry.contentRect.width;\n          height.value = entry.contentRect.height;\n        }\n      }\n    },\n    options\n  );\n  tryOnMounted(() => {\n    const ele = unrefElement(target);\n    if (ele) {\n      width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n      height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n    }\n  });\n  const stop2 = watch(\n    () => unrefElement(target),\n    (ele) => {\n      width.value = ele ? initialSize.width : 0;\n      height.value = ele ? initialSize.height : 0;\n    }\n  );\n  function stop() {\n    stop1();\n    stop2();\n  }\n  return {\n    width,\n    height,\n    stop\n  };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n  const {\n    root,\n    rootMargin = \"0px\",\n    threshold = 0,\n    window = defaultWindow,\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n  const targets = computed(() => {\n    const _target = toValue(target);\n    return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n  });\n  let cleanup = noop;\n  const isActive = ref(immediate);\n  const stopWatch = isSupported.value ? watch(\n    () => [targets.value, unrefElement(root), isActive.value],\n    ([targets2, root2]) => {\n      cleanup();\n      if (!isActive.value)\n        return;\n      if (!targets2.length)\n        return;\n      const observer = new IntersectionObserver(\n        callback,\n        {\n          root: unrefElement(root2),\n          rootMargin,\n          threshold\n        }\n      );\n      targets2.forEach((el) => el && observer.observe(el));\n      cleanup = () => {\n        observer.disconnect();\n        cleanup = noop;\n      };\n    },\n    { immediate, flush: \"post\" }\n  ) : noop;\n  const stop = () => {\n    cleanup();\n    stopWatch();\n    isActive.value = false;\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    isActive,\n    pause() {\n      cleanup();\n      isActive.value = false;\n    },\n    resume() {\n      isActive.value = true;\n    },\n    stop\n  };\n}\n\nfunction useElementVisibility(element, options = {}) {\n  const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n  const elementIsVisible = ref(false);\n  useIntersectionObserver(\n    element,\n    (intersectionObserverEntries) => {\n      let isIntersecting = elementIsVisible.value;\n      let latestTime = 0;\n      for (const entry of intersectionObserverEntries) {\n        if (entry.time >= latestTime) {\n          latestTime = entry.time;\n          isIntersecting = entry.isIntersecting;\n        }\n      }\n      elementIsVisible.value = isIntersecting;\n    },\n    {\n      root: scrollTarget,\n      window,\n      threshold\n    }\n  );\n  return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n  const scope = getCurrentScope();\n  function on(listener) {\n    var _a;\n    const listeners = events.get(key) || /* @__PURE__ */ new Set();\n    listeners.add(listener);\n    events.set(key, listeners);\n    const _off = () => off(listener);\n    (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n    return _off;\n  }\n  function once(listener) {\n    function _listener(...args) {\n      off(_listener);\n      listener(...args);\n    }\n    return on(_listener);\n  }\n  function off(listener) {\n    const listeners = events.get(key);\n    if (!listeners)\n      return;\n    listeners.delete(listener);\n    if (!listeners.size)\n      reset();\n  }\n  function reset() {\n    events.delete(key);\n  }\n  function emit(event, payload) {\n    var _a;\n    (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n  }\n  return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n  if (options === true)\n    return {};\n  return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n  const event = ref(null);\n  const data = ref(null);\n  const status = ref(\"CONNECTING\");\n  const eventSource = ref(null);\n  const error = shallowRef(null);\n  const urlRef = toRef(url);\n  const lastEventId = shallowRef(null);\n  let explicitlyClosed = false;\n  let retried = 0;\n  const {\n    withCredentials = false,\n    immediate = true\n  } = options;\n  const close = () => {\n    if (isClient && eventSource.value) {\n      eventSource.value.close();\n      eventSource.value = null;\n      status.value = \"CLOSED\";\n      explicitlyClosed = true;\n    }\n  };\n  const _init = () => {\n    if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n      return;\n    const es = new EventSource(urlRef.value, { withCredentials });\n    status.value = \"CONNECTING\";\n    eventSource.value = es;\n    es.onopen = () => {\n      status.value = \"OPEN\";\n      error.value = null;\n    };\n    es.onerror = (e) => {\n      status.value = \"CLOSED\";\n      error.value = e;\n      if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n        es.close();\n        const {\n          retries = -1,\n          delay = 1e3,\n          onFailed\n        } = resolveNestedOptions$1(options.autoReconnect);\n        retried += 1;\n        if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n          setTimeout(_init, delay);\n        else if (typeof retries === \"function\" && retries())\n          setTimeout(_init, delay);\n        else\n          onFailed == null ? void 0 : onFailed();\n      }\n    };\n    es.onmessage = (e) => {\n      event.value = null;\n      data.value = e.data;\n      lastEventId.value = e.lastEventId;\n    };\n    for (const event_name of events) {\n      useEventListener(es, event_name, (e) => {\n        event.value = event_name;\n        data.value = e.data || null;\n      });\n    }\n  };\n  const open = () => {\n    if (!isClient)\n      return;\n    close();\n    explicitlyClosed = false;\n    retried = 0;\n    _init();\n  };\n  if (immediate)\n    watch(urlRef, open, { immediate: true });\n  tryOnScopeDispose(close);\n  return {\n    eventSource,\n    event,\n    data,\n    status,\n    error,\n    open,\n    close,\n    lastEventId\n  };\n}\n\nfunction useEyeDropper(options = {}) {\n  const { initialValue = \"\" } = options;\n  const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n  const sRGBHex = ref(initialValue);\n  async function open(openOptions) {\n    if (!isSupported.value)\n      return;\n    const eyeDropper = new window.EyeDropper();\n    const result = await eyeDropper.open(openOptions);\n    sRGBHex.value = result.sRGBHex;\n    return result;\n  }\n  return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n  const {\n    baseUrl = \"\",\n    rel = \"icon\",\n    document = defaultDocument\n  } = options;\n  const favicon = toRef(newIcon);\n  const applyIcon = (icon) => {\n    const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n    if (!elements || elements.length === 0) {\n      const link = document == null ? void 0 : document.createElement(\"link\");\n      if (link) {\n        link.rel = rel;\n        link.href = `${baseUrl}${icon}`;\n        link.type = `image/${icon.split(\".\").pop()}`;\n        document == null ? void 0 : document.head.append(link);\n      }\n      return;\n    }\n    elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n  };\n  watch(\n    favicon,\n    (i, o) => {\n      if (typeof i === \"string\" && i !== o)\n        applyIcon(i);\n    },\n    { immediate: true }\n  );\n  return favicon;\n}\n\nconst payloadMapping = {\n  json: \"application/json\",\n  text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n  return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n  return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n  if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n    return Object.fromEntries(headers.entries());\n  return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n  if (combination === \"overwrite\") {\n    return async (ctx) => {\n      const callback = callbacks[callbacks.length - 1];\n      if (callback)\n        return { ...ctx, ...await callback(ctx) };\n      return ctx;\n    };\n  } else {\n    return async (ctx) => {\n      for (const callback of callbacks) {\n        if (callback)\n          ctx = { ...ctx, ...await callback(ctx) };\n      }\n      return ctx;\n    };\n  }\n}\nfunction createFetch(config = {}) {\n  const _combination = config.combination || \"chain\";\n  const _options = config.options || {};\n  const _fetchOptions = config.fetchOptions || {};\n  function useFactoryFetch(url, ...args) {\n    const computedUrl = computed(() => {\n      const baseUrl = toValue(config.baseUrl);\n      const targetUrl = toValue(url);\n      return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n    });\n    let options = _options;\n    let fetchOptions = _fetchOptions;\n    if (args.length > 0) {\n      if (isFetchOptions(args[0])) {\n        options = {\n          ...options,\n          ...args[0],\n          beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n          afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n          onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n        };\n      } else {\n        fetchOptions = {\n          ...fetchOptions,\n          ...args[0],\n          headers: {\n            ...headersToObject(fetchOptions.headers) || {},\n            ...headersToObject(args[0].headers) || {}\n          }\n        };\n      }\n    }\n    if (args.length > 1 && isFetchOptions(args[1])) {\n      options = {\n        ...options,\n        ...args[1],\n        beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n        afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n        onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n      };\n    }\n    return useFetch(computedUrl, fetchOptions, options);\n  }\n  return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n  var _a;\n  const supportsAbort = typeof AbortController === \"function\";\n  let fetchOptions = {};\n  let options = {\n    immediate: true,\n    refetch: false,\n    timeout: 0,\n    updateDataOnError: false\n  };\n  const config = {\n    method: \"GET\",\n    type: \"text\",\n    payload: void 0\n  };\n  if (args.length > 0) {\n    if (isFetchOptions(args[0]))\n      options = { ...options, ...args[0] };\n    else\n      fetchOptions = args[0];\n  }\n  if (args.length > 1) {\n    if (isFetchOptions(args[1]))\n      options = { ...options, ...args[1] };\n  }\n  const {\n    fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n    initialData,\n    timeout\n  } = options;\n  const responseEvent = createEventHook();\n  const errorEvent = createEventHook();\n  const finallyEvent = createEventHook();\n  const isFinished = ref(false);\n  const isFetching = ref(false);\n  const aborted = ref(false);\n  const statusCode = ref(null);\n  const response = shallowRef(null);\n  const error = shallowRef(null);\n  const data = shallowRef(initialData || null);\n  const canAbort = computed(() => supportsAbort && isFetching.value);\n  let controller;\n  let timer;\n  const abort = () => {\n    if (supportsAbort) {\n      controller == null ? void 0 : controller.abort();\n      controller = new AbortController();\n      controller.signal.onabort = () => aborted.value = true;\n      fetchOptions = {\n        ...fetchOptions,\n        signal: controller.signal\n      };\n    }\n  };\n  const loading = (isLoading) => {\n    isFetching.value = isLoading;\n    isFinished.value = !isLoading;\n  };\n  if (timeout)\n    timer = useTimeoutFn(abort, timeout, { immediate: false });\n  let executeCounter = 0;\n  const execute = async (throwOnFailed = false) => {\n    var _a2, _b;\n    abort();\n    loading(true);\n    error.value = null;\n    statusCode.value = null;\n    aborted.value = false;\n    executeCounter += 1;\n    const currentExecuteCounter = executeCounter;\n    const defaultFetchOptions = {\n      method: config.method,\n      headers: {}\n    };\n    if (config.payload) {\n      const headers = headersToObject(defaultFetchOptions.headers);\n      const payload = toValue(config.payload);\n      if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n        config.payloadType = \"json\";\n      if (config.payloadType)\n        headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n      defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n    }\n    let isCanceled = false;\n    const context = {\n      url: toValue(url),\n      options: {\n        ...defaultFetchOptions,\n        ...fetchOptions\n      },\n      cancel: () => {\n        isCanceled = true;\n      }\n    };\n    if (options.beforeFetch)\n      Object.assign(context, await options.beforeFetch(context));\n    if (isCanceled || !fetch) {\n      loading(false);\n      return Promise.resolve(null);\n    }\n    let responseData = null;\n    if (timer)\n      timer.start();\n    return fetch(\n      context.url,\n      {\n        ...defaultFetchOptions,\n        ...context.options,\n        headers: {\n          ...headersToObject(defaultFetchOptions.headers),\n          ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n        }\n      }\n    ).then(async (fetchResponse) => {\n      response.value = fetchResponse;\n      statusCode.value = fetchResponse.status;\n      responseData = await fetchResponse.clone()[config.type]();\n      if (!fetchResponse.ok) {\n        data.value = initialData || null;\n        throw new Error(fetchResponse.statusText);\n      }\n      if (options.afterFetch) {\n        ({ data: responseData } = await options.afterFetch({\n          data: responseData,\n          response: fetchResponse\n        }));\n      }\n      data.value = responseData;\n      responseEvent.trigger(fetchResponse);\n      return fetchResponse;\n    }).catch(async (fetchError) => {\n      let errorData = fetchError.message || fetchError.name;\n      if (options.onFetchError) {\n        ({ error: errorData, data: responseData } = await options.onFetchError({\n          data: responseData,\n          error: fetchError,\n          response: response.value\n        }));\n      }\n      error.value = errorData;\n      if (options.updateDataOnError)\n        data.value = responseData;\n      errorEvent.trigger(fetchError);\n      if (throwOnFailed)\n        throw fetchError;\n      return null;\n    }).finally(() => {\n      if (currentExecuteCounter === executeCounter)\n        loading(false);\n      if (timer)\n        timer.stop();\n      finallyEvent.trigger(null);\n    });\n  };\n  const refetch = toRef(options.refetch);\n  watch(\n    [\n      refetch,\n      toRef(url)\n    ],\n    ([refetch2]) => refetch2 && execute(),\n    { deep: true }\n  );\n  const shell = {\n    isFinished: readonly(isFinished),\n    isFetching: readonly(isFetching),\n    statusCode,\n    response,\n    error,\n    data,\n    canAbort,\n    aborted,\n    abort,\n    execute,\n    onFetchResponse: responseEvent.on,\n    onFetchError: errorEvent.on,\n    onFetchFinally: finallyEvent.on,\n    // method\n    get: setMethod(\"GET\"),\n    put: setMethod(\"PUT\"),\n    post: setMethod(\"POST\"),\n    delete: setMethod(\"DELETE\"),\n    patch: setMethod(\"PATCH\"),\n    head: setMethod(\"HEAD\"),\n    options: setMethod(\"OPTIONS\"),\n    // type\n    json: setType(\"json\"),\n    text: setType(\"text\"),\n    blob: setType(\"blob\"),\n    arrayBuffer: setType(\"arrayBuffer\"),\n    formData: setType(\"formData\")\n  };\n  function setMethod(method) {\n    return (payload, payloadType) => {\n      if (!isFetching.value) {\n        config.method = method;\n        config.payload = payload;\n        config.payloadType = payloadType;\n        if (isRef(config.payload)) {\n          watch(\n            [\n              refetch,\n              toRef(config.payload)\n            ],\n            ([refetch2]) => refetch2 && execute(),\n            { deep: true }\n          );\n        }\n        return {\n          ...shell,\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        };\n      }\n      return void 0;\n    };\n  }\n  function waitUntilFinished() {\n    return new Promise((resolve, reject) => {\n      until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n    });\n  }\n  function setType(type) {\n    return () => {\n      if (!isFetching.value) {\n        config.type = type;\n        return {\n          ...shell,\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        };\n      }\n      return void 0;\n    };\n  }\n  if (options.immediate)\n    Promise.resolve().then(() => execute());\n  return {\n    ...shell,\n    then(onFulfilled, onRejected) {\n      return waitUntilFinished().then(onFulfilled, onRejected);\n    }\n  };\n}\nfunction joinPaths(start, end) {\n  if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n    return `${start}/${end}`;\n  return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n  multiple: true,\n  accept: \"*\",\n  reset: false,\n  directory: false\n};\nfunction useFileDialog(options = {}) {\n  const {\n    document = defaultDocument\n  } = options;\n  const files = ref(null);\n  const { on: onChange, trigger: changeTrigger } = createEventHook();\n  const { on: onCancel, trigger: cancelTrigger } = createEventHook();\n  let input;\n  if (document) {\n    input = document.createElement(\"input\");\n    input.type = \"file\";\n    input.onchange = (event) => {\n      const result = event.target;\n      files.value = result.files;\n      changeTrigger(files.value);\n    };\n    input.oncancel = () => {\n      cancelTrigger();\n    };\n  }\n  const reset = () => {\n    files.value = null;\n    if (input && input.value) {\n      input.value = \"\";\n      changeTrigger(null);\n    }\n  };\n  const open = (localOptions) => {\n    if (!input)\n      return;\n    const _options = {\n      ...DEFAULT_OPTIONS,\n      ...options,\n      ...localOptions\n    };\n    input.multiple = _options.multiple;\n    input.accept = _options.accept;\n    input.webkitdirectory = _options.directory;\n    if (hasOwn(_options, \"capture\"))\n      input.capture = _options.capture;\n    if (_options.reset)\n      reset();\n    input.click();\n  };\n  return {\n    files: readonly(files),\n    open,\n    reset,\n    onCancel,\n    onChange\n  };\n}\n\nfunction useFileSystemAccess(options = {}) {\n  const {\n    window: _window = defaultWindow,\n    dataType = \"Text\"\n  } = options;\n  const window = _window;\n  const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n  const fileHandle = ref();\n  const data = ref();\n  const file = ref();\n  const fileName = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n  });\n  const fileMIME = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n  });\n  const fileSize = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n  });\n  const fileLastModified = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n  });\n  async function open(_options = {}) {\n    if (!isSupported.value)\n      return;\n    const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n    fileHandle.value = handle;\n    await updateData();\n  }\n  async function create(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n    data.value = void 0;\n    await updateData();\n  }\n  async function save(_options = {}) {\n    if (!isSupported.value)\n      return;\n    if (!fileHandle.value)\n      return saveAs(_options);\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function saveAs(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function updateFile() {\n    var _a;\n    file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n  }\n  async function updateData() {\n    var _a, _b;\n    await updateFile();\n    const type = toValue(dataType);\n    if (type === \"Text\")\n      data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n    else if (type === \"ArrayBuffer\")\n      data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n    else if (type === \"Blob\")\n      data.value = file.value;\n  }\n  watch(() => toValue(dataType), updateData);\n  return {\n    isSupported,\n    data,\n    file,\n    fileName,\n    fileMIME,\n    fileSize,\n    fileLastModified,\n    open,\n    create,\n    save,\n    saveAs,\n    updateData\n  };\n}\n\nfunction useFocus(target, options = {}) {\n  const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n  const innerFocused = ref(false);\n  const targetElement = computed(() => unrefElement(target));\n  useEventListener(targetElement, \"focus\", (event) => {\n    var _a, _b;\n    if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n      innerFocused.value = true;\n  });\n  useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n  const focused = computed({\n    get: () => innerFocused.value,\n    set(value) {\n      var _a, _b;\n      if (!value && innerFocused.value)\n        (_a = targetElement.value) == null ? void 0 : _a.blur();\n      else if (value && !innerFocused.value)\n        (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n    }\n  });\n  watch(\n    targetElement,\n    () => {\n      focused.value = initialValue;\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  return { focused };\n}\n\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nfunction useFocusWithin(target, options = {}) {\n  const { window = defaultWindow } = options;\n  const targetElement = computed(() => unrefElement(target));\n  const _focused = ref(false);\n  const focused = computed(() => _focused.value);\n  const activeElement = useActiveElement(options);\n  if (!window || !activeElement.value) {\n    return { focused };\n  }\n  useEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true);\n  useEventListener(targetElement, EVENT_FOCUS_OUT, () => _focused.value = false);\n  return { focused };\n}\n\nfunction useFps(options) {\n  var _a;\n  const fps = ref(0);\n  if (typeof performance === \"undefined\")\n    return fps;\n  const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n  let last = performance.now();\n  let ticks = 0;\n  useRafFn(() => {\n    ticks += 1;\n    if (ticks >= every) {\n      const now = performance.now();\n      const diff = now - last;\n      fps.value = Math.round(1e3 / (diff / ticks));\n      last = now;\n      ticks = 0;\n    }\n  });\n  return fps;\n}\n\nconst eventHandlers = [\n  \"fullscreenchange\",\n  \"webkitfullscreenchange\",\n  \"webkitendfullscreen\",\n  \"mozfullscreenchange\",\n  \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n  const {\n    document = defaultDocument,\n    autoExit = false\n  } = options;\n  const targetRef = computed(() => {\n    var _a;\n    return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n  });\n  const isFullscreen = ref(false);\n  const requestMethod = computed(() => {\n    return [\n      \"requestFullscreen\",\n      \"webkitRequestFullscreen\",\n      \"webkitEnterFullscreen\",\n      \"webkitEnterFullScreen\",\n      \"webkitRequestFullScreen\",\n      \"mozRequestFullScreen\",\n      \"msRequestFullscreen\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const exitMethod = computed(() => {\n    return [\n      \"exitFullscreen\",\n      \"webkitExitFullscreen\",\n      \"webkitExitFullScreen\",\n      \"webkitCancelFullScreen\",\n      \"mozCancelFullScreen\",\n      \"msExitFullscreen\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const fullscreenEnabled = computed(() => {\n    return [\n      \"fullScreen\",\n      \"webkitIsFullScreen\",\n      \"webkitDisplayingFullscreen\",\n      \"mozFullScreen\",\n      \"msFullscreenElement\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const fullscreenElementMethod = [\n    \"fullscreenElement\",\n    \"webkitFullscreenElement\",\n    \"mozFullScreenElement\",\n    \"msFullscreenElement\"\n  ].find((m) => document && m in document);\n  const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n  const isCurrentElementFullScreen = () => {\n    if (fullscreenElementMethod)\n      return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n    return false;\n  };\n  const isElementFullScreen = () => {\n    if (fullscreenEnabled.value) {\n      if (document && document[fullscreenEnabled.value] != null) {\n        return document[fullscreenEnabled.value];\n      } else {\n        const target2 = targetRef.value;\n        if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n          return Boolean(target2[fullscreenEnabled.value]);\n        }\n      }\n    }\n    return false;\n  };\n  async function exit() {\n    if (!isSupported.value || !isFullscreen.value)\n      return;\n    if (exitMethod.value) {\n      if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n        await document[exitMethod.value]();\n      } else {\n        const target2 = targetRef.value;\n        if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n          await target2[exitMethod.value]();\n      }\n    }\n    isFullscreen.value = false;\n  }\n  async function enter() {\n    if (!isSupported.value || isFullscreen.value)\n      return;\n    if (isElementFullScreen())\n      await exit();\n    const target2 = targetRef.value;\n    if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n      await target2[requestMethod.value]();\n      isFullscreen.value = true;\n    }\n  }\n  async function toggle() {\n    await (isFullscreen.value ? exit() : enter());\n  }\n  const handlerCallback = () => {\n    const isElementFullScreenValue = isElementFullScreen();\n    if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n      isFullscreen.value = isElementFullScreenValue;\n  };\n  useEventListener(document, eventHandlers, handlerCallback, false);\n  useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n  if (autoExit)\n    tryOnScopeDispose(exit);\n  return {\n    isSupported,\n    isFullscreen,\n    enter,\n    exit,\n    toggle\n  };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n  return computed(() => {\n    if (gamepad.value) {\n      return {\n        buttons: {\n          a: gamepad.value.buttons[0],\n          b: gamepad.value.buttons[1],\n          x: gamepad.value.buttons[2],\n          y: gamepad.value.buttons[3]\n        },\n        bumper: {\n          left: gamepad.value.buttons[4],\n          right: gamepad.value.buttons[5]\n        },\n        triggers: {\n          left: gamepad.value.buttons[6],\n          right: gamepad.value.buttons[7]\n        },\n        stick: {\n          left: {\n            horizontal: gamepad.value.axes[0],\n            vertical: gamepad.value.axes[1],\n            button: gamepad.value.buttons[10]\n          },\n          right: {\n            horizontal: gamepad.value.axes[2],\n            vertical: gamepad.value.axes[3],\n            button: gamepad.value.buttons[11]\n          }\n        },\n        dpad: {\n          up: gamepad.value.buttons[12],\n          down: gamepad.value.buttons[13],\n          left: gamepad.value.buttons[14],\n          right: gamepad.value.buttons[15]\n        },\n        back: gamepad.value.buttons[8],\n        start: gamepad.value.buttons[9]\n      };\n    }\n    return null;\n  });\n}\nfunction useGamepad(options = {}) {\n  const {\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n  const gamepads = ref([]);\n  const onConnectedHook = createEventHook();\n  const onDisconnectedHook = createEventHook();\n  const stateFromGamepad = (gamepad) => {\n    const hapticActuators = [];\n    const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n    if (vibrationActuator)\n      hapticActuators.push(vibrationActuator);\n    if (gamepad.hapticActuators)\n      hapticActuators.push(...gamepad.hapticActuators);\n    return {\n      id: gamepad.id,\n      index: gamepad.index,\n      connected: gamepad.connected,\n      mapping: gamepad.mapping,\n      timestamp: gamepad.timestamp,\n      vibrationActuator: gamepad.vibrationActuator,\n      hapticActuators,\n      axes: gamepad.axes.map((axes) => axes),\n      buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n    };\n  };\n  const updateGamepadState = () => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    for (const gamepad of _gamepads) {\n      if (gamepad && gamepads.value[gamepad.index])\n        gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n    }\n  };\n  const { isActive, pause, resume } = useRafFn(updateGamepadState);\n  const onGamepadConnected = (gamepad) => {\n    if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n      gamepads.value.push(stateFromGamepad(gamepad));\n      onConnectedHook.trigger(gamepad.index);\n    }\n    resume();\n  };\n  const onGamepadDisconnected = (gamepad) => {\n    gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n    onDisconnectedHook.trigger(gamepad.index);\n  };\n  useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n  useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n  tryOnMounted(() => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    for (const gamepad of _gamepads) {\n      if (gamepad && gamepads.value[gamepad.index])\n        onGamepadConnected(gamepad);\n    }\n  });\n  pause();\n  return {\n    isSupported,\n    onConnected: onConnectedHook.on,\n    onDisconnected: onDisconnectedHook.on,\n    gamepads,\n    pause,\n    resume,\n    isActive\n  };\n}\n\nfunction useGeolocation(options = {}) {\n  const {\n    enableHighAccuracy = true,\n    maximumAge = 3e4,\n    timeout = 27e3,\n    navigator = defaultNavigator,\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n  const locatedAt = ref(null);\n  const error = shallowRef(null);\n  const coords = ref({\n    accuracy: 0,\n    latitude: Number.POSITIVE_INFINITY,\n    longitude: Number.POSITIVE_INFINITY,\n    altitude: null,\n    altitudeAccuracy: null,\n    heading: null,\n    speed: null\n  });\n  function updatePosition(position) {\n    locatedAt.value = position.timestamp;\n    coords.value = position.coords;\n    error.value = null;\n  }\n  let watcher;\n  function resume() {\n    if (isSupported.value) {\n      watcher = navigator.geolocation.watchPosition(\n        updatePosition,\n        (err) => error.value = err,\n        {\n          enableHighAccuracy,\n          maximumAge,\n          timeout\n        }\n      );\n    }\n  }\n  if (immediate)\n    resume();\n  function pause() {\n    if (watcher && navigator)\n      navigator.geolocation.clearWatch(watcher);\n  }\n  tryOnScopeDispose(() => {\n    pause();\n  });\n  return {\n    isSupported,\n    coords,\n    locatedAt,\n    error,\n    resume,\n    pause\n  };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n  const {\n    initialState = false,\n    listenForVisibilityChange = true,\n    events = defaultEvents$1,\n    window = defaultWindow,\n    eventFilter = throttleFilter(50)\n  } = options;\n  const idle = ref(initialState);\n  const lastActive = ref(timestamp());\n  let timer;\n  const reset = () => {\n    idle.value = false;\n    clearTimeout(timer);\n    timer = setTimeout(() => idle.value = true, timeout);\n  };\n  const onEvent = createFilterWrapper(\n    eventFilter,\n    () => {\n      lastActive.value = timestamp();\n      reset();\n    }\n  );\n  if (window) {\n    const document = window.document;\n    for (const event of events)\n      useEventListener(window, event, onEvent, { passive: true });\n    if (listenForVisibilityChange) {\n      useEventListener(document, \"visibilitychange\", () => {\n        if (!document.hidden)\n          onEvent();\n      });\n    }\n    reset();\n  }\n  return {\n    idle,\n    lastActive,\n    reset\n  };\n}\n\nasync function loadImage(options) {\n  return new Promise((resolve, reject) => {\n    const img = new Image();\n    const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n    img.src = src;\n    if (srcset)\n      img.srcset = srcset;\n    if (sizes)\n      img.sizes = sizes;\n    if (clazz)\n      img.className = clazz;\n    if (loading)\n      img.loading = loading;\n    if (crossorigin)\n      img.crossOrigin = crossorigin;\n    if (referrerPolicy)\n      img.referrerPolicy = referrerPolicy;\n    img.onload = () => resolve(img);\n    img.onerror = reject;\n  });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n  const state = useAsyncState(\n    () => loadImage(toValue(options)),\n    void 0,\n    {\n      resetOnExecute: true,\n      ...asyncStateOptions\n    }\n  );\n  watch(\n    () => toValue(options),\n    () => state.execute(asyncStateOptions.delay),\n    { deep: true }\n  );\n  return state;\n}\n\nfunction resolveElement(el) {\n  if (typeof Window !== \"undefined\" && el instanceof Window)\n    return el.document.documentElement;\n  if (typeof Document !== \"undefined\" && el instanceof Document)\n    return el.documentElement;\n  return el;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n  const {\n    throttle = 0,\n    idle = 200,\n    onStop = noop,\n    onScroll = noop,\n    offset = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    },\n    eventListenerOptions = {\n      capture: false,\n      passive: true\n    },\n    behavior = \"auto\",\n    window = defaultWindow,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const internalX = ref(0);\n  const internalY = ref(0);\n  const x = computed({\n    get() {\n      return internalX.value;\n    },\n    set(x2) {\n      scrollTo(x2, void 0);\n    }\n  });\n  const y = computed({\n    get() {\n      return internalY.value;\n    },\n    set(y2) {\n      scrollTo(void 0, y2);\n    }\n  });\n  function scrollTo(_x, _y) {\n    var _a, _b, _c, _d;\n    if (!window)\n      return;\n    const _element = toValue(element);\n    if (!_element)\n      return;\n    (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n      top: (_a = toValue(_y)) != null ? _a : y.value,\n      left: (_b = toValue(_x)) != null ? _b : x.value,\n      behavior: toValue(behavior)\n    });\n    const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n    if (x != null)\n      internalX.value = scrollContainer.scrollLeft;\n    if (y != null)\n      internalY.value = scrollContainer.scrollTop;\n  }\n  const isScrolling = ref(false);\n  const arrivedState = reactive({\n    left: true,\n    right: false,\n    top: true,\n    bottom: false\n  });\n  const directions = reactive({\n    left: false,\n    right: false,\n    top: false,\n    bottom: false\n  });\n  const onScrollEnd = (e) => {\n    if (!isScrolling.value)\n      return;\n    isScrolling.value = false;\n    directions.left = false;\n    directions.right = false;\n    directions.top = false;\n    directions.bottom = false;\n    onStop(e);\n  };\n  const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n  const setArrivedState = (target) => {\n    var _a;\n    if (!window)\n      return;\n    const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n    const { display, flexDirection } = getComputedStyle(el);\n    const scrollLeft = el.scrollLeft;\n    directions.left = scrollLeft < internalX.value;\n    directions.right = scrollLeft > internalX.value;\n    const left = Math.abs(scrollLeft) <= (offset.left || 0);\n    const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    if (display === \"flex\" && flexDirection === \"row-reverse\") {\n      arrivedState.left = right;\n      arrivedState.right = left;\n    } else {\n      arrivedState.left = left;\n      arrivedState.right = right;\n    }\n    internalX.value = scrollLeft;\n    let scrollTop = el.scrollTop;\n    if (target === window.document && !scrollTop)\n      scrollTop = window.document.body.scrollTop;\n    directions.top = scrollTop < internalY.value;\n    directions.bottom = scrollTop > internalY.value;\n    const top = Math.abs(scrollTop) <= (offset.top || 0);\n    const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    if (display === \"flex\" && flexDirection === \"column-reverse\") {\n      arrivedState.top = bottom;\n      arrivedState.bottom = top;\n    } else {\n      arrivedState.top = top;\n      arrivedState.bottom = bottom;\n    }\n    internalY.value = scrollTop;\n  };\n  const onScrollHandler = (e) => {\n    var _a;\n    if (!window)\n      return;\n    const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n    setArrivedState(eventTarget);\n    isScrolling.value = true;\n    onScrollEndDebounced(e);\n    onScroll(e);\n  };\n  useEventListener(\n    element,\n    \"scroll\",\n    throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n    eventListenerOptions\n  );\n  tryOnMounted(() => {\n    try {\n      const _element = toValue(element);\n      if (!_element)\n        return;\n      setArrivedState(_element);\n    } catch (e) {\n      onError(e);\n    }\n  });\n  useEventListener(\n    element,\n    \"scrollend\",\n    onScrollEnd,\n    eventListenerOptions\n  );\n  return {\n    x,\n    y,\n    isScrolling,\n    arrivedState,\n    directions,\n    measure() {\n      const _element = toValue(element);\n      if (window && _element)\n        setArrivedState(_element);\n    }\n  };\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n  var _a;\n  const {\n    direction = \"bottom\",\n    interval = 100,\n    canLoadMore = () => true\n  } = options;\n  const state = reactive(useScroll(\n    element,\n    {\n      ...options,\n      offset: {\n        [direction]: (_a = options.distance) != null ? _a : 0,\n        ...options.offset\n      }\n    }\n  ));\n  const promise = ref();\n  const isLoading = computed(() => !!promise.value);\n  const observedElement = computed(() => {\n    return resolveElement(toValue(element));\n  });\n  const isElementVisible = useElementVisibility(observedElement);\n  function checkAndLoad() {\n    state.measure();\n    if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n      return;\n    const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n    const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n    if (state.arrivedState[direction] || isNarrower) {\n      if (!promise.value) {\n        promise.value = Promise.all([\n          onLoadMore(state),\n          new Promise((resolve) => setTimeout(resolve, interval))\n        ]).finally(() => {\n          promise.value = null;\n          nextTick(() => checkAndLoad());\n        });\n      }\n    }\n  }\n  const stop = watch(\n    () => [state.arrivedState[direction], isElementVisible.value],\n    checkAndLoad,\n    { immediate: true }\n  );\n  tryOnUnmounted(stop);\n  return {\n    isLoading,\n    reset() {\n      nextTick(() => checkAndLoad());\n    }\n  };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n  const {\n    events = defaultEvents,\n    document = defaultDocument,\n    initial = null\n  } = options;\n  const state = ref(initial);\n  if (document) {\n    events.forEach((listenerEvent) => {\n      useEventListener(document, listenerEvent, (evt) => {\n        if (typeof evt.getModifierState === \"function\")\n          state.value = evt.getModifierState(modifier);\n      });\n    });\n  }\n  return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n  ctrl: \"control\",\n  command: \"meta\",\n  cmd: \"meta\",\n  option: \"alt\",\n  up: \"arrowup\",\n  down: \"arrowdown\",\n  left: \"arrowleft\",\n  right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n  const {\n    reactive: useReactive = false,\n    target = defaultWindow,\n    aliasMap = DefaultMagicKeysAliasMap,\n    passive = true,\n    onEventFired = noop\n  } = options;\n  const current = reactive(/* @__PURE__ */ new Set());\n  const obj = {\n    toJSON() {\n      return {};\n    },\n    current\n  };\n  const refs = useReactive ? reactive(obj) : obj;\n  const metaDeps = /* @__PURE__ */ new Set();\n  const usedKeys = /* @__PURE__ */ new Set();\n  function setRefs(key, value) {\n    if (key in refs) {\n      if (useReactive)\n        refs[key] = value;\n      else\n        refs[key].value = value;\n    }\n  }\n  function reset() {\n    current.clear();\n    for (const key of usedKeys)\n      setRefs(key, false);\n  }\n  function updateRefs(e, value) {\n    var _a, _b;\n    const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n    const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n    const values = [code, key].filter(Boolean);\n    if (key) {\n      if (value)\n        current.add(key);\n      else\n        current.delete(key);\n    }\n    for (const key2 of values) {\n      usedKeys.add(key2);\n      setRefs(key2, value);\n    }\n    if (key === \"meta\" && !value) {\n      metaDeps.forEach((key2) => {\n        current.delete(key2);\n        setRefs(key2, false);\n      });\n      metaDeps.clear();\n    } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n      [...current, ...values].forEach((key2) => metaDeps.add(key2));\n    }\n  }\n  useEventListener(target, \"keydown\", (e) => {\n    updateRefs(e, true);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(target, \"keyup\", (e) => {\n    updateRefs(e, false);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(\"blur\", reset, { passive: true });\n  useEventListener(\"focus\", reset, { passive: true });\n  const proxy = new Proxy(\n    refs,\n    {\n      get(target2, prop, rec) {\n        if (typeof prop !== \"string\")\n          return Reflect.get(target2, prop, rec);\n        prop = prop.toLowerCase();\n        if (prop in aliasMap)\n          prop = aliasMap[prop];\n        if (!(prop in refs)) {\n          if (/[+_-]/.test(prop)) {\n            const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n            refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n          } else {\n            refs[prop] = ref(false);\n          }\n        }\n        const r = Reflect.get(target2, prop, rec);\n        return useReactive ? toValue(r) : r;\n      }\n    }\n  );\n  return proxy;\n}\n\nfunction usingElRef(source, cb) {\n  if (toValue(source))\n    cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n  let ranges = [];\n  for (let i = 0; i < timeRanges.length; ++i)\n    ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n  return ranges;\n}\nfunction tracksToArray(tracks) {\n  return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n  src: \"\",\n  tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n  target = toRef(target);\n  options = {\n    ...defaultOptions,\n    ...options\n  };\n  const {\n    document = defaultDocument\n  } = options;\n  const currentTime = ref(0);\n  const duration = ref(0);\n  const seeking = ref(false);\n  const volume = ref(1);\n  const waiting = ref(false);\n  const ended = ref(false);\n  const playing = ref(false);\n  const rate = ref(1);\n  const stalled = ref(false);\n  const buffered = ref([]);\n  const tracks = ref([]);\n  const selectedTrack = ref(-1);\n  const isPictureInPicture = ref(false);\n  const muted = ref(false);\n  const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n  const sourceErrorEvent = createEventHook();\n  const playbackErrorEvent = createEventHook();\n  const disableTrack = (track) => {\n    usingElRef(target, (el) => {\n      if (track) {\n        const id = typeof track === \"number\" ? track : track.id;\n        el.textTracks[id].mode = \"disabled\";\n      } else {\n        for (let i = 0; i < el.textTracks.length; ++i)\n          el.textTracks[i].mode = \"disabled\";\n      }\n      selectedTrack.value = -1;\n    });\n  };\n  const enableTrack = (track, disableTracks = true) => {\n    usingElRef(target, (el) => {\n      const id = typeof track === \"number\" ? track : track.id;\n      if (disableTracks)\n        disableTrack();\n      el.textTracks[id].mode = \"showing\";\n      selectedTrack.value = id;\n    });\n  };\n  const togglePictureInPicture = () => {\n    return new Promise((resolve, reject) => {\n      usingElRef(target, async (el) => {\n        if (supportsPictureInPicture) {\n          if (!isPictureInPicture.value) {\n            el.requestPictureInPicture().then(resolve).catch(reject);\n          } else {\n            document.exitPictureInPicture().then(resolve).catch(reject);\n          }\n        }\n      });\n    });\n  };\n  watchEffect(() => {\n    if (!document)\n      return;\n    const el = toValue(target);\n    if (!el)\n      return;\n    const src = toValue(options.src);\n    let sources = [];\n    if (!src)\n      return;\n    if (typeof src === \"string\")\n      sources = [{ src }];\n    else if (Array.isArray(src))\n      sources = src;\n    else if (isObject(src))\n      sources = [src];\n    el.querySelectorAll(\"source\").forEach((e) => {\n      e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n      e.remove();\n    });\n    sources.forEach(({ src: src2, type }) => {\n      const source = document.createElement(\"source\");\n      source.setAttribute(\"src\", src2);\n      source.setAttribute(\"type\", type || \"\");\n      source.addEventListener(\"error\", sourceErrorEvent.trigger);\n      el.appendChild(source);\n    });\n    el.load();\n  });\n  tryOnScopeDispose(() => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n  });\n  watch([target, volume], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.volume = volume.value;\n  });\n  watch([target, muted], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.muted = muted.value;\n  });\n  watch([target, rate], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.playbackRate = rate.value;\n  });\n  watchEffect(() => {\n    if (!document)\n      return;\n    const textTracks = toValue(options.tracks);\n    const el = toValue(target);\n    if (!textTracks || !textTracks.length || !el)\n      return;\n    el.querySelectorAll(\"track\").forEach((e) => e.remove());\n    textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n      const track = document.createElement(\"track\");\n      track.default = isDefault || false;\n      track.kind = kind;\n      track.label = label;\n      track.src = src;\n      track.srclang = srcLang;\n      if (track.default)\n        selectedTrack.value = i;\n      el.appendChild(track);\n    });\n  });\n  const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.currentTime = time;\n  });\n  const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    if (isPlaying) {\n      el.play().catch((e) => {\n        playbackErrorEvent.trigger(e);\n        throw e;\n      });\n    } else {\n      el.pause();\n    }\n  });\n  useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n  useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n  useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n  useEventListener(target, \"seeking\", () => seeking.value = true);\n  useEventListener(target, \"seeked\", () => seeking.value = false);\n  useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n    waiting.value = true;\n    ignorePlayingUpdates(() => playing.value = false);\n  });\n  useEventListener(target, \"loadeddata\", () => waiting.value = false);\n  useEventListener(target, \"playing\", () => {\n    waiting.value = false;\n    ended.value = false;\n    ignorePlayingUpdates(() => playing.value = true);\n  });\n  useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n  useEventListener(target, \"stalled\", () => stalled.value = true);\n  useEventListener(target, \"ended\", () => ended.value = true);\n  useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n  useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n  useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n  useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n  useEventListener(target, \"volumechange\", () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    volume.value = el.volume;\n    muted.value = el.muted;\n  });\n  const listeners = [];\n  const stop = watch([target], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    stop();\n    listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n  });\n  tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n  return {\n    currentTime,\n    duration,\n    waiting,\n    seeking,\n    ended,\n    stalled,\n    buffered,\n    playing,\n    rate,\n    // Volume\n    volume,\n    muted,\n    // Tracks\n    tracks,\n    selectedTrack,\n    enableTrack,\n    disableTrack,\n    // Picture in Picture\n    supportsPictureInPicture,\n    togglePictureInPicture,\n    isPictureInPicture,\n    // Events\n    onSourceError: sourceErrorEvent.on,\n    onPlaybackError: playbackErrorEvent.on\n  };\n}\n\nfunction getMapVue2Compat() {\n  const data = shallowReactive({});\n  return {\n    get: (key) => data[key],\n    set: (key, value) => set(data, key, value),\n    has: (key) => hasOwn(data, key),\n    delete: (key) => del(data, key),\n    clear: () => {\n      Object.keys(data).forEach((key) => {\n        del(data, key);\n      });\n    }\n  };\n}\nfunction useMemoize(resolver, options) {\n  const initCache = () => {\n    if (options == null ? void 0 : options.cache)\n      return shallowReactive(options.cache);\n    if (isVue2)\n      return getMapVue2Compat();\n    return shallowReactive(/* @__PURE__ */ new Map());\n  };\n  const cache = initCache();\n  const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n  const _loadData = (key, ...args) => {\n    cache.set(key, resolver(...args));\n    return cache.get(key);\n  };\n  const loadData = (...args) => _loadData(generateKey(...args), ...args);\n  const deleteData = (...args) => {\n    cache.delete(generateKey(...args));\n  };\n  const clearData = () => {\n    cache.clear();\n  };\n  const memoized = (...args) => {\n    const key = generateKey(...args);\n    if (cache.has(key))\n      return cache.get(key);\n    return _loadData(key, ...args);\n  };\n  memoized.load = loadData;\n  memoized.delete = deleteData;\n  memoized.clear = clearData;\n  memoized.generateKey = generateKey;\n  memoized.cache = cache;\n  return memoized;\n}\n\nfunction useMemory(options = {}) {\n  const memory = ref();\n  const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n  if (isSupported.value) {\n    const { interval = 1e3 } = options;\n    useIntervalFn(() => {\n      memory.value = performance.memory;\n    }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n  }\n  return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n  page: (event) => [event.pageX, event.pageY],\n  client: (event) => [event.clientX, event.clientY],\n  screen: (event) => [event.screenX, event.screenY],\n  movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n  const {\n    type = \"page\",\n    touch = true,\n    resetOnTouchEnds = false,\n    initialValue = { x: 0, y: 0 },\n    window = defaultWindow,\n    target = window,\n    scroll = true,\n    eventFilter\n  } = options;\n  let _prevMouseEvent = null;\n  const x = ref(initialValue.x);\n  const y = ref(initialValue.y);\n  const sourceType = ref(null);\n  const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n  const mouseHandler = (event) => {\n    const result = extractor(event);\n    _prevMouseEvent = event;\n    if (result) {\n      [x.value, y.value] = result;\n      sourceType.value = \"mouse\";\n    }\n  };\n  const touchHandler = (event) => {\n    if (event.touches.length > 0) {\n      const result = extractor(event.touches[0]);\n      if (result) {\n        [x.value, y.value] = result;\n        sourceType.value = \"touch\";\n      }\n    }\n  };\n  const scrollHandler = () => {\n    if (!_prevMouseEvent || !window)\n      return;\n    const pos = extractor(_prevMouseEvent);\n    if (_prevMouseEvent instanceof MouseEvent && pos) {\n      x.value = pos[0] + window.scrollX;\n      y.value = pos[1] + window.scrollY;\n    }\n  };\n  const reset = () => {\n    x.value = initialValue.x;\n    y.value = initialValue.y;\n  };\n  const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n  const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n  const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n  if (target) {\n    const listenerOptions = { passive: true };\n    useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n    if (touch && type !== \"movement\") {\n      useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n      if (resetOnTouchEnds)\n        useEventListener(target, \"touchend\", reset, listenerOptions);\n    }\n    if (scroll && type === \"page\")\n      useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n  }\n  return {\n    x,\n    y,\n    sourceType\n  };\n}\n\nfunction useMouseInElement(target, options = {}) {\n  const {\n    handleOutside = true,\n    window = defaultWindow\n  } = options;\n  const type = options.type || \"page\";\n  const { x, y, sourceType } = useMouse(options);\n  const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n  const elementX = ref(0);\n  const elementY = ref(0);\n  const elementPositionX = ref(0);\n  const elementPositionY = ref(0);\n  const elementHeight = ref(0);\n  const elementWidth = ref(0);\n  const isOutside = ref(true);\n  let stop = () => {\n  };\n  if (window) {\n    stop = watch(\n      [targetRef, x, y],\n      () => {\n        const el = unrefElement(targetRef);\n        if (!el || !(el instanceof Element))\n          return;\n        const {\n          left,\n          top,\n          width,\n          height\n        } = el.getBoundingClientRect();\n        elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n        elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n        elementHeight.value = height;\n        elementWidth.value = width;\n        const elX = x.value - elementPositionX.value;\n        const elY = y.value - elementPositionY.value;\n        isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n        if (handleOutside || !isOutside.value) {\n          elementX.value = elX;\n          elementY.value = elY;\n        }\n      },\n      { immediate: true }\n    );\n    useEventListener(document, \"mouseleave\", () => {\n      isOutside.value = true;\n    });\n  }\n  return {\n    x,\n    y,\n    sourceType,\n    elementX,\n    elementY,\n    elementPositionX,\n    elementPositionY,\n    elementHeight,\n    elementWidth,\n    isOutside,\n    stop\n  };\n}\n\nfunction useMousePressed(options = {}) {\n  const {\n    touch = true,\n    drag = true,\n    capture = false,\n    initialValue = false,\n    window = defaultWindow\n  } = options;\n  const pressed = ref(initialValue);\n  const sourceType = ref(null);\n  if (!window) {\n    return {\n      pressed,\n      sourceType\n    };\n  }\n  const onPressed = (srcType) => () => {\n    pressed.value = true;\n    sourceType.value = srcType;\n  };\n  const onReleased = () => {\n    pressed.value = false;\n    sourceType.value = null;\n  };\n  const target = computed(() => unrefElement(options.target) || window);\n  useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n  useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n  useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n  if (drag) {\n    useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n    useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n    useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n  }\n  if (touch) {\n    useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n    useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n    useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n  }\n  return {\n    pressed,\n    sourceType\n  };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"language\" in navigator);\n  const language = ref(navigator == null ? void 0 : navigator.language);\n  useEventListener(window, \"languagechange\", () => {\n    if (navigator)\n      language.value = navigator.language;\n  });\n  return {\n    isSupported,\n    language\n  };\n}\n\nfunction useNetwork(options = {}) {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n  const isOnline = ref(true);\n  const saveData = ref(false);\n  const offlineAt = ref(void 0);\n  const onlineAt = ref(void 0);\n  const downlink = ref(void 0);\n  const downlinkMax = ref(void 0);\n  const rtt = ref(void 0);\n  const effectiveType = ref(void 0);\n  const type = ref(\"unknown\");\n  const connection = isSupported.value && navigator.connection;\n  function updateNetworkInformation() {\n    if (!navigator)\n      return;\n    isOnline.value = navigator.onLine;\n    offlineAt.value = isOnline.value ? void 0 : Date.now();\n    onlineAt.value = isOnline.value ? Date.now() : void 0;\n    if (connection) {\n      downlink.value = connection.downlink;\n      downlinkMax.value = connection.downlinkMax;\n      effectiveType.value = connection.effectiveType;\n      rtt.value = connection.rtt;\n      saveData.value = connection.saveData;\n      type.value = connection.type;\n    }\n  }\n  if (window) {\n    useEventListener(window, \"offline\", () => {\n      isOnline.value = false;\n      offlineAt.value = Date.now();\n    });\n    useEventListener(window, \"online\", () => {\n      isOnline.value = true;\n      onlineAt.value = Date.now();\n    });\n  }\n  if (connection)\n    useEventListener(connection, \"change\", updateNetworkInformation, false);\n  updateNetworkInformation();\n  return {\n    isSupported: readonly(isSupported),\n    isOnline: readonly(isOnline),\n    saveData: readonly(saveData),\n    offlineAt: readonly(offlineAt),\n    onlineAt: readonly(onlineAt),\n    downlink: readonly(downlink),\n    downlinkMax: readonly(downlinkMax),\n    effectiveType: readonly(effectiveType),\n    rtt: readonly(rtt),\n    type: readonly(type)\n  };\n}\n\nfunction useNow(options = {}) {\n  const {\n    controls: exposeControls = false,\n    interval = \"requestAnimationFrame\"\n  } = options;\n  const now = ref(/* @__PURE__ */ new Date());\n  const update = () => now.value = /* @__PURE__ */ new Date();\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n  if (exposeControls) {\n    return {\n      now,\n      ...controls\n    };\n  } else {\n    return now;\n  }\n}\n\nfunction useObjectUrl(object) {\n  const url = ref();\n  const release = () => {\n    if (url.value)\n      URL.revokeObjectURL(url.value);\n    url.value = void 0;\n  };\n  watch(\n    () => toValue(object),\n    (newObject) => {\n      release();\n      if (newObject)\n        url.value = URL.createObjectURL(newObject);\n    },\n    { immediate: true }\n  );\n  tryOnScopeDispose(release);\n  return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n  if (typeof value === \"function\" || isReadonly(value))\n    return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n  const _value = ref(value);\n  return computed({\n    get() {\n      return _value.value = clamp(_value.value, toValue(min), toValue(max));\n    },\n    set(value2) {\n      _value.value = clamp(value2, toValue(min), toValue(max));\n    }\n  });\n}\n\nfunction useOffsetPagination(options) {\n  const {\n    total = Number.POSITIVE_INFINITY,\n    pageSize = 10,\n    page = 1,\n    onPageChange = noop,\n    onPageSizeChange = noop,\n    onPageCountChange = noop\n  } = options;\n  const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n  const pageCount = computed(() => Math.max(\n    1,\n    Math.ceil(toValue(total) / toValue(currentPageSize))\n  ));\n  const currentPage = useClamp(page, 1, pageCount);\n  const isFirstPage = computed(() => currentPage.value === 1);\n  const isLastPage = computed(() => currentPage.value === pageCount.value);\n  if (isRef(page)) {\n    syncRef(page, currentPage, {\n      direction: isReadonly(page) ? \"ltr\" : \"both\"\n    });\n  }\n  if (isRef(pageSize)) {\n    syncRef(pageSize, currentPageSize, {\n      direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n    });\n  }\n  function prev() {\n    currentPage.value--;\n  }\n  function next() {\n    currentPage.value++;\n  }\n  const returnValue = {\n    currentPage,\n    currentPageSize,\n    pageCount,\n    isFirstPage,\n    isLastPage,\n    prev,\n    next\n  };\n  watch(currentPage, () => {\n    onPageChange(reactive(returnValue));\n  });\n  watch(currentPageSize, () => {\n    onPageSizeChange(reactive(returnValue));\n  });\n  watch(pageCount, () => {\n    onPageCountChange(reactive(returnValue));\n  });\n  return returnValue;\n}\n\nfunction useOnline(options = {}) {\n  const { isOnline } = useNetwork(options);\n  return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n  const { window = defaultWindow } = options;\n  const isLeft = ref(false);\n  const handler = (event) => {\n    if (!window)\n      return;\n    event = event || window.event;\n    const from = event.relatedTarget || event.toElement;\n    isLeft.value = !from;\n  };\n  if (window) {\n    useEventListener(window, \"mouseout\", handler, { passive: true });\n    useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n    useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n  }\n  return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n  const screenOrientation = isSupported.value ? window.screen.orientation : {};\n  const orientation = ref(screenOrientation.type);\n  const angle = ref(screenOrientation.angle || 0);\n  if (isSupported.value) {\n    useEventListener(window, \"orientationchange\", () => {\n      orientation.value = screenOrientation.type;\n      angle.value = screenOrientation.angle;\n    });\n  }\n  const lockOrientation = (type) => {\n    if (isSupported.value && typeof screenOrientation.lock === \"function\")\n      return screenOrientation.lock(type);\n    return Promise.reject(new Error(\"Not supported\"));\n  };\n  const unlockOrientation = () => {\n    if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n      screenOrientation.unlock();\n  };\n  return {\n    isSupported,\n    orientation,\n    angle,\n    lockOrientation,\n    unlockOrientation\n  };\n}\n\nfunction useParallax(target, options = {}) {\n  const {\n    deviceOrientationTiltAdjust = (i) => i,\n    deviceOrientationRollAdjust = (i) => i,\n    mouseTiltAdjust = (i) => i,\n    mouseRollAdjust = (i) => i,\n    window = defaultWindow\n  } = options;\n  const orientation = reactive(useDeviceOrientation({ window }));\n  const screenOrientation = reactive(useScreenOrientation({ window }));\n  const {\n    elementX: x,\n    elementY: y,\n    elementWidth: width,\n    elementHeight: height\n  } = useMouseInElement(target, { handleOutside: false, window });\n  const source = computed(() => {\n    if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n      return \"deviceOrientation\";\n    }\n    return \"mouse\";\n  });\n  const roll = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      let value;\n      switch (screenOrientation.orientation) {\n        case \"landscape-primary\":\n          value = orientation.gamma / 90;\n          break;\n        case \"landscape-secondary\":\n          value = -orientation.gamma / 90;\n          break;\n        case \"portrait-primary\":\n          value = -orientation.beta / 90;\n          break;\n        case \"portrait-secondary\":\n          value = orientation.beta / 90;\n          break;\n        default:\n          value = -orientation.beta / 90;\n      }\n      return deviceOrientationRollAdjust(value);\n    } else {\n      const value = -(y.value - height.value / 2) / height.value;\n      return mouseRollAdjust(value);\n    }\n  });\n  const tilt = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      let value;\n      switch (screenOrientation.orientation) {\n        case \"landscape-primary\":\n          value = orientation.beta / 90;\n          break;\n        case \"landscape-secondary\":\n          value = -orientation.beta / 90;\n          break;\n        case \"portrait-primary\":\n          value = orientation.gamma / 90;\n          break;\n        case \"portrait-secondary\":\n          value = -orientation.gamma / 90;\n          break;\n        default:\n          value = orientation.gamma / 90;\n      }\n      return deviceOrientationTiltAdjust(value);\n    } else {\n      const value = (x.value - width.value / 2) / width.value;\n      return mouseTiltAdjust(value);\n    }\n  });\n  return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n  const parentElement = shallowRef();\n  const update = () => {\n    const el = unrefElement(element);\n    if (el)\n      parentElement.value = el.parentElement;\n  };\n  tryOnMounted(update);\n  watch(() => toValue(element), update);\n  return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n  const {\n    window = defaultWindow,\n    immediate = true,\n    ...performanceOptions\n  } = options;\n  const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n  let observer;\n  const stop = () => {\n    observer == null ? void 0 : observer.disconnect();\n  };\n  const start = () => {\n    if (isSupported.value) {\n      stop();\n      observer = new PerformanceObserver(callback);\n      observer.observe(performanceOptions);\n    }\n  };\n  tryOnScopeDispose(stop);\n  if (immediate)\n    start();\n  return {\n    isSupported,\n    start,\n    stop\n  };\n}\n\nconst defaultState = {\n  x: 0,\n  y: 0,\n  pointerId: 0,\n  pressure: 0,\n  tiltX: 0,\n  tiltY: 0,\n  width: 0,\n  height: 0,\n  twist: 0,\n  pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n  const {\n    target = defaultWindow\n  } = options;\n  const isInside = ref(false);\n  const state = ref(options.initialValue || {});\n  Object.assign(state.value, defaultState, state.value);\n  const handler = (event) => {\n    isInside.value = true;\n    if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n      return;\n    state.value = objectPick(event, keys, false);\n  };\n  if (target) {\n    const listenerOptions = { passive: true };\n    useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n    useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n  }\n  return {\n    ...toRefs(state),\n    isInside\n  };\n}\n\nfunction usePointerLock(target, options = {}) {\n  const { document = defaultDocument } = options;\n  const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n  const element = ref();\n  const triggerElement = ref();\n  let targetElement;\n  if (isSupported.value) {\n    useEventListener(document, \"pointerlockchange\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        element.value = document.pointerLockElement;\n        if (!element.value)\n          targetElement = triggerElement.value = null;\n      }\n    });\n    useEventListener(document, \"pointerlockerror\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        const action = document.pointerLockElement ? \"release\" : \"acquire\";\n        throw new Error(`Failed to ${action} pointer lock.`);\n      }\n    });\n  }\n  async function lock(e) {\n    var _a;\n    if (!isSupported.value)\n      throw new Error(\"Pointer Lock API is not supported by your browser.\");\n    triggerElement.value = e instanceof Event ? e.currentTarget : null;\n    targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n    if (!targetElement)\n      throw new Error(\"Target element undefined.\");\n    targetElement.requestPointerLock();\n    return await until(element).toBe(targetElement);\n  }\n  async function unlock() {\n    if (!element.value)\n      return false;\n    document.exitPointerLock();\n    await until(element).toBeNull();\n    return true;\n  }\n  return {\n    isSupported,\n    element,\n    triggerElement,\n    lock,\n    unlock\n  };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n  const targetRef = toRef(target);\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart,\n    disableTextSelect = false\n  } = options;\n  const posStart = reactive({ x: 0, y: 0 });\n  const updatePosStart = (x, y) => {\n    posStart.x = x;\n    posStart.y = y;\n  };\n  const posEnd = reactive({ x: 0, y: 0 });\n  const updatePosEnd = (x, y) => {\n    posEnd.x = x;\n    posEnd.y = y;\n  };\n  const distanceX = computed(() => posStart.x - posEnd.x);\n  const distanceY = computed(() => posStart.y - posEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const isPointerDown = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return \"none\";\n    if (abs(distanceX.value) > abs(distanceY.value)) {\n      return distanceX.value > 0 ? \"left\" : \"right\";\n    } else {\n      return distanceY.value > 0 ? \"up\" : \"down\";\n    }\n  });\n  const eventIsAllowed = (e) => {\n    var _a, _b, _c;\n    const isReleasingButton = e.buttons === 0;\n    const isPrimaryButton = e.buttons === 1;\n    return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n  };\n  const stops = [\n    useEventListener(target, \"pointerdown\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      isPointerDown.value = true;\n      const eventTarget = e.target;\n      eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n      const { clientX: x, clientY: y } = e;\n      updatePosStart(x, y);\n      updatePosEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }),\n    useEventListener(target, \"pointermove\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      if (!isPointerDown.value)\n        return;\n      const { clientX: x, clientY: y } = e;\n      updatePosEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }),\n    useEventListener(target, \"pointerup\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      if (isSwiping.value)\n        onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n      isPointerDown.value = false;\n      isSwiping.value = false;\n    })\n  ];\n  tryOnMounted(() => {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n    if (disableTextSelect) {\n      (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n      (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n      (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n    }\n  });\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isSwiping: readonly(isSwiping),\n    direction: readonly(direction),\n    posStart: readonly(posStart),\n    posEnd: readonly(posEnd),\n    distanceX,\n    distanceY,\n    stop\n  };\n}\n\nfunction usePreferredColorScheme(options) {\n  const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n  const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n  return computed(() => {\n    if (isDark.value)\n      return \"dark\";\n    if (isLight.value)\n      return \"light\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredContrast(options) {\n  const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n  const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n  const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n  return computed(() => {\n    if (isMore.value)\n      return \"more\";\n    if (isLess.value)\n      return \"less\";\n    if (isCustom.value)\n      return \"custom\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredLanguages(options = {}) {\n  const { window = defaultWindow } = options;\n  if (!window)\n    return ref([\"en\"]);\n  const navigator = window.navigator;\n  const value = ref(navigator.languages);\n  useEventListener(window, \"languagechange\", () => {\n    value.value = navigator.languages;\n  });\n  return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n  const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n  return computed(() => {\n    if (isReduced.value)\n      return \"reduce\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePrevious(value, initialValue) {\n  const previous = shallowRef(initialValue);\n  watch(\n    toRef(value),\n    (_, oldValue) => {\n      previous.value = oldValue;\n    },\n    { flush: \"sync\" }\n  );\n  return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n  const top = ref(\"\");\n  const right = ref(\"\");\n  const bottom = ref(\"\");\n  const left = ref(\"\");\n  if (isClient) {\n    const topCssVar = useCssVar(topVarName);\n    const rightCssVar = useCssVar(rightVarName);\n    const bottomCssVar = useCssVar(bottomVarName);\n    const leftCssVar = useCssVar(leftVarName);\n    topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n    rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n    bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n    leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n    update();\n    useEventListener(\"resize\", useDebounceFn(update));\n  }\n  function update() {\n    top.value = getValue(topVarName);\n    right.value = getValue(rightVarName);\n    bottom.value = getValue(bottomVarName);\n    left.value = getValue(leftVarName);\n  }\n  return {\n    top,\n    right,\n    bottom,\n    left,\n    update\n  };\n}\nfunction getValue(position) {\n  return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n  const {\n    immediate = true,\n    manual = false,\n    type = \"text/javascript\",\n    async = true,\n    crossOrigin,\n    referrerPolicy,\n    noModule,\n    defer,\n    document = defaultDocument,\n    attrs = {}\n  } = options;\n  const scriptTag = ref(null);\n  let _promise = null;\n  const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n    const resolveWithElement = (el2) => {\n      scriptTag.value = el2;\n      resolve(el2);\n      return el2;\n    };\n    if (!document) {\n      resolve(false);\n      return;\n    }\n    let shouldAppend = false;\n    let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n    if (!el) {\n      el = document.createElement(\"script\");\n      el.type = type;\n      el.async = async;\n      el.src = toValue(src);\n      if (defer)\n        el.defer = defer;\n      if (crossOrigin)\n        el.crossOrigin = crossOrigin;\n      if (noModule)\n        el.noModule = noModule;\n      if (referrerPolicy)\n        el.referrerPolicy = referrerPolicy;\n      Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n      shouldAppend = true;\n    } else if (el.hasAttribute(\"data-loaded\")) {\n      resolveWithElement(el);\n    }\n    el.addEventListener(\"error\", (event) => reject(event));\n    el.addEventListener(\"abort\", (event) => reject(event));\n    el.addEventListener(\"load\", () => {\n      el.setAttribute(\"data-loaded\", \"true\");\n      onLoaded(el);\n      resolveWithElement(el);\n    });\n    if (shouldAppend)\n      el = document.head.appendChild(el);\n    if (!waitForScriptLoad)\n      resolveWithElement(el);\n  });\n  const load = (waitForScriptLoad = true) => {\n    if (!_promise)\n      _promise = loadScript(waitForScriptLoad);\n    return _promise;\n  };\n  const unload = () => {\n    if (!document)\n      return;\n    _promise = null;\n    if (scriptTag.value)\n      scriptTag.value = null;\n    const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n    if (el)\n      document.head.removeChild(el);\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnUnmounted(unload);\n  return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n  const style = window.getComputedStyle(ele);\n  if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n    return true;\n  } else {\n    const parent = ele.parentNode;\n    if (!parent || parent.tagName === \"BODY\")\n      return false;\n    return checkOverflowScroll(parent);\n  }\n}\nfunction preventDefault(rawEvent) {\n  const e = rawEvent || window.event;\n  const _target = e.target;\n  if (checkOverflowScroll(_target))\n    return false;\n  if (e.touches.length > 1)\n    return true;\n  if (e.preventDefault)\n    e.preventDefault();\n  return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n  const isLocked = ref(initialState);\n  let stopTouchMoveListener = null;\n  let initialOverflow = \"\";\n  watch(toRef(element), (el) => {\n    const target = resolveElement(toValue(el));\n    if (target) {\n      const ele = target;\n      if (!elInitialOverflow.get(ele))\n        elInitialOverflow.set(ele, ele.style.overflow);\n      if (ele.style.overflow !== \"hidden\")\n        initialOverflow = ele.style.overflow;\n      if (ele.style.overflow === \"hidden\")\n        return isLocked.value = true;\n      if (isLocked.value)\n        return ele.style.overflow = \"hidden\";\n    }\n  }, {\n    immediate: true\n  });\n  const lock = () => {\n    const el = resolveElement(toValue(element));\n    if (!el || isLocked.value)\n      return;\n    if (isIOS) {\n      stopTouchMoveListener = useEventListener(\n        el,\n        \"touchmove\",\n        (e) => {\n          preventDefault(e);\n        },\n        { passive: false }\n      );\n    }\n    el.style.overflow = \"hidden\";\n    isLocked.value = true;\n  };\n  const unlock = () => {\n    const el = resolveElement(toValue(element));\n    if (!el || !isLocked.value)\n      return;\n    if (isIOS)\n      stopTouchMoveListener == null ? void 0 : stopTouchMoveListener();\n    el.style.overflow = initialOverflow;\n    elInitialOverflow.delete(el);\n    isLocked.value = false;\n  };\n  tryOnScopeDispose(unlock);\n  return computed({\n    get() {\n      return isLocked.value;\n    },\n    set(v) {\n      if (v)\n        lock();\n      else unlock();\n    }\n  });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n  const { navigator = defaultNavigator } = options;\n  const _navigator = navigator;\n  const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n  const share = async (overrideOptions = {}) => {\n    if (isSupported.value) {\n      const data = {\n        ...toValue(shareOptions),\n        ...toValue(overrideOptions)\n      };\n      let granted = true;\n      if (data.files && _navigator.canShare)\n        granted = _navigator.canShare({ files: data.files });\n      if (granted)\n        return _navigator.share(data);\n    }\n  };\n  return {\n    isSupported,\n    share\n  };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n  var _a, _b, _c, _d;\n  const [source] = args;\n  let compareFn = defaultCompare;\n  let options = {};\n  if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      options = args[1];\n      compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n    } else {\n      compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n    }\n  } else if (args.length > 2) {\n    compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n    options = (_d = args[2]) != null ? _d : {};\n  }\n  const {\n    dirty = false,\n    sortFn = defaultSortFn\n  } = options;\n  if (!dirty)\n    return computed(() => sortFn([...toValue(source)], compareFn));\n  watchEffect(() => {\n    const result = sortFn(toValue(source), compareFn);\n    if (isRef(source))\n      source.value = result;\n    else\n      source.splice(0, source.length, ...result);\n  });\n  return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n  const {\n    interimResults = true,\n    continuous = true,\n    maxAlternatives = 1,\n    window = defaultWindow\n  } = options;\n  const lang = toRef(options.lang || \"en-US\");\n  const isListening = ref(false);\n  const isFinal = ref(false);\n  const result = ref(\"\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isListening.value) => {\n    isListening.value = value;\n  };\n  const start = () => {\n    isListening.value = true;\n  };\n  const stop = () => {\n    isListening.value = false;\n  };\n  const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n  const isSupported = useSupported(() => SpeechRecognition);\n  let recognition;\n  if (isSupported.value) {\n    recognition = new SpeechRecognition();\n    recognition.continuous = continuous;\n    recognition.interimResults = interimResults;\n    recognition.lang = toValue(lang);\n    recognition.maxAlternatives = maxAlternatives;\n    recognition.onstart = () => {\n      isFinal.value = false;\n    };\n    watch(lang, (lang2) => {\n      if (recognition && !isListening.value)\n        recognition.lang = lang2;\n    });\n    recognition.onresult = (event) => {\n      const currentResult = event.results[event.resultIndex];\n      const { transcript } = currentResult[0];\n      isFinal.value = currentResult.isFinal;\n      result.value = transcript;\n      error.value = void 0;\n    };\n    recognition.onerror = (event) => {\n      error.value = event;\n    };\n    recognition.onend = () => {\n      isListening.value = false;\n      recognition.lang = toValue(lang);\n    };\n    watch(isListening, () => {\n      if (isListening.value)\n        recognition.start();\n      else\n        recognition.stop();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isListening.value = false;\n  });\n  return {\n    isSupported,\n    isListening,\n    isFinal,\n    recognition,\n    result,\n    error,\n    toggle,\n    start,\n    stop\n  };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n  const {\n    pitch = 1,\n    rate = 1,\n    volume = 1,\n    window = defaultWindow\n  } = options;\n  const synth = window && window.speechSynthesis;\n  const isSupported = useSupported(() => synth);\n  const isPlaying = ref(false);\n  const status = ref(\"init\");\n  const spokenText = toRef(text || \"\");\n  const lang = toRef(options.lang || \"en-US\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isPlaying.value) => {\n    isPlaying.value = value;\n  };\n  const bindEventsForUtterance = (utterance2) => {\n    utterance2.lang = toValue(lang);\n    utterance2.voice = toValue(options.voice) || null;\n    utterance2.pitch = toValue(pitch);\n    utterance2.rate = toValue(rate);\n    utterance2.volume = volume;\n    utterance2.onstart = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onpause = () => {\n      isPlaying.value = false;\n      status.value = \"pause\";\n    };\n    utterance2.onresume = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onend = () => {\n      isPlaying.value = false;\n      status.value = \"end\";\n    };\n    utterance2.onerror = (event) => {\n      error.value = event;\n    };\n  };\n  const utterance = computed(() => {\n    isPlaying.value = false;\n    status.value = \"init\";\n    const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n    bindEventsForUtterance(newUtterance);\n    return newUtterance;\n  });\n  const speak = () => {\n    synth.cancel();\n    if (utterance)\n      synth.speak(utterance.value);\n  };\n  const stop = () => {\n    synth.cancel();\n    isPlaying.value = false;\n  };\n  if (isSupported.value) {\n    bindEventsForUtterance(utterance.value);\n    watch(lang, (lang2) => {\n      if (utterance.value && !isPlaying.value)\n        utterance.value.lang = lang2;\n    });\n    if (options.voice) {\n      watch(options.voice, () => {\n        synth.cancel();\n      });\n    }\n    watch(isPlaying, () => {\n      if (isPlaying.value)\n        synth.resume();\n      else\n        synth.pause();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isPlaying.value = false;\n  });\n  return {\n    isSupported,\n    isPlaying,\n    status,\n    utterance,\n    error,\n    stop,\n    toggle,\n    speak\n  };\n}\n\nfunction useStepper(steps, initialStep) {\n  const stepsRef = ref(steps);\n  const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n  const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n  const current = computed(() => at(index.value));\n  const isFirst = computed(() => index.value === 0);\n  const isLast = computed(() => index.value === stepNames.value.length - 1);\n  const next = computed(() => stepNames.value[index.value + 1]);\n  const previous = computed(() => stepNames.value[index.value - 1]);\n  function at(index2) {\n    if (Array.isArray(stepsRef.value))\n      return stepsRef.value[index2];\n    return stepsRef.value[stepNames.value[index2]];\n  }\n  function get(step) {\n    if (!stepNames.value.includes(step))\n      return;\n    return at(stepNames.value.indexOf(step));\n  }\n  function goTo(step) {\n    if (stepNames.value.includes(step))\n      index.value = stepNames.value.indexOf(step);\n  }\n  function goToNext() {\n    if (isLast.value)\n      return;\n    index.value++;\n  }\n  function goToPrevious() {\n    if (isFirst.value)\n      return;\n    index.value--;\n  }\n  function goBackTo(step) {\n    if (isAfter(step))\n      goTo(step);\n  }\n  function isNext(step) {\n    return stepNames.value.indexOf(step) === index.value + 1;\n  }\n  function isPrevious(step) {\n    return stepNames.value.indexOf(step) === index.value - 1;\n  }\n  function isCurrent(step) {\n    return stepNames.value.indexOf(step) === index.value;\n  }\n  function isBefore(step) {\n    return index.value < stepNames.value.indexOf(step);\n  }\n  function isAfter(step) {\n    return index.value > stepNames.value.indexOf(step);\n  }\n  return {\n    steps: stepsRef,\n    stepNames,\n    index,\n    current,\n    next,\n    previous,\n    isFirst,\n    isLast,\n    at,\n    get,\n    goTo,\n    goToNext,\n    goToPrevious,\n    goBackTo,\n    isNext,\n    isPrevious,\n    isCurrent,\n    isBefore,\n    isAfter\n  };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const rawInit = toValue(initialValue);\n  const type = guessSerializerType(rawInit);\n  const data = (shallow ? shallowRef : ref)(initialValue);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  async function read(event) {\n    if (!storage || event && event.key !== key)\n      return;\n    try {\n      const rawValue = event ? event.newValue : await storage.getItem(key);\n      if (rawValue == null) {\n        data.value = rawInit;\n        if (writeDefaults && rawInit !== null)\n          await storage.setItem(key, await serializer.write(rawInit));\n      } else if (mergeDefaults) {\n        const value = await serializer.read(rawValue);\n        if (typeof mergeDefaults === \"function\")\n          data.value = mergeDefaults(value, rawInit);\n        else if (type === \"object\" && !Array.isArray(value))\n          data.value = { ...rawInit, ...value };\n        else data.value = value;\n      } else {\n        data.value = await serializer.read(rawValue);\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  read();\n  if (window && listenToStorageChanges)\n    useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n  if (storage) {\n    watchWithFilter(\n      data,\n      async () => {\n        try {\n          if (data.value == null)\n            await storage.removeItem(key);\n          else\n            await storage.setItem(key, await serializer.write(data.value));\n        } catch (e) {\n          onError(e);\n        }\n      },\n      {\n        flush,\n        deep,\n        eventFilter\n      }\n    );\n  }\n  return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n  const isLoaded = ref(false);\n  const {\n    document = defaultDocument,\n    immediate = true,\n    manual = false,\n    id = `vueuse_styletag_${++_id}`\n  } = options;\n  const cssRef = ref(css);\n  let stop = () => {\n  };\n  const load = () => {\n    if (!document)\n      return;\n    const el = document.getElementById(id) || document.createElement(\"style\");\n    if (!el.isConnected) {\n      el.id = id;\n      if (options.media)\n        el.media = options.media;\n      document.head.appendChild(el);\n    }\n    if (isLoaded.value)\n      return;\n    stop = watch(\n      cssRef,\n      (value) => {\n        el.textContent = value;\n      },\n      { immediate: true }\n    );\n    isLoaded.value = true;\n  };\n  const unload = () => {\n    if (!document || !isLoaded.value)\n      return;\n    stop();\n    document.head.removeChild(document.getElementById(id));\n    isLoaded.value = false;\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnScopeDispose(unload);\n  return {\n    id,\n    css: cssRef,\n    unload,\n    load,\n    isLoaded: readonly(isLoaded)\n  };\n}\n\nfunction useSwipe(target, options = {}) {\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart,\n    passive = true,\n    window = defaultWindow\n  } = options;\n  const coordsStart = reactive({ x: 0, y: 0 });\n  const coordsEnd = reactive({ x: 0, y: 0 });\n  const diffX = computed(() => coordsStart.x - coordsEnd.x);\n  const diffY = computed(() => coordsStart.y - coordsEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return \"none\";\n    if (abs(diffX.value) > abs(diffY.value)) {\n      return diffX.value > 0 ? \"left\" : \"right\";\n    } else {\n      return diffY.value > 0 ? \"up\" : \"down\";\n    }\n  });\n  const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n  const updateCoordsStart = (x, y) => {\n    coordsStart.x = x;\n    coordsStart.y = y;\n  };\n  const updateCoordsEnd = (x, y) => {\n    coordsEnd.x = x;\n    coordsEnd.y = y;\n  };\n  let listenerOptions;\n  const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n  if (!passive)\n    listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n  else\n    listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n  const onTouchEnd = (e) => {\n    if (isSwiping.value)\n      onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n    isSwiping.value = false;\n  };\n  const stops = [\n    useEventListener(target, \"touchstart\", (e) => {\n      if (e.touches.length !== 1)\n        return;\n      if (listenerOptions.capture && !listenerOptions.passive)\n        e.preventDefault();\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsStart(x, y);\n      updateCoordsEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }, listenerOptions),\n    useEventListener(target, \"touchmove\", (e) => {\n      if (e.touches.length !== 1)\n        return;\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }, listenerOptions),\n    useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n  ];\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isPassiveEventSupported,\n    isSwiping,\n    direction,\n    coordsStart,\n    coordsEnd,\n    lengthX: diffX,\n    lengthY: diffY,\n    stop\n  };\n}\nfunction checkPassiveEventSupport(document) {\n  if (!document)\n    return false;\n  let supportsPassive = false;\n  const optionsBlock = {\n    get passive() {\n      supportsPassive = true;\n      return false;\n    }\n  };\n  document.addEventListener(\"x\", noop, optionsBlock);\n  document.removeEventListener(\"x\", noop);\n  return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n  const refs = ref([]);\n  refs.value.set = (el) => {\n    if (el)\n      refs.value.push(el);\n  };\n  onBeforeUpdate(() => {\n    refs.value.length = 0;\n  });\n  return refs;\n}\n\nfunction useTextDirection(options = {}) {\n  const {\n    document = defaultDocument,\n    selector = \"html\",\n    observe = false,\n    initialValue = \"ltr\"\n  } = options;\n  function getValue() {\n    var _a, _b;\n    return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n  }\n  const dir = ref(getValue());\n  tryOnMounted(() => dir.value = getValue());\n  if (observe && document) {\n    useMutationObserver(\n      document.querySelector(selector),\n      () => dir.value = getValue(),\n      { attributes: true }\n    );\n  }\n  return computed({\n    get() {\n      return dir.value;\n    },\n    set(v) {\n      var _a, _b;\n      dir.value = v;\n      if (!document)\n        return;\n      if (dir.value)\n        (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n      else\n        (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n    }\n  });\n}\n\nfunction getRangesFromSelection(selection) {\n  var _a;\n  const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n  return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const selection = ref(null);\n  const text = computed(() => {\n    var _a, _b;\n    return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n  });\n  const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n  const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n  function onSelectionChange() {\n    selection.value = null;\n    if (window)\n      selection.value = window.getSelection();\n  }\n  if (window)\n    useEventListener(window.document, \"selectionchange\", onSelectionChange);\n  return {\n    text,\n    rects,\n    ranges,\n    selection\n  };\n}\n\nfunction useTextareaAutosize(options) {\n  var _a;\n  const textarea = ref(options == null ? void 0 : options.element);\n  const input = ref(options == null ? void 0 : options.input);\n  const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n  const textareaScrollHeight = ref(1);\n  const textareaOldWidth = ref(0);\n  function triggerResize() {\n    var _a2;\n    if (!textarea.value)\n      return;\n    let height = \"\";\n    textarea.value.style[styleProp] = \"1px\";\n    textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n    const _styleTarget = toValue(options == null ? void 0 : options.styleTarget);\n    if (_styleTarget)\n      _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n    else\n      height = `${textareaScrollHeight.value}px`;\n    textarea.value.style[styleProp] = height;\n  }\n  watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n  watch(textareaScrollHeight, () => {\n    var _a2;\n    return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n  });\n  useResizeObserver(textarea, ([{ contentRect }]) => {\n    if (textareaOldWidth.value === contentRect.width)\n      return;\n    textareaOldWidth.value = contentRect.width;\n    triggerResize();\n  });\n  if (options == null ? void 0 : options.watch)\n    watch(options.watch, triggerResize, { immediate: true, deep: true });\n  return {\n    textarea,\n    input,\n    triggerResize\n  };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n  const { throttle = 200, trailing = true } = options;\n  const filter = throttleFilter(throttle, trailing);\n  const history = useRefHistory(source, { ...options, eventFilter: filter });\n  return {\n    ...history\n  };\n}\n\nconst DEFAULT_UNITS = [\n  { max: 6e4, value: 1e3, name: \"second\" },\n  { max: 276e4, value: 6e4, name: \"minute\" },\n  { max: 72e6, value: 36e5, name: \"hour\" },\n  { max: 5184e5, value: 864e5, name: \"day\" },\n  { max: 24192e5, value: 6048e5, name: \"week\" },\n  { max: 28512e6, value: 2592e6, name: \"month\" },\n  { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n  justNow: \"just now\",\n  past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n  future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n  month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n  year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n  day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n  week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n  hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n  minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n  second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n  invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n  return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n  const {\n    controls: exposeControls = false,\n    updateInterval = 3e4\n  } = options;\n  const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n  const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n  if (exposeControls) {\n    return {\n      timeAgo,\n      ...controls\n    };\n  } else {\n    return timeAgo;\n  }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n  var _a;\n  const {\n    max,\n    messages = DEFAULT_MESSAGES,\n    fullDateFormatter = DEFAULT_FORMATTER,\n    units = DEFAULT_UNITS,\n    showSecond = false,\n    rounding = \"round\"\n  } = options;\n  const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n  const diff = +now - +from;\n  const absDiff = Math.abs(diff);\n  function getValue(diff2, unit) {\n    return roundFn(Math.abs(diff2) / unit.value);\n  }\n  function format(diff2, unit) {\n    const val = getValue(diff2, unit);\n    const past = diff2 > 0;\n    const str = applyFormat(unit.name, val, past);\n    return applyFormat(past ? \"past\" : \"future\", str, past);\n  }\n  function applyFormat(name, val, isPast) {\n    const formatter = messages[name];\n    if (typeof formatter === \"function\")\n      return formatter(val, isPast);\n    return formatter.replace(\"{0}\", val.toString());\n  }\n  if (absDiff < 6e4 && !showSecond)\n    return messages.justNow;\n  if (typeof max === \"number\" && absDiff > max)\n    return fullDateFormatter(new Date(from));\n  if (typeof max === \"string\") {\n    const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n    if (unitMax && absDiff > unitMax)\n      return fullDateFormatter(new Date(from));\n  }\n  for (const [idx, unit] of units.entries()) {\n    const val = getValue(diff, unit);\n    if (val <= 0 && units[idx - 1])\n      return format(diff, units[idx - 1]);\n    if (absDiff < unit.max)\n      return format(diff, unit);\n  }\n  return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n  const { start } = useTimeoutFn(loop, interval, { immediate: false });\n  const isActive = ref(false);\n  async function loop() {\n    if (!isActive.value)\n      return;\n    await fn();\n    start();\n  }\n  function resume() {\n    if (!isActive.value) {\n      isActive.value = true;\n      loop();\n    }\n  }\n  function pause() {\n    isActive.value = false;\n  }\n  if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nfunction useTimestamp(options = {}) {\n  const {\n    controls: exposeControls = false,\n    offset = 0,\n    immediate = true,\n    interval = \"requestAnimationFrame\",\n    callback\n  } = options;\n  const ts = ref(timestamp() + offset);\n  const update = () => ts.value = timestamp() + offset;\n  const cb = callback ? () => {\n    update();\n    callback(ts.value);\n  } : update;\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n  if (exposeControls) {\n    return {\n      timestamp: ts,\n      ...controls\n    };\n  } else {\n    return ts;\n  }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n  var _a, _b, _c;\n  const {\n    document = defaultDocument,\n    restoreOnUnmount = (t) => t\n  } = options;\n  const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n  const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n  const isReadonly = newTitle && typeof newTitle === \"function\";\n  function format(t) {\n    if (!(\"titleTemplate\" in options))\n      return t;\n    const template = options.titleTemplate || \"%s\";\n    return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n  }\n  watch(\n    title,\n    (t, o) => {\n      if (t !== o && document)\n        document.title = format(typeof t === \"string\" ? t : \"\");\n    },\n    { immediate: true }\n  );\n  if (options.observe && !options.titleTemplate && document && !isReadonly) {\n    useMutationObserver(\n      (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n      () => {\n        if (document && document.title !== title.value)\n          title.value = format(document.title);\n      },\n      { childList: true }\n    );\n  }\n  tryOnBeforeUnmount(() => {\n    if (restoreOnUnmount) {\n      const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n      if (restoredTitle != null && document)\n        document.title = restoredTitle;\n    }\n  });\n  return title;\n}\n\nconst _TransitionPresets = {\n  easeInSine: [0.12, 0, 0.39, 0],\n  easeOutSine: [0.61, 1, 0.88, 1],\n  easeInOutSine: [0.37, 0, 0.63, 1],\n  easeInQuad: [0.11, 0, 0.5, 0],\n  easeOutQuad: [0.5, 1, 0.89, 1],\n  easeInOutQuad: [0.45, 0, 0.55, 1],\n  easeInCubic: [0.32, 0, 0.67, 0],\n  easeOutCubic: [0.33, 1, 0.68, 1],\n  easeInOutCubic: [0.65, 0, 0.35, 1],\n  easeInQuart: [0.5, 0, 0.75, 0],\n  easeOutQuart: [0.25, 1, 0.5, 1],\n  easeInOutQuart: [0.76, 0, 0.24, 1],\n  easeInQuint: [0.64, 0, 0.78, 0],\n  easeOutQuint: [0.22, 1, 0.36, 1],\n  easeInOutQuint: [0.83, 0, 0.17, 1],\n  easeInExpo: [0.7, 0, 0.84, 0],\n  easeOutExpo: [0.16, 1, 0.3, 1],\n  easeInOutExpo: [0.87, 0, 0.13, 1],\n  easeInCirc: [0.55, 0, 1, 0.45],\n  easeOutCirc: [0, 0.55, 0.45, 1],\n  easeInOutCirc: [0.85, 0, 0.15, 1],\n  easeInBack: [0.36, 0, 0.66, -0.56],\n  easeOutBack: [0.34, 1.56, 0.64, 1],\n  easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n  const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n  const b = (a1, a2) => 3 * a2 - 6 * a1;\n  const c = (a1) => 3 * a1;\n  const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n  const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n  const getTforX = (x) => {\n    let aGuessT = x;\n    for (let i = 0; i < 4; ++i) {\n      const currentSlope = getSlope(aGuessT, p0, p2);\n      if (currentSlope === 0)\n        return aGuessT;\n      const currentX = calcBezier(aGuessT, p0, p2) - x;\n      aGuessT -= currentX / currentSlope;\n    }\n    return aGuessT;\n  };\n  return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n  return a + alpha * (b - a);\n}\nfunction toVec(t) {\n  return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n  var _a, _b;\n  const fromVal = toValue(from);\n  const toVal = toValue(to);\n  const v1 = toVec(fromVal);\n  const v2 = toVec(toVal);\n  const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n  const startedAt = Date.now();\n  const endAt = Date.now() + duration;\n  const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n  const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n  return new Promise((resolve) => {\n    source.value = fromVal;\n    const tick = () => {\n      var _a2;\n      if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n        resolve();\n        return;\n      }\n      const now = Date.now();\n      const alpha = ease((now - startedAt) / duration);\n      const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n      if (Array.isArray(source.value))\n        source.value = arr.map((n, i) => {\n          var _a3, _b2;\n          return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n        });\n      else if (typeof source.value === \"number\")\n        source.value = arr[0];\n      if (now < endAt) {\n        requestAnimationFrame(tick);\n      } else {\n        source.value = toVal;\n        resolve();\n      }\n    };\n    tick();\n  });\n}\nfunction useTransition(source, options = {}) {\n  let currentId = 0;\n  const sourceVal = () => {\n    const v = toValue(source);\n    return typeof v === \"number\" ? v : v.map(toValue);\n  };\n  const outputRef = ref(sourceVal());\n  watch(sourceVal, async (to) => {\n    var _a, _b;\n    if (toValue(options.disabled))\n      return;\n    const id = ++currentId;\n    if (options.delay)\n      await promiseTimeout(toValue(options.delay));\n    if (id !== currentId)\n      return;\n    const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n    (_a = options.onStarted) == null ? void 0 : _a.call(options);\n    await executeTransition(outputRef, outputRef.value, toVal, {\n      ...options,\n      abort: () => {\n        var _a2;\n        return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n      }\n    });\n    (_b = options.onFinished) == null ? void 0 : _b.call(options);\n  }, { deep: true });\n  watch(() => toValue(options.disabled), (disabled) => {\n    if (disabled) {\n      currentId++;\n      outputRef.value = sourceVal();\n    }\n  });\n  tryOnScopeDispose(() => {\n    currentId++;\n  });\n  return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n  const {\n    initialValue = {},\n    removeNullishValues = true,\n    removeFalsyValues = false,\n    write: enableWrite = true,\n    window = defaultWindow\n  } = options;\n  if (!window)\n    return reactive(initialValue);\n  const state = reactive({});\n  function getRawParams() {\n    if (mode === \"history\") {\n      return window.location.search || \"\";\n    } else if (mode === \"hash\") {\n      const hash = window.location.hash || \"\";\n      const index = hash.indexOf(\"?\");\n      return index > 0 ? hash.slice(index) : \"\";\n    } else {\n      return (window.location.hash || \"\").replace(/^#/, \"\");\n    }\n  }\n  function constructQuery(params) {\n    const stringified = params.toString();\n    if (mode === \"history\")\n      return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n    if (mode === \"hash-params\")\n      return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n    const hash = window.location.hash || \"#\";\n    const index = hash.indexOf(\"?\");\n    if (index > 0)\n      return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n    return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n  }\n  function read() {\n    return new URLSearchParams(getRawParams());\n  }\n  function updateState(params) {\n    const unusedKeys = new Set(Object.keys(state));\n    for (const key of params.keys()) {\n      const paramsForKey = params.getAll(key);\n      state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n      unusedKeys.delete(key);\n    }\n    Array.from(unusedKeys).forEach((key) => delete state[key]);\n  }\n  const { pause, resume } = pausableWatch(\n    state,\n    () => {\n      const params = new URLSearchParams(\"\");\n      Object.keys(state).forEach((key) => {\n        const mapEntry = state[key];\n        if (Array.isArray(mapEntry))\n          mapEntry.forEach((value) => params.append(key, value));\n        else if (removeNullishValues && mapEntry == null)\n          params.delete(key);\n        else if (removeFalsyValues && !mapEntry)\n          params.delete(key);\n        else\n          params.set(key, mapEntry);\n      });\n      write(params);\n    },\n    { deep: true }\n  );\n  function write(params, shouldUpdate) {\n    pause();\n    if (shouldUpdate)\n      updateState(params);\n    window.history.replaceState(\n      window.history.state,\n      window.document.title,\n      window.location.pathname + constructQuery(params)\n    );\n    resume();\n  }\n  function onChanged() {\n    if (!enableWrite)\n      return;\n    write(read(), true);\n  }\n  useEventListener(window, \"popstate\", onChanged, false);\n  if (mode !== \"history\")\n    useEventListener(window, \"hashchange\", onChanged, false);\n  const initial = read();\n  if (initial.keys().next().value)\n    updateState(initial);\n  else\n    Object.assign(state, initialValue);\n  return state;\n}\n\nfunction useUserMedia(options = {}) {\n  var _a, _b;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n  const constraints = ref(options.constraints);\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n  });\n  const stream = shallowRef();\n  function getDeviceOptions(type) {\n    switch (type) {\n      case \"video\": {\n        if (constraints.value)\n          return constraints.value.video || false;\n        break;\n      }\n      case \"audio\": {\n        if (constraints.value)\n          return constraints.value.audio || false;\n        break;\n      }\n    }\n  }\n  async function _start() {\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getUserMedia({\n      video: getDeviceOptions(\"video\"),\n      audio: getDeviceOptions(\"audio\")\n    });\n    return stream.value;\n  }\n  function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  async function restart() {\n    _stop();\n    return await start();\n  }\n  watch(\n    enabled,\n    (v) => {\n      if (v)\n        _start();\n      else _stop();\n    },\n    { immediate: true }\n  );\n  watch(\n    constraints,\n    () => {\n      if (autoSwitch.value && stream.value)\n        restart();\n    },\n    { immediate: true }\n  );\n  tryOnScopeDispose(() => {\n    stop();\n  });\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    restart,\n    constraints,\n    enabled,\n    autoSwitch\n  };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n  var _a, _b, _c, _d, _e;\n  const {\n    clone = false,\n    passive = false,\n    eventName,\n    deep = false,\n    defaultValue,\n    shouldEmit\n  } = options;\n  const vm = getCurrentInstance();\n  const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n  let event = eventName;\n  if (!key) {\n    if (isVue2) {\n      const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n      key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n      if (!eventName)\n        event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n    } else {\n      key = \"modelValue\";\n    }\n  }\n  event = event || `update:${key.toString()}`;\n  const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n  const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n  const triggerEmit = (value) => {\n    if (shouldEmit) {\n      if (shouldEmit(value))\n        _emit(event, value);\n    } else {\n      _emit(event, value);\n    }\n  };\n  if (passive) {\n    const initialValue = getValue();\n    const proxy = ref(initialValue);\n    let isUpdating = false;\n    watch(\n      () => props[key],\n      (v) => {\n        if (!isUpdating) {\n          isUpdating = true;\n          proxy.value = cloneFn(v);\n          nextTick(() => isUpdating = false);\n        }\n      }\n    );\n    watch(\n      proxy,\n      (v) => {\n        if (!isUpdating && (v !== props[key] || deep))\n          triggerEmit(v);\n      },\n      { deep }\n    );\n    return proxy;\n  } else {\n    return computed({\n      get() {\n        return getValue();\n      },\n      set(value) {\n        triggerEmit(value);\n      }\n    });\n  }\n}\n\nfunction useVModels(props, emit, options = {}) {\n  const ret = {};\n  for (const key in props) {\n    ret[key] = useVModel(\n      props,\n      key,\n      emit,\n      options\n    );\n  }\n  return ret;\n}\n\nfunction useVibrate(options) {\n  const {\n    pattern = [],\n    interval = 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n  const patternRef = toRef(pattern);\n  let intervalControls;\n  const vibrate = (pattern2 = patternRef.value) => {\n    if (isSupported.value)\n      navigator.vibrate(pattern2);\n  };\n  const stop = () => {\n    if (isSupported.value)\n      navigator.vibrate(0);\n    intervalControls == null ? void 0 : intervalControls.pause();\n  };\n  if (interval > 0) {\n    intervalControls = useIntervalFn(\n      vibrate,\n      interval,\n      {\n        immediate: false,\n        immediateCallback: false\n      }\n    );\n  }\n  return {\n    isSupported,\n    pattern,\n    intervalControls,\n    vibrate,\n    stop\n  };\n}\n\nfunction useVirtualList(list, options) {\n  const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n  return {\n    list: currentList,\n    scrollTo,\n    containerProps: {\n      ref: containerRef,\n      onScroll: () => {\n        calculateRange();\n      },\n      style: containerStyle\n    },\n    wrapperProps\n  };\n}\nfunction useVirtualListResources(list) {\n  const containerRef = ref(null);\n  const size = useElementSize(containerRef);\n  const currentList = ref([]);\n  const source = shallowRef(list);\n  const state = ref({ start: 0, end: 10 });\n  return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n  return (containerSize) => {\n    if (typeof itemSize === \"number\")\n      return Math.ceil(containerSize / itemSize);\n    const { start = 0 } = state.value;\n    let sum = 0;\n    let capacity = 0;\n    for (let i = start; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      capacity = i;\n      if (sum > containerSize)\n        break;\n    }\n    return capacity - start;\n  };\n}\nfunction createGetOffset(source, itemSize) {\n  return (scrollDirection) => {\n    if (typeof itemSize === \"number\")\n      return Math.floor(scrollDirection / itemSize) + 1;\n    let sum = 0;\n    let offset = 0;\n    for (let i = 0; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      if (sum >= scrollDirection) {\n        offset = i;\n        break;\n      }\n    }\n    return offset + 1;\n  };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n  return () => {\n    const element = containerRef.value;\n    if (element) {\n      const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n      const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n      const from = offset - overscan;\n      const to = offset + viewCapacity + overscan;\n      state.value = {\n        start: from < 0 ? 0 : from,\n        end: to > source.value.length ? source.value.length : to\n      };\n      currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n        data: ele,\n        index: index + state.value.start\n      }));\n    }\n  };\n}\nfunction createGetDistance(itemSize, source) {\n  return (index) => {\n    if (typeof itemSize === \"number\") {\n      const size2 = index * itemSize;\n      return size2;\n    }\n    const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n    return size;\n  };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n  watch([size.width, size.height, list, containerRef], () => {\n    calculateRange();\n  });\n}\nfunction createComputedTotalSize(itemSize, source) {\n  return computed(() => {\n    if (typeof itemSize === \"number\")\n      return source.value.length * itemSize;\n    return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n  });\n}\nconst scrollToDictionaryForElementScrollKey = {\n  horizontal: \"scrollLeft\",\n  vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n  return (index) => {\n    if (containerRef.value) {\n      containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n      calculateRange();\n    }\n  };\n}\nfunction useHorizontalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowX: \"auto\" };\n  const { itemWidth, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n  const getOffset = createGetOffset(source, itemWidth);\n  const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceLeft = createGetDistance(itemWidth, source);\n  const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n  const totalWidth = createComputedTotalSize(itemWidth, source);\n  useWatchForSizes(size, list, containerRef, calculateRange);\n  const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        height: \"100%\",\n        width: `${totalWidth.value - offsetLeft.value}px`,\n        marginLeft: `${offsetLeft.value}px`,\n        display: \"flex\"\n      }\n    };\n  });\n  return {\n    scrollTo,\n    calculateRange,\n    wrapperProps,\n    containerStyle,\n    currentList,\n    containerRef\n  };\n}\nfunction useVerticalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowY: \"auto\" };\n  const { itemHeight, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n  const getOffset = createGetOffset(source, itemHeight);\n  const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceTop = createGetDistance(itemHeight, source);\n  const offsetTop = computed(() => getDistanceTop(state.value.start));\n  const totalHeight = createComputedTotalSize(itemHeight, source);\n  useWatchForSizes(size, list, containerRef, calculateRange);\n  const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        width: \"100%\",\n        height: `${totalHeight.value - offsetTop.value}px`,\n        marginTop: `${offsetTop.value}px`\n      }\n    };\n  });\n  return {\n    calculateRange,\n    scrollTo,\n    containerStyle,\n    wrapperProps,\n    currentList,\n    containerRef\n  };\n}\n\nfunction useWakeLock(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    document = defaultDocument\n  } = options;\n  const requestedType = ref(false);\n  const sentinel = shallowRef(null);\n  const documentVisibility = useDocumentVisibility({ document });\n  const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n  const isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n  if (isSupported.value) {\n    useEventListener(sentinel, \"release\", () => {\n      var _a, _b;\n      requestedType.value = (_b = (_a = sentinel.value) == null ? void 0 : _a.type) != null ? _b : false;\n    });\n    whenever(\n      () => documentVisibility.value === \"visible\" && (document == null ? void 0 : document.visibilityState) === \"visible\" && requestedType.value,\n      (type) => {\n        requestedType.value = false;\n        forceRequest(type);\n      }\n    );\n  }\n  async function forceRequest(type) {\n    var _a;\n    await ((_a = sentinel.value) == null ? void 0 : _a.release());\n    sentinel.value = isSupported.value ? await navigator.wakeLock.request(type) : null;\n  }\n  async function request(type) {\n    if (documentVisibility.value === \"visible\")\n      await forceRequest(type);\n    else\n      requestedType.value = type;\n  }\n  async function release() {\n    requestedType.value = false;\n    const s = sentinel.value;\n    sentinel.value = null;\n    await (s == null ? void 0 : s.release());\n  }\n  return {\n    sentinel,\n    isSupported,\n    isActive,\n    request,\n    forceRequest,\n    release\n  };\n}\n\nfunction useWebNotification(options = {}) {\n  const {\n    window = defaultWindow,\n    requestPermissions: _requestForPermissions = true\n  } = options;\n  const defaultWebNotificationOptions = options;\n  const isSupported = useSupported(() => {\n    if (!window || !(\"Notification\" in window))\n      return false;\n    try {\n      new Notification(\"\");\n    } catch (e) {\n      return false;\n    }\n    return true;\n  });\n  const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n  const notification = ref(null);\n  const ensurePermissions = async () => {\n    if (!isSupported.value)\n      return;\n    if (!permissionGranted.value && Notification.permission !== \"denied\") {\n      const result = await Notification.requestPermission();\n      if (result === \"granted\")\n        permissionGranted.value = true;\n    }\n    return permissionGranted.value;\n  };\n  const { on: onClick, trigger: clickTrigger } = createEventHook();\n  const { on: onShow, trigger: showTrigger } = createEventHook();\n  const { on: onError, trigger: errorTrigger } = createEventHook();\n  const { on: onClose, trigger: closeTrigger } = createEventHook();\n  const show = async (overrides) => {\n    if (!isSupported.value || !permissionGranted.value)\n      return;\n    const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n    notification.value = new Notification(options2.title || \"\", options2);\n    notification.value.onclick = clickTrigger;\n    notification.value.onshow = showTrigger;\n    notification.value.onerror = errorTrigger;\n    notification.value.onclose = closeTrigger;\n    return notification.value;\n  };\n  const close = () => {\n    if (notification.value)\n      notification.value.close();\n    notification.value = null;\n  };\n  if (_requestForPermissions)\n    tryOnMounted(ensurePermissions);\n  tryOnScopeDispose(close);\n  if (isSupported.value && window) {\n    const document = window.document;\n    useEventListener(document, \"visibilitychange\", (e) => {\n      e.preventDefault();\n      if (document.visibilityState === \"visible\") {\n        close();\n      }\n    });\n  }\n  return {\n    isSupported,\n    notification,\n    ensurePermissions,\n    permissionGranted,\n    show,\n    close,\n    onClick,\n    onShow,\n    onError,\n    onClose\n  };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n  if (options === true)\n    return {};\n  return options;\n}\nfunction useWebSocket(url, options = {}) {\n  const {\n    onConnected,\n    onDisconnected,\n    onError,\n    onMessage,\n    immediate = true,\n    autoClose = true,\n    protocols = []\n  } = options;\n  const data = ref(null);\n  const status = ref(\"CLOSED\");\n  const wsRef = ref();\n  const urlRef = toRef(url);\n  let heartbeatPause;\n  let heartbeatResume;\n  let explicitlyClosed = false;\n  let retried = 0;\n  let bufferedData = [];\n  let pongTimeoutWait;\n  const _sendBuffer = () => {\n    if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n      for (const buffer of bufferedData)\n        wsRef.value.send(buffer);\n      bufferedData = [];\n    }\n  };\n  const resetHeartbeat = () => {\n    clearTimeout(pongTimeoutWait);\n    pongTimeoutWait = void 0;\n  };\n  const close = (code = 1e3, reason) => {\n    if (!isClient || !wsRef.value)\n      return;\n    explicitlyClosed = true;\n    resetHeartbeat();\n    heartbeatPause == null ? void 0 : heartbeatPause();\n    wsRef.value.close(code, reason);\n    wsRef.value = void 0;\n  };\n  const send = (data2, useBuffer = true) => {\n    if (!wsRef.value || status.value !== \"OPEN\") {\n      if (useBuffer)\n        bufferedData.push(data2);\n      return false;\n    }\n    _sendBuffer();\n    wsRef.value.send(data2);\n    return true;\n  };\n  const _init = () => {\n    if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n      return;\n    const ws = new WebSocket(urlRef.value, protocols);\n    wsRef.value = ws;\n    status.value = \"CONNECTING\";\n    ws.onopen = () => {\n      status.value = \"OPEN\";\n      retried = 0;\n      onConnected == null ? void 0 : onConnected(ws);\n      heartbeatResume == null ? void 0 : heartbeatResume();\n      _sendBuffer();\n    };\n    ws.onclose = (ev) => {\n      status.value = \"CLOSED\";\n      onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n      if (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n        const {\n          retries = -1,\n          delay = 1e3,\n          onFailed\n        } = resolveNestedOptions(options.autoReconnect);\n        if (typeof retries === \"number\" && (retries < 0 || retried < retries)) {\n          retried += 1;\n          setTimeout(_init, delay);\n        } else if (typeof retries === \"function\" && retries()) {\n          setTimeout(_init, delay);\n        } else {\n          onFailed == null ? void 0 : onFailed();\n        }\n      }\n    };\n    ws.onerror = (e) => {\n      onError == null ? void 0 : onError(ws, e);\n    };\n    ws.onmessage = (e) => {\n      if (options.heartbeat) {\n        resetHeartbeat();\n        const {\n          message = DEFAULT_PING_MESSAGE,\n          responseMessage = message\n        } = resolveNestedOptions(options.heartbeat);\n        if (e.data === responseMessage)\n          return;\n      }\n      data.value = e.data;\n      onMessage == null ? void 0 : onMessage(ws, e);\n    };\n  };\n  if (options.heartbeat) {\n    const {\n      message = DEFAULT_PING_MESSAGE,\n      interval = 1e3,\n      pongTimeout = 1e3\n    } = resolveNestedOptions(options.heartbeat);\n    const { pause, resume } = useIntervalFn(\n      () => {\n        send(message, false);\n        if (pongTimeoutWait != null)\n          return;\n        pongTimeoutWait = setTimeout(() => {\n          close();\n          explicitlyClosed = false;\n        }, pongTimeout);\n      },\n      interval,\n      { immediate: false }\n    );\n    heartbeatPause = pause;\n    heartbeatResume = resume;\n  }\n  if (autoClose) {\n    if (isClient)\n      useEventListener(\"beforeunload\", () => close());\n    tryOnScopeDispose(close);\n  }\n  const open = () => {\n    if (!isClient && !isWorker)\n      return;\n    close();\n    explicitlyClosed = false;\n    retried = 0;\n    _init();\n  };\n  if (immediate)\n    open();\n  watch(urlRef, open);\n  return {\n    data,\n    status,\n    close,\n    send,\n    open,\n    ws: wsRef\n  };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n  const {\n    window = defaultWindow\n  } = options != null ? options : {};\n  const data = ref(null);\n  const worker = shallowRef();\n  const post = (...args) => {\n    if (!worker.value)\n      return;\n    worker.value.postMessage(...args);\n  };\n  const terminate = function terminate2() {\n    if (!worker.value)\n      return;\n    worker.value.terminate();\n  };\n  if (window) {\n    if (typeof arg0 === \"string\")\n      worker.value = new Worker(arg0, workerOptions);\n    else if (typeof arg0 === \"function\")\n      worker.value = arg0();\n    else\n      worker.value = arg0;\n    worker.value.onmessage = (e) => {\n      data.value = e.data;\n    };\n    tryOnScopeDispose(() => {\n      if (worker.value)\n        worker.value.terminate();\n    });\n  }\n  return {\n    data,\n    post,\n    terminate,\n    worker\n  };\n}\n\nfunction depsParser(deps, localDeps) {\n  if (deps.length === 0 && localDeps.length === 0)\n    return \"\";\n  const depsString = deps.map((dep) => `'${dep}'`).toString();\n  const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n    const str = fn.toString();\n    if (str.trim().startsWith(\"function\")) {\n      return str;\n    } else {\n      const name = fn.name;\n      return `const ${name} = ${str}`;\n    }\n  }).join(\";\");\n  const importString = `importScripts(${depsString});`;\n  return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction jobRunner(userFunc) {\n  return (e) => {\n    const userFuncArgs = e.data[0];\n    return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n      postMessage([\"SUCCESS\", result]);\n    }).catch((error) => {\n      postMessage([\"ERROR\", error]);\n    });\n  };\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n  const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n  const blob = new Blob([blobCode], { type: \"text/javascript\" });\n  const url = URL.createObjectURL(blob);\n  return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n  const {\n    dependencies = [],\n    localDependencies = [],\n    timeout,\n    window = defaultWindow\n  } = options;\n  const worker = ref();\n  const workerStatus = ref(\"PENDING\");\n  const promise = ref({});\n  const timeoutId = ref();\n  const workerTerminate = (status = \"PENDING\") => {\n    if (worker.value && worker.value._url && window) {\n      worker.value.terminate();\n      URL.revokeObjectURL(worker.value._url);\n      promise.value = {};\n      worker.value = void 0;\n      window.clearTimeout(timeoutId.value);\n      workerStatus.value = status;\n    }\n  };\n  workerTerminate();\n  tryOnScopeDispose(workerTerminate);\n  const generateWorker = () => {\n    const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n    const newWorker = new Worker(blobUrl);\n    newWorker._url = blobUrl;\n    newWorker.onmessage = (e) => {\n      const { resolve = () => {\n      }, reject = () => {\n      } } = promise.value;\n      const [status, result] = e.data;\n      switch (status) {\n        case \"SUCCESS\":\n          resolve(result);\n          workerTerminate(status);\n          break;\n        default:\n          reject(result);\n          workerTerminate(\"ERROR\");\n          break;\n      }\n    };\n    newWorker.onerror = (e) => {\n      const { reject = () => {\n      } } = promise.value;\n      e.preventDefault();\n      reject(e);\n      workerTerminate(\"ERROR\");\n    };\n    if (timeout) {\n      timeoutId.value = setTimeout(\n        () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n        timeout\n      );\n    }\n    return newWorker;\n  };\n  const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n    var _a;\n    promise.value = {\n      resolve,\n      reject\n    };\n    (_a = worker.value) == null ? void 0 : _a.postMessage([[...fnArgs]]);\n    workerStatus.value = \"RUNNING\";\n  });\n  const workerFn = (...fnArgs) => {\n    if (workerStatus.value === \"RUNNING\") {\n      console.error(\n        \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n      );\n      return Promise.reject();\n    }\n    worker.value = generateWorker();\n    return callWorker(...fnArgs);\n  };\n  return {\n    workerFn,\n    workerStatus,\n    workerTerminate\n  };\n}\n\nfunction useWindowFocus(options = {}) {\n  const { window = defaultWindow } = options;\n  if (!window)\n    return ref(false);\n  const focused = ref(window.document.hasFocus());\n  useEventListener(window, \"blur\", () => {\n    focused.value = false;\n  });\n  useEventListener(window, \"focus\", () => {\n    focused.value = true;\n  });\n  return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n  const { window = defaultWindow, behavior = \"auto\" } = options;\n  if (!window) {\n    return {\n      x: ref(0),\n      y: ref(0)\n    };\n  }\n  const internalX = ref(window.scrollX);\n  const internalY = ref(window.scrollY);\n  const x = computed({\n    get() {\n      return internalX.value;\n    },\n    set(x2) {\n      scrollTo({ left: x2, behavior });\n    }\n  });\n  const y = computed({\n    get() {\n      return internalY.value;\n    },\n    set(y2) {\n      scrollTo({ top: y2, behavior });\n    }\n  });\n  useEventListener(\n    window,\n    \"scroll\",\n    () => {\n      internalX.value = window.scrollX;\n      internalY.value = window.scrollY;\n    },\n    {\n      capture: false,\n      passive: true\n    }\n  );\n  return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n  const {\n    window = defaultWindow,\n    initialWidth = Number.POSITIVE_INFINITY,\n    initialHeight = Number.POSITIVE_INFINITY,\n    listenOrientation = true,\n    includeScrollbar = true,\n    type = \"inner\"\n  } = options;\n  const width = ref(initialWidth);\n  const height = ref(initialHeight);\n  const update = () => {\n    if (window) {\n      if (type === \"outer\") {\n        width.value = window.outerWidth;\n        height.value = window.outerHeight;\n      } else if (includeScrollbar) {\n        width.value = window.innerWidth;\n        height.value = window.innerHeight;\n      } else {\n        width.value = window.document.documentElement.clientWidth;\n        height.value = window.document.documentElement.clientHeight;\n      }\n    }\n  };\n  update();\n  tryOnMounted(update);\n  useEventListener(\"resize\", update, { passive: true });\n  if (listenOrientation) {\n    const matches = useMediaQuery(\"(orientation: portrait)\");\n    watch(matches, () => update());\n  }\n  return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import {usePageStore} from '@/store/page.store.js'\nimport {useScroll} from '@vueuse/core'\nimport {storeToRefs} from 'pinia'\nimport {ref, computed} from 'vue'\n\n/**\n * Page composable\n */\nexport function usePage() {\n\n  //Composables\n  const store = usePageStore()\n  const {header} = storeToRefs(store)\n  const {setHeader} = store\n\n  //Page title (app name + header)\n  const title = computed(() => {\n    const parts = ['Arist']\n    if (header.value) {\n      parts.push(header.value)\n    }\n    return parts.join(' – ')\n  })\n\n  //Find main content element\n  const main = document.querySelector('main')\n  const behaviorRef = ref('smooth')\n  const {y: scrollY} = useScroll(window, {behavior: behaviorRef})\n\n  //Scroll page to a position\n  const scrollToTop = (behavior = 'smooth', delay = 0) => {\n    setTimeout(() => {\n      behaviorRef.value = behavior\n      scrollY.value = 0\n    }, delay)\n  }\n  const scrollToBottom = (behavior = 'smooth', delay = 0) => {\n    setTimeout(() => {\n      behaviorRef.value = behavior\n      scrollY.value = main.scrollHeight\n    }, delay)\n  }\n\n  //Expose interface\n  return {\n    title,\n    header,\n    setHeader,\n    scrollToTop,\n    scrollToBottom,\n  }\n}\n","import {computed} from 'vue'\n\n/**\n * Timezone detection composable\n */\nexport function useTimezoneDetection() {\n\n  //Determine timezone\n  const browserTimezone = computed(() => Intl.DateTimeFormat().resolvedOptions().timeZone)\n\n  //Expose interface\n  return {\n    browserTimezone,\n  }\n}\n","import {ref} from 'vue'\n\n/**\n * Use value toggle\n */\nexport function useValueToggle(initialValue = false) {\n\n  //Create refs\n  const isValue = ref(initialValue)\n\n  //Set value\n  const setValue = value => isValue.value = Boolean(value)\n  const setTrue = () => setValue(true)\n  const setFalse = () => setValue(false)\n\n  //Toggle value\n  const toggleValue = () => {\n    if (isValue.value) {\n      setTrue()\n    }\n    else {\n      setFalse()\n    }\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    isValue,\n\n    //Functions\n    setTrue,\n    setFalse,\n    setValue,\n    toggleValue,\n  }\n}\n","\n//Generic statuses\nexport const statuses = {\n  SUCCESS: 'success',\n  WARNING: 'warning',\n  DANGER: 'danger',\n  INFO: 'info',\n}\n\n//Status icons\nexport const statusIcons = {\n  [statuses.SUCCESS]: 'check_circle',\n  [statuses.WARNING]: 'warning',\n  [statuses.DANGER]: 'error',\n  [statuses.INFO]: 'info',\n}\n","import {defineStore} from 'pinia'\nimport {ref, unref} from 'vue'\nimport {statuses} from '@/constants/statuses.js'\n\n/**\n * Messages store\n */\nexport const useFlashMessagesStore = defineStore('flashMessages', () => {\n\n  //Container for flash messages\n  const flashMessages = ref([])\n\n  //Helper to generate a flash message object\n  const createFlashMessage = (text, type, timeout) => ({\n    id: Math.random().toString(36).substring(2, 9),\n    text: unref(text),\n    type: unref(type),\n    timeout: unref(timeout),\n  })\n\n  //Show message\n  const showFlashMessage = (text, type, timeout = 5000) => {\n\n    //Must have text\n    if (!text) {\n      return\n    }\n\n    //Unref timeout\n    timeout = unref(timeout)\n\n    //Create message object\n    const message = createFlashMessage(text, type, timeout)\n\n    //Add to container\n    flashMessages.value = [...flashMessages.value, message]\n\n    //Create timeout to hide message\n    if (timeout > 0) {\n      setTimeout(() => hideFlashMessage(message.id), timeout)\n    }\n\n    //Return the created message\n    return message\n  }\n\n  //Hide message by ID\n  const hideFlashMessage = messageId => {\n    flashMessages.value = flashMessages.value\n      .filter(message => message.id !== messageId)\n  }\n\n  //Convenience helpers\n  const setFlashSuccess = (text, timeout) => showFlashMessage(text, statuses.SUCCESS, timeout)\n  const setFlashFailure = (text, timeout) => showFlashMessage(text, statuses.DANGER, timeout)\n\n  //Expost interface\n  return {\n\n    //Flash messages container\n    flashMessages,\n\n    //Generic controls\n    showFlashMessage,\n    hideFlashMessage,\n\n    //Convenience helpers\n    setFlashSuccess,\n    setFlashFailure,\n    createFlashMessage,\n  }\n})\n","import {useFlashMessagesStore} from '@/store/flash-messages.store.js'\nimport {storeToRefs} from 'pinia'\n\n/**\n * Flash messages composable (convenience wrapper around the store)\n */\nexport function useFlashMessages() {\n\n  //Get refs and methods from store\n  const store = useFlashMessagesStore()\n  const {flashMessages} = storeToRefs(store)\n  const {\n    showFlashMessage,\n    hideFlashMessage,\n    setFlashSuccess,\n    setFlashFailure,\n    createFlashMessage,\n  } = store\n\n  //Expose reactive interface\n  return {\n    flashMessages,\n    showFlashMessage,\n    hideFlashMessage,\n    setFlashSuccess,\n    setFlashFailure,\n    createFlashMessage,\n  }\n}\n","import {useDocument} from '@/composables/use-document.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useEventListener} from '@vueuse/core'\nimport {ref, watchEffect} from 'vue'\n\n/**\n * Composable to manage legacy front-end quirks and features\n */\nexport function useLegacyFrontend() {\n\n  //Nav bar ref\n  const navBar = ref(document.getElementById('navbarNavDropdown'))\n  const navBarTimeout = ref(null)\n\n  //By default, the sidenav has a z-index to render it above any other elements.\n  //However, whenever we have a side panel with an overlay, we want to render the\n  //overlay above the entire page, including the nav bar, so we have to adjust it.\n  const adjustNavBarZIndex = overlay => {\n    watchEffect(() => {\n\n      //Overlay visible\n      if (overlay.value) {\n        clearTimeout(navBarTimeout.value)\n        navBar.value?.style.setProperty('z-index', 'auto')\n      }\n\n      //Wrap in timeout, to allow the animation of the overlay to finish\n      else {\n        navBarTimeout.value = setTimeout(() => {\n          navBar.value?.style.setProperty('z-index', '999')\n        }, 1000)\n      }\n    })\n  }\n\n  //Handle get started click\n  const handleGetStartedClick = handler => {\n    const button = document.getElementById('legacy--getStartedButton')\n    useEventListener(button, 'click', handler)\n  }\n\n  //Update header\n  const updateHeaderOnChange = () => {\n    const {setElementText} = useDocument()\n    const {header} = usePage()\n    watchEffect(() => {\n      if (header.value) {\n        setElementText('#app-header', header.value)\n      }\n    })\n  }\n\n  //Expose interface\n  return {\n    adjustNavBarZIndex,\n    handleGetStartedClick,\n    updateHeaderOnChange,\n  }\n}\n","<script setup>\nimport FlashMessageContainer from '@/components/shared/core/FlashMessageContainer.vue'\nimport FlashMessage from '@/components/shared/core/FlashMessage.vue'\nimport GetStartedModal from '@/components/shared/modals/GetStartedModal.vue'\nimport TermsOfServiceModal from '@/components/shared/modals/TermsOfServiceModal.vue'\nimport {useDocument} from '@/composables/use-document.js'\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useTimezoneDetection} from '@/composables/use-timezone-detection.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useLegacyFrontend} from '@/composables/use-legacy-frontend.js'\nimport {onBeforeMount, onMounted, watchEffect, computed} from 'vue'\nimport {dateIsWithinNumDays} from '@/helpers/date-and-time.js'\nimport {DateTime} from 'luxon'\n\n//Composables\nconst {getMetaTagContent, setDocumentTitle} = useDocument()\nconst {getFromLocalStorage, setInLocalStorage} = useLocalStorage()\nconst {flashMessages, hideFlashMessage} = useFlashMessages()\nconst {handleGetStartedClick, updateHeaderOnChange} = useLegacyFrontend()\nconst {registerGlobalErrorListeners} = useErrorHandling()\nconst {browserTimezone} = useTimezoneDetection()\nconst {isEmbeddedRoute} = useRouting()\nconst {title} = usePage()\nconst {env, origin, gitHash} = useEnv()\n\n//Register global error listeners\nregisterGlobalErrorListeners()\n\n//Current user\nconst {\n  user,\n  updateUser,\n  shouldShowGetStarted,\n} = useCurrentUser()\n\n//Get started modal handling\nconst {\n  isValue: isShowingGetStartedModal,\n  setTrue: showGetStartedModal,\n  setFalse: hideGetStartedModal,\n} = useValueToggle()\n\n//ToS modal handling\nconst tosDate = DateTime.fromISO('2022-09-22')\nconst shouldShowTos = computed(() => user.value && !user.value.sawTos && dateIsWithinNumDays(tosDate, 90))\nconst {\n  isValue: isShowingTosModal,\n  setTrue: showTosModal,\n  setFalse: hideTosModal,\n} = useValueToggle()\nconst updateUserAndHideTosModal = () => {\n  updateUser({sawTos: true})\n  hideTosModal()\n}\n\n//Update CSRF token in local storage if it's different from the one on the page\nonBeforeMount(() => {\n  const storedToken = getFromLocalStorage('csrfToken')\n  const pageToken = getMetaTagContent('csrf-token')\n  if (storedToken !== pageToken) {\n    setInLocalStorage('csrfToken', pageToken)\n  }\n})\n\n//Watch for title changes\nwatchEffect(() => {\n  setDocumentTitle(title.value)\n})\n\n//Check if we should show the get started modal\nwatchEffect(() => {\n  if (shouldShowGetStarted.value) {\n    showGetStartedModal()\n  }\n})\n\n//Check if we should show the terms of service modal\nwatchEffect(() => {\n  if (shouldShowTos.value) {\n    showTosModal()\n  }\n})\n\n//Update user timezone\nwatchEffect(() => {\n  if (user.value && !user.value.timezone && browserTimezone.value) {\n    updateUser({timezone: browserTimezone.value})\n  }\n})\n\n//Global on mount logic\nonMounted(() => {\n\n  //Log\n  console.log(`-------------------------------------------------------------`)\n  console.log(`Running in ${env.value} mode on ${origin.value} 🚀`)\n  console.log(`Version: ${gitHash.value}`)\n  console.log(`-------------------------------------------------------------`)\n\n  //Update header on change\n  updateHeaderOnChange()\n\n  //Ignore rest if embedded route\n  if (isEmbeddedRoute.value) {\n    return\n  }\n\n  //Handle get started button clicks\n  handleGetStartedClick(showGetStartedModal)\n})\n</script>\n\n<template>\n  <div :class=\"$style.app\">\n    <RouterView />\n\n    <FlashMessageContainer>\n      <FlashMessage\n        v-for=\"message in flashMessages\"\n        :key=\"message.id\"\n        :text=\"message.text\"\n        :type=\"message.type\"\n        :is-static=\"!message.timeout\"\n        @close=\"hideFlashMessage(message.id)\"\n      />\n    </FlashMessageContainer>\n\n    <GetStartedModal\n      :is-open=\"isShowingGetStartedModal\"\n      @close=\"hideGetStartedModal()\"\n    />\n    <TermsOfServiceModal\n      :is-open=\"isShowingTosModal\"\n      :date=\"tosDate\"\n      @close=\"updateUserAndHideTosModal()\"\n    />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.app {\n  display: block;\n}\n</style>\n","<template>\n  <Transition\n    :enter-active-class=\"$style.from\"\n    :leave-active-class=\"$style.from\"\n    :enter-from-class=\"$style.to\"\n    :leave-to-class=\"$style.to\"\n    appear\n  >\n    <slot />\n  </Transition>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: opacity var(--transition-cubic);\n}\n.to {\n  opacity: 0;\n}\n</style>\n","<script setup>\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport {useEmptySlotsCheck} from '@/composables/use-empty-slots-check.js'\nimport {useLegacyFrontend} from '@/composables/use-legacy-frontend.js'\nimport {ref} from 'vue'\n\n//Adjust nav bar Z index when overlay is present\nconst overlay = ref(null)\nconst {adjustNavBarZIndex} = useLegacyFrontend()\nadjustNavBarZIndex(overlay)\n\n//Check if default slot is empty\nconst {isSlotEmpty} = useEmptySlotsCheck()\n</script>\n\n<template>\n  <div :class=\"$style.wrapper\">\n    <Transition\n      :enter-active-class=\"$style.from\"\n      :leave-active-class=\"$style.from\"\n      :enter-from-class=\"$style.to\"\n      :leave-to-class=\"$style.to\"\n      appear\n    >\n      <slot />\n    </Transition>\n    <TransitionFadeIn>\n      <div\n        v-if=\"!isSlotEmpty\"\n        ref=\"overlay\"\n        :class=\"$style.overlay\"\n        class=\"sidepanel-overlay\"\n      />\n    </TransitionFadeIn>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  position: fixed;\n}\n.overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: var(--bg-overlays);\n  z-index: 1;\n}\n\n/* Transition */\n.from {\n  transition: all var(--transition-cubic);\n}\n.to {\n  transform: translateX(100%);\n}\n</style>\n","<script setup>\nconst emit = defineEmits([\n  'edit',\n  'click',\n])\nconst props = defineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  subheader: {\n    type: String,\n    default: '',\n  },\n  isCollapsed: {\n    type: Boolean,\n    default: false,\n  },\n  isRequired: {\n    type: Boolean,\n    default: false,\n  },\n  isEditable: {\n    type: Boolean,\n    default: false,\n  },\n  isClickable: {\n    type: Boolean,\n    default: false,\n  },\n})\n\nconst handleClick = (event) => {\n  if (props.isClickable) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <header\n    :class=\"{\n      [$style.wrapper]: true,\n      [$style.clickable]: isClickable,\n    }\"\n    @click=\"handleClick($event)\"\n  >\n    <div :class=\"$style.main\">\n      <div :class=\"$style.header\">\n        <h4\n          :is-clickable=\"isEditable\"\n          :test-id=\"isEditable ? 'editableHeader' : undefined\"\n          @click=\"$emit('edit')\"\n        >\n          <slot name=\"headerText\">\n            {{ header }}\n            <span\n              v-if=\"isRequired && !isCollapsed\"\n              :class=\"$style.required\"\n            >*</span>\n          </slot>\n        </h4>\n        <slot name=\"headerIcons\" />\n      </div>\n      <div\n        v-if=\"subheader || $slots.subheaderText\"\n        :class=\"$style.subheader\"\n      >\n        <slot name=\"subheaderText\">\n          {{ subheader }}\n        </slot>\n      </div>\n    </div>\n    <aside\n      v-if=\"$slots.aside && !isCollapsed\"\n      :class=\"$style.aside\"\n    >\n      <slot name=\"aside\" />\n    </aside>\n  </header>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  display: flex;\n  align-items: flex-start;\n  &.clickable {\n    cursor: pointer;\n  }\n}\n.main {\n  position: relative;\n  flex: 1;\n}\n.header {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  h4 {\n    margin: 0;\n  }\n}\n.subheader {\n  font-size: 0.75rem;\n  color: var(--color-text-muted);\n  margin-top: 0.25rem;\n}\n.required {\n  color: var(--color-text-danger);\n}\n.aside {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  height: 100%;\n  padding-left: 0.5rem;\n}\n</style>\n","import {unref} from 'vue'\n\n/**\n * Scroll into view composable\n */\nexport function useScrollIntoView() {\n\n  //Scroll into view\n  const scrollIntoView = (element, options = {}) => {\n\n    //Unref\n    element = unref(element)\n    if (!element) {\n      return\n    }\n\n    //Extract options\n    const {\n      behavior = 'smooth',\n      block = 'start',\n      inline = 'nearest',\n    } = options\n\n    //Vue component\n    if (element.$el) {\n      element = element.$el\n    }\n\n    //Scroll into view\n    if (typeof element.scrollIntoView === 'function') {\n      element.scrollIntoView({behavior, block, inline})\n    }\n  }\n\n  //Expose interface\n  return {\n    scrollIntoView,\n  }\n}\n","<script setup>\nimport PageBlockHeader from './PageBlockHeader.vue'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\nimport {toRefs, ref, onMounted} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  subheader: {\n    type: String,\n    default: '',\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  isCollapsed: {\n    type: Boolean,\n    default: false,\n  },\n  isRequired: {\n    type: Boolean,\n    default: false,\n  },\n  autoScrollIntoView: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Scroll into view\nconst {autoScrollIntoView} = toRefs(props)\nconst {scrollIntoView} = useScrollIntoView()\nconst block = ref(null)\nonMounted(() => {\n  if (autoScrollIntoView.value) {\n    scrollIntoView(block)\n  }\n})\n\n//Expose method to scroll into view\ndefineExpose({\n  scrollIntoView() {\n    scrollIntoView(block)\n  },\n})\n</script>\n\n<template>\n  <div\n    ref=\"block\"\n    :class=\"{\n      [$style.block]: true,\n      [$style.compact]: isCompact,\n    }\"\n  >\n    <div\n      v-if=\"header || $slots.header || $slots.headerText\"\n      :class=\"{\n        [$style.header]: true,\n        [$style.collapsed]: isCollapsed,\n      }\"\n    >\n      <slot name=\"header\">\n        <PageBlockHeader\n          :is-collapsed=\"isCollapsed\"\n          :is-required=\"isRequired\"\n        >\n          <template #headerText>\n            <slot name=\"headerText\">\n              {{ header }}\n            </slot>\n          </template>\n          <template #subheaderText>\n            <slot name=\"subheaderText\">\n              {{ subheader }}\n            </slot>\n          </template>\n          <template #aside>\n            <slot name=\"headerAside\" />\n          </template>\n        </PageBlockHeader>\n      </slot>\n    </div>\n    <div v-if=\"!isCollapsed\">\n      <slot />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.block {\n  padding: 1.5rem;\n  border: 1px solid var(--color-borders);\n  background: var(--color-white);\n  border-radius: var(--border-radius-m);\n  @media (min-width: 768px) {\n    padding: 2rem;\n  }\n  & + & {\n    margin-top: 3rem;\n  }\n  &.compact {\n    padding: 1rem 1.5rem;\n    & + & {\n      margin-top: 1rem;\n    }\n  }\n}\n.header {\n  margin-bottom: 1rem;\n  padding-bottom: 0.5rem;\n  font-weight: 500;\n  border-bottom: 1px solid var(--color-borders);\n  &.collapsed {\n    margin: 0;\n    padding: 0;\n    border: none;\n  }\n}\n</style>\n","<template>\n  <menu :class=\"$style.menu\">\n    <slot />\n  </menu>\n</template>\n\n<style module lang=\"scss\">\n.menu {\n  display: flex;\n  align-items: flex-end;\n  flex-wrap: wrap;\n  gap: 2rem;\n  margin-bottom: 1.5rem;\n  border-bottom: 1px solid var(--color-borders);\n  &:not(:first-child) {\n    margin-top: 1.5rem;\n  }\n}\n</style>\n","<script setup>\nimport TabMenu from './TabMenu.vue'\nimport TabMenuItem from './TabMenuItem.vue'\nimport {openUrl} from '@/helpers/url.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {toRefs, watch, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-tab',\n])\nconst props = defineProps({\n  tabs: {\n    type: Array,\n    required: true,\n  },\n  activeTab: {\n    type: Object,\n    default: null,\n  },\n  isLarge: {\n    type: Boolean,\n    required: false,\n  },\n  withAutoRouting: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Current user and organization\nconst {userId} = useCurrentUser()\nconst {organizationId} = useCurrentOrganization()\n\n//Routing\nconst {route, routeParams, pushRoute, replaceRoute} = useRouting()\nconst {tabs, activeTab, withAutoRouting} = toRefs(props)\n\n//Change tab\nconst changeTab = (tab, event) => {\n\n  //Plain link? Just open the page\n  if (tab.href) {\n    const href = tab.href\n      .replace(':userId', userId.value)\n      .replace(':orgId', organizationId.value)\n    return openUrl(href, null, event?.ctrlKey || event?.metaKey)\n  }\n\n  //Emit event\n  emit('change-tab', {tab})\n}\n\n//Change the route when a different tab is selected\nwatch(activeTab, tab => {\n  if (withAutoRouting.value && routeParams.value.tab !== tab.key) {\n    pushRoute({params: {tab: tab.key}})\n  }\n})\n\n//Change the tab when the route changes\nwatch(route, () => {\n  if (withAutoRouting.value) {\n    const key = routeParams.value.tab\n    const tab = tabs.value.find(tab => tab.key === key)\n    if (typeof key !== 'undefined' && tab && activeTab.value !== tab) {\n      changeTab(tab)\n    }\n  }\n}, {immediate: true})\n\n//On mount, update the route if needed\nonMounted(() => {\n  if (withAutoRouting.value && !routeParams.value.tab && activeTab.value) {\n    replaceRoute({params: {tab: activeTab.value.key}})\n  }\n})\n</script>\n\n<template>\n  <TabMenu v-bind=\"$attrs\">\n    <TabMenuItem\n      v-for=\"tab in tabs\"\n      :key=\"tab.key\"\n      :test-id=\"`tabMenuItem_${tab.key}`\"\n      :label=\"tab.label\"\n      :is-large=\"isLarge\"\n      :is-active=\"activeTab === tab\"\n      @click=\"changeTab(tab, $event)\"\n    />\n  </TabMenu>\n</template>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  type: {\n    type: String,\n    default: 'info',\n  },\n  text: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  isSpaced: {\n    type: Boolean,\n    default: false,\n  },\n  fitContent: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Extract props\nconst {type, icon} = toRefs(props)\n\n//Actual icon\nconst actualIcon = computed(() => {\n  if (icon.value) {\n    return icon.value\n  }\n  switch (type.value) {\n    case 'success':\n      return 'check_circle'\n    case 'warning':\n      return 'warning'\n    case 'danger':\n      return 'error'\n    case 'info':\n      return 'info'\n    default:\n      return ''\n  }\n})\n</script>\n\n<template>\n  <div\n    :class=\"{\n      [$style.message]: true,\n      [$style.spaced]: isSpaced,\n      [$style.fitContent]: fitContent,\n      [$style[type]]: !!type\n    }\"\n  >\n    <slot name=\"contents\">\n      <Icon\n        v-if=\"actualIcon\"\n        :icon=\"actualIcon\"\n        size=\"s\"\n        :class=\"$style.icon\"\n        is-outlined\n      />\n      <span>\n        <slot>{{ text }}</slot>\n      </span>\n    </slot>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.message {\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 0.5rem;\n  padding: 0.5rem 1rem;\n  border: 2px solid var(--color-borders);\n  border-radius: var(--border-radius-m);\n  &.fitContent {\n    width: fit-content;\n  }\n  &.spaced {\n    padding: 1rem;\n    justify-content: flex-start;\n  }\n  &:not(:first-child) {\n    margin-top: 1rem;\n  }\n  &.success {\n    border-color: var(--color-borders-success);\n    background-color: var(--bg-status-success);\n    color: var(--color-text-success);\n    .icon {\n      color: var(--color-text-success);\n    }\n  }\n  &.warning {\n    border-color: var(--color-borders-warning);\n    background-color: var(--bg-status-warning);\n    color: var(--color-text-warning);\n    .icon {\n      color: var(--color-text-warning);\n    }\n  }\n  &.danger {\n    border-color: var(--color-borders-danger);\n    background-color: var(--bg-status-danger);\n    color: var(--color-text-danger);\n    .icon {\n      color: var(--color-text-danger);\n    }\n  }\n  &.info {\n    border-color: var(--color-borders-info);\n    background-color: var(--bg-status-info);\n    color: var(--color-text-info);\n    .icon {\n      color: var(--color-text-info);\n    }\n  }\n}\n</style>\n","<script setup>\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  error: {\n    type: [Error, Object, String],\n    default: '',\n  },\n})\n\n//Determine error message\nconst {error} = toRefs(props)\nconst message = computed(() => {\n  if (error.value instanceof Error) {\n    return error.value.message\n  }\n  else if (typeof error.value === 'object') {\n    return error.value.message || error.value.$message || ''\n  }\n  return error.value\n})\n\n//Normalized message\nconst normalizedMessage = computed(() => {\n  if (message.value === 'Request failed with status code 500') {\n    return 'An unexpected server error occurred'\n  }\n  else if (message.value === 'Request failed with status code 401') {\n    return 'You are not authorized to perform this action'\n  }\n  return message.value\n})\n</script>\n\n<template>\n  <span :class=\"$style.error\">{{ normalizedMessage }}</span>\n</template>\n\n<style module lang=\"scss\">\n.error {\n  color: var(--color-text-danger);\n}\n</style>\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n  x: v,\n  y: v\n});\nconst oppositeSideMap = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n  start: 'end',\n  end: 'start'\n};\nfunction clamp(start, value, end) {\n  return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n  return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n  return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n  return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n  return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n  return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n  return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n  if (rtl === void 0) {\n    rtl = false;\n  }\n  const alignment = getAlignment(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const length = getAxisLength(alignmentAxis);\n  let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n  if (rects.reference[length] > rects.floating[length]) {\n    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n  }\n  return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n  const oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n  const lr = ['left', 'right'];\n  const rl = ['right', 'left'];\n  const tb = ['top', 'bottom'];\n  const bt = ['bottom', 'top'];\n  switch (side) {\n    case 'top':\n    case 'bottom':\n      if (rtl) return isStart ? rl : lr;\n      return isStart ? lr : rl;\n    case 'left':\n    case 'right':\n      return isStart ? tb : bt;\n    default:\n      return [];\n  }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n  const alignment = getAlignment(placement);\n  let list = getSideList(getSide(placement), direction === 'start', rtl);\n  if (alignment) {\n    list = list.map(side => side + \"-\" + alignment);\n    if (flipAlignment) {\n      list = list.concat(list.map(getOppositeAlignmentPlacement));\n    }\n  }\n  return list;\n}\nfunction getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0,\n    ...padding\n  };\n}\nfunction getPaddingObject(padding) {\n  return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n    top: padding,\n    right: padding,\n    bottom: padding,\n    left: padding\n  };\n}\nfunction rectToClientRect(rect) {\n  const {\n    x,\n    y,\n    width,\n    height\n  } = rect;\n  return {\n    width,\n    height,\n    top: y,\n    left: x,\n    right: x + width,\n    bottom: y + height,\n    x,\n    y\n  };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n  let {\n    reference,\n    floating\n  } = _ref;\n  const sideAxis = getSideAxis(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const alignLength = getAxisLength(alignmentAxis);\n  const side = getSide(placement);\n  const isVertical = sideAxis === 'y';\n  const commonX = reference.x + reference.width / 2 - floating.width / 2;\n  const commonY = reference.y + reference.height / 2 - floating.height / 2;\n  const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n  let coords;\n  switch (side) {\n    case 'top':\n      coords = {\n        x: commonX,\n        y: reference.y - floating.height\n      };\n      break;\n    case 'bottom':\n      coords = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n    case 'right':\n      coords = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n    case 'left':\n      coords = {\n        x: reference.x - floating.width,\n        y: commonY\n      };\n      break;\n    default:\n      coords = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n  switch (getAlignment(placement)) {\n    case 'start':\n      coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n    case 'end':\n      coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n  }\n  return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n  const {\n    placement = 'bottom',\n    strategy = 'absolute',\n    middleware = [],\n    platform\n  } = config;\n  const validMiddleware = middleware.filter(Boolean);\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n  let rects = await platform.getElementRects({\n    reference,\n    floating,\n    strategy\n  });\n  let {\n    x,\n    y\n  } = computeCoordsFromPlacement(rects, placement, rtl);\n  let statefulPlacement = placement;\n  let middlewareData = {};\n  let resetCount = 0;\n  for (let i = 0; i < validMiddleware.length; i++) {\n    const {\n      name,\n      fn\n    } = validMiddleware[i];\n    const {\n      x: nextX,\n      y: nextY,\n      data,\n      reset\n    } = await fn({\n      x,\n      y,\n      initialPlacement: placement,\n      placement: statefulPlacement,\n      strategy,\n      middlewareData,\n      rects,\n      platform,\n      elements: {\n        reference,\n        floating\n      }\n    });\n    x = nextX != null ? nextX : x;\n    y = nextY != null ? nextY : y;\n    middlewareData = {\n      ...middlewareData,\n      [name]: {\n        ...middlewareData[name],\n        ...data\n      }\n    };\n    if (reset && resetCount <= 50) {\n      resetCount++;\n      if (typeof reset === 'object') {\n        if (reset.placement) {\n          statefulPlacement = reset.placement;\n        }\n        if (reset.rects) {\n          rects = reset.rects === true ? await platform.getElementRects({\n            reference,\n            floating,\n            strategy\n          }) : reset.rects;\n        }\n        ({\n          x,\n          y\n        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n      }\n      i = -1;\n    }\n  }\n  return {\n    x,\n    y,\n    placement: statefulPlacement,\n    strategy,\n    middlewareData\n  };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n  var _await$platform$isEle;\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    x,\n    y,\n    platform,\n    rects,\n    elements,\n    strategy\n  } = state;\n  const {\n    boundary = 'clippingAncestors',\n    rootBoundary = 'viewport',\n    elementContext = 'floating',\n    altBoundary = false,\n    padding = 0\n  } = evaluate(options, state);\n  const paddingObject = getPaddingObject(padding);\n  const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n  const element = elements[altBoundary ? altContext : elementContext];\n  const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n    boundary,\n    rootBoundary,\n    strategy\n  }));\n  const rect = elementContext === 'floating' ? {\n    x,\n    y,\n    width: rects.floating.width,\n    height: rects.floating.height\n  } : rects.reference;\n  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n    x: 1,\n    y: 1\n  } : {\n    x: 1,\n    y: 1\n  };\n  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  }) : rect);\n  return {\n    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n  };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n  name: 'arrow',\n  options,\n  async fn(state) {\n    const {\n      x,\n      y,\n      placement,\n      rects,\n      platform,\n      elements,\n      middlewareData\n    } = state;\n    // Since `element` is required, we don't Partial<> the type.\n    const {\n      element,\n      padding = 0\n    } = evaluate(options, state) || {};\n    if (element == null) {\n      return {};\n    }\n    const paddingObject = getPaddingObject(padding);\n    const coords = {\n      x,\n      y\n    };\n    const axis = getAlignmentAxis(placement);\n    const length = getAxisLength(axis);\n    const arrowDimensions = await platform.getDimensions(element);\n    const isYAxis = axis === 'y';\n    const minProp = isYAxis ? 'top' : 'left';\n    const maxProp = isYAxis ? 'bottom' : 'right';\n    const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n    const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n    const startDiff = coords[axis] - rects.reference[axis];\n    const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n    let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n    // DOM platform can return `window` as the `offsetParent`.\n    if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n      clientSize = elements.floating[clientProp] || rects.floating[length];\n    }\n    const centerToReference = endDiff / 2 - startDiff / 2;\n\n    // If the padding is large enough that it causes the arrow to no longer be\n    // centered, modify the padding so that it is centered.\n    const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n    const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n    const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n    // Make sure the arrow doesn't overflow the floating element if the center\n    // point is outside the floating element's bounds.\n    const min$1 = minPadding;\n    const max = clientSize - arrowDimensions[length] - maxPadding;\n    const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n    const offset = clamp(min$1, center, max);\n\n    // If the reference is small enough that the arrow's padding causes it to\n    // to point to nothing for an aligned placement, adjust the offset of the\n    // floating element itself. To ensure `shift()` continues to take action,\n    // a single reset is performed when this is true.\n    const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n    const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n    return {\n      [axis]: coords[axis] + alignmentOffset,\n      data: {\n        [axis]: offset,\n        centerOffset: center - offset - alignmentOffset,\n        ...(shouldAddOffset && {\n          alignmentOffset\n        })\n      },\n      reset: shouldAddOffset\n    };\n  }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n  return allowedPlacementsSortedByAlignment.filter(placement => {\n    if (alignment) {\n      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n    }\n    return true;\n  });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'autoPlacement',\n    options,\n    async fn(state) {\n      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n      const {\n        rects,\n        middlewareData,\n        placement,\n        platform,\n        elements\n      } = state;\n      const {\n        crossAxis = false,\n        alignment,\n        allowedPlacements = placements,\n        autoAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n      const currentPlacement = placements$1[currentIndex];\n      if (currentPlacement == null) {\n        return {};\n      }\n      const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n      // Make `computeCoords` start from the right place.\n      if (placement !== currentPlacement) {\n        return {\n          reset: {\n            placement: placements$1[0]\n          }\n        };\n      }\n      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n      const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n        placement: currentPlacement,\n        overflows: currentOverflows\n      }];\n      const nextPlacement = placements$1[currentIndex + 1];\n\n      // There are more placements to check.\n      if (nextPlacement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: nextPlacement\n          }\n        };\n      }\n      const placementsSortedByMostSpace = allOverflows.map(d => {\n        const alignment = getAlignment(d.placement);\n        return [d.placement, alignment && crossAxis ?\n        // Check along the mainAxis and main crossAxis side.\n        d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n        // Check only the mainAxis.\n        d.overflows[0], d.overflows];\n      }).sort((a, b) => a[1] - b[1]);\n      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n      // Aligned placements should not check their opposite crossAxis\n      // side.\n      getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n      if (resetPlacement !== placement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: resetPlacement\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'flip',\n    options,\n    async fn(state) {\n      var _middlewareData$arrow, _middlewareData$flip;\n      const {\n        placement,\n        middlewareData,\n        rects,\n        initialPlacement,\n        platform,\n        elements\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true,\n        fallbackPlacements: specifiedFallbackPlacements,\n        fallbackStrategy = 'bestFit',\n        fallbackAxisSideDirection = 'none',\n        flipAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n\n      // If a reset by the arrow was caused due to an alignment offset being\n      // added, we should skip any logic now since `flip()` has already done its\n      // work.\n      // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n      if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      const side = getSide(placement);\n      const initialSideAxis = getSideAxis(initialPlacement);\n      const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n      const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n      const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n      const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n      if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n        fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n      }\n      const placements = [initialPlacement, ...fallbackPlacements];\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const overflows = [];\n      let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n      if (checkMainAxis) {\n        overflows.push(overflow[side]);\n      }\n      if (checkCrossAxis) {\n        const sides = getAlignmentSides(placement, rects, rtl);\n        overflows.push(overflow[sides[0]], overflow[sides[1]]);\n      }\n      overflowsData = [...overflowsData, {\n        placement,\n        overflows\n      }];\n\n      // One or more sides is overflowing.\n      if (!overflows.every(side => side <= 0)) {\n        var _middlewareData$flip2, _overflowsData$filter;\n        const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n        const nextPlacement = placements[nextIndex];\n        if (nextPlacement) {\n          // Try next placement and re-run the lifecycle.\n          return {\n            data: {\n              index: nextIndex,\n              overflows: overflowsData\n            },\n            reset: {\n              placement: nextPlacement\n            }\n          };\n        }\n\n        // First, find the candidates that fit on the mainAxis side of overflow,\n        // then find the placement that fits the best on the main crossAxis side.\n        let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n        // Otherwise fallback.\n        if (!resetPlacement) {\n          switch (fallbackStrategy) {\n            case 'bestFit':\n              {\n                var _overflowsData$filter2;\n                const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n                  if (hasFallbackAxisSideDirection) {\n                    const currentSideAxis = getSideAxis(d.placement);\n                    return currentSideAxis === initialSideAxis ||\n                    // Create a bias to the `y` side axis due to horizontal\n                    // reading directions favoring greater width.\n                    currentSideAxis === 'y';\n                  }\n                  return true;\n                }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n                if (placement) {\n                  resetPlacement = placement;\n                }\n                break;\n              }\n            case 'initialPlacement':\n              resetPlacement = initialPlacement;\n              break;\n          }\n        }\n        if (placement !== resetPlacement) {\n          return {\n            reset: {\n              placement: resetPlacement\n            }\n          };\n        }\n      }\n      return {};\n    }\n  };\n};\n\nfunction getSideOffsets(overflow, rect) {\n  return {\n    top: overflow.top - rect.height,\n    right: overflow.right - rect.width,\n    bottom: overflow.bottom - rect.height,\n    left: overflow.left - rect.width\n  };\n}\nfunction isAnySideFullyClipped(overflow) {\n  return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'hide',\n    options,\n    async fn(state) {\n      const {\n        rects\n      } = state;\n      const {\n        strategy = 'referenceHidden',\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      switch (strategy) {\n        case 'referenceHidden':\n          {\n            const overflow = await detectOverflow(state, {\n              ...detectOverflowOptions,\n              elementContext: 'reference'\n            });\n            const offsets = getSideOffsets(overflow, rects.reference);\n            return {\n              data: {\n                referenceHiddenOffsets: offsets,\n                referenceHidden: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        case 'escaped':\n          {\n            const overflow = await detectOverflow(state, {\n              ...detectOverflowOptions,\n              altBoundary: true\n            });\n            const offsets = getSideOffsets(overflow, rects.floating);\n            return {\n              data: {\n                escapedOffsets: offsets,\n                escaped: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        default:\n          {\n            return {};\n          }\n      }\n    }\n  };\n};\n\nfunction getBoundingRect(rects) {\n  const minX = min(...rects.map(rect => rect.left));\n  const minY = min(...rects.map(rect => rect.top));\n  const maxX = max(...rects.map(rect => rect.right));\n  const maxY = max(...rects.map(rect => rect.bottom));\n  return {\n    x: minX,\n    y: minY,\n    width: maxX - minX,\n    height: maxY - minY\n  };\n}\nfunction getRectsByLine(rects) {\n  const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n  const groups = [];\n  let prevRect = null;\n  for (let i = 0; i < sortedRects.length; i++) {\n    const rect = sortedRects[i];\n    if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n      groups.push([rect]);\n    } else {\n      groups[groups.length - 1].push(rect);\n    }\n    prevRect = rect;\n  }\n  return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'inline',\n    options,\n    async fn(state) {\n      const {\n        placement,\n        elements,\n        rects,\n        platform,\n        strategy\n      } = state;\n      // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n      // ClientRect's bounds, despite the event listener being triggered. A\n      // padding of 2 seems to handle this issue.\n      const {\n        padding = 2,\n        x,\n        y\n      } = evaluate(options, state);\n      const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n      const clientRects = getRectsByLine(nativeClientRects);\n      const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n      const paddingObject = getPaddingObject(padding);\n      function getBoundingClientRect() {\n        // There are two rects and they are disjoined.\n        if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n          // Find the first rect in which the point is fully inside.\n          return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n        }\n\n        // There are 2 or more connected rects.\n        if (clientRects.length >= 2) {\n          if (getSideAxis(placement) === 'y') {\n            const firstRect = clientRects[0];\n            const lastRect = clientRects[clientRects.length - 1];\n            const isTop = getSide(placement) === 'top';\n            const top = firstRect.top;\n            const bottom = lastRect.bottom;\n            const left = isTop ? firstRect.left : lastRect.left;\n            const right = isTop ? firstRect.right : lastRect.right;\n            const width = right - left;\n            const height = bottom - top;\n            return {\n              top,\n              bottom,\n              left,\n              right,\n              width,\n              height,\n              x: left,\n              y: top\n            };\n          }\n          const isLeftSide = getSide(placement) === 'left';\n          const maxRight = max(...clientRects.map(rect => rect.right));\n          const minLeft = min(...clientRects.map(rect => rect.left));\n          const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n          const top = measureRects[0].top;\n          const bottom = measureRects[measureRects.length - 1].bottom;\n          const left = minLeft;\n          const right = maxRight;\n          const width = right - left;\n          const height = bottom - top;\n          return {\n            top,\n            bottom,\n            left,\n            right,\n            width,\n            height,\n            x: left,\n            y: top\n          };\n        }\n        return fallback;\n      }\n      const resetRects = await platform.getElementRects({\n        reference: {\n          getBoundingClientRect\n        },\n        floating: elements.floating,\n        strategy\n      });\n      if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n        return {\n          reset: {\n            rects: resetRects\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n  const {\n    placement,\n    platform,\n    elements\n  } = state;\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n  const side = getSide(placement);\n  const alignment = getAlignment(placement);\n  const isVertical = getSideAxis(placement) === 'y';\n  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n  const crossAxisMulti = rtl && isVertical ? -1 : 1;\n  const rawValue = evaluate(options, state);\n\n  // eslint-disable-next-line prefer-const\n  let {\n    mainAxis,\n    crossAxis,\n    alignmentAxis\n  } = typeof rawValue === 'number' ? {\n    mainAxis: rawValue,\n    crossAxis: 0,\n    alignmentAxis: null\n  } : {\n    mainAxis: 0,\n    crossAxis: 0,\n    alignmentAxis: null,\n    ...rawValue\n  };\n  if (alignment && typeof alignmentAxis === 'number') {\n    crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n  }\n  return isVertical ? {\n    x: crossAxis * crossAxisMulti,\n    y: mainAxis * mainAxisMulti\n  } : {\n    x: mainAxis * mainAxisMulti,\n    y: crossAxis * crossAxisMulti\n  };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n  if (options === void 0) {\n    options = 0;\n  }\n  return {\n    name: 'offset',\n    options,\n    async fn(state) {\n      var _middlewareData$offse, _middlewareData$arrow;\n      const {\n        x,\n        y,\n        placement,\n        middlewareData\n      } = state;\n      const diffCoords = await convertValueToCoords(state, options);\n\n      // If the placement is the same and the arrow caused an alignment offset\n      // then we don't need to change the positioning coordinates.\n      if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      return {\n        x: x + diffCoords.x,\n        y: y + diffCoords.y,\n        data: {\n          ...diffCoords,\n          placement\n        }\n      };\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'shift',\n    options,\n    async fn(state) {\n      const {\n        x,\n        y,\n        placement\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = false,\n        limiter = {\n          fn: _ref => {\n            let {\n              x,\n              y\n            } = _ref;\n            return {\n              x,\n              y\n            };\n          }\n        },\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const crossAxis = getSideAxis(getSide(placement));\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      if (checkMainAxis) {\n        const minSide = mainAxis === 'y' ? 'top' : 'left';\n        const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n        const min = mainAxisCoord + overflow[minSide];\n        const max = mainAxisCoord - overflow[maxSide];\n        mainAxisCoord = clamp(min, mainAxisCoord, max);\n      }\n      if (checkCrossAxis) {\n        const minSide = crossAxis === 'y' ? 'top' : 'left';\n        const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n        const min = crossAxisCoord + overflow[minSide];\n        const max = crossAxisCoord - overflow[maxSide];\n        crossAxisCoord = clamp(min, crossAxisCoord, max);\n      }\n      const limitedCoords = limiter.fn({\n        ...state,\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      });\n      return {\n        ...limitedCoords,\n        data: {\n          x: limitedCoords.x - x,\n          y: limitedCoords.y - y\n        }\n      };\n    }\n  };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    options,\n    fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        rects,\n        middlewareData\n      } = state;\n      const {\n        offset = 0,\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const crossAxis = getSideAxis(placement);\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      const rawOffset = evaluate(offset, state);\n      const computedOffset = typeof rawOffset === 'number' ? {\n        mainAxis: rawOffset,\n        crossAxis: 0\n      } : {\n        mainAxis: 0,\n        crossAxis: 0,\n        ...rawOffset\n      };\n      if (checkMainAxis) {\n        const len = mainAxis === 'y' ? 'height' : 'width';\n        const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n        const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n        if (mainAxisCoord < limitMin) {\n          mainAxisCoord = limitMin;\n        } else if (mainAxisCoord > limitMax) {\n          mainAxisCoord = limitMax;\n        }\n      }\n      if (checkCrossAxis) {\n        var _middlewareData$offse, _middlewareData$offse2;\n        const len = mainAxis === 'y' ? 'width' : 'height';\n        const isOriginSide = ['top', 'left'].includes(getSide(placement));\n        const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n        const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n        if (crossAxisCoord < limitMin) {\n          crossAxisCoord = limitMin;\n        } else if (crossAxisCoord > limitMax) {\n          crossAxisCoord = limitMax;\n        }\n      }\n      return {\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      };\n    }\n  };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'size',\n    options,\n    async fn(state) {\n      const {\n        placement,\n        rects,\n        platform,\n        elements\n      } = state;\n      const {\n        apply = () => {},\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const overflow = await detectOverflow(state, detectOverflowOptions);\n      const side = getSide(placement);\n      const alignment = getAlignment(placement);\n      const isYAxis = getSideAxis(placement) === 'y';\n      const {\n        width,\n        height\n      } = rects.floating;\n      let heightSide;\n      let widthSide;\n      if (side === 'top' || side === 'bottom') {\n        heightSide = side;\n        widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n      } else {\n        widthSide = side;\n        heightSide = alignment === 'end' ? 'top' : 'bottom';\n      }\n      const maximumClippingHeight = height - overflow.top - overflow.bottom;\n      const maximumClippingWidth = width - overflow.left - overflow.right;\n      const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n      const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n      const noShift = !state.middlewareData.shift;\n      let availableHeight = overflowAvailableHeight;\n      let availableWidth = overflowAvailableWidth;\n      if (isYAxis) {\n        availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n      } else {\n        availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n      }\n      if (noShift && !alignment) {\n        const xMin = max(overflow.left, 0);\n        const xMax = max(overflow.right, 0);\n        const yMin = max(overflow.top, 0);\n        const yMax = max(overflow.bottom, 0);\n        if (isYAxis) {\n          availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n        } else {\n          availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n        }\n      }\n      await apply({\n        ...state,\n        availableWidth,\n        availableHeight\n      });\n      const nextDimensions = await platform.getDimensions(elements.floating);\n      if (width !== nextDimensions.width || height !== nextDimensions.height) {\n        return {\n          reset: {\n            rects: true\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || '').toLowerCase();\n  }\n  // Mocked nodes in testing environments may not be instances of Node. By\n  // returning `#document` an infinite loop won't occur.\n  // https://github.com/floating-ui/floating-ui/issues/2317\n  return '#document';\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  // Browsers without `ShadowRoot` support.\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n  return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n  return [':popover-open', ':modal'].some(selector => {\n    try {\n      return element.matches(selector);\n    } catch (e) {\n      return false;\n    }\n  });\n}\nfunction isContainingBlock(elementOrCss) {\n  const webkit = isWebKit();\n  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else if (isTopLayer(currentNode)) {\n      return null;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (typeof CSS === 'undefined' || !CSS.supports) return false;\n  return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n  return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.scrollX,\n    scrollTop: element.scrollY\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === 'html') {\n    return node;\n  }\n  const result =\n  // Step into the shadow DOM of the parent of a slotted node.\n  node.assignedSlot ||\n  // DOM Element detected.\n  node.parentNode ||\n  // ShadowRoot detected.\n  isShadowRoot(node) && node.host ||\n  // Fallback.\n  getDocumentElement(node);\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    const frameElement = getFrameElement(win);\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n  }\n  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n  const css = getComputedStyle(element);\n  // In testing environments, the `width` and `height` properties are empty\n  // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n  let width = parseFloat(css.width) || 0;\n  let height = parseFloat(css.height) || 0;\n  const hasOffset = isHTMLElement(element);\n  const offsetWidth = hasOffset ? element.offsetWidth : width;\n  const offsetHeight = hasOffset ? element.offsetHeight : height;\n  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n  if (shouldFallback) {\n    width = offsetWidth;\n    height = offsetHeight;\n  }\n  return {\n    width,\n    height,\n    $: shouldFallback\n  };\n}\n\nfunction unwrapElement(element) {\n  return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n  const domElement = unwrapElement(element);\n  if (!isHTMLElement(domElement)) {\n    return createCoords(1);\n  }\n  const rect = domElement.getBoundingClientRect();\n  const {\n    width,\n    height,\n    $\n  } = getCssDimensions(domElement);\n  let x = ($ ? round(rect.width) : rect.width) / width;\n  let y = ($ ? round(rect.height) : rect.height) / height;\n\n  // 0, NaN, or Infinity should always fallback to 1.\n\n  if (!x || !Number.isFinite(x)) {\n    x = 1;\n  }\n  if (!y || !Number.isFinite(y)) {\n    y = 1;\n  }\n  return {\n    x,\n    y\n  };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n  const win = getWindow(element);\n  if (!isWebKit() || !win.visualViewport) {\n    return noOffsets;\n  }\n  return {\n    x: win.visualViewport.offsetLeft,\n    y: win.visualViewport.offsetTop\n  };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n    return false;\n  }\n  return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n  const clientRect = element.getBoundingClientRect();\n  const domElement = unwrapElement(element);\n  let scale = createCoords(1);\n  if (includeScale) {\n    if (offsetParent) {\n      if (isElement(offsetParent)) {\n        scale = getScale(offsetParent);\n      }\n    } else {\n      scale = getScale(element);\n    }\n  }\n  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n  let x = (clientRect.left + visualOffsets.x) / scale.x;\n  let y = (clientRect.top + visualOffsets.y) / scale.y;\n  let width = clientRect.width / scale.x;\n  let height = clientRect.height / scale.y;\n  if (domElement) {\n    const win = getWindow(domElement);\n    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n    let currentWin = win;\n    let currentIFrame = getFrameElement(currentWin);\n    while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n      const iframeScale = getScale(currentIFrame);\n      const iframeRect = currentIFrame.getBoundingClientRect();\n      const css = getComputedStyle(currentIFrame);\n      const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n      const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n      x *= iframeScale.x;\n      y *= iframeScale.y;\n      width *= iframeScale.x;\n      height *= iframeScale.y;\n      x += left;\n      y += top;\n      currentWin = getWindow(currentIFrame);\n      currentIFrame = getFrameElement(currentWin);\n    }\n  }\n  return rectToClientRect({\n    width,\n    height,\n    x,\n    y\n  });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n  let {\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  } = _ref;\n  const isFixed = strategy === 'fixed';\n  const documentElement = getDocumentElement(offsetParent);\n  const topLayer = elements ? isTopLayer(elements.floating) : false;\n  if (offsetParent === documentElement || topLayer && isFixed) {\n    return rect;\n  }\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  let scale = createCoords(1);\n  const offsets = createCoords(0);\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isHTMLElement(offsetParent)) {\n      const offsetRect = getBoundingClientRect(offsetParent);\n      scale = getScale(offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    }\n  }\n  return {\n    width: rect.width * scale.x,\n    height: rect.height * scale.y,\n    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n  };\n}\n\nfunction getClientRects(element) {\n  return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n  const html = getDocumentElement(element);\n  const scroll = getNodeScroll(element);\n  const body = element.ownerDocument.body;\n  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n  let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n  const y = -scroll.scrollTop;\n  if (getComputedStyle(body).direction === 'rtl') {\n    x += max(html.clientWidth, body.clientWidth) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\nfunction getViewportRect(element, strategy) {\n  const win = getWindow(element);\n  const html = getDocumentElement(element);\n  const visualViewport = win.visualViewport;\n  let width = html.clientWidth;\n  let height = html.clientHeight;\n  let x = 0;\n  let y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    const visualViewportBased = isWebKit();\n    if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n  const top = clientRect.top + element.clientTop;\n  const left = clientRect.left + element.clientLeft;\n  const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n  const width = element.clientWidth * scale.x;\n  const height = element.clientHeight * scale.y;\n  const x = left * scale.x;\n  const y = top * scale.y;\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n  let rect;\n  if (clippingAncestor === 'viewport') {\n    rect = getViewportRect(element, strategy);\n  } else if (clippingAncestor === 'document') {\n    rect = getDocumentRect(getDocumentElement(element));\n  } else if (isElement(clippingAncestor)) {\n    rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n  } else {\n    const visualOffsets = getVisualOffsets(element);\n    rect = {\n      ...clippingAncestor,\n      x: clippingAncestor.x - visualOffsets.x,\n      y: clippingAncestor.y - visualOffsets.y\n    };\n  }\n  return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n  const parentNode = getParentNode(element);\n  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n    return false;\n  }\n  return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n  const cachedResult = cache.get(element);\n  if (cachedResult) {\n    return cachedResult;\n  }\n  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n  let currentContainingBlockComputedStyle = null;\n  const elementIsFixed = getComputedStyle(element).position === 'fixed';\n  let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    const computedStyle = getComputedStyle(currentNode);\n    const currentNodeIsContaining = isContainingBlock(currentNode);\n    if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n      currentContainingBlockComputedStyle = null;\n    }\n    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n    if (shouldDropCurrentNode) {\n      // Drop non-containing blocks.\n      result = result.filter(ancestor => ancestor !== currentNode);\n    } else {\n      // Record last containing block for next iteration.\n      currentContainingBlockComputedStyle = computedStyle;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  cache.set(element, result);\n  return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n  let {\n    element,\n    boundary,\n    rootBoundary,\n    strategy\n  } = _ref;\n  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n  const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n  const firstClippingAncestor = clippingAncestors[0];\n  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n    const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n  return {\n    width: clippingRect.right - clippingRect.left,\n    height: clippingRect.bottom - clippingRect.top,\n    x: clippingRect.left,\n    y: clippingRect.top\n  };\n}\n\nfunction getDimensions(element) {\n  const {\n    width,\n    height\n  } = getCssDimensions(element);\n  return {\n    width,\n    height\n  };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  const documentElement = getDocumentElement(offsetParent);\n  const isFixed = strategy === 'fixed';\n  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  const offsets = createCoords(0);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n  const x = rect.left + scroll.scrollLeft - offsets.x;\n  const y = rect.top + scroll.scrollTop - offsets.y;\n  return {\n    x,\n    y,\n    width: rect.width,\n    height: rect.height\n  };\n}\n\nfunction isStaticPositioned(element) {\n  return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n  if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n  if (polyfill) {\n    return polyfill(element);\n  }\n  return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n  const win = getWindow(element);\n  if (isTopLayer(element)) {\n    return win;\n  }\n  if (!isHTMLElement(element)) {\n    let svgOffsetParent = getParentNode(element);\n    while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n      if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n        return svgOffsetParent;\n      }\n      svgOffsetParent = getParentNode(svgOffsetParent);\n    }\n    return win;\n  }\n  let offsetParent = getTrueOffsetParent(element, polyfill);\n  while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n    offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n  }\n  if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n    return win;\n  }\n  return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n  const getDimensionsFn = this.getDimensions;\n  const floatingDimensions = await getDimensionsFn(data.floating);\n  return {\n    reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n    floating: {\n      x: 0,\n      y: 0,\n      width: floatingDimensions.width,\n      height: floatingDimensions.height\n    }\n  };\n};\n\nfunction isRTL(element) {\n  return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n  convertOffsetParentRelativeRectToViewportRelativeRect,\n  getDocumentElement,\n  getClippingRect,\n  getOffsetParent,\n  getElementRects,\n  getClientRects,\n  getDimensions,\n  getScale,\n  isElement,\n  isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n  let io = null;\n  let timeoutId;\n  const root = getDocumentElement(element);\n  function cleanup() {\n    var _io;\n    clearTimeout(timeoutId);\n    (_io = io) == null || _io.disconnect();\n    io = null;\n  }\n  function refresh(skip, threshold) {\n    if (skip === void 0) {\n      skip = false;\n    }\n    if (threshold === void 0) {\n      threshold = 1;\n    }\n    cleanup();\n    const {\n      left,\n      top,\n      width,\n      height\n    } = element.getBoundingClientRect();\n    if (!skip) {\n      onMove();\n    }\n    if (!width || !height) {\n      return;\n    }\n    const insetTop = floor(top);\n    const insetRight = floor(root.clientWidth - (left + width));\n    const insetBottom = floor(root.clientHeight - (top + height));\n    const insetLeft = floor(left);\n    const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n    const options = {\n      rootMargin,\n      threshold: max(0, min(1, threshold)) || 1\n    };\n    let isFirstUpdate = true;\n    function handleObserve(entries) {\n      const ratio = entries[0].intersectionRatio;\n      if (ratio !== threshold) {\n        if (!isFirstUpdate) {\n          return refresh();\n        }\n        if (!ratio) {\n          // If the reference is clipped, the ratio is 0. Throttle the refresh\n          // to prevent an infinite loop of updates.\n          timeoutId = setTimeout(() => {\n            refresh(false, 1e-7);\n          }, 1000);\n        } else {\n          refresh(false, ratio);\n        }\n      }\n      isFirstUpdate = false;\n    }\n\n    // Older browsers don't support a `document` as the root and will throw an\n    // error.\n    try {\n      io = new IntersectionObserver(handleObserve, {\n        ...options,\n        // Handle <iframe>s\n        root: root.ownerDocument\n      });\n    } catch (e) {\n      io = new IntersectionObserver(handleObserve, options);\n    }\n    io.observe(element);\n  }\n  refresh(true);\n  return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    ancestorScroll = true,\n    ancestorResize = true,\n    elementResize = typeof ResizeObserver === 'function',\n    layoutShift = typeof IntersectionObserver === 'function',\n    animationFrame = false\n  } = options;\n  const referenceEl = unwrapElement(reference);\n  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n  ancestors.forEach(ancestor => {\n    ancestorScroll && ancestor.addEventListener('scroll', update, {\n      passive: true\n    });\n    ancestorResize && ancestor.addEventListener('resize', update);\n  });\n  const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n  let reobserveFrame = -1;\n  let resizeObserver = null;\n  if (elementResize) {\n    resizeObserver = new ResizeObserver(_ref => {\n      let [firstEntry] = _ref;\n      if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n        // Prevent update loops when using the `size` middleware.\n        // https://github.com/floating-ui/floating-ui/issues/1740\n        resizeObserver.unobserve(floating);\n        cancelAnimationFrame(reobserveFrame);\n        reobserveFrame = requestAnimationFrame(() => {\n          var _resizeObserver;\n          (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n        });\n      }\n      update();\n    });\n    if (referenceEl && !animationFrame) {\n      resizeObserver.observe(referenceEl);\n    }\n    resizeObserver.observe(floating);\n  }\n  let frameId;\n  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n  if (animationFrame) {\n    frameLoop();\n  }\n  function frameLoop() {\n    const nextRefRect = getBoundingClientRect(reference);\n    if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n      update();\n    }\n    prevRefRect = nextRefRect;\n    frameId = requestAnimationFrame(frameLoop);\n  }\n  update();\n  return () => {\n    var _resizeObserver2;\n    ancestors.forEach(ancestor => {\n      ancestorScroll && ancestor.removeEventListener('scroll', update);\n      ancestorResize && ancestor.removeEventListener('resize', update);\n    });\n    cleanupIo == null || cleanupIo();\n    (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n    resizeObserver = null;\n    if (animationFrame) {\n      cancelAnimationFrame(frameId);\n    }\n  };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n  // This caches the expensive `getClippingElementAncestors` function so that\n  // multiple lifecycle resets re-use the same result. It only lives for a\n  // single call. If other functions become expensive, we can add them as well.\n  const cache = new Map();\n  const mergedOptions = {\n    platform,\n    ...options\n  };\n  const platformWithCache = {\n    ...mergedOptions.platform,\n    _c: cache\n  };\n  return computePosition$1(reference, floating, {\n    ...mergedOptions,\n    platform: platformWithCache\n  });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","function hasWindow() {\n  return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || '').toLowerCase();\n  }\n  // Mocked nodes in testing environments may not be instances of Node. By\n  // returning `#document` an infinite loop won't occur.\n  // https://github.com/floating-ui/floating-ui/issues/2317\n  return '#document';\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n  return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n  return [':popover-open', ':modal'].some(selector => {\n    try {\n      return element.matches(selector);\n    } catch (e) {\n      return false;\n    }\n  });\n}\nfunction isContainingBlock(elementOrCss) {\n  const webkit = isWebKit();\n  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else if (isTopLayer(currentNode)) {\n      return null;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (typeof CSS === 'undefined' || !CSS.supports) return false;\n  return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n  return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.scrollX,\n    scrollTop: element.scrollY\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === 'html') {\n    return node;\n  }\n  const result =\n  // Step into the shadow DOM of the parent of a slotted node.\n  node.assignedSlot ||\n  // DOM Element detected.\n  node.parentNode ||\n  // ShadowRoot detected.\n  isShadowRoot(node) && node.host ||\n  // Fallback.\n  getDocumentElement(node);\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    const frameElement = getFrameElement(win);\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n  }\n  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport { isNode, getNodeName } from '@floating-ui/utils/dom';\nimport { unref, computed, ref, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly } from 'vue-demi';\n\nfunction isComponentPublicInstance(target) {\n  return target != null && typeof target === 'object' && '$el' in target;\n}\nfunction unwrapElement(target) {\n  if (isComponentPublicInstance(target)) {\n    const element = target.$el;\n    return isNode(element) && getNodeName(element) === '#comment' ? null : element;\n  }\n  return target;\n}\n\nfunction toValue(source) {\n  return typeof source === 'function' ? source() : unref(source);\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered to the reference element.\n * @param options The arrow options.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction arrow(options) {\n  return {\n    name: 'arrow',\n    options,\n    fn(args) {\n      const element = unwrapElement(toValue(options.element));\n      if (element == null) {\n        return {};\n      }\n      return arrow$1({\n        element,\n        padding: options.padding\n      }).fn(args);\n    }\n  };\n}\n\nfunction getDPR(element) {\n  if (typeof window === 'undefined') {\n    return 1;\n  }\n  const win = element.ownerDocument.defaultView || window;\n  return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n  const dpr = getDPR(element);\n  return Math.round(value * dpr) / dpr;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.\n * @param reference The reference template ref.\n * @param floating The floating template ref.\n * @param options The floating options.\n * @see https://floating-ui.com/docs/vue\n */\nfunction useFloating(reference, floating, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const whileElementsMountedOption = options.whileElementsMounted;\n  const openOption = computed(() => {\n    var _toValue;\n    return (_toValue = toValue(options.open)) != null ? _toValue : true;\n  });\n  const middlewareOption = computed(() => toValue(options.middleware));\n  const placementOption = computed(() => {\n    var _toValue2;\n    return (_toValue2 = toValue(options.placement)) != null ? _toValue2 : 'bottom';\n  });\n  const strategyOption = computed(() => {\n    var _toValue3;\n    return (_toValue3 = toValue(options.strategy)) != null ? _toValue3 : 'absolute';\n  });\n  const transformOption = computed(() => {\n    var _toValue4;\n    return (_toValue4 = toValue(options.transform)) != null ? _toValue4 : true;\n  });\n  const referenceElement = computed(() => unwrapElement(reference.value));\n  const floatingElement = computed(() => unwrapElement(floating.value));\n  const x = ref(0);\n  const y = ref(0);\n  const strategy = ref(strategyOption.value);\n  const placement = ref(placementOption.value);\n  const middlewareData = shallowRef({});\n  const isPositioned = ref(false);\n  const floatingStyles = computed(() => {\n    const initialStyles = {\n      position: strategy.value,\n      left: '0',\n      top: '0'\n    };\n    if (!floatingElement.value) {\n      return initialStyles;\n    }\n    const xVal = roundByDPR(floatingElement.value, x.value);\n    const yVal = roundByDPR(floatingElement.value, y.value);\n    if (transformOption.value) {\n      return {\n        ...initialStyles,\n        transform: \"translate(\" + xVal + \"px, \" + yVal + \"px)\",\n        ...(getDPR(floatingElement.value) >= 1.5 && {\n          willChange: 'transform'\n        })\n      };\n    }\n    return {\n      position: strategy.value,\n      left: xVal + \"px\",\n      top: yVal + \"px\"\n    };\n  });\n  let whileElementsMountedCleanup;\n  function update() {\n    if (referenceElement.value == null || floatingElement.value == null) {\n      return;\n    }\n    const open = openOption.value;\n    computePosition(referenceElement.value, floatingElement.value, {\n      middleware: middlewareOption.value,\n      placement: placementOption.value,\n      strategy: strategyOption.value\n    }).then(position => {\n      x.value = position.x;\n      y.value = position.y;\n      strategy.value = position.strategy;\n      placement.value = position.placement;\n      middlewareData.value = position.middlewareData;\n      /**\n       * The floating element's position may be recomputed while it's closed\n       * but still mounted (such as when transitioning out). To ensure\n       * `isPositioned` will be `false` initially on the next open, avoid\n       * setting it to `true` when `open === false` (must be specified).\n       */\n      isPositioned.value = open !== false;\n    });\n  }\n  function cleanup() {\n    if (typeof whileElementsMountedCleanup === 'function') {\n      whileElementsMountedCleanup();\n      whileElementsMountedCleanup = undefined;\n    }\n  }\n  function attach() {\n    cleanup();\n    if (whileElementsMountedOption === undefined) {\n      update();\n      return;\n    }\n    if (referenceElement.value != null && floatingElement.value != null) {\n      whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);\n      return;\n    }\n  }\n  function reset() {\n    if (!openOption.value) {\n      isPositioned.value = false;\n    }\n  }\n  watch([middlewareOption, placementOption, strategyOption, openOption], update, {\n    flush: 'sync'\n  });\n  watch([referenceElement, floatingElement], attach, {\n    flush: 'sync'\n  });\n  watch(openOption, reset, {\n    flush: 'sync'\n  });\n  if (getCurrentScope()) {\n    onScopeDispose(cleanup);\n  }\n  return {\n    x: shallowReadonly(x),\n    y: shallowReadonly(y),\n    strategy: shallowReadonly(strategy),\n    placement: shallowReadonly(placement),\n    middlewareData: shallowReadonly(middlewareData),\n    isPositioned: shallowReadonly(isPositioned),\n    floatingStyles,\n    update\n  };\n}\n\nexport { arrow, useFloating };\n","<script setup>\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport {useFloating, autoUpdate, flip, shift, offset, arrow} from '@floating-ui/vue'\nimport {useDebounceFn, useMouseInElement} from '@vueuse/core'\nimport {ref, toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  text: {\n    type: String,\n    default: '',\n  },\n  position: {\n    type: String,\n    default: 'bottom',\n  },\n  color: {\n    type: String,\n    default: '',\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  showDelay: {\n    type: Number,\n    default: 0,\n  },\n  hideDelay: {\n    type: Number,\n    default: 0,\n  },\n  isFullWidth: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {text, showDelay, hideDelay} = toRefs(props)\nconst placement = ref(props.position) //Can't be the prop ref directly\n\n//Clean up text, removing HTML tags from it\nconst cleanText = computed(() => text.value?.replace(/(<([^>]+)>)/ig, ''))\n\n//Element refs\nconst trigger = ref(null)\nconst tooltip = ref(null)\nconst tooltipArrow = ref(null)\nconst isVisible = ref(false)\n\n//Use floating UI\nconst {\n  floatingStyles,\n  middlewareData,\n} = useFloating(trigger, tooltip, {\n  placement,\n  middleware: [\n    offset(10),\n    flip(),\n    shift(),\n    arrow({element: tooltipArrow}),\n  ],\n  whileElementsMounted: autoUpdate,\n})\n\n//Arrow style\nconst arrowStyles = computed(() => {\n  const placement = middlewareData.value.offset?.placement\n  const x = middlewareData.value.arrow?.x\n  return {\n    left: x !== null ? `${Math.round(x * 10) / 10}px` : '',\n    top: placement !== 'top' ? '-5px' : '',\n  }\n})\n\n//Track if mouse is over the trigger\nconst isMouseOverTrigger = ref(false)\nconst {isOutside: isOutsideTooltip} = useMouseInElement(tooltip)\n\n//Debounced show/hide handlers\n//These track if mouse is still over the element or not to prevent odd behaviour\nconst show = useDebounceFn(() => {\n  if (isMouseOverTrigger.value) {\n    isVisible.value = true\n  }\n}, showDelay.value)\nconst hide = useDebounceFn(() => {\n  if (!isMouseOverTrigger.value && isOutsideTooltip.value) {\n    isVisible.value = false\n  }\n}, hideDelay.value)\n\n//Mouse enter/leave handlers\nconst mouseEnter = () => {\n  isMouseOverTrigger.value = true\n  show()\n}\nconst mouseLeave = () => {\n  isMouseOverTrigger.value = false\n  hide()\n}\n</script>\n\n<template>\n  <span :class=\"$style.wrapper\">\n    <span\n      ref=\"trigger\"\n      role=\"tooltip-trigger\"\n      :class=\"{\n        [$style.trigger]: true,\n        [$style.fullWidth]: isFullWidth\n      }\"\n      is-clickable\n      @mouseenter=\"mouseEnter()\"\n      @mouseleave=\"mouseLeave()\"\n    >\n      <slot />\n    </span>\n    <TransitionFadeIn>\n      <div\n        v-if=\"isVisible && !isDisabled\"\n        ref=\"tooltip\"\n        role=\"tooltip\"\n        :class=\"{\n          [$style.tooltip]: true,\n          [$style[color]]: !!color,\n          [$style.compact]: isCompact,\n        }\"\n        :style=\"floatingStyles\"\n      >\n        <span>{{ cleanText }}</span>\n        <div\n          ref=\"tooltipArrow\"\n          :class=\"$style.arrow\"\n          :style=\"arrowStyles\"\n        />\n      </div>\n    </TransitionFadeIn>\n  </span>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  /* Needed to avoid extra whitespace causing padding */\n  font-size: 0;\n}\n.trigger {\n  display: inline-flex;\n  flex: 1;\n  font-size: var(--font-size-text-normal);\n  &.fullWidth {\n    width: 100%\n  }\n}\n.tooltip {\n  position: absolute;\n  text-align: center;\n  font-size: var(--font-size-text-normal);\n  font-weight: var(--font-weight-normal);\n  text-transform: none;\n  letter-spacing: 0;\n  line-height: 18px;\n  padding: 0.25rem 0.5rem;\n  color: var(--color-text-on-dark);\n  background: var(--bg-dark);\n  border: 1px solid var(--bg-dark);\n  border-radius: var(--border-radius-m);\n  box-shadow: var(--box-shadow);\n  z-index: 99999;\n  max-width: 400px;\n  &.compact {\n    max-width: 150px;\n  }\n}\n.arrow {\n  position: absolute;\n  background: var(--bg-dark);\n  width: 8px;\n  height: 8px;\n  transform: rotate(45deg);\n}\n\n.primary, .primary .arrow {\n  background: var(--bg-primary);\n  border-color: var(--bg-primary);\n}\n.primaryMuted, .primaryMuted .arrow {\n  background: var(--bg-primary-muted);\n  border-color: var(--bg-primary-muted);\n}\n.success, .success .arrow {\n  background: var(--color-status-success);\n  border-color: var(--color-status-success);\n}\n.warning, .warning .arrow {\n  background: var(--color-status-warning);\n  border-color: var(--color-status-warning);\n}\n.danger, .danger .arrow {\n  background: var(--color-status-danger);\n  border-color: var(--color-status-danger);\n}\n.info, .info .arrow {\n  background: var(--color-status-info);\n  border-color: var(--color-status-info);\n}\n</style>\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n  const argStr = Object.prototype.toString.call(argument);\n\n  // Clone the date\n  if (\n    argument instanceof Date ||\n    (typeof argument === \"object\" && argStr === \"[object Date]\")\n  ) {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new argument.constructor(+argument);\n  } else if (\n    typeof argument === \"number\" ||\n    argStr === \"[object Number]\" ||\n    typeof argument === \"string\" ||\n    argStr === \"[object String]\"\n  ) {\n    // TODO: Can we get rid of as?\n    return new Date(argument);\n  } else {\n    // TODO: Can we get rid of as?\n    return new Date(NaN);\n  }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from 'date-fns'\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date(date: DateType): DateType {\n *   return constructFrom(\n *     date, // Use contrustor from the given date\n *     date.getTime() // Use the date value to create a new date\n *   )\n * }\n */\nexport function constructFrom(date, value) {\n  if (date instanceof Date) {\n    return new date.constructor(value);\n  } else {\n    return new Date(value);\n  }\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount) {\n  const _date = toDate(date);\n  if (isNaN(amount)) return constructFrom(date, NaN);\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  _date.setDate(_date.getDate() + amount);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount) {\n  const _date = toDate(date);\n  if (isNaN(amount)) return constructFrom(date, NaN);\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  const dayOfMonth = _date.getDate();\n\n  // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n  const endOfDesiredMonth = constructFrom(date, _date.getTime());\n  endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n  const daysInMonth = endOfDesiredMonth.getDate();\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    _date.setFullYear(\n      endOfDesiredMonth.getFullYear(),\n      endOfDesiredMonth.getMonth(),\n      dayOfMonth,\n    );\n    return _date;\n  }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addDays } from \"./addDays.mjs\";\nimport { addMonths } from \"./addMonths.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added.\n *\n * | Key            | Description                        |\n * |----------------|------------------------------------|\n * | years          | Amount of years to be added        |\n * | months         | Amount of months to be added       |\n * | weeks          | Amount of weeks to be added        |\n * | days           | Amount of days to be added         |\n * | hours          | Amount of hours to be added        |\n * | minutes        | Amount of minutes to be added      |\n * | seconds        | Amount of seconds to be added      |\n *\n * All values default to 0\n *\n * @returns The new date with the seconds added\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\\\\-7\n *   minutes: 9,\n *   seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport function add(date, duration) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  // Add years and months\n  const _date = toDate(date);\n  const dateWithMonths =\n    months || years ? addMonths(_date, months + years * 12) : _date;\n\n  // Add weeks and days\n  const dateWithDays =\n    days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;\n\n  // Add days, hours, minutes and seconds\n  const minutesToAdd = minutes + hours * 60;\n  const secondsToAdd = seconds + minutesToAdd * 60;\n  const msToAdd = secondsToAdd * 1000;\n  const finalDate = constructFrom(date, dateWithDays.getTime() + msToAdd);\n\n  return finalDate;\n}\n\n// Fallback for modularized imports:\nexport default add;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of milliseconds to be added.\n *\n * @returns The new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport function addMilliseconds(date, amount) {\n  const timestamp = +toDate(date);\n  return constructFrom(date, timestamp + amount);\n}\n\n// Fallback for modularized imports:\nexport default addMilliseconds;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n *   return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","import { addMilliseconds } from \"./addMilliseconds.mjs\";\nimport { millisecondsInHour } from \"./constants.mjs\";\n\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of hours to be added.\n *\n * @returns The new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\nexport function addHours(date, amount) {\n  return addMilliseconds(date, amount * millisecondsInHour);\n}\n\n// Fallback for modularized imports:\nexport default addHours;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}\n","import { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n  _date.setDate(_date.getDate() - diff);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.mjs\";\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date) {\n  return startOfWeek(date, { weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date) {\n  const _date = toDate(date);\n  const year = _date.getFullYear();\n\n  const fourthOfJanuaryOfNextYear = constructFrom(date, 0);\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n  const fourthOfJanuaryOfThisYear = constructFrom(date, 0);\n  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (_date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (_date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date) {\n  const _date = toDate(date);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n  const _date = toDate(date);\n  const utcDate = new Date(\n    Date.UTC(\n      _date.getFullYear(),\n      _date.getMonth(),\n      _date.getDate(),\n      _date.getHours(),\n      _date.getMinutes(),\n      _date.getSeconds(),\n      _date.getMilliseconds(),\n    ),\n  );\n  utcDate.setUTCFullYear(_date.getFullYear());\n  return +date - +utcDate;\n}\n","import { millisecondsInDay } from \"./constants.mjs\";\nimport { startOfDay } from \"./startOfDay.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(dateLeft, dateRight) {\n  const startOfDayLeft = startOfDay(dateLeft);\n  const startOfDayRight = startOfDay(dateRight);\n\n  const timestampLeft =\n    +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n  const timestampRight =\n    +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight);\n\n  // Round the number of days to the nearest integer because the number of\n  // milliseconds in a day is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round((timestampLeft - timestampRight) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { getISOWeekYear } from \"./getISOWeekYear.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date) {\n  const year = getISOWeekYear(date);\n  const fourthOfJanuary = constructFrom(date, 0);\n  fourthOfJanuary.setFullYear(year, 0, 4);\n  fourthOfJanuary.setHours(0, 0, 0, 0);\n  return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of quarters to be added.\n *\n * @returns The new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\nexport function addQuarters(date, amount) {\n  const months = amount * 3;\n  return addMonths(date, months);\n}\n\n// Fallback for modularized imports:\nexport default addQuarters;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount) {\n  return addMonths(date, amount * 12);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n  const _dateLeft = toDate(dateLeft);\n  const _dateRight = toDate(dateRight);\n\n  const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n  if (diff < 0) {\n    return -1;\n  } else if (diff > 0) {\n    return 1;\n    // Return 0 if diff is 0; return NaN if diff is NaN\n  } else {\n    return diff;\n  }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n  return (\n    value instanceof Date ||\n    (typeof value === \"object\" &&\n      Object.prototype.toString.call(value) === \"[object Date]\")\n  );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n  if (!isDate(date) && typeof date !== \"number\") {\n    return false;\n  }\n  const _date = toDate(date);\n  return !isNaN(Number(_date));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getQuarter\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * const result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\nexport function getQuarter(date) {\n  const _date = toDate(date);\n  const quarter = Math.trunc(_date.getMonth() / 3) + 1;\n  return quarter;\n}\n\n// Fallback for modularized imports:\nexport default getQuarter;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n\n * @returns The number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nexport function differenceInCalendarYears(dateLeft, dateRight) {\n  const _dateLeft = toDate(dateLeft);\n  const _dateRight = toDate(dateRight);\n\n  return _dateLeft.getFullYear() - _dateRight.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarYears;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarYears } from \"./differenceInCalendarYears.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\nexport function differenceInYears(dateLeft, dateRight) {\n  const _dateLeft = toDate(dateLeft);\n  const _dateRight = toDate(dateRight);\n\n  const sign = compareAsc(_dateLeft, _dateRight);\n  const difference = Math.abs(differenceInCalendarYears(_dateLeft, _dateRight));\n\n  // Set both dates to a valid leap year for accurate comparison when dealing\n  // with leap days\n  _dateLeft.setFullYear(1584);\n  _dateRight.setFullYear(1584);\n\n  // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n  // If so, result must be decreased by 1 in absolute value\n  const isLastYearNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n  const result = sign * (difference - +isLastYearNotFull);\n\n  // Prevent negative zero\n  return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInYears;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachDayOfInterval} function options.\n */\n\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of days from the day of the interval start to the day of the interval end\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n *   start: new Date(2014, 9, 6),\n *   end: new Date(2014, 9, 10)\n * })\n * //=> [\n * //   Mon Oct 06 2014 00:00:00,\n * //   Tue Oct 07 2014 00:00:00,\n * //   Wed Oct 08 2014 00:00:00,\n * //   Thu Oct 09 2014 00:00:00,\n * //   Fri Oct 10 2014 00:00:00\n * // ]\n */\nexport function eachDayOfInterval(interval, options) {\n  const startDate = toDate(interval.start);\n  const endDate = toDate(interval.end);\n\n  let reversed = +startDate > +endDate;\n  const endTime = reversed ? +startDate : +endDate;\n  const currentDate = reversed ? endDate : startDate;\n  currentDate.setHours(0, 0, 0, 0);\n\n  let step = options?.step ?? 1;\n  if (!step) return [];\n  if (step < 0) {\n    step = -step;\n    reversed = !reversed;\n  }\n\n  const dates = [];\n\n  while (+currentDate <= endTime) {\n    dates.push(toDate(currentDate));\n    currentDate.setDate(currentDate.getDate() + step);\n    currentDate.setHours(0, 0, 0, 0);\n  }\n\n  return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachDayOfInterval;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date) {\n  const _date = toDate(date);\n  const currentMonth = _date.getMonth();\n  const month = currentMonth - (currentMonth % 3);\n  _date.setMonth(month, 1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n","import { addQuarters } from \"./addQuarters.mjs\";\nimport { startOfQuarter } from \"./startOfQuarter.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachQuarterOfInterval} function options.\n */\n\n/**\n * @name eachQuarterOfInterval\n * @category Interval Helpers\n * @summary Return the array of quarters within the specified time interval.\n *\n * @description\n * Return the array of quarters within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval\n *\n * @returns The array with starts of quarters from the quarter of the interval start to the quarter of the interval end\n *\n * @example\n * // Each quarter within interval 6 February 2014 - 10 August 2014:\n * const result = eachQuarterOfInterval({\n *   start: new Date(2014, 1, 6),\n *   end: new Date(2014, 7, 10)\n * })\n * //=> [\n * //   Wed Jan 01 2014 00:00:00,\n * //   Tue Apr 01 2014 00:00:00,\n * //   Tue Jul 01 2014 00:00:00,\n * // ]\n */\nexport function eachQuarterOfInterval(interval, options) {\n  const startDate = toDate(interval.start);\n  const endDate = toDate(interval.end);\n\n  let reversed = +startDate > +endDate;\n  const endTime = reversed\n    ? +startOfQuarter(startDate)\n    : +startOfQuarter(endDate);\n  let currentDate = reversed\n    ? startOfQuarter(endDate)\n    : startOfQuarter(startDate);\n\n  let step = options?.step ?? 1;\n  if (!step) return [];\n  if (step < 0) {\n    step = -step;\n    reversed = !reversed;\n  }\n\n  const dates = [];\n\n  while (+currentDate <= endTime) {\n    dates.push(toDate(currentDate));\n    currentDate = addQuarters(currentDate, step);\n  }\n\n  return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachQuarterOfInterval;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date) {\n  const _date = toDate(date);\n  _date.setDate(1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date) {\n  const _date = toDate(date);\n  const year = _date.getFullYear();\n  _date.setFullYear(year + 1, 0, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date) {\n  const cleanDate = toDate(date);\n  const _date = constructFrom(date, 0);\n  _date.setFullYear(cleanDate.getFullYear(), 0, 1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n  _date.setDate(_date.getDate() + diff);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfQuarter\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfQuarter(date) {\n  const _date = toDate(date);\n  const currentMonth = _date.getMonth();\n  const month = currentMonth - (currentMonth % 3) + 3;\n  _date.setMonth(month, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfQuarter;\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\",\n  },\n\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\",\n  },\n\n  halfAMinute: \"half a minute\",\n\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\",\n  },\n\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\",\n  },\n\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\",\n  },\n\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\",\n  },\n\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\",\n  },\n\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\",\n  },\n\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\",\n  },\n\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\",\n  },\n\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\",\n  },\n\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\",\n  },\n\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\",\n  },\n\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\",\n  },\n\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\",\n  },\n};\n\nexport const formatDistance = (token, count, options) => {\n  let result;\n\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n\n  return result;\n};\n","export function buildFormatLongFn(args) {\n  return (options = {}) => {\n    // TODO: Remove String()\n    const width = options.width ? String(options.width) : args.defaultWidth;\n    const format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n  full: \"EEEE, MMMM do, y\",\n  long: \"MMMM do, y\",\n  medium: \"MMM d, y\",\n  short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n  full: \"h:mm:ss a zzzz\",\n  long: \"h:mm:ss a z\",\n  medium: \"h:mm:ss a\",\n  short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: \"{{date}}, {{time}}\",\n  short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\",\n  }),\n\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\",\n  }),\n\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\",\n  }),\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n  formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n  narrow: [\"B\", \"A\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n  narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n  abbreviated: [\n    \"Jan\",\n    \"Feb\",\n    \"Mar\",\n    \"Apr\",\n    \"May\",\n    \"Jun\",\n    \"Jul\",\n    \"Aug\",\n    \"Sep\",\n    \"Oct\",\n    \"Nov\",\n    \"Dec\",\n  ],\n\n  wide: [\n    \"January\",\n    \"February\",\n    \"March\",\n    \"April\",\n    \"May\",\n    \"June\",\n    \"July\",\n    \"August\",\n    \"September\",\n    \"October\",\n    \"November\",\n    \"December\",\n  ],\n};\n\nconst dayValues = {\n  narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n  short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n  abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  wide: [\n    \"Sunday\",\n    \"Monday\",\n    \"Tuesday\",\n    \"Wednesday\",\n    \"Thursday\",\n    \"Friday\",\n    \"Saturday\",\n  ],\n};\n\nconst dayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n};\n\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n  const number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  const rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + \"st\";\n      case 2:\n        return number + \"nd\";\n      case 3:\n        return number + \"rd\";\n    }\n  }\n  return number + \"th\";\n};\n\nexport const localize = {\n  ordinalNumber,\n\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\",\n  }),\n\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1,\n  }),\n\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\",\n  }),\n\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\",\n  }),\n\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\",\n  }),\n};\n","export function buildMatchFn(args) {\n  return (string, options = {}) => {\n    const width = options.width;\n\n    const matchPattern =\n      (width && args.matchPatterns[width]) ||\n      args.matchPatterns[args.defaultMatchWidth];\n    const matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n    const matchedString = matchResult[0];\n\n    const parsePatterns =\n      (width && args.parsePatterns[width]) ||\n      args.parsePatterns[args.defaultParseWidth];\n\n    const key = Array.isArray(parsePatterns)\n      ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n      : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n        findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n    let value;\n\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback\n      ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n        options.valueCallback(value)\n      : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (const key in object) {\n    if (\n      Object.prototype.hasOwnProperty.call(object, key) &&\n      predicate(object[key])\n    ) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (let key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\n","export function buildMatchPatternFn(args) {\n  return (string, options = {}) => {\n    const matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    const matchedString = matchResult[0];\n\n    const parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    let value = args.valueCallback\n      ? args.valueCallback(parseResult[0])\n      : parseResult[0];\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n    value = options.valueCallback ? options.valueCallback(value) : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n  narrow: [\n    /^j/i,\n    /^f/i,\n    /^m/i,\n    /^a/i,\n    /^m/i,\n    /^j/i,\n    /^j/i,\n    /^a/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n\n  any: [\n    /^ja/i,\n    /^f/i,\n    /^mar/i,\n    /^ap/i,\n    /^may/i,\n    /^jun/i,\n    /^jul/i,\n    /^au/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n};\n\nconst matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i,\n  },\n};\n\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10),\n  }),\n\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1,\n  }),\n\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\",\n  }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n  code: \"en-US\",\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1,\n  },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.mjs\";\nimport { startOfYear } from \"./startOfYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date) {\n  const _date = toDate(date);\n  const diff = differenceInCalendarDays(_date, startOfYear(_date));\n  const dayOfYear = diff + 1;\n  return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInWeek } from \"./constants.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date) {\n  const _date = toDate(date);\n  const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n  const _date = toDate(date);\n  const year = _date.getFullYear();\n\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const firstWeekOfNextYear = constructFrom(date, 0);\n  firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n  const firstWeekOfThisYear = constructFrom(date, 0);\n  firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n  if (_date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (_date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { getWeekYear } from \"./getWeekYear.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const year = getWeekYear(date, options);\n  const firstWeek = constructFrom(date, 0);\n  firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setHours(0, 0, 0, 0);\n  const _date = startOfWeek(firstWeek, options);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { startOfWeekYear } from \"./startOfWeekYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> 53\n */\n\nexport function getWeek(date, options) {\n  const _date = toDate(date);\n  const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n  const sign = number < 0 ? \"-\" : \"\";\n  const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n  return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.mjs\";\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n  // Year\n  y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n    const signedYear = date.getFullYear();\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n  },\n\n  // Month\n  M(date, token) {\n    const month = date.getMonth();\n    return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n\n  // Day of the month\n  d(date, token) {\n    return addLeadingZeros(date.getDate(), token.length);\n  },\n\n  // AM or PM\n  a(date, token) {\n    const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return dayPeriodEnumValue.toUpperCase();\n      case \"aaa\":\n        return dayPeriodEnumValue;\n      case \"aaaaa\":\n        return dayPeriodEnumValue[0];\n      case \"aaaa\":\n      default:\n        return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n    }\n  },\n\n  // Hour [1-12]\n  h(date, token) {\n    return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n  },\n\n  // Hour [0-23]\n  H(date, token) {\n    return addLeadingZeros(date.getHours(), token.length);\n  },\n\n  // Minute\n  m(date, token) {\n    return addLeadingZeros(date.getMinutes(), token.length);\n  },\n\n  // Second\n  s(date, token) {\n    return addLeadingZeros(date.getSeconds(), token.length);\n  },\n\n  // Fraction of second\n  S(date, token) {\n    const numberOfDigits = token.length;\n    const milliseconds = date.getMilliseconds();\n    const fractionalSeconds = Math.trunc(\n      milliseconds * Math.pow(10, numberOfDigits - 3),\n    );\n    return addLeadingZeros(fractionalSeconds, token.length);\n  },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.mjs\";\nimport { getISOWeek } from \"../../getISOWeek.mjs\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.mjs\";\nimport { getWeek } from \"../../getWeek.mjs\";\nimport { getWeekYear } from \"../../getWeekYear.mjs\";\nimport { addLeadingZeros } from \"../addLeadingZeros.mjs\";\nimport { lightFormatters } from \"./lightFormatters.mjs\";\n\nconst dayPeriodEnum = {\n  am: \"am\",\n  pm: \"pm\",\n  midnight: \"midnight\",\n  noon: \"noon\",\n  morning: \"morning\",\n  afternoon: \"afternoon\",\n  evening: \"evening\",\n  night: \"night\",\n};\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n  // Era\n  G: function (date, token, localize) {\n    const era = date.getFullYear() > 0 ? 1 : 0;\n    switch (token) {\n      // AD, BC\n      case \"G\":\n      case \"GG\":\n      case \"GGG\":\n        return localize.era(era, { width: \"abbreviated\" });\n      // A, B\n      case \"GGGGG\":\n        return localize.era(era, { width: \"narrow\" });\n      // Anno Domini, Before Christ\n      case \"GGGG\":\n      default:\n        return localize.era(era, { width: \"wide\" });\n    }\n  },\n\n  // Year\n  y: function (date, token, localize) {\n    // Ordinal number\n    if (token === \"yo\") {\n      const signedYear = date.getFullYear();\n      // Returns 1 for 1 BC (which is year 0 in JavaScript)\n      const year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, { unit: \"year\" });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n\n  // Local week-numbering year\n  Y: function (date, token, localize, options) {\n    const signedWeekYear = getWeekYear(date, options);\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n    // Two digit year\n    if (token === \"YY\") {\n      const twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    }\n\n    // Ordinal number\n    if (token === \"Yo\") {\n      return localize.ordinalNumber(weekYear, { unit: \"year\" });\n    }\n\n    // Padding\n    return addLeadingZeros(weekYear, token.length);\n  },\n\n  // ISO week-numbering year\n  R: function (date, token) {\n    const isoWeekYear = getISOWeekYear(date);\n\n    // Padding\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function (date, token) {\n    const year = date.getFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n\n  // Quarter\n  Q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"Q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"QQ\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"Qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"QQQ\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"QQQQQ\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"QQQQ\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone quarter\n  q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"qq\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"qqq\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"qqqqq\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"qqqq\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // Month\n  M: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      case \"M\":\n      case \"MM\":\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n      case \"Mo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"MMM\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // J, F, ..., D\n      case \"MMMMM\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // January, February, ..., December\n      case \"MMMM\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"formatting\" });\n    }\n  },\n\n  // Stand-alone month\n  L: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"L\":\n        return String(month + 1);\n      // 01, 02, ..., 12\n      case \"LL\":\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n      case \"Lo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"LLL\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // J, F, ..., D\n      case \"LLLLL\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // January, February, ..., December\n      case \"LLLL\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"standalone\" });\n    }\n  },\n\n  // Local week of year\n  w: function (date, token, localize, options) {\n    const week = getWeek(date, options);\n\n    if (token === \"wo\") {\n      return localize.ordinalNumber(week, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n\n  // ISO week of year\n  I: function (date, token, localize) {\n    const isoWeek = getISOWeek(date);\n\n    if (token === \"Io\") {\n      return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n\n  // Day of the month\n  d: function (date, token, localize) {\n    if (token === \"do\") {\n      return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n\n  // Day of year\n  D: function (date, token, localize) {\n    const dayOfYear = getDayOfYear(date);\n\n    if (token === \"Do\") {\n      return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n\n  // Day of week\n  E: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    switch (token) {\n      // Tue\n      case \"E\":\n      case \"EE\":\n      case \"EEE\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"EEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"EEEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"EEEE\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Local day of week\n  e: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case \"e\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"ee\":\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n      case \"eo\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"eee\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"eeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"eeeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"eeee\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone local day of week\n  c: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case \"c\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"cc\":\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n      case \"co\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"ccc\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // T\n      case \"ccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // Tu\n      case \"cccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"standalone\",\n        });\n      // Tuesday\n      case \"cccc\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // ISO day of week\n  i: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n    switch (token) {\n      // 2\n      case \"i\":\n        return String(isoDayOfWeek);\n      // 02\n      case \"ii\":\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n      case \"io\":\n        return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n      // Tue\n      case \"iii\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"iiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"iiiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"iiii\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM or PM\n  a: function (date, token, localize) {\n    const hours = date.getHours();\n    const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"aaa\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"aaaaa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"aaaa\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM, PM, midnight, noon\n  b: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n    }\n\n    switch (token) {\n      case \"b\":\n      case \"bb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"bbb\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"bbbbb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"bbbb\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // in the morning, in the afternoon, in the evening, at night\n  B: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case \"B\":\n      case \"BB\":\n      case \"BBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"BBBBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"BBBB\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Hour [1-12]\n  h: function (date, token, localize) {\n    if (token === \"ho\") {\n      let hours = date.getHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n\n  // Hour [0-23]\n  H: function (date, token, localize) {\n    if (token === \"Ho\") {\n      return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n\n  // Hour [0-11]\n  K: function (date, token, localize) {\n    const hours = date.getHours() % 12;\n\n    if (token === \"Ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Hour [1-24]\n  k: function (date, token, localize) {\n    let hours = date.getHours();\n    if (hours === 0) hours = 24;\n\n    if (token === \"ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Minute\n  m: function (date, token, localize) {\n    if (token === \"mo\") {\n      return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n\n  // Second\n  s: function (date, token, localize) {\n    if (token === \"so\") {\n      return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n\n  // Fraction of second\n  S: function (date, token) {\n    return lightFormatters.S(date, token);\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return \"Z\";\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"X\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n      case \"XXXX\":\n      case \"XX\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n      case \"XXXXX\":\n      case \"XXX\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"x\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n      case \"xxxx\":\n      case \"xx\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n      case \"xxxxx\":\n      case \"xxx\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (GMT)\n  O: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"O\":\n      case \"OO\":\n      case \"OOO\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"OOOO\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (specific non-location)\n  z: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"z\":\n      case \"zz\":\n      case \"zzz\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"zzzz\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Seconds timestamp\n  t: function (date, token, _localize) {\n    const timestamp = Math.trunc(date.getTime() / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n\n  // Milliseconds timestamp\n  T: function (date, token, _localize) {\n    const timestamp = date.getTime();\n    return addLeadingZeros(timestamp, token.length);\n  },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = Math.trunc(absOffset / 60);\n  const minutes = absOffset % 60;\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n  if (offset % 60 === 0) {\n    const sign = offset > 0 ? \"-\" : \"+\";\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n  return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n  const minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"P\":\n      return formatLong.date({ width: \"short\" });\n    case \"PP\":\n      return formatLong.date({ width: \"medium\" });\n    case \"PPP\":\n      return formatLong.date({ width: \"long\" });\n    case \"PPPP\":\n    default:\n      return formatLong.date({ width: \"full\" });\n  }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"p\":\n      return formatLong.time({ width: \"short\" });\n    case \"pp\":\n      return formatLong.time({ width: \"medium\" });\n    case \"ppp\":\n      return formatLong.time({ width: \"long\" });\n    case \"pppp\":\n    default:\n      return formatLong.time({ width: \"full\" });\n  }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n  const matchResult = pattern.match(/(P+)(p+)?/) || [];\n  const datePattern = matchResult[1];\n  const timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  let dateTimeFormat;\n\n  switch (datePattern) {\n    case \"P\":\n      dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n      break;\n    case \"PP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n      break;\n    case \"PPP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n      break;\n    case \"PPPP\":\n    default:\n      dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n      break;\n  }\n\n  return dateTimeFormat\n    .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n    .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n  return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n  return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n  const _message = message(token, format, input);\n  console.warn(_message);\n  if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n  const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n  return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { formatters } from \"./_lib/format/formatters.mjs\";\nimport { longFormatters } from \"./_lib/format/longFormatters.mjs\";\nimport {\n  isProtectedDayOfYearToken,\n  isProtectedWeekYearToken,\n  warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.mjs\";\nimport { isValid } from \"./isValid.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n  /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n *    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const originalDate = toDate(date);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  let parts = formatStr\n    .match(longFormattingTokensRegExp)\n    .map((substring) => {\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n        const longFormatter = longFormatters[firstCharacter];\n        return longFormatter(substring, locale.formatLong);\n      }\n      return substring;\n    })\n    .join(\"\")\n    .match(formattingTokensRegExp)\n    .map((substring) => {\n      // Replace two single quote characters with one single quote character\n      if (substring === \"''\") {\n        return { isToken: false, value: \"'\" };\n      }\n\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"'\") {\n        return { isToken: false, value: cleanEscapedString(substring) };\n      }\n\n      if (formatters[firstCharacter]) {\n        return { isToken: true, value: substring };\n      }\n\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError(\n          \"Format string contains an unescaped latin alphabet character `\" +\n            firstCharacter +\n            \"`\",\n        );\n      }\n\n      return { isToken: false, value: substring };\n    });\n\n  // invoke localize preprocessor (only for french locales at the moment)\n  if (locale.localize.preprocessor) {\n    parts = locale.localize.preprocessor(originalDate, parts);\n  }\n\n  const formatterOptions = {\n    firstWeekContainsDate,\n    weekStartsOn,\n    locale,\n  };\n\n  return parts\n    .map((part) => {\n      if (!part.isToken) return part.value;\n\n      const token = part.value;\n\n      if (\n        (!options?.useAdditionalWeekYearTokens &&\n          isProtectedWeekYearToken(token)) ||\n        (!options?.useAdditionalDayOfYearTokens &&\n          isProtectedDayOfYearToken(token))\n      ) {\n        warnOrThrowProtectedError(token, formatStr, String(date));\n      }\n\n      const formatter = formatters[token[0]];\n      return formatter(originalDate, token, locale.localize, formatterOptions);\n    })\n    .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n  const matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The day of week, 0 represents Sunday\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport function getDay(date) {\n  const _date = toDate(date);\n  const day = _date.getDay();\n  return day;\n}\n\n// Fallback for modularized imports:\nexport default getDay;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date) {\n  const _date = toDate(date);\n  const year = _date.getFullYear();\n  const monthIndex = _date.getMonth();\n  const lastDayOfMonth = constructFrom(date, 0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { getDefaultOptions as getInternalDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * @name getDefaultOptions\n * @category Common Helpers\n * @summary Get default options.\n * @pure false\n *\n * @description\n * Returns an object that contains defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).\n *\n * @returns The default options\n *\n * @example\n * const result = getDefaultOptions()\n * //=> {}\n *\n * @example\n * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })\n * const result = getDefaultOptions()\n * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }\n */\nexport function getDefaultOptions() {\n  return Object.assign({}, getInternalDefaultOptions());\n}\n\n// Fallback for modularized imports:\nexport default getDefaultOptions;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getHours\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * const result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\nexport function getHours(date) {\n  const _date = toDate(date);\n  const hours = _date.getHours();\n  return hours;\n}\n\n// Fallback for modularized imports:\nexport default getHours;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getISODay\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * const result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nexport function getISODay(date) {\n  const _date = toDate(date);\n  let day = _date.getDay();\n\n  if (day === 0) {\n    day = 7;\n  }\n\n  return day;\n}\n\n// Fallback for modularized imports:\nexport default getISODay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getMinutes\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nexport function getMinutes(date) {\n  const _date = toDate(date);\n  const minutes = _date.getMinutes();\n  return minutes;\n}\n\n// Fallback for modularized imports:\nexport default getMinutes;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date) {\n  const _date = toDate(date);\n  const month = _date.getMonth();\n  return month;\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nexport function getSeconds(date) {\n  const _date = toDate(date);\n  const seconds = _date.getSeconds();\n  return seconds;\n}\n\n// Fallback for modularized imports:\nexport default getSeconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date) {\n  return toDate(date).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n  const _date = toDate(date);\n  const _dateToCompare = toDate(dateToCompare);\n  return _date.getTime() > _dateToCompare.getTime();\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n  const _date = toDate(date);\n  const _dateToCompare = toDate(dateToCompare);\n  return +_date < +_dateToCompare;\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n *   new Date(2014, 6, 2, 6, 30, 45, 0),\n *   new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n  const _dateLeft = toDate(leftDate);\n  const _dateRight = toDate(rightDate);\n  return +_dateLeft === +_dateRight;\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name transpose\n * @category Generic Helpers\n * @summary Transpose the date to the given constructor.\n *\n * @description\n * The function transposes the date to the given constructor. It helps you\n * to transpose the date in the system time zone to say `UTCDate` or any other\n * date extension.\n *\n * @typeParam DateInputType - The input `Date` type derived from the passed argument.\n * @typeParam DateOutputType - The output `Date` type derived from the passed constructor.\n *\n * @param fromDate - The date to use values from\n * @param constructor - The date constructor to use\n *\n * @returns Date transposed to the given constructor\n *\n * @example\n * // Create July 10, 2022 00:00 in locale time zone\n * const date = new Date(2022, 6, 10)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'\n *\n * @example\n * // Transpose the date to July 10, 2022 00:00 in UTC\n * transpose(date, UTCDate)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'\n */\nexport function transpose(fromDate, constructor) {\n  const date =\n    constructor instanceof Date\n      ? constructFrom(constructor, 0)\n      : new constructor(0);\n  date.setFullYear(\n    fromDate.getFullYear(),\n    fromDate.getMonth(),\n    fromDate.getDate(),\n  );\n  date.setHours(\n    fromDate.getHours(),\n    fromDate.getMinutes(),\n    fromDate.getSeconds(),\n    fromDate.getMilliseconds(),\n  );\n  return date;\n}\n\n// Fallback for modularized imports:\nexport default transpose;\n","import { transpose } from \"../../transpose.mjs\";\nimport { constructFrom } from \"../../constructFrom.mjs\";\n\nconst TIMEZONE_UNIT_PRIORITY = 10;\n\nexport class Setter {\n  subPriority = 0;\n\n  validate(_utcDate, _options) {\n    return true;\n  }\n}\n\nexport class ValueSetter extends Setter {\n  constructor(\n    value,\n\n    validateValue,\n\n    setValue,\n\n    priority,\n    subPriority,\n  ) {\n    super();\n    this.value = value;\n    this.validateValue = validateValue;\n    this.setValue = setValue;\n    this.priority = priority;\n    if (subPriority) {\n      this.subPriority = subPriority;\n    }\n  }\n\n  validate(date, options) {\n    return this.validateValue(date, this.value, options);\n  }\n\n  set(date, flags, options) {\n    return this.setValue(date, flags, this.value, options);\n  }\n}\n\nexport class DateToSystemTimezoneSetter extends Setter {\n  priority = TIMEZONE_UNIT_PRIORITY;\n  subPriority = -1;\n  set(date, flags) {\n    if (flags.timestampIsSet) return date;\n    return constructFrom(date, transpose(date, Date));\n  }\n}\n","import { ValueSetter } from \"./Setter.mjs\";\n\nexport class Parser {\n  run(dateString, token, match, options) {\n    const result = this.parse(dateString, token, match, options);\n    if (!result) {\n      return null;\n    }\n\n    return {\n      setter: new ValueSetter(\n        result.value,\n        this.validate,\n        this.set,\n        this.priority,\n        this.subPriority,\n      ),\n      rest: result.rest,\n    };\n  }\n\n  validate(_utcDate, _value, _options) {\n    return true;\n  }\n}\n","import { Parser } from \"../Parser.mjs\";\n\nexport class EraParser extends Parser {\n  priority = 140;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // AD, BC\n      case \"G\":\n      case \"GG\":\n      case \"GGG\":\n        return (\n          match.era(dateString, { width: \"abbreviated\" }) ||\n          match.era(dateString, { width: \"narrow\" })\n        );\n\n      // A, B\n      case \"GGGGG\":\n        return match.era(dateString, { width: \"narrow\" });\n      // Anno Domini, Before Christ\n      case \"GGGG\":\n      default:\n        return (\n          match.era(dateString, { width: \"wide\" }) ||\n          match.era(dateString, { width: \"abbreviated\" }) ||\n          match.era(dateString, { width: \"narrow\" })\n        );\n    }\n  }\n\n  set(date, flags, value) {\n    flags.era = value;\n    date.setFullYear(value, 0, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"R\", \"u\", \"t\", \"T\"];\n}\n","export const numericPatterns = {\n  month: /^(1[0-2]|0?\\d)/, // 0 to 12\n  date: /^(3[0-1]|[0-2]?\\d)/, // 0 to 31\n  dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/, // 0 to 366\n  week: /^(5[0-3]|[0-4]?\\d)/, // 0 to 53\n  hour23h: /^(2[0-3]|[0-1]?\\d)/, // 0 to 23\n  hour24h: /^(2[0-4]|[0-1]?\\d)/, // 0 to 24\n  hour11h: /^(1[0-1]|0?\\d)/, // 0 to 11\n  hour12h: /^(1[0-2]|0?\\d)/, // 0 to 12\n  minute: /^[0-5]?\\d/, // 0 to 59\n  second: /^[0-5]?\\d/, // 0 to 59\n\n  singleDigit: /^\\d/, // 0 to 9\n  twoDigits: /^\\d{1,2}/, // 0 to 99\n  threeDigits: /^\\d{1,3}/, // 0 to 999\n  fourDigits: /^\\d{1,4}/, // 0 to 9999\n\n  anyDigitsSigned: /^-?\\d+/,\n  singleDigitSigned: /^-?\\d/, // 0 to 9, -0 to -9\n  twoDigitsSigned: /^-?\\d{1,2}/, // 0 to 99, -0 to -99\n  threeDigitsSigned: /^-?\\d{1,3}/, // 0 to 999, -0 to -999\n  fourDigitsSigned: /^-?\\d{1,4}/, // 0 to 9999, -0 to -9999\n};\n\nexport const timezonePatterns = {\n  basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n  basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n  basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n  extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n  extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/,\n};\n","import {\n  millisecondsInHour,\n  millisecondsInMinute,\n  millisecondsInSecond,\n} from \"../../constants.mjs\";\nimport { numericPatterns } from \"./constants.mjs\";\n\nexport function mapValue(parseFnResult, mapFn) {\n  if (!parseFnResult) {\n    return parseFnResult;\n  }\n\n  return {\n    value: mapFn(parseFnResult.value),\n    rest: parseFnResult.rest,\n  };\n}\n\nexport function parseNumericPattern(pattern, dateString) {\n  const matchResult = dateString.match(pattern);\n\n  if (!matchResult) {\n    return null;\n  }\n\n  return {\n    value: parseInt(matchResult[0], 10),\n    rest: dateString.slice(matchResult[0].length),\n  };\n}\n\nexport function parseTimezonePattern(pattern, dateString) {\n  const matchResult = dateString.match(pattern);\n\n  if (!matchResult) {\n    return null;\n  }\n\n  // Input is 'Z'\n  if (matchResult[0] === \"Z\") {\n    return {\n      value: 0,\n      rest: dateString.slice(1),\n    };\n  }\n\n  const sign = matchResult[1] === \"+\" ? 1 : -1;\n  const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n  const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n  const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n\n  return {\n    value:\n      sign *\n      (hours * millisecondsInHour +\n        minutes * millisecondsInMinute +\n        seconds * millisecondsInSecond),\n    rest: dateString.slice(matchResult[0].length),\n  };\n}\n\nexport function parseAnyDigitsSigned(dateString) {\n  return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\n\nexport function parseNDigits(n, dateString) {\n  switch (n) {\n    case 1:\n      return parseNumericPattern(numericPatterns.singleDigit, dateString);\n    case 2:\n      return parseNumericPattern(numericPatterns.twoDigits, dateString);\n    case 3:\n      return parseNumericPattern(numericPatterns.threeDigits, dateString);\n    case 4:\n      return parseNumericPattern(numericPatterns.fourDigits, dateString);\n    default:\n      return parseNumericPattern(new RegExp(\"^\\\\d{1,\" + n + \"}\"), dateString);\n  }\n}\n\nexport function parseNDigitsSigned(n, dateString) {\n  switch (n) {\n    case 1:\n      return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n    case 2:\n      return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n    case 3:\n      return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n    case 4:\n      return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n    default:\n      return parseNumericPattern(new RegExp(\"^-?\\\\d{1,\" + n + \"}\"), dateString);\n  }\n}\n\nexport function dayPeriodEnumToHours(dayPeriod) {\n  switch (dayPeriod) {\n    case \"morning\":\n      return 4;\n    case \"evening\":\n      return 17;\n    case \"pm\":\n    case \"noon\":\n    case \"afternoon\":\n      return 12;\n    case \"am\":\n    case \"midnight\":\n    case \"night\":\n    default:\n      return 0;\n  }\n}\n\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n  const isCommonEra = currentYear > 0;\n  // Absolute number of the current year:\n  // 1 -> 1 AC\n  // 0 -> 1 BC\n  // -1 -> 2 BC\n  const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n\n  let result;\n  if (absCurrentYear <= 50) {\n    result = twoDigitYear || 100;\n  } else {\n    const rangeEnd = absCurrentYear + 50;\n    const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100;\n    const isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n    result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n  }\n\n  return isCommonEra ? result : 1 - result;\n}\n\nexport function isLeapYearIndex(year) {\n  return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.mjs\";\n\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n// | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n// | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n// | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport class YearParser extends Parser {\n  priority = 130;\n  incompatibleTokens = [\"Y\", \"R\", \"u\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n\n  parse(dateString, token, match) {\n    const valueCallback = (year) => ({\n      year,\n      isTwoDigitYear: token === \"yy\",\n    });\n\n    switch (token) {\n      case \"y\":\n        return mapValue(parseNDigits(4, dateString), valueCallback);\n      case \"yo\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"year\",\n          }),\n          valueCallback,\n        );\n      default:\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n    }\n  }\n\n  validate(_date, value) {\n    return value.isTwoDigitYear || value.year > 0;\n  }\n\n  set(date, flags, value) {\n    const currentYear = date.getFullYear();\n\n    if (value.isTwoDigitYear) {\n      const normalizedTwoDigitYear = normalizeTwoDigitYear(\n        value.year,\n        currentYear,\n      );\n      date.setFullYear(normalizedTwoDigitYear, 0, 1);\n      date.setHours(0, 0, 0, 0);\n      return date;\n    }\n\n    const year =\n      !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n    date.setFullYear(year, 0, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n}\n","import { getWeekYear } from \"../../../getWeekYear.mjs\";\nimport { startOfWeek } from \"../../../startOfWeek.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.mjs\";\n\n// Local week-numbering year\nexport class LocalWeekYearParser extends Parser {\n  priority = 130;\n\n  parse(dateString, token, match) {\n    const valueCallback = (year) => ({\n      year,\n      isTwoDigitYear: token === \"YY\",\n    });\n\n    switch (token) {\n      case \"Y\":\n        return mapValue(parseNDigits(4, dateString), valueCallback);\n      case \"Yo\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"year\",\n          }),\n          valueCallback,\n        );\n      default:\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n    }\n  }\n\n  validate(_date, value) {\n    return value.isTwoDigitYear || value.year > 0;\n  }\n\n  set(date, flags, value, options) {\n    const currentYear = getWeekYear(date, options);\n\n    if (value.isTwoDigitYear) {\n      const normalizedTwoDigitYear = normalizeTwoDigitYear(\n        value.year,\n        currentYear,\n      );\n      date.setFullYear(\n        normalizedTwoDigitYear,\n        0,\n        options.firstWeekContainsDate,\n      );\n      date.setHours(0, 0, 0, 0);\n      return startOfWeek(date, options);\n    }\n\n    const year =\n      !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n    date.setFullYear(year, 0, options.firstWeekContainsDate);\n    date.setHours(0, 0, 0, 0);\n    return startOfWeek(date, options);\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"R\",\n    \"u\",\n    \"Q\",\n    \"q\",\n    \"M\",\n    \"L\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"i\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { startOfISOWeek } from \"../../../startOfISOWeek.mjs\";\nimport { constructFrom } from \"../../../constructFrom.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigitsSigned } from \"../utils.mjs\";\n\n// ISO week-numbering year\nexport class ISOWeekYearParser extends Parser {\n  priority = 130;\n\n  parse(dateString, token) {\n    if (token === \"R\") {\n      return parseNDigitsSigned(4, dateString);\n    }\n\n    return parseNDigitsSigned(token.length, dateString);\n  }\n\n  set(date, _flags, value) {\n    const firstWeekOfYear = constructFrom(date, 0);\n    firstWeekOfYear.setFullYear(value, 0, 4);\n    firstWeekOfYear.setHours(0, 0, 0, 0);\n    return startOfISOWeek(firstWeekOfYear);\n  }\n\n  incompatibleTokens = [\n    \"G\",\n    \"y\",\n    \"Y\",\n    \"u\",\n    \"Q\",\n    \"q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"d\",\n    \"D\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { parseNDigitsSigned } from \"../utils.mjs\";\n\nexport class ExtendedYearParser extends Parser {\n  priority = 130;\n\n  parse(dateString, token) {\n    if (token === \"u\") {\n      return parseNDigitsSigned(4, dateString);\n    }\n\n    return parseNDigitsSigned(token.length, dateString);\n  }\n\n  set(date, _flags, value) {\n    date.setFullYear(value, 0, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"G\", \"y\", \"Y\", \"R\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { parseNDigits } from \"../utils.mjs\";\n\nexport class QuarterParser extends Parser {\n  priority = 120;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"Q\":\n      case \"QQ\": // 01, 02, 03, 04\n        return parseNDigits(token.length, dateString);\n      // 1st, 2nd, 3rd, 4th\n      case \"Qo\":\n        return match.ordinalNumber(dateString, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"QQQ\":\n        return (\n          match.quarter(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"QQQQQ\":\n        return match.quarter(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"QQQQ\":\n      default:\n        return (\n          match.quarter(dateString, {\n            width: \"wide\",\n            context: \"formatting\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 4;\n  }\n\n  set(date, _flags, value) {\n    date.setMonth((value - 1) * 3, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { parseNDigits } from \"../utils.mjs\";\n\nexport class StandAloneQuarterParser extends Parser {\n  priority = 120;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"q\":\n      case \"qq\": // 01, 02, 03, 04\n        return parseNDigits(token.length, dateString);\n      // 1st, 2nd, 3rd, 4th\n      case \"qo\":\n        return match.ordinalNumber(dateString, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"qqq\":\n        return (\n          match.quarter(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"narrow\",\n            context: \"standalone\",\n          })\n        );\n\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"qqqqq\":\n        return match.quarter(dateString, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"qqqq\":\n      default:\n        return (\n          match.quarter(dateString, {\n            width: \"wide\",\n            context: \"standalone\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.quarter(dateString, {\n            width: \"narrow\",\n            context: \"standalone\",\n          })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 4;\n  }\n\n  set(date, _flags, value) {\n    date.setMonth((value - 1) * 3, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class MonthParser extends Parser {\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"q\",\n    \"Q\",\n    \"L\",\n    \"w\",\n    \"I\",\n    \"D\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n\n  priority = 110;\n\n  parse(dateString, token, match) {\n    const valueCallback = (value) => value - 1;\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"M\":\n        return mapValue(\n          parseNumericPattern(numericPatterns.month, dateString),\n          valueCallback,\n        );\n      // 01, 02, ..., 12\n      case \"MM\":\n        return mapValue(parseNDigits(2, dateString), valueCallback);\n      // 1st, 2nd, ..., 12th\n      case \"Mo\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"month\",\n          }),\n          valueCallback,\n        );\n      // Jan, Feb, ..., Dec\n      case \"MMM\":\n        return (\n          match.month(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n\n      // J, F, ..., D\n      case \"MMMMM\":\n        return match.month(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // January, February, ..., December\n      case \"MMMM\":\n      default:\n        return (\n          match.month(dateString, { width: \"wide\", context: \"formatting\" }) ||\n          match.month(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    date.setMonth(value, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class StandAloneMonthParser extends Parser {\n  priority = 110;\n\n  parse(dateString, token, match) {\n    const valueCallback = (value) => value - 1;\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"L\":\n        return mapValue(\n          parseNumericPattern(numericPatterns.month, dateString),\n          valueCallback,\n        );\n      // 01, 02, ..., 12\n      case \"LL\":\n        return mapValue(parseNDigits(2, dateString), valueCallback);\n      // 1st, 2nd, ..., 12th\n      case \"Lo\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"month\",\n          }),\n          valueCallback,\n        );\n      // Jan, Feb, ..., Dec\n      case \"LLL\":\n        return (\n          match.month(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n        );\n\n      // J, F, ..., D\n      case \"LLLLL\":\n        return match.month(dateString, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // January, February, ..., December\n      case \"LLLL\":\n      default:\n        return (\n          match.month(dateString, { width: \"wide\", context: \"standalone\" }) ||\n          match.month(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    date.setMonth(value, 1);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"w\",\n    \"I\",\n    \"D\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { getWeek } from \"./getWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link setWeek} function options.\n */\n\n/**\n * @name setWeek\n * @category Week Helpers\n * @summary Set the local week to the given date.\n *\n * @description\n * Set the local week to the given date, saving the weekday number.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param week - The week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the local week set\n *\n * @example\n * // Set the 1st week to 2 January 2005 with default options:\n * const result = setWeek(new Date(2005, 0, 2), 1)\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // Set the 1st week to 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January:\n * const result = setWeek(new Date(2005, 0, 2), 1, {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> Sun Jan 4 2004 00:00:00\n */\nexport function setWeek(date, week, options) {\n  const _date = toDate(date);\n  const diff = getWeek(_date, options) - week;\n  _date.setDate(_date.getDate() - diff * 7);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setWeek;\n","import { setWeek } from \"../../../setWeek.mjs\";\nimport { startOfWeek } from \"../../../startOfWeek.mjs\";\nimport { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\n// Local week of year\nexport class LocalWeekParser extends Parser {\n  priority = 100;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"w\":\n        return parseNumericPattern(numericPatterns.week, dateString);\n      case \"wo\":\n        return match.ordinalNumber(dateString, { unit: \"week\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 53;\n  }\n\n  set(date, _flags, value, options) {\n    return startOfWeek(setWeek(date, value, options), options);\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"R\",\n    \"u\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"i\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { getISOWeek } from \"./getISOWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setISOWeek\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param week - The ISO week of the new date\n *\n * @returns The new date with the ISO week set\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * const result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\nexport function setISOWeek(date, week) {\n  const _date = toDate(date);\n  const diff = getISOWeek(_date) - week;\n  _date.setDate(_date.getDate() - diff * 7);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setISOWeek;\n","import { setISOWeek } from \"../../../setISOWeek.mjs\";\nimport { startOfISOWeek } from \"../../../startOfISOWeek.mjs\";\nimport { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\n// ISO week of year\nexport class ISOWeekParser extends Parser {\n  priority = 100;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"I\":\n        return parseNumericPattern(numericPatterns.week, dateString);\n      case \"Io\":\n        return match.ordinalNumber(dateString, { unit: \"week\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 53;\n  }\n\n  set(date, _flags, value) {\n    return startOfISOWeek(setISOWeek(date, value));\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"Y\",\n    \"u\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"d\",\n    \"D\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport {\n  isLeapYearIndex,\n  parseNDigits,\n  parseNumericPattern,\n} from \"../utils.mjs\";\n\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [\n  31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,\n];\n\n// Day of the month\nexport class DateParser extends Parser {\n  priority = 90;\n  subPriority = 1;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"d\":\n        return parseNumericPattern(numericPatterns.date, dateString);\n      case \"do\":\n        return match.ordinalNumber(dateString, { unit: \"date\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(date, value) {\n    const year = date.getFullYear();\n    const isLeapYear = isLeapYearIndex(year);\n    const month = date.getMonth();\n    if (isLeapYear) {\n      return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n    } else {\n      return value >= 1 && value <= DAYS_IN_MONTH[month];\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setDate(value);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"q\",\n    \"Q\",\n    \"w\",\n    \"I\",\n    \"D\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport {\n  isLeapYearIndex,\n  parseNDigits,\n  parseNumericPattern,\n} from \"../utils.mjs\";\n\nexport class DayOfYearParser extends Parser {\n  priority = 90;\n\n  subpriority = 1;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"D\":\n      case \"DD\":\n        return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n      case \"Do\":\n        return match.ordinalNumber(dateString, { unit: \"date\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(date, value) {\n    const year = date.getFullYear();\n    const isLeapYear = isLeapYearIndex(year);\n    if (isLeapYear) {\n      return value >= 1 && value <= 366;\n    } else {\n      return value >= 1 && value <= 365;\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setMonth(0, value);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"Y\",\n    \"R\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"I\",\n    \"d\",\n    \"E\",\n    \"i\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { addDays } from \"./addDays.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link setDay} function options.\n */\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param day - The day of the week of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the day of the week set\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * const result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setDay(date, day, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date);\n  const currentDay = _date.getDay();\n\n  const remainder = day % 7;\n  const dayIndex = (remainder + 7) % 7;\n\n  const delta = 7 - weekStartsOn;\n  const diff =\n    day < 0 || day > 6\n      ? day - ((currentDay + delta) % 7)\n      : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);\n  return addDays(_date, diff);\n}\n\n// Fallback for modularized imports:\nexport default setDay;\n","import { setDay } from \"../../../setDay.mjs\";\nimport { Parser } from \"../Parser.mjs\";\n\n// Day of week\nexport class DayParser extends Parser {\n  priority = 90;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // Tue\n      case \"E\":\n      case \"EE\":\n      case \"EEE\":\n        return (\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n\n      // T\n      case \"EEEEE\":\n        return match.day(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"EEEEEE\":\n        return (\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n\n      // Tuesday\n      case \"EEEE\":\n      default:\n        return (\n          match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setDay(date, value, options);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"D\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n","import { setDay } from \"../../../setDay.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits } from \"../utils.mjs\";\n\n// Local day of week\nexport class LocalDayParser extends Parser {\n  priority = 90;\n  parse(dateString, token, match, options) {\n    const valueCallback = (value) => {\n      // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n      const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n      return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n    };\n\n    switch (token) {\n      // 3\n      case \"e\":\n      case \"ee\": // 03\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n      // 3rd\n      case \"eo\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"day\",\n          }),\n          valueCallback,\n        );\n      // Tue\n      case \"eee\":\n        return (\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n\n      // T\n      case \"eeeee\":\n        return match.day(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"eeeeee\":\n        return (\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n\n      // Tuesday\n      case \"eeee\":\n      default:\n        return (\n          match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setDay(date, value, options);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"R\",\n    \"u\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"E\",\n    \"i\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { setDay } from \"../../../setDay.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits } from \"../utils.mjs\";\n\n// Stand-alone local day of week\nexport class StandAloneLocalDayParser extends Parser {\n  priority = 90;\n\n  parse(dateString, token, match, options) {\n    const valueCallback = (value) => {\n      // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n      const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n      return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n    };\n\n    switch (token) {\n      // 3\n      case \"c\":\n      case \"cc\": // 03\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n      // 3rd\n      case \"co\":\n        return mapValue(\n          match.ordinalNumber(dateString, {\n            unit: \"day\",\n          }),\n          valueCallback,\n        );\n      // Tue\n      case \"ccc\":\n        return (\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n        );\n\n      // T\n      case \"ccccc\":\n        return match.day(dateString, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // Tu\n      case \"cccccc\":\n        return (\n          match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n        );\n\n      // Tuesday\n      case \"cccc\":\n      default:\n        return (\n          match.day(dateString, { width: \"wide\", context: \"standalone\" }) ||\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"standalone\",\n          }) ||\n          match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n          match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setDay(date, value, options);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"R\",\n    \"u\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"I\",\n    \"d\",\n    \"D\",\n    \"E\",\n    \"i\",\n    \"e\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { addDays } from \"./addDays.mjs\";\nimport { getISODay } from \"./getISODay.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setISODay\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday etc.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param day - The day of the ISO week of the new date\n *\n * @returns The new date with the day of the ISO week set\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * const result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setISODay(date, day) {\n  const _date = toDate(date);\n  const currentDay = getISODay(_date);\n  const diff = day - currentDay;\n  return addDays(_date, diff);\n}\n\n// Fallback for modularized imports:\nexport default setISODay;\n","import { setISODay } from \"../../../setISODay.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits } from \"../utils.mjs\";\n\n// ISO day of week\nexport class ISODayParser extends Parser {\n  priority = 90;\n\n  parse(dateString, token, match) {\n    const valueCallback = (value) => {\n      if (value === 0) {\n        return 7;\n      }\n      return value;\n    };\n\n    switch (token) {\n      // 2\n      case \"i\":\n      case \"ii\": // 02\n        return parseNDigits(token.length, dateString);\n      // 2nd\n      case \"io\":\n        return match.ordinalNumber(dateString, { unit: \"day\" });\n      // Tue\n      case \"iii\":\n        return mapValue(\n          match.day(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n            match.day(dateString, {\n              width: \"short\",\n              context: \"formatting\",\n            }) ||\n            match.day(dateString, {\n              width: \"narrow\",\n              context: \"formatting\",\n            }),\n          valueCallback,\n        );\n      // T\n      case \"iiiii\":\n        return mapValue(\n          match.day(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          }),\n          valueCallback,\n        );\n      // Tu\n      case \"iiiiii\":\n        return mapValue(\n          match.day(dateString, {\n            width: \"short\",\n            context: \"formatting\",\n          }) ||\n            match.day(dateString, {\n              width: \"narrow\",\n              context: \"formatting\",\n            }),\n          valueCallback,\n        );\n      // Tuesday\n      case \"iiii\":\n      default:\n        return mapValue(\n          match.day(dateString, {\n            width: \"wide\",\n            context: \"formatting\",\n          }) ||\n            match.day(dateString, {\n              width: \"abbreviated\",\n              context: \"formatting\",\n            }) ||\n            match.day(dateString, {\n              width: \"short\",\n              context: \"formatting\",\n            }) ||\n            match.day(dateString, {\n              width: \"narrow\",\n              context: \"formatting\",\n            }),\n          valueCallback,\n        );\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 7;\n  }\n\n  set(date, _flags, value) {\n    date = setISODay(date, value);\n    date.setHours(0, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\n    \"y\",\n    \"Y\",\n    \"u\",\n    \"q\",\n    \"Q\",\n    \"M\",\n    \"L\",\n    \"w\",\n    \"d\",\n    \"D\",\n    \"E\",\n    \"e\",\n    \"c\",\n    \"t\",\n    \"T\",\n  ];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { dayPeriodEnumToHours } from \"../utils.mjs\";\n\nexport class AMPMParser extends Parser {\n  priority = 80;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n      case \"aaa\":\n        return (\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n\n      case \"aaaaa\":\n        return match.dayPeriod(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"aaaa\":\n      default:\n        return (\n          match.dayPeriod(dateString, {\n            width: \"wide\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"b\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { dayPeriodEnumToHours } from \"../utils.mjs\";\n\nexport class AMPMMidnightParser extends Parser {\n  priority = 80;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"b\":\n      case \"bb\":\n      case \"bbb\":\n        return (\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n\n      case \"bbbbb\":\n        return match.dayPeriod(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"bbbb\":\n      default:\n        return (\n          match.dayPeriod(dateString, {\n            width: \"wide\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"a\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { dayPeriodEnumToHours } from \"../utils.mjs\";\n\n// in the morning, in the afternoon, in the evening, at night\nexport class DayPeriodParser extends Parser {\n  priority = 80;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"B\":\n      case \"BB\":\n      case \"BBB\":\n        return (\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n\n      case \"BBBBB\":\n        return match.dayPeriod(dateString, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"BBBB\":\n      default:\n        return (\n          match.dayPeriod(dateString, {\n            width: \"wide\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          }) ||\n          match.dayPeriod(dateString, {\n            width: \"narrow\",\n            context: \"formatting\",\n          })\n        );\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"a\", \"b\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class Hour1to12Parser extends Parser {\n  priority = 70;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"h\":\n        return parseNumericPattern(numericPatterns.hour12h, dateString);\n      case \"ho\":\n        return match.ordinalNumber(dateString, { unit: \"hour\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 12;\n  }\n\n  set(date, _flags, value) {\n    const isPM = date.getHours() >= 12;\n    if (isPM && value < 12) {\n      date.setHours(value + 12, 0, 0, 0);\n    } else if (!isPM && value === 12) {\n      date.setHours(0, 0, 0, 0);\n    } else {\n      date.setHours(value, 0, 0, 0);\n    }\n    return date;\n  }\n\n  incompatibleTokens = [\"H\", \"K\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class Hour0to23Parser extends Parser {\n  priority = 70;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"H\":\n        return parseNumericPattern(numericPatterns.hour23h, dateString);\n      case \"Ho\":\n        return match.ordinalNumber(dateString, { unit: \"hour\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 23;\n  }\n\n  set(date, _flags, value) {\n    date.setHours(value, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"a\", \"b\", \"h\", \"K\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class Hour0To11Parser extends Parser {\n  priority = 70;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"K\":\n        return parseNumericPattern(numericPatterns.hour11h, dateString);\n      case \"Ko\":\n        return match.ordinalNumber(dateString, { unit: \"hour\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    const isPM = date.getHours() >= 12;\n    if (isPM && value < 12) {\n      date.setHours(value + 12, 0, 0, 0);\n    } else {\n      date.setHours(value, 0, 0, 0);\n    }\n    return date;\n  }\n\n  incompatibleTokens = [\"h\", \"H\", \"k\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class Hour1To24Parser extends Parser {\n  priority = 70;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"k\":\n        return parseNumericPattern(numericPatterns.hour24h, dateString);\n      case \"ko\":\n        return match.ordinalNumber(dateString, { unit: \"hour\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 24;\n  }\n\n  set(date, _flags, value) {\n    const hours = value <= 24 ? value % 24 : value;\n    date.setHours(hours, 0, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"a\", \"b\", \"h\", \"H\", \"K\", \"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class MinuteParser extends Parser {\n  priority = 60;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"m\":\n        return parseNumericPattern(numericPatterns.minute, dateString);\n      case \"mo\":\n        return match.ordinalNumber(dateString, { unit: \"minute\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 59;\n  }\n\n  set(date, _flags, value) {\n    date.setMinutes(value, 0, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"t\", \"T\"];\n}\n","import { numericPatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseNDigits, parseNumericPattern } from \"../utils.mjs\";\n\nexport class SecondParser extends Parser {\n  priority = 50;\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case \"s\":\n        return parseNumericPattern(numericPatterns.second, dateString);\n      case \"so\":\n        return match.ordinalNumber(dateString, { unit: \"second\" });\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 59;\n  }\n\n  set(date, _flags, value) {\n    date.setSeconds(value, 0);\n    return date;\n  }\n\n  incompatibleTokens = [\"t\", \"T\"];\n}\n","import { Parser } from \"../Parser.mjs\";\nimport { mapValue, parseNDigits } from \"../utils.mjs\";\n\nexport class FractionOfSecondParser extends Parser {\n  priority = 30;\n\n  parse(dateString, token) {\n    const valueCallback = (value) =>\n      Math.trunc(value * Math.pow(10, -token.length + 3));\n    return mapValue(parseNDigits(token.length, dateString), valueCallback);\n  }\n\n  set(date, _flags, value) {\n    date.setMilliseconds(value);\n    return date;\n  }\n\n  incompatibleTokens = [\"t\", \"T\"];\n}\n","import { constructFrom } from \"../../../constructFrom.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.mjs\";\nimport { timezonePatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseTimezonePattern } from \"../utils.mjs\";\n\n// Timezone (ISO-8601. +00:00 is `'Z'`)\nexport class ISOTimezoneWithZParser extends Parser {\n  priority = 10;\n\n  parse(dateString, token) {\n    switch (token) {\n      case \"X\":\n        return parseTimezonePattern(\n          timezonePatterns.basicOptionalMinutes,\n          dateString,\n        );\n      case \"XX\":\n        return parseTimezonePattern(timezonePatterns.basic, dateString);\n      case \"XXXX\":\n        return parseTimezonePattern(\n          timezonePatterns.basicOptionalSeconds,\n          dateString,\n        );\n      case \"XXXXX\":\n        return parseTimezonePattern(\n          timezonePatterns.extendedOptionalSeconds,\n          dateString,\n        );\n      case \"XXX\":\n      default:\n        return parseTimezonePattern(timezonePatterns.extended, dateString);\n    }\n  }\n\n  set(date, flags, value) {\n    if (flags.timestampIsSet) return date;\n    return constructFrom(\n      date,\n      date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n    );\n  }\n\n  incompatibleTokens = [\"t\", \"T\", \"x\"];\n}\n","import { constructFrom } from \"../../../constructFrom.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.mjs\";\nimport { timezonePatterns } from \"../constants.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseTimezonePattern } from \"../utils.mjs\";\n\n// Timezone (ISO-8601)\nexport class ISOTimezoneParser extends Parser {\n  priority = 10;\n\n  parse(dateString, token) {\n    switch (token) {\n      case \"x\":\n        return parseTimezonePattern(\n          timezonePatterns.basicOptionalMinutes,\n          dateString,\n        );\n      case \"xx\":\n        return parseTimezonePattern(timezonePatterns.basic, dateString);\n      case \"xxxx\":\n        return parseTimezonePattern(\n          timezonePatterns.basicOptionalSeconds,\n          dateString,\n        );\n      case \"xxxxx\":\n        return parseTimezonePattern(\n          timezonePatterns.extendedOptionalSeconds,\n          dateString,\n        );\n      case \"xxx\":\n      default:\n        return parseTimezonePattern(timezonePatterns.extended, dateString);\n    }\n  }\n\n  set(date, flags, value) {\n    if (flags.timestampIsSet) return date;\n    return constructFrom(\n      date,\n      date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n    );\n  }\n\n  incompatibleTokens = [\"t\", \"T\", \"X\"];\n}\n","import { constructFrom } from \"../../../constructFrom.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseAnyDigitsSigned } from \"../utils.mjs\";\n\nexport class TimestampSecondsParser extends Parser {\n  priority = 40;\n\n  parse(dateString) {\n    return parseAnyDigitsSigned(dateString);\n  }\n\n  set(date, _flags, value) {\n    return [constructFrom(date, value * 1000), { timestampIsSet: true }];\n  }\n\n  incompatibleTokens = \"*\";\n}\n","import { constructFrom } from \"../../../constructFrom.mjs\";\nimport { Parser } from \"../Parser.mjs\";\nimport { parseAnyDigitsSigned } from \"../utils.mjs\";\n\nexport class TimestampMillisecondsParser extends Parser {\n  priority = 20;\n\n  parse(dateString) {\n    return parseAnyDigitsSigned(dateString);\n  }\n\n  set(date, _flags, value) {\n    return [constructFrom(date, value), { timestampIsSet: true }];\n  }\n\n  incompatibleTokens = \"*\";\n}\n","import { EraParser } from \"./parsers/EraParser.mjs\";\nimport { YearParser } from \"./parsers/YearParser.mjs\";\nimport { LocalWeekYearParser } from \"./parsers/LocalWeekYearParser.mjs\";\nimport { ISOWeekYearParser } from \"./parsers/ISOWeekYearParser.mjs\";\nimport { ExtendedYearParser } from \"./parsers/ExtendedYearParser.mjs\";\nimport { QuarterParser } from \"./parsers/QuarterParser.mjs\";\nimport { StandAloneQuarterParser } from \"./parsers/StandAloneQuarterParser.mjs\";\nimport { MonthParser } from \"./parsers/MonthParser.mjs\";\nimport { StandAloneMonthParser } from \"./parsers/StandAloneMonthParser.mjs\";\nimport { LocalWeekParser } from \"./parsers/LocalWeekParser.mjs\";\nimport { ISOWeekParser } from \"./parsers/ISOWeekParser.mjs\";\nimport { DateParser } from \"./parsers/DateParser.mjs\";\nimport { DayOfYearParser } from \"./parsers/DayOfYearParser.mjs\";\nimport { DayParser } from \"./parsers/DayParser.mjs\";\nimport { LocalDayParser } from \"./parsers/LocalDayParser.mjs\";\nimport { StandAloneLocalDayParser } from \"./parsers/StandAloneLocalDayParser.mjs\";\nimport { ISODayParser } from \"./parsers/ISODayParser.mjs\";\nimport { AMPMParser } from \"./parsers/AMPMParser.mjs\";\nimport { AMPMMidnightParser } from \"./parsers/AMPMMidnightParser.mjs\";\nimport { DayPeriodParser } from \"./parsers/DayPeriodParser.mjs\";\nimport { Hour1to12Parser } from \"./parsers/Hour1to12Parser.mjs\";\nimport { Hour0to23Parser } from \"./parsers/Hour0to23Parser.mjs\";\nimport { Hour0To11Parser } from \"./parsers/Hour0To11Parser.mjs\";\nimport { Hour1To24Parser } from \"./parsers/Hour1To24Parser.mjs\";\nimport { MinuteParser } from \"./parsers/MinuteParser.mjs\";\nimport { SecondParser } from \"./parsers/SecondParser.mjs\";\nimport { FractionOfSecondParser } from \"./parsers/FractionOfSecondParser.mjs\";\nimport { ISOTimezoneWithZParser } from \"./parsers/ISOTimezoneWithZParser.mjs\";\nimport { ISOTimezoneParser } from \"./parsers/ISOTimezoneParser.mjs\";\nimport { TimestampSecondsParser } from \"./parsers/TimestampSecondsParser.mjs\";\nimport { TimestampMillisecondsParser } from \"./parsers/TimestampMillisecondsParser.mjs\";\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O* | Timezone (GMT)                 |\n * |  p  |                                |  P  |                                |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z* | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- It's ok, we want any here\nexport const parsers = {\n  G: new EraParser(),\n  y: new YearParser(),\n  Y: new LocalWeekYearParser(),\n  R: new ISOWeekYearParser(),\n  u: new ExtendedYearParser(),\n  Q: new QuarterParser(),\n  q: new StandAloneQuarterParser(),\n  M: new MonthParser(),\n  L: new StandAloneMonthParser(),\n  w: new LocalWeekParser(),\n  I: new ISOWeekParser(),\n  d: new DateParser(),\n  D: new DayOfYearParser(),\n  E: new DayParser(),\n  e: new LocalDayParser(),\n  c: new StandAloneLocalDayParser(),\n  i: new ISODayParser(),\n  a: new AMPMParser(),\n  b: new AMPMMidnightParser(),\n  B: new DayPeriodParser(),\n  h: new Hour1to12Parser(),\n  H: new Hour0to23Parser(),\n  K: new Hour0To11Parser(),\n  k: new Hour1To24Parser(),\n  m: new MinuteParser(),\n  s: new SecondParser(),\n  S: new FractionOfSecondParser(),\n  X: new ISOTimezoneWithZParser(),\n  x: new ISOTimezoneParser(),\n  t: new TimestampSecondsParser(),\n  T: new TimestampMillisecondsParser(),\n};\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { getDefaultOptions } from \"./getDefaultOptions.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { longFormatters } from \"./_lib/format/longFormatters.mjs\";\nimport {\n  isProtectedDayOfYearToken,\n  isProtectedWeekYearToken,\n  warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.mjs\";\nimport { parsers } from \"./parse/_lib/parsers.mjs\";\nimport { DateToSystemTimezoneSetter } from \"./parse/_lib/Setter.mjs\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { longFormatters, parsers };\n\n/**\n * The {@link parse} function options.\n */\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n  /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\n\nconst notWhitespaceRegExp = /\\S/;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit                            |Prior| Pattern | Result examples                   | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era                             | 140 | G..GGG  | AD, BC                            |       |\n * |                                 |     | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 |     | GGGGG   | A, B                              |       |\n * | Calendar year                   | 130 | y       | 44, 1, 1900, 2017, 9999           | 4     |\n * |                                 |     | yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |\n * |                                 |     | yy      | 44, 01, 00, 17                    | 4     |\n * |                                 |     | yyy     | 044, 001, 123, 999                | 4     |\n * |                                 |     | yyyy    | 0044, 0001, 1900, 2017            | 4     |\n * |                                 |     | yyyyy   | ...                               | 2,4   |\n * | Local week-numbering year       | 130 | Y       | 44, 1, 1900, 2017, 9000           | 4     |\n * |                                 |     | Yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |\n * |                                 |     | YY      | 44, 01, 00, 17                    | 4,6   |\n * |                                 |     | YYY     | 044, 001, 123, 999                | 4     |\n * |                                 |     | YYYY    | 0044, 0001, 1900, 2017            | 4,6   |\n * |                                 |     | YYYYY   | ...                               | 2,4   |\n * | ISO week-numbering year         | 130 | R       | -43, 1, 1900, 2017, 9999, -9999   | 4,5   |\n * |                                 |     | RR      | -43, 01, 00, 17                   | 4,5   |\n * |                                 |     | RRR     | -043, 001, 123, 999, -999         | 4,5   |\n * |                                 |     | RRRR    | -0043, 0001, 2017, 9999, -9999    | 4,5   |\n * |                                 |     | RRRRR   | ...                               | 2,4,5 |\n * | Extended year                   | 130 | u       | -43, 1, 1900, 2017, 9999, -999    | 4     |\n * |                                 |     | uu      | -43, 01, 99, -99                  | 4     |\n * |                                 |     | uuu     | -043, 001, 123, 999, -999         | 4     |\n * |                                 |     | uuuu    | -0043, 0001, 2017, 9999, -9999    | 4     |\n * |                                 |     | uuuuu   | ...                               | 2,4   |\n * | Quarter (formatting)            | 120 | Q       | 1, 2, 3, 4                        |       |\n * |                                 |     | Qo      | 1st, 2nd, 3rd, 4th                | 5     |\n * |                                 |     | QQ      | 01, 02, 03, 04                    |       |\n * |                                 |     | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 |     | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 |     | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | 120 | q       | 1, 2, 3, 4                        |       |\n * |                                 |     | qo      | 1st, 2nd, 3rd, 4th                | 5     |\n * |                                 |     | qq      | 01, 02, 03, 04                    |       |\n * |                                 |     | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 |     | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 |     | qqqqq   | 1, 2, 3, 4                        | 3     |\n * | Month (formatting)              | 110 | M       | 1, 2, ..., 12                     |       |\n * |                                 |     | Mo      | 1st, 2nd, ..., 12th               | 5     |\n * |                                 |     | MM      | 01, 02, ..., 12                   |       |\n * |                                 |     | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 |     | MMMM    | January, February, ..., December  | 2     |\n * |                                 |     | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | 110 | L       | 1, 2, ..., 12                     |       |\n * |                                 |     | Lo      | 1st, 2nd, ..., 12th               | 5     |\n * |                                 |     | LL      | 01, 02, ..., 12                   |       |\n * |                                 |     | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 |     | LLLL    | January, February, ..., December  | 2     |\n * |                                 |     | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | 100 | w       | 1, 2, ..., 53                     |       |\n * |                                 |     | wo      | 1st, 2nd, ..., 53th               | 5     |\n * |                                 |     | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | 100 | I       | 1, 2, ..., 53                     | 5     |\n * |                                 |     | Io      | 1st, 2nd, ..., 53th               | 5     |\n * |                                 |     | II      | 01, 02, ..., 53                   | 5     |\n * | Day of month                    |  90 | d       | 1, 2, ..., 31                     |       |\n * |                                 |     | do      | 1st, 2nd, ..., 31st               | 5     |\n * |                                 |     | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     |  90 | D       | 1, 2, ..., 365, 366               | 7     |\n * |                                 |     | Do      | 1st, 2nd, ..., 365th, 366th       | 5     |\n * |                                 |     | DD      | 01, 02, ..., 365, 366             | 7     |\n * |                                 |     | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 |     | DDDD    | ...                               | 2     |\n * | Day of week (formatting)        |  90 | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 |     | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    |  90 | i       | 1, 2, 3, ..., 7                   | 5     |\n * |                                 |     | io      | 1st, 2nd, ..., 7th                | 5     |\n * |                                 |     | ii      | 01, 02, ..., 07                   | 5     |\n * |                                 |     | iii     | Mon, Tue, Wed, ..., Sun           | 5     |\n * |                                 |     | iiii    | Monday, Tuesday, ..., Sunday      | 2,5   |\n * |                                 |     | iiiii   | M, T, W, T, F, S, S               | 5     |\n * |                                 |     | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 5     |\n * | Local day of week (formatting)  |  90 | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 |     | eo      | 2nd, 3rd, ..., 1st                | 5     |\n * |                                 |     | ee      | 02, 03, ..., 01                   |       |\n * |                                 |     | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 |     | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) |  90 | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 |     | co      | 2nd, 3rd, ..., 1st                | 5     |\n * |                                 |     | cc      | 02, 03, ..., 01                   |       |\n * |                                 |     | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 |     | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          |  80 | a..aaa  | AM, PM                            |       |\n * |                                 |     | aaaa    | a.m., p.m.                        | 2     |\n * |                                 |     | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          |  80 | b..bbb  | AM, PM, noon, midnight            |       |\n * |                                 |     | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 |     | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             |  80 | B..BBB  | at night, in the morning, ...     |       |\n * |                                 |     | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 |     | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     |  70 | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 |     | ho      | 1st, 2nd, ..., 11th, 12th         | 5     |\n * |                                 |     | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     |  70 | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 |     | Ho      | 0th, 1st, 2nd, ..., 23rd          | 5     |\n * |                                 |     | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     |  70 | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 |     | Ko      | 1st, 2nd, ..., 11th, 0th          | 5     |\n * |                                 |     | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     |  70 | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 |     | ko      | 24th, 1st, 2nd, ..., 23rd         | 5     |\n * |                                 |     | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          |  60 | m       | 0, 1, ..., 59                     |       |\n * |                                 |     | mo      | 0th, 1st, ..., 59th               | 5     |\n * |                                 |     | mm      | 00, 01, ..., 59                   |       |\n * | Second                          |  50 | s       | 0, 1, ..., 59                     |       |\n * |                                 |     | so      | 0th, 1st, ..., 59th               | 5     |\n * |                                 |     | ss      | 00, 01, ..., 59                   |       |\n * | Seconds timestamp               |  40 | t       | 512969520                         |       |\n * |                                 |     | tt      | ...                               | 2     |\n * | Fraction of second              |  30 | S       | 0, 1, ..., 9                      |       |\n * |                                 |     | SS      | 00, 01, ..., 99                   |       |\n * |                                 |     | SSS     | 000, 001, ..., 999                |       |\n * |                                 |     | SSSS    | ...                               | 2     |\n * | Milliseconds timestamp          |  20 | T       | 512969520900                      |       |\n * |                                 |     | TT      | ...                               | 2     |\n * | Timezone (ISO-8601 w/ Z)        |  10 | X       | -08, +0530, Z                     |       |\n * |                                 |     | XX      | -0800, +0530, Z                   |       |\n * |                                 |     | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 |     | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 |     | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       |  10 | x       | -08, +0530, +00                   |       |\n * |                                 |     | xx      | -0800, +0530, +0000               |       |\n * |                                 |     | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 |     | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 |     | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Long localized date             |  NA | P       | 05/29/1453                        | 5,8   |\n * |                                 |     | PP      | May 29, 1453                      |       |\n * |                                 |     | PPP     | May 29th, 1453                    |       |\n * |                                 |     | PPPP    | Sunday, May 29th, 1453            | 2,5,8 |\n * | Long localized time             |  NA | p       | 12:00 AM                          | 5,8   |\n * |                                 |     | pp      | 12:00:00 AM                       |       |\n * | Combination of date and time    |  NA | Pp      | 05/29/1453, 12:00 AM              |       |\n * |                                 |     | PPpp    | May 29, 1453, 12:00:00 AM         |       |\n * |                                 |     | PPPpp   | May 29th, 1453 at ...             |       |\n * |                                 |     | PPPPpp  | Sunday, May 29th, 1453 at ...     | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular.\n *    In `format` function, they will produce different result:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n *    `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table:\n *    - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n *      as wide as the sequence\n *    - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n *      These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n *    `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n *    `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n *    while `uu` will just assign the year as is:\n *\n *    `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n *    `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)\n *    and [setWeekYear](https://date-fns.org/docs/setWeekYear)).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n *    on the given locale.\n *\n *    using `en-US` locale: `P` => `MM/dd/yyyy`\n *    using `en-US` locale: `p` => `hh:mm a`\n *    using `pt-BR` locale: `P` => `dd/MM/yyyy`\n *    using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateStr - The string to parse\n * @param formatStr - The string of tokens\n * @param referenceDate - defines values missing from the parsed dateString\n * @param options - An object with options.\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @returns The parsed date\n *\n * @throws `options.locale` must contain `match` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n *   locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\nexport function parse(dateStr, formatStr, referenceDate, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  if (formatStr === \"\") {\n    if (dateStr === \"\") {\n      return toDate(referenceDate);\n    } else {\n      return constructFrom(referenceDate, NaN);\n    }\n  }\n\n  const subFnOptions = {\n    firstWeekContainsDate,\n    weekStartsOn,\n    locale,\n  };\n\n  // If timezone isn't specified, it will be set to the system timezone\n  const setters = [new DateToSystemTimezoneSetter()];\n\n  const tokens = formatStr\n    .match(longFormattingTokensRegExp)\n    .map((substring) => {\n      const firstCharacter = substring[0];\n      if (firstCharacter in longFormatters) {\n        const longFormatter = longFormatters[firstCharacter];\n        return longFormatter(substring, locale.formatLong);\n      }\n      return substring;\n    })\n    .join(\"\")\n    .match(formattingTokensRegExp);\n\n  const usedTokens = [];\n\n  for (let token of tokens) {\n    if (\n      !options?.useAdditionalWeekYearTokens &&\n      isProtectedWeekYearToken(token)\n    ) {\n      warnOrThrowProtectedError(token, formatStr, dateStr);\n    }\n    if (\n      !options?.useAdditionalDayOfYearTokens &&\n      isProtectedDayOfYearToken(token)\n    ) {\n      warnOrThrowProtectedError(token, formatStr, dateStr);\n    }\n\n    const firstCharacter = token[0];\n    const parser = parsers[firstCharacter];\n    if (parser) {\n      const { incompatibleTokens } = parser;\n      if (Array.isArray(incompatibleTokens)) {\n        const incompatibleToken = usedTokens.find(\n          (usedToken) =>\n            incompatibleTokens.includes(usedToken.token) ||\n            usedToken.token === firstCharacter,\n        );\n        if (incompatibleToken) {\n          throw new RangeError(\n            `The format string mustn't contain \\`${incompatibleToken.fullToken}\\` and \\`${token}\\` at the same time`,\n          );\n        }\n      } else if (parser.incompatibleTokens === \"*\" && usedTokens.length > 0) {\n        throw new RangeError(\n          `The format string mustn't contain \\`${token}\\` and any other token at the same time`,\n        );\n      }\n\n      usedTokens.push({ token: firstCharacter, fullToken: token });\n\n      const parseResult = parser.run(\n        dateStr,\n        token,\n        locale.match,\n        subFnOptions,\n      );\n\n      if (!parseResult) {\n        return constructFrom(referenceDate, NaN);\n      }\n\n      setters.push(parseResult.setter);\n\n      dateStr = parseResult.rest;\n    } else {\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError(\n          \"Format string contains an unescaped latin alphabet character `\" +\n            firstCharacter +\n            \"`\",\n        );\n      }\n\n      // Replace two single quote characters with one single quote character\n      if (token === \"''\") {\n        token = \"'\";\n      } else if (firstCharacter === \"'\") {\n        token = cleanEscapedString(token);\n      }\n\n      // Cut token from string, or, if string doesn't match the token, return Invalid Date\n      if (dateStr.indexOf(token) === 0) {\n        dateStr = dateStr.slice(token.length);\n      } else {\n        return constructFrom(referenceDate, NaN);\n      }\n    }\n  }\n\n  // Check if the remaining input contains something other than whitespace\n  if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {\n    return constructFrom(referenceDate, NaN);\n  }\n\n  const uniquePrioritySetters = setters\n    .map((setter) => setter.priority)\n    .sort((a, b) => b - a)\n    .filter((priority, index, array) => array.indexOf(priority) === index)\n    .map((priority) =>\n      setters\n        .filter((setter) => setter.priority === priority)\n        .sort((a, b) => b.subPriority - a.subPriority),\n    )\n    .map((setterArray) => setterArray[0]);\n\n  let date = toDate(referenceDate);\n\n  if (isNaN(date.getTime())) {\n    return constructFrom(referenceDate, NaN);\n  }\n\n  const flags = {};\n  for (const setter of uniquePrioritySetters) {\n    if (!setter.validate(date, subFnOptions)) {\n      return constructFrom(referenceDate, NaN);\n    }\n\n    const result = setter.set(date, flags, subFnOptions);\n    // Result is tuple (date, flags)\n    if (Array.isArray(result)) {\n      date = result[0];\n      Object.assign(flags, result[1]);\n      // Result is date\n    } else {\n      date = result;\n    }\n  }\n\n  return constructFrom(referenceDate, date);\n}\n\nfunction cleanEscapedString(input) {\n  return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default parse;\n","import { startOfQuarter } from \"./startOfQuarter.mjs\";\n\n/**\n * @name isSameQuarter\n * @category Quarter Helpers\n * @summary Are the given dates in the same quarter (and year)?\n *\n * @description\n * Are the given dates in the same quarter (and year)?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to check\n * @param dateRight - The second date to check\n\n * @returns The dates are in the same quarter (and year)\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))\n * //=> true\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameQuarter(dateLeft, dateRight) {\n  const dateLeftStartOfQuarter = startOfQuarter(dateLeft);\n  const dateRightStartOfQuarter = startOfQuarter(dateRight);\n\n  return +dateLeftStartOfQuarter === +dateRightStartOfQuarter;\n}\n\n// Fallback for modularized imports:\nexport default isSameQuarter;\n","import { addDays } from \"./addDays.mjs\";\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount) {\n  return addDays(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { getDaysInMonth } from \"./getDaysInMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month) {\n  const _date = toDate(date);\n  const year = _date.getFullYear();\n  const day = _date.getDate();\n\n  const dateWithDesiredMonth = constructFrom(date, 0);\n  dateWithDesiredMonth.setFullYear(year, month, 15);\n  dateWithDesiredMonth.setHours(0, 0, 0, 0);\n  const daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n  // Set the last day of the new month\n  // if the original date was the last day of the longer month\n  _date.setMonth(month, Math.min(day, daysInMonth));\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { setMonth } from \"./setMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\n\nexport function set(date, values) {\n  let _date = toDate(date);\n\n  // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n  if (isNaN(+_date)) {\n    return constructFrom(date, NaN);\n  }\n\n  if (values.year != null) {\n    _date.setFullYear(values.year);\n  }\n\n  if (values.month != null) {\n    _date = setMonth(_date, values.month);\n  }\n\n  if (values.date != null) {\n    _date.setDate(values.date);\n  }\n\n  if (values.hours != null) {\n    _date.setHours(values.hours);\n  }\n\n  if (values.minutes != null) {\n    _date.setMinutes(values.minutes);\n  }\n\n  if (values.seconds != null) {\n    _date.setSeconds(values.seconds);\n  }\n\n  if (values.milliseconds != null) {\n    _date.setMilliseconds(values.milliseconds);\n  }\n\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param hours - The hours of the new date\n *\n * @returns The new date with the hours set\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * const result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\nexport function setHours(date, hours) {\n  const _date = toDate(date);\n  _date.setHours(hours);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setHours;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setMilliseconds\n * @category Millisecond Helpers\n * @summary Set the milliseconds to the given date.\n *\n * @description\n * Set the milliseconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param milliseconds - The milliseconds of the new date\n *\n * @returns The new date with the milliseconds set\n *\n * @example\n * // Set 300 milliseconds to 1 September 2014 11:30:40.500:\n * const result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n * //=> Mon Sep 01 2014 11:30:40.300\n */\nexport function setMilliseconds(date, milliseconds) {\n  const _date = toDate(date);\n  _date.setMilliseconds(milliseconds);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMilliseconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param minutes - The minutes of the new date\n *\n * @returns The new date with the minutes set\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\nexport function setMinutes(date, minutes) {\n  const _date = toDate(date);\n  _date.setMinutes(minutes);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMinutes;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param seconds - The seconds of the new date\n *\n * @returns The new date with the seconds set\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\nexport function setSeconds(date, seconds) {\n  const _date = toDate(date);\n  _date.setSeconds(seconds);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setSeconds;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year) {\n  const _date = toDate(date);\n\n  // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n  if (isNaN(+_date)) {\n    return constructFrom(date, NaN);\n  }\n\n  _date.setFullYear(year);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount) {\n  return addMonths(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { subDays } from \"./subDays.mjs\";\nimport { subMonths } from \"./subMonths.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n *\n * | Key     | Description                        |\n * |---------|------------------------------------|\n * | years   | Amount of years to be subtracted   |\n * | months  | Amount of months to be subtracted  |\n * | weeks   | Amount of weeks to be subtracted   |\n * | days    | Amount of days to be subtracted    |\n * | hours   | Amount of hours to be subtracted   |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns The new date with the seconds subtracted\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\nexport function sub(date, duration) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  // Subtract years and months\n  const dateWithoutMonths = subMonths(date, months + years * 12);\n\n  // Subtract weeks and days\n  const dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7);\n\n  // Subtract hours, minutes and seconds\n  const minutestoSub = minutes + hours * 60;\n  const secondstoSub = seconds + minutestoSub * 60;\n  const mstoSub = secondstoSub * 1000;\n  const finalDate = constructFrom(date, dateWithoutDays.getTime() - mstoSub);\n\n  return finalDate;\n}\n\n// Fallback for modularized imports:\nexport default sub;\n","import { addYears } from \"./addYears.mjs\";\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount) {\n  return addYears(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","import { useAttrs as jn, openBlock as T, createElementBlock as K, createElementVNode as ye, unref as o, reactive as Qt, computed as J, ref as ne, toRef as Vt, watch as at, defineComponent as Le, onMounted as We, onUnmounted as ua, renderSlot as ie, normalizeProps as Ne, mergeProps as Ee, Fragment as be, normalizeStyle as tt, createCommentVNode as Z, createTextVNode as ct, toDisplayString as Ue, onBeforeUpdate as Kn, nextTick as xe, normalizeClass as we, withModifiers as Wt, renderList as Re, withDirectives as na, vShow as la, createBlock as $e, withCtx as ke, withKeys as Gn, createVNode as Ze, Transition as Nt, createSlots as Ve, useSlots as Pt, guardReactiveProps as Qe, resolveDynamicComponent as ia, h as Qn, render as xa, getCurrentScope as qn, onScopeDispose as Xn, isRef as en, Teleport as Jn } from \"vue\";\nimport { format as ut, isEqual as Ot, set as Te, startOfMonth as Zn, isAfter as _t, getYear as pe, getMonth as De, setMonth as xn, setYear as st, addMonths as At, subMonths as jt, isValid as ra, isBefore as Kt, eachDayOfInterval as pn, setHours as el, setMinutes as tl, setSeconds as yn, setMilliseconds as gn, getHours as ft, getMinutes as ht, getSeconds as Bt, startOfWeek as La, endOfWeek as hn, parse as Ia, isDate as al, addHours as nl, addYears as bn, subYears as kn, endOfYear as wn, startOfYear as oa, differenceInYears as ll, add as Dn, sub as rl, getWeek as ol, getISOWeek as sl, addDays as $t, isSameQuarter as tn, eachQuarterOfInterval as ul, startOfQuarter as il, endOfQuarter as an, getQuarter as nn, getDay as dl, differenceInCalendarDays as cl } from \"date-fns\";\nfunction Et() {\n  const e = jn();\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\",\n      ...e\n    },\n    [\n      ye(\"path\", {\n        d: \"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z\"\n      }),\n      ye(\"path\", {\n        d: \"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n      }),\n      ye(\"path\", {\n        d: \"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n      }),\n      ye(\"path\", {\n        d: \"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z\"\n      })\n    ]\n  );\n}\nEt.compatConfig = {\n  MODE: 3\n};\nfunction Mn() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z\"\n      }),\n      ye(\"path\", {\n        d: \"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n      })\n    ]\n  );\n}\nMn.compatConfig = {\n  MODE: 3\n};\nfunction za() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z\"\n      })\n    ]\n  );\n}\nza.compatConfig = {\n  MODE: 3\n};\nfunction Ha() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z\"\n      })\n    ]\n  );\n}\nHa.compatConfig = {\n  MODE: 3\n};\nfunction Ua() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z\"\n      }),\n      ye(\"path\", {\n        d: \"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z\"\n      })\n    ]\n  );\n}\nUa.compatConfig = {\n  MODE: 3\n};\nfunction Va() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z\"\n      })\n    ]\n  );\n}\nVa.compatConfig = {\n  MODE: 3\n};\nfunction Wa() {\n  return T(), K(\n    \"svg\",\n    {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 32 32\",\n      fill: \"currentColor\",\n      \"aria-hidden\": \"true\",\n      class: \"dp__icon\",\n      role: \"img\"\n    },\n    [\n      ye(\"path\", {\n        d: \"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n      })\n    ]\n  );\n}\nWa.compatConfig = {\n  MODE: 3\n};\nconst qe = (e, t) => t ? new Date(e.toLocaleString(\"en-US\", { timeZone: t })) : new Date(e), ja = (e, t, l) => {\n  const a = Na(e, t, l);\n  return a || G();\n}, fl = (e, t, l) => {\n  const a = t.dateInTz ? qe(new Date(e), t.dateInTz) : G(e);\n  return l ? Ge(a, !0) : a;\n}, Na = (e, t, l) => {\n  if (!e) return null;\n  const a = l ? Ge(G(e), !0) : G(e);\n  return t ? t.exactMatch ? fl(e, t, l) : qe(a, t.timezone) : a;\n}, vl = (e) => {\n  if (!e) return 0;\n  const t = /* @__PURE__ */ new Date(), l = new Date(t.toLocaleString(\"en-US\", { timeZone: \"UTC\" })), a = new Date(t.toLocaleString(\"en-US\", { timeZone: e })), n = a.getTimezoneOffset() / 60;\n  return (+l - +a) / (1e3 * 60 * 60) - n;\n};\nvar nt = /* @__PURE__ */ ((e) => (e.month = \"month\", e.year = \"year\", e))(nt || {}), Mt = /* @__PURE__ */ ((e) => (e.top = \"top\", e.bottom = \"bottom\", e))(Mt || {}), Tt = /* @__PURE__ */ ((e) => (e.header = \"header\", e.calendar = \"calendar\", e.timePicker = \"timePicker\", e))(Tt || {}), He = /* @__PURE__ */ ((e) => (e.month = \"month\", e.year = \"year\", e.calendar = \"calendar\", e.time = \"time\", e.minutes = \"minutes\", e.hours = \"hours\", e.seconds = \"seconds\", e))(He || {});\nconst ml = [\"timestamp\", \"date\", \"iso\"];\nvar je = /* @__PURE__ */ ((e) => (e.up = \"up\", e.down = \"down\", e.left = \"left\", e.right = \"right\", e))(je || {}), Pe = /* @__PURE__ */ ((e) => (e.arrowUp = \"ArrowUp\", e.arrowDown = \"ArrowDown\", e.arrowLeft = \"ArrowLeft\", e.arrowRight = \"ArrowRight\", e.enter = \"Enter\", e.space = \" \", e.esc = \"Escape\", e.tab = \"Tab\", e.home = \"Home\", e.end = \"End\", e.pageUp = \"PageUp\", e.pageDown = \"PageDown\", e))(Pe || {});\nfunction ln(e) {\n  return (t) => new Intl.DateTimeFormat(e, { weekday: \"short\", timeZone: \"UTC\" }).format(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0, 2);\n}\nfunction pl(e) {\n  return (t) => ut(qe(/* @__PURE__ */ new Date(`2017-01-0${t}T00:00:00+00:00`), \"UTC\"), \"EEEEEE\", { locale: e });\n}\nconst yl = (e, t, l) => {\n  const a = [1, 2, 3, 4, 5, 6, 7];\n  let n;\n  if (e !== null)\n    try {\n      n = a.map(pl(e));\n    } catch {\n      n = a.map(ln(t));\n    }\n  else\n    n = a.map(ln(t));\n  const i = n.slice(0, l), d = n.slice(l + 1, n.length);\n  return [n[l]].concat(...d).concat(...i);\n}, Ka = (e, t, l) => {\n  const a = [];\n  for (let n = +e[0]; n <= +e[1]; n++)\n    a.push({ value: +n, text: Sn(n, t) });\n  return l ? a.reverse() : a;\n}, $n = (e, t, l) => {\n  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((i) => {\n    const d = i < 10 ? `0${i}` : i;\n    return /* @__PURE__ */ new Date(`2017-${d}-01T00:00:00+00:00`);\n  });\n  if (e !== null)\n    try {\n      const i = l === \"long\" ? \"LLLL\" : \"LLL\";\n      return a.map((d, b) => {\n        const c = ut(qe(d, \"UTC\"), i, { locale: e });\n        return {\n          text: c.charAt(0).toUpperCase() + c.substring(1),\n          value: b\n        };\n      });\n    } catch {\n    }\n  const n = new Intl.DateTimeFormat(t, { month: l, timeZone: \"UTC\" });\n  return a.map((i, d) => {\n    const b = n.format(i);\n    return {\n      text: b.charAt(0).toUpperCase() + b.substring(1),\n      value: d\n    };\n  });\n}, gl = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e], Ie = (e) => {\n  const t = o(e);\n  return t != null && t.$el ? t == null ? void 0 : t.$el : t;\n}, hl = (e) => ({ type: \"dot\", ...e ?? {} }), An = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, Ga = {\n  prop: (e) => `\"${e}\" prop must be enabled!`,\n  dateArr: (e) => `You need to use array as \"model-value\" binding in order to support \"${e}\"`\n}, Ye = (e) => e, rn = (e) => e === 0 ? e : !e || isNaN(+e) ? null : +e, on = (e) => e === null, Tn = (e) => {\n  if (e)\n    return [...e.querySelectorAll(\"input, button, select, textarea, a[href]\")][0];\n}, bl = (e) => {\n  const t = [], l = (a) => a.filter((n) => n);\n  for (let a = 0; a < e.length; a += 3) {\n    const n = [e[a], e[a + 1], e[a + 2]];\n    t.push(l(n));\n  }\n  return t;\n}, Gt = (e, t, l) => {\n  const a = l != null, n = t != null;\n  if (!a && !n) return !1;\n  const i = +l, d = +t;\n  return a && n ? +e > i || +e < d : a ? +e > i : n ? +e < d : !1;\n}, Yt = (e, t) => bl(e).map((l) => l.map((a) => {\n  const { active: n, disabled: i, isBetween: d, highlighted: b } = t(a);\n  return {\n    ...a,\n    active: n,\n    disabled: i,\n    className: {\n      dp__overlay_cell_active: n,\n      dp__overlay_cell: !n,\n      dp__overlay_cell_disabled: i,\n      dp__overlay_cell_pad: !0,\n      dp__overlay_cell_active_disabled: i && n,\n      dp__cell_in_between: d,\n      \"dp--highlighted\": b\n    }\n  };\n})), yt = (e, t, l = !1) => {\n  e && t.allowStopPropagation && (l && e.stopImmediatePropagation(), e.stopPropagation());\n}, kl = () => [\n  \"a[href]\",\n  \"area[href]\",\n  \"input:not([disabled]):not([type='hidden'])\",\n  \"select:not([disabled])\",\n  \"textarea:not([disabled])\",\n  \"button:not([disabled])\",\n  \"[tabindex]:not([tabindex='-1'])\",\n  \"[data-datepicker-instance]\"\n].join(\", \");\nfunction wl(e, t) {\n  let l = [...document.querySelectorAll(kl())];\n  l = l.filter((n) => !e.contains(n) || n.hasAttribute(\"data-datepicker-instance\"));\n  const a = l.indexOf(e);\n  if (a >= 0 && (t ? a - 1 >= 0 : a + 1 <= l.length))\n    return l[a + (t ? -1 : 1)];\n}\nconst Ea = (e, t) => e == null ? void 0 : e.querySelector(`[data-dp-element=\"${t}\"]`), Sn = (e, t) => new Intl.NumberFormat(t, { useGrouping: !1, style: \"decimal\" }).format(e), Qa = (e) => ut(e, \"dd-MM-yyyy\"), $a = (e) => Array.isArray(e), sa = (e, t) => t.get(Qa(e)), Dl = (e, t) => e ? t ? t instanceof Map ? !!sa(e, t) : t(G(e)) : !1 : !0, Ke = (e, t, l = !1, a) => {\n  if (e.key === Pe.enter || e.key === Pe.space)\n    return l && e.preventDefault(), t();\n  if (a) return a(e);\n}, sn = () => [\"iPad Simulator\", \"iPhone Simulator\", \"iPod Simulator\", \"iPad\", \"iPhone\", \"iPod\"].some(\n  (e) => navigator.userAgent.includes(e)\n) || navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document, un = (e, t, l, a, n, i) => {\n  const d = Ia(e, t.slice(0, e.length), /* @__PURE__ */ new Date(), { locale: i });\n  return ra(d) && al(d) ? a || n ? d : Te(d, {\n    hours: +l.hours,\n    minutes: +(l == null ? void 0 : l.minutes),\n    seconds: +(l == null ? void 0 : l.seconds),\n    milliseconds: 0\n  }) : null;\n}, Ml = (e, t, l, a, n, i) => {\n  const d = Array.isArray(l) ? l[0] : l;\n  if (typeof t == \"string\")\n    return un(e, t, d, a, n, i);\n  if (Array.isArray(t)) {\n    let b = null;\n    for (const c of t)\n      if (b = un(e, c, d, a, n, i), b)\n        break;\n    return b;\n  }\n  return typeof t == \"function\" ? t(e) : null;\n}, G = (e) => e ? new Date(e) : /* @__PURE__ */ new Date(), $l = (e, t, l) => {\n  if (t) {\n    const n = (e.getMonth() + 1).toString().padStart(2, \"0\"), i = e.getDate().toString().padStart(2, \"0\"), d = e.getHours().toString().padStart(2, \"0\"), b = e.getMinutes().toString().padStart(2, \"0\"), c = l ? e.getSeconds().toString().padStart(2, \"0\") : \"00\";\n    return `${e.getFullYear()}-${n}-${i}T${d}:${b}:${c}.000Z`;\n  }\n  const a = Date.UTC(\n    e.getUTCFullYear(),\n    e.getUTCMonth(),\n    e.getUTCDate(),\n    e.getUTCHours(),\n    e.getUTCMinutes(),\n    e.getUTCSeconds()\n  );\n  return new Date(a).toISOString();\n}, Ge = (e, t) => {\n  const l = G(JSON.parse(JSON.stringify(e))), a = Te(l, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 });\n  return t ? Zn(a) : a;\n}, gt = (e, t, l, a) => {\n  let n = e ? G(e) : G();\n  return (t || t === 0) && (n = el(n, +t)), (l || l === 0) && (n = tl(n, +l)), (a || a === 0) && (n = yn(n, +a)), gn(n, 0);\n}, Oe = (e, t) => !e || !t ? !1 : Kt(Ge(e), Ge(t)), Me = (e, t) => !e || !t ? !1 : Ot(Ge(e), Ge(t)), Be = (e, t) => !e || !t ? !1 : _t(Ge(e), Ge(t)), da = (e, t, l) => e != null && e[0] && (e != null && e[1]) ? Be(l, e[0]) && Oe(l, e[1]) : e != null && e[0] && t ? Be(l, e[0]) && Oe(l, t) || Oe(l, e[0]) && Be(l, t) : !1, lt = (e) => {\n  const t = Te(new Date(e), { date: 1 });\n  return Ge(t);\n}, Aa = (e, t, l) => t && (l || l === 0) ? Object.fromEntries(\n  [\"hours\", \"minutes\", \"seconds\"].map((a) => a === t ? [a, l] : [a, isNaN(+e[a]) ? void 0 : +e[a]])\n) : {\n  hours: isNaN(+e.hours) ? void 0 : +e.hours,\n  minutes: isNaN(+e.minutes) ? void 0 : +e.minutes,\n  seconds: isNaN(+e.seconds) ? void 0 : +e.seconds\n}, St = (e) => ({\n  hours: ft(e),\n  minutes: ht(e),\n  seconds: Bt(e)\n}), Pn = (e, t) => {\n  if (t) {\n    const l = pe(G(t));\n    if (l > e) return 12;\n    if (l === e) return De(G(t));\n  }\n}, Rn = (e, t) => {\n  if (t) {\n    const l = pe(G(t));\n    return l < e ? -1 : l === e ? De(G(t)) : void 0;\n  }\n}, It = (e) => {\n  if (e) return pe(G(e));\n}, Cn = (e, t) => {\n  const l = Be(e, t) ? t : e, a = Be(t, e) ? t : e;\n  return pn({ start: l, end: a });\n}, Al = (e) => {\n  const t = At(e, 1);\n  return { month: De(t), year: pe(t) };\n}, it = (e, t) => {\n  const l = La(e, { weekStartsOn: +t }), a = hn(e, { weekStartsOn: +t });\n  return [l, a];\n}, On = (e, t) => {\n  const l = {\n    hours: ft(G()),\n    minutes: ht(G()),\n    seconds: t ? Bt(G()) : 0\n  };\n  return Object.assign(l, e);\n}, pt = (e, t, l) => [Te(G(e), { date: 1 }), Te(G(), { month: t, year: l, date: 1 })], dt = (e, t, l) => {\n  let a = e ? G(e) : G();\n  return (t || t === 0) && (a = xn(a, t)), l && (a = st(a, l)), a;\n}, _n = (e, t, l, a, n) => {\n  if (!a || n && !t || !n && !l) return !1;\n  const i = n ? At(e, 1) : jt(e, 1), d = [De(i), pe(i)];\n  return n ? !Sl(...d, t) : !Tl(...d, l);\n}, Tl = (e, t, l) => Oe(...pt(l, e, t)) || Me(...pt(l, e, t)), Sl = (e, t, l) => Be(...pt(l, e, t)) || Me(...pt(l, e, t)), Bn = (e, t, l, a, n, i, d) => {\n  if (typeof t == \"function\" && !d) return t(e);\n  const b = l ? { locale: l } : void 0;\n  return Array.isArray(e) ? `${ut(e[0], i, b)}${n && !e[1] ? \"\" : a}${e[1] ? ut(e[1], i, b) : \"\"}` : ut(e, i, b);\n}, Rt = (e) => {\n  if (e) return null;\n  throw new Error(Ga.prop(\"partial-range\"));\n}, ta = (e, t) => {\n  if (t) return e();\n  throw new Error(Ga.prop(\"range\"));\n}, Fa = (e) => Array.isArray(e) ? ra(e[0]) && (e[1] ? ra(e[1]) : !0) : e ? ra(e) : !1, Pl = (e, t) => Te(t ?? G(), {\n  hours: +e.hours || 0,\n  minutes: +e.minutes || 0,\n  seconds: +e.seconds || 0\n}), Ta = (e, t, l, a) => {\n  if (!e) return !0;\n  if (a) {\n    const n = l === \"max\" ? Kt(e, t) : _t(e, t), i = { seconds: 0, milliseconds: 0 };\n    return n || Ot(Te(e, i), Te(t, i));\n  }\n  return l === \"max\" ? e.getTime() <= t.getTime() : e.getTime() >= t.getTime();\n}, Sa = (e, t, l) => e ? Pl(e, t) : G(l ?? t), dn = (e, t, l, a, n) => {\n  if (Array.isArray(a)) {\n    const d = Sa(e, a[0], t), b = Sa(e, a[1], t);\n    return Ta(a[0], d, l, !!t) && Ta(a[1], b, l, !!t) && n;\n  }\n  const i = Sa(e, a, t);\n  return Ta(a, i, l, !!t) && n;\n}, Pa = (e) => Te(G(), St(e)), Rl = (e, t) => e instanceof Map ? Array.from(e.values()).filter((l) => pe(G(l)) === t).map((l) => De(l)) : [], Yn = (e, t, l) => typeof e == \"function\" ? e({ month: t, year: l }) : !!e.months.find((a) => a.month === t && a.year === l), qa = (e, t) => typeof e == \"function\" ? e(t) : e.years.includes(t), In = (e) => ut(e, \"yyyy-MM-dd\"), Ht = Qt({\n  menuFocused: !1,\n  shiftKeyInMenu: !1\n}), Nn = () => {\n  const e = (a) => {\n    Ht.menuFocused = a;\n  }, t = (a) => {\n    Ht.shiftKeyInMenu !== a && (Ht.shiftKeyInMenu = a);\n  };\n  return {\n    control: J(() => ({ shiftKeyInMenu: Ht.shiftKeyInMenu, menuFocused: Ht.menuFocused })),\n    setMenuFocused: e,\n    setShiftKey: t\n  };\n}, Se = Qt({\n  monthYear: [],\n  calendar: [],\n  time: [],\n  actionRow: [],\n  selectionGrid: [],\n  timePicker: {\n    0: [],\n    1: []\n  },\n  monthPicker: []\n}), Ra = ne(null), aa = ne(!1), Ca = ne(!1), Oa = ne(!1), _a = ne(!1), ze = ne(0), _e = ne(0), bt = () => {\n  const e = J(() => aa.value ? [...Se.selectionGrid, Se.actionRow].filter((f) => f.length) : Ca.value ? [\n    ...Se.timePicker[0],\n    ...Se.timePicker[1],\n    _a.value ? [] : [Ra.value],\n    Se.actionRow\n  ].filter((f) => f.length) : Oa.value ? [...Se.monthPicker, Se.actionRow] : [Se.monthYear, ...Se.calendar, Se.time, Se.actionRow].filter((f) => f.length)), t = (f) => {\n    ze.value = f ? ze.value + 1 : ze.value - 1;\n    let B = null;\n    e.value[_e.value] && (B = e.value[_e.value][ze.value]), !B && e.value[_e.value + (f ? 1 : -1)] ? (_e.value = _e.value + (f ? 1 : -1), ze.value = f ? 0 : e.value[_e.value].length - 1) : B || (ze.value = f ? ze.value - 1 : ze.value + 1);\n  }, l = (f) => {\n    if (_e.value === 0 && !f || _e.value === e.value.length && f) return;\n    _e.value = f ? _e.value + 1 : _e.value - 1, e.value[_e.value] ? e.value[_e.value] && !e.value[_e.value][ze.value] && ze.value !== 0 && (ze.value = e.value[_e.value].length - 1) : _e.value = f ? _e.value - 1 : _e.value + 1;\n  }, a = (f) => {\n    let B = null;\n    e.value[_e.value] && (B = e.value[_e.value][ze.value]), B ? B.focus({ preventScroll: !aa.value }) : ze.value = f ? ze.value - 1 : ze.value + 1;\n  }, n = () => {\n    t(!0), a(!0);\n  }, i = () => {\n    t(!1), a(!1);\n  }, d = () => {\n    l(!1), a(!0);\n  }, b = () => {\n    l(!0), a(!0);\n  }, c = (f, B) => {\n    Se[B] = f;\n  }, L = (f, B) => {\n    Se[B] = f;\n  }, v = () => {\n    ze.value = 0, _e.value = 0;\n  };\n  return {\n    buildMatrix: c,\n    buildMultiLevelMatrix: L,\n    setTimePickerBackRef: (f) => {\n      Ra.value = f;\n    },\n    setSelectionGrid: (f) => {\n      aa.value = f, v(), f || (Se.selectionGrid = []);\n    },\n    setTimePicker: (f, B = !1) => {\n      Ca.value = f, _a.value = B, v(), f || (Se.timePicker[0] = [], Se.timePicker[1] = []);\n    },\n    setTimePickerElements: (f, B = 0) => {\n      Se.timePicker[B] = f;\n    },\n    arrowRight: n,\n    arrowLeft: i,\n    arrowUp: d,\n    arrowDown: b,\n    clearArrowNav: () => {\n      Se.monthYear = [], Se.calendar = [], Se.time = [], Se.actionRow = [], Se.selectionGrid = [], Se.timePicker[0] = [], Se.timePicker[1] = [], aa.value = !1, Ca.value = !1, _a.value = !1, Oa.value = !1, v(), Ra.value = null;\n    },\n    setMonthPicker: (f) => {\n      Oa.value = f, v();\n    },\n    refSets: Se\n    // exposed for testing\n  };\n}, cn = (e) => ({\n  menuAppearTop: \"dp-menu-appear-top\",\n  menuAppearBottom: \"dp-menu-appear-bottom\",\n  open: \"dp-slide-down\",\n  close: \"dp-slide-up\",\n  next: \"calendar-next\",\n  previous: \"calendar-prev\",\n  vNext: \"dp-slide-up\",\n  vPrevious: \"dp-slide-down\",\n  ...e ?? {}\n}), Cl = (e) => ({\n  toggleOverlay: \"Toggle overlay\",\n  menu: \"Datepicker menu\",\n  input: \"Datepicker input\",\n  openTimePicker: \"Open time picker\",\n  closeTimePicker: \"Close time Picker\",\n  incrementValue: (t) => `Increment ${t}`,\n  decrementValue: (t) => `Decrement ${t}`,\n  openTpOverlay: (t) => `Open ${t} overlay`,\n  amPmButton: \"Switch AM/PM mode\",\n  openYearsOverlay: \"Open years overlay\",\n  openMonthsOverlay: \"Open months overlay\",\n  nextMonth: \"Next month\",\n  prevMonth: \"Previous month\",\n  nextYear: \"Next year\",\n  prevYear: \"Previous year\",\n  day: void 0,\n  weekDay: void 0,\n  clearInput: \"Clear value\",\n  calendarIcon: \"Calendar icon\",\n  timePicker: \"Time picker\",\n  monthPicker: (t) => `Month picker${t ? \" overlay\" : \"\"}`,\n  yearPicker: (t) => `Year picker${t ? \" overlay\" : \"\"}`,\n  timeOverlay: (t) => `${t} overlay`,\n  ...e ?? {}\n}), fn = (e) => e ? typeof e == \"boolean\" ? e ? 2 : 0 : +e >= 2 ? +e : 2 : 0, Ol = (e) => {\n  const t = typeof e == \"object\" && e, l = {\n    static: !0,\n    solo: !1\n  };\n  if (!e) return { ...l, count: fn(!1) };\n  const a = t ? e : {}, n = t ? a.count ?? !0 : e, i = fn(n);\n  return Object.assign(l, a, { count: i });\n}, _l = (e, t, l) => e || (typeof l == \"string\" ? l : t), Bl = (e) => typeof e == \"boolean\" ? e ? cn({}) : !1 : cn(e), Yl = (e) => {\n  const t = {\n    enterSubmit: !0,\n    tabSubmit: !0,\n    openMenu: \"open\",\n    selectOnFocus: !1,\n    rangeSeparator: \" - \"\n  };\n  return typeof e == \"object\" ? { ...t, ...e ?? {}, enabled: !0 } : { ...t, enabled: e };\n}, Il = (e) => ({\n  months: [],\n  years: [],\n  times: { hours: [], minutes: [], seconds: [] },\n  ...e ?? {}\n}), Nl = (e) => ({\n  showSelect: !0,\n  showCancel: !0,\n  showNow: !1,\n  showPreview: !0,\n  ...e ?? {}\n}), El = (e) => {\n  const t = { input: !1 };\n  return typeof e == \"object\" ? { ...t, ...e ?? {}, enabled: !0 } : {\n    enabled: e,\n    ...t\n  };\n}, Fl = (e) => ({ ...{\n  allowStopPropagation: !0,\n  closeOnScroll: !1,\n  modeHeight: 255,\n  allowPreventDefault: !1,\n  closeOnClearValue: !0,\n  closeOnAutoApply: !0,\n  noSwipe: !1,\n  keepActionRow: !1,\n  onClickOutside: void 0,\n  tabOutClosesMenu: !0,\n  arrowLeft: void 0,\n  keepViewOnOffsetClick: !1,\n  timeArrowHoldThreshold: 0,\n  shadowDom: !1\n}, ...e ?? {} }), Ll = (e) => {\n  const t = {\n    dates: Array.isArray(e) ? e.map((l) => G(l)) : [],\n    years: [],\n    months: [],\n    quarters: [],\n    weeks: [],\n    weekdays: [],\n    options: { highlightDisabled: !1 }\n  };\n  return typeof e == \"function\" ? e : { ...t, ...e ?? {} };\n}, zl = (e) => typeof e == \"object\" ? {\n  type: (e == null ? void 0 : e.type) ?? \"local\",\n  hideOnOffsetDates: (e == null ? void 0 : e.hideOnOffsetDates) ?? !1\n} : {\n  type: e,\n  hideOnOffsetDates: !1\n}, Hl = (e) => {\n  const t = {\n    noDisabledRange: !1,\n    showLastInRange: !0,\n    minMaxRawRange: !1,\n    partialRange: !0,\n    disableTimeRangeValidation: !1,\n    maxRange: void 0,\n    minRange: void 0,\n    autoRange: void 0,\n    fixedStart: !1,\n    fixedEnd: !1\n  };\n  return typeof e == \"object\" ? { enabled: !0, ...t, ...e } : {\n    enabled: e,\n    ...t\n  };\n}, Ul = (e) => e ? typeof e == \"string\" ? {\n  timezone: e,\n  exactMatch: !1,\n  dateInTz: void 0,\n  emitTimezone: void 0,\n  convertModel: !0\n} : {\n  timezone: e.timezone,\n  exactMatch: e.exactMatch ?? !1,\n  dateInTz: e.dateInTz ?? void 0,\n  emitTimezone: e.emitTimezone ?? void 0,\n  convertModel: e.convertModel ?? !0\n} : { timezone: void 0, exactMatch: !1, emitTimezone: void 0 }, Ba = (e, t, l) => new Map(\n  e.map((a) => {\n    const n = ja(a, t, l);\n    return [Qa(n), n];\n  })\n), Vl = (e, t) => e.length ? new Map(\n  e.map((l) => {\n    const a = ja(l.date, t);\n    return [Qa(a), l];\n  })\n) : null, Wl = (e) => {\n  var t;\n  return {\n    minDate: Na(e.minDate, e.timezone, e.isSpecific),\n    maxDate: Na(e.maxDate, e.timezone, e.isSpecific),\n    disabledDates: $a(e.disabledDates) ? Ba(e.disabledDates, e.timezone, e.isSpecific) : e.disabledDates,\n    allowedDates: $a(e.allowedDates) ? Ba(e.allowedDates, e.timezone, e.isSpecific) : null,\n    highlight: typeof e.highlight == \"object\" && $a((t = e.highlight) == null ? void 0 : t.dates) ? Ba(e.highlight.dates, e.timezone) : e.highlight,\n    markers: Vl(e.markers, e.timezone)\n  };\n}, jl = (e) => typeof e == \"boolean\" ? { enabled: e, dragSelect: !0, limit: null } : {\n  enabled: !!e,\n  limit: e.limit ? +e.limit : null,\n  dragSelect: e.dragSelect ?? !0\n}, Kl = (e) => ({\n  ...Object.fromEntries(\n    Object.keys(e).map((l) => {\n      const a = l, n = e[a], i = typeof e[a] == \"string\" ? { [n]: !0 } : Object.fromEntries(n.map((d) => [d, !0]));\n      return [l, i];\n    })\n  )\n}), Ce = (e) => {\n  const t = () => {\n    const oe = e.enableSeconds ? \":ss\" : \"\", ee = e.enableMinutes ? \":mm\" : \"\";\n    return e.is24 ? `HH${ee}${oe}` : `hh${ee}${oe} aa`;\n  }, l = () => {\n    var oe;\n    return e.format ? e.format : e.monthPicker ? \"MM/yyyy\" : e.timePicker ? t() : e.weekPicker ? `${((oe = U.value) == null ? void 0 : oe.type) === \"iso\" ? \"RR\" : \"ww\"}-yyyy` : e.yearPicker ? \"yyyy\" : e.quarterPicker ? \"QQQ/yyyy\" : e.enableTimePicker ? `MM/dd/yyyy, ${t()}` : \"MM/dd/yyyy\";\n  }, a = (oe) => On(oe, e.enableSeconds), n = () => Q.value.enabled ? e.startTime && Array.isArray(e.startTime) ? [a(e.startTime[0]), a(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? a(e.startTime) : null, i = J(() => Ol(e.multiCalendars)), d = J(() => n()), b = J(() => Cl(e.ariaLabels)), c = J(() => Il(e.filters)), L = J(() => Bl(e.transitions)), v = J(() => Nl(e.actionRow)), _ = J(\n    () => _l(e.previewFormat, e.format, l())\n  ), h = J(() => Yl(e.textInput)), C = J(() => El(e.inline)), H = J(() => Fl(e.config)), E = J(() => Ll(e.highlight)), U = J(() => zl(e.weekNumbers)), f = J(() => Ul(e.timezone)), B = J(() => jl(e.multiDates)), P = J(\n    () => Wl({\n      minDate: e.minDate,\n      maxDate: e.maxDate,\n      disabledDates: e.disabledDates,\n      allowedDates: e.allowedDates,\n      highlight: E.value,\n      markers: e.markers,\n      timezone: f.value,\n      isSpecific: e.monthPicker || e.yearPicker || e.quarterPicker\n    })\n  ), Q = J(() => Hl(e.range)), ae = J(() => Kl(e.ui));\n  return {\n    defaultedTransitions: L,\n    defaultedMultiCalendars: i,\n    defaultedStartTime: d,\n    defaultedAriaLabels: b,\n    defaultedFilters: c,\n    defaultedActionRow: v,\n    defaultedPreviewFormat: _,\n    defaultedTextInput: h,\n    defaultedInline: C,\n    defaultedConfig: H,\n    defaultedHighlight: E,\n    defaultedWeekNumbers: U,\n    defaultedRange: Q,\n    propDates: P,\n    defaultedTz: f,\n    defaultedMultiDates: B,\n    defaultedUI: ae,\n    getDefaultPattern: l,\n    getDefaultStartTime: n\n  };\n}, Gl = (e, t, l) => {\n  const a = ne(), { defaultedTextInput: n, defaultedRange: i, defaultedTz: d, defaultedMultiDates: b, getDefaultPattern: c } = Ce(t), L = ne(\"\"), v = Vt(t, \"format\"), _ = Vt(t, \"formatLocale\");\n  at(\n    a,\n    () => {\n      typeof t.onInternalModelChange == \"function\" && e(\"internal-model-change\", a.value, M(!0));\n    },\n    { deep: !0 }\n  ), at(i, (u, le) => {\n    u.enabled !== le.enabled && (a.value = null);\n  }), at(v, () => {\n    X();\n  });\n  const h = (u) => d.value.timezone && d.value.convertModel ? qe(u, d.value.timezone) : u, C = (u) => {\n    if (d.value.timezone && d.value.convertModel) {\n      const le = vl(d.value.timezone);\n      return nl(u, le);\n    }\n    return u;\n  }, H = (u, le, me = !1) => Bn(\n    u,\n    t.format,\n    t.formatLocale,\n    n.value.rangeSeparator,\n    t.modelAuto,\n    le ?? c(),\n    me\n  ), E = (u) => u ? t.modelType ? p(u) : {\n    hours: ft(u),\n    minutes: ht(u),\n    seconds: t.enableSeconds ? Bt(u) : 0\n  } : null, U = (u) => t.modelType ? p(u) : { month: De(u), year: pe(u) }, f = (u) => Array.isArray(u) ? b.value.enabled ? u.map((le) => B(le, st(G(), le))) : ta(\n    () => [\n      st(G(), u[0]),\n      u[1] ? st(G(), u[1]) : Rt(i.value.partialRange)\n    ],\n    i.value.enabled\n  ) : st(G(), +u), B = (u, le) => (typeof u == \"string\" || typeof u == \"number\") && t.modelType ? A(u) : le, P = (u) => Array.isArray(u) ? [\n    B(\n      u[0],\n      gt(null, +u[0].hours, +u[0].minutes, u[0].seconds)\n    ),\n    B(\n      u[1],\n      gt(null, +u[1].hours, +u[1].minutes, u[1].seconds)\n    )\n  ] : B(u, gt(null, u.hours, u.minutes, u.seconds)), Q = (u) => {\n    const le = Te(G(), { date: 1 });\n    return Array.isArray(u) ? b.value.enabled ? u.map((me) => B(me, dt(le, +me.month, +me.year))) : ta(\n      () => [\n        B(u[0], dt(le, +u[0].month, +u[0].year)),\n        B(\n          u[1],\n          u[1] ? dt(le, +u[1].month, +u[1].year) : Rt(i.value.partialRange)\n        )\n      ],\n      i.value.enabled\n    ) : B(u, dt(le, +u.month, +u.year));\n  }, ae = (u) => {\n    if (Array.isArray(u))\n      return u.map((le) => A(le));\n    throw new Error(Ga.dateArr(\"multi-dates\"));\n  }, oe = (u) => {\n    if (Array.isArray(u) && i.value.enabled) {\n      const le = u[0], me = u[1];\n      return [\n        G(Array.isArray(le) ? le[0] : null),\n        Array.isArray(me) && me.length ? G(me[0]) : null\n      ];\n    }\n    return G(u[0]);\n  }, ee = (u) => t.modelAuto ? Array.isArray(u) ? [A(u[0]), A(u[1])] : t.autoApply ? [A(u)] : [A(u), null] : Array.isArray(u) ? ta(\n    () => u[1] ? [\n      A(u[0]),\n      u[1] ? A(u[1]) : Rt(i.value.partialRange)\n    ] : [A(u[0])],\n    i.value.enabled\n  ) : A(u), S = () => {\n    Array.isArray(a.value) && i.value.enabled && a.value.length === 1 && a.value.push(Rt(i.value.partialRange));\n  }, x = () => {\n    const u = a.value;\n    return [\n      p(u[0]),\n      u[1] ? p(u[1]) : Rt(i.value.partialRange)\n    ];\n  }, Y = () => a.value[1] ? x() : p(Ye(a.value[0])), q = () => (a.value || []).map((u) => p(u)), de = (u = !1) => (u || S(), t.modelAuto ? Y() : b.value.enabled ? q() : Array.isArray(a.value) ? ta(() => x(), i.value.enabled) : p(Ye(a.value))), ve = (u) => !u || Array.isArray(u) && !u.length ? null : t.timePicker ? P(Ye(u)) : t.monthPicker ? Q(Ye(u)) : t.yearPicker ? f(Ye(u)) : b.value.enabled ? ae(Ye(u)) : t.weekPicker ? oe(Ye(u)) : ee(Ye(u)), y = (u) => {\n    const le = ve(u);\n    Fa(Ye(le)) ? (a.value = Ye(le), X()) : (a.value = null, L.value = \"\");\n  }, z = () => {\n    const u = (le) => ut(le, n.value.format);\n    return `${u(a.value[0])} ${n.value.rangeSeparator} ${a.value[1] ? u(a.value[1]) : \"\"}`;\n  }, te = () => l.value && a.value ? Array.isArray(a.value) ? z() : ut(a.value, n.value.format) : H(a.value), g = () => a.value ? b.value.enabled ? a.value.map((u) => H(u)).join(\"; \") : n.value.enabled && typeof n.value.format == \"string\" ? te() : H(a.value) : \"\", X = () => {\n    !t.format || typeof t.format == \"string\" || n.value.enabled && typeof n.value.format == \"string\" ? L.value = g() : L.value = t.format(a.value);\n  }, A = (u) => {\n    if (t.utc) {\n      const le = new Date(u);\n      return t.utc === \"preserve\" ? new Date(le.getTime() + le.getTimezoneOffset() * 6e4) : le;\n    }\n    return t.modelType ? ml.includes(t.modelType) ? h(new Date(u)) : t.modelType === \"format\" && (typeof t.format == \"string\" || !t.format) ? h(\n      Ia(u, c(), /* @__PURE__ */ new Date(), { locale: _.value })\n    ) : h(\n      Ia(u, t.modelType, /* @__PURE__ */ new Date(), { locale: _.value })\n    ) : h(new Date(u));\n  }, p = (u) => u ? t.utc ? $l(u, t.utc === \"preserve\", t.enableSeconds) : t.modelType ? t.modelType === \"timestamp\" ? +C(u) : t.modelType === \"iso\" ? C(u).toISOString() : t.modelType === \"format\" && (typeof t.format == \"string\" || !t.format) ? H(C(u)) : H(C(u), t.modelType, !0) : C(u) : \"\", se = (u, le = !1, me = !1) => {\n    if (me) return u;\n    if (e(\"update:model-value\", u), d.value.emitTimezone && le) {\n      const $ = Array.isArray(u) ? u.map((ge) => qe(Ye(ge), d.value.emitTimezone)) : qe(Ye(u), d.value.emitTimezone);\n      e(\"update:model-timezone-value\", $);\n    }\n  }, I = (u) => Array.isArray(a.value) ? b.value.enabled ? a.value.map((le) => u(le)) : [\n    u(a.value[0]),\n    a.value[1] ? u(a.value[1]) : Rt(i.value.partialRange)\n  ] : u(Ye(a.value)), D = () => {\n    if (Array.isArray(a.value)) {\n      const u = it(a.value[0], t.weekStart), le = a.value[1] ? it(a.value[1], t.weekStart) : [];\n      return [u.map((me) => G(me)), le.map((me) => G(me))];\n    }\n    return it(a.value, t.weekStart).map((u) => G(u));\n  }, V = (u, le) => se(Ye(I(u)), !1, le), s = (u) => {\n    const le = D();\n    return u ? le : e(\"update:model-value\", D());\n  }, M = (u = !1) => (u || X(), t.monthPicker ? V(U, u) : t.timePicker ? V(E, u) : t.yearPicker ? V(pe, u) : t.weekPicker ? s(u) : se(de(u), !0, u));\n  return {\n    inputValue: L,\n    internalModelValue: a,\n    checkBeforeEmit: () => a.value ? i.value.enabled ? i.value.partialRange ? a.value.length >= 1 : a.value.length === 2 : !!a.value : !1,\n    parseExternalModelValue: y,\n    formatInputValue: X,\n    emitModelValue: M\n  };\n}, Ql = (e, t) => {\n  const { defaultedFilters: l, propDates: a } = Ce(e), { validateMonthYearInRange: n } = kt(e), i = (v, _) => {\n    let h = v;\n    return l.value.months.includes(De(h)) ? (h = _ ? At(v, 1) : jt(v, 1), i(h, _)) : h;\n  }, d = (v, _) => {\n    let h = v;\n    return l.value.years.includes(pe(h)) ? (h = _ ? bn(v, 1) : kn(v, 1), d(h, _)) : h;\n  }, b = (v, _ = !1) => {\n    const h = Te(G(), { month: e.month, year: e.year });\n    let C = v ? At(h, 1) : jt(h, 1);\n    e.disableYearSelect && (C = st(C, e.year));\n    let H = De(C), E = pe(C);\n    l.value.months.includes(H) && (C = i(C, v), H = De(C), E = pe(C)), l.value.years.includes(E) && (C = d(C, v), E = pe(C)), n(H, E, v, e.preventMinMaxNavigation) && c(H, E, _);\n  }, c = (v, _, h) => {\n    t(\"update-month-year\", { month: v, year: _, fromNav: h });\n  }, L = J(() => (v) => _n(\n    Te(G(), { month: e.month, year: e.year }),\n    a.value.maxDate,\n    a.value.minDate,\n    e.preventMinMaxNavigation,\n    v\n  ));\n  return { handleMonthYearChange: b, isDisabled: L, updateMonthYear: c };\n}, ca = {\n  multiCalendars: { type: [Boolean, Number, String, Object], default: void 0 },\n  modelValue: { type: [String, Date, Array, Object, Number], default: null },\n  modelType: { type: String, default: null },\n  position: { type: String, default: \"center\" },\n  dark: { type: Boolean, default: !1 },\n  format: {\n    type: [String, Function],\n    default: () => null\n  },\n  autoPosition: { type: Boolean, default: !0 },\n  altPosition: { type: Function, default: null },\n  transitions: { type: [Boolean, Object], default: !0 },\n  formatLocale: { type: Object, default: null },\n  utc: { type: [Boolean, String], default: !1 },\n  ariaLabels: { type: Object, default: () => ({}) },\n  offset: { type: [Number, String], default: 10 },\n  hideNavigation: { type: Array, default: () => [] },\n  timezone: { type: [String, Object], default: null },\n  vertical: { type: Boolean, default: !1 },\n  disableMonthYearSelect: { type: Boolean, default: !1 },\n  disableYearSelect: { type: Boolean, default: !1 },\n  dayClass: {\n    type: Function,\n    default: null\n  },\n  yearRange: { type: Array, default: () => [1900, 2100] },\n  enableTimePicker: { type: Boolean, default: !0 },\n  autoApply: { type: Boolean, default: !1 },\n  disabledDates: { type: [Array, Function], default: () => [] },\n  monthNameFormat: { type: String, default: \"short\" },\n  startDate: { type: [Date, String], default: null },\n  startTime: { type: [Object, Array], default: null },\n  hideOffsetDates: { type: Boolean, default: !1 },\n  noToday: { type: Boolean, default: !1 },\n  disabledWeekDays: { type: Array, default: () => [] },\n  allowedDates: { type: Array, default: null },\n  nowButtonLabel: { type: String, default: \"Now\" },\n  markers: { type: Array, default: () => [] },\n  escClose: { type: Boolean, default: !0 },\n  spaceConfirm: { type: Boolean, default: !0 },\n  monthChangeOnArrows: { type: Boolean, default: !0 },\n  presetDates: { type: Array, default: () => [] },\n  flow: { type: Array, default: () => [] },\n  partialFlow: { type: Boolean, default: !1 },\n  preventMinMaxNavigation: { type: Boolean, default: !1 },\n  reverseYears: { type: Boolean, default: !1 },\n  weekPicker: { type: Boolean, default: !1 },\n  filters: { type: Object, default: () => ({}) },\n  arrowNavigation: { type: Boolean, default: !1 },\n  highlight: {\n    type: [Function, Object],\n    default: null\n  },\n  teleport: { type: [Boolean, String, Object], default: null },\n  teleportCenter: { type: Boolean, default: !1 },\n  locale: { type: String, default: \"en-Us\" },\n  weekNumName: { type: String, default: \"W\" },\n  weekStart: { type: [Number, String], default: 1 },\n  weekNumbers: {\n    type: [String, Function, Object],\n    default: null\n  },\n  monthChangeOnScroll: { type: [Boolean, String], default: !0 },\n  dayNames: {\n    type: [Function, Array],\n    default: null\n  },\n  monthPicker: { type: Boolean, default: !1 },\n  customProps: { type: Object, default: null },\n  yearPicker: { type: Boolean, default: !1 },\n  modelAuto: { type: Boolean, default: !1 },\n  selectText: { type: String, default: \"Select\" },\n  cancelText: { type: String, default: \"Cancel\" },\n  previewFormat: {\n    type: [String, Function],\n    default: () => \"\"\n  },\n  multiDates: { type: [Object, Boolean], default: !1 },\n  ignoreTimeValidation: { type: Boolean, default: !1 },\n  minDate: { type: [Date, String], default: null },\n  maxDate: { type: [Date, String], default: null },\n  minTime: { type: Object, default: null },\n  maxTime: { type: Object, default: null },\n  name: { type: String, default: null },\n  placeholder: { type: String, default: \"\" },\n  hideInputIcon: { type: Boolean, default: !1 },\n  clearable: { type: Boolean, default: !0 },\n  state: { type: Boolean, default: null },\n  required: { type: Boolean, default: !1 },\n  autocomplete: { type: String, default: \"off\" },\n  timePicker: { type: Boolean, default: !1 },\n  enableSeconds: { type: Boolean, default: !1 },\n  is24: { type: Boolean, default: !0 },\n  noHoursOverlay: { type: Boolean, default: !1 },\n  noMinutesOverlay: { type: Boolean, default: !1 },\n  noSecondsOverlay: { type: Boolean, default: !1 },\n  hoursGridIncrement: { type: [String, Number], default: 1 },\n  minutesGridIncrement: { type: [String, Number], default: 5 },\n  secondsGridIncrement: { type: [String, Number], default: 5 },\n  hoursIncrement: { type: [Number, String], default: 1 },\n  minutesIncrement: { type: [Number, String], default: 1 },\n  secondsIncrement: { type: [Number, String], default: 1 },\n  range: { type: [Boolean, Object], default: !1 },\n  uid: { type: String, default: null },\n  disabled: { type: Boolean, default: !1 },\n  readonly: { type: Boolean, default: !1 },\n  inline: { type: [Boolean, Object], default: !1 },\n  textInput: { type: [Boolean, Object], default: !1 },\n  sixWeeks: { type: [Boolean, String], default: !1 },\n  actionRow: { type: Object, default: () => ({}) },\n  focusStartDate: { type: Boolean, default: !1 },\n  disabledTimes: { type: [Function, Array], default: void 0 },\n  timePickerInline: { type: Boolean, default: !1 },\n  calendar: { type: Function, default: null },\n  config: { type: Object, default: void 0 },\n  quarterPicker: { type: Boolean, default: !1 },\n  yearFirst: { type: Boolean, default: !1 },\n  loading: { type: Boolean, default: !1 },\n  onInternalModelChange: { type: [Function, Object], default: null },\n  enableMinutes: { type: Boolean, default: !0 },\n  ui: { type: Object, default: () => ({}) }\n}, rt = {\n  ...ca,\n  shadow: { type: Boolean, default: !1 },\n  flowStep: { type: Number, default: 0 },\n  internalModelValue: { type: [Date, Array], default: null },\n  noOverlayFocus: { type: Boolean, default: !1 },\n  collapse: { type: Boolean, default: !1 },\n  menuWrapRef: { type: Object, default: null },\n  getInputRect: { type: Function, default: () => ({}) },\n  isTextInputDate: { type: Boolean, default: !1 }\n}, ql = [\"title\"], Xl = [\"disabled\"], Jl = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"ActionRow\",\n  props: {\n    menuMount: { type: Boolean, default: !1 },\n    calendarWidth: { type: Number, default: 0 },\n    ...rt\n  },\n  emits: [\"close-picker\", \"select-date\", \"select-now\", \"invalid-select\"],\n  setup(e, { emit: t }) {\n    const l = t, a = e, {\n      defaultedActionRow: n,\n      defaultedPreviewFormat: i,\n      defaultedMultiCalendars: d,\n      defaultedTextInput: b,\n      defaultedInline: c,\n      defaultedRange: L,\n      defaultedMultiDates: v\n    } = Ce(a), { isTimeValid: _, isMonthValid: h } = kt(a), { buildMatrix: C } = bt(), H = ne(null), E = ne(null), U = ne(!1), f = ne({}), B = ne(null), P = ne(null);\n    We(() => {\n      a.arrowNavigation && C([Ie(H), Ie(E)], \"actionRow\"), Q(), window.addEventListener(\"resize\", Q);\n    }), ua(() => {\n      window.removeEventListener(\"resize\", Q);\n    });\n    const Q = () => {\n      U.value = !1, setTimeout(() => {\n        var te, g;\n        const y = (te = B.value) == null ? void 0 : te.getBoundingClientRect(), z = (g = P.value) == null ? void 0 : g.getBoundingClientRect();\n        y && z && (f.value.maxWidth = `${z.width - y.width - 20}px`), U.value = !0;\n      }, 0);\n    }, ae = J(() => L.value.enabled && !L.value.partialRange && a.internalModelValue ? a.internalModelValue.length === 2 : !0), oe = J(\n      () => !_.value(a.internalModelValue) || !h.value(a.internalModelValue) || !ae.value\n    ), ee = () => {\n      const y = i.value;\n      return a.timePicker || a.monthPicker, y(Ye(a.internalModelValue));\n    }, S = () => {\n      const y = a.internalModelValue;\n      return d.value.count > 0 ? `${x(y[0])} - ${x(y[1])}` : [x(y[0]), x(y[1])];\n    }, x = (y) => Bn(\n      y,\n      i.value,\n      a.formatLocale,\n      b.value.rangeSeparator,\n      a.modelAuto,\n      i.value\n    ), Y = J(() => !a.internalModelValue || !a.menuMount ? \"\" : typeof i.value == \"string\" ? Array.isArray(a.internalModelValue) ? a.internalModelValue.length === 2 && a.internalModelValue[1] ? S() : v.value.enabled ? a.internalModelValue.map((y) => `${x(y)}`) : a.modelAuto ? `${x(a.internalModelValue[0])}` : `${x(a.internalModelValue[0])} -` : x(a.internalModelValue) : ee()), q = () => v.value.enabled ? \"; \" : \" - \", de = J(\n      () => Array.isArray(Y.value) ? Y.value.join(q()) : Y.value\n    ), ve = () => {\n      _.value(a.internalModelValue) && h.value(a.internalModelValue) && ae.value ? l(\"select-date\") : l(\"invalid-select\");\n    };\n    return (y, z) => (T(), K(\"div\", {\n      ref_key: \"actionRowRef\",\n      ref: P,\n      class: \"dp__action_row\"\n    }, [\n      y.$slots[\"action-row\"] ? ie(y.$slots, \"action-row\", Ne(Ee({ key: 0 }, {\n        internalModelValue: y.internalModelValue,\n        disabled: oe.value,\n        selectDate: () => y.$emit(\"select-date\"),\n        closePicker: () => y.$emit(\"close-picker\")\n      }))) : (T(), K(be, { key: 1 }, [\n        o(n).showPreview ? (T(), K(\"div\", {\n          key: 0,\n          class: \"dp__selection_preview\",\n          title: de.value,\n          style: tt(f.value)\n        }, [\n          y.$slots[\"action-preview\"] && U.value ? ie(y.$slots, \"action-preview\", {\n            key: 0,\n            value: y.internalModelValue\n          }) : Z(\"\", !0),\n          !y.$slots[\"action-preview\"] && U.value ? (T(), K(be, { key: 1 }, [\n            ct(Ue(de.value), 1)\n          ], 64)) : Z(\"\", !0)\n        ], 12, ql)) : Z(\"\", !0),\n        ye(\"div\", {\n          ref_key: \"actionBtnContainer\",\n          ref: B,\n          class: \"dp__action_buttons\",\n          \"data-dp-element\": \"action-row\"\n        }, [\n          y.$slots[\"action-buttons\"] ? ie(y.$slots, \"action-buttons\", {\n            key: 0,\n            value: y.internalModelValue\n          }) : Z(\"\", !0),\n          y.$slots[\"action-buttons\"] ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n            !o(c).enabled && o(n).showCancel ? (T(), K(\"button\", {\n              key: 0,\n              ref_key: \"cancelButtonRef\",\n              ref: H,\n              type: \"button\",\n              class: \"dp__action_button dp__action_cancel\",\n              onClick: z[0] || (z[0] = (te) => y.$emit(\"close-picker\")),\n              onKeydown: z[1] || (z[1] = (te) => o(Ke)(te, () => y.$emit(\"close-picker\")))\n            }, Ue(y.cancelText), 545)) : Z(\"\", !0),\n            o(n).showNow ? (T(), K(\"button\", {\n              key: 1,\n              type: \"button\",\n              class: \"dp__action_button dp__action_cancel\",\n              onClick: z[2] || (z[2] = (te) => y.$emit(\"select-now\")),\n              onKeydown: z[3] || (z[3] = (te) => o(Ke)(te, () => y.$emit(\"select-now\")))\n            }, Ue(y.nowButtonLabel), 33)) : Z(\"\", !0),\n            o(n).showSelect ? (T(), K(\"button\", {\n              key: 2,\n              ref_key: \"selectButtonRef\",\n              ref: E,\n              type: \"button\",\n              class: \"dp__action_button dp__action_select\",\n              disabled: oe.value,\n              \"data-test\": \"select-button\",\n              onKeydown: z[4] || (z[4] = (te) => o(Ke)(te, () => ve())),\n              onClick: ve\n            }, Ue(y.selectText), 41, Xl)) : Z(\"\", !0)\n          ], 64))\n        ], 512)\n      ], 64))\n    ], 512));\n  }\n}), Zl = [\"role\", \"aria-label\", \"tabindex\"], xl = { class: \"dp__selection_grid_header\" }, er = [\"aria-selected\", \"aria-disabled\", \"data-test\", \"onClick\", \"onKeydown\", \"onMouseover\"], tr = [\"aria-label\"], qt = /* @__PURE__ */ Le({\n  __name: \"SelectionOverlay\",\n  props: {\n    items: {},\n    type: {},\n    isLast: { type: Boolean },\n    arrowNavigation: { type: Boolean },\n    skipButtonRef: { type: Boolean },\n    headerRefs: {},\n    hideNavigation: {},\n    escClose: { type: Boolean },\n    useRelative: { type: Boolean },\n    height: {},\n    textInput: { type: [Boolean, Object] },\n    config: {},\n    noOverlayFocus: { type: Boolean },\n    focusValue: {},\n    menuWrapRef: {},\n    ariaLabels: {},\n    overlayLabel: {}\n  },\n  emits: [\"selected\", \"toggle\", \"reset-flow\", \"hover-value\"],\n  setup(e, { expose: t, emit: l }) {\n    const { setSelectionGrid: a, buildMultiLevelMatrix: n, setMonthPicker: i } = bt(), d = l, b = e, { defaultedAriaLabels: c, defaultedTextInput: L, defaultedConfig: v } = Ce(\n      b\n    ), { hideNavigationButtons: _ } = ma(), h = ne(!1), C = ne(null), H = ne(null), E = ne([]), U = ne(), f = ne(null), B = ne(0), P = ne(null);\n    Kn(() => {\n      C.value = null;\n    }), We(() => {\n      xe().then(() => q()), b.noOverlayFocus || ae(), Q(!0);\n    }), ua(() => Q(!1));\n    const Q = (I) => {\n      var D;\n      b.arrowNavigation && ((D = b.headerRefs) != null && D.length ? i(I) : a(I));\n    }, ae = () => {\n      var D;\n      const I = Ie(H);\n      I && (L.value.enabled || (C.value ? (D = C.value) == null || D.focus({ preventScroll: !0 }) : I.focus({ preventScroll: !0 })), h.value = I.clientHeight < I.scrollHeight);\n    }, oe = J(\n      () => ({\n        dp__overlay: !0,\n        \"dp--overlay-absolute\": !b.useRelative,\n        \"dp--overlay-relative\": b.useRelative\n      })\n    ), ee = J(\n      () => b.useRelative ? { height: `${b.height}px`, width: \"var(--dp-menu-min-width)\" } : void 0\n    ), S = J(() => ({\n      dp__overlay_col: !0\n    })), x = J(\n      () => ({\n        dp__btn: !0,\n        dp__button: !0,\n        dp__overlay_action: !0,\n        dp__over_action_scroll: h.value,\n        dp__button_bottom: b.isLast\n      })\n    ), Y = J(() => {\n      var I, D;\n      return {\n        dp__overlay_container: !0,\n        dp__container_flex: ((I = b.items) == null ? void 0 : I.length) <= 6,\n        dp__container_block: ((D = b.items) == null ? void 0 : D.length) > 6\n      };\n    });\n    at(\n      () => b.items,\n      () => q(!1),\n      { deep: !0 }\n    );\n    const q = (I = !0) => {\n      xe().then(() => {\n        const D = Ie(C), V = Ie(H), s = Ie(f), M = Ie(P), F = s ? s.getBoundingClientRect().height : 0;\n        V && (V.getBoundingClientRect().height ? B.value = V.getBoundingClientRect().height - F : B.value = v.value.modeHeight - F), D && M && I && (M.scrollTop = D.offsetTop - M.offsetTop - (B.value / 2 - D.getBoundingClientRect().height) - F);\n      });\n    }, de = (I) => {\n      I.disabled || d(\"selected\", I.value);\n    }, ve = () => {\n      d(\"toggle\"), d(\"reset-flow\");\n    }, y = () => {\n      b.escClose && ve();\n    }, z = (I, D, V, s) => {\n      I && ((D.active || D.value === b.focusValue) && (C.value = I), b.arrowNavigation && (Array.isArray(E.value[V]) ? E.value[V][s] = I : E.value[V] = [I], te()));\n    }, te = () => {\n      var D, V;\n      const I = (D = b.headerRefs) != null && D.length ? [b.headerRefs].concat(E.value) : E.value.concat([b.skipButtonRef ? [] : [f.value]]);\n      n(Ye(I), (V = b.headerRefs) != null && V.length ? \"monthPicker\" : \"selectionGrid\");\n    }, g = (I) => {\n      b.arrowNavigation || yt(I, v.value, !0);\n    }, X = (I) => {\n      U.value = I, d(\"hover-value\", I);\n    }, A = () => {\n      if (ve(), !b.isLast) {\n        const I = Ea(b.menuWrapRef ?? null, \"action-row\");\n        if (I) {\n          const D = Tn(I);\n          D == null || D.focus();\n        }\n      }\n    }, p = (I) => {\n      switch (I.key) {\n        case Pe.esc:\n          return y();\n        case Pe.arrowLeft:\n          return g(I);\n        case Pe.arrowRight:\n          return g(I);\n        case Pe.arrowUp:\n          return g(I);\n        case Pe.arrowDown:\n          return g(I);\n        default:\n          return;\n      }\n    }, se = (I) => {\n      if (I.key === Pe.enter) return ve();\n      if (I.key === Pe.tab) return A();\n    };\n    return t({ focusGrid: ae }), (I, D) => {\n      var V;\n      return T(), K(\"div\", {\n        ref_key: \"gridWrapRef\",\n        ref: H,\n        class: we(oe.value),\n        style: tt(ee.value),\n        role: I.useRelative ? void 0 : \"dialog\",\n        \"aria-label\": I.overlayLabel,\n        tabindex: I.useRelative ? void 0 : \"0\",\n        onKeydown: p,\n        onClick: D[0] || (D[0] = Wt(() => {\n        }, [\"prevent\"]))\n      }, [\n        ye(\"div\", {\n          ref_key: \"containerRef\",\n          ref: P,\n          class: we(Y.value),\n          style: tt({ \"--dp-overlay-height\": `${B.value}px` }),\n          role: \"grid\"\n        }, [\n          ye(\"div\", xl, [\n            ie(I.$slots, \"header\")\n          ]),\n          I.$slots.overlay ? ie(I.$slots, \"overlay\", { key: 0 }) : (T(!0), K(be, { key: 1 }, Re(I.items, (s, M) => (T(), K(\"div\", {\n            key: M,\n            class: we([\"dp__overlay_row\", { dp__flex_row: I.items.length >= 3 }]),\n            role: \"row\"\n          }, [\n            (T(!0), K(be, null, Re(s, (F, u) => (T(), K(\"div\", {\n              key: F.value,\n              ref_for: !0,\n              ref: (le) => z(le, F, M, u),\n              role: \"gridcell\",\n              class: we(S.value),\n              \"aria-selected\": F.active || void 0,\n              \"aria-disabled\": F.disabled || void 0,\n              tabindex: \"0\",\n              \"data-test\": F.text,\n              onClick: Wt((le) => de(F), [\"prevent\"]),\n              onKeydown: (le) => o(Ke)(le, () => de(F), !0),\n              onMouseover: (le) => X(F.value)\n            }, [\n              ye(\"div\", {\n                class: we(F.className)\n              }, [\n                I.$slots.item ? ie(I.$slots, \"item\", {\n                  key: 0,\n                  item: F\n                }) : Z(\"\", !0),\n                I.$slots.item ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                  ct(Ue(F.text), 1)\n                ], 64))\n              ], 2)\n            ], 42, er))), 128))\n          ], 2))), 128))\n        ], 6),\n        I.$slots[\"button-icon\"] ? na((T(), K(\"button\", {\n          key: 0,\n          ref_key: \"toggleButton\",\n          ref: f,\n          type: \"button\",\n          \"aria-label\": (V = o(c)) == null ? void 0 : V.toggleOverlay,\n          class: we(x.value),\n          tabindex: \"0\",\n          onClick: ve,\n          onKeydown: se\n        }, [\n          ie(I.$slots, \"button-icon\")\n        ], 42, tr)), [\n          [la, !o(_)(I.hideNavigation, I.type)]\n        ]) : Z(\"\", !0)\n      ], 46, Zl);\n    };\n  }\n}), fa = /* @__PURE__ */ Le({\n  __name: \"InstanceWrap\",\n  props: {\n    multiCalendars: {},\n    stretch: { type: Boolean },\n    collapse: { type: Boolean }\n  },\n  setup(e) {\n    const t = e, l = J(\n      () => t.multiCalendars > 0 ? [...Array(t.multiCalendars).keys()] : [0]\n    ), a = J(() => ({\n      dp__instance_calendar: t.multiCalendars > 0\n    }));\n    return (n, i) => (T(), K(\"div\", {\n      class: we({\n        dp__menu_inner: !n.stretch,\n        \"dp--menu--inner-stretched\": n.stretch,\n        dp__flex_display: n.multiCalendars > 0,\n        \"dp--flex-display-collapsed\": n.collapse\n      })\n    }, [\n      (T(!0), K(be, null, Re(l.value, (d, b) => (T(), K(\"div\", {\n        key: d,\n        class: we(a.value)\n      }, [\n        ie(n.$slots, \"default\", {\n          instance: d,\n          index: b\n        })\n      ], 2))), 128))\n    ], 2));\n  }\n}), ar = [\"data-dp-element\", \"aria-label\", \"aria-disabled\"], Ut = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"ArrowBtn\",\n  props: {\n    ariaLabel: {},\n    elName: {},\n    disabled: { type: Boolean }\n  },\n  emits: [\"activate\", \"set-ref\"],\n  setup(e, { emit: t }) {\n    const l = t, a = ne(null);\n    return We(() => l(\"set-ref\", a)), (n, i) => (T(), K(\"button\", {\n      ref_key: \"elRef\",\n      ref: a,\n      type: \"button\",\n      \"data-dp-element\": n.elName,\n      class: \"dp__btn dp--arrow-btn-nav\",\n      tabindex: \"0\",\n      \"aria-label\": n.ariaLabel,\n      \"aria-disabled\": n.disabled || void 0,\n      onClick: i[0] || (i[0] = (d) => n.$emit(\"activate\")),\n      onKeydown: i[1] || (i[1] = (d) => o(Ke)(d, () => n.$emit(\"activate\"), !0))\n    }, [\n      ye(\"span\", {\n        class: we([\"dp__inner_nav\", { dp__inner_nav_disabled: n.disabled }])\n      }, [\n        ie(n.$slots, \"default\")\n      ], 2)\n    ], 40, ar));\n  }\n}), nr = [\"aria-label\", \"data-test\"], En = /* @__PURE__ */ Le({\n  __name: \"YearModePicker\",\n  props: {\n    ...rt,\n    showYearPicker: { type: Boolean, default: !1 },\n    items: { type: Array, default: () => [] },\n    instance: { type: Number, default: 0 },\n    year: { type: Number, default: 0 },\n    isDisabled: { type: Function, default: () => !1 }\n  },\n  emits: [\"toggle-year-picker\", \"year-select\", \"handle-year\"],\n  setup(e, { emit: t }) {\n    const l = t, a = e, { showRightIcon: n, showLeftIcon: i } = ma(), { defaultedConfig: d, defaultedMultiCalendars: b, defaultedAriaLabels: c, defaultedTransitions: L, defaultedUI: v } = Ce(a), { showTransition: _, transitionName: h } = Xt(L), C = ne(!1), H = (f = !1, B) => {\n      C.value = !C.value, l(\"toggle-year-picker\", { flow: f, show: B });\n    }, E = (f) => {\n      C.value = !1, l(\"year-select\", f);\n    }, U = (f = !1) => {\n      l(\"handle-year\", f);\n    };\n    return (f, B) => {\n      var P, Q, ae, oe, ee;\n      return T(), K(be, null, [\n        ye(\"div\", {\n          class: we([\"dp--year-mode-picker\", { \"dp--hidden-el\": C.value }])\n        }, [\n          o(i)(o(b), e.instance) ? (T(), $e(Ut, {\n            key: 0,\n            ref: \"mpPrevIconRef\",\n            \"aria-label\": (P = o(c)) == null ? void 0 : P.prevYear,\n            disabled: e.isDisabled(!1),\n            class: we((Q = o(v)) == null ? void 0 : Q.navBtnPrev),\n            onActivate: B[0] || (B[0] = (S) => U(!1))\n          }, {\n            default: ke(() => [\n              f.$slots[\"arrow-left\"] ? ie(f.$slots, \"arrow-left\", { key: 0 }) : Z(\"\", !0),\n              f.$slots[\"arrow-left\"] ? Z(\"\", !0) : (T(), $e(o(za), { key: 1 }))\n            ]),\n            _: 3\n          }, 8, [\"aria-label\", \"disabled\", \"class\"])) : Z(\"\", !0),\n          ye(\"button\", {\n            ref: \"mpYearButtonRef\",\n            class: \"dp__btn dp--year-select\",\n            type: \"button\",\n            \"aria-label\": `${e.year}-${(ae = o(c)) == null ? void 0 : ae.openYearsOverlay}`,\n            \"data-test\": `year-mode-btn-${e.instance}`,\n            onClick: B[1] || (B[1] = () => H(!1)),\n            onKeydown: B[2] || (B[2] = Gn(() => H(!1), [\"enter\"]))\n          }, [\n            f.$slots.year ? ie(f.$slots, \"year\", {\n              key: 0,\n              year: e.year\n            }) : Z(\"\", !0),\n            f.$slots.year ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n              ct(Ue(e.year), 1)\n            ], 64))\n          ], 40, nr),\n          o(n)(o(b), e.instance) ? (T(), $e(Ut, {\n            key: 1,\n            ref: \"mpNextIconRef\",\n            \"aria-label\": (oe = o(c)) == null ? void 0 : oe.nextYear,\n            disabled: e.isDisabled(!0),\n            class: we((ee = o(v)) == null ? void 0 : ee.navBtnNext),\n            onActivate: B[3] || (B[3] = (S) => U(!0))\n          }, {\n            default: ke(() => [\n              f.$slots[\"arrow-right\"] ? ie(f.$slots, \"arrow-right\", { key: 0 }) : Z(\"\", !0),\n              f.$slots[\"arrow-right\"] ? Z(\"\", !0) : (T(), $e(o(Ha), { key: 1 }))\n            ]),\n            _: 3\n          }, 8, [\"aria-label\", \"disabled\", \"class\"])) : Z(\"\", !0)\n        ], 2),\n        Ze(Nt, {\n          name: o(h)(e.showYearPicker),\n          css: o(_)\n        }, {\n          default: ke(() => {\n            var S, x;\n            return [\n              e.showYearPicker ? (T(), $e(qt, {\n                key: 0,\n                items: e.items,\n                \"text-input\": f.textInput,\n                \"esc-close\": f.escClose,\n                config: f.config,\n                \"is-last\": f.autoApply && !o(d).keepActionRow,\n                \"hide-navigation\": f.hideNavigation,\n                \"aria-labels\": f.ariaLabels,\n                \"overlay-label\": (x = (S = o(c)) == null ? void 0 : S.yearPicker) == null ? void 0 : x.call(S, !0),\n                type: \"year\",\n                onToggle: H,\n                onSelected: B[4] || (B[4] = (Y) => E(Y))\n              }, Ve({\n                \"button-icon\": ke(() => [\n                  f.$slots[\"calendar-icon\"] ? ie(f.$slots, \"calendar-icon\", { key: 0 }) : Z(\"\", !0),\n                  f.$slots[\"calendar-icon\"] ? Z(\"\", !0) : (T(), $e(o(Et), { key: 1 }))\n                ]),\n                _: 2\n              }, [\n                f.$slots[\"year-overlay-value\"] ? {\n                  name: \"item\",\n                  fn: ke(({ item: Y }) => [\n                    ie(f.$slots, \"year-overlay-value\", {\n                      text: Y.text,\n                      value: Y.value\n                    })\n                  ]),\n                  key: \"0\"\n                } : void 0\n              ]), 1032, [\"items\", \"text-input\", \"esc-close\", \"config\", \"is-last\", \"hide-navigation\", \"aria-labels\", \"overlay-label\"])) : Z(\"\", !0)\n            ];\n          }),\n          _: 3\n        }, 8, [\"name\", \"css\"])\n      ], 64);\n    };\n  }\n}), Xa = (e, t, l) => {\n  if (t.value && Array.isArray(t.value))\n    if (t.value.some((a) => Me(e, a))) {\n      const a = t.value.filter((n) => !Me(n, e));\n      t.value = a.length ? a : null;\n    } else (l && +l > t.value.length || !l) && t.value.push(e);\n  else\n    t.value = [e];\n}, Ja = (e, t, l) => {\n  let a = e.value ? e.value.slice() : [];\n  return a.length === 2 && a[1] !== null && (a = []), a.length ? Oe(t, a[0]) ? (a.unshift(t), l(\"range-start\", a[0]), l(\"range-start\", a[1])) : (a[1] = t, l(\"range-end\", t)) : (a = [t], l(\"range-start\", t)), a;\n}, va = (e, t, l, a) => {\n  e && (e[0] && e[1] && l && t(\"auto-apply\"), e[0] && !e[1] && a && l && t(\"auto-apply\"));\n}, Fn = (e) => {\n  Array.isArray(e.value) && e.value.length <= 2 && e.range ? e.modelValue.value = e.value.map((t) => qe(G(t), e.timezone)) : Array.isArray(e.value) || (e.modelValue.value = qe(G(e.value), e.timezone));\n}, Ln = (e, t, l, a) => Array.isArray(t.value) && (t.value.length === 2 || t.value.length === 1 && a.value.partialRange) ? a.value.fixedStart && (Be(e, t.value[0]) || Me(e, t.value[0])) ? [t.value[0], e] : a.value.fixedEnd && (Oe(e, t.value[1]) || Me(e, t.value[1])) ? [e, t.value[1]] : (l(\"invalid-fixed-range\", e), t.value) : [], zn = ({\n  multiCalendars: e,\n  range: t,\n  highlight: l,\n  propDates: a,\n  calendars: n,\n  modelValue: i,\n  props: d,\n  filters: b,\n  year: c,\n  month: L,\n  emit: v\n}) => {\n  const _ = J(() => Ka(d.yearRange, d.locale, d.reverseYears)), h = ne([!1]), C = J(() => (Y, q) => {\n    const de = Te(lt(/* @__PURE__ */ new Date()), {\n      month: L.value(Y),\n      year: c.value(Y)\n    }), ve = q ? wn(de) : oa(de);\n    return _n(\n      ve,\n      a.value.maxDate,\n      a.value.minDate,\n      d.preventMinMaxNavigation,\n      q\n    );\n  }), H = () => Array.isArray(i.value) && e.value.solo && i.value[1], E = () => {\n    for (let Y = 0; Y < e.value.count; Y++)\n      if (Y === 0)\n        n.value[Y] = n.value[0];\n      else if (Y === e.value.count - 1 && H())\n        n.value[Y] = {\n          month: De(i.value[1]),\n          year: pe(i.value[1])\n        };\n      else {\n        const q = Te(G(), n.value[Y - 1]);\n        n.value[Y] = { month: De(q), year: pe(bn(q, 1)) };\n      }\n  }, U = (Y) => {\n    if (!Y) return E();\n    const q = Te(G(), n.value[Y]);\n    return n.value[0].year = pe(kn(q, e.value.count - 1)), E();\n  }, f = (Y, q) => {\n    const de = ll(q, Y);\n    return t.value.showLastInRange && de > 1 ? q : Y;\n  }, B = (Y) => d.focusStartDate || e.value.solo ? Y[0] : Y[1] ? f(Y[0], Y[1]) : Y[0], P = () => {\n    if (i.value) {\n      const Y = Array.isArray(i.value) ? B(i.value) : i.value;\n      n.value[0] = { month: De(Y), year: pe(Y) };\n    }\n  }, Q = () => {\n    P(), e.value.count && E();\n  };\n  at(i, (Y, q) => {\n    d.isTextInputDate && JSON.stringify(Y ?? {}) !== JSON.stringify(q ?? {}) && Q();\n  }), We(() => {\n    Q();\n  });\n  const ae = (Y, q) => {\n    n.value[q].year = Y, v(\"update-month-year\", { instance: q, year: Y, month: n.value[q].month }), e.value.count && !e.value.solo && U(q);\n  }, oe = J(() => (Y) => Yt(_.value, (q) => {\n    var z;\n    const de = c.value(Y) === q.value, ve = Gt(\n      q.value,\n      It(a.value.minDate),\n      It(a.value.maxDate)\n    ) || ((z = b.value.years) == null ? void 0 : z.includes(c.value(Y))), y = qa(l.value, q.value);\n    return { active: de, disabled: ve, highlighted: y };\n  })), ee = (Y, q) => {\n    ae(Y, q), x(q);\n  }, S = (Y, q = !1) => {\n    if (!C.value(Y, q)) {\n      const de = q ? c.value(Y) + 1 : c.value(Y) - 1;\n      ae(de, Y);\n    }\n  }, x = (Y, q = !1, de) => {\n    q || v(\"reset-flow\"), de !== void 0 ? h.value[Y] = de : h.value[Y] = !h.value[Y], h.value[Y] ? v(\"overlay-toggle\", { open: !0, overlay: He.year }) : (v(\"overlay-closed\"), v(\"overlay-toggle\", { open: !1, overlay: He.year }));\n  };\n  return {\n    isDisabled: C,\n    groupedYears: oe,\n    showYearPicker: h,\n    selectYear: ae,\n    toggleYearPicker: x,\n    handleYearSelect: ee,\n    handleYear: S\n  };\n}, lr = (e, t) => {\n  const {\n    defaultedMultiCalendars: l,\n    defaultedAriaLabels: a,\n    defaultedTransitions: n,\n    defaultedConfig: i,\n    defaultedRange: d,\n    defaultedHighlight: b,\n    propDates: c,\n    defaultedTz: L,\n    defaultedFilters: v,\n    defaultedMultiDates: _\n  } = Ce(e), h = () => {\n    e.isTextInputDate && Q(pe(G(e.startDate)), 0);\n  }, { modelValue: C, year: H, month: E, calendars: U } = Jt(e, t, h), f = J(() => $n(e.formatLocale, e.locale, e.monthNameFormat)), B = ne(null), { checkMinMaxRange: P } = kt(e), {\n    selectYear: Q,\n    groupedYears: ae,\n    showYearPicker: oe,\n    toggleYearPicker: ee,\n    handleYearSelect: S,\n    handleYear: x,\n    isDisabled: Y\n  } = zn({\n    modelValue: C,\n    multiCalendars: l,\n    range: d,\n    highlight: b,\n    calendars: U,\n    year: H,\n    propDates: c,\n    month: E,\n    filters: v,\n    props: e,\n    emit: t\n  });\n  We(() => {\n    e.startDate && (C.value && e.focusStartDate || !C.value) && Q(pe(G(e.startDate)), 0);\n  });\n  const q = (M) => M ? { month: De(M), year: pe(M) } : { month: null, year: null }, de = () => C.value ? Array.isArray(C.value) ? C.value.map((M) => q(M)) : q(C.value) : q(), ve = (M, F) => {\n    const u = U.value[M], le = de();\n    return Array.isArray(le) ? le.some((me) => me.year === (u == null ? void 0 : u.year) && me.month === F) : (u == null ? void 0 : u.year) === le.year && F === le.month;\n  }, y = (M, F, u) => {\n    var me, $;\n    const le = de();\n    return Array.isArray(le) ? H.value(F) === ((me = le[u]) == null ? void 0 : me.year) && M === (($ = le[u]) == null ? void 0 : $.month) : !1;\n  }, z = (M, F) => {\n    if (d.value.enabled) {\n      const u = de();\n      if (Array.isArray(C.value) && Array.isArray(u)) {\n        const le = y(M, F, 0) || y(M, F, 1), me = dt(lt(G()), M, H.value(F));\n        return da(C.value, B.value, me) && !le;\n      }\n      return !1;\n    }\n    return !1;\n  }, te = J(() => (M) => Yt(f.value, (F) => {\n    var ge;\n    const u = ve(M, F.value), le = Gt(\n      F.value,\n      Pn(H.value(M), c.value.minDate),\n      Rn(H.value(M), c.value.maxDate)\n    ) || Rl(c.value.disabledDates, H.value(M)).includes(F.value) || ((ge = v.value.months) == null ? void 0 : ge.includes(F.value)), me = z(F.value, M), $ = Yn(b.value, F.value, H.value(M));\n    return { active: u, disabled: le, isBetween: me, highlighted: $ };\n  })), g = (M, F) => dt(lt(G()), M, H.value(F)), X = (M, F) => {\n    const u = C.value ? C.value : lt(/* @__PURE__ */ new Date());\n    C.value = dt(u, M, H.value(F)), t(\"auto-apply\"), t(\"update-flow-step\");\n  }, A = (M, F) => {\n    const u = g(M, F);\n    d.value.fixedEnd || d.value.fixedStart ? C.value = Ln(u, C, t, d) : C.value ? P(u, C.value) && (C.value = Ja(C, g(M, F), t)) : C.value = [g(M, F)], xe().then(() => {\n      va(C.value, t, e.autoApply, e.modelAuto);\n    });\n  }, p = (M, F) => {\n    Xa(g(M, F), C, _.value.limit), t(\"auto-apply\", !0);\n  }, se = (M, F) => (U.value[F].month = M, D(F, U.value[F].year, M), _.value.enabled ? p(M, F) : d.value.enabled ? A(M, F) : X(M, F)), I = (M, F) => {\n    Q(M, F), D(F, M, null);\n  }, D = (M, F, u) => {\n    let le = u;\n    if (!le && le !== 0) {\n      const me = de();\n      le = Array.isArray(me) ? me[M].month : me.month;\n    }\n    t(\"update-month-year\", { instance: M, year: F, month: le });\n  };\n  return {\n    groupedMonths: te,\n    groupedYears: ae,\n    year: H,\n    isDisabled: Y,\n    defaultedMultiCalendars: l,\n    defaultedAriaLabels: a,\n    defaultedTransitions: n,\n    defaultedConfig: i,\n    showYearPicker: oe,\n    modelValue: C,\n    presetDate: (M, F) => {\n      Fn({\n        value: M,\n        modelValue: C,\n        range: d.value.enabled,\n        timezone: F ? void 0 : L.value.timezone\n      }), t(\"auto-apply\");\n    },\n    setHoverDate: (M, F) => {\n      B.value = g(M, F);\n    },\n    selectMonth: se,\n    selectYear: I,\n    toggleYearPicker: ee,\n    handleYearSelect: S,\n    handleYear: x,\n    getModelMonthYear: de\n  };\n}, rr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"MonthPicker\",\n  props: {\n    ...rt\n  },\n  emits: [\n    \"update:internal-model-value\",\n    \"overlay-closed\",\n    \"reset-flow\",\n    \"range-start\",\n    \"range-end\",\n    \"auto-apply\",\n    \"update-month-year\",\n    \"update-flow-step\",\n    \"mount\",\n    \"invalid-fixed-range\",\n    \"overlay-toggle\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = Pt(), i = Je(n, \"yearMode\"), d = e;\n    We(() => {\n      d.shadow || a(\"mount\", null);\n    });\n    const {\n      groupedMonths: b,\n      groupedYears: c,\n      year: L,\n      isDisabled: v,\n      defaultedMultiCalendars: _,\n      defaultedConfig: h,\n      showYearPicker: C,\n      modelValue: H,\n      presetDate: E,\n      setHoverDate: U,\n      selectMonth: f,\n      selectYear: B,\n      toggleYearPicker: P,\n      handleYearSelect: Q,\n      handleYear: ae,\n      getModelMonthYear: oe\n    } = lr(d, a);\n    return t({ getSidebarProps: () => ({\n      modelValue: H,\n      year: L,\n      getModelMonthYear: oe,\n      selectMonth: f,\n      selectYear: B,\n      handleYear: ae\n    }), presetDate: E, toggleYearPicker: (S) => P(0, S) }), (S, x) => (T(), $e(fa, {\n      \"multi-calendars\": o(_).count,\n      collapse: S.collapse,\n      stretch: \"\"\n    }, {\n      default: ke(({ instance: Y }) => [\n        S.$slots[\"top-extra\"] ? ie(S.$slots, \"top-extra\", {\n          key: 0,\n          value: S.internalModelValue\n        }) : Z(\"\", !0),\n        S.$slots[\"month-year\"] ? ie(S.$slots, \"month-year\", Ne(Ee({ key: 1 }, {\n          year: o(L),\n          months: o(b)(Y),\n          years: o(c)(Y),\n          selectMonth: o(f),\n          selectYear: o(B),\n          instance: Y\n        }))) : (T(), $e(qt, {\n          key: 2,\n          items: o(b)(Y),\n          \"arrow-navigation\": S.arrowNavigation,\n          \"is-last\": S.autoApply && !o(h).keepActionRow,\n          \"esc-close\": S.escClose,\n          height: o(h).modeHeight,\n          config: S.config,\n          \"no-overlay-focus\": !!(S.noOverlayFocus || S.textInput),\n          \"use-relative\": \"\",\n          type: \"month\",\n          onSelected: (q) => o(f)(q, Y),\n          onHoverValue: (q) => o(U)(q, Y)\n        }, Ve({\n          header: ke(() => [\n            Ze(En, Ee(S.$props, {\n              items: o(c)(Y),\n              instance: Y,\n              \"show-year-picker\": o(C)[Y],\n              year: o(L)(Y),\n              \"is-disabled\": (q) => o(v)(Y, q),\n              onHandleYear: (q) => o(ae)(Y, q),\n              onYearSelect: (q) => o(Q)(q, Y),\n              onToggleYearPicker: (q) => o(P)(Y, q == null ? void 0 : q.flow, q == null ? void 0 : q.show)\n            }), Ve({ _: 2 }, [\n              Re(o(i), (q, de) => ({\n                name: q,\n                fn: ke((ve) => [\n                  ie(S.$slots, q, Ne(Qe(ve)))\n                ])\n              }))\n            ]), 1040, [\"items\", \"instance\", \"show-year-picker\", \"year\", \"is-disabled\", \"onHandleYear\", \"onYearSelect\", \"onToggleYearPicker\"])\n          ]),\n          _: 2\n        }, [\n          S.$slots[\"month-overlay-value\"] ? {\n            name: \"item\",\n            fn: ke(({ item: q }) => [\n              ie(S.$slots, \"month-overlay-value\", {\n                text: q.text,\n                value: q.value\n              })\n            ]),\n            key: \"0\"\n          } : void 0\n        ]), 1032, [\"items\", \"arrow-navigation\", \"is-last\", \"esc-close\", \"height\", \"config\", \"no-overlay-focus\", \"onSelected\", \"onHoverValue\"]))\n      ]),\n      _: 3\n    }, 8, [\"multi-calendars\", \"collapse\"]));\n  }\n}), or = (e, t) => {\n  const l = () => {\n    e.isTextInputDate && (v.value = pe(G(e.startDate)));\n  }, { modelValue: a } = Jt(e, t, l), n = ne(null), { defaultedHighlight: i, defaultedMultiDates: d, defaultedFilters: b, defaultedRange: c, propDates: L } = Ce(e), v = ne();\n  We(() => {\n    e.startDate && (a.value && e.focusStartDate || !a.value) && (v.value = pe(G(e.startDate)));\n  });\n  const _ = (f) => Array.isArray(a.value) ? a.value.some((B) => pe(B) === f) : a.value ? pe(a.value) === f : !1, h = (f) => c.value.enabled && Array.isArray(a.value) ? da(a.value, n.value, H(f)) : !1, C = J(() => Yt(Ka(e.yearRange, e.locale, e.reverseYears), (f) => {\n    const B = _(f.value), P = Gt(\n      f.value,\n      It(L.value.minDate),\n      It(L.value.maxDate)\n    ) || b.value.years.includes(f.value), Q = h(f.value) && !B, ae = qa(i.value, f.value);\n    return { active: B, disabled: P, isBetween: Q, highlighted: ae };\n  })), H = (f) => st(lt(oa(/* @__PURE__ */ new Date())), f);\n  return {\n    groupedYears: C,\n    modelValue: a,\n    focusYear: v,\n    setHoverValue: (f) => {\n      n.value = st(lt(/* @__PURE__ */ new Date()), f);\n    },\n    selectYear: (f) => {\n      var B;\n      if (t(\"update-month-year\", { instance: 0, year: f }), d.value.enabled)\n        return a.value ? Array.isArray(a.value) && (((B = a.value) == null ? void 0 : B.map((Q) => pe(Q))).includes(f) ? a.value = a.value.filter((Q) => pe(Q) !== f) : a.value.push(st(Ge(G()), f))) : a.value = [st(Ge(oa(G())), f)], t(\"auto-apply\", !0);\n      c.value.enabled ? (a.value = Ja(a, H(f), t), xe().then(() => {\n        va(a.value, t, e.autoApply, e.modelAuto);\n      })) : (a.value = H(f), t(\"auto-apply\"));\n    }\n  };\n}, sr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"YearPicker\",\n  props: {\n    ...rt\n  },\n  emits: [\n    \"update:internal-model-value\",\n    \"reset-flow\",\n    \"range-start\",\n    \"range-end\",\n    \"auto-apply\",\n    \"update-month-year\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, { groupedYears: i, modelValue: d, focusYear: b, selectYear: c, setHoverValue: L } = or(n, a), { defaultedConfig: v } = Ce(n);\n    return t({ getSidebarProps: () => ({\n      modelValue: d,\n      selectYear: c\n    }) }), (h, C) => (T(), K(\"div\", null, [\n      h.$slots[\"top-extra\"] ? ie(h.$slots, \"top-extra\", {\n        key: 0,\n        value: h.internalModelValue\n      }) : Z(\"\", !0),\n      h.$slots[\"month-year\"] ? ie(h.$slots, \"month-year\", Ne(Ee({ key: 1 }, {\n        years: o(i),\n        selectYear: o(c)\n      }))) : (T(), $e(qt, {\n        key: 2,\n        items: o(i),\n        \"is-last\": h.autoApply && !o(v).keepActionRow,\n        height: o(v).modeHeight,\n        config: h.config,\n        \"no-overlay-focus\": !!(h.noOverlayFocus || h.textInput),\n        \"focus-value\": o(b),\n        type: \"year\",\n        \"use-relative\": \"\",\n        onSelected: o(c),\n        onHoverValue: o(L)\n      }, Ve({ _: 2 }, [\n        h.$slots[\"year-overlay-value\"] ? {\n          name: \"item\",\n          fn: ke(({ item: H }) => [\n            ie(h.$slots, \"year-overlay-value\", {\n              text: H.text,\n              value: H.value\n            })\n          ]),\n          key: \"0\"\n        } : void 0\n      ]), 1032, [\"items\", \"is-last\", \"height\", \"config\", \"no-overlay-focus\", \"focus-value\", \"onSelected\", \"onHoverValue\"]))\n    ]));\n  }\n}), ur = {\n  key: 0,\n  class: \"dp__time_input\"\n}, ir = [\"data-test\", \"aria-label\", \"onKeydown\", \"onClick\", \"onMousedown\"], dr = [\"aria-label\", \"disabled\", \"data-test\", \"onKeydown\", \"onClick\"], cr = [\"data-test\", \"aria-label\", \"onKeydown\", \"onClick\", \"onMousedown\"], fr = { key: 0 }, vr = [\"aria-label\"], mr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"TimeInput\",\n  props: {\n    hours: { type: Number, default: 0 },\n    minutes: { type: Number, default: 0 },\n    seconds: { type: Number, default: 0 },\n    closeTimePickerBtn: { type: Object, default: null },\n    order: { type: Number, default: 0 },\n    disabledTimesConfig: { type: Function, default: null },\n    validateTime: { type: Function, default: () => !1 },\n    ...rt\n  },\n  emits: [\n    \"set-hours\",\n    \"set-minutes\",\n    \"update:hours\",\n    \"update:minutes\",\n    \"update:seconds\",\n    \"reset-flow\",\n    \"mounted\",\n    \"overlay-closed\",\n    \"overlay-opened\",\n    \"am-pm-change\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, { setTimePickerElements: i, setTimePickerBackRef: d } = bt(), { defaultedAriaLabels: b, defaultedTransitions: c, defaultedFilters: L, defaultedConfig: v, defaultedRange: _ } = Ce(n), { transitionName: h, showTransition: C } = Xt(c), H = Qt({\n      hours: !1,\n      minutes: !1,\n      seconds: !1\n    }), E = ne(\"AM\"), U = ne(null), f = ne([]), B = ne(), P = ne(!1);\n    We(() => {\n      a(\"mounted\");\n    });\n    const Q = (r) => Te(/* @__PURE__ */ new Date(), {\n      hours: r.hours,\n      minutes: r.minutes,\n      seconds: n.enableSeconds ? r.seconds : 0,\n      milliseconds: 0\n    }), ae = J(\n      () => (r) => g(r, n[r]) || ee(r, n[r])\n    ), oe = J(() => ({ hours: n.hours, minutes: n.minutes, seconds: n.seconds })), ee = (r, R) => _.value.enabled && !_.value.disableTimeRangeValidation ? !n.validateTime(r, R) : !1, S = (r, R) => {\n      if (_.value.enabled && !_.value.disableTimeRangeValidation) {\n        const O = R ? +n[`${r}Increment`] : -+n[`${r}Increment`], W = n[r] + O;\n        return !n.validateTime(r, W);\n      }\n      return !1;\n    }, x = J(() => (r) => !I(+n[r] + +n[`${r}Increment`], r) || S(r, !0)), Y = J(() => (r) => !I(+n[r] - +n[`${r}Increment`], r) || S(r, !1)), q = (r, R) => Dn(Te(G(), r), R), de = (r, R) => rl(Te(G(), r), R), ve = J(\n      () => ({\n        dp__time_col: !0,\n        dp__time_col_block: !n.timePickerInline,\n        dp__time_col_reg_block: !n.enableSeconds && n.is24 && !n.timePickerInline,\n        dp__time_col_reg_inline: !n.enableSeconds && n.is24 && n.timePickerInline,\n        dp__time_col_reg_with_button: !n.enableSeconds && !n.is24,\n        dp__time_col_sec: n.enableSeconds && n.is24,\n        dp__time_col_sec_with_button: n.enableSeconds && !n.is24\n      })\n    ), y = J(() => {\n      const r = [{ type: \"hours\" }];\n      return n.enableMinutes && r.push({ type: \"\", separator: !0 }, {\n        type: \"minutes\"\n      }), n.enableSeconds && r.push({ type: \"\", separator: !0 }, {\n        type: \"seconds\"\n      }), r;\n    }), z = J(() => y.value.filter((r) => !r.separator)), te = J(() => (r) => {\n      if (r === \"hours\") {\n        const R = u(+n.hours);\n        return { text: R < 10 ? `0${R}` : `${R}`, value: R };\n      }\n      return { text: n[r] < 10 ? `0${n[r]}` : `${n[r]}`, value: n[r] };\n    }), g = (r, R) => {\n      var W;\n      if (!n.disabledTimesConfig) return !1;\n      const O = n.disabledTimesConfig(n.order, r === \"hours\" ? R : void 0);\n      return O[r] ? !!((W = O[r]) != null && W.includes(R)) : !0;\n    }, X = (r, R) => R !== \"hours\" || E.value === \"AM\" ? r : r + 12, A = (r) => {\n      const R = n.is24 ? 24 : 12, O = r === \"hours\" ? R : 60, W = +n[`${r}GridIncrement`], ue = r === \"hours\" && !n.is24 ? W : 0, w = [];\n      for (let N = ue; N < O; N += W)\n        w.push({ value: n.is24 ? N : X(N, r), text: N < 10 ? `0${N}` : `${N}` });\n      return r === \"hours\" && !n.is24 && w.unshift({ value: E.value === \"PM\" ? 12 : 0, text: \"12\" }), Yt(w, (N) => ({ active: !1, disabled: L.value.times[r].includes(N.value) || !I(N.value, r) || g(r, N.value) || ee(r, N.value) }));\n    }, p = (r) => r >= 0 ? r : 59, se = (r) => r >= 0 ? r : 23, I = (r, R) => {\n      const O = n.minTime ? Q(Aa(n.minTime)) : null, W = n.maxTime ? Q(Aa(n.maxTime)) : null, ue = Q(\n        Aa(\n          oe.value,\n          R,\n          R === \"minutes\" || R === \"seconds\" ? p(r) : se(r)\n        )\n      );\n      return O && W ? (Kt(ue, W) || Ot(ue, W)) && (_t(ue, O) || Ot(ue, O)) : O ? _t(ue, O) || Ot(ue, O) : W ? Kt(ue, W) || Ot(ue, W) : !0;\n    }, D = (r) => n[`no${r[0].toUpperCase() + r.slice(1)}Overlay`], V = (r) => {\n      D(r) || (H[r] = !H[r], H[r] ? (P.value = !0, a(\"overlay-opened\", r)) : (P.value = !1, a(\"overlay-closed\", r)));\n    }, s = (r) => r === \"hours\" ? ft : r === \"minutes\" ? ht : Bt, M = () => {\n      B.value && clearTimeout(B.value);\n    }, F = (r, R = !0, O) => {\n      const W = R ? q : de, ue = R ? +n[`${r}Increment`] : -+n[`${r}Increment`];\n      I(+n[r] + ue, r) && a(\n        `update:${r}`,\n        s(r)(W({ [r]: +n[r] }, { [r]: +n[`${r}Increment`] }))\n      ), !(O != null && O.keyboard) && v.value.timeArrowHoldThreshold && (B.value = setTimeout(() => {\n        F(r, R);\n      }, v.value.timeArrowHoldThreshold));\n    }, u = (r) => n.is24 ? r : (r >= 12 ? E.value = \"PM\" : E.value = \"AM\", gl(r)), le = () => {\n      E.value === \"PM\" ? (E.value = \"AM\", a(\"update:hours\", n.hours - 12)) : (E.value = \"PM\", a(\"update:hours\", n.hours + 12)), a(\"am-pm-change\", E.value);\n    }, me = (r) => {\n      H[r] = !0;\n    }, $ = (r, R, O) => {\n      if (r && n.arrowNavigation) {\n        Array.isArray(f.value[R]) ? f.value[R][O] = r : f.value[R] = [r];\n        const W = f.value.reduce(\n          (ue, w) => w.map((N, ce) => [...ue[ce] || [], w[ce]]),\n          []\n        );\n        d(n.closeTimePickerBtn), U.value && (W[1] = W[1].concat(U.value)), i(W, n.order);\n      }\n    }, ge = (r, R) => (V(r), a(`update:${r}`, R));\n    return t({ openChildCmp: me }), (r, R) => {\n      var O;\n      return r.disabled ? Z(\"\", !0) : (T(), K(\"div\", ur, [\n        (T(!0), K(be, null, Re(y.value, (W, ue) => {\n          var w, N, ce;\n          return T(), K(\"div\", {\n            key: ue,\n            class: we(ve.value)\n          }, [\n            W.separator ? (T(), K(be, { key: 0 }, [\n              P.value ? Z(\"\", !0) : (T(), K(be, { key: 0 }, [\n                ct(\":\")\n              ], 64))\n            ], 64)) : (T(), K(be, { key: 1 }, [\n              ye(\"button\", {\n                ref_for: !0,\n                ref: (he) => $(he, ue, 0),\n                type: \"button\",\n                class: we({\n                  dp__btn: !0,\n                  dp__inc_dec_button: !r.timePickerInline,\n                  dp__inc_dec_button_inline: r.timePickerInline,\n                  dp__tp_inline_btn_top: r.timePickerInline,\n                  dp__inc_dec_button_disabled: x.value(W.type),\n                  \"dp--hidden-el\": P.value\n                }),\n                \"data-test\": `${W.type}-time-inc-btn-${n.order}`,\n                \"aria-label\": (w = o(b)) == null ? void 0 : w.incrementValue(W.type),\n                tabindex: \"0\",\n                onKeydown: (he) => o(Ke)(he, () => F(W.type, !0, { keyboard: !0 }), !0),\n                onClick: (he) => o(v).timeArrowHoldThreshold ? void 0 : F(W.type, !0),\n                onMousedown: (he) => o(v).timeArrowHoldThreshold ? F(W.type, !0) : void 0,\n                onMouseup: M\n              }, [\n                n.timePickerInline ? (T(), K(be, { key: 1 }, [\n                  r.$slots[\"tp-inline-arrow-up\"] ? ie(r.$slots, \"tp-inline-arrow-up\", { key: 0 }) : (T(), K(be, { key: 1 }, [\n                    R[2] || (R[2] = ye(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_l\" }, null, -1)),\n                    R[3] || (R[3] = ye(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_r\" }, null, -1))\n                  ], 64))\n                ], 64)) : (T(), K(be, { key: 0 }, [\n                  r.$slots[\"arrow-up\"] ? ie(r.$slots, \"arrow-up\", { key: 0 }) : Z(\"\", !0),\n                  r.$slots[\"arrow-up\"] ? Z(\"\", !0) : (T(), $e(o(Va), { key: 1 }))\n                ], 64))\n              ], 42, ir),\n              ye(\"button\", {\n                ref_for: !0,\n                ref: (he) => $(he, ue, 1),\n                type: \"button\",\n                \"aria-label\": `${te.value(W.type).text}-${(N = o(b)) == null ? void 0 : N.openTpOverlay(W.type)}`,\n                class: we({\n                  dp__time_display: !0,\n                  dp__time_display_block: !r.timePickerInline,\n                  dp__time_display_inline: r.timePickerInline,\n                  \"dp--time-invalid\": ae.value(W.type),\n                  \"dp--time-overlay-btn\": !ae.value(W.type),\n                  \"dp--hidden-el\": P.value\n                }),\n                disabled: D(W.type),\n                tabindex: \"0\",\n                \"data-test\": `${W.type}-toggle-overlay-btn-${n.order}`,\n                onKeydown: (he) => o(Ke)(he, () => V(W.type), !0),\n                onClick: (he) => V(W.type)\n              }, [\n                r.$slots[W.type] ? ie(r.$slots, W.type, {\n                  key: 0,\n                  text: te.value(W.type).text,\n                  value: te.value(W.type).value\n                }) : Z(\"\", !0),\n                r.$slots[W.type] ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                  ct(Ue(te.value(W.type).text), 1)\n                ], 64))\n              ], 42, dr),\n              ye(\"button\", {\n                ref_for: !0,\n                ref: (he) => $(he, ue, 2),\n                type: \"button\",\n                class: we({\n                  dp__btn: !0,\n                  dp__inc_dec_button: !r.timePickerInline,\n                  dp__inc_dec_button_inline: r.timePickerInline,\n                  dp__tp_inline_btn_bottom: r.timePickerInline,\n                  dp__inc_dec_button_disabled: Y.value(W.type),\n                  \"dp--hidden-el\": P.value\n                }),\n                \"data-test\": `${W.type}-time-dec-btn-${n.order}`,\n                \"aria-label\": (ce = o(b)) == null ? void 0 : ce.decrementValue(W.type),\n                tabindex: \"0\",\n                onKeydown: (he) => o(Ke)(he, () => F(W.type, !1, { keyboard: !0 }), !0),\n                onClick: (he) => o(v).timeArrowHoldThreshold ? void 0 : F(W.type, !1),\n                onMousedown: (he) => o(v).timeArrowHoldThreshold ? F(W.type, !1) : void 0,\n                onMouseup: M\n              }, [\n                n.timePickerInline ? (T(), K(be, { key: 1 }, [\n                  r.$slots[\"tp-inline-arrow-down\"] ? ie(r.$slots, \"tp-inline-arrow-down\", { key: 0 }) : (T(), K(be, { key: 1 }, [\n                    R[4] || (R[4] = ye(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_l\" }, null, -1)),\n                    R[5] || (R[5] = ye(\"span\", { class: \"dp__tp_inline_btn_bar dp__tp_btn_in_r\" }, null, -1))\n                  ], 64))\n                ], 64)) : (T(), K(be, { key: 0 }, [\n                  r.$slots[\"arrow-down\"] ? ie(r.$slots, \"arrow-down\", { key: 0 }) : Z(\"\", !0),\n                  r.$slots[\"arrow-down\"] ? Z(\"\", !0) : (T(), $e(o(Wa), { key: 1 }))\n                ], 64))\n              ], 42, cr)\n            ], 64))\n          ], 2);\n        }), 128)),\n        r.is24 ? Z(\"\", !0) : (T(), K(\"div\", fr, [\n          r.$slots[\"am-pm-button\"] ? ie(r.$slots, \"am-pm-button\", {\n            key: 0,\n            toggle: le,\n            value: E.value\n          }) : Z(\"\", !0),\n          r.$slots[\"am-pm-button\"] ? Z(\"\", !0) : (T(), K(\"button\", {\n            key: 1,\n            ref_key: \"amPmButton\",\n            ref: U,\n            type: \"button\",\n            class: \"dp__pm_am_button\",\n            role: \"button\",\n            \"aria-label\": (O = o(b)) == null ? void 0 : O.amPmButton,\n            tabindex: \"0\",\n            onClick: le,\n            onKeydown: R[0] || (R[0] = (W) => o(Ke)(W, () => le(), !0))\n          }, Ue(E.value), 41, vr))\n        ])),\n        (T(!0), K(be, null, Re(z.value, (W, ue) => (T(), $e(Nt, {\n          key: ue,\n          name: o(h)(H[W.type]),\n          css: o(C)\n        }, {\n          default: ke(() => {\n            var w, N;\n            return [\n              H[W.type] ? (T(), $e(qt, {\n                key: 0,\n                items: A(W.type),\n                \"is-last\": r.autoApply && !o(v).keepActionRow,\n                \"esc-close\": r.escClose,\n                type: W.type,\n                \"text-input\": r.textInput,\n                config: r.config,\n                \"arrow-navigation\": r.arrowNavigation,\n                \"aria-labels\": r.ariaLabels,\n                \"overlay-label\": (N = (w = o(b)).timeOverlay) == null ? void 0 : N.call(w, W.type),\n                onSelected: (ce) => ge(W.type, ce),\n                onToggle: (ce) => V(W.type),\n                onResetFlow: R[1] || (R[1] = (ce) => r.$emit(\"reset-flow\"))\n              }, Ve({\n                \"button-icon\": ke(() => [\n                  r.$slots[\"clock-icon\"] ? ie(r.$slots, \"clock-icon\", { key: 0 }) : Z(\"\", !0),\n                  r.$slots[\"clock-icon\"] ? Z(\"\", !0) : (T(), $e(ia(r.timePickerInline ? o(Et) : o(Ua)), { key: 1 }))\n                ]),\n                _: 2\n              }, [\n                r.$slots[`${W.type}-overlay-value`] ? {\n                  name: \"item\",\n                  fn: ke(({ item: ce }) => [\n                    ie(r.$slots, `${W.type}-overlay-value`, {\n                      text: ce.text,\n                      value: ce.value\n                    })\n                  ]),\n                  key: \"0\"\n                } : void 0,\n                r.$slots[`${W.type}-overlay-header`] ? {\n                  name: \"header\",\n                  fn: ke(() => [\n                    ie(r.$slots, `${W.type}-overlay-header`, {\n                      toggle: () => V(W.type)\n                    })\n                  ]),\n                  key: \"1\"\n                } : void 0\n              ]), 1032, [\"items\", \"is-last\", \"esc-close\", \"type\", \"text-input\", \"config\", \"arrow-navigation\", \"aria-labels\", \"overlay-label\", \"onSelected\", \"onToggle\"])) : Z(\"\", !0)\n            ];\n          }),\n          _: 2\n        }, 1032, [\"name\", \"css\"]))), 128))\n      ]));\n    };\n  }\n}), pr = { class: \"dp--tp-wrap\" }, yr = [\"aria-label\", \"tabindex\"], gr = [\"role\", \"aria-label\", \"tabindex\"], hr = [\"aria-label\"], Hn = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"TimePicker\",\n  props: {\n    hours: { type: [Number, Array], default: 0 },\n    minutes: { type: [Number, Array], default: 0 },\n    seconds: { type: [Number, Array], default: 0 },\n    disabledTimesConfig: { type: Function, default: null },\n    validateTime: {\n      type: Function,\n      default: () => !1\n    },\n    ...rt\n  },\n  emits: [\n    \"update:hours\",\n    \"update:minutes\",\n    \"update:seconds\",\n    \"mount\",\n    \"reset-flow\",\n    \"overlay-opened\",\n    \"overlay-closed\",\n    \"am-pm-change\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, { buildMatrix: i, setTimePicker: d } = bt(), b = Pt(), { defaultedTransitions: c, defaultedAriaLabels: L, defaultedTextInput: v, defaultedConfig: _, defaultedRange: h } = Ce(n), { transitionName: C, showTransition: H } = Xt(c), { hideNavigationButtons: E } = ma(), U = ne(null), f = ne(null), B = ne([]), P = ne(null), Q = ne(!1);\n    We(() => {\n      a(\"mount\"), !n.timePicker && n.arrowNavigation ? i([Ie(U.value)], \"time\") : d(!0, n.timePicker);\n    });\n    const ae = J(() => h.value.enabled && n.modelAuto ? An(n.internalModelValue) : !0), oe = ne(!1), ee = (A) => ({\n      hours: Array.isArray(n.hours) ? n.hours[A] : n.hours,\n      minutes: Array.isArray(n.minutes) ? n.minutes[A] : n.minutes,\n      seconds: Array.isArray(n.seconds) ? n.seconds[A] : n.seconds\n    }), S = J(() => {\n      const A = [];\n      if (h.value.enabled)\n        for (let p = 0; p < 2; p++)\n          A.push(ee(p));\n      else\n        A.push(ee(0));\n      return A;\n    }), x = (A, p = !1, se = \"\") => {\n      p || a(\"reset-flow\"), oe.value = A, a(A ? \"overlay-opened\" : \"overlay-closed\", He.time), n.arrowNavigation && d(A), xe(() => {\n        se !== \"\" && B.value[0] && B.value[0].openChildCmp(se);\n      });\n    }, Y = J(() => ({\n      dp__btn: !0,\n      dp__button: !0,\n      dp__button_bottom: n.autoApply && !_.value.keepActionRow\n    })), q = Je(b, \"timePicker\"), de = (A, p, se) => h.value.enabled ? p === 0 ? [A, S.value[1][se]] : [S.value[0][se], A] : A, ve = (A) => {\n      a(\"update:hours\", A);\n    }, y = (A) => {\n      a(\"update:minutes\", A);\n    }, z = (A) => {\n      a(\"update:seconds\", A);\n    }, te = () => {\n      if (P.value && !v.value.enabled && !n.noOverlayFocus) {\n        const A = Tn(P.value);\n        A && A.focus({ preventScroll: !0 });\n      }\n    }, g = (A) => {\n      Q.value = !1, a(\"overlay-closed\", A);\n    }, X = (A) => {\n      Q.value = !0, a(\"overlay-opened\", A);\n    };\n    return t({ toggleTimePicker: x }), (A, p) => {\n      var se;\n      return T(), K(\"div\", pr, [\n        !A.timePicker && !A.timePickerInline ? na((T(), K(\"button\", {\n          key: 0,\n          ref_key: \"openTimePickerBtn\",\n          ref: U,\n          type: \"button\",\n          class: we({ ...Y.value, \"dp--hidden-el\": oe.value }),\n          \"aria-label\": (se = o(L)) == null ? void 0 : se.openTimePicker,\n          tabindex: A.noOverlayFocus ? void 0 : 0,\n          \"data-test\": \"open-time-picker-btn\",\n          onKeydown: p[0] || (p[0] = (I) => o(Ke)(I, () => x(!0))),\n          onClick: p[1] || (p[1] = (I) => x(!0))\n        }, [\n          A.$slots[\"clock-icon\"] ? ie(A.$slots, \"clock-icon\", { key: 0 }) : Z(\"\", !0),\n          A.$slots[\"clock-icon\"] ? Z(\"\", !0) : (T(), $e(o(Ua), { key: 1 }))\n        ], 42, yr)), [\n          [la, !o(E)(A.hideNavigation, \"time\")]\n        ]) : Z(\"\", !0),\n        Ze(Nt, {\n          name: o(C)(oe.value),\n          css: o(H) && !A.timePickerInline\n        }, {\n          default: ke(() => {\n            var I, D;\n            return [\n              oe.value || A.timePicker || A.timePickerInline ? (T(), K(\"div\", {\n                key: 0,\n                ref_key: \"overlayRef\",\n                ref: P,\n                role: A.timePickerInline ? void 0 : \"dialog\",\n                class: we({\n                  dp__overlay: !A.timePickerInline,\n                  \"dp--overlay-absolute\": !n.timePicker && !A.timePickerInline,\n                  \"dp--overlay-relative\": n.timePicker\n                }),\n                style: tt(A.timePicker ? { height: `${o(_).modeHeight}px` } : void 0),\n                \"aria-label\": (I = o(L)) == null ? void 0 : I.timePicker,\n                tabindex: A.timePickerInline ? void 0 : 0\n              }, [\n                ye(\"div\", {\n                  class: we(\n                    A.timePickerInline ? \"dp__time_picker_inline_container\" : \"dp__overlay_container dp__container_flex dp__time_picker_overlay_container\"\n                  ),\n                  style: { display: \"flex\" }\n                }, [\n                  A.$slots[\"time-picker-overlay\"] ? ie(A.$slots, \"time-picker-overlay\", {\n                    key: 0,\n                    hours: e.hours,\n                    minutes: e.minutes,\n                    seconds: e.seconds,\n                    setHours: ve,\n                    setMinutes: y,\n                    setSeconds: z\n                  }) : Z(\"\", !0),\n                  A.$slots[\"time-picker-overlay\"] ? Z(\"\", !0) : (T(), K(\"div\", {\n                    key: 1,\n                    class: we(A.timePickerInline ? \"dp__flex\" : \"dp__overlay_row dp__flex_row\")\n                  }, [\n                    (T(!0), K(be, null, Re(S.value, (V, s) => na((T(), $e(mr, Ee({\n                      key: s,\n                      ref_for: !0\n                    }, {\n                      ...A.$props,\n                      order: s,\n                      hours: V.hours,\n                      minutes: V.minutes,\n                      seconds: V.seconds,\n                      closeTimePickerBtn: f.value,\n                      disabledTimesConfig: e.disabledTimesConfig,\n                      disabled: s === 0 ? o(h).fixedStart : o(h).fixedEnd\n                    }, {\n                      ref_for: !0,\n                      ref_key: \"timeInputRefs\",\n                      ref: B,\n                      \"validate-time\": (M, F) => e.validateTime(M, de(F, s, M)),\n                      \"onUpdate:hours\": (M) => ve(de(M, s, \"hours\")),\n                      \"onUpdate:minutes\": (M) => y(de(M, s, \"minutes\")),\n                      \"onUpdate:seconds\": (M) => z(de(M, s, \"seconds\")),\n                      onMounted: te,\n                      onOverlayClosed: g,\n                      onOverlayOpened: X,\n                      onAmPmChange: p[2] || (p[2] = (M) => A.$emit(\"am-pm-change\", M))\n                    }), Ve({ _: 2 }, [\n                      Re(o(q), (M, F) => ({\n                        name: M,\n                        fn: ke((u) => [\n                          ie(A.$slots, M, Ee({ ref_for: !0 }, u))\n                        ])\n                      }))\n                    ]), 1040, [\"validate-time\", \"onUpdate:hours\", \"onUpdate:minutes\", \"onUpdate:seconds\"])), [\n                      [la, s === 0 ? !0 : ae.value]\n                    ])), 128))\n                  ], 2)),\n                  !A.timePicker && !A.timePickerInline ? na((T(), K(\"button\", {\n                    key: 2,\n                    ref_key: \"closeTimePickerBtn\",\n                    ref: f,\n                    type: \"button\",\n                    class: we({ ...Y.value, \"dp--hidden-el\": Q.value }),\n                    \"aria-label\": (D = o(L)) == null ? void 0 : D.closeTimePicker,\n                    tabindex: \"0\",\n                    onKeydown: p[3] || (p[3] = (V) => o(Ke)(V, () => x(!1))),\n                    onClick: p[4] || (p[4] = (V) => x(!1))\n                  }, [\n                    A.$slots[\"calendar-icon\"] ? ie(A.$slots, \"calendar-icon\", { key: 0 }) : Z(\"\", !0),\n                    A.$slots[\"calendar-icon\"] ? Z(\"\", !0) : (T(), $e(o(Et), { key: 1 }))\n                  ], 42, hr)), [\n                    [la, !o(E)(A.hideNavigation, \"time\")]\n                  ]) : Z(\"\", !0)\n                ], 2)\n              ], 14, gr)) : Z(\"\", !0)\n            ];\n          }),\n          _: 3\n        }, 8, [\"name\", \"css\"])\n      ]);\n    };\n  }\n}), Un = (e, t, l, a) => {\n  const { defaultedRange: n } = Ce(e), i = (P, Q) => Array.isArray(t[P]) ? t[P][Q] : t[P], d = (P) => e.enableSeconds ? Array.isArray(t.seconds) ? t.seconds[P] : t.seconds : 0, b = (P, Q) => P ? Q !== void 0 ? gt(P, i(\"hours\", Q), i(\"minutes\", Q), d(Q)) : gt(P, t.hours, t.minutes, d()) : yn(G(), d(Q)), c = (P, Q) => {\n    t[P] = Q;\n  }, L = J(() => e.modelAuto && n.value.enabled ? Array.isArray(l.value) ? l.value.length > 1 : !1 : n.value.enabled), v = (P, Q) => {\n    const ae = Object.fromEntries(\n      Object.keys(t).map((oe) => oe === P ? [oe, Q] : [oe, t[oe]].slice())\n    );\n    if (L.value && !n.value.disableTimeRangeValidation) {\n      const oe = (S) => l.value ? gt(\n        l.value[S],\n        ae.hours[S],\n        ae.minutes[S],\n        ae.seconds[S]\n      ) : null, ee = (S) => gn(l.value[S], 0);\n      return !(Me(oe(0), oe(1)) && (_t(oe(0), ee(1)) || Kt(oe(1), ee(0))));\n    }\n    return !0;\n  }, _ = (P, Q) => {\n    v(P, Q) && (c(P, Q), a && a());\n  }, h = (P) => {\n    _(\"hours\", P);\n  }, C = (P) => {\n    _(\"minutes\", P);\n  }, H = (P) => {\n    _(\"seconds\", P);\n  }, E = (P, Q, ae, oe) => {\n    Q && h(P), !Q && !ae && C(P), ae && H(P), l.value && oe(l.value);\n  }, U = (P) => {\n    if (P) {\n      const Q = Array.isArray(P), ae = Q ? [+P[0].hours, +P[1].hours] : +P.hours, oe = Q ? [+P[0].minutes, +P[1].minutes] : +P.minutes, ee = Q ? [+P[0].seconds, +P[1].seconds] : +P.seconds;\n      c(\"hours\", ae), c(\"minutes\", oe), e.enableSeconds && c(\"seconds\", ee);\n    }\n  }, f = (P, Q) => {\n    const ae = {\n      hours: Array.isArray(t.hours) ? t.hours[P] : t.hours,\n      disabledArr: []\n    };\n    return (Q || Q === 0) && (ae.hours = Q), Array.isArray(e.disabledTimes) && (ae.disabledArr = n.value.enabled && Array.isArray(e.disabledTimes[P]) ? e.disabledTimes[P] : e.disabledTimes), ae;\n  }, B = J(() => (P, Q) => {\n    var ae;\n    if (Array.isArray(e.disabledTimes)) {\n      const { disabledArr: oe, hours: ee } = f(P, Q), S = oe.filter((x) => +x.hours === ee);\n      return ((ae = S[0]) == null ? void 0 : ae.minutes) === \"*\" ? { hours: [ee], minutes: void 0, seconds: void 0 } : {\n        hours: [],\n        minutes: (S == null ? void 0 : S.map((x) => +x.minutes)) ?? [],\n        seconds: (S == null ? void 0 : S.map((x) => x.seconds ? +x.seconds : void 0)) ?? []\n      };\n    }\n    return { hours: [], minutes: [], seconds: [] };\n  });\n  return {\n    setTime: c,\n    updateHours: h,\n    updateMinutes: C,\n    updateSeconds: H,\n    getSetDateTime: b,\n    updateTimeValues: E,\n    getSecondsValue: d,\n    assignStartTime: U,\n    validateTime: v,\n    disabledTimesConfig: B\n  };\n}, br = (e, t) => {\n  const l = () => {\n    e.isTextInputDate && Q();\n  }, { modelValue: a, time: n } = Jt(e, t, l), { defaultedStartTime: i, defaultedRange: d, defaultedTz: b } = Ce(e), { updateTimeValues: c, getSetDateTime: L, setTime: v, assignStartTime: _, disabledTimesConfig: h, validateTime: C } = Un(e, n, a, H);\n  function H() {\n    t(\"update-flow-step\");\n  }\n  const E = (ee) => {\n    const { hours: S, minutes: x, seconds: Y } = ee;\n    return { hours: +S, minutes: +x, seconds: Y ? +Y : 0 };\n  }, U = () => {\n    if (e.startTime) {\n      if (Array.isArray(e.startTime)) {\n        const S = E(e.startTime[0]), x = E(e.startTime[1]);\n        return [Te(G(), S), Te(G(), x)];\n      }\n      const ee = E(e.startTime);\n      return Te(G(), ee);\n    }\n    return d.value.enabled ? [null, null] : null;\n  }, f = () => {\n    if (d.value.enabled) {\n      const [ee, S] = U();\n      a.value = [\n        qe(L(ee, 0), b.value.timezone),\n        qe(L(S, 1), b.value.timezone)\n      ];\n    } else\n      a.value = qe(L(U()), b.value.timezone);\n  }, B = (ee) => Array.isArray(ee) ? [St(G(ee[0])), St(G(ee[1]))] : [St(ee ?? G())], P = (ee, S, x) => {\n    v(\"hours\", ee), v(\"minutes\", S), v(\"seconds\", e.enableSeconds ? x : 0);\n  }, Q = () => {\n    const [ee, S] = B(a.value);\n    return d.value.enabled ? P(\n      [ee.hours, S.hours],\n      [ee.minutes, S.minutes],\n      [ee.seconds, S.seconds]\n    ) : P(ee.hours, ee.minutes, ee.seconds);\n  };\n  We(() => {\n    if (!e.shadow)\n      return _(i.value), a.value ? Q() : f();\n  });\n  const ae = () => {\n    Array.isArray(a.value) ? a.value = a.value.map((ee, S) => ee && L(ee, S)) : a.value = L(a.value), t(\"time-update\");\n  };\n  return {\n    modelValue: a,\n    time: n,\n    disabledTimesConfig: h,\n    updateTime: (ee, S = !0, x = !1) => {\n      c(ee, S, x, ae);\n    },\n    validateTime: C\n  };\n}, kr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"TimePickerSolo\",\n  props: {\n    ...rt\n  },\n  emits: [\n    \"update:internal-model-value\",\n    \"time-update\",\n    \"am-pm-change\",\n    \"mount\",\n    \"reset-flow\",\n    \"update-flow-step\",\n    \"overlay-toggle\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, i = Pt(), d = Je(i, \"timePicker\"), b = ne(null), { time: c, modelValue: L, disabledTimesConfig: v, updateTime: _, validateTime: h } = br(n, a);\n    return We(() => {\n      n.shadow || a(\"mount\", null);\n    }), t({ getSidebarProps: () => ({\n      modelValue: L,\n      time: c,\n      updateTime: _\n    }), toggleTimePicker: (E, U = !1, f = \"\") => {\n      var B;\n      (B = b.value) == null || B.toggleTimePicker(E, U, f);\n    } }), (E, U) => (T(), $e(fa, {\n      \"multi-calendars\": 0,\n      stretch: \"\"\n    }, {\n      default: ke(() => [\n        Ze(Hn, Ee({\n          ref_key: \"tpRef\",\n          ref: b\n        }, E.$props, {\n          hours: o(c).hours,\n          minutes: o(c).minutes,\n          seconds: o(c).seconds,\n          \"internal-model-value\": E.internalModelValue,\n          \"disabled-times-config\": o(v),\n          \"validate-time\": o(h),\n          \"onUpdate:hours\": U[0] || (U[0] = (f) => o(_)(f)),\n          \"onUpdate:minutes\": U[1] || (U[1] = (f) => o(_)(f, !1)),\n          \"onUpdate:seconds\": U[2] || (U[2] = (f) => o(_)(f, !1, !0)),\n          onAmPmChange: U[3] || (U[3] = (f) => E.$emit(\"am-pm-change\", f)),\n          onResetFlow: U[4] || (U[4] = (f) => E.$emit(\"reset-flow\")),\n          onOverlayClosed: U[5] || (U[5] = (f) => E.$emit(\"overlay-toggle\", { open: !1, overlay: f })),\n          onOverlayOpened: U[6] || (U[6] = (f) => E.$emit(\"overlay-toggle\", { open: !0, overlay: f }))\n        }), Ve({ _: 2 }, [\n          Re(o(d), (f, B) => ({\n            name: f,\n            fn: ke((P) => [\n              ie(E.$slots, f, Ne(Qe(P)))\n            ])\n          }))\n        ]), 1040, [\"hours\", \"minutes\", \"seconds\", \"internal-model-value\", \"disabled-times-config\", \"validate-time\"])\n      ]),\n      _: 3\n    }));\n  }\n}), wr = { class: \"dp--header-wrap\" }, Dr = {\n  key: 0,\n  class: \"dp__month_year_wrap\"\n}, Mr = { key: 0 }, $r = { class: \"dp__month_year_wrap\" }, Ar = [\"data-dp-element\", \"aria-label\", \"data-test\", \"onClick\", \"onKeydown\"], Tr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"DpHeader\",\n  props: {\n    month: { type: Number, default: 0 },\n    year: { type: Number, default: 0 },\n    instance: { type: Number, default: 0 },\n    years: { type: Array, default: () => [] },\n    months: { type: Array, default: () => [] },\n    ...rt\n  },\n  emits: [\"update-month-year\", \"mount\", \"reset-flow\", \"overlay-closed\", \"overlay-opened\"],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, {\n      defaultedTransitions: i,\n      defaultedAriaLabels: d,\n      defaultedMultiCalendars: b,\n      defaultedFilters: c,\n      defaultedConfig: L,\n      defaultedHighlight: v,\n      propDates: _,\n      defaultedUI: h\n    } = Ce(n), { transitionName: C, showTransition: H } = Xt(i), { buildMatrix: E } = bt(), { handleMonthYearChange: U, isDisabled: f, updateMonthYear: B } = Ql(n, a), { showLeftIcon: P, showRightIcon: Q } = ma(), ae = ne(!1), oe = ne(!1), ee = ne(!1), S = ne([null, null, null, null]);\n    We(() => {\n      a(\"mount\");\n    });\n    const x = (D) => ({\n      get: () => n[D],\n      set: (V) => {\n        const s = D === nt.month ? nt.year : nt.month;\n        a(\"update-month-year\", { [D]: V, [s]: n[s] }), D === nt.month ? g(!0) : X(!0);\n      }\n    }), Y = J(x(nt.month)), q = J(x(nt.year)), de = J(() => (D) => ({\n      month: n.month,\n      year: n.year,\n      items: D === nt.month ? n.months : n.years,\n      instance: n.instance,\n      updateMonthYear: B,\n      toggle: D === nt.month ? g : X\n    })), ve = J(() => {\n      const D = n.months.find((V) => V.value === n.month);\n      return D || { text: \"\", value: 0 };\n    }), y = J(() => Yt(n.months, (D) => {\n      const V = n.month === D.value, s = Gt(\n        D.value,\n        Pn(n.year, _.value.minDate),\n        Rn(n.year, _.value.maxDate)\n      ) || c.value.months.includes(D.value), M = Yn(v.value, D.value, n.year);\n      return { active: V, disabled: s, highlighted: M };\n    })), z = J(() => Yt(n.years, (D) => {\n      const V = n.year === D.value, s = Gt(\n        D.value,\n        It(_.value.minDate),\n        It(_.value.maxDate)\n      ) || c.value.years.includes(D.value), M = qa(v.value, D.value);\n      return { active: V, disabled: s, highlighted: M };\n    })), te = (D, V, s) => {\n      s !== void 0 ? D.value = s : D.value = !D.value, D.value ? (ee.value = !0, a(\"overlay-opened\", V)) : (ee.value = !1, a(\"overlay-closed\", V));\n    }, g = (D = !1, V) => {\n      A(D), te(ae, He.month, V);\n    }, X = (D = !1, V) => {\n      A(D), te(oe, He.year, V);\n    }, A = (D) => {\n      D || a(\"reset-flow\");\n    }, p = (D, V) => {\n      n.arrowNavigation && (S.value[V] = Ie(D), E(S.value, \"monthYear\"));\n    }, se = J(() => {\n      var D, V, s, M, F, u;\n      return [\n        {\n          type: nt.month,\n          index: 1,\n          toggle: g,\n          modelValue: Y.value,\n          updateModelValue: (le) => Y.value = le,\n          text: ve.value.text,\n          showSelectionGrid: ae.value,\n          items: y.value,\n          ariaLabel: (D = d.value) == null ? void 0 : D.openMonthsOverlay,\n          overlayLabel: ((s = (V = d.value).monthPicker) == null ? void 0 : s.call(V, !0)) ?? void 0\n        },\n        {\n          type: nt.year,\n          index: 2,\n          toggle: X,\n          modelValue: q.value,\n          updateModelValue: (le) => q.value = le,\n          text: Sn(n.year, n.locale),\n          showSelectionGrid: oe.value,\n          items: z.value,\n          ariaLabel: (M = d.value) == null ? void 0 : M.openYearsOverlay,\n          overlayLabel: ((u = (F = d.value).yearPicker) == null ? void 0 : u.call(F, !0)) ?? void 0\n        }\n      ];\n    }), I = J(() => n.disableYearSelect ? [se.value[0]] : n.yearFirst ? [...se.value].reverse() : se.value);\n    return t({\n      toggleMonthPicker: g,\n      toggleYearPicker: X,\n      handleMonthYearChange: U\n    }), (D, V) => {\n      var s, M, F, u, le, me;\n      return T(), K(\"div\", wr, [\n        D.$slots[\"month-year\"] ? (T(), K(\"div\", Dr, [\n          ie(D.$slots, \"month-year\", Ne(Qe({ month: e.month, year: e.year, months: e.months, years: e.years, updateMonthYear: o(B), handleMonthYearChange: o(U), instance: e.instance })))\n        ])) : (T(), K(be, { key: 1 }, [\n          D.$slots[\"top-extra\"] ? (T(), K(\"div\", Mr, [\n            ie(D.$slots, \"top-extra\", { value: D.internalModelValue })\n          ])) : Z(\"\", !0),\n          ye(\"div\", $r, [\n            o(P)(o(b), e.instance) && !D.vertical ? (T(), $e(Ut, {\n              key: 0,\n              \"aria-label\": (s = o(d)) == null ? void 0 : s.prevMonth,\n              disabled: o(f)(!1),\n              class: we((M = o(h)) == null ? void 0 : M.navBtnPrev),\n              \"el-name\": \"action-prev\",\n              onActivate: V[0] || (V[0] = ($) => o(U)(!1, !0)),\n              onSetRef: V[1] || (V[1] = ($) => p($, 0))\n            }, {\n              default: ke(() => [\n                D.$slots[\"arrow-left\"] ? ie(D.$slots, \"arrow-left\", { key: 0 }) : Z(\"\", !0),\n                D.$slots[\"arrow-left\"] ? Z(\"\", !0) : (T(), $e(o(za), { key: 1 }))\n              ]),\n              _: 3\n            }, 8, [\"aria-label\", \"disabled\", \"class\"])) : Z(\"\", !0),\n            ye(\"div\", {\n              class: we([\"dp__month_year_wrap\", {\n                dp__year_disable_select: D.disableYearSelect\n              }])\n            }, [\n              (T(!0), K(be, null, Re(I.value, ($, ge) => (T(), K(be, {\n                key: $.type\n              }, [\n                ye(\"button\", {\n                  ref_for: !0,\n                  ref: (r) => p(r, ge + 1),\n                  type: \"button\",\n                  \"data-dp-element\": `overlay-${$.type}`,\n                  class: we([\"dp__btn dp__month_year_select\", { \"dp--hidden-el\": ee.value }]),\n                  \"aria-label\": `${$.text}-${$.ariaLabel}`,\n                  \"data-test\": `${$.type}-toggle-overlay-${e.instance}`,\n                  onClick: $.toggle,\n                  onKeydown: (r) => o(Ke)(r, () => $.toggle(), !0)\n                }, [\n                  D.$slots[$.type] ? ie(D.$slots, $.type, {\n                    key: 0,\n                    text: $.text,\n                    value: n[$.type]\n                  }) : Z(\"\", !0),\n                  D.$slots[$.type] ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                    ct(Ue($.text), 1)\n                  ], 64))\n                ], 42, Ar),\n                Ze(Nt, {\n                  name: o(C)($.showSelectionGrid),\n                  css: o(H)\n                }, {\n                  default: ke(() => [\n                    $.showSelectionGrid ? (T(), $e(qt, {\n                      key: 0,\n                      items: $.items,\n                      \"arrow-navigation\": D.arrowNavigation,\n                      \"hide-navigation\": D.hideNavigation,\n                      \"is-last\": D.autoApply && !o(L).keepActionRow,\n                      \"skip-button-ref\": !1,\n                      config: D.config,\n                      type: $.type,\n                      \"header-refs\": [],\n                      \"esc-close\": D.escClose,\n                      \"menu-wrap-ref\": D.menuWrapRef,\n                      \"text-input\": D.textInput,\n                      \"aria-labels\": D.ariaLabels,\n                      \"overlay-label\": $.overlayLabel,\n                      onSelected: $.updateModelValue,\n                      onToggle: $.toggle\n                    }, Ve({\n                      \"button-icon\": ke(() => [\n                        D.$slots[\"calendar-icon\"] ? ie(D.$slots, \"calendar-icon\", { key: 0 }) : Z(\"\", !0),\n                        D.$slots[\"calendar-icon\"] ? Z(\"\", !0) : (T(), $e(o(Et), { key: 1 }))\n                      ]),\n                      _: 2\n                    }, [\n                      D.$slots[`${$.type}-overlay-value`] ? {\n                        name: \"item\",\n                        fn: ke(({ item: r }) => [\n                          ie(D.$slots, `${$.type}-overlay-value`, {\n                            text: r.text,\n                            value: r.value\n                          })\n                        ]),\n                        key: \"0\"\n                      } : void 0,\n                      D.$slots[`${$.type}-overlay`] ? {\n                        name: \"overlay\",\n                        fn: ke(() => [\n                          ie(D.$slots, `${$.type}-overlay`, Ee({ ref_for: !0 }, de.value($.type)))\n                        ]),\n                        key: \"1\"\n                      } : void 0,\n                      D.$slots[`${$.type}-overlay-header`] ? {\n                        name: \"header\",\n                        fn: ke(() => [\n                          ie(D.$slots, `${$.type}-overlay-header`, {\n                            toggle: $.toggle\n                          })\n                        ]),\n                        key: \"2\"\n                      } : void 0\n                    ]), 1032, [\"items\", \"arrow-navigation\", \"hide-navigation\", \"is-last\", \"config\", \"type\", \"esc-close\", \"menu-wrap-ref\", \"text-input\", \"aria-labels\", \"overlay-label\", \"onSelected\", \"onToggle\"])) : Z(\"\", !0)\n                  ]),\n                  _: 2\n                }, 1032, [\"name\", \"css\"])\n              ], 64))), 128))\n            ], 2),\n            o(P)(o(b), e.instance) && D.vertical ? (T(), $e(Ut, {\n              key: 1,\n              \"aria-label\": (F = o(d)) == null ? void 0 : F.prevMonth,\n              \"el-name\": \"action-prev\",\n              disabled: o(f)(!1),\n              class: we((u = o(h)) == null ? void 0 : u.navBtnPrev),\n              onActivate: V[2] || (V[2] = ($) => o(U)(!1, !0))\n            }, {\n              default: ke(() => [\n                D.$slots[\"arrow-up\"] ? ie(D.$slots, \"arrow-up\", { key: 0 }) : Z(\"\", !0),\n                D.$slots[\"arrow-up\"] ? Z(\"\", !0) : (T(), $e(o(Va), { key: 1 }))\n              ]),\n              _: 3\n            }, 8, [\"aria-label\", \"disabled\", \"class\"])) : Z(\"\", !0),\n            o(Q)(o(b), e.instance) ? (T(), $e(Ut, {\n              key: 2,\n              ref: \"rightIcon\",\n              \"el-name\": \"action-next\",\n              disabled: o(f)(!0),\n              \"aria-label\": (le = o(d)) == null ? void 0 : le.nextMonth,\n              class: we((me = o(h)) == null ? void 0 : me.navBtnNext),\n              onActivate: V[3] || (V[3] = ($) => o(U)(!0, !0)),\n              onSetRef: V[4] || (V[4] = ($) => p($, D.disableYearSelect ? 2 : 3))\n            }, {\n              default: ke(() => [\n                D.$slots[D.vertical ? \"arrow-down\" : \"arrow-right\"] ? ie(D.$slots, D.vertical ? \"arrow-down\" : \"arrow-right\", { key: 0 }) : Z(\"\", !0),\n                D.$slots[D.vertical ? \"arrow-down\" : \"arrow-right\"] ? Z(\"\", !0) : (T(), $e(ia(D.vertical ? o(Wa) : o(Ha)), { key: 1 }))\n              ]),\n              _: 3\n            }, 8, [\"disabled\", \"aria-label\", \"class\"])) : Z(\"\", !0)\n          ])\n        ], 64))\n      ]);\n    };\n  }\n}), Sr = {\n  class: \"dp__calendar_header\",\n  role: \"row\"\n}, Pr = {\n  key: 0,\n  class: \"dp__calendar_header_item\",\n  role: \"gridcell\"\n}, Rr = [\"aria-label\"], Cr = {\n  key: 0,\n  class: \"dp__calendar_item dp__week_num\",\n  role: \"gridcell\"\n}, Or = { class: \"dp__cell_inner\" }, _r = [\"id\", \"aria-pressed\", \"aria-disabled\", \"aria-label\", \"tabindex\", \"data-test\", \"onClick\", \"onTouchend\", \"onKeydown\", \"onMouseenter\", \"onMouseleave\", \"onMousedown\"], Br = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"DpCalendar\",\n  props: {\n    mappedDates: { type: Array, default: () => [] },\n    instance: { type: Number, default: 0 },\n    month: { type: Number, default: 0 },\n    year: { type: Number, default: 0 },\n    ...rt\n  },\n  emits: [\n    \"select-date\",\n    \"set-hover-date\",\n    \"handle-scroll\",\n    \"mount\",\n    \"handle-swipe\",\n    \"handle-space\",\n    \"tooltip-open\",\n    \"tooltip-close\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, { buildMultiLevelMatrix: i } = bt(), {\n      defaultedTransitions: d,\n      defaultedConfig: b,\n      defaultedAriaLabels: c,\n      defaultedMultiCalendars: L,\n      defaultedWeekNumbers: v,\n      defaultedMultiDates: _,\n      defaultedUI: h\n    } = Ce(n), C = ne(null), H = ne({\n      bottom: \"\",\n      left: \"\",\n      transform: \"\"\n    }), E = ne([]), U = ne(null), f = ne(!0), B = ne(\"\"), P = ne({ startX: 0, endX: 0, startY: 0, endY: 0 }), Q = ne([]), ae = ne({ left: \"50%\" }), oe = ne(!1), ee = J(() => n.calendar ? n.calendar(n.mappedDates) : n.mappedDates), S = J(() => n.dayNames ? Array.isArray(n.dayNames) ? n.dayNames : n.dayNames(n.locale, +n.weekStart) : yl(n.formatLocale, n.locale, +n.weekStart));\n    We(() => {\n      a(\"mount\", { cmp: \"calendar\", refs: E }), b.value.noSwipe || U.value && (U.value.addEventListener(\"touchstart\", p, { passive: !1 }), U.value.addEventListener(\"touchend\", se, { passive: !1 }), U.value.addEventListener(\"touchmove\", I, { passive: !1 })), n.monthChangeOnScroll && U.value && U.value.addEventListener(\"wheel\", s, { passive: !1 });\n    });\n    const x = ($) => $ ? n.vertical ? \"vNext\" : \"next\" : n.vertical ? \"vPrevious\" : \"previous\", Y = ($, ge) => {\n      if (n.transitions) {\n        const r = Ge(dt(G(), n.month, n.year));\n        B.value = Be(Ge(dt(G(), $, ge)), r) ? d.value[x(!0)] : d.value[x(!1)], f.value = !1, xe(() => {\n          f.value = !0;\n        });\n      }\n    }, q = J(\n      () => ({\n        ...h.value.calendar ?? {}\n      })\n    ), de = J(() => ($) => {\n      const ge = hl($);\n      return {\n        dp__marker_dot: ge.type === \"dot\",\n        dp__marker_line: ge.type === \"line\"\n      };\n    }), ve = J(() => ($) => Me($, C.value)), y = J(() => ({\n      dp__calendar: !0,\n      dp__calendar_next: L.value.count > 0 && n.instance !== 0\n    })), z = J(() => ($) => n.hideOffsetDates ? $.current : !0), te = async ($, ge) => {\n      const { width: r, height: R } = $.getBoundingClientRect();\n      C.value = ge.value;\n      let O = { left: `${r / 2}px` }, W = -50;\n      if (await xe(), Q.value[0]) {\n        const { left: ue, width: w } = Q.value[0].getBoundingClientRect();\n        ue < 0 && (O = { left: \"0\" }, W = 0, ae.value.left = `${r / 2}px`), window.innerWidth < ue + w && (O = { right: \"0\" }, W = 0, ae.value.left = `${w - r / 2}px`);\n      }\n      H.value = {\n        bottom: `${R}px`,\n        ...O,\n        transform: `translateX(${W}%)`\n      };\n    }, g = async ($, ge, r) => {\n      var O, W, ue;\n      const R = Ie(E.value[ge][r]);\n      R && ((O = $.marker) != null && O.customPosition && ((ue = (W = $.marker) == null ? void 0 : W.tooltip) != null && ue.length) ? H.value = $.marker.customPosition(R) : await te(R, $), a(\"tooltip-open\", $.marker));\n    }, X = async ($, ge, r) => {\n      var R, O;\n      if (oe.value && _.value.enabled && _.value.dragSelect)\n        return a(\"select-date\", $);\n      a(\"set-hover-date\", $), (O = (R = $.marker) == null ? void 0 : R.tooltip) != null && O.length && await g($, ge, r);\n    }, A = ($) => {\n      C.value && (C.value = null, H.value = JSON.parse(JSON.stringify({ bottom: \"\", left: \"\", transform: \"\" })), a(\"tooltip-close\", $.marker));\n    }, p = ($) => {\n      P.value.startX = $.changedTouches[0].screenX, P.value.startY = $.changedTouches[0].screenY;\n    }, se = ($) => {\n      P.value.endX = $.changedTouches[0].screenX, P.value.endY = $.changedTouches[0].screenY, D();\n    }, I = ($) => {\n      n.vertical && !n.inline && $.preventDefault();\n    }, D = () => {\n      const $ = n.vertical ? \"Y\" : \"X\";\n      Math.abs(P.value[`start${$}`] - P.value[`end${$}`]) > 10 && a(\"handle-swipe\", P.value[`start${$}`] > P.value[`end${$}`] ? \"right\" : \"left\");\n    }, V = ($, ge, r) => {\n      $ && (Array.isArray(E.value[ge]) ? E.value[ge][r] = $ : E.value[ge] = [$]), n.arrowNavigation && i(E.value, \"calendar\");\n    }, s = ($) => {\n      n.monthChangeOnScroll && ($.preventDefault(), a(\"handle-scroll\", $));\n    }, M = ($) => v.value.type === \"local\" ? ol($.value, { weekStartsOn: +n.weekStart }) : v.value.type === \"iso\" ? sl($.value) : typeof v.value.type == \"function\" ? v.value.type($.value) : \"\", F = ($) => {\n      const ge = $[0];\n      return v.value.hideOnOffsetDates ? $.some((r) => r.current) ? M(ge) : \"\" : M(ge);\n    }, u = ($, ge, r = !0) => {\n      r && sn() || !r && !sn() || _.value.enabled || (yt($, b.value), a(\"select-date\", ge));\n    }, le = ($) => {\n      yt($, b.value);\n    }, me = ($) => {\n      _.value.enabled && _.value.dragSelect ? (oe.value = !0, a(\"select-date\", $)) : _.value.enabled && a(\"select-date\", $);\n    };\n    return t({ triggerTransition: Y }), ($, ge) => (T(), K(\"div\", {\n      class: we(y.value)\n    }, [\n      ye(\"div\", {\n        ref_key: \"calendarWrapRef\",\n        ref: U,\n        class: we(q.value),\n        role: \"grid\"\n      }, [\n        ye(\"div\", Sr, [\n          $.weekNumbers ? (T(), K(\"div\", Pr, Ue($.weekNumName), 1)) : Z(\"\", !0),\n          (T(!0), K(be, null, Re(S.value, (r, R) => {\n            var O, W;\n            return T(), K(\"div\", {\n              key: R,\n              class: \"dp__calendar_header_item\",\n              role: \"gridcell\",\n              \"data-test\": \"calendar-header\",\n              \"aria-label\": (W = (O = o(c)) == null ? void 0 : O.weekDay) == null ? void 0 : W.call(O, R)\n            }, [\n              $.$slots[\"calendar-header\"] ? ie($.$slots, \"calendar-header\", {\n                key: 0,\n                day: r,\n                index: R\n              }) : Z(\"\", !0),\n              $.$slots[\"calendar-header\"] ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                ct(Ue(r), 1)\n              ], 64))\n            ], 8, Rr);\n          }), 128))\n        ]),\n        ge[2] || (ge[2] = ye(\"div\", { class: \"dp__calendar_header_separator\" }, null, -1)),\n        Ze(Nt, {\n          name: B.value,\n          css: !!$.transitions\n        }, {\n          default: ke(() => [\n            f.value ? (T(), K(\"div\", {\n              key: 0,\n              class: \"dp__calendar\",\n              role: \"rowgroup\",\n              onMouseleave: ge[1] || (ge[1] = (r) => oe.value = !1)\n            }, [\n              (T(!0), K(be, null, Re(ee.value, (r, R) => (T(), K(\"div\", {\n                key: R,\n                class: \"dp__calendar_row\",\n                role: \"row\"\n              }, [\n                $.weekNumbers ? (T(), K(\"div\", Cr, [\n                  ye(\"div\", Or, Ue(F(r.days)), 1)\n                ])) : Z(\"\", !0),\n                (T(!0), K(be, null, Re(r.days, (O, W) => {\n                  var ue, w, N;\n                  return T(), K(\"div\", {\n                    id: o(In)(O.value),\n                    ref_for: !0,\n                    ref: (ce) => V(ce, R, W),\n                    key: W + R,\n                    role: \"gridcell\",\n                    class: \"dp__calendar_item\",\n                    \"aria-pressed\": (O.classData.dp__active_date || O.classData.dp__range_start || O.classData.dp__range_start) ?? void 0,\n                    \"aria-disabled\": O.classData.dp__cell_disabled || void 0,\n                    \"aria-label\": (w = (ue = o(c)) == null ? void 0 : ue.day) == null ? void 0 : w.call(ue, O),\n                    tabindex: !O.current && $.hideOffsetDates ? void 0 : 0,\n                    \"data-test\": O.value,\n                    onClick: Wt((ce) => u(ce, O), [\"prevent\"]),\n                    onTouchend: (ce) => u(ce, O, !1),\n                    onKeydown: (ce) => o(Ke)(ce, () => $.$emit(\"select-date\", O)),\n                    onMouseenter: (ce) => X(O, R, W),\n                    onMouseleave: (ce) => A(O),\n                    onMousedown: (ce) => me(O),\n                    onMouseup: ge[0] || (ge[0] = (ce) => oe.value = !1)\n                  }, [\n                    ye(\"div\", {\n                      class: we([\"dp__cell_inner\", O.classData])\n                    }, [\n                      $.$slots.day && z.value(O) ? ie($.$slots, \"day\", {\n                        key: 0,\n                        day: +O.text,\n                        date: O.value\n                      }) : Z(\"\", !0),\n                      $.$slots.day ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                        ct(Ue(O.text), 1)\n                      ], 64)),\n                      O.marker && z.value(O) ? (T(), K(be, { key: 2 }, [\n                        $.$slots.marker ? ie($.$slots, \"marker\", {\n                          key: 0,\n                          marker: O.marker,\n                          day: +O.text,\n                          date: O.value\n                        }) : (T(), K(\"div\", {\n                          key: 1,\n                          class: we(de.value(O.marker)),\n                          style: tt(O.marker.color ? { backgroundColor: O.marker.color } : {})\n                        }, null, 6))\n                      ], 64)) : Z(\"\", !0),\n                      ve.value(O.value) ? (T(), K(\"div\", {\n                        key: 3,\n                        ref_for: !0,\n                        ref_key: \"activeTooltip\",\n                        ref: Q,\n                        class: \"dp__marker_tooltip\",\n                        style: tt(H.value)\n                      }, [\n                        (N = O.marker) != null && N.tooltip ? (T(), K(\"div\", {\n                          key: 0,\n                          class: \"dp__tooltip_content\",\n                          onClick: le\n                        }, [\n                          (T(!0), K(be, null, Re(O.marker.tooltip, (ce, he) => (T(), K(\"div\", {\n                            key: he,\n                            class: \"dp__tooltip_text\"\n                          }, [\n                            $.$slots[\"marker-tooltip\"] ? ie($.$slots, \"marker-tooltip\", {\n                              key: 0,\n                              tooltip: ce,\n                              day: O.value\n                            }) : Z(\"\", !0),\n                            $.$slots[\"marker-tooltip\"] ? Z(\"\", !0) : (T(), K(be, { key: 1 }, [\n                              ye(\"div\", {\n                                class: \"dp__tooltip_mark\",\n                                style: tt(ce.color ? { backgroundColor: ce.color } : {})\n                              }, null, 4),\n                              ye(\"div\", null, Ue(ce.text), 1)\n                            ], 64))\n                          ]))), 128)),\n                          ye(\"div\", {\n                            class: \"dp__arrow_bottom_tp\",\n                            style: tt(ae.value)\n                          }, null, 4)\n                        ])) : Z(\"\", !0)\n                      ], 4)) : Z(\"\", !0)\n                    ], 2)\n                  ], 40, _r);\n                }), 128))\n              ]))), 128))\n            ], 32)) : Z(\"\", !0)\n          ]),\n          _: 3\n        }, 8, [\"name\", \"css\"])\n      ], 2)\n    ], 2));\n  }\n}), vn = (e) => Array.isArray(e), Yr = (e, t, l, a) => {\n  const n = ne([]), i = ne(/* @__PURE__ */ new Date()), d = ne(), b = () => p(e.isTextInputDate), { modelValue: c, calendars: L, time: v, today: _ } = Jt(e, t, b), {\n    defaultedMultiCalendars: h,\n    defaultedStartTime: C,\n    defaultedRange: H,\n    defaultedConfig: E,\n    defaultedTz: U,\n    propDates: f,\n    defaultedMultiDates: B\n  } = Ce(e), { validateMonthYearInRange: P, isDisabled: Q, isDateRangeAllowed: ae, checkMinMaxRange: oe } = kt(e), { updateTimeValues: ee, getSetDateTime: S, setTime: x, assignStartTime: Y, validateTime: q, disabledTimesConfig: de } = Un(e, v, c, a), ve = J(\n    () => (k) => L.value[k] ? L.value[k].month : 0\n  ), y = J(\n    () => (k) => L.value[k] ? L.value[k].year : 0\n  ), z = (k) => !E.value.keepViewOnOffsetClick || k ? !0 : !d.value, te = (k, m, j, re = !1) => {\n    var Ae, Fe;\n    z(re) && (L.value[k] || (L.value[k] = { month: 0, year: 0 }), L.value[k].month = on(m) ? (Ae = L.value[k]) == null ? void 0 : Ae.month : m, L.value[k].year = on(j) ? (Fe = L.value[k]) == null ? void 0 : Fe.year : j);\n  }, g = () => {\n    e.autoApply && t(\"select-date\");\n  };\n  We(() => {\n    e.shadow || (c.value || ($(), C.value && Y(C.value)), p(!0), e.focusStartDate && e.startDate && $());\n  });\n  const X = J(() => {\n    var k;\n    return (k = e.flow) != null && k.length && !e.partialFlow ? e.flowStep === e.flow.length : !0;\n  }), A = () => {\n    e.autoApply && X.value && t(\"auto-apply\", e.partialFlow ? e.flowStep !== e.flow.length : !1);\n  }, p = (k = !1) => {\n    if (c.value)\n      return Array.isArray(c.value) ? (n.value = c.value, F(k)) : D(c.value, k);\n    if (h.value.count && k && !e.startDate)\n      return I(G(), k);\n  }, se = () => Array.isArray(c.value) && H.value.enabled ? De(c.value[0]) === De(c.value[1] ?? c.value[0]) : !1, I = (k = /* @__PURE__ */ new Date(), m = !1) => {\n    if ((!h.value.count || !h.value.static || m) && te(0, De(k), pe(k)), h.value.count && (!h.value.solo || !c.value || se()))\n      for (let j = 1; j < h.value.count; j++) {\n        const re = Te(G(), { month: ve.value(j - 1), year: y.value(j - 1) }), Ae = Dn(re, { months: 1 });\n        L.value[j] = { month: De(Ae), year: pe(Ae) };\n      }\n  }, D = (k, m) => {\n    I(k), x(\"hours\", ft(k)), x(\"minutes\", ht(k)), x(\"seconds\", Bt(k)), h.value.count && m && me();\n  }, V = (k) => {\n    if (h.value.count) {\n      if (h.value.solo) return 0;\n      const m = De(k[0]), j = De(k[1]);\n      return Math.abs(j - m) < h.value.count ? 0 : 1;\n    }\n    return 1;\n  }, s = (k, m) => {\n    k[1] && H.value.showLastInRange ? I(k[V(k)], m) : I(k[0], m);\n    const j = (re, Ae) => [\n      re(k[0]),\n      k[1] ? re(k[1]) : v[Ae][1]\n    ];\n    x(\"hours\", j(ft, \"hours\")), x(\"minutes\", j(ht, \"minutes\")), x(\"seconds\", j(Bt, \"seconds\"));\n  }, M = (k, m) => {\n    if ((H.value.enabled || e.weekPicker) && !B.value.enabled)\n      return s(k, m);\n    if (B.value.enabled && m) {\n      const j = k[k.length - 1];\n      return D(j, m);\n    }\n  }, F = (k) => {\n    const m = c.value;\n    M(m, k), h.value.count && h.value.solo && me();\n  }, u = (k, m) => {\n    const j = Te(G(), { month: ve.value(m), year: y.value(m) }), re = k < 0 ? At(j, 1) : jt(j, 1);\n    P(De(re), pe(re), k < 0, e.preventMinMaxNavigation) && (te(m, De(re), pe(re)), t(\"update-month-year\", { instance: m, month: De(re), year: pe(re) }), h.value.count && !h.value.solo && le(m), l());\n  }, le = (k) => {\n    for (let m = k - 1; m >= 0; m--) {\n      const j = jt(Te(G(), { month: ve.value(m + 1), year: y.value(m + 1) }), 1);\n      te(m, De(j), pe(j));\n    }\n    for (let m = k + 1; m <= h.value.count - 1; m++) {\n      const j = At(Te(G(), { month: ve.value(m - 1), year: y.value(m - 1) }), 1);\n      te(m, De(j), pe(j));\n    }\n  }, me = () => {\n    if (Array.isArray(c.value) && c.value.length === 2) {\n      const k = G(\n        G(c.value[1] ? c.value[1] : At(c.value[0], 1))\n      ), [m, j] = [De(c.value[0]), pe(c.value[0])], [re, Ae] = [De(c.value[1]), pe(c.value[1])];\n      (m !== re || m === re && j !== Ae) && h.value.solo && te(1, De(k), pe(k));\n    } else c.value && !Array.isArray(c.value) && (te(0, De(c.value), pe(c.value)), I(G()));\n  }, $ = () => {\n    e.startDate && (te(0, De(G(e.startDate)), pe(G(e.startDate))), h.value.count && le(0));\n  }, ge = (k, m) => {\n    if (e.monthChangeOnScroll) {\n      const j = (/* @__PURE__ */ new Date()).getTime() - i.value.getTime(), re = Math.abs(k.deltaY);\n      let Ae = 500;\n      re > 1 && (Ae = 100), re > 100 && (Ae = 0), j > Ae && (i.value = /* @__PURE__ */ new Date(), u(e.monthChangeOnScroll !== \"inverse\" ? -k.deltaY : k.deltaY, m));\n    }\n  }, r = (k, m, j = !1) => {\n    e.monthChangeOnArrows && e.vertical === j && R(k, m);\n  }, R = (k, m) => {\n    u(k === \"right\" ? -1 : 1, m);\n  }, O = (k) => {\n    if (f.value.markers)\n      return sa(k.value, f.value.markers);\n  }, W = (k, m) => {\n    switch (e.sixWeeks === !0 ? \"append\" : e.sixWeeks) {\n      case \"prepend\":\n        return [!0, !1];\n      case \"center\":\n        return [k == 0, !0];\n      case \"fair\":\n        return [k == 0 || m > k, !0];\n      case \"append\":\n        return [!1, !1];\n      default:\n        return [!1, !1];\n    }\n  }, ue = (k, m, j, re) => {\n    if (e.sixWeeks && k.length < 6) {\n      const Ae = 6 - k.length, Fe = (m.getDay() + 7 - re) % 7, xt = 6 - (j.getDay() + 7 - re) % 7, [zt, Da] = W(Fe, xt);\n      for (let Dt = 1; Dt <= Ae; Dt++)\n        if (Da ? !!(Dt % 2) == zt : zt) {\n          const ea = k[0].days[0], Ma = w($t(ea.value, -7), De(m));\n          k.unshift({ days: Ma });\n        } else {\n          const ea = k[k.length - 1], Ma = ea.days[ea.days.length - 1], Wn = w($t(Ma.value, 1), De(m));\n          k.push({ days: Wn });\n        }\n    }\n    return k;\n  }, w = (k, m) => {\n    const j = G(k), re = [];\n    for (let Ae = 0; Ae < 7; Ae++) {\n      const Fe = $t(j, Ae), wt = De(Fe) !== m;\n      re.push({\n        text: e.hideOffsetDates && wt ? \"\" : Fe.getDate(),\n        value: Fe,\n        current: !wt,\n        classData: {}\n      });\n    }\n    return re;\n  }, N = (k, m) => {\n    const j = [], re = new Date(m, k), Ae = new Date(m, k + 1, 0), Fe = e.weekStart, wt = La(re, { weekStartsOn: Fe }), xt = (zt) => {\n      const Da = w(zt, k);\n      if (j.push({ days: Da }), !j[j.length - 1].days.some(\n        (Dt) => Me(Ge(Dt.value), Ge(Ae))\n      )) {\n        const Dt = $t(zt, 7);\n        xt(Dt);\n      }\n    };\n    return xt(wt), ue(j, re, Ae, Fe);\n  }, ce = (k) => {\n    const m = gt(G(k.value), v.hours, v.minutes, Xe());\n    t(\"date-update\", m), B.value.enabled ? Xa(m, c, B.value.limit) : c.value = m, a(), xe().then(() => {\n      A();\n    });\n  }, he = (k) => H.value.noDisabledRange ? Cn(n.value[0], k).some((j) => Q(j)) : !1, et = () => {\n    n.value = c.value ? c.value.slice() : [], n.value.length === 2 && !(H.value.fixedStart || H.value.fixedEnd) && (n.value = []);\n  }, fe = (k, m) => {\n    const j = [\n      G(k.value),\n      $t(G(k.value), +H.value.autoRange)\n    ];\n    ae(j) ? (m && vt(k.value), n.value = j) : t(\"invalid-date\", k.value);\n  }, vt = (k) => {\n    const m = De(G(k)), j = pe(G(k));\n    if (te(0, m, j), h.value.count > 0)\n      for (let re = 1; re < h.value.count; re++) {\n        const Ae = Al(\n          Te(G(k), { year: y.value(re - 1), month: ve.value(re - 1) })\n        );\n        te(re, Ae.month, Ae.year);\n      }\n  }, ot = (k) => {\n    if (he(k.value) || !oe(k.value, c.value, H.value.fixedStart ? 0 : 1))\n      return t(\"invalid-date\", k.value);\n    n.value = Ln(G(k.value), c, t, H);\n  }, Ft = (k, m) => {\n    if (et(), H.value.autoRange) return fe(k, m);\n    if (H.value.fixedStart || H.value.fixedEnd) return ot(k);\n    n.value[0] ? oe(G(k.value), c.value) && !he(k.value) ? Oe(G(k.value), G(n.value[0])) ? (n.value.unshift(G(k.value)), t(\"range-end\", n.value[0])) : (n.value[1] = G(k.value), t(\"range-end\", n.value[1])) : (e.autoApply && t(\"auto-apply-invalid\", k.value), t(\"invalid-date\", k.value)) : (n.value[0] = G(k.value), t(\"range-start\", n.value[0]));\n  }, Xe = (k = !0) => e.enableSeconds ? Array.isArray(v.seconds) ? k ? v.seconds[0] : v.seconds[1] : v.seconds : 0, Lt = (k) => {\n    n.value[k] = gt(\n      n.value[k],\n      v.hours[k],\n      v.minutes[k],\n      Xe(k !== 1)\n    );\n  }, pa = () => {\n    var k, m;\n    n.value[0] && n.value[1] && +((k = n.value) == null ? void 0 : k[0]) > +((m = n.value) == null ? void 0 : m[1]) && (n.value.reverse(), t(\"range-start\", n.value[0]), t(\"range-end\", n.value[1]));\n  }, Zt = () => {\n    n.value.length && (n.value[0] && !n.value[1] ? Lt(0) : (Lt(0), Lt(1), a()), pa(), c.value = n.value.slice(), va(n.value, t, e.autoApply, e.modelAuto));\n  }, ya = (k, m = !1) => {\n    if (Q(k.value) || !k.current && e.hideOffsetDates) return t(\"invalid-date\", k.value);\n    if (d.value = JSON.parse(JSON.stringify(k)), !H.value.enabled) return ce(k);\n    vn(v.hours) && vn(v.minutes) && !B.value.enabled && (Ft(k, m), Zt());\n  }, ga = (k, m) => {\n    var re;\n    te(k, m.month, m.year, !0), h.value.count && !h.value.solo && le(k), t(\"update-month-year\", { instance: k, month: m.month, year: m.year }), l(h.value.solo ? k : void 0);\n    const j = (re = e.flow) != null && re.length ? e.flow[e.flowStep] : void 0;\n    !m.fromNav && (j === He.month || j === He.year) && a();\n  }, ha = (k, m) => {\n    Fn({\n      value: k,\n      modelValue: c,\n      range: H.value.enabled,\n      timezone: m ? void 0 : U.value.timezone\n    }), g(), e.multiCalendars && xe().then(() => p(!0));\n  }, ba = () => {\n    const k = ja(G(), U.value);\n    H.value.enabled ? c.value && Array.isArray(c.value) && c.value[0] ? c.value = Oe(k, c.value[0]) ? [k, c.value[0]] : [c.value[0], k] : c.value = [k] : c.value = k, g();\n  }, ka = () => {\n    if (Array.isArray(c.value))\n      if (B.value.enabled) {\n        const k = wa();\n        c.value[c.value.length - 1] = S(k);\n      } else\n        c.value = c.value.map((k, m) => k && S(k, m));\n    else\n      c.value = S(c.value);\n    t(\"time-update\");\n  }, wa = () => Array.isArray(c.value) && c.value.length ? c.value[c.value.length - 1] : null;\n  return {\n    calendars: L,\n    modelValue: c,\n    month: ve,\n    year: y,\n    time: v,\n    disabledTimesConfig: de,\n    today: _,\n    validateTime: q,\n    getCalendarDays: N,\n    getMarker: O,\n    handleScroll: ge,\n    handleSwipe: R,\n    handleArrow: r,\n    selectDate: ya,\n    updateMonthYear: ga,\n    presetDate: ha,\n    selectCurrentDate: ba,\n    updateTime: (k, m = !0, j = !1) => {\n      ee(k, m, j, ka);\n    },\n    assignMonthAndYear: I\n  };\n}, Ir = { key: 0 }, Nr = /* @__PURE__ */ Le({\n  __name: \"DatePicker\",\n  props: {\n    ...rt\n  },\n  emits: [\n    \"tooltip-open\",\n    \"tooltip-close\",\n    \"mount\",\n    \"update:internal-model-value\",\n    \"update-flow-step\",\n    \"reset-flow\",\n    \"auto-apply\",\n    \"focus-menu\",\n    \"select-date\",\n    \"range-start\",\n    \"range-end\",\n    \"invalid-fixed-range\",\n    \"time-update\",\n    \"am-pm-change\",\n    \"time-picker-open\",\n    \"time-picker-close\",\n    \"recalculate-position\",\n    \"update-month-year\",\n    \"auto-apply-invalid\",\n    \"date-update\",\n    \"invalid-date\",\n    \"overlay-toggle\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, {\n      calendars: i,\n      month: d,\n      year: b,\n      modelValue: c,\n      time: L,\n      disabledTimesConfig: v,\n      today: _,\n      validateTime: h,\n      getCalendarDays: C,\n      getMarker: H,\n      handleArrow: E,\n      handleScroll: U,\n      handleSwipe: f,\n      selectDate: B,\n      updateMonthYear: P,\n      presetDate: Q,\n      selectCurrentDate: ae,\n      updateTime: oe,\n      assignMonthAndYear: ee\n    } = Yr(n, a, se, I), S = Pt(), { setHoverDate: x, getDayClassData: Y, clearHoverDate: q } = Jr(c, n), { defaultedMultiCalendars: de } = Ce(n), ve = ne([]), y = ne([]), z = ne(null), te = Je(S, \"calendar\"), g = Je(S, \"monthYear\"), X = Je(S, \"timePicker\"), A = (r) => {\n      n.shadow || a(\"mount\", r);\n    };\n    at(\n      i,\n      () => {\n        n.shadow || setTimeout(() => {\n          a(\"recalculate-position\");\n        }, 0);\n      },\n      { deep: !0 }\n    ), at(\n      de,\n      (r, R) => {\n        r.count - R.count > 0 && ee();\n      },\n      { deep: !0 }\n    );\n    const p = J(() => (r) => C(d.value(r), b.value(r)).map((R) => ({\n      ...R,\n      days: R.days.map((O) => (O.marker = H(O), O.classData = Y(O), O))\n    })));\n    function se(r) {\n      var R;\n      r || r === 0 ? (R = y.value[r]) == null || R.triggerTransition(d.value(r), b.value(r)) : y.value.forEach((O, W) => O.triggerTransition(d.value(W), b.value(W)));\n    }\n    function I() {\n      a(\"update-flow-step\");\n    }\n    const D = (r, R = !1) => {\n      B(r, R), n.spaceConfirm && a(\"select-date\");\n    }, V = (r, R, O = 0) => {\n      var W;\n      (W = ve.value[O]) == null || W.toggleMonthPicker(r, R);\n    }, s = (r, R, O = 0) => {\n      var W;\n      (W = ve.value[O]) == null || W.toggleYearPicker(r, R);\n    }, M = (r, R, O) => {\n      var W;\n      (W = z.value) == null || W.toggleTimePicker(r, R, O);\n    }, F = (r, R) => {\n      var O;\n      if (!n.range) {\n        const W = c.value ? c.value : _, ue = R ? new Date(R) : W, w = r ? La(ue, { weekStartsOn: 1 }) : hn(ue, { weekStartsOn: 1 });\n        B({\n          value: w,\n          current: De(ue) === d.value(0),\n          text: \"\",\n          classData: {}\n        }), (O = document.getElementById(In(w))) == null || O.focus();\n      }\n    }, u = (r) => {\n      var R;\n      (R = ve.value[0]) == null || R.handleMonthYearChange(r, !0);\n    }, le = (r) => {\n      P(0, { month: d.value(0), year: b.value(0) + (r ? 1 : -1), fromNav: !0 });\n    }, me = (r, R) => {\n      r === He.time && a(`time-picker-${R ? \"open\" : \"close\"}`), a(\"overlay-toggle\", { open: R, overlay: r });\n    }, $ = (r) => {\n      a(\"overlay-toggle\", { open: !1, overlay: r }), a(\"focus-menu\");\n    };\n    return t({\n      clearHoverDate: q,\n      presetDate: Q,\n      selectCurrentDate: ae,\n      toggleMonthPicker: V,\n      toggleYearPicker: s,\n      toggleTimePicker: M,\n      handleArrow: E,\n      updateMonthYear: P,\n      getSidebarProps: () => ({\n        modelValue: c,\n        month: d,\n        year: b,\n        time: L,\n        updateTime: oe,\n        updateMonthYear: P,\n        selectDate: B,\n        presetDate: Q\n      }),\n      changeMonth: u,\n      changeYear: le,\n      selectWeekDate: F\n    }), (r, R) => (T(), K(be, null, [\n      Ze(fa, {\n        \"multi-calendars\": o(de).count,\n        collapse: r.collapse\n      }, {\n        default: ke(({ instance: O, index: W }) => [\n          r.disableMonthYearSelect ? Z(\"\", !0) : (T(), $e(Tr, Ee({\n            key: 0,\n            ref: (ue) => {\n              ue && (ve.value[W] = ue);\n            },\n            months: o($n)(r.formatLocale, r.locale, r.monthNameFormat),\n            years: o(Ka)(r.yearRange, r.locale, r.reverseYears),\n            month: o(d)(O),\n            year: o(b)(O),\n            instance: O\n          }, r.$props, {\n            onMount: R[0] || (R[0] = (ue) => A(o(Tt).header)),\n            onResetFlow: R[1] || (R[1] = (ue) => r.$emit(\"reset-flow\")),\n            onUpdateMonthYear: (ue) => o(P)(O, ue),\n            onOverlayClosed: $,\n            onOverlayOpened: R[2] || (R[2] = (ue) => r.$emit(\"overlay-toggle\", { open: !0, overlay: ue }))\n          }), Ve({ _: 2 }, [\n            Re(o(g), (ue, w) => ({\n              name: ue,\n              fn: ke((N) => [\n                ie(r.$slots, ue, Ne(Qe(N)))\n              ])\n            }))\n          ]), 1040, [\"months\", \"years\", \"month\", \"year\", \"instance\", \"onUpdateMonthYear\"])),\n          Ze(Br, Ee({\n            ref: (ue) => {\n              ue && (y.value[W] = ue);\n            },\n            \"mapped-dates\": p.value(O),\n            month: o(d)(O),\n            year: o(b)(O),\n            instance: O\n          }, r.$props, {\n            onSelectDate: (ue) => o(B)(ue, O !== 1),\n            onHandleSpace: (ue) => D(ue, O !== 1),\n            onSetHoverDate: R[3] || (R[3] = (ue) => o(x)(ue)),\n            onHandleScroll: (ue) => o(U)(ue, O),\n            onHandleSwipe: (ue) => o(f)(ue, O),\n            onMount: R[4] || (R[4] = (ue) => A(o(Tt).calendar)),\n            onResetFlow: R[5] || (R[5] = (ue) => r.$emit(\"reset-flow\")),\n            onTooltipOpen: R[6] || (R[6] = (ue) => r.$emit(\"tooltip-open\", ue)),\n            onTooltipClose: R[7] || (R[7] = (ue) => r.$emit(\"tooltip-close\", ue))\n          }), Ve({ _: 2 }, [\n            Re(o(te), (ue, w) => ({\n              name: ue,\n              fn: ke((N) => [\n                ie(r.$slots, ue, Ne(Qe({ ...N })))\n              ])\n            }))\n          ]), 1040, [\"mapped-dates\", \"month\", \"year\", \"instance\", \"onSelectDate\", \"onHandleSpace\", \"onHandleScroll\", \"onHandleSwipe\"])\n        ]),\n        _: 3\n      }, 8, [\"multi-calendars\", \"collapse\"]),\n      r.enableTimePicker ? (T(), K(\"div\", Ir, [\n        r.$slots[\"time-picker\"] ? ie(r.$slots, \"time-picker\", Ne(Ee({ key: 0 }, { time: o(L), updateTime: o(oe) }))) : (T(), $e(Hn, Ee({\n          key: 1,\n          ref_key: \"timePickerRef\",\n          ref: z\n        }, r.$props, {\n          hours: o(L).hours,\n          minutes: o(L).minutes,\n          seconds: o(L).seconds,\n          \"internal-model-value\": r.internalModelValue,\n          \"disabled-times-config\": o(v),\n          \"validate-time\": o(h),\n          onMount: R[8] || (R[8] = (O) => A(o(Tt).timePicker)),\n          \"onUpdate:hours\": R[9] || (R[9] = (O) => o(oe)(O)),\n          \"onUpdate:minutes\": R[10] || (R[10] = (O) => o(oe)(O, !1)),\n          \"onUpdate:seconds\": R[11] || (R[11] = (O) => o(oe)(O, !1, !0)),\n          onResetFlow: R[12] || (R[12] = (O) => r.$emit(\"reset-flow\")),\n          onOverlayClosed: R[13] || (R[13] = (O) => me(O, !1)),\n          onOverlayOpened: R[14] || (R[14] = (O) => me(O, !0)),\n          onAmPmChange: R[15] || (R[15] = (O) => r.$emit(\"am-pm-change\", O))\n        }), Ve({ _: 2 }, [\n          Re(o(X), (O, W) => ({\n            name: O,\n            fn: ke((ue) => [\n              ie(r.$slots, O, Ne(Qe(ue)))\n            ])\n          }))\n        ]), 1040, [\"hours\", \"minutes\", \"seconds\", \"internal-model-value\", \"disabled-times-config\", \"validate-time\"]))\n      ])) : Z(\"\", !0)\n    ], 64));\n  }\n}), Er = (e, t) => {\n  const l = ne(), {\n    defaultedMultiCalendars: a,\n    defaultedConfig: n,\n    defaultedHighlight: i,\n    defaultedRange: d,\n    propDates: b,\n    defaultedFilters: c,\n    defaultedMultiDates: L\n  } = Ce(e), { modelValue: v, year: _, month: h, calendars: C } = Jt(e, t), { isDisabled: H } = kt(e), { selectYear: E, groupedYears: U, showYearPicker: f, isDisabled: B, toggleYearPicker: P, handleYearSelect: Q, handleYear: ae } = zn({\n    modelValue: v,\n    multiCalendars: a,\n    range: d,\n    highlight: i,\n    calendars: C,\n    propDates: b,\n    month: h,\n    year: _,\n    filters: c,\n    props: e,\n    emit: t\n  }), oe = (g, X) => [g, X].map((A) => ut(A, \"MMMM\", { locale: e.formatLocale })).join(\"-\"), ee = J(() => (g) => v.value ? Array.isArray(v.value) ? v.value.some((X) => tn(g, X)) : tn(v.value, g) : !1), S = (g) => {\n    if (d.value.enabled) {\n      if (Array.isArray(v.value)) {\n        const X = Me(g, v.value[0]) || Me(g, v.value[1]);\n        return da(v.value, l.value, g) && !X;\n      }\n      return !1;\n    }\n    return !1;\n  }, x = (g, X) => g.quarter === nn(X) && g.year === pe(X), Y = (g) => typeof i.value == \"function\" ? i.value({ quarter: nn(g), year: pe(g) }) : !!i.value.quarters.find((X) => x(X, g)), q = J(() => (g) => {\n    const X = Te(/* @__PURE__ */ new Date(), { year: _.value(g) });\n    return ul({\n      start: oa(X),\n      end: wn(X)\n    }).map((A) => {\n      const p = il(A), se = an(A), I = H(A), D = S(p), V = Y(p);\n      return {\n        text: oe(p, se),\n        value: p,\n        active: ee.value(p),\n        highlighted: V,\n        disabled: I,\n        isBetween: D\n      };\n    });\n  }), de = (g) => {\n    Xa(g, v, L.value.limit), t(\"auto-apply\", !0);\n  }, ve = (g) => {\n    v.value = Ja(v, g, t), va(v.value, t, e.autoApply, e.modelAuto);\n  }, y = (g) => {\n    v.value = g, t(\"auto-apply\");\n  };\n  return {\n    defaultedConfig: n,\n    defaultedMultiCalendars: a,\n    groupedYears: U,\n    year: _,\n    isDisabled: B,\n    quarters: q,\n    showYearPicker: f,\n    modelValue: v,\n    setHoverDate: (g) => {\n      l.value = g;\n    },\n    selectYear: E,\n    selectQuarter: (g, X, A) => {\n      if (!A)\n        return C.value[X].month = De(an(g)), L.value.enabled ? de(g) : d.value.enabled ? ve(g) : y(g);\n    },\n    toggleYearPicker: P,\n    handleYearSelect: Q,\n    handleYear: ae\n  };\n}, Fr = { class: \"dp--quarter-items\" }, Lr = [\"data-test\", \"disabled\", \"onClick\", \"onMouseover\"], zr = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"QuarterPicker\",\n  props: {\n    ...rt\n  },\n  emits: [\n    \"update:internal-model-value\",\n    \"reset-flow\",\n    \"overlay-closed\",\n    \"auto-apply\",\n    \"range-start\",\n    \"range-end\",\n    \"overlay-toggle\",\n    \"update-month-year\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, i = Pt(), d = Je(i, \"yearMode\"), {\n      defaultedMultiCalendars: b,\n      defaultedConfig: c,\n      groupedYears: L,\n      year: v,\n      isDisabled: _,\n      quarters: h,\n      modelValue: C,\n      showYearPicker: H,\n      setHoverDate: E,\n      selectQuarter: U,\n      toggleYearPicker: f,\n      handleYearSelect: B,\n      handleYear: P\n    } = Er(n, a);\n    return t({ getSidebarProps: () => ({\n      modelValue: C,\n      year: v,\n      selectQuarter: U,\n      handleYearSelect: B,\n      handleYear: P\n    }) }), (ae, oe) => (T(), $e(fa, {\n      \"multi-calendars\": o(b).count,\n      collapse: ae.collapse,\n      stretch: \"\"\n    }, {\n      default: ke(({ instance: ee }) => [\n        ye(\"div\", {\n          class: \"dp-quarter-picker-wrap\",\n          style: tt({ minHeight: `${o(c).modeHeight}px` })\n        }, [\n          ae.$slots[\"top-extra\"] ? ie(ae.$slots, \"top-extra\", {\n            key: 0,\n            value: ae.internalModelValue\n          }) : Z(\"\", !0),\n          ye(\"div\", null, [\n            Ze(En, Ee(ae.$props, {\n              items: o(L)(ee),\n              instance: ee,\n              \"show-year-picker\": o(H)[ee],\n              year: o(v)(ee),\n              \"is-disabled\": (S) => o(_)(ee, S),\n              onHandleYear: (S) => o(P)(ee, S),\n              onYearSelect: (S) => o(B)(S, ee),\n              onToggleYearPicker: (S) => o(f)(ee, S == null ? void 0 : S.flow, S == null ? void 0 : S.show)\n            }), Ve({ _: 2 }, [\n              Re(o(d), (S, x) => ({\n                name: S,\n                fn: ke((Y) => [\n                  ie(ae.$slots, S, Ne(Qe(Y)))\n                ])\n              }))\n            ]), 1040, [\"items\", \"instance\", \"show-year-picker\", \"year\", \"is-disabled\", \"onHandleYear\", \"onYearSelect\", \"onToggleYearPicker\"])\n          ]),\n          ye(\"div\", Fr, [\n            (T(!0), K(be, null, Re(o(h)(ee), (S, x) => (T(), K(\"div\", { key: x }, [\n              ye(\"button\", {\n                type: \"button\",\n                class: we([\"dp--qr-btn\", {\n                  \"dp--qr-btn-active\": S.active,\n                  \"dp--qr-btn-between\": S.isBetween,\n                  \"dp--qr-btn-disabled\": S.disabled,\n                  \"dp--highlighted\": S.highlighted\n                }]),\n                \"data-test\": S.value,\n                disabled: S.disabled,\n                onClick: (Y) => o(U)(S.value, ee, S.disabled),\n                onMouseover: (Y) => o(E)(S.value)\n              }, [\n                ae.$slots.quarter ? ie(ae.$slots, \"quarter\", {\n                  key: 0,\n                  value: S.value,\n                  text: S.text\n                }) : (T(), K(be, { key: 1 }, [\n                  ct(Ue(S.text), 1)\n                ], 64))\n              ], 42, Lr)\n            ]))), 128))\n          ])\n        ], 4)\n      ]),\n      _: 3\n    }, 8, [\"multi-calendars\", \"collapse\"]));\n  }\n}), Hr = [\"id\", \"tabindex\", \"role\", \"aria-label\"], Ur = {\n  key: 0,\n  class: \"dp--menu-load-container\"\n}, Vr = {\n  key: 1,\n  class: \"dp--menu-header\"\n}, Wr = {\n  key: 0,\n  class: \"dp__sidebar_left\"\n}, jr = [\"data-test\", \"onClick\", \"onKeydown\"], Kr = {\n  key: 2,\n  class: \"dp__sidebar_right\"\n}, Gr = {\n  key: 3,\n  class: \"dp__action_extra\"\n}, mn = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"DatepickerMenu\",\n  props: {\n    ...ca,\n    shadow: { type: Boolean, default: !1 },\n    openOnTop: { type: Boolean, default: !1 },\n    internalModelValue: { type: [Date, Array], default: null },\n    noOverlayFocus: { type: Boolean, default: !1 },\n    collapse: { type: Boolean, default: !1 },\n    getInputRect: { type: Function, default: () => ({}) },\n    isTextInputDate: { type: Boolean, default: !1 }\n  },\n  emits: [\n    \"close-picker\",\n    \"select-date\",\n    \"auto-apply\",\n    \"time-update\",\n    \"flow-step\",\n    \"update-month-year\",\n    \"invalid-select\",\n    \"update:internal-model-value\",\n    \"recalculate-position\",\n    \"invalid-fixed-range\",\n    \"tooltip-open\",\n    \"tooltip-close\",\n    \"time-picker-open\",\n    \"time-picker-close\",\n    \"am-pm-change\",\n    \"range-start\",\n    \"range-end\",\n    \"auto-apply-invalid\",\n    \"date-update\",\n    \"invalid-date\",\n    \"overlay-toggle\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, i = ne(null), d = J(() => {\n      const { openOnTop: w, ...N } = n;\n      return {\n        ...N,\n        flowStep: x.value,\n        collapse: n.collapse,\n        noOverlayFocus: n.noOverlayFocus,\n        menuWrapRef: i.value\n      };\n    }), { setMenuFocused: b, setShiftKey: c, control: L } = Nn(), v = Pt(), { defaultedTextInput: _, defaultedInline: h, defaultedConfig: C, defaultedUI: H } = Ce(n), E = ne(null), U = ne(0), f = ne(null), B = ne(!1), P = ne(null);\n    We(() => {\n      if (!n.shadow) {\n        B.value = !0, Q(), window.addEventListener(\"resize\", Q);\n        const w = Ie(i);\n        if (w && !_.value.enabled && !h.value.enabled && (b(!0), te()), w) {\n          const N = (ce) => {\n            C.value.allowPreventDefault && ce.preventDefault(), yt(ce, C.value, !0);\n          };\n          w.addEventListener(\"pointerdown\", N), w.addEventListener(\"mousedown\", N);\n        }\n      }\n    }), ua(() => {\n      window.removeEventListener(\"resize\", Q);\n    });\n    const Q = () => {\n      const w = Ie(f);\n      w && (U.value = w.getBoundingClientRect().width);\n    }, { arrowRight: ae, arrowLeft: oe, arrowDown: ee, arrowUp: S } = bt(), { flowStep: x, updateFlowStep: Y, childMount: q, resetFlow: de, handleFlow: ve } = Zr(n, a, P), y = J(() => n.monthPicker ? rr : n.yearPicker ? sr : n.timePicker ? kr : n.quarterPicker ? zr : Nr), z = J(() => {\n      var ce;\n      if (C.value.arrowLeft) return C.value.arrowLeft;\n      const w = (ce = i.value) == null ? void 0 : ce.getBoundingClientRect(), N = n.getInputRect();\n      return (N == null ? void 0 : N.width) < (U == null ? void 0 : U.value) && (N == null ? void 0 : N.left) <= ((w == null ? void 0 : w.left) ?? 0) ? `${(N == null ? void 0 : N.width) / 2}px` : (N == null ? void 0 : N.right) >= ((w == null ? void 0 : w.right) ?? 0) && (N == null ? void 0 : N.width) < (U == null ? void 0 : U.value) ? `${(U == null ? void 0 : U.value) - (N == null ? void 0 : N.width) / 2}px` : \"50%\";\n    }), te = () => {\n      const w = Ie(i);\n      w && w.focus({ preventScroll: !0 });\n    }, g = J(() => {\n      var w;\n      return ((w = P.value) == null ? void 0 : w.getSidebarProps()) || {};\n    }), X = () => {\n      n.openOnTop && a(\"recalculate-position\");\n    }, A = Je(v, \"action\"), p = J(() => n.monthPicker || n.yearPicker ? Je(v, \"monthYear\") : n.timePicker ? Je(v, \"timePicker\") : Je(v, \"shared\")), se = J(() => n.openOnTop ? \"dp__arrow_bottom\" : \"dp__arrow_top\"), I = J(() => ({\n      dp__menu_disabled: n.disabled,\n      dp__menu_readonly: n.readonly,\n      \"dp-menu-loading\": n.loading\n    })), D = J(\n      () => ({\n        dp__menu: !0,\n        dp__menu_index: !h.value.enabled,\n        dp__relative: h.value.enabled,\n        ...H.value.menu ?? {}\n      })\n    ), V = (w) => {\n      yt(w, C.value, !0);\n    }, s = () => {\n      n.escClose && a(\"close-picker\");\n    }, M = (w) => {\n      if (n.arrowNavigation) {\n        if (w === je.up) return S();\n        if (w === je.down) return ee();\n        if (w === je.left) return oe();\n        if (w === je.right) return ae();\n      } else w === je.left || w === je.up ? $(\"handleArrow\", je.left, 0, w === je.up) : $(\"handleArrow\", je.right, 0, w === je.down);\n    }, F = (w) => {\n      c(w.shiftKey), !n.disableMonthYearSelect && w.code === Pe.tab && w.target.classList.contains(\"dp__menu\") && L.value.shiftKeyInMenu && (w.preventDefault(), yt(w, C.value, !0), a(\"close-picker\"));\n    }, u = () => {\n      te(), a(\"time-picker-close\");\n    }, le = (w) => {\n      var N, ce, he;\n      (N = P.value) == null || N.toggleTimePicker(!1, !1), (ce = P.value) == null || ce.toggleMonthPicker(!1, !1, w), (he = P.value) == null || he.toggleYearPicker(!1, !1, w);\n    }, me = (w, N = 0) => {\n      var ce, he, et;\n      return w === \"month\" ? (ce = P.value) == null ? void 0 : ce.toggleMonthPicker(!1, !0, N) : w === \"year\" ? (he = P.value) == null ? void 0 : he.toggleYearPicker(!1, !0, N) : w === \"time\" ? (et = P.value) == null ? void 0 : et.toggleTimePicker(!0, !1) : le(N);\n    }, $ = (w, ...N) => {\n      var ce, he;\n      (ce = P.value) != null && ce[w] && ((he = P.value) == null || he[w](...N));\n    }, ge = () => {\n      $(\"selectCurrentDate\");\n    }, r = (w, N) => {\n      $(\"presetDate\", w, N);\n    }, R = () => {\n      $(\"clearHoverDate\");\n    }, O = (w, N) => {\n      $(\"updateMonthYear\", w, N);\n    }, W = (w, N) => {\n      w.preventDefault(), M(N);\n    }, ue = (w) => {\n      var N, ce, he;\n      if (F(w), w.key === Pe.home || w.key === Pe.end)\n        return $(\n          \"selectWeekDate\",\n          w.key === Pe.home,\n          w.target.getAttribute(\"id\")\n        );\n      switch ((w.key === Pe.pageUp || w.key === Pe.pageDown) && (w.shiftKey ? ($(\"changeYear\", w.key === Pe.pageUp), (N = Ea(i.value, \"overlay-year\")) == null || N.focus()) : ($(\"changeMonth\", w.key === Pe.pageUp), (ce = Ea(i.value, w.key === Pe.pageUp ? \"action-prev\" : \"action-next\")) == null || ce.focus()), w.target.getAttribute(\"id\") && ((he = i.value) == null || he.focus({ preventScroll: !0 }))), w.key) {\n        case Pe.esc:\n          return s();\n        case Pe.arrowLeft:\n          return W(w, je.left);\n        case Pe.arrowRight:\n          return W(w, je.right);\n        case Pe.arrowUp:\n          return W(w, je.up);\n        case Pe.arrowDown:\n          return W(w, je.down);\n        default:\n          return;\n      }\n    };\n    return t({\n      updateMonthYear: O,\n      switchView: me,\n      handleFlow: ve\n    }), (w, N) => {\n      var ce, he, et;\n      return T(), K(\"div\", {\n        id: w.uid ? `dp-menu-${w.uid}` : void 0,\n        ref_key: \"dpMenuRef\",\n        ref: i,\n        tabindex: o(h).enabled ? void 0 : \"0\",\n        role: o(h).enabled ? void 0 : \"dialog\",\n        \"aria-label\": (ce = w.ariaLabels) == null ? void 0 : ce.menu,\n        class: we(D.value),\n        style: tt({ \"--dp-arrow-left\": z.value }),\n        onMouseleave: R,\n        onClick: V,\n        onKeydown: ue\n      }, [\n        (w.disabled || w.readonly) && o(h).enabled || w.loading ? (T(), K(\"div\", {\n          key: 0,\n          class: we(I.value)\n        }, [\n          w.loading ? (T(), K(\"div\", Ur, N[19] || (N[19] = [\n            ye(\"span\", { class: \"dp--menu-loader\" }, null, -1)\n          ]))) : Z(\"\", !0)\n        ], 2)) : Z(\"\", !0),\n        w.$slots[\"menu-header\"] ? (T(), K(\"div\", Vr, [\n          ie(w.$slots, \"menu-header\")\n        ])) : Z(\"\", !0),\n        !o(h).enabled && !w.teleportCenter ? (T(), K(\"div\", {\n          key: 2,\n          class: we(se.value)\n        }, null, 2)) : Z(\"\", !0),\n        ye(\"div\", {\n          ref_key: \"innerMenuRef\",\n          ref: f,\n          class: we({\n            dp__menu_content_wrapper: ((he = w.presetDates) == null ? void 0 : he.length) || !!w.$slots[\"left-sidebar\"] || !!w.$slots[\"right-sidebar\"],\n            \"dp--menu-content-wrapper-collapsed\": e.collapse && (((et = w.presetDates) == null ? void 0 : et.length) || !!w.$slots[\"left-sidebar\"] || !!w.$slots[\"right-sidebar\"])\n          }),\n          style: tt({ \"--dp-menu-width\": `${U.value}px` })\n        }, [\n          w.$slots[\"left-sidebar\"] ? (T(), K(\"div\", Wr, [\n            ie(w.$slots, \"left-sidebar\", Ne(Qe(g.value)))\n          ])) : Z(\"\", !0),\n          w.presetDates.length ? (T(), K(\"div\", {\n            key: 1,\n            class: we({ \"dp--preset-dates-collapsed\": e.collapse, \"dp--preset-dates\": !0 })\n          }, [\n            (T(!0), K(be, null, Re(w.presetDates, (fe, vt) => (T(), K(be, { key: vt }, [\n              fe.slot ? ie(w.$slots, fe.slot, {\n                key: 0,\n                presetDate: r,\n                label: fe.label,\n                value: fe.value\n              }) : (T(), K(\"button\", {\n                key: 1,\n                type: \"button\",\n                style: tt(fe.style || {}),\n                class: we([\"dp__btn dp--preset-range\", { \"dp--preset-range-collapsed\": e.collapse }]),\n                \"data-test\": fe.testId ?? void 0,\n                onClick: Wt((ot) => r(fe.value, fe.noTz), [\"prevent\"]),\n                onKeydown: (ot) => o(Ke)(ot, () => r(fe.value, fe.noTz), !0)\n              }, Ue(fe.label), 47, jr))\n            ], 64))), 128))\n          ], 2)) : Z(\"\", !0),\n          ye(\"div\", {\n            ref_key: \"calendarWrapperRef\",\n            ref: E,\n            class: \"dp__instance_calendar\",\n            role: \"document\"\n          }, [\n            (T(), $e(ia(y.value), Ee({\n              ref_key: \"dynCmpRef\",\n              ref: P\n            }, d.value, {\n              \"flow-step\": o(x),\n              onMount: o(q),\n              onUpdateFlowStep: o(Y),\n              onResetFlow: o(de),\n              onFocusMenu: te,\n              onSelectDate: N[0] || (N[0] = (fe) => w.$emit(\"select-date\")),\n              onDateUpdate: N[1] || (N[1] = (fe) => w.$emit(\"date-update\", fe)),\n              onTooltipOpen: N[2] || (N[2] = (fe) => w.$emit(\"tooltip-open\", fe)),\n              onTooltipClose: N[3] || (N[3] = (fe) => w.$emit(\"tooltip-close\", fe)),\n              onAutoApply: N[4] || (N[4] = (fe) => w.$emit(\"auto-apply\", fe)),\n              onRangeStart: N[5] || (N[5] = (fe) => w.$emit(\"range-start\", fe)),\n              onRangeEnd: N[6] || (N[6] = (fe) => w.$emit(\"range-end\", fe)),\n              onInvalidFixedRange: N[7] || (N[7] = (fe) => w.$emit(\"invalid-fixed-range\", fe)),\n              onTimeUpdate: N[8] || (N[8] = (fe) => w.$emit(\"time-update\")),\n              onAmPmChange: N[9] || (N[9] = (fe) => w.$emit(\"am-pm-change\", fe)),\n              onTimePickerOpen: N[10] || (N[10] = (fe) => w.$emit(\"time-picker-open\", fe)),\n              onTimePickerClose: u,\n              onRecalculatePosition: X,\n              onUpdateMonthYear: N[11] || (N[11] = (fe) => w.$emit(\"update-month-year\", fe)),\n              onAutoApplyInvalid: N[12] || (N[12] = (fe) => w.$emit(\"auto-apply-invalid\", fe)),\n              onInvalidDate: N[13] || (N[13] = (fe) => w.$emit(\"invalid-date\", fe)),\n              onOverlayToggle: N[14] || (N[14] = (fe) => w.$emit(\"overlay-toggle\", fe)),\n              \"onUpdate:internalModelValue\": N[15] || (N[15] = (fe) => w.$emit(\"update:internal-model-value\", fe))\n            }), Ve({ _: 2 }, [\n              Re(p.value, (fe, vt) => ({\n                name: fe,\n                fn: ke((ot) => [\n                  ie(w.$slots, fe, Ne(Qe({ ...ot })))\n                ])\n              }))\n            ]), 1040, [\"flow-step\", \"onMount\", \"onUpdateFlowStep\", \"onResetFlow\"]))\n          ], 512),\n          w.$slots[\"right-sidebar\"] ? (T(), K(\"div\", Kr, [\n            ie(w.$slots, \"right-sidebar\", Ne(Qe(g.value)))\n          ])) : Z(\"\", !0),\n          w.$slots[\"action-extra\"] ? (T(), K(\"div\", Gr, [\n            w.$slots[\"action-extra\"] ? ie(w.$slots, \"action-extra\", {\n              key: 0,\n              selectCurrentDate: ge\n            }) : Z(\"\", !0)\n          ])) : Z(\"\", !0)\n        ], 6),\n        !w.autoApply || o(C).keepActionRow ? (T(), $e(Jl, Ee({\n          key: 3,\n          \"menu-mount\": B.value\n        }, d.value, {\n          \"calendar-width\": U.value,\n          onClosePicker: N[16] || (N[16] = (fe) => w.$emit(\"close-picker\")),\n          onSelectDate: N[17] || (N[17] = (fe) => w.$emit(\"select-date\")),\n          onInvalidSelect: N[18] || (N[18] = (fe) => w.$emit(\"invalid-select\")),\n          onSelectNow: ge\n        }), Ve({ _: 2 }, [\n          Re(o(A), (fe, vt) => ({\n            name: fe,\n            fn: ke((ot) => [\n              ie(w.$slots, fe, Ne(Qe({ ...ot })))\n            ])\n          }))\n        ]), 1040, [\"menu-mount\", \"calendar-width\"])) : Z(\"\", !0)\n      ], 46, Hr);\n    };\n  }\n});\nvar Ct = /* @__PURE__ */ ((e) => (e.center = \"center\", e.left = \"left\", e.right = \"right\", e))(Ct || {});\nconst Qr = ({\n  menuRef: e,\n  menuRefInner: t,\n  inputRef: l,\n  pickerWrapperRef: a,\n  inline: n,\n  emit: i,\n  props: d,\n  slots: b\n}) => {\n  const { defaultedConfig: c } = Ce(d), L = ne({}), v = ne(!1), _ = ne({\n    top: \"0\",\n    left: \"0\"\n  }), h = ne(!1), C = Vt(d, \"teleportCenter\");\n  at(C, () => {\n    _.value = JSON.parse(JSON.stringify({})), ae();\n  });\n  const H = (g) => {\n    if (d.teleport) {\n      const X = g.getBoundingClientRect();\n      return {\n        left: X.left + window.scrollX,\n        top: X.top + window.scrollY\n      };\n    }\n    return { top: 0, left: 0 };\n  }, E = (g, X) => {\n    _.value.left = `${g + X - L.value.width}px`;\n  }, U = (g) => {\n    _.value.left = `${g}px`;\n  }, f = (g, X) => {\n    d.position === Ct.left && U(g), d.position === Ct.right && E(g, X), d.position === Ct.center && (_.value.left = `${g + X / 2 - L.value.width / 2}px`);\n  }, B = (g) => {\n    const { width: X, height: A } = g.getBoundingClientRect(), { top: p, left: se } = d.altPosition ? d.altPosition(g) : H(g);\n    return { top: +p, left: +se, width: X, height: A };\n  }, P = () => {\n    _.value.left = \"50%\", _.value.top = \"50%\", _.value.transform = \"translate(-50%, -50%)\", _.value.position = \"fixed\", delete _.value.opacity;\n  }, Q = () => {\n    const g = Ie(l), { top: X, left: A, transform: p } = d.altPosition(g);\n    _.value = { top: `${X}px`, left: `${A}px`, transform: p ?? \"\" };\n  }, ae = (g = !0) => {\n    var X;\n    if (!n.value.enabled) {\n      if (C.value) return P();\n      if (d.altPosition !== null) return Q();\n      if (g) {\n        const A = d.teleport ? (X = t.value) == null ? void 0 : X.$el : e.value;\n        A && (L.value = A.getBoundingClientRect()), i(\"recalculate-position\");\n      }\n      return de();\n    }\n  }, oe = ({ inputEl: g, left: X, width: A }) => {\n    window.screen.width > 768 && !v.value && f(X, A), x(g);\n  }, ee = (g) => {\n    const { top: X, left: A, height: p, width: se } = B(g);\n    _.value.top = `${p + X + +d.offset}px`, h.value = !1, v.value || (_.value.left = `${A + se / 2 - L.value.width / 2}px`), oe({ inputEl: g, left: A, width: se });\n  }, S = (g) => {\n    const { top: X, left: A, width: p } = B(g);\n    _.value.top = `${X - +d.offset - L.value.height}px`, h.value = !0, oe({ inputEl: g, left: A, width: p });\n  }, x = (g) => {\n    if (d.autoPosition) {\n      const { left: X, width: A } = B(g), { left: p, right: se } = L.value;\n      if (!v.value) {\n        if (Math.abs(p) !== Math.abs(se)) {\n          if (p <= 0)\n            return v.value = !0, U(X);\n          if (se >= document.documentElement.clientWidth)\n            return v.value = !0, E(X, A);\n        }\n        return f(X, A);\n      }\n    }\n  }, Y = () => {\n    const g = Ie(l);\n    if (g) {\n      const { height: X } = L.value, { top: A, height: p } = g.getBoundingClientRect(), I = window.innerHeight - A - p, D = A;\n      return X <= I ? Mt.bottom : X > I && X <= D ? Mt.top : I >= D ? Mt.bottom : Mt.top;\n    }\n    return Mt.bottom;\n  }, q = (g) => Y() === Mt.bottom ? ee(g) : S(g), de = () => {\n    const g = Ie(l);\n    if (g)\n      return d.autoPosition ? q(g) : ee(g);\n  }, ve = function(g) {\n    if (g) {\n      const X = g.scrollHeight > g.clientHeight, p = window.getComputedStyle(g).overflowY.indexOf(\"hidden\") !== -1;\n      return X && !p;\n    }\n    return !0;\n  }, y = function(g) {\n    return !g || g === document.body || g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? window : ve(g) ? g : y(\n      g.assignedSlot && c.value.shadowDom ? g.assignedSlot.parentNode : g.parentNode\n    );\n  }, z = (g) => {\n    if (g)\n      switch (d.position) {\n        case Ct.left:\n          return { left: 0, transform: \"translateX(0)\" };\n        case Ct.right:\n          return { left: `${g.width}px`, transform: \"translateX(-100%)\" };\n        default:\n          return { left: `${g.width / 2}px`, transform: \"translateX(-50%)\" };\n      }\n    return {};\n  };\n  return {\n    openOnTop: h,\n    menuStyle: _,\n    xCorrect: v,\n    setMenuPosition: ae,\n    getScrollableParent: y,\n    shadowRender: (g, X) => {\n      var s, M, F;\n      const A = document.createElement(\"div\"), p = (s = Ie(l)) == null ? void 0 : s.getBoundingClientRect();\n      A.setAttribute(\"id\", \"dp--temp-container\");\n      const se = (M = a.value) != null && M.clientWidth ? a.value : document.body;\n      se.append(A);\n      const I = z(p), D = c.value.shadowDom ? Object.keys(b).filter(\n        (u) => [\"right-sidebar\", \"left-sidebar\", \"top-extra\", \"action-extra\"].includes(u)\n      ) : Object.keys(b), V = Qn(\n        g,\n        {\n          ...X,\n          shadow: !0,\n          style: { opacity: 0, position: \"absolute\", ...I }\n        },\n        Object.fromEntries(D.map((u) => [u, b[u]]))\n      );\n      xa(V, A), L.value = (F = V.el) == null ? void 0 : F.getBoundingClientRect(), xa(null, A), se.removeChild(A);\n    }\n  };\n}, mt = [\n  { name: \"clock-icon\", use: [\"time\", \"calendar\", \"shared\"] },\n  { name: \"arrow-left\", use: [\"month-year\", \"calendar\", \"shared\", \"year-mode\"] },\n  { name: \"arrow-right\", use: [\"month-year\", \"calendar\", \"shared\", \"year-mode\"] },\n  { name: \"arrow-up\", use: [\"time\", \"calendar\", \"month-year\", \"shared\"] },\n  { name: \"arrow-down\", use: [\"time\", \"calendar\", \"month-year\", \"shared\"] },\n  { name: \"calendar-icon\", use: [\"month-year\", \"time\", \"calendar\", \"shared\", \"year-mode\"] },\n  { name: \"day\", use: [\"calendar\", \"shared\"] },\n  { name: \"month-overlay-value\", use: [\"calendar\", \"month-year\", \"shared\"] },\n  { name: \"year-overlay-value\", use: [\"calendar\", \"month-year\", \"shared\", \"year-mode\"] },\n  { name: \"year-overlay\", use: [\"month-year\", \"shared\"] },\n  { name: \"month-overlay\", use: [\"month-year\", \"shared\"] },\n  { name: \"month-overlay-header\", use: [\"month-year\", \"shared\"] },\n  { name: \"year-overlay-header\", use: [\"month-year\", \"shared\"] },\n  { name: \"hours-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"hours-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"minutes-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"minutes-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"seconds-overlay-value\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"seconds-overlay-header\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"hours\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"minutes\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"month\", use: [\"calendar\", \"month-year\", \"shared\"] },\n  { name: \"year\", use: [\"calendar\", \"month-year\", \"shared\", \"year-mode\"] },\n  { name: \"action-buttons\", use: [\"action\"] },\n  { name: \"action-preview\", use: [\"action\"] },\n  { name: \"calendar-header\", use: [\"calendar\", \"shared\"] },\n  { name: \"marker-tooltip\", use: [\"calendar\", \"shared\"] },\n  { name: \"action-extra\", use: [\"menu\"] },\n  { name: \"time-picker-overlay\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"am-pm-button\", use: [\"calendar\", \"time\", \"shared\"] },\n  { name: \"left-sidebar\", use: [\"menu\"] },\n  { name: \"right-sidebar\", use: [\"menu\"] },\n  { name: \"month-year\", use: [\"month-year\", \"shared\"] },\n  { name: \"time-picker\", use: [\"menu\", \"shared\"] },\n  { name: \"action-row\", use: [\"action\"] },\n  { name: \"marker\", use: [\"calendar\", \"shared\"] },\n  { name: \"quarter\", use: [\"shared\"] },\n  { name: \"top-extra\", use: [\"shared\", \"month-year\"] },\n  { name: \"tp-inline-arrow-up\", use: [\"shared\", \"time\"] },\n  { name: \"tp-inline-arrow-down\", use: [\"shared\", \"time\"] },\n  { name: \"menu-header\", use: [\"menu\"] }\n], qr = [{ name: \"trigger\" }, { name: \"input-icon\" }, { name: \"clear-icon\" }, { name: \"dp-input\" }], Xr = {\n  all: () => mt,\n  monthYear: () => mt.filter((e) => e.use.includes(\"month-year\")),\n  input: () => qr,\n  timePicker: () => mt.filter((e) => e.use.includes(\"time\")),\n  action: () => mt.filter((e) => e.use.includes(\"action\")),\n  calendar: () => mt.filter((e) => e.use.includes(\"calendar\")),\n  menu: () => mt.filter((e) => e.use.includes(\"menu\")),\n  shared: () => mt.filter((e) => e.use.includes(\"shared\")),\n  yearMode: () => mt.filter((e) => e.use.includes(\"year-mode\"))\n}, Je = (e, t, l) => {\n  const a = [];\n  return Xr[t]().forEach((n) => {\n    e[n.name] && a.push(n.name);\n  }), l != null && l.length && l.forEach((n) => {\n    n.slot && a.push(n.slot);\n  }), a;\n}, Xt = (e) => {\n  const t = J(() => (a) => e.value ? a ? e.value.open : e.value.close : \"\"), l = J(() => (a) => e.value ? a ? e.value.menuAppearTop : e.value.menuAppearBottom : \"\");\n  return { transitionName: t, showTransition: !!e.value, menuTransition: l };\n}, Jt = (e, t, l) => {\n  const { defaultedRange: a, defaultedTz: n } = Ce(e), i = G(qe(G(), n.value.timezone)), d = ne([{ month: De(i), year: pe(i) }]), b = (h) => {\n    const C = {\n      hours: ft(i),\n      minutes: ht(i),\n      seconds: 0\n    };\n    return a.value.enabled ? [C[h], C[h]] : C[h];\n  }, c = Qt({\n    hours: b(\"hours\"),\n    minutes: b(\"minutes\"),\n    seconds: b(\"seconds\")\n  });\n  at(\n    a,\n    (h, C) => {\n      h.enabled !== C.enabled && (c.hours = b(\"hours\"), c.minutes = b(\"minutes\"), c.seconds = b(\"seconds\"));\n    },\n    { deep: !0 }\n  );\n  const L = J({\n    get: () => e.internalModelValue,\n    set: (h) => {\n      !e.readonly && !e.disabled && t(\"update:internal-model-value\", h);\n    }\n  }), v = J(\n    () => (h) => d.value[h] ? d.value[h].month : 0\n  ), _ = J(\n    () => (h) => d.value[h] ? d.value[h].year : 0\n  );\n  return at(\n    L,\n    (h, C) => {\n      l && JSON.stringify(h ?? {}) !== JSON.stringify(C ?? {}) && l();\n    },\n    { deep: !0 }\n  ), {\n    calendars: d,\n    time: c,\n    modelValue: L,\n    month: v,\n    year: _,\n    today: i\n  };\n}, Jr = (e, t) => {\n  const {\n    defaultedMultiCalendars: l,\n    defaultedMultiDates: a,\n    defaultedUI: n,\n    defaultedHighlight: i,\n    defaultedTz: d,\n    propDates: b,\n    defaultedRange: c\n  } = Ce(t), { isDisabled: L } = kt(t), v = ne(null), _ = ne(qe(/* @__PURE__ */ new Date(), d.value.timezone)), h = (s) => {\n    !s.current && t.hideOffsetDates || (v.value = s.value);\n  }, C = () => {\n    v.value = null;\n  }, H = (s) => Array.isArray(e.value) && c.value.enabled && e.value[0] && v.value ? s ? Be(v.value, e.value[0]) : Oe(v.value, e.value[0]) : !0, E = (s, M) => {\n    const F = () => e.value ? M ? e.value[0] || null : e.value[1] : null, u = e.value && Array.isArray(e.value) ? F() : null;\n    return Me(G(s.value), u);\n  }, U = (s) => {\n    const M = Array.isArray(e.value) ? e.value[0] : null;\n    return s ? !Oe(v.value ?? null, M) : !0;\n  }, f = (s, M = !0) => (c.value.enabled || t.weekPicker) && Array.isArray(e.value) && e.value.length === 2 ? t.hideOffsetDates && !s.current ? !1 : Me(G(s.value), e.value[M ? 0 : 1]) : c.value.enabled ? E(s, M) && U(M) || Me(s.value, Array.isArray(e.value) ? e.value[0] : null) && H(M) : !1, B = (s, M) => {\n    if (Array.isArray(e.value) && e.value[0] && e.value.length === 1) {\n      const F = Me(s.value, v.value);\n      return M ? Be(e.value[0], s.value) && F : Oe(e.value[0], s.value) && F;\n    }\n    return !1;\n  }, P = (s) => !e.value || t.hideOffsetDates && !s.current ? !1 : c.value.enabled ? t.modelAuto && Array.isArray(e.value) ? Me(s.value, e.value[0] ? e.value[0] : _.value) : !1 : a.value.enabled && Array.isArray(e.value) ? e.value.some((M) => Me(M, s.value)) : Me(s.value, e.value ? e.value : _.value), Q = (s) => {\n    if (c.value.autoRange || t.weekPicker) {\n      if (v.value) {\n        if (t.hideOffsetDates && !s.current) return !1;\n        const M = $t(v.value, +c.value.autoRange), F = it(G(v.value), t.weekStart);\n        return t.weekPicker ? Me(F[1], G(s.value)) : Me(M, G(s.value));\n      }\n      return !1;\n    }\n    return !1;\n  }, ae = (s) => {\n    if (c.value.autoRange || t.weekPicker) {\n      if (v.value) {\n        const M = $t(v.value, +c.value.autoRange);\n        if (t.hideOffsetDates && !s.current) return !1;\n        const F = it(G(v.value), t.weekStart);\n        return t.weekPicker ? Be(s.value, F[0]) && Oe(s.value, F[1]) : Be(s.value, v.value) && Oe(s.value, M);\n      }\n      return !1;\n    }\n    return !1;\n  }, oe = (s) => {\n    if (c.value.autoRange || t.weekPicker) {\n      if (v.value) {\n        if (t.hideOffsetDates && !s.current) return !1;\n        const M = it(G(v.value), t.weekStart);\n        return t.weekPicker ? Me(M[0], s.value) : Me(v.value, s.value);\n      }\n      return !1;\n    }\n    return !1;\n  }, ee = (s) => da(e.value, v.value, s.value), S = () => t.modelAuto && Array.isArray(t.internalModelValue) ? !!t.internalModelValue[0] : !1, x = () => t.modelAuto ? An(t.internalModelValue) : !0, Y = (s) => {\n    if (t.weekPicker) return !1;\n    const M = c.value.enabled ? !f(s) && !f(s, !1) : !0;\n    return !L(s.value) && !P(s) && !(!s.current && t.hideOffsetDates) && M;\n  }, q = (s) => c.value.enabled ? t.modelAuto ? S() && P(s) : !1 : P(s), de = (s) => i.value ? Dl(s.value, b.value.highlight) : !1, ve = (s) => {\n    const M = L(s.value);\n    return M && (typeof i.value == \"function\" ? !i.value(s.value, M) : !i.value.options.highlightDisabled);\n  }, y = (s) => {\n    var M;\n    return typeof i.value == \"function\" ? i.value(s.value) : (M = i.value.weekdays) == null ? void 0 : M.includes(s.value.getDay());\n  }, z = (s) => (c.value.enabled || t.weekPicker) && (!(l.value.count > 0) || s.current) && x() && !(!s.current && t.hideOffsetDates) && !P(s) ? ee(s) : !1, te = (s) => {\n    const { isRangeStart: M, isRangeEnd: F } = p(s), u = c.value.enabled ? M || F : !1;\n    return {\n      dp__cell_offset: !s.current,\n      dp__pointer: !t.disabled && !(!s.current && t.hideOffsetDates) && !L(s.value),\n      dp__cell_disabled: L(s.value),\n      dp__cell_highlight: !ve(s) && (de(s) || y(s)) && !q(s) && !u && !oe(s) && !(z(s) && t.weekPicker) && !F,\n      dp__cell_highlight_active: !ve(s) && (de(s) || y(s)) && q(s),\n      dp__today: !t.noToday && Me(s.value, _.value) && s.current,\n      \"dp--past\": Oe(s.value, _.value),\n      \"dp--future\": Be(s.value, _.value)\n    };\n  }, g = (s) => ({\n    dp__active_date: q(s),\n    dp__date_hover: Y(s)\n  }), X = (s) => {\n    if (e.value && !Array.isArray(e.value)) {\n      const M = it(e.value, t.weekStart);\n      return {\n        ...I(s),\n        dp__range_start: Me(M[0], s.value),\n        dp__range_end: Me(M[1], s.value),\n        dp__range_between_week: Be(s.value, M[0]) && Oe(s.value, M[1])\n      };\n    }\n    return {\n      ...I(s)\n    };\n  }, A = (s) => {\n    if (e.value && Array.isArray(e.value)) {\n      const M = it(e.value[0], t.weekStart), F = e.value[1] ? it(e.value[1], t.weekStart) : [];\n      return {\n        ...I(s),\n        dp__range_start: Me(M[0], s.value) || Me(F[0], s.value),\n        dp__range_end: Me(M[1], s.value) || Me(F[1], s.value),\n        dp__range_between_week: Be(s.value, M[0]) && Oe(s.value, M[1]) || Be(s.value, F[0]) && Oe(s.value, F[1]),\n        dp__range_between: Be(s.value, M[1]) && Oe(s.value, F[0])\n      };\n    }\n    return {\n      ...I(s)\n    };\n  }, p = (s) => {\n    const M = l.value.count > 0 ? s.current && f(s) && x() : f(s) && x(), F = l.value.count > 0 ? s.current && f(s, !1) && x() : f(s, !1) && x();\n    return { isRangeStart: M, isRangeEnd: F };\n  }, se = (s) => {\n    const { isRangeStart: M, isRangeEnd: F } = p(s);\n    return {\n      dp__range_start: M,\n      dp__range_end: F,\n      dp__range_between: z(s),\n      dp__date_hover: Me(s.value, v.value) && !M && !F && !t.weekPicker,\n      dp__date_hover_start: B(s, !0),\n      dp__date_hover_end: B(s, !1)\n    };\n  }, I = (s) => ({\n    ...se(s),\n    dp__cell_auto_range: ae(s),\n    dp__cell_auto_range_start: oe(s),\n    dp__cell_auto_range_end: Q(s)\n  }), D = (s) => c.value.enabled ? c.value.autoRange ? I(s) : t.modelAuto ? { ...g(s), ...se(s) } : t.weekPicker ? A(s) : se(s) : t.weekPicker ? X(s) : g(s);\n  return {\n    setHoverDate: h,\n    clearHoverDate: C,\n    getDayClassData: (s) => t.hideOffsetDates && !s.current ? {} : {\n      ...te(s),\n      ...D(s),\n      [t.dayClass ? t.dayClass(s.value, t.internalModelValue) : \"\"]: !0,\n      ...n.value.calendarCell ?? {}\n    }\n  };\n}, kt = (e) => {\n  const { defaultedFilters: t, defaultedRange: l, propDates: a, defaultedMultiDates: n } = Ce(e), i = (y) => a.value.disabledDates ? typeof a.value.disabledDates == \"function\" ? a.value.disabledDates(G(y)) : !!sa(y, a.value.disabledDates) : !1, d = (y) => a.value.maxDate ? e.yearPicker ? pe(y) > pe(a.value.maxDate) : Be(y, a.value.maxDate) : !1, b = (y) => a.value.minDate ? e.yearPicker ? pe(y) < pe(a.value.minDate) : Oe(y, a.value.minDate) : !1, c = (y) => {\n    const z = d(y), te = b(y), g = i(y), A = t.value.months.map((V) => +V).includes(De(y)), p = e.disabledWeekDays.length ? e.disabledWeekDays.some((V) => +V === dl(y)) : !1, se = C(y), I = pe(y), D = I < +e.yearRange[0] || I > +e.yearRange[1];\n    return !(z || te || g || A || D || p || se);\n  }, L = (y, z) => Oe(...pt(a.value.minDate, y, z)) || Me(...pt(a.value.minDate, y, z)), v = (y, z) => Be(...pt(a.value.maxDate, y, z)) || Me(...pt(a.value.maxDate, y, z)), _ = (y, z, te) => {\n    let g = !1;\n    return a.value.maxDate && te && v(y, z) && (g = !0), a.value.minDate && !te && L(y, z) && (g = !0), g;\n  }, h = (y, z, te, g) => {\n    let X = !1;\n    return g && (a.value.minDate || a.value.maxDate) ? a.value.minDate && a.value.maxDate ? X = _(y, z, te) : (a.value.minDate && L(y, z) || a.value.maxDate && v(y, z)) && (X = !0) : X = !0, X;\n  }, C = (y) => Array.isArray(a.value.allowedDates) && !a.value.allowedDates.length ? !0 : a.value.allowedDates ? !sa(y, a.value.allowedDates) : !1, H = (y) => !c(y), E = (y) => l.value.noDisabledRange ? !pn({ start: y[0], end: y[1] }).some((te) => H(te)) : !0, U = (y) => {\n    if (y) {\n      const z = pe(y);\n      return z >= +e.yearRange[0] && z <= e.yearRange[1];\n    }\n    return !0;\n  }, f = (y, z) => !!(Array.isArray(y) && y[z] && (l.value.maxRange || l.value.minRange) && U(y[z])), B = (y, z, te = 0) => {\n    if (f(z, te) && U(y)) {\n      const g = cl(y, z[te]), X = Cn(z[te], y), A = X.length === 1 ? 0 : X.filter((se) => H(se)).length, p = Math.abs(g) - (l.value.minMaxRawRange ? 0 : A);\n      if (l.value.minRange && l.value.maxRange)\n        return p >= +l.value.minRange && p <= +l.value.maxRange;\n      if (l.value.minRange) return p >= +l.value.minRange;\n      if (l.value.maxRange) return p <= +l.value.maxRange;\n    }\n    return !0;\n  }, P = () => !e.enableTimePicker || e.monthPicker || e.yearPicker || e.ignoreTimeValidation, Q = (y) => Array.isArray(y) ? [y[0] ? Pa(y[0]) : null, y[1] ? Pa(y[1]) : null] : Pa(y), ae = (y, z, te) => y.find(\n    (g) => +g.hours === ft(z) && g.minutes === \"*\" ? !0 : +g.minutes === ht(z) && +g.hours === ft(z)\n  ) && te, oe = (y, z, te) => {\n    const [g, X] = y, [A, p] = z;\n    return !ae(g, A, te) && !ae(X, p, te) && te;\n  }, ee = (y, z) => {\n    const te = Array.isArray(z) ? z : [z];\n    return Array.isArray(e.disabledTimes) ? Array.isArray(e.disabledTimes[0]) ? oe(e.disabledTimes, te, y) : !te.some((g) => ae(e.disabledTimes, g, y)) : y;\n  }, S = (y, z) => {\n    const te = Array.isArray(z) ? [St(z[0]), z[1] ? St(z[1]) : void 0] : St(z), g = !e.disabledTimes(te);\n    return y && g;\n  }, x = (y, z) => e.disabledTimes ? Array.isArray(e.disabledTimes) ? ee(z, y) : S(z, y) : z, Y = (y) => {\n    let z = !0;\n    if (!y || P()) return !0;\n    const te = !a.value.minDate && !a.value.maxDate ? Q(y) : y;\n    return (e.maxTime || a.value.maxDate) && (z = dn(\n      e.maxTime,\n      a.value.maxDate,\n      \"max\",\n      Ye(te),\n      z\n    )), (e.minTime || a.value.minDate) && (z = dn(\n      e.minTime,\n      a.value.minDate,\n      \"min\",\n      Ye(te),\n      z\n    )), x(y, z);\n  }, q = (y) => {\n    if (!e.monthPicker) return !0;\n    let z = !0;\n    const te = G(lt(y));\n    if (a.value.minDate && a.value.maxDate) {\n      const g = G(lt(a.value.minDate)), X = G(lt(a.value.maxDate));\n      return Be(te, g) && Oe(te, X) || Me(te, g) || Me(te, X);\n    }\n    if (a.value.minDate) {\n      const g = G(lt(a.value.minDate));\n      z = Be(te, g) || Me(te, g);\n    }\n    if (a.value.maxDate) {\n      const g = G(lt(a.value.maxDate));\n      z = Oe(te, g) || Me(te, g);\n    }\n    return z;\n  }, de = J(() => (y) => !e.enableTimePicker || e.ignoreTimeValidation ? !0 : Y(y)), ve = J(() => (y) => e.monthPicker ? Array.isArray(y) && (l.value.enabled || n.value.enabled) ? !y.filter((te) => !q(te)).length : q(y) : !0);\n  return {\n    isDisabled: H,\n    validateDate: c,\n    validateMonthYearInRange: h,\n    isDateRangeAllowed: E,\n    checkMinMaxRange: B,\n    isValidTime: Y,\n    isTimeValid: de,\n    isMonthValid: ve\n  };\n}, ma = () => {\n  const e = J(() => (a, n) => a == null ? void 0 : a.includes(n)), t = J(() => (a, n) => a.count ? a.solo ? !0 : n === 0 : !0), l = J(() => (a, n) => a.count ? a.solo ? !0 : n === a.count - 1 : !0);\n  return { hideNavigationButtons: e, showLeftIcon: t, showRightIcon: l };\n}, Zr = (e, t, l) => {\n  const a = ne(0), n = Qt({\n    [Tt.timePicker]: !e.enableTimePicker || e.timePicker || e.monthPicker,\n    [Tt.calendar]: !1,\n    [Tt.header]: !1\n  }), i = J(() => e.monthPicker || e.timePicker), d = (_) => {\n    var h;\n    if ((h = e.flow) != null && h.length) {\n      if (!_ && i.value) return v();\n      n[_] = !0, Object.keys(n).filter((C) => !n[C]).length || v();\n    }\n  }, b = () => {\n    var _, h;\n    (_ = e.flow) != null && _.length && a.value !== -1 && (a.value += 1, t(\"flow-step\", a.value), v()), ((h = e.flow) == null ? void 0 : h.length) === a.value && xe().then(() => c());\n  }, c = () => {\n    a.value = -1;\n  }, L = (_, h, ...C) => {\n    var H, E;\n    e.flow[a.value] === _ && l.value && ((E = (H = l.value)[h]) == null || E.call(H, ...C));\n  }, v = (_ = 0) => {\n    _ && (a.value += _), L(He.month, \"toggleMonthPicker\", !0), L(He.year, \"toggleYearPicker\", !0), L(He.calendar, \"toggleTimePicker\", !1, !0), L(He.time, \"toggleTimePicker\", !0, !0);\n    const h = e.flow[a.value];\n    (h === He.hours || h === He.minutes || h === He.seconds) && L(h, \"toggleTimePicker\", !0, !0, h);\n  };\n  return { childMount: d, updateFlowStep: b, resetFlow: c, handleFlow: v, flowStep: a };\n}, xr = {\n  key: 1,\n  class: \"dp__input_wrap\"\n}, eo = [\"id\", \"name\", \"inputmode\", \"placeholder\", \"disabled\", \"readonly\", \"required\", \"value\", \"autocomplete\", \"aria-label\", \"aria-disabled\", \"aria-invalid\"], to = {\n  key: 2,\n  class: \"dp--clear-btn\"\n}, ao = [\"aria-label\"], no = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"DatepickerInput\",\n  props: {\n    isMenuOpen: { type: Boolean, default: !1 },\n    inputValue: { type: String, default: \"\" },\n    ...ca\n  },\n  emits: [\n    \"clear\",\n    \"open\",\n    \"update:input-value\",\n    \"set-input-date\",\n    \"close\",\n    \"select-date\",\n    \"set-empty-date\",\n    \"toggle\",\n    \"focus-prev\",\n    \"focus\",\n    \"blur\",\n    \"real-blur\",\n    \"text-input\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, {\n      defaultedTextInput: i,\n      defaultedAriaLabels: d,\n      defaultedInline: b,\n      defaultedConfig: c,\n      defaultedRange: L,\n      defaultedMultiDates: v,\n      defaultedUI: _,\n      getDefaultPattern: h,\n      getDefaultStartTime: C\n    } = Ce(n), { checkMinMaxRange: H } = kt(n), E = ne(), U = ne(null), f = ne(!1), B = ne(!1), P = J(\n      () => ({\n        dp__pointer: !n.disabled && !n.readonly && !i.value.enabled,\n        dp__disabled: n.disabled,\n        dp__input_readonly: !i.value.enabled,\n        dp__input: !0,\n        dp__input_icon_pad: !n.hideInputIcon,\n        dp__input_valid: typeof n.state == \"boolean\" ? n.state : !1,\n        dp__input_invalid: typeof n.state == \"boolean\" ? !n.state : !1,\n        dp__input_focus: f.value || n.isMenuOpen,\n        dp__input_reg: !i.value.enabled,\n        ..._.value.input ?? {}\n      })\n    ), Q = () => {\n      a(\"set-input-date\", null), n.clearable && n.autoApply && (a(\"set-empty-date\"), E.value = null);\n    }, ae = (p) => {\n      const se = C();\n      return Ml(\n        p,\n        i.value.format ?? h(),\n        se ?? On({}, n.enableSeconds),\n        n.inputValue,\n        B.value,\n        n.formatLocale\n      );\n    }, oe = (p) => {\n      const { rangeSeparator: se } = i.value, [I, D] = p.split(`${se}`);\n      if (I) {\n        const V = ae(I.trim()), s = D ? ae(D.trim()) : null;\n        if (_t(V, s)) return;\n        const M = V && s ? [V, s] : [V];\n        H(s, M, 0) && (E.value = V ? M : null);\n      }\n    }, ee = () => {\n      B.value = !0;\n    }, S = (p) => {\n      if (L.value.enabled)\n        oe(p);\n      else if (v.value.enabled) {\n        const se = p.split(\";\");\n        E.value = se.map((I) => ae(I.trim())).filter((I) => I);\n      } else\n        E.value = ae(p);\n    }, x = (p) => {\n      var I;\n      const se = typeof p == \"string\" ? p : (I = p.target) == null ? void 0 : I.value;\n      se !== \"\" ? (i.value.openMenu && !n.isMenuOpen && a(\"open\"), S(se), a(\"set-input-date\", E.value)) : Q(), B.value = !1, a(\"update:input-value\", se), a(\"text-input\", p, E.value);\n    }, Y = (p) => {\n      i.value.enabled ? (S(p.target.value), i.value.enterSubmit && Fa(E.value) && n.inputValue !== \"\" ? (a(\"set-input-date\", E.value, !0), E.value = null) : i.value.enterSubmit && n.inputValue === \"\" && (E.value = null, a(\"clear\"))) : ve(p);\n    }, q = (p, se) => {\n      i.value.enabled && i.value.tabSubmit && !se && S(p.target.value), i.value.tabSubmit && Fa(E.value) && n.inputValue !== \"\" ? (a(\"set-input-date\", E.value, !0, !0), E.value = null) : i.value.tabSubmit && n.inputValue === \"\" && (E.value = null, a(\"clear\", !0));\n    }, de = () => {\n      f.value = !0, a(\"focus\"), xe().then(() => {\n        var p;\n        i.value.enabled && i.value.selectOnFocus && ((p = U.value) == null || p.select());\n      });\n    }, ve = (p) => {\n      if (yt(p, c.value, !0), i.value.enabled && i.value.openMenu && !b.value.input) {\n        if (i.value.openMenu === \"open\" && !n.isMenuOpen) return a(\"open\");\n        if (i.value.openMenu === \"toggle\") return a(\"toggle\");\n      } else i.value.enabled || a(\"toggle\");\n    }, y = () => {\n      a(\"real-blur\"), f.value = !1, (!n.isMenuOpen || b.value.enabled && b.value.input) && a(\"blur\"), n.autoApply && i.value.enabled && E.value && !n.isMenuOpen && (a(\"set-input-date\", E.value), a(\"select-date\"), E.value = null);\n    }, z = (p) => {\n      yt(p, c.value, !0), a(\"clear\");\n    }, te = (p) => {\n      if (p.key === \"Tab\" && q(p), p.key === \"Enter\" && Y(p), !i.value.enabled) {\n        if (p.code === \"Tab\") return;\n        p.preventDefault();\n      }\n    }, g = () => {\n      var p;\n      (p = U.value) == null || p.focus({ preventScroll: !0 });\n    }, X = (p) => {\n      E.value = p;\n    }, A = (p) => {\n      p.key === Pe.tab && q(p, !0);\n    };\n    return t({\n      focusInput: g,\n      setParsedDate: X\n    }), (p, se) => {\n      var I, D, V;\n      return T(), K(\"div\", { onClick: ve }, [\n        p.$slots.trigger && !p.$slots[\"dp-input\"] && !o(b).enabled ? ie(p.$slots, \"trigger\", { key: 0 }) : Z(\"\", !0),\n        !p.$slots.trigger && (!o(b).enabled || o(b).input) ? (T(), K(\"div\", xr, [\n          p.$slots[\"dp-input\"] && !p.$slots.trigger && (!o(b).enabled || o(b).enabled && o(b).input) ? ie(p.$slots, \"dp-input\", {\n            key: 0,\n            value: e.inputValue,\n            isMenuOpen: e.isMenuOpen,\n            onInput: x,\n            onEnter: Y,\n            onTab: q,\n            onClear: z,\n            onBlur: y,\n            onKeypress: te,\n            onPaste: ee,\n            onFocus: de,\n            openMenu: () => p.$emit(\"open\"),\n            closeMenu: () => p.$emit(\"close\"),\n            toggleMenu: () => p.$emit(\"toggle\")\n          }) : Z(\"\", !0),\n          p.$slots[\"dp-input\"] ? Z(\"\", !0) : (T(), K(\"input\", {\n            key: 1,\n            id: p.uid ? `dp-input-${p.uid}` : void 0,\n            ref_key: \"inputRef\",\n            ref: U,\n            \"data-test\": \"dp-input\",\n            name: p.name,\n            class: we(P.value),\n            inputmode: o(i).enabled ? \"text\" : \"none\",\n            placeholder: p.placeholder,\n            disabled: p.disabled,\n            readonly: p.readonly,\n            required: p.required,\n            value: e.inputValue,\n            autocomplete: p.autocomplete,\n            \"aria-label\": (I = o(d)) == null ? void 0 : I.input,\n            \"aria-disabled\": p.disabled || void 0,\n            \"aria-invalid\": p.state === !1 ? !0 : void 0,\n            onInput: x,\n            onBlur: y,\n            onFocus: de,\n            onKeypress: te,\n            onKeydown: se[0] || (se[0] = (s) => te(s)),\n            onPaste: ee\n          }, null, 42, eo)),\n          ye(\"div\", {\n            onClick: se[3] || (se[3] = (s) => a(\"toggle\"))\n          }, [\n            p.$slots[\"input-icon\"] && !p.hideInputIcon ? (T(), K(\"span\", {\n              key: 0,\n              class: \"dp__input_icon\",\n              onClick: se[1] || (se[1] = (s) => a(\"toggle\"))\n            }, [\n              ie(p.$slots, \"input-icon\")\n            ])) : Z(\"\", !0),\n            !p.$slots[\"input-icon\"] && !p.hideInputIcon && !p.$slots[\"dp-input\"] ? (T(), $e(o(Et), {\n              key: 1,\n              \"aria-label\": (D = o(d)) == null ? void 0 : D.calendarIcon,\n              class: \"dp__input_icon dp__input_icons\",\n              onClick: se[2] || (se[2] = (s) => a(\"toggle\"))\n            }, null, 8, [\"aria-label\"])) : Z(\"\", !0)\n          ]),\n          p.$slots[\"clear-icon\"] && e.inputValue && p.clearable && !p.disabled && !p.readonly ? (T(), K(\"span\", to, [\n            ie(p.$slots, \"clear-icon\", { clear: z })\n          ])) : Z(\"\", !0),\n          p.clearable && !p.$slots[\"clear-icon\"] && e.inputValue && !p.disabled && !p.readonly ? (T(), K(\"button\", {\n            key: 3,\n            \"aria-label\": (V = o(d)) == null ? void 0 : V.clearInput,\n            class: \"dp--clear-btn\",\n            type: \"button\",\n            onKeydown: se[4] || (se[4] = (s) => o(Ke)(s, () => z(s), !0, A)),\n            onClick: se[5] || (se[5] = Wt((s) => z(s), [\"prevent\"]))\n          }, [\n            Ze(o(Mn), {\n              class: \"dp__input_icons\",\n              \"data-test\": \"clear-icon\"\n            })\n          ], 40, ao)) : Z(\"\", !0)\n        ])) : Z(\"\", !0)\n      ]);\n    };\n  }\n}), lo = typeof window < \"u\" ? window : void 0, Ya = () => {\n}, ro = (e) => qn() ? (Xn(e), !0) : !1, oo = (e, t, l, a) => {\n  if (!e) return Ya;\n  let n = Ya;\n  const i = at(\n    () => o(e),\n    (b) => {\n      n(), b && (b.addEventListener(t, l, a), n = () => {\n        b.removeEventListener(t, l, a), n = Ya;\n      });\n    },\n    { immediate: !0, flush: \"post\" }\n  ), d = () => {\n    i(), n();\n  };\n  return ro(d), d;\n}, so = (e, t, l, a = {}) => {\n  const { window: n = lo, event: i = \"pointerdown\" } = a;\n  return n ? oo(n, i, (b) => {\n    const c = Ie(e), L = Ie(t);\n    !c || !L || c === b.target || b.composedPath().includes(c) || b.composedPath().includes(L) || l(b);\n  }, { passive: !0 }) : void 0;\n}, uo = /* @__PURE__ */ Le({\n  compatConfig: {\n    MODE: 3\n  },\n  __name: \"VueDatePicker\",\n  props: {\n    ...ca\n  },\n  emits: [\n    \"update:model-value\",\n    \"update:model-timezone-value\",\n    \"text-submit\",\n    \"closed\",\n    \"cleared\",\n    \"open\",\n    \"focus\",\n    \"blur\",\n    \"internal-model-change\",\n    \"recalculate-position\",\n    \"flow-step\",\n    \"update-month-year\",\n    \"invalid-select\",\n    \"invalid-fixed-range\",\n    \"tooltip-open\",\n    \"tooltip-close\",\n    \"time-picker-open\",\n    \"time-picker-close\",\n    \"am-pm-change\",\n    \"range-start\",\n    \"range-end\",\n    \"date-update\",\n    \"invalid-date\",\n    \"overlay-toggle\",\n    \"text-input\"\n  ],\n  setup(e, { expose: t, emit: l }) {\n    const a = l, n = e, i = Pt(), d = ne(!1), b = Vt(n, \"modelValue\"), c = Vt(n, \"timezone\"), L = ne(null), v = ne(null), _ = ne(null), h = ne(!1), C = ne(null), H = ne(!1), E = ne(!1), U = ne(!1), f = ne(!1), { setMenuFocused: B, setShiftKey: P } = Nn(), { clearArrowNav: Q } = bt(), { validateDate: ae, isValidTime: oe } = kt(n), {\n      defaultedTransitions: ee,\n      defaultedTextInput: S,\n      defaultedInline: x,\n      defaultedConfig: Y,\n      defaultedRange: q,\n      defaultedMultiDates: de\n    } = Ce(n), { menuTransition: ve, showTransition: y } = Xt(ee);\n    We(() => {\n      s(n.modelValue), xe().then(() => {\n        if (!x.value.enabled) {\n          const m = se(C.value);\n          m == null || m.addEventListener(\"scroll\", O), window == null || window.addEventListener(\"resize\", W);\n        }\n      }), x.value.enabled && (d.value = !0), window == null || window.addEventListener(\"keyup\", ue), window == null || window.addEventListener(\"keydown\", w);\n    }), ua(() => {\n      if (!x.value.enabled) {\n        const m = se(C.value);\n        m == null || m.removeEventListener(\"scroll\", O), window == null || window.removeEventListener(\"resize\", W);\n      }\n      window == null || window.removeEventListener(\"keyup\", ue), window == null || window.removeEventListener(\"keydown\", w);\n    });\n    const z = Je(i, \"all\", n.presetDates), te = Je(i, \"input\");\n    at(\n      [b, c],\n      () => {\n        s(b.value);\n      },\n      { deep: !0 }\n    );\n    const { openOnTop: g, menuStyle: X, xCorrect: A, setMenuPosition: p, getScrollableParent: se, shadowRender: I } = Qr({\n      menuRef: L,\n      menuRefInner: v,\n      inputRef: _,\n      pickerWrapperRef: C,\n      inline: x,\n      emit: a,\n      props: n,\n      slots: i\n    }), {\n      inputValue: D,\n      internalModelValue: V,\n      parseExternalModelValue: s,\n      emitModelValue: M,\n      formatInputValue: F,\n      checkBeforeEmit: u\n    } = Gl(a, n, h), le = J(\n      () => ({\n        dp__main: !0,\n        dp__theme_dark: n.dark,\n        dp__theme_light: !n.dark,\n        dp__flex_display: x.value.enabled,\n        \"dp--flex-display-collapsed\": U.value,\n        dp__flex_display_with_input: x.value.input\n      })\n    ), me = J(() => n.dark ? \"dp__theme_dark\" : \"dp__theme_light\"), $ = J(() => n.teleport ? {\n      to: typeof n.teleport == \"boolean\" ? \"body\" : n.teleport,\n      disabled: !n.teleport || x.value.enabled\n    } : {}), ge = J(() => ({ class: \"dp__outer_menu_wrap\" })), r = J(() => x.value.enabled && (n.timePicker || n.monthPicker || n.yearPicker || n.quarterPicker)), R = () => {\n      var m, j;\n      return (j = (m = _.value) == null ? void 0 : m.$el) == null ? void 0 : j.getBoundingClientRect();\n    }, O = () => {\n      d.value && (Y.value.closeOnScroll ? Xe() : p());\n    }, W = () => {\n      var j;\n      d.value && p();\n      const m = (j = v.value) == null ? void 0 : j.$el.getBoundingClientRect().width;\n      U.value = document.body.offsetWidth <= m;\n    }, ue = (m) => {\n      m.key === \"Tab\" && !x.value.enabled && !n.teleport && Y.value.tabOutClosesMenu && (C.value.contains(document.activeElement) || Xe()), E.value = m.shiftKey;\n    }, w = (m) => {\n      E.value = m.shiftKey;\n    }, N = () => {\n      !n.disabled && !n.readonly && (I(mn, n), p(!1), d.value = !0, d.value && a(\"open\"), d.value || Ft(), s(n.modelValue));\n    }, ce = () => {\n      var m;\n      D.value = \"\", Ft(), (m = _.value) == null || m.setParsedDate(null), a(\"update:model-value\", null), a(\"update:model-timezone-value\", null), a(\"cleared\"), Y.value.closeOnClearValue && Xe();\n    }, he = () => {\n      const m = V.value;\n      return !m || !Array.isArray(m) && ae(m) ? !0 : Array.isArray(m) ? de.value.enabled || m.length === 2 && ae(m[0]) && ae(m[1]) ? !0 : q.value.partialRange && !n.timePicker ? ae(m[0]) : !1 : !1;\n    }, et = () => {\n      u() && he() ? (M(), Xe()) : a(\"invalid-select\", V.value);\n    }, fe = (m) => {\n      vt(), M(), Y.value.closeOnAutoApply && !m && Xe();\n    }, vt = () => {\n      _.value && S.value.enabled && _.value.setParsedDate(V.value);\n    }, ot = (m = !1) => {\n      n.autoApply && oe(V.value) && he() && (q.value.enabled && Array.isArray(V.value) ? (q.value.partialRange || V.value.length === 2) && fe(m) : fe(m));\n    }, Ft = () => {\n      S.value.enabled || (V.value = null);\n    }, Xe = () => {\n      x.value.enabled || (d.value && (d.value = !1, A.value = !1, B(!1), P(!1), Q(), a(\"closed\"), D.value && s(b.value)), Ft(), a(\"blur\"));\n    }, Lt = (m, j, re = !1) => {\n      if (!m) {\n        V.value = null;\n        return;\n      }\n      const Ae = Array.isArray(m) ? !m.some((wt) => !ae(wt)) : ae(m), Fe = oe(m);\n      Ae && Fe ? (f.value = !0, V.value = m, j && (H.value = re, et(), a(\"text-submit\")), xe().then(() => {\n        f.value = !1;\n      })) : a(\"invalid-date\", m);\n    }, pa = () => {\n      n.autoApply && oe(V.value) && M(), vt();\n    }, Zt = () => d.value ? Xe() : N(), ya = (m) => {\n      V.value = m;\n    }, ga = () => {\n      S.value.enabled && (h.value = !0, F()), a(\"focus\");\n    }, ha = () => {\n      if (S.value.enabled && (h.value = !1, s(n.modelValue), H.value)) {\n        const m = wl(C.value, E.value);\n        m == null || m.focus();\n      }\n      a(\"blur\");\n    }, ba = (m) => {\n      v.value && v.value.updateMonthYear(0, {\n        month: rn(m.month),\n        year: rn(m.year)\n      });\n    }, ka = (m) => {\n      s(m ?? n.modelValue);\n    }, wa = (m, j) => {\n      var re;\n      (re = v.value) == null || re.switchView(m, j);\n    }, Za = (m) => Y.value.onClickOutside ? Y.value.onClickOutside(m) : Xe(), k = (m = 0) => {\n      var j;\n      (j = v.value) == null || j.handleFlow(m);\n    };\n    return so(L, _, () => Za(he)), t({\n      closeMenu: Xe,\n      selectDate: et,\n      clearValue: ce,\n      openMenu: N,\n      onScroll: O,\n      formatInputValue: F,\n      // exposed for testing purposes\n      updateInternalModelValue: ya,\n      // modify internal modelValue\n      setMonthYear: ba,\n      parseModel: ka,\n      switchView: wa,\n      toggleMenu: Zt,\n      handleFlow: k,\n      dpWrapMenuRef: L\n    }), (m, j) => (T(), K(\"div\", {\n      ref_key: \"pickerWrapperRef\",\n      ref: C,\n      class: we(le.value),\n      \"data-datepicker-instance\": \"\"\n    }, [\n      Ze(no, Ee({\n        ref_key: \"inputRef\",\n        ref: _,\n        \"input-value\": o(D),\n        \"onUpdate:inputValue\": j[0] || (j[0] = (re) => en(D) ? D.value = re : null),\n        \"is-menu-open\": d.value\n      }, m.$props, {\n        onClear: ce,\n        onOpen: N,\n        onSetInputDate: Lt,\n        onSetEmptyDate: o(M),\n        onSelectDate: et,\n        onToggle: Zt,\n        onClose: Xe,\n        onFocus: ga,\n        onBlur: ha,\n        onRealBlur: j[1] || (j[1] = (re) => h.value = !1),\n        onTextInput: j[2] || (j[2] = (re) => m.$emit(\"text-input\", re))\n      }), Ve({ _: 2 }, [\n        Re(o(te), (re, Ae) => ({\n          name: re,\n          fn: ke((Fe) => [\n            ie(m.$slots, re, Ne(Qe(Fe)))\n          ])\n        }))\n      ]), 1040, [\"input-value\", \"is-menu-open\", \"onSetEmptyDate\"]),\n      (T(), $e(ia(m.teleport ? Jn : \"div\"), Ne(Qe($.value)), {\n        default: ke(() => [\n          Ze(Nt, {\n            name: o(ve)(o(g)),\n            css: o(y) && !o(x).enabled\n          }, {\n            default: ke(() => [\n              d.value ? (T(), K(\"div\", Ee({\n                key: 0,\n                ref_key: \"dpWrapMenuRef\",\n                ref: L\n              }, ge.value, {\n                class: { \"dp--menu-wrapper\": !o(x).enabled },\n                style: o(x).enabled ? void 0 : o(X)\n              }), [\n                Ze(mn, Ee({\n                  ref_key: \"dpMenuRef\",\n                  ref: v\n                }, m.$props, {\n                  \"internal-model-value\": o(V),\n                  \"onUpdate:internalModelValue\": j[3] || (j[3] = (re) => en(V) ? V.value = re : null),\n                  class: { [me.value]: !0, \"dp--menu-wrapper\": m.teleport },\n                  \"open-on-top\": o(g),\n                  \"no-overlay-focus\": r.value,\n                  collapse: U.value,\n                  \"get-input-rect\": R,\n                  \"is-text-input-date\": f.value,\n                  onClosePicker: Xe,\n                  onSelectDate: et,\n                  onAutoApply: ot,\n                  onTimeUpdate: pa,\n                  onFlowStep: j[4] || (j[4] = (re) => m.$emit(\"flow-step\", re)),\n                  onUpdateMonthYear: j[5] || (j[5] = (re) => m.$emit(\"update-month-year\", re)),\n                  onInvalidSelect: j[6] || (j[6] = (re) => m.$emit(\"invalid-select\", o(V))),\n                  onAutoApplyInvalid: j[7] || (j[7] = (re) => m.$emit(\"invalid-select\", re)),\n                  onInvalidFixedRange: j[8] || (j[8] = (re) => m.$emit(\"invalid-fixed-range\", re)),\n                  onRecalculatePosition: o(p),\n                  onTooltipOpen: j[9] || (j[9] = (re) => m.$emit(\"tooltip-open\", re)),\n                  onTooltipClose: j[10] || (j[10] = (re) => m.$emit(\"tooltip-close\", re)),\n                  onTimePickerOpen: j[11] || (j[11] = (re) => m.$emit(\"time-picker-open\", re)),\n                  onTimePickerClose: j[12] || (j[12] = (re) => m.$emit(\"time-picker-close\", re)),\n                  onAmPmChange: j[13] || (j[13] = (re) => m.$emit(\"am-pm-change\", re)),\n                  onRangeStart: j[14] || (j[14] = (re) => m.$emit(\"range-start\", re)),\n                  onRangeEnd: j[15] || (j[15] = (re) => m.$emit(\"range-end\", re)),\n                  onDateUpdate: j[16] || (j[16] = (re) => m.$emit(\"date-update\", re)),\n                  onInvalidDate: j[17] || (j[17] = (re) => m.$emit(\"invalid-date\", re)),\n                  onOverlayToggle: j[18] || (j[18] = (re) => m.$emit(\"overlay-toggle\", re))\n                }), Ve({ _: 2 }, [\n                  Re(o(z), (re, Ae) => ({\n                    name: re,\n                    fn: ke((Fe) => [\n                      ie(m.$slots, re, Ne(Qe({ ...Fe })))\n                    ])\n                  }))\n                ]), 1040, [\"internal-model-value\", \"class\", \"open-on-top\", \"no-overlay-focus\", \"collapse\", \"is-text-input-date\", \"onRecalculatePosition\"])\n              ], 16)) : Z(\"\", !0)\n            ]),\n            _: 3\n          }, 8, [\"name\", \"css\"])\n        ]),\n        _: 3\n      }, 16))\n    ], 2));\n  }\n}), Vn = /* @__PURE__ */ (() => {\n  const e = uo;\n  return e.install = (t) => {\n    t.component(\"Vue3DatePicker\", e);\n  }, e;\n})(), io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n  __proto__: null,\n  default: Vn\n}, Symbol.toStringTag, { value: \"Module\" }));\nObject.entries(io).forEach(([e, t]) => {\n  e !== \"default\" && (Vn[e] = t);\n});\nexport {\n  Vn as default\n};\n","<template>\n  <Transition\n    :enter-active-class=\"$style.from\"\n    :leave-active-class=\"$style.from\"\n    :enter-from-class=\"$style.to\"\n    :leave-to-class=\"$style.to\"\n    appear\n  >\n    <slot />\n  </Transition>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: all var(--transition-cubic-fast);\n}\n.to {\n  transform: translateX(5px) translateY(-5px);\n  opacity: 0;\n}\n</style>\n","import { reactive, readonly, toRaw, defineComponent, inject, ref, computed, getCurrentInstance, watch, openBlock, createElementBlock, createElementVNode, normalizeClass, Fragment, renderList, withDirectives, toDisplayString, vShow, createCommentVNode, vModelText, onMounted, onBeforeUnmount, resolveComponent, createVNode, provide, createBlock } from \"vue\";\nconst EMOJI_REMOTE_SRC = \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple@6.0.1/img/apple/64\";\nconst GROUP_NAMES = {\n  recent: \"Recently used\",\n  smileys_people: \"Smiles & People\",\n  animals_nature: \"Animals & Nature\",\n  food_drink: \"Food & Drink\",\n  activities: \"Activities\",\n  travel_places: \"Travel places\",\n  objects: \"Objects\",\n  symbols: \"Symbols\",\n  flags: \"Flags\"\n};\nconst EMOJI_UNICODE_KEY = \"u\";\nconst EMOJI_NAME_KEY = \"n\";\nconst EMOJI_VARIATIONS_KEY = \"v\";\nconst EMOJI_RESULT_KEY = \"r\";\nconst DEFAULT_EMOJI = {\n  [EMOJI_NAME_KEY]: [\"grinning face\", \"grinning\"],\n  [EMOJI_UNICODE_KEY]: \"1f600\",\n  [EMOJI_RESULT_KEY]: \"1f600\"\n};\nconst SKIN_TONE_NEUTRAL = \"neutral\";\nconst SKIN_TONE_LIGHT = \"1f3fb\";\nconst SKIN_TONE_MEDIUM_LIGHT = \"1f3fc\";\nconst SKIN_TONE_MEDIUM = \"1f3fd\";\nconst SKIN_TONE_MEDIUM_DARK = \"1f3fe\";\nconst SKIN_TONE_DARK = \"1f3ff\";\nconst SKIN_TONES = [\n  SKIN_TONE_NEUTRAL,\n  SKIN_TONE_LIGHT,\n  SKIN_TONE_MEDIUM_LIGHT,\n  SKIN_TONE_MEDIUM,\n  SKIN_TONE_MEDIUM_DARK,\n  SKIN_TONE_DARK\n];\nconst STATIC_TEXTS = {\n  placeholder: \"Search emoji\",\n  skinTone: \"Skin tone\"\n};\nconst COLOR_THEMES = [\"light\", \"dark\", \"auto\"];\nconst smileys_people$1 = [\n  {\n    n: [\n      \"grinning face\",\n      \"grinning\"\n    ],\n    u: \"1f600\"\n  },\n  {\n    n: [\n      \"grinning face with smiling eyes\",\n      \"grin\"\n    ],\n    u: \"1f601\"\n  },\n  {\n    n: [\n      \"face with tears of joy\",\n      \"joy\"\n    ],\n    u: \"1f602\"\n  },\n  {\n    n: [\n      \"rolling on the floor laughing\",\n      \"rolling_on_the_floor_laughing\"\n    ],\n    u: \"1f923\"\n  },\n  {\n    n: [\n      \"smiling face with open mouth\",\n      \"smiley\"\n    ],\n    u: \"1f603\"\n  },\n  {\n    n: [\n      \"smiling face with open mouth and smiling eyes\",\n      \"smile\"\n    ],\n    u: \"1f604\"\n  },\n  {\n    n: [\n      \"smiling face with open mouth and cold sweat\",\n      \"sweat_smile\"\n    ],\n    u: \"1f605\"\n  },\n  {\n    n: [\n      \"smiling face with open mouth and tightly-closed eyes\",\n      \"laughing\",\n      \"satisfied\"\n    ],\n    u: \"1f606\"\n  },\n  {\n    n: [\n      \"winking face\",\n      \"wink\"\n    ],\n    u: \"1f609\"\n  },\n  {\n    n: [\n      \"smiling face with smiling eyes\",\n      \"blush\"\n    ],\n    u: \"1f60a\"\n  },\n  {\n    n: [\n      \"face savouring delicious food\",\n      \"yum\"\n    ],\n    u: \"1f60b\"\n  },\n  {\n    n: [\n      \"smiling face with sunglasses\",\n      \"sunglasses\"\n    ],\n    u: \"1f60e\"\n  },\n  {\n    n: [\n      \"smiling face with heart-shaped eyes\",\n      \"heart_eyes\"\n    ],\n    u: \"1f60d\"\n  },\n  {\n    n: [\n      \"face throwing a kiss\",\n      \"kissing_heart\"\n    ],\n    u: \"1f618\"\n  },\n  {\n    n: [\n      \"kissing face\",\n      \"kissing\"\n    ],\n    u: \"1f617\"\n  },\n  {\n    n: [\n      \"kissing face with smiling eyes\",\n      \"kissing_smiling_eyes\"\n    ],\n    u: \"1f619\"\n  },\n  {\n    n: [\n      \"kissing face with closed eyes\",\n      \"kissing_closed_eyes\"\n    ],\n    u: \"1f61a\"\n  },\n  {\n    n: [\n      \"white smiling face\",\n      \"relaxed\"\n    ],\n    u: \"263a-fe0f\"\n  },\n  {\n    n: [\n      \"slightly smiling face\",\n      \"slightly_smiling_face\"\n    ],\n    u: \"1f642\"\n  },\n  {\n    n: [\n      \"hugging face\",\n      \"hugging_face\"\n    ],\n    u: \"1f917\"\n  },\n  {\n    n: [\n      \"grinning face with star eyes\",\n      \"star-struck\",\n      \"grinning_face_with_star_eyes\"\n    ],\n    u: \"1f929\"\n  },\n  {\n    n: [\n      \"thinking face\",\n      \"thinking_face\"\n    ],\n    u: \"1f914\"\n  },\n  {\n    n: [\n      \"face with one eyebrow raised\",\n      \"face_with_raised_eyebrow\",\n      \"face_with_one_eyebrow_raised\"\n    ],\n    u: \"1f928\"\n  },\n  {\n    n: [\n      \"neutral face\",\n      \"neutral_face\"\n    ],\n    u: \"1f610\"\n  },\n  {\n    n: [\n      \"expressionless face\",\n      \"expressionless\"\n    ],\n    u: \"1f611\"\n  },\n  {\n    n: [\n      \"face without mouth\",\n      \"no_mouth\"\n    ],\n    u: \"1f636\"\n  },\n  {\n    n: [\n      \"face with rolling eyes\",\n      \"face_with_rolling_eyes\"\n    ],\n    u: \"1f644\"\n  },\n  {\n    n: [\n      \"smirking face\",\n      \"smirk\"\n    ],\n    u: \"1f60f\"\n  },\n  {\n    n: [\n      \"persevering face\",\n      \"persevere\"\n    ],\n    u: \"1f623\"\n  },\n  {\n    n: [\n      \"disappointed but relieved face\",\n      \"disappointed_relieved\"\n    ],\n    u: \"1f625\"\n  },\n  {\n    n: [\n      \"face with open mouth\",\n      \"open_mouth\"\n    ],\n    u: \"1f62e\"\n  },\n  {\n    n: [\n      \"zipper-mouth face\",\n      \"zipper_mouth_face\"\n    ],\n    u: \"1f910\"\n  },\n  {\n    n: [\n      \"hushed face\",\n      \"hushed\"\n    ],\n    u: \"1f62f\"\n  },\n  {\n    n: [\n      \"sleepy face\",\n      \"sleepy\"\n    ],\n    u: \"1f62a\"\n  },\n  {\n    n: [\n      \"tired face\",\n      \"tired_face\"\n    ],\n    u: \"1f62b\"\n  },\n  {\n    n: [\n      \"sleeping face\",\n      \"sleeping\"\n    ],\n    u: \"1f634\"\n  },\n  {\n    n: [\n      \"relieved face\",\n      \"relieved\"\n    ],\n    u: \"1f60c\"\n  },\n  {\n    n: [\n      \"face with stuck-out tongue\",\n      \"stuck_out_tongue\"\n    ],\n    u: \"1f61b\"\n  },\n  {\n    n: [\n      \"face with stuck-out tongue and winking eye\",\n      \"stuck_out_tongue_winking_eye\"\n    ],\n    u: \"1f61c\"\n  },\n  {\n    n: [\n      \"face with stuck-out tongue and tightly-closed eyes\",\n      \"stuck_out_tongue_closed_eyes\"\n    ],\n    u: \"1f61d\"\n  },\n  {\n    n: [\n      \"drooling face\",\n      \"drooling_face\"\n    ],\n    u: \"1f924\"\n  },\n  {\n    n: [\n      \"unamused face\",\n      \"unamused\"\n    ],\n    u: \"1f612\"\n  },\n  {\n    n: [\n      \"face with cold sweat\",\n      \"sweat\"\n    ],\n    u: \"1f613\"\n  },\n  {\n    n: [\n      \"pensive face\",\n      \"pensive\"\n    ],\n    u: \"1f614\"\n  },\n  {\n    n: [\n      \"confused face\",\n      \"confused\"\n    ],\n    u: \"1f615\"\n  },\n  {\n    n: [\n      \"upside-down face\",\n      \"upside_down_face\"\n    ],\n    u: \"1f643\"\n  },\n  {\n    n: [\n      \"money-mouth face\",\n      \"money_mouth_face\"\n    ],\n    u: \"1f911\"\n  },\n  {\n    n: [\n      \"astonished face\",\n      \"astonished\"\n    ],\n    u: \"1f632\"\n  },\n  {\n    n: [\n      \"white_frowning_face\"\n    ],\n    u: \"2639-fe0f\"\n  },\n  {\n    n: [\n      \"slightly frowning face\",\n      \"slightly_frowning_face\"\n    ],\n    u: \"1f641\"\n  },\n  {\n    n: [\n      \"confounded face\",\n      \"confounded\"\n    ],\n    u: \"1f616\"\n  },\n  {\n    n: [\n      \"disappointed face\",\n      \"disappointed\"\n    ],\n    u: \"1f61e\"\n  },\n  {\n    n: [\n      \"worried face\",\n      \"worried\"\n    ],\n    u: \"1f61f\"\n  },\n  {\n    n: [\n      \"face with look of triumph\",\n      \"triumph\"\n    ],\n    u: \"1f624\"\n  },\n  {\n    n: [\n      \"crying face\",\n      \"cry\"\n    ],\n    u: \"1f622\"\n  },\n  {\n    n: [\n      \"loudly crying face\",\n      \"sob\"\n    ],\n    u: \"1f62d\"\n  },\n  {\n    n: [\n      \"frowning face with open mouth\",\n      \"frowning\"\n    ],\n    u: \"1f626\"\n  },\n  {\n    n: [\n      \"anguished face\",\n      \"anguished\"\n    ],\n    u: \"1f627\"\n  },\n  {\n    n: [\n      \"fearful face\",\n      \"fearful\"\n    ],\n    u: \"1f628\"\n  },\n  {\n    n: [\n      \"weary face\",\n      \"weary\"\n    ],\n    u: \"1f629\"\n  },\n  {\n    n: [\n      \"shocked face with exploding head\",\n      \"exploding_head\",\n      \"shocked_face_with_exploding_head\"\n    ],\n    u: \"1f92f\"\n  },\n  {\n    n: [\n      \"grimacing face\",\n      \"grimacing\"\n    ],\n    u: \"1f62c\"\n  },\n  {\n    n: [\n      \"face with open mouth and cold sweat\",\n      \"cold_sweat\"\n    ],\n    u: \"1f630\"\n  },\n  {\n    n: [\n      \"face screaming in fear\",\n      \"scream\"\n    ],\n    u: \"1f631\"\n  },\n  {\n    n: [\n      \"flushed face\",\n      \"flushed\"\n    ],\n    u: \"1f633\"\n  },\n  {\n    n: [\n      \"grinning face with one large and one small eye\",\n      \"zany_face\",\n      \"grinning_face_with_one_large_and_one_small_eye\"\n    ],\n    u: \"1f92a\"\n  },\n  {\n    n: [\n      \"dizzy face\",\n      \"dizzy_face\"\n    ],\n    u: \"1f635\"\n  },\n  {\n    n: [\n      \"pouting face\",\n      \"rage\"\n    ],\n    u: \"1f621\"\n  },\n  {\n    n: [\n      \"angry face\",\n      \"angry\"\n    ],\n    u: \"1f620\"\n  },\n  {\n    n: [\n      \"serious face with symbols covering mouth\",\n      \"face_with_symbols_on_mouth\",\n      \"serious_face_with_symbols_covering_mouth\"\n    ],\n    u: \"1f92c\"\n  },\n  {\n    n: [\n      \"face with medical mask\",\n      \"mask\"\n    ],\n    u: \"1f637\"\n  },\n  {\n    n: [\n      \"face with thermometer\",\n      \"face_with_thermometer\"\n    ],\n    u: \"1f912\"\n  },\n  {\n    n: [\n      \"face with head-bandage\",\n      \"face_with_head_bandage\"\n    ],\n    u: \"1f915\"\n  },\n  {\n    n: [\n      \"nauseated face\",\n      \"nauseated_face\"\n    ],\n    u: \"1f922\"\n  },\n  {\n    n: [\n      \"face with open mouth vomiting\",\n      \"face_vomiting\",\n      \"face_with_open_mouth_vomiting\"\n    ],\n    u: \"1f92e\"\n  },\n  {\n    n: [\n      \"sneezing face\",\n      \"sneezing_face\"\n    ],\n    u: \"1f927\"\n  },\n  {\n    n: [\n      \"smiling face with halo\",\n      \"innocent\"\n    ],\n    u: \"1f607\"\n  },\n  {\n    n: [\n      \"face with cowboy hat\",\n      \"face_with_cowboy_hat\"\n    ],\n    u: \"1f920\"\n  },\n  {\n    n: [\n      \"clown face\",\n      \"clown_face\"\n    ],\n    u: \"1f921\"\n  },\n  {\n    n: [\n      \"lying face\",\n      \"lying_face\"\n    ],\n    u: \"1f925\"\n  },\n  {\n    n: [\n      \"face with finger covering closed lips\",\n      \"shushing_face\",\n      \"face_with_finger_covering_closed_lips\"\n    ],\n    u: \"1f92b\"\n  },\n  {\n    n: [\n      \"smiling face with smiling eyes and hand covering mouth\",\n      \"face_with_hand_over_mouth\",\n      \"smiling_face_with_smiling_eyes_and_hand_covering_mouth\"\n    ],\n    u: \"1f92d\"\n  },\n  {\n    n: [\n      \"face with monocle\",\n      \"face_with_monocle\"\n    ],\n    u: \"1f9d0\"\n  },\n  {\n    n: [\n      \"nerd face\",\n      \"nerd_face\"\n    ],\n    u: \"1f913\"\n  },\n  {\n    n: [\n      \"smiling face with horns\",\n      \"smiling_imp\"\n    ],\n    u: \"1f608\"\n  },\n  {\n    n: [\n      \"imp\"\n    ],\n    u: \"1f47f\"\n  },\n  {\n    n: [\n      \"japanese ogre\",\n      \"japanese_ogre\"\n    ],\n    u: \"1f479\"\n  },\n  {\n    n: [\n      \"japanese goblin\",\n      \"japanese_goblin\"\n    ],\n    u: \"1f47a\"\n  },\n  {\n    n: [\n      \"skull\"\n    ],\n    u: \"1f480\"\n  },\n  {\n    n: [\n      \"skull_and_crossbones\"\n    ],\n    u: \"2620-fe0f\"\n  },\n  {\n    n: [\n      \"ghost\"\n    ],\n    u: \"1f47b\"\n  },\n  {\n    n: [\n      \"extraterrestrial alien\",\n      \"alien\"\n    ],\n    u: \"1f47d\"\n  },\n  {\n    n: [\n      \"alien monster\",\n      \"space_invader\"\n    ],\n    u: \"1f47e\"\n  },\n  {\n    n: [\n      \"robot face\",\n      \"robot_face\"\n    ],\n    u: \"1f916\"\n  },\n  {\n    n: [\n      \"pile of poo\",\n      \"hankey\",\n      \"poop\",\n      \"shit\"\n    ],\n    u: \"1f4a9\"\n  },\n  {\n    n: [\n      \"smiling cat face with open mouth\",\n      \"smiley_cat\"\n    ],\n    u: \"1f63a\"\n  },\n  {\n    n: [\n      \"grinning cat face with smiling eyes\",\n      \"smile_cat\"\n    ],\n    u: \"1f638\"\n  },\n  {\n    n: [\n      \"cat face with tears of joy\",\n      \"joy_cat\"\n    ],\n    u: \"1f639\"\n  },\n  {\n    n: [\n      \"smiling cat face with heart-shaped eyes\",\n      \"heart_eyes_cat\"\n    ],\n    u: \"1f63b\"\n  },\n  {\n    n: [\n      \"cat face with wry smile\",\n      \"smirk_cat\"\n    ],\n    u: \"1f63c\"\n  },\n  {\n    n: [\n      \"kissing cat face with closed eyes\",\n      \"kissing_cat\"\n    ],\n    u: \"1f63d\"\n  },\n  {\n    n: [\n      \"weary cat face\",\n      \"scream_cat\"\n    ],\n    u: \"1f640\"\n  },\n  {\n    n: [\n      \"crying cat face\",\n      \"crying_cat_face\"\n    ],\n    u: \"1f63f\"\n  },\n  {\n    n: [\n      \"pouting cat face\",\n      \"pouting_cat\"\n    ],\n    u: \"1f63e\"\n  },\n  {\n    n: [\n      \"see-no-evil monkey\",\n      \"see_no_evil\"\n    ],\n    u: \"1f648\"\n  },\n  {\n    n: [\n      \"hear-no-evil monkey\",\n      \"hear_no_evil\"\n    ],\n    u: \"1f649\"\n  },\n  {\n    n: [\n      \"speak-no-evil monkey\",\n      \"speak_no_evil\"\n    ],\n    u: \"1f64a\"\n  },\n  {\n    n: [\n      \"baby\"\n    ],\n    u: \"1f476\",\n    v: [\n      \"1f476-1f3fb\",\n      \"1f476-1f3fc\",\n      \"1f476-1f3fd\",\n      \"1f476-1f3fe\",\n      \"1f476-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"child\"\n    ],\n    u: \"1f9d2\",\n    v: [\n      \"1f9d2-1f3fb\",\n      \"1f9d2-1f3fc\",\n      \"1f9d2-1f3fd\",\n      \"1f9d2-1f3fe\",\n      \"1f9d2-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"boy\"\n    ],\n    u: \"1f466\",\n    v: [\n      \"1f466-1f3fb\",\n      \"1f466-1f3fc\",\n      \"1f466-1f3fd\",\n      \"1f466-1f3fe\",\n      \"1f466-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"girl\"\n    ],\n    u: \"1f467\",\n    v: [\n      \"1f467-1f3fb\",\n      \"1f467-1f3fc\",\n      \"1f467-1f3fd\",\n      \"1f467-1f3fe\",\n      \"1f467-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"adult\"\n    ],\n    u: \"1f9d1\",\n    v: [\n      \"1f9d1-1f3fb\",\n      \"1f9d1-1f3fc\",\n      \"1f9d1-1f3fd\",\n      \"1f9d1-1f3fe\",\n      \"1f9d1-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man\"\n    ],\n    u: \"1f468\",\n    v: [\n      \"1f468-1f3fb\",\n      \"1f468-1f3fc\",\n      \"1f468-1f3fd\",\n      \"1f468-1f3fe\",\n      \"1f468-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"woman\"\n    ],\n    u: \"1f469\",\n    v: [\n      \"1f469-1f3fb\",\n      \"1f469-1f3fc\",\n      \"1f469-1f3fd\",\n      \"1f469-1f3fe\",\n      \"1f469-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"older adult\",\n      \"older_adult\"\n    ],\n    u: \"1f9d3\",\n    v: [\n      \"1f9d3-1f3fb\",\n      \"1f9d3-1f3fc\",\n      \"1f9d3-1f3fd\",\n      \"1f9d3-1f3fe\",\n      \"1f9d3-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"older man\",\n      \"older_man\"\n    ],\n    u: \"1f474\",\n    v: [\n      \"1f474-1f3fb\",\n      \"1f474-1f3fc\",\n      \"1f474-1f3fd\",\n      \"1f474-1f3fe\",\n      \"1f474-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"older woman\",\n      \"older_woman\"\n    ],\n    u: \"1f475\",\n    v: [\n      \"1f475-1f3fb\",\n      \"1f475-1f3fc\",\n      \"1f475-1f3fd\",\n      \"1f475-1f3fe\",\n      \"1f475-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"male-doctor\"\n    ],\n    u: \"1f468-200d-2695-fe0f\",\n    v: [\n      \"1f468-1f3fb-200d-2695-fe0f\",\n      \"1f468-1f3fc-200d-2695-fe0f\",\n      \"1f468-1f3fd-200d-2695-fe0f\",\n      \"1f468-1f3fe-200d-2695-fe0f\",\n      \"1f468-1f3ff-200d-2695-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-doctor\"\n    ],\n    u: \"1f469-200d-2695-fe0f\",\n    v: [\n      \"1f469-1f3fb-200d-2695-fe0f\",\n      \"1f469-1f3fc-200d-2695-fe0f\",\n      \"1f469-1f3fd-200d-2695-fe0f\",\n      \"1f469-1f3fe-200d-2695-fe0f\",\n      \"1f469-1f3ff-200d-2695-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male-student\"\n    ],\n    u: \"1f468-200d-1f393\",\n    v: [\n      \"1f468-1f3fb-200d-1f393\",\n      \"1f468-1f3fc-200d-1f393\",\n      \"1f468-1f3fd-200d-1f393\",\n      \"1f468-1f3fe-200d-1f393\",\n      \"1f468-1f3ff-200d-1f393\"\n    ]\n  },\n  {\n    n: [\n      \"female-student\"\n    ],\n    u: \"1f469-200d-1f393\",\n    v: [\n      \"1f469-1f3fb-200d-1f393\",\n      \"1f469-1f3fc-200d-1f393\",\n      \"1f469-1f3fd-200d-1f393\",\n      \"1f469-1f3fe-200d-1f393\",\n      \"1f469-1f3ff-200d-1f393\"\n    ]\n  },\n  {\n    n: [\n      \"male-teacher\"\n    ],\n    u: \"1f468-200d-1f3eb\",\n    v: [\n      \"1f468-1f3fb-200d-1f3eb\",\n      \"1f468-1f3fc-200d-1f3eb\",\n      \"1f468-1f3fd-200d-1f3eb\",\n      \"1f468-1f3fe-200d-1f3eb\",\n      \"1f468-1f3ff-200d-1f3eb\"\n    ]\n  },\n  {\n    n: [\n      \"female-teacher\"\n    ],\n    u: \"1f469-200d-1f3eb\",\n    v: [\n      \"1f469-1f3fb-200d-1f3eb\",\n      \"1f469-1f3fc-200d-1f3eb\",\n      \"1f469-1f3fd-200d-1f3eb\",\n      \"1f469-1f3fe-200d-1f3eb\",\n      \"1f469-1f3ff-200d-1f3eb\"\n    ]\n  },\n  {\n    n: [\n      \"male-judge\"\n    ],\n    u: \"1f468-200d-2696-fe0f\",\n    v: [\n      \"1f468-1f3fb-200d-2696-fe0f\",\n      \"1f468-1f3fc-200d-2696-fe0f\",\n      \"1f468-1f3fd-200d-2696-fe0f\",\n      \"1f468-1f3fe-200d-2696-fe0f\",\n      \"1f468-1f3ff-200d-2696-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-judge\"\n    ],\n    u: \"1f469-200d-2696-fe0f\",\n    v: [\n      \"1f469-1f3fb-200d-2696-fe0f\",\n      \"1f469-1f3fc-200d-2696-fe0f\",\n      \"1f469-1f3fd-200d-2696-fe0f\",\n      \"1f469-1f3fe-200d-2696-fe0f\",\n      \"1f469-1f3ff-200d-2696-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male-farmer\"\n    ],\n    u: \"1f468-200d-1f33e\",\n    v: [\n      \"1f468-1f3fb-200d-1f33e\",\n      \"1f468-1f3fc-200d-1f33e\",\n      \"1f468-1f3fd-200d-1f33e\",\n      \"1f468-1f3fe-200d-1f33e\",\n      \"1f468-1f3ff-200d-1f33e\"\n    ]\n  },\n  {\n    n: [\n      \"female-farmer\"\n    ],\n    u: \"1f469-200d-1f33e\",\n    v: [\n      \"1f469-1f3fb-200d-1f33e\",\n      \"1f469-1f3fc-200d-1f33e\",\n      \"1f469-1f3fd-200d-1f33e\",\n      \"1f469-1f3fe-200d-1f33e\",\n      \"1f469-1f3ff-200d-1f33e\"\n    ]\n  },\n  {\n    n: [\n      \"male-cook\"\n    ],\n    u: \"1f468-200d-1f373\",\n    v: [\n      \"1f468-1f3fb-200d-1f373\",\n      \"1f468-1f3fc-200d-1f373\",\n      \"1f468-1f3fd-200d-1f373\",\n      \"1f468-1f3fe-200d-1f373\",\n      \"1f468-1f3ff-200d-1f373\"\n    ]\n  },\n  {\n    n: [\n      \"female-cook\"\n    ],\n    u: \"1f469-200d-1f373\",\n    v: [\n      \"1f469-1f3fb-200d-1f373\",\n      \"1f469-1f3fc-200d-1f373\",\n      \"1f469-1f3fd-200d-1f373\",\n      \"1f469-1f3fe-200d-1f373\",\n      \"1f469-1f3ff-200d-1f373\"\n    ]\n  },\n  {\n    n: [\n      \"male-mechanic\"\n    ],\n    u: \"1f468-200d-1f527\",\n    v: [\n      \"1f468-1f3fb-200d-1f527\",\n      \"1f468-1f3fc-200d-1f527\",\n      \"1f468-1f3fd-200d-1f527\",\n      \"1f468-1f3fe-200d-1f527\",\n      \"1f468-1f3ff-200d-1f527\"\n    ]\n  },\n  {\n    n: [\n      \"female-mechanic\"\n    ],\n    u: \"1f469-200d-1f527\",\n    v: [\n      \"1f469-1f3fb-200d-1f527\",\n      \"1f469-1f3fc-200d-1f527\",\n      \"1f469-1f3fd-200d-1f527\",\n      \"1f469-1f3fe-200d-1f527\",\n      \"1f469-1f3ff-200d-1f527\"\n    ]\n  },\n  {\n    n: [\n      \"male-factory-worker\"\n    ],\n    u: \"1f468-200d-1f3ed\",\n    v: [\n      \"1f468-1f3fb-200d-1f3ed\",\n      \"1f468-1f3fc-200d-1f3ed\",\n      \"1f468-1f3fd-200d-1f3ed\",\n      \"1f468-1f3fe-200d-1f3ed\",\n      \"1f468-1f3ff-200d-1f3ed\"\n    ]\n  },\n  {\n    n: [\n      \"female-factory-worker\"\n    ],\n    u: \"1f469-200d-1f3ed\",\n    v: [\n      \"1f469-1f3fb-200d-1f3ed\",\n      \"1f469-1f3fc-200d-1f3ed\",\n      \"1f469-1f3fd-200d-1f3ed\",\n      \"1f469-1f3fe-200d-1f3ed\",\n      \"1f469-1f3ff-200d-1f3ed\"\n    ]\n  },\n  {\n    n: [\n      \"male-office-worker\"\n    ],\n    u: \"1f468-200d-1f4bc\",\n    v: [\n      \"1f468-1f3fb-200d-1f4bc\",\n      \"1f468-1f3fc-200d-1f4bc\",\n      \"1f468-1f3fd-200d-1f4bc\",\n      \"1f468-1f3fe-200d-1f4bc\",\n      \"1f468-1f3ff-200d-1f4bc\"\n    ]\n  },\n  {\n    n: [\n      \"female-office-worker\"\n    ],\n    u: \"1f469-200d-1f4bc\",\n    v: [\n      \"1f469-1f3fb-200d-1f4bc\",\n      \"1f469-1f3fc-200d-1f4bc\",\n      \"1f469-1f3fd-200d-1f4bc\",\n      \"1f469-1f3fe-200d-1f4bc\",\n      \"1f469-1f3ff-200d-1f4bc\"\n    ]\n  },\n  {\n    n: [\n      \"male-scientist\"\n    ],\n    u: \"1f468-200d-1f52c\",\n    v: [\n      \"1f468-1f3fb-200d-1f52c\",\n      \"1f468-1f3fc-200d-1f52c\",\n      \"1f468-1f3fd-200d-1f52c\",\n      \"1f468-1f3fe-200d-1f52c\",\n      \"1f468-1f3ff-200d-1f52c\"\n    ]\n  },\n  {\n    n: [\n      \"female-scientist\"\n    ],\n    u: \"1f469-200d-1f52c\",\n    v: [\n      \"1f469-1f3fb-200d-1f52c\",\n      \"1f469-1f3fc-200d-1f52c\",\n      \"1f469-1f3fd-200d-1f52c\",\n      \"1f469-1f3fe-200d-1f52c\",\n      \"1f469-1f3ff-200d-1f52c\"\n    ]\n  },\n  {\n    n: [\n      \"male-technologist\"\n    ],\n    u: \"1f468-200d-1f4bb\",\n    v: [\n      \"1f468-1f3fb-200d-1f4bb\",\n      \"1f468-1f3fc-200d-1f4bb\",\n      \"1f468-1f3fd-200d-1f4bb\",\n      \"1f468-1f3fe-200d-1f4bb\",\n      \"1f468-1f3ff-200d-1f4bb\"\n    ]\n  },\n  {\n    n: [\n      \"female-technologist\"\n    ],\n    u: \"1f469-200d-1f4bb\",\n    v: [\n      \"1f469-1f3fb-200d-1f4bb\",\n      \"1f469-1f3fc-200d-1f4bb\",\n      \"1f469-1f3fd-200d-1f4bb\",\n      \"1f469-1f3fe-200d-1f4bb\",\n      \"1f469-1f3ff-200d-1f4bb\"\n    ]\n  },\n  {\n    n: [\n      \"male-singer\"\n    ],\n    u: \"1f468-200d-1f3a4\",\n    v: [\n      \"1f468-1f3fb-200d-1f3a4\",\n      \"1f468-1f3fc-200d-1f3a4\",\n      \"1f468-1f3fd-200d-1f3a4\",\n      \"1f468-1f3fe-200d-1f3a4\",\n      \"1f468-1f3ff-200d-1f3a4\"\n    ]\n  },\n  {\n    n: [\n      \"female-singer\"\n    ],\n    u: \"1f469-200d-1f3a4\",\n    v: [\n      \"1f469-1f3fb-200d-1f3a4\",\n      \"1f469-1f3fc-200d-1f3a4\",\n      \"1f469-1f3fd-200d-1f3a4\",\n      \"1f469-1f3fe-200d-1f3a4\",\n      \"1f469-1f3ff-200d-1f3a4\"\n    ]\n  },\n  {\n    n: [\n      \"male-artist\"\n    ],\n    u: \"1f468-200d-1f3a8\",\n    v: [\n      \"1f468-1f3fb-200d-1f3a8\",\n      \"1f468-1f3fc-200d-1f3a8\",\n      \"1f468-1f3fd-200d-1f3a8\",\n      \"1f468-1f3fe-200d-1f3a8\",\n      \"1f468-1f3ff-200d-1f3a8\"\n    ]\n  },\n  {\n    n: [\n      \"female-artist\"\n    ],\n    u: \"1f469-200d-1f3a8\",\n    v: [\n      \"1f469-1f3fb-200d-1f3a8\",\n      \"1f469-1f3fc-200d-1f3a8\",\n      \"1f469-1f3fd-200d-1f3a8\",\n      \"1f469-1f3fe-200d-1f3a8\",\n      \"1f469-1f3ff-200d-1f3a8\"\n    ]\n  },\n  {\n    n: [\n      \"male-pilot\"\n    ],\n    u: \"1f468-200d-2708-fe0f\",\n    v: [\n      \"1f468-1f3fb-200d-2708-fe0f\",\n      \"1f468-1f3fc-200d-2708-fe0f\",\n      \"1f468-1f3fd-200d-2708-fe0f\",\n      \"1f468-1f3fe-200d-2708-fe0f\",\n      \"1f468-1f3ff-200d-2708-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-pilot\"\n    ],\n    u: \"1f469-200d-2708-fe0f\",\n    v: [\n      \"1f469-1f3fb-200d-2708-fe0f\",\n      \"1f469-1f3fc-200d-2708-fe0f\",\n      \"1f469-1f3fd-200d-2708-fe0f\",\n      \"1f469-1f3fe-200d-2708-fe0f\",\n      \"1f469-1f3ff-200d-2708-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male-astronaut\"\n    ],\n    u: \"1f468-200d-1f680\",\n    v: [\n      \"1f468-1f3fb-200d-1f680\",\n      \"1f468-1f3fc-200d-1f680\",\n      \"1f468-1f3fd-200d-1f680\",\n      \"1f468-1f3fe-200d-1f680\",\n      \"1f468-1f3ff-200d-1f680\"\n    ]\n  },\n  {\n    n: [\n      \"female-astronaut\"\n    ],\n    u: \"1f469-200d-1f680\",\n    v: [\n      \"1f469-1f3fb-200d-1f680\",\n      \"1f469-1f3fc-200d-1f680\",\n      \"1f469-1f3fd-200d-1f680\",\n      \"1f469-1f3fe-200d-1f680\",\n      \"1f469-1f3ff-200d-1f680\"\n    ]\n  },\n  {\n    n: [\n      \"male-firefighter\"\n    ],\n    u: \"1f468-200d-1f692\",\n    v: [\n      \"1f468-1f3fb-200d-1f692\",\n      \"1f468-1f3fc-200d-1f692\",\n      \"1f468-1f3fd-200d-1f692\",\n      \"1f468-1f3fe-200d-1f692\",\n      \"1f468-1f3ff-200d-1f692\"\n    ]\n  },\n  {\n    n: [\n      \"female-firefighter\"\n    ],\n    u: \"1f469-200d-1f692\",\n    v: [\n      \"1f469-1f3fb-200d-1f692\",\n      \"1f469-1f3fc-200d-1f692\",\n      \"1f469-1f3fd-200d-1f692\",\n      \"1f469-1f3fe-200d-1f692\",\n      \"1f469-1f3ff-200d-1f692\"\n    ]\n  },\n  {\n    n: [\n      \"police officer\",\n      \"cop\"\n    ],\n    u: \"1f46e\",\n    v: [\n      \"1f46e-1f3fb\",\n      \"1f46e-1f3fc\",\n      \"1f46e-1f3fd\",\n      \"1f46e-1f3fe\",\n      \"1f46e-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"male-police-officer\"\n    ],\n    u: \"1f46e-200d-2642-fe0f\",\n    v: [\n      \"1f46e-1f3fb-200d-2642-fe0f\",\n      \"1f46e-1f3fc-200d-2642-fe0f\",\n      \"1f46e-1f3fd-200d-2642-fe0f\",\n      \"1f46e-1f3fe-200d-2642-fe0f\",\n      \"1f46e-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-police-officer\"\n    ],\n    u: \"1f46e-200d-2640-fe0f\",\n    v: [\n      \"1f46e-1f3fb-200d-2640-fe0f\",\n      \"1f46e-1f3fc-200d-2640-fe0f\",\n      \"1f46e-1f3fd-200d-2640-fe0f\",\n      \"1f46e-1f3fe-200d-2640-fe0f\",\n      \"1f46e-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"sleuth_or_spy\"\n    ],\n    u: \"1f575-fe0f\",\n    v: [\n      \"1f575-1f3fb\",\n      \"1f575-1f3fc\",\n      \"1f575-1f3fd\",\n      \"1f575-1f3fe\",\n      \"1f575-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"male-detective\"\n    ],\n    u: \"1f575-fe0f-200d-2642-fe0f\",\n    v: [\n      \"1f575-1f3fb-200d-2642-fe0f\",\n      \"1f575-1f3fc-200d-2642-fe0f\",\n      \"1f575-1f3fd-200d-2642-fe0f\",\n      \"1f575-1f3fe-200d-2642-fe0f\",\n      \"1f575-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-detective\"\n    ],\n    u: \"1f575-fe0f-200d-2640-fe0f\",\n    v: [\n      \"1f575-1f3fb-200d-2640-fe0f\",\n      \"1f575-1f3fc-200d-2640-fe0f\",\n      \"1f575-1f3fd-200d-2640-fe0f\",\n      \"1f575-1f3fe-200d-2640-fe0f\",\n      \"1f575-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"guardsman\"\n    ],\n    u: \"1f482\",\n    v: [\n      \"1f482-1f3fb\",\n      \"1f482-1f3fc\",\n      \"1f482-1f3fd\",\n      \"1f482-1f3fe\",\n      \"1f482-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"male-guard\"\n    ],\n    u: \"1f482-200d-2642-fe0f\",\n    v: [\n      \"1f482-1f3fb-200d-2642-fe0f\",\n      \"1f482-1f3fc-200d-2642-fe0f\",\n      \"1f482-1f3fd-200d-2642-fe0f\",\n      \"1f482-1f3fe-200d-2642-fe0f\",\n      \"1f482-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-guard\"\n    ],\n    u: \"1f482-200d-2640-fe0f\",\n    v: [\n      \"1f482-1f3fb-200d-2640-fe0f\",\n      \"1f482-1f3fc-200d-2640-fe0f\",\n      \"1f482-1f3fd-200d-2640-fe0f\",\n      \"1f482-1f3fe-200d-2640-fe0f\",\n      \"1f482-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"construction worker\",\n      \"construction_worker\"\n    ],\n    u: \"1f477\",\n    v: [\n      \"1f477-1f3fb\",\n      \"1f477-1f3fc\",\n      \"1f477-1f3fd\",\n      \"1f477-1f3fe\",\n      \"1f477-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"male-construction-worker\"\n    ],\n    u: \"1f477-200d-2642-fe0f\",\n    v: [\n      \"1f477-1f3fb-200d-2642-fe0f\",\n      \"1f477-1f3fc-200d-2642-fe0f\",\n      \"1f477-1f3fd-200d-2642-fe0f\",\n      \"1f477-1f3fe-200d-2642-fe0f\",\n      \"1f477-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"female-construction-worker\"\n    ],\n    u: \"1f477-200d-2640-fe0f\",\n    v: [\n      \"1f477-1f3fb-200d-2640-fe0f\",\n      \"1f477-1f3fc-200d-2640-fe0f\",\n      \"1f477-1f3fd-200d-2640-fe0f\",\n      \"1f477-1f3fe-200d-2640-fe0f\",\n      \"1f477-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"prince\"\n    ],\n    u: \"1f934\",\n    v: [\n      \"1f934-1f3fb\",\n      \"1f934-1f3fc\",\n      \"1f934-1f3fd\",\n      \"1f934-1f3fe\",\n      \"1f934-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"princess\"\n    ],\n    u: \"1f478\",\n    v: [\n      \"1f478-1f3fb\",\n      \"1f478-1f3fc\",\n      \"1f478-1f3fd\",\n      \"1f478-1f3fe\",\n      \"1f478-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man with turban\",\n      \"man_with_turban\"\n    ],\n    u: \"1f473\",\n    v: [\n      \"1f473-1f3fb\",\n      \"1f473-1f3fc\",\n      \"1f473-1f3fd\",\n      \"1f473-1f3fe\",\n      \"1f473-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-wearing-turban\"\n    ],\n    u: \"1f473-200d-2642-fe0f\",\n    v: [\n      \"1f473-1f3fb-200d-2642-fe0f\",\n      \"1f473-1f3fc-200d-2642-fe0f\",\n      \"1f473-1f3fd-200d-2642-fe0f\",\n      \"1f473-1f3fe-200d-2642-fe0f\",\n      \"1f473-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-wearing-turban\"\n    ],\n    u: \"1f473-200d-2640-fe0f\",\n    v: [\n      \"1f473-1f3fb-200d-2640-fe0f\",\n      \"1f473-1f3fc-200d-2640-fe0f\",\n      \"1f473-1f3fd-200d-2640-fe0f\",\n      \"1f473-1f3fe-200d-2640-fe0f\",\n      \"1f473-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man with gua pi mao\",\n      \"man_with_gua_pi_mao\"\n    ],\n    u: \"1f472\",\n    v: [\n      \"1f472-1f3fb\",\n      \"1f472-1f3fc\",\n      \"1f472-1f3fd\",\n      \"1f472-1f3fe\",\n      \"1f472-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"person with headscarf\",\n      \"person_with_headscarf\"\n    ],\n    u: \"1f9d5\",\n    v: [\n      \"1f9d5-1f3fb\",\n      \"1f9d5-1f3fc\",\n      \"1f9d5-1f3fd\",\n      \"1f9d5-1f3fe\",\n      \"1f9d5-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"bearded person\",\n      \"bearded_person\"\n    ],\n    u: \"1f9d4\",\n    v: [\n      \"1f9d4-1f3fb\",\n      \"1f9d4-1f3fc\",\n      \"1f9d4-1f3fd\",\n      \"1f9d4-1f3fe\",\n      \"1f9d4-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"person with blond hair\",\n      \"person_with_blond_hair\"\n    ],\n    u: \"1f471\",\n    v: [\n      \"1f471-1f3fb\",\n      \"1f471-1f3fc\",\n      \"1f471-1f3fd\",\n      \"1f471-1f3fe\",\n      \"1f471-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"blond-haired-man\"\n    ],\n    u: \"1f471-200d-2642-fe0f\",\n    v: [\n      \"1f471-1f3fb-200d-2642-fe0f\",\n      \"1f471-1f3fc-200d-2642-fe0f\",\n      \"1f471-1f3fd-200d-2642-fe0f\",\n      \"1f471-1f3fe-200d-2642-fe0f\",\n      \"1f471-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"blond-haired-woman\"\n    ],\n    u: \"1f471-200d-2640-fe0f\",\n    v: [\n      \"1f471-1f3fb-200d-2640-fe0f\",\n      \"1f471-1f3fc-200d-2640-fe0f\",\n      \"1f471-1f3fd-200d-2640-fe0f\",\n      \"1f471-1f3fe-200d-2640-fe0f\",\n      \"1f471-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man in tuxedo\",\n      \"man_in_tuxedo\"\n    ],\n    u: \"1f935\",\n    v: [\n      \"1f935-1f3fb\",\n      \"1f935-1f3fc\",\n      \"1f935-1f3fd\",\n      \"1f935-1f3fe\",\n      \"1f935-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"bride with veil\",\n      \"bride_with_veil\"\n    ],\n    u: \"1f470\",\n    v: [\n      \"1f470-1f3fb\",\n      \"1f470-1f3fc\",\n      \"1f470-1f3fd\",\n      \"1f470-1f3fe\",\n      \"1f470-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"pregnant woman\",\n      \"pregnant_woman\"\n    ],\n    u: \"1f930\",\n    v: [\n      \"1f930-1f3fb\",\n      \"1f930-1f3fc\",\n      \"1f930-1f3fd\",\n      \"1f930-1f3fe\",\n      \"1f930-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"breast-feeding\"\n    ],\n    u: \"1f931\",\n    v: [\n      \"1f931-1f3fb\",\n      \"1f931-1f3fc\",\n      \"1f931-1f3fd\",\n      \"1f931-1f3fe\",\n      \"1f931-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"baby angel\",\n      \"angel\"\n    ],\n    u: \"1f47c\",\n    v: [\n      \"1f47c-1f3fb\",\n      \"1f47c-1f3fc\",\n      \"1f47c-1f3fd\",\n      \"1f47c-1f3fe\",\n      \"1f47c-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"father christmas\",\n      \"santa\"\n    ],\n    u: \"1f385\",\n    v: [\n      \"1f385-1f3fb\",\n      \"1f385-1f3fc\",\n      \"1f385-1f3fd\",\n      \"1f385-1f3fe\",\n      \"1f385-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"mother christmas\",\n      \"mrs_claus\",\n      \"mother_christmas\"\n    ],\n    u: \"1f936\",\n    v: [\n      \"1f936-1f3fb\",\n      \"1f936-1f3fc\",\n      \"1f936-1f3fd\",\n      \"1f936-1f3fe\",\n      \"1f936-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"mage\"\n    ],\n    u: \"1f9d9\",\n    v: [\n      \"1f9d9-1f3fb\",\n      \"1f9d9-1f3fc\",\n      \"1f9d9-1f3fd\",\n      \"1f9d9-1f3fe\",\n      \"1f9d9-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"female_mage\"\n    ],\n    u: \"1f9d9-200d-2640-fe0f\",\n    v: [\n      \"1f9d9-1f3fb-200d-2640-fe0f\",\n      \"1f9d9-1f3fc-200d-2640-fe0f\",\n      \"1f9d9-1f3fd-200d-2640-fe0f\",\n      \"1f9d9-1f3fe-200d-2640-fe0f\",\n      \"1f9d9-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male_mage\"\n    ],\n    u: \"1f9d9-200d-2642-fe0f\",\n    v: [\n      \"1f9d9-1f3fb-200d-2642-fe0f\",\n      \"1f9d9-1f3fc-200d-2642-fe0f\",\n      \"1f9d9-1f3fd-200d-2642-fe0f\",\n      \"1f9d9-1f3fe-200d-2642-fe0f\",\n      \"1f9d9-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"fairy\"\n    ],\n    u: \"1f9da\",\n    v: [\n      \"1f9da-1f3fb\",\n      \"1f9da-1f3fc\",\n      \"1f9da-1f3fd\",\n      \"1f9da-1f3fe\",\n      \"1f9da-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"female_fairy\"\n    ],\n    u: \"1f9da-200d-2640-fe0f\",\n    v: [\n      \"1f9da-1f3fb-200d-2640-fe0f\",\n      \"1f9da-1f3fc-200d-2640-fe0f\",\n      \"1f9da-1f3fd-200d-2640-fe0f\",\n      \"1f9da-1f3fe-200d-2640-fe0f\",\n      \"1f9da-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male_fairy\"\n    ],\n    u: \"1f9da-200d-2642-fe0f\",\n    v: [\n      \"1f9da-1f3fb-200d-2642-fe0f\",\n      \"1f9da-1f3fc-200d-2642-fe0f\",\n      \"1f9da-1f3fd-200d-2642-fe0f\",\n      \"1f9da-1f3fe-200d-2642-fe0f\",\n      \"1f9da-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"vampire\"\n    ],\n    u: \"1f9db\",\n    v: [\n      \"1f9db-1f3fb\",\n      \"1f9db-1f3fc\",\n      \"1f9db-1f3fd\",\n      \"1f9db-1f3fe\",\n      \"1f9db-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"female_vampire\"\n    ],\n    u: \"1f9db-200d-2640-fe0f\",\n    v: [\n      \"1f9db-1f3fb-200d-2640-fe0f\",\n      \"1f9db-1f3fc-200d-2640-fe0f\",\n      \"1f9db-1f3fd-200d-2640-fe0f\",\n      \"1f9db-1f3fe-200d-2640-fe0f\",\n      \"1f9db-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male_vampire\"\n    ],\n    u: \"1f9db-200d-2642-fe0f\",\n    v: [\n      \"1f9db-1f3fb-200d-2642-fe0f\",\n      \"1f9db-1f3fc-200d-2642-fe0f\",\n      \"1f9db-1f3fd-200d-2642-fe0f\",\n      \"1f9db-1f3fe-200d-2642-fe0f\",\n      \"1f9db-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"merperson\"\n    ],\n    u: \"1f9dc\",\n    v: [\n      \"1f9dc-1f3fb\",\n      \"1f9dc-1f3fc\",\n      \"1f9dc-1f3fd\",\n      \"1f9dc-1f3fe\",\n      \"1f9dc-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"mermaid\"\n    ],\n    u: \"1f9dc-200d-2640-fe0f\",\n    v: [\n      \"1f9dc-1f3fb-200d-2640-fe0f\",\n      \"1f9dc-1f3fc-200d-2640-fe0f\",\n      \"1f9dc-1f3fd-200d-2640-fe0f\",\n      \"1f9dc-1f3fe-200d-2640-fe0f\",\n      \"1f9dc-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"merman\"\n    ],\n    u: \"1f9dc-200d-2642-fe0f\",\n    v: [\n      \"1f9dc-1f3fb-200d-2642-fe0f\",\n      \"1f9dc-1f3fc-200d-2642-fe0f\",\n      \"1f9dc-1f3fd-200d-2642-fe0f\",\n      \"1f9dc-1f3fe-200d-2642-fe0f\",\n      \"1f9dc-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"elf\"\n    ],\n    u: \"1f9dd\",\n    v: [\n      \"1f9dd-1f3fb\",\n      \"1f9dd-1f3fc\",\n      \"1f9dd-1f3fd\",\n      \"1f9dd-1f3fe\",\n      \"1f9dd-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"female_elf\"\n    ],\n    u: \"1f9dd-200d-2640-fe0f\",\n    v: [\n      \"1f9dd-1f3fb-200d-2640-fe0f\",\n      \"1f9dd-1f3fc-200d-2640-fe0f\",\n      \"1f9dd-1f3fd-200d-2640-fe0f\",\n      \"1f9dd-1f3fe-200d-2640-fe0f\",\n      \"1f9dd-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"male_elf\"\n    ],\n    u: \"1f9dd-200d-2642-fe0f\",\n    v: [\n      \"1f9dd-1f3fb-200d-2642-fe0f\",\n      \"1f9dd-1f3fc-200d-2642-fe0f\",\n      \"1f9dd-1f3fd-200d-2642-fe0f\",\n      \"1f9dd-1f3fe-200d-2642-fe0f\",\n      \"1f9dd-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"genie\"\n    ],\n    u: \"1f9de\"\n  },\n  {\n    n: [\n      \"female_genie\"\n    ],\n    u: \"1f9de-200d-2640-fe0f\"\n  },\n  {\n    n: [\n      \"male_genie\"\n    ],\n    u: \"1f9de-200d-2642-fe0f\"\n  },\n  {\n    n: [\n      \"zombie\"\n    ],\n    u: \"1f9df\"\n  },\n  {\n    n: [\n      \"female_zombie\"\n    ],\n    u: \"1f9df-200d-2640-fe0f\"\n  },\n  {\n    n: [\n      \"male_zombie\"\n    ],\n    u: \"1f9df-200d-2642-fe0f\"\n  },\n  {\n    n: [\n      \"person frowning\",\n      \"person_frowning\"\n    ],\n    u: \"1f64d\",\n    v: [\n      \"1f64d-1f3fb\",\n      \"1f64d-1f3fc\",\n      \"1f64d-1f3fd\",\n      \"1f64d-1f3fe\",\n      \"1f64d-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-frowning\"\n    ],\n    u: \"1f64d-200d-2642-fe0f\",\n    v: [\n      \"1f64d-1f3fb-200d-2642-fe0f\",\n      \"1f64d-1f3fc-200d-2642-fe0f\",\n      \"1f64d-1f3fd-200d-2642-fe0f\",\n      \"1f64d-1f3fe-200d-2642-fe0f\",\n      \"1f64d-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-frowning\"\n    ],\n    u: \"1f64d-200d-2640-fe0f\",\n    v: [\n      \"1f64d-1f3fb-200d-2640-fe0f\",\n      \"1f64d-1f3fc-200d-2640-fe0f\",\n      \"1f64d-1f3fd-200d-2640-fe0f\",\n      \"1f64d-1f3fe-200d-2640-fe0f\",\n      \"1f64d-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"person with pouting face\",\n      \"person_with_pouting_face\"\n    ],\n    u: \"1f64e\",\n    v: [\n      \"1f64e-1f3fb\",\n      \"1f64e-1f3fc\",\n      \"1f64e-1f3fd\",\n      \"1f64e-1f3fe\",\n      \"1f64e-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-pouting\"\n    ],\n    u: \"1f64e-200d-2642-fe0f\",\n    v: [\n      \"1f64e-1f3fb-200d-2642-fe0f\",\n      \"1f64e-1f3fc-200d-2642-fe0f\",\n      \"1f64e-1f3fd-200d-2642-fe0f\",\n      \"1f64e-1f3fe-200d-2642-fe0f\",\n      \"1f64e-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-pouting\"\n    ],\n    u: \"1f64e-200d-2640-fe0f\",\n    v: [\n      \"1f64e-1f3fb-200d-2640-fe0f\",\n      \"1f64e-1f3fc-200d-2640-fe0f\",\n      \"1f64e-1f3fd-200d-2640-fe0f\",\n      \"1f64e-1f3fe-200d-2640-fe0f\",\n      \"1f64e-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"face with no good gesture\",\n      \"no_good\"\n    ],\n    u: \"1f645\",\n    v: [\n      \"1f645-1f3fb\",\n      \"1f645-1f3fc\",\n      \"1f645-1f3fd\",\n      \"1f645-1f3fe\",\n      \"1f645-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-gesturing-no\"\n    ],\n    u: \"1f645-200d-2642-fe0f\",\n    v: [\n      \"1f645-1f3fb-200d-2642-fe0f\",\n      \"1f645-1f3fc-200d-2642-fe0f\",\n      \"1f645-1f3fd-200d-2642-fe0f\",\n      \"1f645-1f3fe-200d-2642-fe0f\",\n      \"1f645-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-gesturing-no\"\n    ],\n    u: \"1f645-200d-2640-fe0f\",\n    v: [\n      \"1f645-1f3fb-200d-2640-fe0f\",\n      \"1f645-1f3fc-200d-2640-fe0f\",\n      \"1f645-1f3fd-200d-2640-fe0f\",\n      \"1f645-1f3fe-200d-2640-fe0f\",\n      \"1f645-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"face with ok gesture\",\n      \"ok_woman\"\n    ],\n    u: \"1f646\",\n    v: [\n      \"1f646-1f3fb\",\n      \"1f646-1f3fc\",\n      \"1f646-1f3fd\",\n      \"1f646-1f3fe\",\n      \"1f646-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-gesturing-ok\"\n    ],\n    u: \"1f646-200d-2642-fe0f\",\n    v: [\n      \"1f646-1f3fb-200d-2642-fe0f\",\n      \"1f646-1f3fc-200d-2642-fe0f\",\n      \"1f646-1f3fd-200d-2642-fe0f\",\n      \"1f646-1f3fe-200d-2642-fe0f\",\n      \"1f646-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-gesturing-ok\"\n    ],\n    u: \"1f646-200d-2640-fe0f\",\n    v: [\n      \"1f646-1f3fb-200d-2640-fe0f\",\n      \"1f646-1f3fc-200d-2640-fe0f\",\n      \"1f646-1f3fd-200d-2640-fe0f\",\n      \"1f646-1f3fe-200d-2640-fe0f\",\n      \"1f646-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"information desk person\",\n      \"information_desk_person\"\n    ],\n    u: \"1f481\",\n    v: [\n      \"1f481-1f3fb\",\n      \"1f481-1f3fc\",\n      \"1f481-1f3fd\",\n      \"1f481-1f3fe\",\n      \"1f481-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-tipping-hand\"\n    ],\n    u: \"1f481-200d-2642-fe0f\",\n    v: [\n      \"1f481-1f3fb-200d-2642-fe0f\",\n      \"1f481-1f3fc-200d-2642-fe0f\",\n      \"1f481-1f3fd-200d-2642-fe0f\",\n      \"1f481-1f3fe-200d-2642-fe0f\",\n      \"1f481-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-tipping-hand\"\n    ],\n    u: \"1f481-200d-2640-fe0f\",\n    v: [\n      \"1f481-1f3fb-200d-2640-fe0f\",\n      \"1f481-1f3fc-200d-2640-fe0f\",\n      \"1f481-1f3fd-200d-2640-fe0f\",\n      \"1f481-1f3fe-200d-2640-fe0f\",\n      \"1f481-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"happy person raising one hand\",\n      \"raising_hand\"\n    ],\n    u: \"1f64b\",\n    v: [\n      \"1f64b-1f3fb\",\n      \"1f64b-1f3fc\",\n      \"1f64b-1f3fd\",\n      \"1f64b-1f3fe\",\n      \"1f64b-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-raising-hand\"\n    ],\n    u: \"1f64b-200d-2642-fe0f\",\n    v: [\n      \"1f64b-1f3fb-200d-2642-fe0f\",\n      \"1f64b-1f3fc-200d-2642-fe0f\",\n      \"1f64b-1f3fd-200d-2642-fe0f\",\n      \"1f64b-1f3fe-200d-2642-fe0f\",\n      \"1f64b-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-raising-hand\"\n    ],\n    u: \"1f64b-200d-2640-fe0f\",\n    v: [\n      \"1f64b-1f3fb-200d-2640-fe0f\",\n      \"1f64b-1f3fc-200d-2640-fe0f\",\n      \"1f64b-1f3fd-200d-2640-fe0f\",\n      \"1f64b-1f3fe-200d-2640-fe0f\",\n      \"1f64b-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"person bowing deeply\",\n      \"bow\"\n    ],\n    u: \"1f647\",\n    v: [\n      \"1f647-1f3fb\",\n      \"1f647-1f3fc\",\n      \"1f647-1f3fd\",\n      \"1f647-1f3fe\",\n      \"1f647-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-bowing\"\n    ],\n    u: \"1f647-200d-2642-fe0f\",\n    v: [\n      \"1f647-1f3fb-200d-2642-fe0f\",\n      \"1f647-1f3fc-200d-2642-fe0f\",\n      \"1f647-1f3fd-200d-2642-fe0f\",\n      \"1f647-1f3fe-200d-2642-fe0f\",\n      \"1f647-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-bowing\"\n    ],\n    u: \"1f647-200d-2640-fe0f\",\n    v: [\n      \"1f647-1f3fb-200d-2640-fe0f\",\n      \"1f647-1f3fc-200d-2640-fe0f\",\n      \"1f647-1f3fd-200d-2640-fe0f\",\n      \"1f647-1f3fe-200d-2640-fe0f\",\n      \"1f647-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"face palm\",\n      \"face_palm\"\n    ],\n    u: \"1f926\",\n    v: [\n      \"1f926-1f3fb\",\n      \"1f926-1f3fc\",\n      \"1f926-1f3fd\",\n      \"1f926-1f3fe\",\n      \"1f926-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-facepalming\"\n    ],\n    u: \"1f926-200d-2642-fe0f\",\n    v: [\n      \"1f926-1f3fb-200d-2642-fe0f\",\n      \"1f926-1f3fc-200d-2642-fe0f\",\n      \"1f926-1f3fd-200d-2642-fe0f\",\n      \"1f926-1f3fe-200d-2642-fe0f\",\n      \"1f926-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-facepalming\"\n    ],\n    u: \"1f926-200d-2640-fe0f\",\n    v: [\n      \"1f926-1f3fb-200d-2640-fe0f\",\n      \"1f926-1f3fc-200d-2640-fe0f\",\n      \"1f926-1f3fd-200d-2640-fe0f\",\n      \"1f926-1f3fe-200d-2640-fe0f\",\n      \"1f926-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"shrug\"\n    ],\n    u: \"1f937\",\n    v: [\n      \"1f937-1f3fb\",\n      \"1f937-1f3fc\",\n      \"1f937-1f3fd\",\n      \"1f937-1f3fe\",\n      \"1f937-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-shrugging\"\n    ],\n    u: \"1f937-200d-2642-fe0f\",\n    v: [\n      \"1f937-1f3fb-200d-2642-fe0f\",\n      \"1f937-1f3fc-200d-2642-fe0f\",\n      \"1f937-1f3fd-200d-2642-fe0f\",\n      \"1f937-1f3fe-200d-2642-fe0f\",\n      \"1f937-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-shrugging\"\n    ],\n    u: \"1f937-200d-2640-fe0f\",\n    v: [\n      \"1f937-1f3fb-200d-2640-fe0f\",\n      \"1f937-1f3fc-200d-2640-fe0f\",\n      \"1f937-1f3fd-200d-2640-fe0f\",\n      \"1f937-1f3fe-200d-2640-fe0f\",\n      \"1f937-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"face massage\",\n      \"massage\"\n    ],\n    u: \"1f486\",\n    v: [\n      \"1f486-1f3fb\",\n      \"1f486-1f3fc\",\n      \"1f486-1f3fd\",\n      \"1f486-1f3fe\",\n      \"1f486-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-getting-massage\"\n    ],\n    u: \"1f486-200d-2642-fe0f\",\n    v: [\n      \"1f486-1f3fb-200d-2642-fe0f\",\n      \"1f486-1f3fc-200d-2642-fe0f\",\n      \"1f486-1f3fd-200d-2642-fe0f\",\n      \"1f486-1f3fe-200d-2642-fe0f\",\n      \"1f486-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-getting-massage\"\n    ],\n    u: \"1f486-200d-2640-fe0f\",\n    v: [\n      \"1f486-1f3fb-200d-2640-fe0f\",\n      \"1f486-1f3fc-200d-2640-fe0f\",\n      \"1f486-1f3fd-200d-2640-fe0f\",\n      \"1f486-1f3fe-200d-2640-fe0f\",\n      \"1f486-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"haircut\"\n    ],\n    u: \"1f487\",\n    v: [\n      \"1f487-1f3fb\",\n      \"1f487-1f3fc\",\n      \"1f487-1f3fd\",\n      \"1f487-1f3fe\",\n      \"1f487-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-getting-haircut\"\n    ],\n    u: \"1f487-200d-2642-fe0f\",\n    v: [\n      \"1f487-1f3fb-200d-2642-fe0f\",\n      \"1f487-1f3fc-200d-2642-fe0f\",\n      \"1f487-1f3fd-200d-2642-fe0f\",\n      \"1f487-1f3fe-200d-2642-fe0f\",\n      \"1f487-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-getting-haircut\"\n    ],\n    u: \"1f487-200d-2640-fe0f\",\n    v: [\n      \"1f487-1f3fb-200d-2640-fe0f\",\n      \"1f487-1f3fc-200d-2640-fe0f\",\n      \"1f487-1f3fd-200d-2640-fe0f\",\n      \"1f487-1f3fe-200d-2640-fe0f\",\n      \"1f487-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"pedestrian\",\n      \"walking\"\n    ],\n    u: \"1f6b6\",\n    v: [\n      \"1f6b6-1f3fb\",\n      \"1f6b6-1f3fc\",\n      \"1f6b6-1f3fd\",\n      \"1f6b6-1f3fe\",\n      \"1f6b6-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-walking\"\n    ],\n    u: \"1f6b6-200d-2642-fe0f\",\n    v: [\n      \"1f6b6-1f3fb-200d-2642-fe0f\",\n      \"1f6b6-1f3fc-200d-2642-fe0f\",\n      \"1f6b6-1f3fd-200d-2642-fe0f\",\n      \"1f6b6-1f3fe-200d-2642-fe0f\",\n      \"1f6b6-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-walking\"\n    ],\n    u: \"1f6b6-200d-2640-fe0f\",\n    v: [\n      \"1f6b6-1f3fb-200d-2640-fe0f\",\n      \"1f6b6-1f3fc-200d-2640-fe0f\",\n      \"1f6b6-1f3fd-200d-2640-fe0f\",\n      \"1f6b6-1f3fe-200d-2640-fe0f\",\n      \"1f6b6-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"runner\",\n      \"running\"\n    ],\n    u: \"1f3c3\",\n    v: [\n      \"1f3c3-1f3fb\",\n      \"1f3c3-1f3fc\",\n      \"1f3c3-1f3fd\",\n      \"1f3c3-1f3fe\",\n      \"1f3c3-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-running\"\n    ],\n    u: \"1f3c3-200d-2642-fe0f\",\n    v: [\n      \"1f3c3-1f3fb-200d-2642-fe0f\",\n      \"1f3c3-1f3fc-200d-2642-fe0f\",\n      \"1f3c3-1f3fd-200d-2642-fe0f\",\n      \"1f3c3-1f3fe-200d-2642-fe0f\",\n      \"1f3c3-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-running\"\n    ],\n    u: \"1f3c3-200d-2640-fe0f\",\n    v: [\n      \"1f3c3-1f3fb-200d-2640-fe0f\",\n      \"1f3c3-1f3fc-200d-2640-fe0f\",\n      \"1f3c3-1f3fd-200d-2640-fe0f\",\n      \"1f3c3-1f3fe-200d-2640-fe0f\",\n      \"1f3c3-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"dancer\"\n    ],\n    u: \"1f483\",\n    v: [\n      \"1f483-1f3fb\",\n      \"1f483-1f3fc\",\n      \"1f483-1f3fd\",\n      \"1f483-1f3fe\",\n      \"1f483-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man dancing\",\n      \"man_dancing\"\n    ],\n    u: \"1f57a\",\n    v: [\n      \"1f57a-1f3fb\",\n      \"1f57a-1f3fc\",\n      \"1f57a-1f3fd\",\n      \"1f57a-1f3fe\",\n      \"1f57a-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"woman with bunny ears\",\n      \"dancers\"\n    ],\n    u: \"1f46f\"\n  },\n  {\n    n: [\n      \"man-with-bunny-ears-partying\"\n    ],\n    u: \"1f46f-200d-2642-fe0f\"\n  },\n  {\n    n: [\n      \"woman-with-bunny-ears-partying\"\n    ],\n    u: \"1f46f-200d-2640-fe0f\"\n  },\n  {\n    n: [\n      \"person in steamy room\",\n      \"person_in_steamy_room\"\n    ],\n    u: \"1f9d6\",\n    v: [\n      \"1f9d6-1f3fb\",\n      \"1f9d6-1f3fc\",\n      \"1f9d6-1f3fd\",\n      \"1f9d6-1f3fe\",\n      \"1f9d6-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"woman_in_steamy_room\"\n    ],\n    u: \"1f9d6-200d-2640-fe0f\",\n    v: [\n      \"1f9d6-1f3fb-200d-2640-fe0f\",\n      \"1f9d6-1f3fc-200d-2640-fe0f\",\n      \"1f9d6-1f3fd-200d-2640-fe0f\",\n      \"1f9d6-1f3fe-200d-2640-fe0f\",\n      \"1f9d6-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man_in_steamy_room\"\n    ],\n    u: \"1f9d6-200d-2642-fe0f\",\n    v: [\n      \"1f9d6-1f3fb-200d-2642-fe0f\",\n      \"1f9d6-1f3fc-200d-2642-fe0f\",\n      \"1f9d6-1f3fd-200d-2642-fe0f\",\n      \"1f9d6-1f3fe-200d-2642-fe0f\",\n      \"1f9d6-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"person climbing\",\n      \"person_climbing\"\n    ],\n    u: \"1f9d7\",\n    v: [\n      \"1f9d7-1f3fb\",\n      \"1f9d7-1f3fc\",\n      \"1f9d7-1f3fd\",\n      \"1f9d7-1f3fe\",\n      \"1f9d7-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"woman_climbing\"\n    ],\n    u: \"1f9d7-200d-2640-fe0f\",\n    v: [\n      \"1f9d7-1f3fb-200d-2640-fe0f\",\n      \"1f9d7-1f3fc-200d-2640-fe0f\",\n      \"1f9d7-1f3fd-200d-2640-fe0f\",\n      \"1f9d7-1f3fe-200d-2640-fe0f\",\n      \"1f9d7-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man_climbing\"\n    ],\n    u: \"1f9d7-200d-2642-fe0f\",\n    v: [\n      \"1f9d7-1f3fb-200d-2642-fe0f\",\n      \"1f9d7-1f3fc-200d-2642-fe0f\",\n      \"1f9d7-1f3fd-200d-2642-fe0f\",\n      \"1f9d7-1f3fe-200d-2642-fe0f\",\n      \"1f9d7-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"person in lotus position\",\n      \"person_in_lotus_position\"\n    ],\n    u: \"1f9d8\",\n    v: [\n      \"1f9d8-1f3fb\",\n      \"1f9d8-1f3fc\",\n      \"1f9d8-1f3fd\",\n      \"1f9d8-1f3fe\",\n      \"1f9d8-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"woman_in_lotus_position\"\n    ],\n    u: \"1f9d8-200d-2640-fe0f\",\n    v: [\n      \"1f9d8-1f3fb-200d-2640-fe0f\",\n      \"1f9d8-1f3fc-200d-2640-fe0f\",\n      \"1f9d8-1f3fd-200d-2640-fe0f\",\n      \"1f9d8-1f3fe-200d-2640-fe0f\",\n      \"1f9d8-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man_in_lotus_position\"\n    ],\n    u: \"1f9d8-200d-2642-fe0f\",\n    v: [\n      \"1f9d8-1f3fb-200d-2642-fe0f\",\n      \"1f9d8-1f3fc-200d-2642-fe0f\",\n      \"1f9d8-1f3fd-200d-2642-fe0f\",\n      \"1f9d8-1f3fe-200d-2642-fe0f\",\n      \"1f9d8-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"bath\"\n    ],\n    u: \"1f6c0\",\n    v: [\n      \"1f6c0-1f3fb\",\n      \"1f6c0-1f3fc\",\n      \"1f6c0-1f3fd\",\n      \"1f6c0-1f3fe\",\n      \"1f6c0-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"sleeping accommodation\",\n      \"sleeping_accommodation\"\n    ],\n    u: \"1f6cc\",\n    v: [\n      \"1f6cc-1f3fb\",\n      \"1f6cc-1f3fc\",\n      \"1f6cc-1f3fd\",\n      \"1f6cc-1f3fe\",\n      \"1f6cc-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man_in_business_suit_levitating\"\n    ],\n    u: \"1f574-fe0f\",\n    v: [\n      \"1f574-1f3fb\",\n      \"1f574-1f3fc\",\n      \"1f574-1f3fd\",\n      \"1f574-1f3fe\",\n      \"1f574-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"speaking_head_in_silhouette\"\n    ],\n    u: \"1f5e3-fe0f\"\n  },\n  {\n    n: [\n      \"bust in silhouette\",\n      \"bust_in_silhouette\"\n    ],\n    u: \"1f464\"\n  },\n  {\n    n: [\n      \"busts in silhouette\",\n      \"busts_in_silhouette\"\n    ],\n    u: \"1f465\"\n  },\n  {\n    n: [\n      \"fencer\"\n    ],\n    u: \"1f93a\"\n  },\n  {\n    n: [\n      \"horse racing\",\n      \"horse_racing\"\n    ],\n    u: \"1f3c7\",\n    v: [\n      \"1f3c7-1f3fb\",\n      \"1f3c7-1f3fc\",\n      \"1f3c7-1f3fd\",\n      \"1f3c7-1f3fe\",\n      \"1f3c7-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"skier\"\n    ],\n    u: \"26f7-fe0f\"\n  },\n  {\n    n: [\n      \"snowboarder\"\n    ],\n    u: \"1f3c2\",\n    v: [\n      \"1f3c2-1f3fb\",\n      \"1f3c2-1f3fc\",\n      \"1f3c2-1f3fd\",\n      \"1f3c2-1f3fe\",\n      \"1f3c2-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"golfer\"\n    ],\n    u: \"1f3cc-fe0f\",\n    v: [\n      \"1f3cc-1f3fb\",\n      \"1f3cc-1f3fc\",\n      \"1f3cc-1f3fd\",\n      \"1f3cc-1f3fe\",\n      \"1f3cc-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-golfing\"\n    ],\n    u: \"1f3cc-fe0f-200d-2642-fe0f\",\n    v: [\n      \"1f3cc-1f3fb-200d-2642-fe0f\",\n      \"1f3cc-1f3fc-200d-2642-fe0f\",\n      \"1f3cc-1f3fd-200d-2642-fe0f\",\n      \"1f3cc-1f3fe-200d-2642-fe0f\",\n      \"1f3cc-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-golfing\"\n    ],\n    u: \"1f3cc-fe0f-200d-2640-fe0f\",\n    v: [\n      \"1f3cc-1f3fb-200d-2640-fe0f\",\n      \"1f3cc-1f3fc-200d-2640-fe0f\",\n      \"1f3cc-1f3fd-200d-2640-fe0f\",\n      \"1f3cc-1f3fe-200d-2640-fe0f\",\n      \"1f3cc-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"surfer\"\n    ],\n    u: \"1f3c4\",\n    v: [\n      \"1f3c4-1f3fb\",\n      \"1f3c4-1f3fc\",\n      \"1f3c4-1f3fd\",\n      \"1f3c4-1f3fe\",\n      \"1f3c4-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-surfing\"\n    ],\n    u: \"1f3c4-200d-2642-fe0f\",\n    v: [\n      \"1f3c4-1f3fb-200d-2642-fe0f\",\n      \"1f3c4-1f3fc-200d-2642-fe0f\",\n      \"1f3c4-1f3fd-200d-2642-fe0f\",\n      \"1f3c4-1f3fe-200d-2642-fe0f\",\n      \"1f3c4-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-surfing\"\n    ],\n    u: \"1f3c4-200d-2640-fe0f\",\n    v: [\n      \"1f3c4-1f3fb-200d-2640-fe0f\",\n      \"1f3c4-1f3fc-200d-2640-fe0f\",\n      \"1f3c4-1f3fd-200d-2640-fe0f\",\n      \"1f3c4-1f3fe-200d-2640-fe0f\",\n      \"1f3c4-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"rowboat\"\n    ],\n    u: \"1f6a3\",\n    v: [\n      \"1f6a3-1f3fb\",\n      \"1f6a3-1f3fc\",\n      \"1f6a3-1f3fd\",\n      \"1f6a3-1f3fe\",\n      \"1f6a3-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-rowing-boat\"\n    ],\n    u: \"1f6a3-200d-2642-fe0f\",\n    v: [\n      \"1f6a3-1f3fb-200d-2642-fe0f\",\n      \"1f6a3-1f3fc-200d-2642-fe0f\",\n      \"1f6a3-1f3fd-200d-2642-fe0f\",\n      \"1f6a3-1f3fe-200d-2642-fe0f\",\n      \"1f6a3-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-rowing-boat\"\n    ],\n    u: \"1f6a3-200d-2640-fe0f\",\n    v: [\n      \"1f6a3-1f3fb-200d-2640-fe0f\",\n      \"1f6a3-1f3fc-200d-2640-fe0f\",\n      \"1f6a3-1f3fd-200d-2640-fe0f\",\n      \"1f6a3-1f3fe-200d-2640-fe0f\",\n      \"1f6a3-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"swimmer\"\n    ],\n    u: \"1f3ca\",\n    v: [\n      \"1f3ca-1f3fb\",\n      \"1f3ca-1f3fc\",\n      \"1f3ca-1f3fd\",\n      \"1f3ca-1f3fe\",\n      \"1f3ca-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-swimming\"\n    ],\n    u: \"1f3ca-200d-2642-fe0f\",\n    v: [\n      \"1f3ca-1f3fb-200d-2642-fe0f\",\n      \"1f3ca-1f3fc-200d-2642-fe0f\",\n      \"1f3ca-1f3fd-200d-2642-fe0f\",\n      \"1f3ca-1f3fe-200d-2642-fe0f\",\n      \"1f3ca-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-swimming\"\n    ],\n    u: \"1f3ca-200d-2640-fe0f\",\n    v: [\n      \"1f3ca-1f3fb-200d-2640-fe0f\",\n      \"1f3ca-1f3fc-200d-2640-fe0f\",\n      \"1f3ca-1f3fd-200d-2640-fe0f\",\n      \"1f3ca-1f3fe-200d-2640-fe0f\",\n      \"1f3ca-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"person_with_ball\"\n    ],\n    u: \"26f9-fe0f\",\n    v: [\n      \"26f9-1f3fb\",\n      \"26f9-1f3fc\",\n      \"26f9-1f3fd\",\n      \"26f9-1f3fe\",\n      \"26f9-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-bouncing-ball\"\n    ],\n    u: \"26f9-fe0f-200d-2642-fe0f\",\n    v: [\n      \"26f9-1f3fb-200d-2642-fe0f\",\n      \"26f9-1f3fc-200d-2642-fe0f\",\n      \"26f9-1f3fd-200d-2642-fe0f\",\n      \"26f9-1f3fe-200d-2642-fe0f\",\n      \"26f9-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-bouncing-ball\"\n    ],\n    u: \"26f9-fe0f-200d-2640-fe0f\",\n    v: [\n      \"26f9-1f3fb-200d-2640-fe0f\",\n      \"26f9-1f3fc-200d-2640-fe0f\",\n      \"26f9-1f3fd-200d-2640-fe0f\",\n      \"26f9-1f3fe-200d-2640-fe0f\",\n      \"26f9-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"weight_lifter\"\n    ],\n    u: \"1f3cb-fe0f\",\n    v: [\n      \"1f3cb-1f3fb\",\n      \"1f3cb-1f3fc\",\n      \"1f3cb-1f3fd\",\n      \"1f3cb-1f3fe\",\n      \"1f3cb-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-lifting-weights\"\n    ],\n    u: \"1f3cb-fe0f-200d-2642-fe0f\",\n    v: [\n      \"1f3cb-1f3fb-200d-2642-fe0f\",\n      \"1f3cb-1f3fc-200d-2642-fe0f\",\n      \"1f3cb-1f3fd-200d-2642-fe0f\",\n      \"1f3cb-1f3fe-200d-2642-fe0f\",\n      \"1f3cb-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-lifting-weights\"\n    ],\n    u: \"1f3cb-fe0f-200d-2640-fe0f\",\n    v: [\n      \"1f3cb-1f3fb-200d-2640-fe0f\",\n      \"1f3cb-1f3fc-200d-2640-fe0f\",\n      \"1f3cb-1f3fd-200d-2640-fe0f\",\n      \"1f3cb-1f3fe-200d-2640-fe0f\",\n      \"1f3cb-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"bicyclist\"\n    ],\n    u: \"1f6b4\",\n    v: [\n      \"1f6b4-1f3fb\",\n      \"1f6b4-1f3fc\",\n      \"1f6b4-1f3fd\",\n      \"1f6b4-1f3fe\",\n      \"1f6b4-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-biking\"\n    ],\n    u: \"1f6b4-200d-2642-fe0f\",\n    v: [\n      \"1f6b4-1f3fb-200d-2642-fe0f\",\n      \"1f6b4-1f3fc-200d-2642-fe0f\",\n      \"1f6b4-1f3fd-200d-2642-fe0f\",\n      \"1f6b4-1f3fe-200d-2642-fe0f\",\n      \"1f6b4-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-biking\"\n    ],\n    u: \"1f6b4-200d-2640-fe0f\",\n    v: [\n      \"1f6b4-1f3fb-200d-2640-fe0f\",\n      \"1f6b4-1f3fc-200d-2640-fe0f\",\n      \"1f6b4-1f3fd-200d-2640-fe0f\",\n      \"1f6b4-1f3fe-200d-2640-fe0f\",\n      \"1f6b4-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"mountain bicyclist\",\n      \"mountain_bicyclist\"\n    ],\n    u: \"1f6b5\",\n    v: [\n      \"1f6b5-1f3fb\",\n      \"1f6b5-1f3fc\",\n      \"1f6b5-1f3fd\",\n      \"1f6b5-1f3fe\",\n      \"1f6b5-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-mountain-biking\"\n    ],\n    u: \"1f6b5-200d-2642-fe0f\",\n    v: [\n      \"1f6b5-1f3fb-200d-2642-fe0f\",\n      \"1f6b5-1f3fc-200d-2642-fe0f\",\n      \"1f6b5-1f3fd-200d-2642-fe0f\",\n      \"1f6b5-1f3fe-200d-2642-fe0f\",\n      \"1f6b5-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-mountain-biking\"\n    ],\n    u: \"1f6b5-200d-2640-fe0f\",\n    v: [\n      \"1f6b5-1f3fb-200d-2640-fe0f\",\n      \"1f6b5-1f3fc-200d-2640-fe0f\",\n      \"1f6b5-1f3fd-200d-2640-fe0f\",\n      \"1f6b5-1f3fe-200d-2640-fe0f\",\n      \"1f6b5-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"racing_car\"\n    ],\n    u: \"1f3ce-fe0f\"\n  },\n  {\n    n: [\n      \"racing_motorcycle\"\n    ],\n    u: \"1f3cd-fe0f\"\n  },\n  {\n    n: [\n      \"person doing cartwheel\",\n      \"person_doing_cartwheel\"\n    ],\n    u: \"1f938\",\n    v: [\n      \"1f938-1f3fb\",\n      \"1f938-1f3fc\",\n      \"1f938-1f3fd\",\n      \"1f938-1f3fe\",\n      \"1f938-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-cartwheeling\"\n    ],\n    u: \"1f938-200d-2642-fe0f\",\n    v: [\n      \"1f938-1f3fb-200d-2642-fe0f\",\n      \"1f938-1f3fc-200d-2642-fe0f\",\n      \"1f938-1f3fd-200d-2642-fe0f\",\n      \"1f938-1f3fe-200d-2642-fe0f\",\n      \"1f938-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-cartwheeling\"\n    ],\n    u: \"1f938-200d-2640-fe0f\",\n    v: [\n      \"1f938-1f3fb-200d-2640-fe0f\",\n      \"1f938-1f3fc-200d-2640-fe0f\",\n      \"1f938-1f3fd-200d-2640-fe0f\",\n      \"1f938-1f3fe-200d-2640-fe0f\",\n      \"1f938-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"wrestlers\"\n    ],\n    u: \"1f93c\"\n  },\n  {\n    n: [\n      \"man-wrestling\"\n    ],\n    u: \"1f93c-200d-2642-fe0f\"\n  },\n  {\n    n: [\n      \"woman-wrestling\"\n    ],\n    u: \"1f93c-200d-2640-fe0f\"\n  },\n  {\n    n: [\n      \"water polo\",\n      \"water_polo\"\n    ],\n    u: \"1f93d\",\n    v: [\n      \"1f93d-1f3fb\",\n      \"1f93d-1f3fc\",\n      \"1f93d-1f3fd\",\n      \"1f93d-1f3fe\",\n      \"1f93d-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-playing-water-polo\"\n    ],\n    u: \"1f93d-200d-2642-fe0f\",\n    v: [\n      \"1f93d-1f3fb-200d-2642-fe0f\",\n      \"1f93d-1f3fc-200d-2642-fe0f\",\n      \"1f93d-1f3fd-200d-2642-fe0f\",\n      \"1f93d-1f3fe-200d-2642-fe0f\",\n      \"1f93d-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-playing-water-polo\"\n    ],\n    u: \"1f93d-200d-2640-fe0f\",\n    v: [\n      \"1f93d-1f3fb-200d-2640-fe0f\",\n      \"1f93d-1f3fc-200d-2640-fe0f\",\n      \"1f93d-1f3fd-200d-2640-fe0f\",\n      \"1f93d-1f3fe-200d-2640-fe0f\",\n      \"1f93d-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"handball\"\n    ],\n    u: \"1f93e\",\n    v: [\n      \"1f93e-1f3fb\",\n      \"1f93e-1f3fc\",\n      \"1f93e-1f3fd\",\n      \"1f93e-1f3fe\",\n      \"1f93e-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-playing-handball\"\n    ],\n    u: \"1f93e-200d-2642-fe0f\",\n    v: [\n      \"1f93e-1f3fb-200d-2642-fe0f\",\n      \"1f93e-1f3fc-200d-2642-fe0f\",\n      \"1f93e-1f3fd-200d-2642-fe0f\",\n      \"1f93e-1f3fe-200d-2642-fe0f\",\n      \"1f93e-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-playing-handball\"\n    ],\n    u: \"1f93e-200d-2640-fe0f\",\n    v: [\n      \"1f93e-1f3fb-200d-2640-fe0f\",\n      \"1f93e-1f3fc-200d-2640-fe0f\",\n      \"1f93e-1f3fd-200d-2640-fe0f\",\n      \"1f93e-1f3fe-200d-2640-fe0f\",\n      \"1f93e-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"juggling\"\n    ],\n    u: \"1f939\",\n    v: [\n      \"1f939-1f3fb\",\n      \"1f939-1f3fc\",\n      \"1f939-1f3fd\",\n      \"1f939-1f3fe\",\n      \"1f939-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"man-juggling\"\n    ],\n    u: \"1f939-200d-2642-fe0f\",\n    v: [\n      \"1f939-1f3fb-200d-2642-fe0f\",\n      \"1f939-1f3fc-200d-2642-fe0f\",\n      \"1f939-1f3fd-200d-2642-fe0f\",\n      \"1f939-1f3fe-200d-2642-fe0f\",\n      \"1f939-1f3ff-200d-2642-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"woman-juggling\"\n    ],\n    u: \"1f939-200d-2640-fe0f\",\n    v: [\n      \"1f939-1f3fb-200d-2640-fe0f\",\n      \"1f939-1f3fc-200d-2640-fe0f\",\n      \"1f939-1f3fd-200d-2640-fe0f\",\n      \"1f939-1f3fe-200d-2640-fe0f\",\n      \"1f939-1f3ff-200d-2640-fe0f\"\n    ]\n  },\n  {\n    n: [\n      \"man and woman holding hands\",\n      \"couple\",\n      \"man_and_woman_holding_hands\"\n    ],\n    u: \"1f46b\"\n  },\n  {\n    n: [\n      \"two men holding hands\",\n      \"two_men_holding_hands\"\n    ],\n    u: \"1f46c\"\n  },\n  {\n    n: [\n      \"two women holding hands\",\n      \"two_women_holding_hands\"\n    ],\n    u: \"1f46d\"\n  },\n  {\n    n: [\n      \"kiss\",\n      \"couplekiss\"\n    ],\n    u: \"1f48f\"\n  },\n  {\n    n: [\n      \"woman-kiss-man\"\n    ],\n    u: \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468\"\n  },\n  {\n    n: [\n      \"man-kiss-man\"\n    ],\n    u: \"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468\"\n  },\n  {\n    n: [\n      \"woman-kiss-woman\"\n    ],\n    u: \"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469\"\n  },\n  {\n    n: [\n      \"couple with heart\",\n      \"couple_with_heart\"\n    ],\n    u: \"1f491\"\n  },\n  {\n    n: [\n      \"woman-heart-man\"\n    ],\n    u: \"1f469-200d-2764-fe0f-200d-1f468\"\n  },\n  {\n    n: [\n      \"man-heart-man\"\n    ],\n    u: \"1f468-200d-2764-fe0f-200d-1f468\"\n  },\n  {\n    n: [\n      \"woman-heart-woman\"\n    ],\n    u: \"1f469-200d-2764-fe0f-200d-1f469\"\n  },\n  {\n    n: [\n      \"family\",\n      \"man-woman-boy\"\n    ],\n    u: \"1f46a\"\n  },\n  {\n    n: [\n      \"man-woman-boy\",\n      \"family\"\n    ],\n    u: \"1f468-200d-1f469-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-woman-girl\"\n    ],\n    u: \"1f468-200d-1f469-200d-1f467\"\n  },\n  {\n    n: [\n      \"man-woman-girl-boy\"\n    ],\n    u: \"1f468-200d-1f469-200d-1f467-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-woman-boy-boy\"\n    ],\n    u: \"1f468-200d-1f469-200d-1f466-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-woman-girl-girl\"\n    ],\n    u: \"1f468-200d-1f469-200d-1f467-200d-1f467\"\n  },\n  {\n    n: [\n      \"man-man-boy\"\n    ],\n    u: \"1f468-200d-1f468-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-man-girl\"\n    ],\n    u: \"1f468-200d-1f468-200d-1f467\"\n  },\n  {\n    n: [\n      \"man-man-girl-boy\"\n    ],\n    u: \"1f468-200d-1f468-200d-1f467-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-man-boy-boy\"\n    ],\n    u: \"1f468-200d-1f468-200d-1f466-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-man-girl-girl\"\n    ],\n    u: \"1f468-200d-1f468-200d-1f467-200d-1f467\"\n  },\n  {\n    n: [\n      \"woman-woman-boy\"\n    ],\n    u: \"1f469-200d-1f469-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-woman-girl\"\n    ],\n    u: \"1f469-200d-1f469-200d-1f467\"\n  },\n  {\n    n: [\n      \"woman-woman-girl-boy\"\n    ],\n    u: \"1f469-200d-1f469-200d-1f467-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-woman-boy-boy\"\n    ],\n    u: \"1f469-200d-1f469-200d-1f466-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-woman-girl-girl\"\n    ],\n    u: \"1f469-200d-1f469-200d-1f467-200d-1f467\"\n  },\n  {\n    n: [\n      \"man-boy\"\n    ],\n    u: \"1f468-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-boy-boy\"\n    ],\n    u: \"1f468-200d-1f466-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-girl\"\n    ],\n    u: \"1f468-200d-1f467\"\n  },\n  {\n    n: [\n      \"man-girl-boy\"\n    ],\n    u: \"1f468-200d-1f467-200d-1f466\"\n  },\n  {\n    n: [\n      \"man-girl-girl\"\n    ],\n    u: \"1f468-200d-1f467-200d-1f467\"\n  },\n  {\n    n: [\n      \"woman-boy\"\n    ],\n    u: \"1f469-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-boy-boy\"\n    ],\n    u: \"1f469-200d-1f466-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-girl\"\n    ],\n    u: \"1f469-200d-1f467\"\n  },\n  {\n    n: [\n      \"woman-girl-boy\"\n    ],\n    u: \"1f469-200d-1f467-200d-1f466\"\n  },\n  {\n    n: [\n      \"woman-girl-girl\"\n    ],\n    u: \"1f469-200d-1f467-200d-1f467\"\n  },\n  {\n    n: [\n      \"selfie\"\n    ],\n    u: \"1f933\",\n    v: [\n      \"1f933-1f3fb\",\n      \"1f933-1f3fc\",\n      \"1f933-1f3fd\",\n      \"1f933-1f3fe\",\n      \"1f933-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"flexed biceps\",\n      \"muscle\"\n    ],\n    u: \"1f4aa\",\n    v: [\n      \"1f4aa-1f3fb\",\n      \"1f4aa-1f3fc\",\n      \"1f4aa-1f3fd\",\n      \"1f4aa-1f3fe\",\n      \"1f4aa-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"white left pointing backhand index\",\n      \"point_left\"\n    ],\n    u: \"1f448\",\n    v: [\n      \"1f448-1f3fb\",\n      \"1f448-1f3fc\",\n      \"1f448-1f3fd\",\n      \"1f448-1f3fe\",\n      \"1f448-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"white right pointing backhand index\",\n      \"point_right\"\n    ],\n    u: \"1f449\",\n    v: [\n      \"1f449-1f3fb\",\n      \"1f449-1f3fc\",\n      \"1f449-1f3fd\",\n      \"1f449-1f3fe\",\n      \"1f449-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"white up pointing index\",\n      \"point_up\"\n    ],\n    u: \"261d-fe0f\",\n    v: [\n      \"261d-1f3fb\",\n      \"261d-1f3fc\",\n      \"261d-1f3fd\",\n      \"261d-1f3fe\",\n      \"261d-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"white up pointing backhand index\",\n      \"point_up_2\"\n    ],\n    u: \"1f446\",\n    v: [\n      \"1f446-1f3fb\",\n      \"1f446-1f3fc\",\n      \"1f446-1f3fd\",\n      \"1f446-1f3fe\",\n      \"1f446-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"reversed hand with middle finger extended\",\n      \"middle_finger\",\n      \"reversed_hand_with_middle_finger_extended\"\n    ],\n    u: \"1f595\",\n    v: [\n      \"1f595-1f3fb\",\n      \"1f595-1f3fc\",\n      \"1f595-1f3fd\",\n      \"1f595-1f3fe\",\n      \"1f595-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"white down pointing backhand index\",\n      \"point_down\"\n    ],\n    u: \"1f447\",\n    v: [\n      \"1f447-1f3fb\",\n      \"1f447-1f3fc\",\n      \"1f447-1f3fd\",\n      \"1f447-1f3fe\",\n      \"1f447-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"victory hand\",\n      \"v\"\n    ],\n    u: \"270c-fe0f\",\n    v: [\n      \"270c-1f3fb\",\n      \"270c-1f3fc\",\n      \"270c-1f3fd\",\n      \"270c-1f3fe\",\n      \"270c-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"hand with index and middle fingers crossed\",\n      \"crossed_fingers\",\n      \"hand_with_index_and_middle_fingers_crossed\"\n    ],\n    u: \"1f91e\",\n    v: [\n      \"1f91e-1f3fb\",\n      \"1f91e-1f3fc\",\n      \"1f91e-1f3fd\",\n      \"1f91e-1f3fe\",\n      \"1f91e-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"raised hand with part between middle and ring fingers\",\n      \"spock-hand\"\n    ],\n    u: \"1f596\",\n    v: [\n      \"1f596-1f3fb\",\n      \"1f596-1f3fc\",\n      \"1f596-1f3fd\",\n      \"1f596-1f3fe\",\n      \"1f596-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"sign of the horns\",\n      \"the_horns\",\n      \"sign_of_the_horns\"\n    ],\n    u: \"1f918\",\n    v: [\n      \"1f918-1f3fb\",\n      \"1f918-1f3fc\",\n      \"1f918-1f3fd\",\n      \"1f918-1f3fe\",\n      \"1f918-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"call me hand\",\n      \"call_me_hand\"\n    ],\n    u: \"1f919\",\n    v: [\n      \"1f919-1f3fb\",\n      \"1f919-1f3fc\",\n      \"1f919-1f3fd\",\n      \"1f919-1f3fe\",\n      \"1f919-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"raised_hand_with_fingers_splayed\"\n    ],\n    u: \"1f590-fe0f\",\n    v: [\n      \"1f590-1f3fb\",\n      \"1f590-1f3fc\",\n      \"1f590-1f3fd\",\n      \"1f590-1f3fe\",\n      \"1f590-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"raised hand\",\n      \"hand\",\n      \"raised_hand\"\n    ],\n    u: \"270b\",\n    v: [\n      \"270b-1f3fb\",\n      \"270b-1f3fc\",\n      \"270b-1f3fd\",\n      \"270b-1f3fe\",\n      \"270b-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"ok hand sign\",\n      \"ok_hand\"\n    ],\n    u: \"1f44c\",\n    v: [\n      \"1f44c-1f3fb\",\n      \"1f44c-1f3fc\",\n      \"1f44c-1f3fd\",\n      \"1f44c-1f3fe\",\n      \"1f44c-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"thumbs up sign\",\n      \"+1\",\n      \"thumbsup\"\n    ],\n    u: \"1f44d\",\n    v: [\n      \"1f44d-1f3fb\",\n      \"1f44d-1f3fc\",\n      \"1f44d-1f3fd\",\n      \"1f44d-1f3fe\",\n      \"1f44d-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"thumbs down sign\",\n      \"-1\",\n      \"thumbsdown\"\n    ],\n    u: \"1f44e\",\n    v: [\n      \"1f44e-1f3fb\",\n      \"1f44e-1f3fc\",\n      \"1f44e-1f3fd\",\n      \"1f44e-1f3fe\",\n      \"1f44e-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"raised fist\",\n      \"fist\"\n    ],\n    u: \"270a\",\n    v: [\n      \"270a-1f3fb\",\n      \"270a-1f3fc\",\n      \"270a-1f3fd\",\n      \"270a-1f3fe\",\n      \"270a-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"fisted hand sign\",\n      \"facepunch\",\n      \"punch\"\n    ],\n    u: \"1f44a\",\n    v: [\n      \"1f44a-1f3fb\",\n      \"1f44a-1f3fc\",\n      \"1f44a-1f3fd\",\n      \"1f44a-1f3fe\",\n      \"1f44a-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"left-facing fist\",\n      \"left-facing_fist\"\n    ],\n    u: \"1f91b\",\n    v: [\n      \"1f91b-1f3fb\",\n      \"1f91b-1f3fc\",\n      \"1f91b-1f3fd\",\n      \"1f91b-1f3fe\",\n      \"1f91b-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"right-facing fist\",\n      \"right-facing_fist\"\n    ],\n    u: \"1f91c\",\n    v: [\n      \"1f91c-1f3fb\",\n      \"1f91c-1f3fc\",\n      \"1f91c-1f3fd\",\n      \"1f91c-1f3fe\",\n      \"1f91c-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"raised back of hand\",\n      \"raised_back_of_hand\"\n    ],\n    u: \"1f91a\",\n    v: [\n      \"1f91a-1f3fb\",\n      \"1f91a-1f3fc\",\n      \"1f91a-1f3fd\",\n      \"1f91a-1f3fe\",\n      \"1f91a-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"waving hand sign\",\n      \"wave\"\n    ],\n    u: \"1f44b\",\n    v: [\n      \"1f44b-1f3fb\",\n      \"1f44b-1f3fc\",\n      \"1f44b-1f3fd\",\n      \"1f44b-1f3fe\",\n      \"1f44b-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"i love you hand sign\",\n      \"i_love_you_hand_sign\"\n    ],\n    u: \"1f91f\",\n    v: [\n      \"1f91f-1f3fb\",\n      \"1f91f-1f3fc\",\n      \"1f91f-1f3fd\",\n      \"1f91f-1f3fe\",\n      \"1f91f-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"writing_hand\"\n    ],\n    u: \"270d-fe0f\",\n    v: [\n      \"270d-1f3fb\",\n      \"270d-1f3fc\",\n      \"270d-1f3fd\",\n      \"270d-1f3fe\",\n      \"270d-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"clapping hands sign\",\n      \"clap\"\n    ],\n    u: \"1f44f\",\n    v: [\n      \"1f44f-1f3fb\",\n      \"1f44f-1f3fc\",\n      \"1f44f-1f3fd\",\n      \"1f44f-1f3fe\",\n      \"1f44f-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"open hands sign\",\n      \"open_hands\"\n    ],\n    u: \"1f450\",\n    v: [\n      \"1f450-1f3fb\",\n      \"1f450-1f3fc\",\n      \"1f450-1f3fd\",\n      \"1f450-1f3fe\",\n      \"1f450-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"person raising both hands in celebration\",\n      \"raised_hands\"\n    ],\n    u: \"1f64c\",\n    v: [\n      \"1f64c-1f3fb\",\n      \"1f64c-1f3fc\",\n      \"1f64c-1f3fd\",\n      \"1f64c-1f3fe\",\n      \"1f64c-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"palms up together\",\n      \"palms_up_together\"\n    ],\n    u: \"1f932\",\n    v: [\n      \"1f932-1f3fb\",\n      \"1f932-1f3fc\",\n      \"1f932-1f3fd\",\n      \"1f932-1f3fe\",\n      \"1f932-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"person with folded hands\",\n      \"pray\"\n    ],\n    u: \"1f64f\",\n    v: [\n      \"1f64f-1f3fb\",\n      \"1f64f-1f3fc\",\n      \"1f64f-1f3fd\",\n      \"1f64f-1f3fe\",\n      \"1f64f-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"handshake\"\n    ],\n    u: \"1f91d\"\n  },\n  {\n    n: [\n      \"nail polish\",\n      \"nail_care\"\n    ],\n    u: \"1f485\",\n    v: [\n      \"1f485-1f3fb\",\n      \"1f485-1f3fc\",\n      \"1f485-1f3fd\",\n      \"1f485-1f3fe\",\n      \"1f485-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"ear\"\n    ],\n    u: \"1f442\",\n    v: [\n      \"1f442-1f3fb\",\n      \"1f442-1f3fc\",\n      \"1f442-1f3fd\",\n      \"1f442-1f3fe\",\n      \"1f442-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"nose\"\n    ],\n    u: \"1f443\",\n    v: [\n      \"1f443-1f3fb\",\n      \"1f443-1f3fc\",\n      \"1f443-1f3fd\",\n      \"1f443-1f3fe\",\n      \"1f443-1f3ff\"\n    ]\n  },\n  {\n    n: [\n      \"footprints\"\n    ],\n    u: \"1f463\"\n  },\n  {\n    n: [\n      \"eyes\"\n    ],\n    u: \"1f440\"\n  },\n  {\n    n: [\n      \"eye\"\n    ],\n    u: \"1f441-fe0f\"\n  },\n  {\n    n: [\n      \"eye-in-speech-bubble\"\n    ],\n    u: \"1f441-fe0f-200d-1f5e8-fe0f\"\n  },\n  {\n    n: [\n      \"brain\"\n    ],\n    u: \"1f9e0\"\n  },\n  {\n    n: [\n      \"tongue\"\n    ],\n    u: \"1f445\"\n  },\n  {\n    n: [\n      \"mouth\",\n      \"lips\"\n    ],\n    u: \"1f444\"\n  },\n  {\n    n: [\n      \"kiss mark\",\n      \"kiss\"\n    ],\n    u: \"1f48b\"\n  },\n  {\n    n: [\n      \"heart with arrow\",\n      \"cupid\"\n    ],\n    u: \"1f498\"\n  },\n  {\n    n: [\n      \"heavy black heart\",\n      \"heart\"\n    ],\n    u: \"2764-fe0f\"\n  },\n  {\n    n: [\n      \"beating heart\",\n      \"heartbeat\"\n    ],\n    u: \"1f493\"\n  },\n  {\n    n: [\n      \"broken heart\",\n      \"broken_heart\"\n    ],\n    u: \"1f494\"\n  },\n  {\n    n: [\n      \"two hearts\",\n      \"two_hearts\"\n    ],\n    u: \"1f495\"\n  },\n  {\n    n: [\n      \"sparkling heart\",\n      \"sparkling_heart\"\n    ],\n    u: \"1f496\"\n  },\n  {\n    n: [\n      \"growing heart\",\n      \"heartpulse\"\n    ],\n    u: \"1f497\"\n  },\n  {\n    n: [\n      \"blue heart\",\n      \"blue_heart\"\n    ],\n    u: \"1f499\"\n  },\n  {\n    n: [\n      \"green heart\",\n      \"green_heart\"\n    ],\n    u: \"1f49a\"\n  },\n  {\n    n: [\n      \"yellow heart\",\n      \"yellow_heart\"\n    ],\n    u: \"1f49b\"\n  },\n  {\n    n: [\n      \"orange heart\",\n      \"orange_heart\"\n    ],\n    u: \"1f9e1\"\n  },\n  {\n    n: [\n      \"purple heart\",\n      \"purple_heart\"\n    ],\n    u: \"1f49c\"\n  },\n  {\n    n: [\n      \"black heart\",\n      \"black_heart\"\n    ],\n    u: \"1f5a4\"\n  },\n  {\n    n: [\n      \"heart with ribbon\",\n      \"gift_heart\"\n    ],\n    u: \"1f49d\"\n  },\n  {\n    n: [\n      \"revolving hearts\",\n      \"revolving_hearts\"\n    ],\n    u: \"1f49e\"\n  },\n  {\n    n: [\n      \"heart decoration\",\n      \"heart_decoration\"\n    ],\n    u: \"1f49f\"\n  },\n  {\n    n: [\n      \"heavy_heart_exclamation_mark_ornament\"\n    ],\n    u: \"2763-fe0f\"\n  },\n  {\n    n: [\n      \"love letter\",\n      \"love_letter\"\n    ],\n    u: \"1f48c\"\n  },\n  {\n    n: [\n      \"sleeping symbol\",\n      \"zzz\"\n    ],\n    u: \"1f4a4\"\n  },\n  {\n    n: [\n      \"anger symbol\",\n      \"anger\"\n    ],\n    u: \"1f4a2\"\n  },\n  {\n    n: [\n      \"bomb\"\n    ],\n    u: \"1f4a3\"\n  },\n  {\n    n: [\n      \"collision symbol\",\n      \"boom\",\n      \"collision\"\n    ],\n    u: \"1f4a5\"\n  },\n  {\n    n: [\n      \"splashing sweat symbol\",\n      \"sweat_drops\"\n    ],\n    u: \"1f4a6\"\n  },\n  {\n    n: [\n      \"dash symbol\",\n      \"dash\"\n    ],\n    u: \"1f4a8\"\n  },\n  {\n    n: [\n      \"dizzy symbol\",\n      \"dizzy\"\n    ],\n    u: \"1f4ab\"\n  },\n  {\n    n: [\n      \"speech balloon\",\n      \"speech_balloon\"\n    ],\n    u: \"1f4ac\"\n  },\n  {\n    n: [\n      \"left_speech_bubble\"\n    ],\n    u: \"1f5e8-fe0f\"\n  },\n  {\n    n: [\n      \"right_anger_bubble\"\n    ],\n    u: \"1f5ef-fe0f\"\n  },\n  {\n    n: [\n      \"thought balloon\",\n      \"thought_balloon\"\n    ],\n    u: \"1f4ad\"\n  },\n  {\n    n: [\n      \"hole\"\n    ],\n    u: \"1f573-fe0f\"\n  },\n  {\n    n: [\n      \"eyeglasses\"\n    ],\n    u: \"1f453\"\n  },\n  {\n    n: [\n      \"dark_sunglasses\"\n    ],\n    u: \"1f576-fe0f\"\n  },\n  {\n    n: [\n      \"necktie\"\n    ],\n    u: \"1f454\"\n  },\n  {\n    n: [\n      \"t-shirt\",\n      \"shirt\",\n      \"tshirt\"\n    ],\n    u: \"1f455\"\n  },\n  {\n    n: [\n      \"jeans\"\n    ],\n    u: \"1f456\"\n  },\n  {\n    n: [\n      \"scarf\"\n    ],\n    u: \"1f9e3\"\n  },\n  {\n    n: [\n      \"gloves\"\n    ],\n    u: \"1f9e4\"\n  },\n  {\n    n: [\n      \"coat\"\n    ],\n    u: \"1f9e5\"\n  },\n  {\n    n: [\n      \"socks\"\n    ],\n    u: \"1f9e6\"\n  },\n  {\n    n: [\n      \"dress\"\n    ],\n    u: \"1f457\"\n  },\n  {\n    n: [\n      \"kimono\"\n    ],\n    u: \"1f458\"\n  },\n  {\n    n: [\n      \"bikini\"\n    ],\n    u: \"1f459\"\n  },\n  {\n    n: [\n      \"womans clothes\",\n      \"womans_clothes\"\n    ],\n    u: \"1f45a\"\n  },\n  {\n    n: [\n      \"purse\"\n    ],\n    u: \"1f45b\"\n  },\n  {\n    n: [\n      \"handbag\"\n    ],\n    u: \"1f45c\"\n  },\n  {\n    n: [\n      \"pouch\"\n    ],\n    u: \"1f45d\"\n  },\n  {\n    n: [\n      \"shopping_bags\"\n    ],\n    u: \"1f6cd-fe0f\"\n  },\n  {\n    n: [\n      \"school satchel\",\n      \"school_satchel\"\n    ],\n    u: \"1f392\"\n  },\n  {\n    n: [\n      \"mans shoe\",\n      \"mans_shoe\",\n      \"shoe\"\n    ],\n    u: \"1f45e\"\n  },\n  {\n    n: [\n      \"athletic shoe\",\n      \"athletic_shoe\"\n    ],\n    u: \"1f45f\"\n  },\n  {\n    n: [\n      \"high-heeled shoe\",\n      \"high_heel\"\n    ],\n    u: \"1f460\"\n  },\n  {\n    n: [\n      \"womans sandal\",\n      \"sandal\"\n    ],\n    u: \"1f461\"\n  },\n  {\n    n: [\n      \"womans boots\",\n      \"boot\"\n    ],\n    u: \"1f462\"\n  },\n  {\n    n: [\n      \"crown\"\n    ],\n    u: \"1f451\"\n  },\n  {\n    n: [\n      \"womans hat\",\n      \"womans_hat\"\n    ],\n    u: \"1f452\"\n  },\n  {\n    n: [\n      \"top hat\",\n      \"tophat\"\n    ],\n    u: \"1f3a9\"\n  },\n  {\n    n: [\n      \"graduation cap\",\n      \"mortar_board\"\n    ],\n    u: \"1f393\"\n  },\n  {\n    n: [\n      \"billed cap\",\n      \"billed_cap\"\n    ],\n    u: \"1f9e2\"\n  },\n  {\n    n: [\n      \"helmet_with_white_cross\"\n    ],\n    u: \"26d1-fe0f\"\n  },\n  {\n    n: [\n      \"prayer beads\",\n      \"prayer_beads\"\n    ],\n    u: \"1f4ff\"\n  },\n  {\n    n: [\n      \"lipstick\"\n    ],\n    u: \"1f484\"\n  },\n  {\n    n: [\n      \"ring\"\n    ],\n    u: \"1f48d\"\n  },\n  {\n    n: [\n      \"gem stone\",\n      \"gem\"\n    ],\n    u: \"1f48e\"\n  }\n];\nconst animals_nature$1 = [\n  {\n    n: [\n      \"monkey face\",\n      \"monkey_face\"\n    ],\n    u: \"1f435\"\n  },\n  {\n    n: [\n      \"monkey\"\n    ],\n    u: \"1f412\"\n  },\n  {\n    n: [\n      \"gorilla\"\n    ],\n    u: \"1f98d\"\n  },\n  {\n    n: [\n      \"dog face\",\n      \"dog\"\n    ],\n    u: \"1f436\"\n  },\n  {\n    n: [\n      \"dog\",\n      \"dog2\"\n    ],\n    u: \"1f415\"\n  },\n  {\n    n: [\n      \"poodle\"\n    ],\n    u: \"1f429\"\n  },\n  {\n    n: [\n      \"wolf face\",\n      \"wolf\"\n    ],\n    u: \"1f43a\"\n  },\n  {\n    n: [\n      \"fox face\",\n      \"fox_face\"\n    ],\n    u: \"1f98a\"\n  },\n  {\n    n: [\n      \"cat face\",\n      \"cat\"\n    ],\n    u: \"1f431\"\n  },\n  {\n    n: [\n      \"cat\",\n      \"cat2\"\n    ],\n    u: \"1f408\"\n  },\n  {\n    n: [\n      \"lion face\",\n      \"lion_face\"\n    ],\n    u: \"1f981\"\n  },\n  {\n    n: [\n      \"tiger face\",\n      \"tiger\"\n    ],\n    u: \"1f42f\"\n  },\n  {\n    n: [\n      \"tiger\",\n      \"tiger2\"\n    ],\n    u: \"1f405\"\n  },\n  {\n    n: [\n      \"leopard\"\n    ],\n    u: \"1f406\"\n  },\n  {\n    n: [\n      \"horse face\",\n      \"horse\"\n    ],\n    u: \"1f434\"\n  },\n  {\n    n: [\n      \"horse\",\n      \"racehorse\"\n    ],\n    u: \"1f40e\"\n  },\n  {\n    n: [\n      \"unicorn face\",\n      \"unicorn_face\"\n    ],\n    u: \"1f984\"\n  },\n  {\n    n: [\n      \"zebra face\",\n      \"zebra_face\"\n    ],\n    u: \"1f993\"\n  },\n  {\n    n: [\n      \"deer\"\n    ],\n    u: \"1f98c\"\n  },\n  {\n    n: [\n      \"cow face\",\n      \"cow\"\n    ],\n    u: \"1f42e\"\n  },\n  {\n    n: [\n      \"ox\"\n    ],\n    u: \"1f402\"\n  },\n  {\n    n: [\n      \"water buffalo\",\n      \"water_buffalo\"\n    ],\n    u: \"1f403\"\n  },\n  {\n    n: [\n      \"cow\",\n      \"cow2\"\n    ],\n    u: \"1f404\"\n  },\n  {\n    n: [\n      \"pig face\",\n      \"pig\"\n    ],\n    u: \"1f437\"\n  },\n  {\n    n: [\n      \"pig\",\n      \"pig2\"\n    ],\n    u: \"1f416\"\n  },\n  {\n    n: [\n      \"boar\"\n    ],\n    u: \"1f417\"\n  },\n  {\n    n: [\n      \"pig nose\",\n      \"pig_nose\"\n    ],\n    u: \"1f43d\"\n  },\n  {\n    n: [\n      \"ram\"\n    ],\n    u: \"1f40f\"\n  },\n  {\n    n: [\n      \"sheep\"\n    ],\n    u: \"1f411\"\n  },\n  {\n    n: [\n      \"goat\"\n    ],\n    u: \"1f410\"\n  },\n  {\n    n: [\n      \"dromedary camel\",\n      \"dromedary_camel\"\n    ],\n    u: \"1f42a\"\n  },\n  {\n    n: [\n      \"bactrian camel\",\n      \"camel\"\n    ],\n    u: \"1f42b\"\n  },\n  {\n    n: [\n      \"giraffe face\",\n      \"giraffe_face\"\n    ],\n    u: \"1f992\"\n  },\n  {\n    n: [\n      \"elephant\"\n    ],\n    u: \"1f418\"\n  },\n  {\n    n: [\n      \"rhinoceros\"\n    ],\n    u: \"1f98f\"\n  },\n  {\n    n: [\n      \"mouse face\",\n      \"mouse\"\n    ],\n    u: \"1f42d\"\n  },\n  {\n    n: [\n      \"mouse\",\n      \"mouse2\"\n    ],\n    u: \"1f401\"\n  },\n  {\n    n: [\n      \"rat\"\n    ],\n    u: \"1f400\"\n  },\n  {\n    n: [\n      \"hamster face\",\n      \"hamster\"\n    ],\n    u: \"1f439\"\n  },\n  {\n    n: [\n      \"rabbit face\",\n      \"rabbit\"\n    ],\n    u: \"1f430\"\n  },\n  {\n    n: [\n      \"rabbit\",\n      \"rabbit2\"\n    ],\n    u: \"1f407\"\n  },\n  {\n    n: [\n      \"chipmunk\"\n    ],\n    u: \"1f43f-fe0f\"\n  },\n  {\n    n: [\n      \"hedgehog\"\n    ],\n    u: \"1f994\"\n  },\n  {\n    n: [\n      \"bat\"\n    ],\n    u: \"1f987\"\n  },\n  {\n    n: [\n      \"bear face\",\n      \"bear\"\n    ],\n    u: \"1f43b\"\n  },\n  {\n    n: [\n      \"koala\"\n    ],\n    u: \"1f428\"\n  },\n  {\n    n: [\n      \"panda face\",\n      \"panda_face\"\n    ],\n    u: \"1f43c\"\n  },\n  {\n    n: [\n      \"paw prints\",\n      \"feet\",\n      \"paw_prints\"\n    ],\n    u: \"1f43e\"\n  },\n  {\n    n: [\n      \"turkey\"\n    ],\n    u: \"1f983\"\n  },\n  {\n    n: [\n      \"chicken\"\n    ],\n    u: \"1f414\"\n  },\n  {\n    n: [\n      \"rooster\"\n    ],\n    u: \"1f413\"\n  },\n  {\n    n: [\n      \"hatching chick\",\n      \"hatching_chick\"\n    ],\n    u: \"1f423\"\n  },\n  {\n    n: [\n      \"baby chick\",\n      \"baby_chick\"\n    ],\n    u: \"1f424\"\n  },\n  {\n    n: [\n      \"front-facing baby chick\",\n      \"hatched_chick\"\n    ],\n    u: \"1f425\"\n  },\n  {\n    n: [\n      \"bird\"\n    ],\n    u: \"1f426\"\n  },\n  {\n    n: [\n      \"penguin\"\n    ],\n    u: \"1f427\"\n  },\n  {\n    n: [\n      \"dove_of_peace\"\n    ],\n    u: \"1f54a-fe0f\"\n  },\n  {\n    n: [\n      \"eagle\"\n    ],\n    u: \"1f985\"\n  },\n  {\n    n: [\n      \"duck\"\n    ],\n    u: \"1f986\"\n  },\n  {\n    n: [\n      \"owl\"\n    ],\n    u: \"1f989\"\n  },\n  {\n    n: [\n      \"frog face\",\n      \"frog\"\n    ],\n    u: \"1f438\"\n  },\n  {\n    n: [\n      \"crocodile\"\n    ],\n    u: \"1f40a\"\n  },\n  {\n    n: [\n      \"turtle\"\n    ],\n    u: \"1f422\"\n  },\n  {\n    n: [\n      \"lizard\"\n    ],\n    u: \"1f98e\"\n  },\n  {\n    n: [\n      \"snake\"\n    ],\n    u: \"1f40d\"\n  },\n  {\n    n: [\n      \"dragon face\",\n      \"dragon_face\"\n    ],\n    u: \"1f432\"\n  },\n  {\n    n: [\n      \"dragon\"\n    ],\n    u: \"1f409\"\n  },\n  {\n    n: [\n      \"sauropod\"\n    ],\n    u: \"1f995\"\n  },\n  {\n    n: [\n      \"t-rex\"\n    ],\n    u: \"1f996\"\n  },\n  {\n    n: [\n      \"spouting whale\",\n      \"whale\"\n    ],\n    u: \"1f433\"\n  },\n  {\n    n: [\n      \"whale\",\n      \"whale2\"\n    ],\n    u: \"1f40b\"\n  },\n  {\n    n: [\n      \"dolphin\",\n      \"flipper\"\n    ],\n    u: \"1f42c\"\n  },\n  {\n    n: [\n      \"fish\"\n    ],\n    u: \"1f41f\"\n  },\n  {\n    n: [\n      \"tropical fish\",\n      \"tropical_fish\"\n    ],\n    u: \"1f420\"\n  },\n  {\n    n: [\n      \"blowfish\"\n    ],\n    u: \"1f421\"\n  },\n  {\n    n: [\n      \"shark\"\n    ],\n    u: \"1f988\"\n  },\n  {\n    n: [\n      \"octopus\"\n    ],\n    u: \"1f419\"\n  },\n  {\n    n: [\n      \"spiral shell\",\n      \"shell\"\n    ],\n    u: \"1f41a\"\n  },\n  {\n    n: [\n      \"crab\"\n    ],\n    u: \"1f980\"\n  },\n  {\n    n: [\n      \"shrimp\"\n    ],\n    u: \"1f990\"\n  },\n  {\n    n: [\n      \"squid\"\n    ],\n    u: \"1f991\"\n  },\n  {\n    n: [\n      \"snail\"\n    ],\n    u: \"1f40c\"\n  },\n  {\n    n: [\n      \"butterfly\"\n    ],\n    u: \"1f98b\"\n  },\n  {\n    n: [\n      \"bug\"\n    ],\n    u: \"1f41b\"\n  },\n  {\n    n: [\n      \"ant\"\n    ],\n    u: \"1f41c\"\n  },\n  {\n    n: [\n      \"honeybee\",\n      \"bee\"\n    ],\n    u: \"1f41d\"\n  },\n  {\n    n: [\n      \"lady beetle\",\n      \"beetle\"\n    ],\n    u: \"1f41e\"\n  },\n  {\n    n: [\n      \"cricket\"\n    ],\n    u: \"1f997\"\n  },\n  {\n    n: [\n      \"spider\"\n    ],\n    u: \"1f577-fe0f\"\n  },\n  {\n    n: [\n      \"spider_web\"\n    ],\n    u: \"1f578-fe0f\"\n  },\n  {\n    n: [\n      \"scorpion\"\n    ],\n    u: \"1f982\"\n  },\n  {\n    n: [\n      \"bouquet\"\n    ],\n    u: \"1f490\"\n  },\n  {\n    n: [\n      \"cherry blossom\",\n      \"cherry_blossom\"\n    ],\n    u: \"1f338\"\n  },\n  {\n    n: [\n      \"white flower\",\n      \"white_flower\"\n    ],\n    u: \"1f4ae\"\n  },\n  {\n    n: [\n      \"rosette\"\n    ],\n    u: \"1f3f5-fe0f\"\n  },\n  {\n    n: [\n      \"rose\"\n    ],\n    u: \"1f339\"\n  },\n  {\n    n: [\n      \"wilted flower\",\n      \"wilted_flower\"\n    ],\n    u: \"1f940\"\n  },\n  {\n    n: [\n      \"hibiscus\"\n    ],\n    u: \"1f33a\"\n  },\n  {\n    n: [\n      \"sunflower\"\n    ],\n    u: \"1f33b\"\n  },\n  {\n    n: [\n      \"blossom\"\n    ],\n    u: \"1f33c\"\n  },\n  {\n    n: [\n      \"tulip\"\n    ],\n    u: \"1f337\"\n  },\n  {\n    n: [\n      \"seedling\"\n    ],\n    u: \"1f331\"\n  },\n  {\n    n: [\n      \"evergreen tree\",\n      \"evergreen_tree\"\n    ],\n    u: \"1f332\"\n  },\n  {\n    n: [\n      \"deciduous tree\",\n      \"deciduous_tree\"\n    ],\n    u: \"1f333\"\n  },\n  {\n    n: [\n      \"palm tree\",\n      \"palm_tree\"\n    ],\n    u: \"1f334\"\n  },\n  {\n    n: [\n      \"cactus\"\n    ],\n    u: \"1f335\"\n  },\n  {\n    n: [\n      \"ear of rice\",\n      \"ear_of_rice\"\n    ],\n    u: \"1f33e\"\n  },\n  {\n    n: [\n      \"herb\"\n    ],\n    u: \"1f33f\"\n  },\n  {\n    n: [\n      \"shamrock\"\n    ],\n    u: \"2618-fe0f\"\n  },\n  {\n    n: [\n      \"four leaf clover\",\n      \"four_leaf_clover\"\n    ],\n    u: \"1f340\"\n  },\n  {\n    n: [\n      \"maple leaf\",\n      \"maple_leaf\"\n    ],\n    u: \"1f341\"\n  },\n  {\n    n: [\n      \"fallen leaf\",\n      \"fallen_leaf\"\n    ],\n    u: \"1f342\"\n  },\n  {\n    n: [\n      \"leaf fluttering in wind\",\n      \"leaves\"\n    ],\n    u: \"1f343\"\n  }\n];\nconst food_drink$1 = [\n  {\n    n: [\n      \"grapes\"\n    ],\n    u: \"1f347\"\n  },\n  {\n    n: [\n      \"melon\"\n    ],\n    u: \"1f348\"\n  },\n  {\n    n: [\n      \"watermelon\"\n    ],\n    u: \"1f349\"\n  },\n  {\n    n: [\n      \"tangerine\"\n    ],\n    u: \"1f34a\"\n  },\n  {\n    n: [\n      \"lemon\"\n    ],\n    u: \"1f34b\"\n  },\n  {\n    n: [\n      \"banana\"\n    ],\n    u: \"1f34c\"\n  },\n  {\n    n: [\n      \"pineapple\"\n    ],\n    u: \"1f34d\"\n  },\n  {\n    n: [\n      \"red apple\",\n      \"apple\"\n    ],\n    u: \"1f34e\"\n  },\n  {\n    n: [\n      \"green apple\",\n      \"green_apple\"\n    ],\n    u: \"1f34f\"\n  },\n  {\n    n: [\n      \"pear\"\n    ],\n    u: \"1f350\"\n  },\n  {\n    n: [\n      \"peach\"\n    ],\n    u: \"1f351\"\n  },\n  {\n    n: [\n      \"cherries\"\n    ],\n    u: \"1f352\"\n  },\n  {\n    n: [\n      \"strawberry\"\n    ],\n    u: \"1f353\"\n  },\n  {\n    n: [\n      \"kiwifruit\"\n    ],\n    u: \"1f95d\"\n  },\n  {\n    n: [\n      \"tomato\"\n    ],\n    u: \"1f345\"\n  },\n  {\n    n: [\n      \"coconut\"\n    ],\n    u: \"1f965\"\n  },\n  {\n    n: [\n      \"avocado\"\n    ],\n    u: \"1f951\"\n  },\n  {\n    n: [\n      \"aubergine\",\n      \"eggplant\"\n    ],\n    u: \"1f346\"\n  },\n  {\n    n: [\n      \"potato\"\n    ],\n    u: \"1f954\"\n  },\n  {\n    n: [\n      \"carrot\"\n    ],\n    u: \"1f955\"\n  },\n  {\n    n: [\n      \"ear of maize\",\n      \"corn\"\n    ],\n    u: \"1f33d\"\n  },\n  {\n    n: [\n      \"hot_pepper\"\n    ],\n    u: \"1f336-fe0f\"\n  },\n  {\n    n: [\n      \"cucumber\"\n    ],\n    u: \"1f952\"\n  },\n  {\n    n: [\n      \"broccoli\"\n    ],\n    u: \"1f966\"\n  },\n  {\n    n: [\n      \"mushroom\"\n    ],\n    u: \"1f344\"\n  },\n  {\n    n: [\n      \"peanuts\"\n    ],\n    u: \"1f95c\"\n  },\n  {\n    n: [\n      \"chestnut\"\n    ],\n    u: \"1f330\"\n  },\n  {\n    n: [\n      \"bread\"\n    ],\n    u: \"1f35e\"\n  },\n  {\n    n: [\n      \"croissant\"\n    ],\n    u: \"1f950\"\n  },\n  {\n    n: [\n      \"baguette bread\",\n      \"baguette_bread\"\n    ],\n    u: \"1f956\"\n  },\n  {\n    n: [\n      \"pretzel\"\n    ],\n    u: \"1f968\"\n  },\n  {\n    n: [\n      \"pancakes\"\n    ],\n    u: \"1f95e\"\n  },\n  {\n    n: [\n      \"cheese wedge\",\n      \"cheese_wedge\"\n    ],\n    u: \"1f9c0\"\n  },\n  {\n    n: [\n      \"meat on bone\",\n      \"meat_on_bone\"\n    ],\n    u: \"1f356\"\n  },\n  {\n    n: [\n      \"poultry leg\",\n      \"poultry_leg\"\n    ],\n    u: \"1f357\"\n  },\n  {\n    n: [\n      \"cut of meat\",\n      \"cut_of_meat\"\n    ],\n    u: \"1f969\"\n  },\n  {\n    n: [\n      \"bacon\"\n    ],\n    u: \"1f953\"\n  },\n  {\n    n: [\n      \"hamburger\"\n    ],\n    u: \"1f354\"\n  },\n  {\n    n: [\n      \"french fries\",\n      \"fries\"\n    ],\n    u: \"1f35f\"\n  },\n  {\n    n: [\n      \"slice of pizza\",\n      \"pizza\"\n    ],\n    u: \"1f355\"\n  },\n  {\n    n: [\n      \"hot dog\",\n      \"hotdog\"\n    ],\n    u: \"1f32d\"\n  },\n  {\n    n: [\n      \"sandwich\"\n    ],\n    u: \"1f96a\"\n  },\n  {\n    n: [\n      \"taco\"\n    ],\n    u: \"1f32e\"\n  },\n  {\n    n: [\n      \"burrito\"\n    ],\n    u: \"1f32f\"\n  },\n  {\n    n: [\n      \"stuffed flatbread\",\n      \"stuffed_flatbread\"\n    ],\n    u: \"1f959\"\n  },\n  {\n    n: [\n      \"egg\"\n    ],\n    u: \"1f95a\"\n  },\n  {\n    n: [\n      \"cooking\",\n      \"fried_egg\"\n    ],\n    u: \"1f373\"\n  },\n  {\n    n: [\n      \"shallow pan of food\",\n      \"shallow_pan_of_food\"\n    ],\n    u: \"1f958\"\n  },\n  {\n    n: [\n      \"pot of food\",\n      \"stew\"\n    ],\n    u: \"1f372\"\n  },\n  {\n    n: [\n      \"bowl with spoon\",\n      \"bowl_with_spoon\"\n    ],\n    u: \"1f963\"\n  },\n  {\n    n: [\n      \"green salad\",\n      \"green_salad\"\n    ],\n    u: \"1f957\"\n  },\n  {\n    n: [\n      \"popcorn\"\n    ],\n    u: \"1f37f\"\n  },\n  {\n    n: [\n      \"canned food\",\n      \"canned_food\"\n    ],\n    u: \"1f96b\"\n  },\n  {\n    n: [\n      \"bento box\",\n      \"bento\"\n    ],\n    u: \"1f371\"\n  },\n  {\n    n: [\n      \"rice cracker\",\n      \"rice_cracker\"\n    ],\n    u: \"1f358\"\n  },\n  {\n    n: [\n      \"rice ball\",\n      \"rice_ball\"\n    ],\n    u: \"1f359\"\n  },\n  {\n    n: [\n      \"cooked rice\",\n      \"rice\"\n    ],\n    u: \"1f35a\"\n  },\n  {\n    n: [\n      \"curry and rice\",\n      \"curry\"\n    ],\n    u: \"1f35b\"\n  },\n  {\n    n: [\n      \"steaming bowl\",\n      \"ramen\"\n    ],\n    u: \"1f35c\"\n  },\n  {\n    n: [\n      \"spaghetti\"\n    ],\n    u: \"1f35d\"\n  },\n  {\n    n: [\n      \"roasted sweet potato\",\n      \"sweet_potato\"\n    ],\n    u: \"1f360\"\n  },\n  {\n    n: [\n      \"oden\"\n    ],\n    u: \"1f362\"\n  },\n  {\n    n: [\n      \"sushi\"\n    ],\n    u: \"1f363\"\n  },\n  {\n    n: [\n      \"fried shrimp\",\n      \"fried_shrimp\"\n    ],\n    u: \"1f364\"\n  },\n  {\n    n: [\n      \"fish cake with swirl design\",\n      \"fish_cake\"\n    ],\n    u: \"1f365\"\n  },\n  {\n    n: [\n      \"dango\"\n    ],\n    u: \"1f361\"\n  },\n  {\n    n: [\n      \"dumpling\"\n    ],\n    u: \"1f95f\"\n  },\n  {\n    n: [\n      \"fortune cookie\",\n      \"fortune_cookie\"\n    ],\n    u: \"1f960\"\n  },\n  {\n    n: [\n      \"takeout box\",\n      \"takeout_box\"\n    ],\n    u: \"1f961\"\n  },\n  {\n    n: [\n      \"soft ice cream\",\n      \"icecream\"\n    ],\n    u: \"1f366\"\n  },\n  {\n    n: [\n      \"shaved ice\",\n      \"shaved_ice\"\n    ],\n    u: \"1f367\"\n  },\n  {\n    n: [\n      \"ice cream\",\n      \"ice_cream\"\n    ],\n    u: \"1f368\"\n  },\n  {\n    n: [\n      \"doughnut\"\n    ],\n    u: \"1f369\"\n  },\n  {\n    n: [\n      \"cookie\"\n    ],\n    u: \"1f36a\"\n  },\n  {\n    n: [\n      \"birthday cake\",\n      \"birthday\"\n    ],\n    u: \"1f382\"\n  },\n  {\n    n: [\n      \"shortcake\",\n      \"cake\"\n    ],\n    u: \"1f370\"\n  },\n  {\n    n: [\n      \"pie\"\n    ],\n    u: \"1f967\"\n  },\n  {\n    n: [\n      \"chocolate bar\",\n      \"chocolate_bar\"\n    ],\n    u: \"1f36b\"\n  },\n  {\n    n: [\n      \"candy\"\n    ],\n    u: \"1f36c\"\n  },\n  {\n    n: [\n      \"lollipop\"\n    ],\n    u: \"1f36d\"\n  },\n  {\n    n: [\n      \"custard\"\n    ],\n    u: \"1f36e\"\n  },\n  {\n    n: [\n      \"honey pot\",\n      \"honey_pot\"\n    ],\n    u: \"1f36f\"\n  },\n  {\n    n: [\n      \"baby bottle\",\n      \"baby_bottle\"\n    ],\n    u: \"1f37c\"\n  },\n  {\n    n: [\n      \"glass of milk\",\n      \"glass_of_milk\"\n    ],\n    u: \"1f95b\"\n  },\n  {\n    n: [\n      \"hot beverage\",\n      \"coffee\"\n    ],\n    u: \"2615\"\n  },\n  {\n    n: [\n      \"teacup without handle\",\n      \"tea\"\n    ],\n    u: \"1f375\"\n  },\n  {\n    n: [\n      \"sake bottle and cup\",\n      \"sake\"\n    ],\n    u: \"1f376\"\n  },\n  {\n    n: [\n      \"bottle with popping cork\",\n      \"champagne\"\n    ],\n    u: \"1f37e\"\n  },\n  {\n    n: [\n      \"wine glass\",\n      \"wine_glass\"\n    ],\n    u: \"1f377\"\n  },\n  {\n    n: [\n      \"cocktail glass\",\n      \"cocktail\"\n    ],\n    u: \"1f378\"\n  },\n  {\n    n: [\n      \"tropical drink\",\n      \"tropical_drink\"\n    ],\n    u: \"1f379\"\n  },\n  {\n    n: [\n      \"beer mug\",\n      \"beer\"\n    ],\n    u: \"1f37a\"\n  },\n  {\n    n: [\n      \"clinking beer mugs\",\n      \"beers\"\n    ],\n    u: \"1f37b\"\n  },\n  {\n    n: [\n      \"clinking glasses\",\n      \"clinking_glasses\"\n    ],\n    u: \"1f942\"\n  },\n  {\n    n: [\n      \"tumbler glass\",\n      \"tumbler_glass\"\n    ],\n    u: \"1f943\"\n  },\n  {\n    n: [\n      \"cup with straw\",\n      \"cup_with_straw\"\n    ],\n    u: \"1f964\"\n  },\n  {\n    n: [\n      \"chopsticks\"\n    ],\n    u: \"1f962\"\n  },\n  {\n    n: [\n      \"knife_fork_plate\"\n    ],\n    u: \"1f37d-fe0f\"\n  },\n  {\n    n: [\n      \"fork and knife\",\n      \"fork_and_knife\"\n    ],\n    u: \"1f374\"\n  },\n  {\n    n: [\n      \"spoon\"\n    ],\n    u: \"1f944\"\n  },\n  {\n    n: [\n      \"hocho\",\n      \"knife\"\n    ],\n    u: \"1f52a\"\n  },\n  {\n    n: [\n      \"amphora\"\n    ],\n    u: \"1f3fa\"\n  }\n];\nconst activities$1 = [\n  {\n    n: [\n      \"jack-o-lantern\",\n      \"jack_o_lantern\"\n    ],\n    u: \"1f383\"\n  },\n  {\n    n: [\n      \"christmas tree\",\n      \"christmas_tree\"\n    ],\n    u: \"1f384\"\n  },\n  {\n    n: [\n      \"fireworks\"\n    ],\n    u: \"1f386\"\n  },\n  {\n    n: [\n      \"firework sparkler\",\n      \"sparkler\"\n    ],\n    u: \"1f387\"\n  },\n  {\n    n: [\n      \"sparkles\"\n    ],\n    u: \"2728\"\n  },\n  {\n    n: [\n      \"balloon\"\n    ],\n    u: \"1f388\"\n  },\n  {\n    n: [\n      \"party popper\",\n      \"tada\"\n    ],\n    u: \"1f389\"\n  },\n  {\n    n: [\n      \"confetti ball\",\n      \"confetti_ball\"\n    ],\n    u: \"1f38a\"\n  },\n  {\n    n: [\n      \"tanabata tree\",\n      \"tanabata_tree\"\n    ],\n    u: \"1f38b\"\n  },\n  {\n    n: [\n      \"pine decoration\",\n      \"bamboo\"\n    ],\n    u: \"1f38d\"\n  },\n  {\n    n: [\n      \"japanese dolls\",\n      \"dolls\"\n    ],\n    u: \"1f38e\"\n  },\n  {\n    n: [\n      \"carp streamer\",\n      \"flags\"\n    ],\n    u: \"1f38f\"\n  },\n  {\n    n: [\n      \"wind chime\",\n      \"wind_chime\"\n    ],\n    u: \"1f390\"\n  },\n  {\n    n: [\n      \"moon viewing ceremony\",\n      \"rice_scene\"\n    ],\n    u: \"1f391\"\n  },\n  {\n    n: [\n      \"ribbon\"\n    ],\n    u: \"1f380\"\n  },\n  {\n    n: [\n      \"wrapped present\",\n      \"gift\"\n    ],\n    u: \"1f381\"\n  },\n  {\n    n: [\n      \"reminder_ribbon\"\n    ],\n    u: \"1f397-fe0f\"\n  },\n  {\n    n: [\n      \"admission_tickets\"\n    ],\n    u: \"1f39f-fe0f\"\n  },\n  {\n    n: [\n      \"ticket\"\n    ],\n    u: \"1f3ab\"\n  },\n  {\n    n: [\n      \"medal\"\n    ],\n    u: \"1f396-fe0f\"\n  },\n  {\n    n: [\n      \"trophy\"\n    ],\n    u: \"1f3c6\"\n  },\n  {\n    n: [\n      \"sports medal\",\n      \"sports_medal\"\n    ],\n    u: \"1f3c5\"\n  },\n  {\n    n: [\n      \"first place medal\",\n      \"first_place_medal\"\n    ],\n    u: \"1f947\"\n  },\n  {\n    n: [\n      \"second place medal\",\n      \"second_place_medal\"\n    ],\n    u: \"1f948\"\n  },\n  {\n    n: [\n      \"third place medal\",\n      \"third_place_medal\"\n    ],\n    u: \"1f949\"\n  },\n  {\n    n: [\n      \"soccer ball\",\n      \"soccer\"\n    ],\n    u: \"26bd\"\n  },\n  {\n    n: [\n      \"baseball\"\n    ],\n    u: \"26be\"\n  },\n  {\n    n: [\n      \"basketball and hoop\",\n      \"basketball\"\n    ],\n    u: \"1f3c0\"\n  },\n  {\n    n: [\n      \"volleyball\"\n    ],\n    u: \"1f3d0\"\n  },\n  {\n    n: [\n      \"american football\",\n      \"football\"\n    ],\n    u: \"1f3c8\"\n  },\n  {\n    n: [\n      \"rugby football\",\n      \"rugby_football\"\n    ],\n    u: \"1f3c9\"\n  },\n  {\n    n: [\n      \"tennis racquet and ball\",\n      \"tennis\"\n    ],\n    u: \"1f3be\"\n  },\n  {\n    n: [\n      \"billiards\",\n      \"8ball\"\n    ],\n    u: \"1f3b1\"\n  },\n  {\n    n: [\n      \"bowling\"\n    ],\n    u: \"1f3b3\"\n  },\n  {\n    n: [\n      \"cricket bat and ball\",\n      \"cricket_bat_and_ball\"\n    ],\n    u: \"1f3cf\"\n  },\n  {\n    n: [\n      \"field hockey stick and ball\",\n      \"field_hockey_stick_and_ball\"\n    ],\n    u: \"1f3d1\"\n  },\n  {\n    n: [\n      \"ice hockey stick and puck\",\n      \"ice_hockey_stick_and_puck\"\n    ],\n    u: \"1f3d2\"\n  },\n  {\n    n: [\n      \"table tennis paddle and ball\",\n      \"table_tennis_paddle_and_ball\"\n    ],\n    u: \"1f3d3\"\n  },\n  {\n    n: [\n      \"badminton racquet and shuttlecock\",\n      \"badminton_racquet_and_shuttlecock\"\n    ],\n    u: \"1f3f8\"\n  },\n  {\n    n: [\n      \"boxing glove\",\n      \"boxing_glove\"\n    ],\n    u: \"1f94a\"\n  },\n  {\n    n: [\n      \"martial arts uniform\",\n      \"martial_arts_uniform\"\n    ],\n    u: \"1f94b\"\n  },\n  {\n    n: [\n      \"goal net\",\n      \"goal_net\"\n    ],\n    u: \"1f945\"\n  },\n  {\n    n: [\n      \"direct hit\",\n      \"dart\"\n    ],\n    u: \"1f3af\"\n  },\n  {\n    n: [\n      \"flag in hole\",\n      \"golf\"\n    ],\n    u: \"26f3\"\n  },\n  {\n    n: [\n      \"ice_skate\"\n    ],\n    u: \"26f8-fe0f\"\n  },\n  {\n    n: [\n      \"fishing pole and fish\",\n      \"fishing_pole_and_fish\"\n    ],\n    u: \"1f3a3\"\n  },\n  {\n    n: [\n      \"running shirt with sash\",\n      \"running_shirt_with_sash\"\n    ],\n    u: \"1f3bd\"\n  },\n  {\n    n: [\n      \"ski and ski boot\",\n      \"ski\"\n    ],\n    u: \"1f3bf\"\n  },\n  {\n    n: [\n      \"sled\"\n    ],\n    u: \"1f6f7\"\n  },\n  {\n    n: [\n      \"curling stone\",\n      \"curling_stone\"\n    ],\n    u: \"1f94c\"\n  },\n  {\n    n: [\n      \"video game\",\n      \"video_game\"\n    ],\n    u: \"1f3ae\"\n  },\n  {\n    n: [\n      \"joystick\"\n    ],\n    u: \"1f579-fe0f\"\n  },\n  {\n    n: [\n      \"game die\",\n      \"game_die\"\n    ],\n    u: \"1f3b2\"\n  },\n  {\n    n: [\n      \"black spade suit\",\n      \"spades\"\n    ],\n    u: \"2660-fe0f\"\n  },\n  {\n    n: [\n      \"black heart suit\",\n      \"hearts\"\n    ],\n    u: \"2665-fe0f\"\n  },\n  {\n    n: [\n      \"black diamond suit\",\n      \"diamonds\"\n    ],\n    u: \"2666-fe0f\"\n  },\n  {\n    n: [\n      \"black club suit\",\n      \"clubs\"\n    ],\n    u: \"2663-fe0f\"\n  },\n  {\n    n: [\n      \"playing card black joker\",\n      \"black_joker\"\n    ],\n    u: \"1f0cf\"\n  },\n  {\n    n: [\n      \"mahjong tile red dragon\",\n      \"mahjong\"\n    ],\n    u: \"1f004\"\n  },\n  {\n    n: [\n      \"flower playing cards\",\n      \"flower_playing_cards\"\n    ],\n    u: \"1f3b4\"\n  }\n];\nconst travel_places$1 = [\n  {\n    n: [\n      \"earth globe europe-africa\",\n      \"earth_africa\"\n    ],\n    u: \"1f30d\"\n  },\n  {\n    n: [\n      \"earth globe americas\",\n      \"earth_americas\"\n    ],\n    u: \"1f30e\"\n  },\n  {\n    n: [\n      \"earth globe asia-australia\",\n      \"earth_asia\"\n    ],\n    u: \"1f30f\"\n  },\n  {\n    n: [\n      \"globe with meridians\",\n      \"globe_with_meridians\"\n    ],\n    u: \"1f310\"\n  },\n  {\n    n: [\n      \"world_map\"\n    ],\n    u: \"1f5fa-fe0f\"\n  },\n  {\n    n: [\n      \"silhouette of japan\",\n      \"japan\"\n    ],\n    u: \"1f5fe\"\n  },\n  {\n    n: [\n      \"snow_capped_mountain\"\n    ],\n    u: \"1f3d4-fe0f\"\n  },\n  {\n    n: [\n      \"mountain\"\n    ],\n    u: \"26f0-fe0f\"\n  },\n  {\n    n: [\n      \"volcano\"\n    ],\n    u: \"1f30b\"\n  },\n  {\n    n: [\n      \"mount fuji\",\n      \"mount_fuji\"\n    ],\n    u: \"1f5fb\"\n  },\n  {\n    n: [\n      \"camping\"\n    ],\n    u: \"1f3d5-fe0f\"\n  },\n  {\n    n: [\n      \"beach_with_umbrella\"\n    ],\n    u: \"1f3d6-fe0f\"\n  },\n  {\n    n: [\n      \"desert\"\n    ],\n    u: \"1f3dc-fe0f\"\n  },\n  {\n    n: [\n      \"desert_island\"\n    ],\n    u: \"1f3dd-fe0f\"\n  },\n  {\n    n: [\n      \"national_park\"\n    ],\n    u: \"1f3de-fe0f\"\n  },\n  {\n    n: [\n      \"stadium\"\n    ],\n    u: \"1f3df-fe0f\"\n  },\n  {\n    n: [\n      \"classical_building\"\n    ],\n    u: \"1f3db-fe0f\"\n  },\n  {\n    n: [\n      \"building_construction\"\n    ],\n    u: \"1f3d7-fe0f\"\n  },\n  {\n    n: [\n      \"house_buildings\"\n    ],\n    u: \"1f3d8-fe0f\"\n  },\n  {\n    n: [\n      \"cityscape\"\n    ],\n    u: \"1f3d9-fe0f\"\n  },\n  {\n    n: [\n      \"derelict_house_building\"\n    ],\n    u: \"1f3da-fe0f\"\n  },\n  {\n    n: [\n      \"house building\",\n      \"house\"\n    ],\n    u: \"1f3e0\"\n  },\n  {\n    n: [\n      \"house with garden\",\n      \"house_with_garden\"\n    ],\n    u: \"1f3e1\"\n  },\n  {\n    n: [\n      \"office building\",\n      \"office\"\n    ],\n    u: \"1f3e2\"\n  },\n  {\n    n: [\n      \"japanese post office\",\n      \"post_office\"\n    ],\n    u: \"1f3e3\"\n  },\n  {\n    n: [\n      \"european post office\",\n      \"european_post_office\"\n    ],\n    u: \"1f3e4\"\n  },\n  {\n    n: [\n      \"hospital\"\n    ],\n    u: \"1f3e5\"\n  },\n  {\n    n: [\n      \"bank\"\n    ],\n    u: \"1f3e6\"\n  },\n  {\n    n: [\n      \"hotel\"\n    ],\n    u: \"1f3e8\"\n  },\n  {\n    n: [\n      \"love hotel\",\n      \"love_hotel\"\n    ],\n    u: \"1f3e9\"\n  },\n  {\n    n: [\n      \"convenience store\",\n      \"convenience_store\"\n    ],\n    u: \"1f3ea\"\n  },\n  {\n    n: [\n      \"school\"\n    ],\n    u: \"1f3eb\"\n  },\n  {\n    n: [\n      \"department store\",\n      \"department_store\"\n    ],\n    u: \"1f3ec\"\n  },\n  {\n    n: [\n      \"factory\"\n    ],\n    u: \"1f3ed\"\n  },\n  {\n    n: [\n      \"japanese castle\",\n      \"japanese_castle\"\n    ],\n    u: \"1f3ef\"\n  },\n  {\n    n: [\n      \"european castle\",\n      \"european_castle\"\n    ],\n    u: \"1f3f0\"\n  },\n  {\n    n: [\n      \"wedding\"\n    ],\n    u: \"1f492\"\n  },\n  {\n    n: [\n      \"tokyo tower\",\n      \"tokyo_tower\"\n    ],\n    u: \"1f5fc\"\n  },\n  {\n    n: [\n      \"statue of liberty\",\n      \"statue_of_liberty\"\n    ],\n    u: \"1f5fd\"\n  },\n  {\n    n: [\n      \"church\"\n    ],\n    u: \"26ea\"\n  },\n  {\n    n: [\n      \"mosque\"\n    ],\n    u: \"1f54c\"\n  },\n  {\n    n: [\n      \"synagogue\"\n    ],\n    u: \"1f54d\"\n  },\n  {\n    n: [\n      \"shinto_shrine\"\n    ],\n    u: \"26e9-fe0f\"\n  },\n  {\n    n: [\n      \"kaaba\"\n    ],\n    u: \"1f54b\"\n  },\n  {\n    n: [\n      \"fountain\"\n    ],\n    u: \"26f2\"\n  },\n  {\n    n: [\n      \"tent\"\n    ],\n    u: \"26fa\"\n  },\n  {\n    n: [\n      \"foggy\"\n    ],\n    u: \"1f301\"\n  },\n  {\n    n: [\n      \"night with stars\",\n      \"night_with_stars\"\n    ],\n    u: \"1f303\"\n  },\n  {\n    n: [\n      \"sunrise over mountains\",\n      \"sunrise_over_mountains\"\n    ],\n    u: \"1f304\"\n  },\n  {\n    n: [\n      \"sunrise\"\n    ],\n    u: \"1f305\"\n  },\n  {\n    n: [\n      \"cityscape at dusk\",\n      \"city_sunset\"\n    ],\n    u: \"1f306\"\n  },\n  {\n    n: [\n      \"sunset over buildings\",\n      \"city_sunrise\"\n    ],\n    u: \"1f307\"\n  },\n  {\n    n: [\n      \"bridge at night\",\n      \"bridge_at_night\"\n    ],\n    u: \"1f309\"\n  },\n  {\n    n: [\n      \"hot springs\",\n      \"hotsprings\"\n    ],\n    u: \"2668-fe0f\"\n  },\n  {\n    n: [\n      \"milky way\",\n      \"milky_way\"\n    ],\n    u: \"1f30c\"\n  },\n  {\n    n: [\n      \"carousel horse\",\n      \"carousel_horse\"\n    ],\n    u: \"1f3a0\"\n  },\n  {\n    n: [\n      \"ferris wheel\",\n      \"ferris_wheel\"\n    ],\n    u: \"1f3a1\"\n  },\n  {\n    n: [\n      \"roller coaster\",\n      \"roller_coaster\"\n    ],\n    u: \"1f3a2\"\n  },\n  {\n    n: [\n      \"barber pole\",\n      \"barber\"\n    ],\n    u: \"1f488\"\n  },\n  {\n    n: [\n      \"circus tent\",\n      \"circus_tent\"\n    ],\n    u: \"1f3aa\"\n  },\n  {\n    n: [\n      \"performing arts\",\n      \"performing_arts\"\n    ],\n    u: \"1f3ad\"\n  },\n  {\n    n: [\n      \"frame_with_picture\"\n    ],\n    u: \"1f5bc-fe0f\"\n  },\n  {\n    n: [\n      \"artist palette\",\n      \"art\"\n    ],\n    u: \"1f3a8\"\n  },\n  {\n    n: [\n      \"slot machine\",\n      \"slot_machine\"\n    ],\n    u: \"1f3b0\"\n  },\n  {\n    n: [\n      \"steam locomotive\",\n      \"steam_locomotive\"\n    ],\n    u: \"1f682\"\n  },\n  {\n    n: [\n      \"railway car\",\n      \"railway_car\"\n    ],\n    u: \"1f683\"\n  },\n  {\n    n: [\n      \"high-speed train\",\n      \"bullettrain_side\"\n    ],\n    u: \"1f684\"\n  },\n  {\n    n: [\n      \"high-speed train with bullet nose\",\n      \"bullettrain_front\"\n    ],\n    u: \"1f685\"\n  },\n  {\n    n: [\n      \"train\",\n      \"train2\"\n    ],\n    u: \"1f686\"\n  },\n  {\n    n: [\n      \"metro\"\n    ],\n    u: \"1f687\"\n  },\n  {\n    n: [\n      \"light rail\",\n      \"light_rail\"\n    ],\n    u: \"1f688\"\n  },\n  {\n    n: [\n      \"station\"\n    ],\n    u: \"1f689\"\n  },\n  {\n    n: [\n      \"tram\"\n    ],\n    u: \"1f68a\"\n  },\n  {\n    n: [\n      \"monorail\"\n    ],\n    u: \"1f69d\"\n  },\n  {\n    n: [\n      \"mountain railway\",\n      \"mountain_railway\"\n    ],\n    u: \"1f69e\"\n  },\n  {\n    n: [\n      \"tram car\",\n      \"train\"\n    ],\n    u: \"1f68b\"\n  },\n  {\n    n: [\n      \"bus\"\n    ],\n    u: \"1f68c\"\n  },\n  {\n    n: [\n      \"oncoming bus\",\n      \"oncoming_bus\"\n    ],\n    u: \"1f68d\"\n  },\n  {\n    n: [\n      \"trolleybus\"\n    ],\n    u: \"1f68e\"\n  },\n  {\n    n: [\n      \"minibus\"\n    ],\n    u: \"1f690\"\n  },\n  {\n    n: [\n      \"ambulance\"\n    ],\n    u: \"1f691\"\n  },\n  {\n    n: [\n      \"fire engine\",\n      \"fire_engine\"\n    ],\n    u: \"1f692\"\n  },\n  {\n    n: [\n      \"police car\",\n      \"police_car\"\n    ],\n    u: \"1f693\"\n  },\n  {\n    n: [\n      \"oncoming police car\",\n      \"oncoming_police_car\"\n    ],\n    u: \"1f694\"\n  },\n  {\n    n: [\n      \"taxi\"\n    ],\n    u: \"1f695\"\n  },\n  {\n    n: [\n      \"oncoming taxi\",\n      \"oncoming_taxi\"\n    ],\n    u: \"1f696\"\n  },\n  {\n    n: [\n      \"automobile\",\n      \"car\",\n      \"red_car\"\n    ],\n    u: \"1f697\"\n  },\n  {\n    n: [\n      \"oncoming automobile\",\n      \"oncoming_automobile\"\n    ],\n    u: \"1f698\"\n  },\n  {\n    n: [\n      \"recreational vehicle\",\n      \"blue_car\"\n    ],\n    u: \"1f699\"\n  },\n  {\n    n: [\n      \"delivery truck\",\n      \"truck\"\n    ],\n    u: \"1f69a\"\n  },\n  {\n    n: [\n      \"articulated lorry\",\n      \"articulated_lorry\"\n    ],\n    u: \"1f69b\"\n  },\n  {\n    n: [\n      \"tractor\"\n    ],\n    u: \"1f69c\"\n  },\n  {\n    n: [\n      \"bicycle\",\n      \"bike\"\n    ],\n    u: \"1f6b2\"\n  },\n  {\n    n: [\n      \"scooter\"\n    ],\n    u: \"1f6f4\"\n  },\n  {\n    n: [\n      \"motor scooter\",\n      \"motor_scooter\"\n    ],\n    u: \"1f6f5\"\n  },\n  {\n    n: [\n      \"bus stop\",\n      \"busstop\"\n    ],\n    u: \"1f68f\"\n  },\n  {\n    n: [\n      \"motorway\"\n    ],\n    u: \"1f6e3-fe0f\"\n  },\n  {\n    n: [\n      \"railway_track\"\n    ],\n    u: \"1f6e4-fe0f\"\n  },\n  {\n    n: [\n      \"fuel pump\",\n      \"fuelpump\"\n    ],\n    u: \"26fd\"\n  },\n  {\n    n: [\n      \"police cars revolving light\",\n      \"rotating_light\"\n    ],\n    u: \"1f6a8\"\n  },\n  {\n    n: [\n      \"horizontal traffic light\",\n      \"traffic_light\"\n    ],\n    u: \"1f6a5\"\n  },\n  {\n    n: [\n      \"vertical traffic light\",\n      \"vertical_traffic_light\"\n    ],\n    u: \"1f6a6\"\n  },\n  {\n    n: [\n      \"construction sign\",\n      \"construction\"\n    ],\n    u: \"1f6a7\"\n  },\n  {\n    n: [\n      \"octagonal sign\",\n      \"octagonal_sign\"\n    ],\n    u: \"1f6d1\"\n  },\n  {\n    n: [\n      \"anchor\"\n    ],\n    u: \"2693\"\n  },\n  {\n    n: [\n      \"sailboat\",\n      \"boat\"\n    ],\n    u: \"26f5\"\n  },\n  {\n    n: [\n      \"canoe\"\n    ],\n    u: \"1f6f6\"\n  },\n  {\n    n: [\n      \"speedboat\"\n    ],\n    u: \"1f6a4\"\n  },\n  {\n    n: [\n      \"passenger_ship\"\n    ],\n    u: \"1f6f3-fe0f\"\n  },\n  {\n    n: [\n      \"ferry\"\n    ],\n    u: \"26f4-fe0f\"\n  },\n  {\n    n: [\n      \"motor_boat\"\n    ],\n    u: \"1f6e5-fe0f\"\n  },\n  {\n    n: [\n      \"ship\"\n    ],\n    u: \"1f6a2\"\n  },\n  {\n    n: [\n      \"airplane\"\n    ],\n    u: \"2708-fe0f\"\n  },\n  {\n    n: [\n      \"small_airplane\"\n    ],\n    u: \"1f6e9-fe0f\"\n  },\n  {\n    n: [\n      \"airplane departure\",\n      \"airplane_departure\"\n    ],\n    u: \"1f6eb\"\n  },\n  {\n    n: [\n      \"airplane arriving\",\n      \"airplane_arriving\"\n    ],\n    u: \"1f6ec\"\n  },\n  {\n    n: [\n      \"seat\"\n    ],\n    u: \"1f4ba\"\n  },\n  {\n    n: [\n      \"helicopter\"\n    ],\n    u: \"1f681\"\n  },\n  {\n    n: [\n      \"suspension railway\",\n      \"suspension_railway\"\n    ],\n    u: \"1f69f\"\n  },\n  {\n    n: [\n      \"mountain cableway\",\n      \"mountain_cableway\"\n    ],\n    u: \"1f6a0\"\n  },\n  {\n    n: [\n      \"aerial tramway\",\n      \"aerial_tramway\"\n    ],\n    u: \"1f6a1\"\n  },\n  {\n    n: [\n      \"satellite\"\n    ],\n    u: \"1f6f0-fe0f\"\n  },\n  {\n    n: [\n      \"rocket\"\n    ],\n    u: \"1f680\"\n  },\n  {\n    n: [\n      \"flying saucer\",\n      \"flying_saucer\"\n    ],\n    u: \"1f6f8\"\n  },\n  {\n    n: [\n      \"bellhop_bell\"\n    ],\n    u: \"1f6ce-fe0f\"\n  },\n  {\n    n: [\n      \"door\"\n    ],\n    u: \"1f6aa\"\n  },\n  {\n    n: [\n      \"bed\"\n    ],\n    u: \"1f6cf-fe0f\"\n  },\n  {\n    n: [\n      \"couch_and_lamp\"\n    ],\n    u: \"1f6cb-fe0f\"\n  },\n  {\n    n: [\n      \"toilet\"\n    ],\n    u: \"1f6bd\"\n  },\n  {\n    n: [\n      \"shower\"\n    ],\n    u: \"1f6bf\"\n  },\n  {\n    n: [\n      \"bathtub\"\n    ],\n    u: \"1f6c1\"\n  },\n  {\n    n: [\n      \"hourglass\"\n    ],\n    u: \"231b\"\n  },\n  {\n    n: [\n      \"hourglass with flowing sand\",\n      \"hourglass_flowing_sand\"\n    ],\n    u: \"23f3\"\n  },\n  {\n    n: [\n      \"watch\"\n    ],\n    u: \"231a\"\n  },\n  {\n    n: [\n      \"alarm clock\",\n      \"alarm_clock\"\n    ],\n    u: \"23f0\"\n  },\n  {\n    n: [\n      \"stopwatch\"\n    ],\n    u: \"23f1-fe0f\"\n  },\n  {\n    n: [\n      \"timer_clock\"\n    ],\n    u: \"23f2-fe0f\"\n  },\n  {\n    n: [\n      \"mantelpiece_clock\"\n    ],\n    u: \"1f570-fe0f\"\n  },\n  {\n    n: [\n      \"clock face twelve oclock\",\n      \"clock12\"\n    ],\n    u: \"1f55b\"\n  },\n  {\n    n: [\n      \"clock face twelve-thirty\",\n      \"clock1230\"\n    ],\n    u: \"1f567\"\n  },\n  {\n    n: [\n      \"clock face one oclock\",\n      \"clock1\"\n    ],\n    u: \"1f550\"\n  },\n  {\n    n: [\n      \"clock face one-thirty\",\n      \"clock130\"\n    ],\n    u: \"1f55c\"\n  },\n  {\n    n: [\n      \"clock face two oclock\",\n      \"clock2\"\n    ],\n    u: \"1f551\"\n  },\n  {\n    n: [\n      \"clock face two-thirty\",\n      \"clock230\"\n    ],\n    u: \"1f55d\"\n  },\n  {\n    n: [\n      \"clock face three oclock\",\n      \"clock3\"\n    ],\n    u: \"1f552\"\n  },\n  {\n    n: [\n      \"clock face three-thirty\",\n      \"clock330\"\n    ],\n    u: \"1f55e\"\n  },\n  {\n    n: [\n      \"clock face four oclock\",\n      \"clock4\"\n    ],\n    u: \"1f553\"\n  },\n  {\n    n: [\n      \"clock face four-thirty\",\n      \"clock430\"\n    ],\n    u: \"1f55f\"\n  },\n  {\n    n: [\n      \"clock face five oclock\",\n      \"clock5\"\n    ],\n    u: \"1f554\"\n  },\n  {\n    n: [\n      \"clock face five-thirty\",\n      \"clock530\"\n    ],\n    u: \"1f560\"\n  },\n  {\n    n: [\n      \"clock face six oclock\",\n      \"clock6\"\n    ],\n    u: \"1f555\"\n  },\n  {\n    n: [\n      \"clock face six-thirty\",\n      \"clock630\"\n    ],\n    u: \"1f561\"\n  },\n  {\n    n: [\n      \"clock face seven oclock\",\n      \"clock7\"\n    ],\n    u: \"1f556\"\n  },\n  {\n    n: [\n      \"clock face seven-thirty\",\n      \"clock730\"\n    ],\n    u: \"1f562\"\n  },\n  {\n    n: [\n      \"clock face eight oclock\",\n      \"clock8\"\n    ],\n    u: \"1f557\"\n  },\n  {\n    n: [\n      \"clock face eight-thirty\",\n      \"clock830\"\n    ],\n    u: \"1f563\"\n  },\n  {\n    n: [\n      \"clock face nine oclock\",\n      \"clock9\"\n    ],\n    u: \"1f558\"\n  },\n  {\n    n: [\n      \"clock face nine-thirty\",\n      \"clock930\"\n    ],\n    u: \"1f564\"\n  },\n  {\n    n: [\n      \"clock face ten oclock\",\n      \"clock10\"\n    ],\n    u: \"1f559\"\n  },\n  {\n    n: [\n      \"clock face ten-thirty\",\n      \"clock1030\"\n    ],\n    u: \"1f565\"\n  },\n  {\n    n: [\n      \"clock face eleven oclock\",\n      \"clock11\"\n    ],\n    u: \"1f55a\"\n  },\n  {\n    n: [\n      \"clock face eleven-thirty\",\n      \"clock1130\"\n    ],\n    u: \"1f566\"\n  },\n  {\n    n: [\n      \"new moon symbol\",\n      \"new_moon\"\n    ],\n    u: \"1f311\"\n  },\n  {\n    n: [\n      \"waxing crescent moon symbol\",\n      \"waxing_crescent_moon\"\n    ],\n    u: \"1f312\"\n  },\n  {\n    n: [\n      \"first quarter moon symbol\",\n      \"first_quarter_moon\"\n    ],\n    u: \"1f313\"\n  },\n  {\n    n: [\n      \"waxing gibbous moon symbol\",\n      \"moon\",\n      \"waxing_gibbous_moon\"\n    ],\n    u: \"1f314\"\n  },\n  {\n    n: [\n      \"full moon symbol\",\n      \"full_moon\"\n    ],\n    u: \"1f315\"\n  },\n  {\n    n: [\n      \"waning gibbous moon symbol\",\n      \"waning_gibbous_moon\"\n    ],\n    u: \"1f316\"\n  },\n  {\n    n: [\n      \"last quarter moon symbol\",\n      \"last_quarter_moon\"\n    ],\n    u: \"1f317\"\n  },\n  {\n    n: [\n      \"waning crescent moon symbol\",\n      \"waning_crescent_moon\"\n    ],\n    u: \"1f318\"\n  },\n  {\n    n: [\n      \"crescent moon\",\n      \"crescent_moon\"\n    ],\n    u: \"1f319\"\n  },\n  {\n    n: [\n      \"new moon with face\",\n      \"new_moon_with_face\"\n    ],\n    u: \"1f31a\"\n  },\n  {\n    n: [\n      \"first quarter moon with face\",\n      \"first_quarter_moon_with_face\"\n    ],\n    u: \"1f31b\"\n  },\n  {\n    n: [\n      \"last quarter moon with face\",\n      \"last_quarter_moon_with_face\"\n    ],\n    u: \"1f31c\"\n  },\n  {\n    n: [\n      \"thermometer\"\n    ],\n    u: \"1f321-fe0f\"\n  },\n  {\n    n: [\n      \"black sun with rays\",\n      \"sunny\"\n    ],\n    u: \"2600-fe0f\"\n  },\n  {\n    n: [\n      \"full moon with face\",\n      \"full_moon_with_face\"\n    ],\n    u: \"1f31d\"\n  },\n  {\n    n: [\n      \"sun with face\",\n      \"sun_with_face\"\n    ],\n    u: \"1f31e\"\n  },\n  {\n    n: [\n      \"white medium star\",\n      \"star\"\n    ],\n    u: \"2b50\"\n  },\n  {\n    n: [\n      \"glowing star\",\n      \"star2\"\n    ],\n    u: \"1f31f\"\n  },\n  {\n    n: [\n      \"shooting star\",\n      \"stars\"\n    ],\n    u: \"1f320\"\n  },\n  {\n    n: [\n      \"cloud\"\n    ],\n    u: \"2601-fe0f\"\n  },\n  {\n    n: [\n      \"sun behind cloud\",\n      \"partly_sunny\"\n    ],\n    u: \"26c5\"\n  },\n  {\n    n: [\n      \"thunder_cloud_and_rain\"\n    ],\n    u: \"26c8-fe0f\"\n  },\n  {\n    n: [\n      \"mostly_sunny\",\n      \"sun_small_cloud\"\n    ],\n    u: \"1f324-fe0f\"\n  },\n  {\n    n: [\n      \"barely_sunny\",\n      \"sun_behind_cloud\"\n    ],\n    u: \"1f325-fe0f\"\n  },\n  {\n    n: [\n      \"partly_sunny_rain\",\n      \"sun_behind_rain_cloud\"\n    ],\n    u: \"1f326-fe0f\"\n  },\n  {\n    n: [\n      \"rain_cloud\"\n    ],\n    u: \"1f327-fe0f\"\n  },\n  {\n    n: [\n      \"snow_cloud\"\n    ],\n    u: \"1f328-fe0f\"\n  },\n  {\n    n: [\n      \"lightning\",\n      \"lightning_cloud\"\n    ],\n    u: \"1f329-fe0f\"\n  },\n  {\n    n: [\n      \"tornado\",\n      \"tornado_cloud\"\n    ],\n    u: \"1f32a-fe0f\"\n  },\n  {\n    n: [\n      \"fog\"\n    ],\n    u: \"1f32b-fe0f\"\n  },\n  {\n    n: [\n      \"wind_blowing_face\"\n    ],\n    u: \"1f32c-fe0f\"\n  },\n  {\n    n: [\n      \"cyclone\"\n    ],\n    u: \"1f300\"\n  },\n  {\n    n: [\n      \"rainbow\"\n    ],\n    u: \"1f308\"\n  },\n  {\n    n: [\n      \"closed umbrella\",\n      \"closed_umbrella\"\n    ],\n    u: \"1f302\"\n  },\n  {\n    n: [\n      \"umbrella\"\n    ],\n    u: \"2602-fe0f\"\n  },\n  {\n    n: [\n      \"umbrella with rain drops\",\n      \"umbrella_with_rain_drops\"\n    ],\n    u: \"2614\"\n  },\n  {\n    n: [\n      \"umbrella_on_ground\"\n    ],\n    u: \"26f1-fe0f\"\n  },\n  {\n    n: [\n      \"high voltage sign\",\n      \"zap\"\n    ],\n    u: \"26a1\"\n  },\n  {\n    n: [\n      \"snowflake\"\n    ],\n    u: \"2744-fe0f\"\n  },\n  {\n    n: [\n      \"snowman\"\n    ],\n    u: \"2603-fe0f\"\n  },\n  {\n    n: [\n      \"snowman without snow\",\n      \"snowman_without_snow\"\n    ],\n    u: \"26c4\"\n  },\n  {\n    n: [\n      \"comet\"\n    ],\n    u: \"2604-fe0f\"\n  },\n  {\n    n: [\n      \"fire\"\n    ],\n    u: \"1f525\"\n  },\n  {\n    n: [\n      \"droplet\"\n    ],\n    u: \"1f4a7\"\n  },\n  {\n    n: [\n      \"water wave\",\n      \"ocean\"\n    ],\n    u: \"1f30a\"\n  }\n];\nconst objects$1 = [\n  {\n    n: [\n      \"speaker with cancellation stroke\",\n      \"mute\"\n    ],\n    u: \"1f507\"\n  },\n  {\n    n: [\n      \"speaker\"\n    ],\n    u: \"1f508\"\n  },\n  {\n    n: [\n      \"speaker with one sound wave\",\n      \"sound\"\n    ],\n    u: \"1f509\"\n  },\n  {\n    n: [\n      \"speaker with three sound waves\",\n      \"loud_sound\"\n    ],\n    u: \"1f50a\"\n  },\n  {\n    n: [\n      \"public address loudspeaker\",\n      \"loudspeaker\"\n    ],\n    u: \"1f4e2\"\n  },\n  {\n    n: [\n      \"cheering megaphone\",\n      \"mega\"\n    ],\n    u: \"1f4e3\"\n  },\n  {\n    n: [\n      \"postal horn\",\n      \"postal_horn\"\n    ],\n    u: \"1f4ef\"\n  },\n  {\n    n: [\n      \"bell\"\n    ],\n    u: \"1f514\"\n  },\n  {\n    n: [\n      \"bell with cancellation stroke\",\n      \"no_bell\"\n    ],\n    u: \"1f515\"\n  },\n  {\n    n: [\n      \"musical score\",\n      \"musical_score\"\n    ],\n    u: \"1f3bc\"\n  },\n  {\n    n: [\n      \"musical note\",\n      \"musical_note\"\n    ],\n    u: \"1f3b5\"\n  },\n  {\n    n: [\n      \"multiple musical notes\",\n      \"notes\"\n    ],\n    u: \"1f3b6\"\n  },\n  {\n    n: [\n      \"studio_microphone\"\n    ],\n    u: \"1f399-fe0f\"\n  },\n  {\n    n: [\n      \"level_slider\"\n    ],\n    u: \"1f39a-fe0f\"\n  },\n  {\n    n: [\n      \"control_knobs\"\n    ],\n    u: \"1f39b-fe0f\"\n  },\n  {\n    n: [\n      \"microphone\"\n    ],\n    u: \"1f3a4\"\n  },\n  {\n    n: [\n      \"headphone\",\n      \"headphones\"\n    ],\n    u: \"1f3a7\"\n  },\n  {\n    n: [\n      \"radio\"\n    ],\n    u: \"1f4fb\"\n  },\n  {\n    n: [\n      \"saxophone\"\n    ],\n    u: \"1f3b7\"\n  },\n  {\n    n: [\n      \"guitar\"\n    ],\n    u: \"1f3b8\"\n  },\n  {\n    n: [\n      \"musical keyboard\",\n      \"musical_keyboard\"\n    ],\n    u: \"1f3b9\"\n  },\n  {\n    n: [\n      \"trumpet\"\n    ],\n    u: \"1f3ba\"\n  },\n  {\n    n: [\n      \"violin\"\n    ],\n    u: \"1f3bb\"\n  },\n  {\n    n: [\n      \"drum with drumsticks\",\n      \"drum_with_drumsticks\"\n    ],\n    u: \"1f941\"\n  },\n  {\n    n: [\n      \"mobile phone\",\n      \"iphone\"\n    ],\n    u: \"1f4f1\"\n  },\n  {\n    n: [\n      \"mobile phone with rightwards arrow at left\",\n      \"calling\"\n    ],\n    u: \"1f4f2\"\n  },\n  {\n    n: [\n      \"black telephone\",\n      \"phone\",\n      \"telephone\"\n    ],\n    u: \"260e-fe0f\"\n  },\n  {\n    n: [\n      \"telephone receiver\",\n      \"telephone_receiver\"\n    ],\n    u: \"1f4de\"\n  },\n  {\n    n: [\n      \"pager\"\n    ],\n    u: \"1f4df\"\n  },\n  {\n    n: [\n      \"fax machine\",\n      \"fax\"\n    ],\n    u: \"1f4e0\"\n  },\n  {\n    n: [\n      \"battery\"\n    ],\n    u: \"1f50b\"\n  },\n  {\n    n: [\n      \"electric plug\",\n      \"electric_plug\"\n    ],\n    u: \"1f50c\"\n  },\n  {\n    n: [\n      \"personal computer\",\n      \"computer\"\n    ],\n    u: \"1f4bb\"\n  },\n  {\n    n: [\n      \"desktop_computer\"\n    ],\n    u: \"1f5a5-fe0f\"\n  },\n  {\n    n: [\n      \"printer\"\n    ],\n    u: \"1f5a8-fe0f\"\n  },\n  {\n    n: [\n      \"keyboard\"\n    ],\n    u: \"2328-fe0f\"\n  },\n  {\n    n: [\n      \"three_button_mouse\"\n    ],\n    u: \"1f5b1-fe0f\"\n  },\n  {\n    n: [\n      \"trackball\"\n    ],\n    u: \"1f5b2-fe0f\"\n  },\n  {\n    n: [\n      \"minidisc\"\n    ],\n    u: \"1f4bd\"\n  },\n  {\n    n: [\n      \"floppy disk\",\n      \"floppy_disk\"\n    ],\n    u: \"1f4be\"\n  },\n  {\n    n: [\n      \"optical disc\",\n      \"cd\"\n    ],\n    u: \"1f4bf\"\n  },\n  {\n    n: [\n      \"dvd\"\n    ],\n    u: \"1f4c0\"\n  },\n  {\n    n: [\n      \"movie camera\",\n      \"movie_camera\"\n    ],\n    u: \"1f3a5\"\n  },\n  {\n    n: [\n      \"film_frames\"\n    ],\n    u: \"1f39e-fe0f\"\n  },\n  {\n    n: [\n      \"film_projector\"\n    ],\n    u: \"1f4fd-fe0f\"\n  },\n  {\n    n: [\n      \"clapper board\",\n      \"clapper\"\n    ],\n    u: \"1f3ac\"\n  },\n  {\n    n: [\n      \"television\",\n      \"tv\"\n    ],\n    u: \"1f4fa\"\n  },\n  {\n    n: [\n      \"camera\"\n    ],\n    u: \"1f4f7\"\n  },\n  {\n    n: [\n      \"camera with flash\",\n      \"camera_with_flash\"\n    ],\n    u: \"1f4f8\"\n  },\n  {\n    n: [\n      \"video camera\",\n      \"video_camera\"\n    ],\n    u: \"1f4f9\"\n  },\n  {\n    n: [\n      \"videocassette\",\n      \"vhs\"\n    ],\n    u: \"1f4fc\"\n  },\n  {\n    n: [\n      \"left-pointing magnifying glass\",\n      \"mag\"\n    ],\n    u: \"1f50d\"\n  },\n  {\n    n: [\n      \"right-pointing magnifying glass\",\n      \"mag_right\"\n    ],\n    u: \"1f50e\"\n  },\n  {\n    n: [\n      \"microscope\"\n    ],\n    u: \"1f52c\"\n  },\n  {\n    n: [\n      \"telescope\"\n    ],\n    u: \"1f52d\"\n  },\n  {\n    n: [\n      \"satellite antenna\",\n      \"satellite_antenna\"\n    ],\n    u: \"1f4e1\"\n  },\n  {\n    n: [\n      \"candle\"\n    ],\n    u: \"1f56f-fe0f\"\n  },\n  {\n    n: [\n      \"electric light bulb\",\n      \"bulb\"\n    ],\n    u: \"1f4a1\"\n  },\n  {\n    n: [\n      \"electric torch\",\n      \"flashlight\"\n    ],\n    u: \"1f526\"\n  },\n  {\n    n: [\n      \"izakaya lantern\",\n      \"izakaya_lantern\",\n      \"lantern\"\n    ],\n    u: \"1f3ee\"\n  },\n  {\n    n: [\n      \"notebook with decorative cover\",\n      \"notebook_with_decorative_cover\"\n    ],\n    u: \"1f4d4\"\n  },\n  {\n    n: [\n      \"closed book\",\n      \"closed_book\"\n    ],\n    u: \"1f4d5\"\n  },\n  {\n    n: [\n      \"open book\",\n      \"book\",\n      \"open_book\"\n    ],\n    u: \"1f4d6\"\n  },\n  {\n    n: [\n      \"green book\",\n      \"green_book\"\n    ],\n    u: \"1f4d7\"\n  },\n  {\n    n: [\n      \"blue book\",\n      \"blue_book\"\n    ],\n    u: \"1f4d8\"\n  },\n  {\n    n: [\n      \"orange book\",\n      \"orange_book\"\n    ],\n    u: \"1f4d9\"\n  },\n  {\n    n: [\n      \"books\"\n    ],\n    u: \"1f4da\"\n  },\n  {\n    n: [\n      \"notebook\"\n    ],\n    u: \"1f4d3\"\n  },\n  {\n    n: [\n      \"ledger\"\n    ],\n    u: \"1f4d2\"\n  },\n  {\n    n: [\n      \"page with curl\",\n      \"page_with_curl\"\n    ],\n    u: \"1f4c3\"\n  },\n  {\n    n: [\n      \"scroll\"\n    ],\n    u: \"1f4dc\"\n  },\n  {\n    n: [\n      \"page facing up\",\n      \"page_facing_up\"\n    ],\n    u: \"1f4c4\"\n  },\n  {\n    n: [\n      \"newspaper\"\n    ],\n    u: \"1f4f0\"\n  },\n  {\n    n: [\n      \"rolled_up_newspaper\"\n    ],\n    u: \"1f5de-fe0f\"\n  },\n  {\n    n: [\n      \"bookmark tabs\",\n      \"bookmark_tabs\"\n    ],\n    u: \"1f4d1\"\n  },\n  {\n    n: [\n      \"bookmark\"\n    ],\n    u: \"1f516\"\n  },\n  {\n    n: [\n      \"label\"\n    ],\n    u: \"1f3f7-fe0f\"\n  },\n  {\n    n: [\n      \"money bag\",\n      \"moneybag\"\n    ],\n    u: \"1f4b0\"\n  },\n  {\n    n: [\n      \"banknote with yen sign\",\n      \"yen\"\n    ],\n    u: \"1f4b4\"\n  },\n  {\n    n: [\n      \"banknote with dollar sign\",\n      \"dollar\"\n    ],\n    u: \"1f4b5\"\n  },\n  {\n    n: [\n      \"banknote with euro sign\",\n      \"euro\"\n    ],\n    u: \"1f4b6\"\n  },\n  {\n    n: [\n      \"banknote with pound sign\",\n      \"pound\"\n    ],\n    u: \"1f4b7\"\n  },\n  {\n    n: [\n      \"money with wings\",\n      \"money_with_wings\"\n    ],\n    u: \"1f4b8\"\n  },\n  {\n    n: [\n      \"credit card\",\n      \"credit_card\"\n    ],\n    u: \"1f4b3\"\n  },\n  {\n    n: [\n      \"chart with upwards trend and yen sign\",\n      \"chart\"\n    ],\n    u: \"1f4b9\"\n  },\n  {\n    n: [\n      \"currency exchange\",\n      \"currency_exchange\"\n    ],\n    u: \"1f4b1\"\n  },\n  {\n    n: [\n      \"heavy dollar sign\",\n      \"heavy_dollar_sign\"\n    ],\n    u: \"1f4b2\"\n  },\n  {\n    n: [\n      \"envelope\",\n      \"email\"\n    ],\n    u: \"2709-fe0f\"\n  },\n  {\n    n: [\n      \"e-mail symbol\",\n      \"e-mail\"\n    ],\n    u: \"1f4e7\"\n  },\n  {\n    n: [\n      \"incoming envelope\",\n      \"incoming_envelope\"\n    ],\n    u: \"1f4e8\"\n  },\n  {\n    n: [\n      \"envelope with downwards arrow above\",\n      \"envelope_with_arrow\"\n    ],\n    u: \"1f4e9\"\n  },\n  {\n    n: [\n      \"outbox tray\",\n      \"outbox_tray\"\n    ],\n    u: \"1f4e4\"\n  },\n  {\n    n: [\n      \"inbox tray\",\n      \"inbox_tray\"\n    ],\n    u: \"1f4e5\"\n  },\n  {\n    n: [\n      \"package\"\n    ],\n    u: \"1f4e6\"\n  },\n  {\n    n: [\n      \"closed mailbox with raised flag\",\n      \"mailbox\"\n    ],\n    u: \"1f4eb\"\n  },\n  {\n    n: [\n      \"closed mailbox with lowered flag\",\n      \"mailbox_closed\"\n    ],\n    u: \"1f4ea\"\n  },\n  {\n    n: [\n      \"open mailbox with raised flag\",\n      \"mailbox_with_mail\"\n    ],\n    u: \"1f4ec\"\n  },\n  {\n    n: [\n      \"open mailbox with lowered flag\",\n      \"mailbox_with_no_mail\"\n    ],\n    u: \"1f4ed\"\n  },\n  {\n    n: [\n      \"postbox\"\n    ],\n    u: \"1f4ee\"\n  },\n  {\n    n: [\n      \"ballot_box_with_ballot\"\n    ],\n    u: \"1f5f3-fe0f\"\n  },\n  {\n    n: [\n      \"pencil\",\n      \"pencil2\"\n    ],\n    u: \"270f-fe0f\"\n  },\n  {\n    n: [\n      \"black nib\",\n      \"black_nib\"\n    ],\n    u: \"2712-fe0f\"\n  },\n  {\n    n: [\n      \"lower_left_fountain_pen\"\n    ],\n    u: \"1f58b-fe0f\"\n  },\n  {\n    n: [\n      \"lower_left_ballpoint_pen\"\n    ],\n    u: \"1f58a-fe0f\"\n  },\n  {\n    n: [\n      \"lower_left_paintbrush\"\n    ],\n    u: \"1f58c-fe0f\"\n  },\n  {\n    n: [\n      \"lower_left_crayon\"\n    ],\n    u: \"1f58d-fe0f\"\n  },\n  {\n    n: [\n      \"memo\",\n      \"pencil\"\n    ],\n    u: \"1f4dd\"\n  },\n  {\n    n: [\n      \"briefcase\"\n    ],\n    u: \"1f4bc\"\n  },\n  {\n    n: [\n      \"file folder\",\n      \"file_folder\"\n    ],\n    u: \"1f4c1\"\n  },\n  {\n    n: [\n      \"open file folder\",\n      \"open_file_folder\"\n    ],\n    u: \"1f4c2\"\n  },\n  {\n    n: [\n      \"card_index_dividers\"\n    ],\n    u: \"1f5c2-fe0f\"\n  },\n  {\n    n: [\n      \"calendar\",\n      \"date\"\n    ],\n    u: \"1f4c5\"\n  },\n  {\n    n: [\n      \"tear-off calendar\",\n      \"calendar\"\n    ],\n    u: \"1f4c6\"\n  },\n  {\n    n: [\n      \"spiral_note_pad\"\n    ],\n    u: \"1f5d2-fe0f\"\n  },\n  {\n    n: [\n      \"spiral_calendar_pad\"\n    ],\n    u: \"1f5d3-fe0f\"\n  },\n  {\n    n: [\n      \"card index\",\n      \"card_index\"\n    ],\n    u: \"1f4c7\"\n  },\n  {\n    n: [\n      \"chart with upwards trend\",\n      \"chart_with_upwards_trend\"\n    ],\n    u: \"1f4c8\"\n  },\n  {\n    n: [\n      \"chart with downwards trend\",\n      \"chart_with_downwards_trend\"\n    ],\n    u: \"1f4c9\"\n  },\n  {\n    n: [\n      \"bar chart\",\n      \"bar_chart\"\n    ],\n    u: \"1f4ca\"\n  },\n  {\n    n: [\n      \"clipboard\"\n    ],\n    u: \"1f4cb\"\n  },\n  {\n    n: [\n      \"pushpin\"\n    ],\n    u: \"1f4cc\"\n  },\n  {\n    n: [\n      \"round pushpin\",\n      \"round_pushpin\"\n    ],\n    u: \"1f4cd\"\n  },\n  {\n    n: [\n      \"paperclip\"\n    ],\n    u: \"1f4ce\"\n  },\n  {\n    n: [\n      \"linked_paperclips\"\n    ],\n    u: \"1f587-fe0f\"\n  },\n  {\n    n: [\n      \"straight ruler\",\n      \"straight_ruler\"\n    ],\n    u: \"1f4cf\"\n  },\n  {\n    n: [\n      \"triangular ruler\",\n      \"triangular_ruler\"\n    ],\n    u: \"1f4d0\"\n  },\n  {\n    n: [\n      \"black scissors\",\n      \"scissors\"\n    ],\n    u: \"2702-fe0f\"\n  },\n  {\n    n: [\n      \"card_file_box\"\n    ],\n    u: \"1f5c3-fe0f\"\n  },\n  {\n    n: [\n      \"file_cabinet\"\n    ],\n    u: \"1f5c4-fe0f\"\n  },\n  {\n    n: [\n      \"wastebasket\"\n    ],\n    u: \"1f5d1-fe0f\"\n  },\n  {\n    n: [\n      \"lock\"\n    ],\n    u: \"1f512\"\n  },\n  {\n    n: [\n      \"open lock\",\n      \"unlock\"\n    ],\n    u: \"1f513\"\n  },\n  {\n    n: [\n      \"lock with ink pen\",\n      \"lock_with_ink_pen\"\n    ],\n    u: \"1f50f\"\n  },\n  {\n    n: [\n      \"closed lock with key\",\n      \"closed_lock_with_key\"\n    ],\n    u: \"1f510\"\n  },\n  {\n    n: [\n      \"key\"\n    ],\n    u: \"1f511\"\n  },\n  {\n    n: [\n      \"old_key\"\n    ],\n    u: \"1f5dd-fe0f\"\n  },\n  {\n    n: [\n      \"hammer\"\n    ],\n    u: \"1f528\"\n  },\n  {\n    n: [\n      \"pick\"\n    ],\n    u: \"26cf-fe0f\"\n  },\n  {\n    n: [\n      \"hammer_and_pick\"\n    ],\n    u: \"2692-fe0f\"\n  },\n  {\n    n: [\n      \"hammer_and_wrench\"\n    ],\n    u: \"1f6e0-fe0f\"\n  },\n  {\n    n: [\n      \"dagger_knife\"\n    ],\n    u: \"1f5e1-fe0f\"\n  },\n  {\n    n: [\n      \"crossed_swords\"\n    ],\n    u: \"2694-fe0f\"\n  },\n  {\n    n: [\n      \"pistol\",\n      \"gun\"\n    ],\n    u: \"1f52b\"\n  },\n  {\n    n: [\n      \"bow and arrow\",\n      \"bow_and_arrow\"\n    ],\n    u: \"1f3f9\"\n  },\n  {\n    n: [\n      \"shield\"\n    ],\n    u: \"1f6e1-fe0f\"\n  },\n  {\n    n: [\n      \"wrench\"\n    ],\n    u: \"1f527\"\n  },\n  {\n    n: [\n      \"nut and bolt\",\n      \"nut_and_bolt\"\n    ],\n    u: \"1f529\"\n  },\n  {\n    n: [\n      \"gear\"\n    ],\n    u: \"2699-fe0f\"\n  },\n  {\n    n: [\n      \"compression\"\n    ],\n    u: \"1f5dc-fe0f\"\n  },\n  {\n    n: [\n      \"alembic\"\n    ],\n    u: \"2697-fe0f\"\n  },\n  {\n    n: [\n      \"scales\"\n    ],\n    u: \"2696-fe0f\"\n  },\n  {\n    n: [\n      \"link symbol\",\n      \"link\"\n    ],\n    u: \"1f517\"\n  },\n  {\n    n: [\n      \"chains\"\n    ],\n    u: \"26d3-fe0f\"\n  },\n  {\n    n: [\n      \"syringe\"\n    ],\n    u: \"1f489\"\n  },\n  {\n    n: [\n      \"pill\"\n    ],\n    u: \"1f48a\"\n  },\n  {\n    n: [\n      \"smoking symbol\",\n      \"smoking\"\n    ],\n    u: \"1f6ac\"\n  },\n  {\n    n: [\n      \"coffin\"\n    ],\n    u: \"26b0-fe0f\"\n  },\n  {\n    n: [\n      \"funeral_urn\"\n    ],\n    u: \"26b1-fe0f\"\n  },\n  {\n    n: [\n      \"moyai\"\n    ],\n    u: \"1f5ff\"\n  },\n  {\n    n: [\n      \"oil_drum\"\n    ],\n    u: \"1f6e2-fe0f\"\n  },\n  {\n    n: [\n      \"crystal ball\",\n      \"crystal_ball\"\n    ],\n    u: \"1f52e\"\n  },\n  {\n    n: [\n      \"shopping trolley\",\n      \"shopping_trolley\"\n    ],\n    u: \"1f6d2\"\n  }\n];\nconst symbols$1 = [\n  {\n    n: [\n      \"automated teller machine\",\n      \"atm\"\n    ],\n    u: \"1f3e7\"\n  },\n  {\n    n: [\n      \"put litter in its place symbol\",\n      \"put_litter_in_its_place\"\n    ],\n    u: \"1f6ae\"\n  },\n  {\n    n: [\n      \"potable water symbol\",\n      \"potable_water\"\n    ],\n    u: \"1f6b0\"\n  },\n  {\n    n: [\n      \"wheelchair symbol\",\n      \"wheelchair\"\n    ],\n    u: \"267f\"\n  },\n  {\n    n: [\n      \"mens symbol\",\n      \"mens\"\n    ],\n    u: \"1f6b9\"\n  },\n  {\n    n: [\n      \"womens symbol\",\n      \"womens\"\n    ],\n    u: \"1f6ba\"\n  },\n  {\n    n: [\n      \"restroom\"\n    ],\n    u: \"1f6bb\"\n  },\n  {\n    n: [\n      \"baby symbol\",\n      \"baby_symbol\"\n    ],\n    u: \"1f6bc\"\n  },\n  {\n    n: [\n      \"water closet\",\n      \"wc\"\n    ],\n    u: \"1f6be\"\n  },\n  {\n    n: [\n      \"passport control\",\n      \"passport_control\"\n    ],\n    u: \"1f6c2\"\n  },\n  {\n    n: [\n      \"customs\"\n    ],\n    u: \"1f6c3\"\n  },\n  {\n    n: [\n      \"baggage claim\",\n      \"baggage_claim\"\n    ],\n    u: \"1f6c4\"\n  },\n  {\n    n: [\n      \"left luggage\",\n      \"left_luggage\"\n    ],\n    u: \"1f6c5\"\n  },\n  {\n    n: [\n      \"warning sign\",\n      \"warning\"\n    ],\n    u: \"26a0-fe0f\"\n  },\n  {\n    n: [\n      \"children crossing\",\n      \"children_crossing\"\n    ],\n    u: \"1f6b8\"\n  },\n  {\n    n: [\n      \"no entry\",\n      \"no_entry\"\n    ],\n    u: \"26d4\"\n  },\n  {\n    n: [\n      \"no entry sign\",\n      \"no_entry_sign\"\n    ],\n    u: \"1f6ab\"\n  },\n  {\n    n: [\n      \"no bicycles\",\n      \"no_bicycles\"\n    ],\n    u: \"1f6b3\"\n  },\n  {\n    n: [\n      \"no smoking symbol\",\n      \"no_smoking\"\n    ],\n    u: \"1f6ad\"\n  },\n  {\n    n: [\n      \"do not litter symbol\",\n      \"do_not_litter\"\n    ],\n    u: \"1f6af\"\n  },\n  {\n    n: [\n      \"non-potable water symbol\",\n      \"non-potable_water\"\n    ],\n    u: \"1f6b1\"\n  },\n  {\n    n: [\n      \"no pedestrians\",\n      \"no_pedestrians\"\n    ],\n    u: \"1f6b7\"\n  },\n  {\n    n: [\n      \"no mobile phones\",\n      \"no_mobile_phones\"\n    ],\n    u: \"1f4f5\"\n  },\n  {\n    n: [\n      \"no one under eighteen symbol\",\n      \"underage\"\n    ],\n    u: \"1f51e\"\n  },\n  {\n    n: [\n      \"radioactive_sign\"\n    ],\n    u: \"2622-fe0f\"\n  },\n  {\n    n: [\n      \"biohazard_sign\"\n    ],\n    u: \"2623-fe0f\"\n  },\n  {\n    n: [\n      \"upwards black arrow\",\n      \"arrow_up\"\n    ],\n    u: \"2b06-fe0f\"\n  },\n  {\n    n: [\n      \"north east arrow\",\n      \"arrow_upper_right\"\n    ],\n    u: \"2197-fe0f\"\n  },\n  {\n    n: [\n      \"black rightwards arrow\",\n      \"arrow_right\"\n    ],\n    u: \"27a1-fe0f\"\n  },\n  {\n    n: [\n      \"south east arrow\",\n      \"arrow_lower_right\"\n    ],\n    u: \"2198-fe0f\"\n  },\n  {\n    n: [\n      \"downwards black arrow\",\n      \"arrow_down\"\n    ],\n    u: \"2b07-fe0f\"\n  },\n  {\n    n: [\n      \"south west arrow\",\n      \"arrow_lower_left\"\n    ],\n    u: \"2199-fe0f\"\n  },\n  {\n    n: [\n      \"leftwards black arrow\",\n      \"arrow_left\"\n    ],\n    u: \"2b05-fe0f\"\n  },\n  {\n    n: [\n      \"north west arrow\",\n      \"arrow_upper_left\"\n    ],\n    u: \"2196-fe0f\"\n  },\n  {\n    n: [\n      \"up down arrow\",\n      \"arrow_up_down\"\n    ],\n    u: \"2195-fe0f\"\n  },\n  {\n    n: [\n      \"left right arrow\",\n      \"left_right_arrow\"\n    ],\n    u: \"2194-fe0f\"\n  },\n  {\n    n: [\n      \"leftwards arrow with hook\",\n      \"leftwards_arrow_with_hook\"\n    ],\n    u: \"21a9-fe0f\"\n  },\n  {\n    n: [\n      \"rightwards arrow with hook\",\n      \"arrow_right_hook\"\n    ],\n    u: \"21aa-fe0f\"\n  },\n  {\n    n: [\n      \"arrow pointing rightwards then curving upwards\",\n      \"arrow_heading_up\"\n    ],\n    u: \"2934-fe0f\"\n  },\n  {\n    n: [\n      \"arrow pointing rightwards then curving downwards\",\n      \"arrow_heading_down\"\n    ],\n    u: \"2935-fe0f\"\n  },\n  {\n    n: [\n      \"clockwise downwards and upwards open circle arrows\",\n      \"arrows_clockwise\"\n    ],\n    u: \"1f503\"\n  },\n  {\n    n: [\n      \"anticlockwise downwards and upwards open circle arrows\",\n      \"arrows_counterclockwise\"\n    ],\n    u: \"1f504\"\n  },\n  {\n    n: [\n      \"back with leftwards arrow above\",\n      \"back\"\n    ],\n    u: \"1f519\"\n  },\n  {\n    n: [\n      \"end with leftwards arrow above\",\n      \"end\"\n    ],\n    u: \"1f51a\"\n  },\n  {\n    n: [\n      \"on with exclamation mark with left right arrow above\",\n      \"on\"\n    ],\n    u: \"1f51b\"\n  },\n  {\n    n: [\n      \"soon with rightwards arrow above\",\n      \"soon\"\n    ],\n    u: \"1f51c\"\n  },\n  {\n    n: [\n      \"top with upwards arrow above\",\n      \"top\"\n    ],\n    u: \"1f51d\"\n  },\n  {\n    n: [\n      \"place of worship\",\n      \"place_of_worship\"\n    ],\n    u: \"1f6d0\"\n  },\n  {\n    n: [\n      \"atom_symbol\"\n    ],\n    u: \"269b-fe0f\"\n  },\n  {\n    n: [\n      \"om_symbol\"\n    ],\n    u: \"1f549-fe0f\"\n  },\n  {\n    n: [\n      \"star_of_david\"\n    ],\n    u: \"2721-fe0f\"\n  },\n  {\n    n: [\n      \"wheel_of_dharma\"\n    ],\n    u: \"2638-fe0f\"\n  },\n  {\n    n: [\n      \"yin_yang\"\n    ],\n    u: \"262f-fe0f\"\n  },\n  {\n    n: [\n      \"latin_cross\"\n    ],\n    u: \"271d-fe0f\"\n  },\n  {\n    n: [\n      \"orthodox_cross\"\n    ],\n    u: \"2626-fe0f\"\n  },\n  {\n    n: [\n      \"star_and_crescent\"\n    ],\n    u: \"262a-fe0f\"\n  },\n  {\n    n: [\n      \"peace_symbol\"\n    ],\n    u: \"262e-fe0f\"\n  },\n  {\n    n: [\n      \"menorah with nine branches\",\n      \"menorah_with_nine_branches\"\n    ],\n    u: \"1f54e\"\n  },\n  {\n    n: [\n      \"six pointed star with middle dot\",\n      \"six_pointed_star\"\n    ],\n    u: \"1f52f\"\n  },\n  {\n    n: [\n      \"aries\"\n    ],\n    u: \"2648\"\n  },\n  {\n    n: [\n      \"taurus\"\n    ],\n    u: \"2649\"\n  },\n  {\n    n: [\n      \"gemini\"\n    ],\n    u: \"264a\"\n  },\n  {\n    n: [\n      \"cancer\"\n    ],\n    u: \"264b\"\n  },\n  {\n    n: [\n      \"leo\"\n    ],\n    u: \"264c\"\n  },\n  {\n    n: [\n      \"virgo\"\n    ],\n    u: \"264d\"\n  },\n  {\n    n: [\n      \"libra\"\n    ],\n    u: \"264e\"\n  },\n  {\n    n: [\n      \"scorpius\"\n    ],\n    u: \"264f\"\n  },\n  {\n    n: [\n      \"sagittarius\"\n    ],\n    u: \"2650\"\n  },\n  {\n    n: [\n      \"capricorn\"\n    ],\n    u: \"2651\"\n  },\n  {\n    n: [\n      \"aquarius\"\n    ],\n    u: \"2652\"\n  },\n  {\n    n: [\n      \"pisces\"\n    ],\n    u: \"2653\"\n  },\n  {\n    n: [\n      \"ophiuchus\"\n    ],\n    u: \"26ce\"\n  },\n  {\n    n: [\n      \"twisted rightwards arrows\",\n      \"twisted_rightwards_arrows\"\n    ],\n    u: \"1f500\"\n  },\n  {\n    n: [\n      \"clockwise rightwards and leftwards open circle arrows\",\n      \"repeat\"\n    ],\n    u: \"1f501\"\n  },\n  {\n    n: [\n      \"clockwise rightwards and leftwards open circle arrows with circled one overlay\",\n      \"repeat_one\"\n    ],\n    u: \"1f502\"\n  },\n  {\n    n: [\n      \"black right-pointing triangle\",\n      \"arrow_forward\"\n    ],\n    u: \"25b6-fe0f\"\n  },\n  {\n    n: [\n      \"black right-pointing double triangle\",\n      \"fast_forward\"\n    ],\n    u: \"23e9\"\n  },\n  {\n    n: [\n      \"black_right_pointing_double_triangle_with_vertical_bar\"\n    ],\n    u: \"23ed-fe0f\"\n  },\n  {\n    n: [\n      \"black_right_pointing_triangle_with_double_vertical_bar\"\n    ],\n    u: \"23ef-fe0f\"\n  },\n  {\n    n: [\n      \"black left-pointing triangle\",\n      \"arrow_backward\"\n    ],\n    u: \"25c0-fe0f\"\n  },\n  {\n    n: [\n      \"black left-pointing double triangle\",\n      \"rewind\"\n    ],\n    u: \"23ea\"\n  },\n  {\n    n: [\n      \"black_left_pointing_double_triangle_with_vertical_bar\"\n    ],\n    u: \"23ee-fe0f\"\n  },\n  {\n    n: [\n      \"up-pointing small red triangle\",\n      \"arrow_up_small\"\n    ],\n    u: \"1f53c\"\n  },\n  {\n    n: [\n      \"black up-pointing double triangle\",\n      \"arrow_double_up\"\n    ],\n    u: \"23eb\"\n  },\n  {\n    n: [\n      \"down-pointing small red triangle\",\n      \"arrow_down_small\"\n    ],\n    u: \"1f53d\"\n  },\n  {\n    n: [\n      \"black down-pointing double triangle\",\n      \"arrow_double_down\"\n    ],\n    u: \"23ec\"\n  },\n  {\n    n: [\n      \"double_vertical_bar\"\n    ],\n    u: \"23f8-fe0f\"\n  },\n  {\n    n: [\n      \"black_square_for_stop\"\n    ],\n    u: \"23f9-fe0f\"\n  },\n  {\n    n: [\n      \"black_circle_for_record\"\n    ],\n    u: \"23fa-fe0f\"\n  },\n  {\n    n: [\n      \"eject\"\n    ],\n    u: \"23cf-fe0f\"\n  },\n  {\n    n: [\n      \"cinema\"\n    ],\n    u: \"1f3a6\"\n  },\n  {\n    n: [\n      \"low brightness symbol\",\n      \"low_brightness\"\n    ],\n    u: \"1f505\"\n  },\n  {\n    n: [\n      \"high brightness symbol\",\n      \"high_brightness\"\n    ],\n    u: \"1f506\"\n  },\n  {\n    n: [\n      \"antenna with bars\",\n      \"signal_strength\"\n    ],\n    u: \"1f4f6\"\n  },\n  {\n    n: [\n      \"vibration mode\",\n      \"vibration_mode\"\n    ],\n    u: \"1f4f3\"\n  },\n  {\n    n: [\n      \"mobile phone off\",\n      \"mobile_phone_off\"\n    ],\n    u: \"1f4f4\"\n  },\n  {\n    n: [\n      \"female_sign\"\n    ],\n    u: \"2640-fe0f\"\n  },\n  {\n    n: [\n      \"male_sign\"\n    ],\n    u: \"2642-fe0f\"\n  },\n  {\n    n: [\n      \"medical_symbol\",\n      \"staff_of_aesculapius\"\n    ],\n    u: \"2695-fe0f\"\n  },\n  {\n    n: [\n      \"black universal recycling symbol\",\n      \"recycle\"\n    ],\n    u: \"267b-fe0f\"\n  },\n  {\n    n: [\n      \"fleur_de_lis\"\n    ],\n    u: \"269c-fe0f\"\n  },\n  {\n    n: [\n      \"trident emblem\",\n      \"trident\"\n    ],\n    u: \"1f531\"\n  },\n  {\n    n: [\n      \"name badge\",\n      \"name_badge\"\n    ],\n    u: \"1f4db\"\n  },\n  {\n    n: [\n      \"japanese symbol for beginner\",\n      \"beginner\"\n    ],\n    u: \"1f530\"\n  },\n  {\n    n: [\n      \"heavy large circle\",\n      \"o\"\n    ],\n    u: \"2b55\"\n  },\n  {\n    n: [\n      \"white heavy check mark\",\n      \"white_check_mark\"\n    ],\n    u: \"2705\"\n  },\n  {\n    n: [\n      \"ballot box with check\",\n      \"ballot_box_with_check\"\n    ],\n    u: \"2611-fe0f\"\n  },\n  {\n    n: [\n      \"heavy check mark\",\n      \"heavy_check_mark\"\n    ],\n    u: \"2714-fe0f\"\n  },\n  {\n    n: [\n      \"heavy multiplication x\",\n      \"heavy_multiplication_x\"\n    ],\n    u: \"2716-fe0f\"\n  },\n  {\n    n: [\n      \"cross mark\",\n      \"x\"\n    ],\n    u: \"274c\"\n  },\n  {\n    n: [\n      \"negative squared cross mark\",\n      \"negative_squared_cross_mark\"\n    ],\n    u: \"274e\"\n  },\n  {\n    n: [\n      \"heavy plus sign\",\n      \"heavy_plus_sign\"\n    ],\n    u: \"2795\"\n  },\n  {\n    n: [\n      \"heavy minus sign\",\n      \"heavy_minus_sign\"\n    ],\n    u: \"2796\"\n  },\n  {\n    n: [\n      \"heavy division sign\",\n      \"heavy_division_sign\"\n    ],\n    u: \"2797\"\n  },\n  {\n    n: [\n      \"curly loop\",\n      \"curly_loop\"\n    ],\n    u: \"27b0\"\n  },\n  {\n    n: [\n      \"double curly loop\",\n      \"loop\"\n    ],\n    u: \"27bf\"\n  },\n  {\n    n: [\n      \"part alternation mark\",\n      \"part_alternation_mark\"\n    ],\n    u: \"303d-fe0f\"\n  },\n  {\n    n: [\n      \"eight spoked asterisk\",\n      \"eight_spoked_asterisk\"\n    ],\n    u: \"2733-fe0f\"\n  },\n  {\n    n: [\n      \"eight pointed black star\",\n      \"eight_pointed_black_star\"\n    ],\n    u: \"2734-fe0f\"\n  },\n  {\n    n: [\n      \"sparkle\"\n    ],\n    u: \"2747-fe0f\"\n  },\n  {\n    n: [\n      \"double exclamation mark\",\n      \"bangbang\"\n    ],\n    u: \"203c-fe0f\"\n  },\n  {\n    n: [\n      \"exclamation question mark\",\n      \"interrobang\"\n    ],\n    u: \"2049-fe0f\"\n  },\n  {\n    n: [\n      \"black question mark ornament\",\n      \"question\"\n    ],\n    u: \"2753\"\n  },\n  {\n    n: [\n      \"white question mark ornament\",\n      \"grey_question\"\n    ],\n    u: \"2754\"\n  },\n  {\n    n: [\n      \"white exclamation mark ornament\",\n      \"grey_exclamation\"\n    ],\n    u: \"2755\"\n  },\n  {\n    n: [\n      \"heavy exclamation mark symbol\",\n      \"exclamation\",\n      \"heavy_exclamation_mark\"\n    ],\n    u: \"2757\"\n  },\n  {\n    n: [\n      \"wavy dash\",\n      \"wavy_dash\"\n    ],\n    u: \"3030-fe0f\"\n  },\n  {\n    n: [\n      \"copyright sign\",\n      \"copyright\"\n    ],\n    u: \"00a9-fe0f\"\n  },\n  {\n    n: [\n      \"registered sign\",\n      \"registered\"\n    ],\n    u: \"00ae-fe0f\"\n  },\n  {\n    n: [\n      \"trade mark sign\",\n      \"tm\"\n    ],\n    u: \"2122-fe0f\"\n  },\n  {\n    n: [\n      \"hash key\",\n      \"hash\"\n    ],\n    u: \"0023-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap_star\"\n    ],\n    u: \"002a-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 0\",\n      \"zero\"\n    ],\n    u: \"0030-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 1\",\n      \"one\"\n    ],\n    u: \"0031-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 2\",\n      \"two\"\n    ],\n    u: \"0032-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 3\",\n      \"three\"\n    ],\n    u: \"0033-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 4\",\n      \"four\"\n    ],\n    u: \"0034-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 5\",\n      \"five\"\n    ],\n    u: \"0035-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 6\",\n      \"six\"\n    ],\n    u: \"0036-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 7\",\n      \"seven\"\n    ],\n    u: \"0037-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 8\",\n      \"eight\"\n    ],\n    u: \"0038-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap 9\",\n      \"nine\"\n    ],\n    u: \"0039-fe0f-20e3\"\n  },\n  {\n    n: [\n      \"keycap ten\",\n      \"keycap_ten\"\n    ],\n    u: \"1f51f\"\n  },\n  {\n    n: [\n      \"hundred points symbol\",\n      \"100\"\n    ],\n    u: \"1f4af\"\n  },\n  {\n    n: [\n      \"input symbol for latin capital letters\",\n      \"capital_abcd\"\n    ],\n    u: \"1f520\"\n  },\n  {\n    n: [\n      \"input symbol for latin small letters\",\n      \"abcd\"\n    ],\n    u: \"1f521\"\n  },\n  {\n    n: [\n      \"input symbol for numbers\",\n      \"1234\"\n    ],\n    u: \"1f522\"\n  },\n  {\n    n: [\n      \"input symbol for symbols\",\n      \"symbols\"\n    ],\n    u: \"1f523\"\n  },\n  {\n    n: [\n      \"input symbol for latin letters\",\n      \"abc\"\n    ],\n    u: \"1f524\"\n  },\n  {\n    n: [\n      \"negative squared latin capital letter a\",\n      \"a\"\n    ],\n    u: \"1f170-fe0f\"\n  },\n  {\n    n: [\n      \"negative squared ab\",\n      \"ab\"\n    ],\n    u: \"1f18e\"\n  },\n  {\n    n: [\n      \"negative squared latin capital letter b\",\n      \"b\"\n    ],\n    u: \"1f171-fe0f\"\n  },\n  {\n    n: [\n      \"squared cl\",\n      \"cl\"\n    ],\n    u: \"1f191\"\n  },\n  {\n    n: [\n      \"squared cool\",\n      \"cool\"\n    ],\n    u: \"1f192\"\n  },\n  {\n    n: [\n      \"squared free\",\n      \"free\"\n    ],\n    u: \"1f193\"\n  },\n  {\n    n: [\n      \"information source\",\n      \"information_source\"\n    ],\n    u: \"2139-fe0f\"\n  },\n  {\n    n: [\n      \"squared id\",\n      \"id\"\n    ],\n    u: \"1f194\"\n  },\n  {\n    n: [\n      \"circled latin capital letter m\",\n      \"m\"\n    ],\n    u: \"24c2-fe0f\"\n  },\n  {\n    n: [\n      \"squared new\",\n      \"new\"\n    ],\n    u: \"1f195\"\n  },\n  {\n    n: [\n      \"squared ng\",\n      \"ng\"\n    ],\n    u: \"1f196\"\n  },\n  {\n    n: [\n      \"negative squared latin capital letter o\",\n      \"o2\"\n    ],\n    u: \"1f17e-fe0f\"\n  },\n  {\n    n: [\n      \"squared ok\",\n      \"ok\"\n    ],\n    u: \"1f197\"\n  },\n  {\n    n: [\n      \"negative squared latin capital letter p\",\n      \"parking\"\n    ],\n    u: \"1f17f-fe0f\"\n  },\n  {\n    n: [\n      \"squared sos\",\n      \"sos\"\n    ],\n    u: \"1f198\"\n  },\n  {\n    n: [\n      \"squared up with exclamation mark\",\n      \"up\"\n    ],\n    u: \"1f199\"\n  },\n  {\n    n: [\n      \"squared vs\",\n      \"vs\"\n    ],\n    u: \"1f19a\"\n  },\n  {\n    n: [\n      \"squared katakana koko\",\n      \"koko\"\n    ],\n    u: \"1f201\"\n  },\n  {\n    n: [\n      \"squared katakana sa\",\n      \"sa\"\n    ],\n    u: \"1f202-fe0f\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-6708\",\n      \"u6708\"\n    ],\n    u: \"1f237-fe0f\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-6709\",\n      \"u6709\"\n    ],\n    u: \"1f236\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-6307\",\n      \"u6307\"\n    ],\n    u: \"1f22f\"\n  },\n  {\n    n: [\n      \"circled ideograph advantage\",\n      \"ideograph_advantage\"\n    ],\n    u: \"1f250\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-5272\",\n      \"u5272\"\n    ],\n    u: \"1f239\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-7121\",\n      \"u7121\"\n    ],\n    u: \"1f21a\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-7981\",\n      \"u7981\"\n    ],\n    u: \"1f232\"\n  },\n  {\n    n: [\n      \"circled ideograph accept\",\n      \"accept\"\n    ],\n    u: \"1f251\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-7533\",\n      \"u7533\"\n    ],\n    u: \"1f238\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-5408\",\n      \"u5408\"\n    ],\n    u: \"1f234\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-7a7a\",\n      \"u7a7a\"\n    ],\n    u: \"1f233\"\n  },\n  {\n    n: [\n      \"circled ideograph congratulation\",\n      \"congratulations\"\n    ],\n    u: \"3297-fe0f\"\n  },\n  {\n    n: [\n      \"circled ideograph secret\",\n      \"secret\"\n    ],\n    u: \"3299-fe0f\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-55b6\",\n      \"u55b6\"\n    ],\n    u: \"1f23a\"\n  },\n  {\n    n: [\n      \"squared cjk unified ideograph-6e80\",\n      \"u6e80\"\n    ],\n    u: \"1f235\"\n  },\n  {\n    n: [\n      \"black small square\",\n      \"black_small_square\"\n    ],\n    u: \"25aa-fe0f\"\n  },\n  {\n    n: [\n      \"white small square\",\n      \"white_small_square\"\n    ],\n    u: \"25ab-fe0f\"\n  },\n  {\n    n: [\n      \"white medium square\",\n      \"white_medium_square\"\n    ],\n    u: \"25fb-fe0f\"\n  },\n  {\n    n: [\n      \"black medium square\",\n      \"black_medium_square\"\n    ],\n    u: \"25fc-fe0f\"\n  },\n  {\n    n: [\n      \"white medium small square\",\n      \"white_medium_small_square\"\n    ],\n    u: \"25fd\"\n  },\n  {\n    n: [\n      \"black medium small square\",\n      \"black_medium_small_square\"\n    ],\n    u: \"25fe\"\n  },\n  {\n    n: [\n      \"black large square\",\n      \"black_large_square\"\n    ],\n    u: \"2b1b\"\n  },\n  {\n    n: [\n      \"white large square\",\n      \"white_large_square\"\n    ],\n    u: \"2b1c\"\n  },\n  {\n    n: [\n      \"large orange diamond\",\n      \"large_orange_diamond\"\n    ],\n    u: \"1f536\"\n  },\n  {\n    n: [\n      \"large blue diamond\",\n      \"large_blue_diamond\"\n    ],\n    u: \"1f537\"\n  },\n  {\n    n: [\n      \"small orange diamond\",\n      \"small_orange_diamond\"\n    ],\n    u: \"1f538\"\n  },\n  {\n    n: [\n      \"small blue diamond\",\n      \"small_blue_diamond\"\n    ],\n    u: \"1f539\"\n  },\n  {\n    n: [\n      \"up-pointing red triangle\",\n      \"small_red_triangle\"\n    ],\n    u: \"1f53a\"\n  },\n  {\n    n: [\n      \"down-pointing red triangle\",\n      \"small_red_triangle_down\"\n    ],\n    u: \"1f53b\"\n  },\n  {\n    n: [\n      \"diamond shape with a dot inside\",\n      \"diamond_shape_with_a_dot_inside\"\n    ],\n    u: \"1f4a0\"\n  },\n  {\n    n: [\n      \"radio button\",\n      \"radio_button\"\n    ],\n    u: \"1f518\"\n  },\n  {\n    n: [\n      \"black square button\",\n      \"black_square_button\"\n    ],\n    u: \"1f532\"\n  },\n  {\n    n: [\n      \"white square button\",\n      \"white_square_button\"\n    ],\n    u: \"1f533\"\n  },\n  {\n    n: [\n      \"medium white circle\",\n      \"white_circle\"\n    ],\n    u: \"26aa\"\n  },\n  {\n    n: [\n      \"medium black circle\",\n      \"black_circle\"\n    ],\n    u: \"26ab\"\n  },\n  {\n    n: [\n      \"large red circle\",\n      \"red_circle\"\n    ],\n    u: \"1f534\"\n  },\n  {\n    n: [\n      \"large blue circle\",\n      \"large_blue_circle\"\n    ],\n    u: \"1f535\"\n  }\n];\nconst flags$1 = [\n  {\n    n: [\n      \"chequered flag\",\n      \"checkered_flag\"\n    ],\n    u: \"1f3c1\"\n  },\n  {\n    n: [\n      \"triangular flag on post\",\n      \"triangular_flag_on_post\"\n    ],\n    u: \"1f6a9\"\n  },\n  {\n    n: [\n      \"crossed flags\",\n      \"crossed_flags\"\n    ],\n    u: \"1f38c\"\n  },\n  {\n    n: [\n      \"waving black flag\",\n      \"waving_black_flag\"\n    ],\n    u: \"1f3f4\"\n  },\n  {\n    n: [\n      \"waving_white_flag\"\n    ],\n    u: \"1f3f3-fe0f\"\n  },\n  {\n    n: [\n      \"rainbow-flag\"\n    ],\n    u: \"1f3f3-fe0f-200d-1f308\"\n  },\n  {\n    n: [\n      \"ascension island flag\",\n      \"flag-ac\"\n    ],\n    u: \"1f1e6-1f1e8\"\n  },\n  {\n    n: [\n      \"andorra flag\",\n      \"flag-ad\"\n    ],\n    u: \"1f1e6-1f1e9\"\n  },\n  {\n    n: [\n      \"united arab emirates flag\",\n      \"flag-ae\"\n    ],\n    u: \"1f1e6-1f1ea\"\n  },\n  {\n    n: [\n      \"afghanistan flag\",\n      \"flag-af\"\n    ],\n    u: \"1f1e6-1f1eb\"\n  },\n  {\n    n: [\n      \"antigua & barbuda flag\",\n      \"flag-ag\"\n    ],\n    u: \"1f1e6-1f1ec\"\n  },\n  {\n    n: [\n      \"anguilla flag\",\n      \"flag-ai\"\n    ],\n    u: \"1f1e6-1f1ee\"\n  },\n  {\n    n: [\n      \"albania flag\",\n      \"flag-al\"\n    ],\n    u: \"1f1e6-1f1f1\"\n  },\n  {\n    n: [\n      \"armenia flag\",\n      \"flag-am\"\n    ],\n    u: \"1f1e6-1f1f2\"\n  },\n  {\n    n: [\n      \"angola flag\",\n      \"flag-ao\"\n    ],\n    u: \"1f1e6-1f1f4\"\n  },\n  {\n    n: [\n      \"antarctica flag\",\n      \"flag-aq\"\n    ],\n    u: \"1f1e6-1f1f6\"\n  },\n  {\n    n: [\n      \"argentina flag\",\n      \"flag-ar\"\n    ],\n    u: \"1f1e6-1f1f7\"\n  },\n  {\n    n: [\n      \"american samoa flag\",\n      \"flag-as\"\n    ],\n    u: \"1f1e6-1f1f8\"\n  },\n  {\n    n: [\n      \"austria flag\",\n      \"flag-at\"\n    ],\n    u: \"1f1e6-1f1f9\"\n  },\n  {\n    n: [\n      \"australia flag\",\n      \"flag-au\"\n    ],\n    u: \"1f1e6-1f1fa\"\n  },\n  {\n    n: [\n      \"aruba flag\",\n      \"flag-aw\"\n    ],\n    u: \"1f1e6-1f1fc\"\n  },\n  {\n    n: [\n      \"\\xE5land islands flag\",\n      \"flag-ax\"\n    ],\n    u: \"1f1e6-1f1fd\"\n  },\n  {\n    n: [\n      \"azerbaijan flag\",\n      \"flag-az\"\n    ],\n    u: \"1f1e6-1f1ff\"\n  },\n  {\n    n: [\n      \"bosnia & herzegovina flag\",\n      \"flag-ba\"\n    ],\n    u: \"1f1e7-1f1e6\"\n  },\n  {\n    n: [\n      \"barbados flag\",\n      \"flag-bb\"\n    ],\n    u: \"1f1e7-1f1e7\"\n  },\n  {\n    n: [\n      \"bangladesh flag\",\n      \"flag-bd\"\n    ],\n    u: \"1f1e7-1f1e9\"\n  },\n  {\n    n: [\n      \"belgium flag\",\n      \"flag-be\"\n    ],\n    u: \"1f1e7-1f1ea\"\n  },\n  {\n    n: [\n      \"burkina faso flag\",\n      \"flag-bf\"\n    ],\n    u: \"1f1e7-1f1eb\"\n  },\n  {\n    n: [\n      \"bulgaria flag\",\n      \"flag-bg\"\n    ],\n    u: \"1f1e7-1f1ec\"\n  },\n  {\n    n: [\n      \"bahrain flag\",\n      \"flag-bh\"\n    ],\n    u: \"1f1e7-1f1ed\"\n  },\n  {\n    n: [\n      \"burundi flag\",\n      \"flag-bi\"\n    ],\n    u: \"1f1e7-1f1ee\"\n  },\n  {\n    n: [\n      \"benin flag\",\n      \"flag-bj\"\n    ],\n    u: \"1f1e7-1f1ef\"\n  },\n  {\n    n: [\n      \"st. barth\\xE9lemy flag\",\n      \"flag-bl\"\n    ],\n    u: \"1f1e7-1f1f1\"\n  },\n  {\n    n: [\n      \"bermuda flag\",\n      \"flag-bm\"\n    ],\n    u: \"1f1e7-1f1f2\"\n  },\n  {\n    n: [\n      \"brunei flag\",\n      \"flag-bn\"\n    ],\n    u: \"1f1e7-1f1f3\"\n  },\n  {\n    n: [\n      \"bolivia flag\",\n      \"flag-bo\"\n    ],\n    u: \"1f1e7-1f1f4\"\n  },\n  {\n    n: [\n      \"caribbean netherlands flag\",\n      \"flag-bq\"\n    ],\n    u: \"1f1e7-1f1f6\"\n  },\n  {\n    n: [\n      \"brazil flag\",\n      \"flag-br\"\n    ],\n    u: \"1f1e7-1f1f7\"\n  },\n  {\n    n: [\n      \"bahamas flag\",\n      \"flag-bs\"\n    ],\n    u: \"1f1e7-1f1f8\"\n  },\n  {\n    n: [\n      \"bhutan flag\",\n      \"flag-bt\"\n    ],\n    u: \"1f1e7-1f1f9\"\n  },\n  {\n    n: [\n      \"bouvet island flag\",\n      \"flag-bv\"\n    ],\n    u: \"1f1e7-1f1fb\"\n  },\n  {\n    n: [\n      \"botswana flag\",\n      \"flag-bw\"\n    ],\n    u: \"1f1e7-1f1fc\"\n  },\n  {\n    n: [\n      \"belarus flag\",\n      \"flag-by\"\n    ],\n    u: \"1f1e7-1f1fe\"\n  },\n  {\n    n: [\n      \"belize flag\",\n      \"flag-bz\"\n    ],\n    u: \"1f1e7-1f1ff\"\n  },\n  {\n    n: [\n      \"canada flag\",\n      \"flag-ca\"\n    ],\n    u: \"1f1e8-1f1e6\"\n  },\n  {\n    n: [\n      \"cocos (keeling) islands flag\",\n      \"flag-cc\"\n    ],\n    u: \"1f1e8-1f1e8\"\n  },\n  {\n    n: [\n      \"congo - kinshasa flag\",\n      \"flag-cd\"\n    ],\n    u: \"1f1e8-1f1e9\"\n  },\n  {\n    n: [\n      \"central african republic flag\",\n      \"flag-cf\"\n    ],\n    u: \"1f1e8-1f1eb\"\n  },\n  {\n    n: [\n      \"congo - brazzaville flag\",\n      \"flag-cg\"\n    ],\n    u: \"1f1e8-1f1ec\"\n  },\n  {\n    n: [\n      \"switzerland flag\",\n      \"flag-ch\"\n    ],\n    u: \"1f1e8-1f1ed\"\n  },\n  {\n    n: [\n      \"c\\xF4te d\\u2019ivoire flag\",\n      \"flag-ci\"\n    ],\n    u: \"1f1e8-1f1ee\"\n  },\n  {\n    n: [\n      \"cook islands flag\",\n      \"flag-ck\"\n    ],\n    u: \"1f1e8-1f1f0\"\n  },\n  {\n    n: [\n      \"chile flag\",\n      \"flag-cl\"\n    ],\n    u: \"1f1e8-1f1f1\"\n  },\n  {\n    n: [\n      \"cameroon flag\",\n      \"flag-cm\"\n    ],\n    u: \"1f1e8-1f1f2\"\n  },\n  {\n    n: [\n      \"china flag\",\n      \"cn\",\n      \"flag-cn\"\n    ],\n    u: \"1f1e8-1f1f3\"\n  },\n  {\n    n: [\n      \"colombia flag\",\n      \"flag-co\"\n    ],\n    u: \"1f1e8-1f1f4\"\n  },\n  {\n    n: [\n      \"clipperton island flag\",\n      \"flag-cp\"\n    ],\n    u: \"1f1e8-1f1f5\"\n  },\n  {\n    n: [\n      \"costa rica flag\",\n      \"flag-cr\"\n    ],\n    u: \"1f1e8-1f1f7\"\n  },\n  {\n    n: [\n      \"cuba flag\",\n      \"flag-cu\"\n    ],\n    u: \"1f1e8-1f1fa\"\n  },\n  {\n    n: [\n      \"cape verde flag\",\n      \"flag-cv\"\n    ],\n    u: \"1f1e8-1f1fb\"\n  },\n  {\n    n: [\n      \"cura\\xE7ao flag\",\n      \"flag-cw\"\n    ],\n    u: \"1f1e8-1f1fc\"\n  },\n  {\n    n: [\n      \"christmas island flag\",\n      \"flag-cx\"\n    ],\n    u: \"1f1e8-1f1fd\"\n  },\n  {\n    n: [\n      \"cyprus flag\",\n      \"flag-cy\"\n    ],\n    u: \"1f1e8-1f1fe\"\n  },\n  {\n    n: [\n      \"czechia flag\",\n      \"flag-cz\"\n    ],\n    u: \"1f1e8-1f1ff\"\n  },\n  {\n    n: [\n      \"germany flag\",\n      \"de\",\n      \"flag-de\"\n    ],\n    u: \"1f1e9-1f1ea\"\n  },\n  {\n    n: [\n      \"diego garcia flag\",\n      \"flag-dg\"\n    ],\n    u: \"1f1e9-1f1ec\"\n  },\n  {\n    n: [\n      \"djibouti flag\",\n      \"flag-dj\"\n    ],\n    u: \"1f1e9-1f1ef\"\n  },\n  {\n    n: [\n      \"denmark flag\",\n      \"flag-dk\"\n    ],\n    u: \"1f1e9-1f1f0\"\n  },\n  {\n    n: [\n      \"dominica flag\",\n      \"flag-dm\"\n    ],\n    u: \"1f1e9-1f1f2\"\n  },\n  {\n    n: [\n      \"dominican republic flag\",\n      \"flag-do\"\n    ],\n    u: \"1f1e9-1f1f4\"\n  },\n  {\n    n: [\n      \"algeria flag\",\n      \"flag-dz\"\n    ],\n    u: \"1f1e9-1f1ff\"\n  },\n  {\n    n: [\n      \"ceuta & melilla flag\",\n      \"flag-ea\"\n    ],\n    u: \"1f1ea-1f1e6\"\n  },\n  {\n    n: [\n      \"ecuador flag\",\n      \"flag-ec\"\n    ],\n    u: \"1f1ea-1f1e8\"\n  },\n  {\n    n: [\n      \"estonia flag\",\n      \"flag-ee\"\n    ],\n    u: \"1f1ea-1f1ea\"\n  },\n  {\n    n: [\n      \"egypt flag\",\n      \"flag-eg\"\n    ],\n    u: \"1f1ea-1f1ec\"\n  },\n  {\n    n: [\n      \"western sahara flag\",\n      \"flag-eh\"\n    ],\n    u: \"1f1ea-1f1ed\"\n  },\n  {\n    n: [\n      \"eritrea flag\",\n      \"flag-er\"\n    ],\n    u: \"1f1ea-1f1f7\"\n  },\n  {\n    n: [\n      \"spain flag\",\n      \"es\",\n      \"flag-es\"\n    ],\n    u: \"1f1ea-1f1f8\"\n  },\n  {\n    n: [\n      \"ethiopia flag\",\n      \"flag-et\"\n    ],\n    u: \"1f1ea-1f1f9\"\n  },\n  {\n    n: [\n      \"european union flag\",\n      \"flag-eu\"\n    ],\n    u: \"1f1ea-1f1fa\"\n  },\n  {\n    n: [\n      \"finland flag\",\n      \"flag-fi\"\n    ],\n    u: \"1f1eb-1f1ee\"\n  },\n  {\n    n: [\n      \"fiji flag\",\n      \"flag-fj\"\n    ],\n    u: \"1f1eb-1f1ef\"\n  },\n  {\n    n: [\n      \"falkland islands flag\",\n      \"flag-fk\"\n    ],\n    u: \"1f1eb-1f1f0\"\n  },\n  {\n    n: [\n      \"micronesia flag\",\n      \"flag-fm\"\n    ],\n    u: \"1f1eb-1f1f2\"\n  },\n  {\n    n: [\n      \"faroe islands flag\",\n      \"flag-fo\"\n    ],\n    u: \"1f1eb-1f1f4\"\n  },\n  {\n    n: [\n      \"france flag\",\n      \"fr\",\n      \"flag-fr\"\n    ],\n    u: \"1f1eb-1f1f7\"\n  },\n  {\n    n: [\n      \"gabon flag\",\n      \"flag-ga\"\n    ],\n    u: \"1f1ec-1f1e6\"\n  },\n  {\n    n: [\n      \"united kingdom flag\",\n      \"gb\",\n      \"uk\",\n      \"flag-gb\"\n    ],\n    u: \"1f1ec-1f1e7\"\n  },\n  {\n    n: [\n      \"grenada flag\",\n      \"flag-gd\"\n    ],\n    u: \"1f1ec-1f1e9\"\n  },\n  {\n    n: [\n      \"georgia flag\",\n      \"flag-ge\"\n    ],\n    u: \"1f1ec-1f1ea\"\n  },\n  {\n    n: [\n      \"french guiana flag\",\n      \"flag-gf\"\n    ],\n    u: \"1f1ec-1f1eb\"\n  },\n  {\n    n: [\n      \"guernsey flag\",\n      \"flag-gg\"\n    ],\n    u: \"1f1ec-1f1ec\"\n  },\n  {\n    n: [\n      \"ghana flag\",\n      \"flag-gh\"\n    ],\n    u: \"1f1ec-1f1ed\"\n  },\n  {\n    n: [\n      \"gibraltar flag\",\n      \"flag-gi\"\n    ],\n    u: \"1f1ec-1f1ee\"\n  },\n  {\n    n: [\n      \"greenland flag\",\n      \"flag-gl\"\n    ],\n    u: \"1f1ec-1f1f1\"\n  },\n  {\n    n: [\n      \"gambia flag\",\n      \"flag-gm\"\n    ],\n    u: \"1f1ec-1f1f2\"\n  },\n  {\n    n: [\n      \"guinea flag\",\n      \"flag-gn\"\n    ],\n    u: \"1f1ec-1f1f3\"\n  },\n  {\n    n: [\n      \"guadeloupe flag\",\n      \"flag-gp\"\n    ],\n    u: \"1f1ec-1f1f5\"\n  },\n  {\n    n: [\n      \"equatorial guinea flag\",\n      \"flag-gq\"\n    ],\n    u: \"1f1ec-1f1f6\"\n  },\n  {\n    n: [\n      \"greece flag\",\n      \"flag-gr\"\n    ],\n    u: \"1f1ec-1f1f7\"\n  },\n  {\n    n: [\n      \"south georgia & south sandwich islands flag\",\n      \"flag-gs\"\n    ],\n    u: \"1f1ec-1f1f8\"\n  },\n  {\n    n: [\n      \"guatemala flag\",\n      \"flag-gt\"\n    ],\n    u: \"1f1ec-1f1f9\"\n  },\n  {\n    n: [\n      \"guam flag\",\n      \"flag-gu\"\n    ],\n    u: \"1f1ec-1f1fa\"\n  },\n  {\n    n: [\n      \"guinea-bissau flag\",\n      \"flag-gw\"\n    ],\n    u: \"1f1ec-1f1fc\"\n  },\n  {\n    n: [\n      \"guyana flag\",\n      \"flag-gy\"\n    ],\n    u: \"1f1ec-1f1fe\"\n  },\n  {\n    n: [\n      \"hong kong sar china flag\",\n      \"flag-hk\"\n    ],\n    u: \"1f1ed-1f1f0\"\n  },\n  {\n    n: [\n      \"heard & mcdonald islands flag\",\n      \"flag-hm\"\n    ],\n    u: \"1f1ed-1f1f2\"\n  },\n  {\n    n: [\n      \"honduras flag\",\n      \"flag-hn\"\n    ],\n    u: \"1f1ed-1f1f3\"\n  },\n  {\n    n: [\n      \"croatia flag\",\n      \"flag-hr\"\n    ],\n    u: \"1f1ed-1f1f7\"\n  },\n  {\n    n: [\n      \"haiti flag\",\n      \"flag-ht\"\n    ],\n    u: \"1f1ed-1f1f9\"\n  },\n  {\n    n: [\n      \"hungary flag\",\n      \"flag-hu\"\n    ],\n    u: \"1f1ed-1f1fa\"\n  },\n  {\n    n: [\n      \"canary islands flag\",\n      \"flag-ic\"\n    ],\n    u: \"1f1ee-1f1e8\"\n  },\n  {\n    n: [\n      \"indonesia flag\",\n      \"flag-id\"\n    ],\n    u: \"1f1ee-1f1e9\"\n  },\n  {\n    n: [\n      \"ireland flag\",\n      \"flag-ie\"\n    ],\n    u: \"1f1ee-1f1ea\"\n  },\n  {\n    n: [\n      \"israel flag\",\n      \"flag-il\"\n    ],\n    u: \"1f1ee-1f1f1\"\n  },\n  {\n    n: [\n      \"isle of man flag\",\n      \"flag-im\"\n    ],\n    u: \"1f1ee-1f1f2\"\n  },\n  {\n    n: [\n      \"india flag\",\n      \"flag-in\"\n    ],\n    u: \"1f1ee-1f1f3\"\n  },\n  {\n    n: [\n      \"british indian ocean territory flag\",\n      \"flag-io\"\n    ],\n    u: \"1f1ee-1f1f4\"\n  },\n  {\n    n: [\n      \"iraq flag\",\n      \"flag-iq\"\n    ],\n    u: \"1f1ee-1f1f6\"\n  },\n  {\n    n: [\n      \"iran flag\",\n      \"flag-ir\"\n    ],\n    u: \"1f1ee-1f1f7\"\n  },\n  {\n    n: [\n      \"iceland flag\",\n      \"flag-is\"\n    ],\n    u: \"1f1ee-1f1f8\"\n  },\n  {\n    n: [\n      \"italy flag\",\n      \"it\",\n      \"flag-it\"\n    ],\n    u: \"1f1ee-1f1f9\"\n  },\n  {\n    n: [\n      \"jersey flag\",\n      \"flag-je\"\n    ],\n    u: \"1f1ef-1f1ea\"\n  },\n  {\n    n: [\n      \"jamaica flag\",\n      \"flag-jm\"\n    ],\n    u: \"1f1ef-1f1f2\"\n  },\n  {\n    n: [\n      \"jordan flag\",\n      \"flag-jo\"\n    ],\n    u: \"1f1ef-1f1f4\"\n  },\n  {\n    n: [\n      \"japan flag\",\n      \"jp\",\n      \"flag-jp\"\n    ],\n    u: \"1f1ef-1f1f5\"\n  },\n  {\n    n: [\n      \"kenya flag\",\n      \"flag-ke\"\n    ],\n    u: \"1f1f0-1f1ea\"\n  },\n  {\n    n: [\n      \"kyrgyzstan flag\",\n      \"flag-kg\"\n    ],\n    u: \"1f1f0-1f1ec\"\n  },\n  {\n    n: [\n      \"cambodia flag\",\n      \"flag-kh\"\n    ],\n    u: \"1f1f0-1f1ed\"\n  },\n  {\n    n: [\n      \"kiribati flag\",\n      \"flag-ki\"\n    ],\n    u: \"1f1f0-1f1ee\"\n  },\n  {\n    n: [\n      \"comoros flag\",\n      \"flag-km\"\n    ],\n    u: \"1f1f0-1f1f2\"\n  },\n  {\n    n: [\n      \"st. kitts & nevis flag\",\n      \"flag-kn\"\n    ],\n    u: \"1f1f0-1f1f3\"\n  },\n  {\n    n: [\n      \"north korea flag\",\n      \"flag-kp\"\n    ],\n    u: \"1f1f0-1f1f5\"\n  },\n  {\n    n: [\n      \"south korea flag\",\n      \"kr\",\n      \"flag-kr\"\n    ],\n    u: \"1f1f0-1f1f7\"\n  },\n  {\n    n: [\n      \"kuwait flag\",\n      \"flag-kw\"\n    ],\n    u: \"1f1f0-1f1fc\"\n  },\n  {\n    n: [\n      \"cayman islands flag\",\n      \"flag-ky\"\n    ],\n    u: \"1f1f0-1f1fe\"\n  },\n  {\n    n: [\n      \"kazakhstan flag\",\n      \"flag-kz\"\n    ],\n    u: \"1f1f0-1f1ff\"\n  },\n  {\n    n: [\n      \"laos flag\",\n      \"flag-la\"\n    ],\n    u: \"1f1f1-1f1e6\"\n  },\n  {\n    n: [\n      \"lebanon flag\",\n      \"flag-lb\"\n    ],\n    u: \"1f1f1-1f1e7\"\n  },\n  {\n    n: [\n      \"st. lucia flag\",\n      \"flag-lc\"\n    ],\n    u: \"1f1f1-1f1e8\"\n  },\n  {\n    n: [\n      \"liechtenstein flag\",\n      \"flag-li\"\n    ],\n    u: \"1f1f1-1f1ee\"\n  },\n  {\n    n: [\n      \"sri lanka flag\",\n      \"flag-lk\"\n    ],\n    u: \"1f1f1-1f1f0\"\n  },\n  {\n    n: [\n      \"liberia flag\",\n      \"flag-lr\"\n    ],\n    u: \"1f1f1-1f1f7\"\n  },\n  {\n    n: [\n      \"lesotho flag\",\n      \"flag-ls\"\n    ],\n    u: \"1f1f1-1f1f8\"\n  },\n  {\n    n: [\n      \"lithuania flag\",\n      \"flag-lt\"\n    ],\n    u: \"1f1f1-1f1f9\"\n  },\n  {\n    n: [\n      \"luxembourg flag\",\n      \"flag-lu\"\n    ],\n    u: \"1f1f1-1f1fa\"\n  },\n  {\n    n: [\n      \"latvia flag\",\n      \"flag-lv\"\n    ],\n    u: \"1f1f1-1f1fb\"\n  },\n  {\n    n: [\n      \"libya flag\",\n      \"flag-ly\"\n    ],\n    u: \"1f1f1-1f1fe\"\n  },\n  {\n    n: [\n      \"morocco flag\",\n      \"flag-ma\"\n    ],\n    u: \"1f1f2-1f1e6\"\n  },\n  {\n    n: [\n      \"monaco flag\",\n      \"flag-mc\"\n    ],\n    u: \"1f1f2-1f1e8\"\n  },\n  {\n    n: [\n      \"moldova flag\",\n      \"flag-md\"\n    ],\n    u: \"1f1f2-1f1e9\"\n  },\n  {\n    n: [\n      \"montenegro flag\",\n      \"flag-me\"\n    ],\n    u: \"1f1f2-1f1ea\"\n  },\n  {\n    n: [\n      \"st. martin flag\",\n      \"flag-mf\"\n    ],\n    u: \"1f1f2-1f1eb\"\n  },\n  {\n    n: [\n      \"madagascar flag\",\n      \"flag-mg\"\n    ],\n    u: \"1f1f2-1f1ec\"\n  },\n  {\n    n: [\n      \"marshall islands flag\",\n      \"flag-mh\"\n    ],\n    u: \"1f1f2-1f1ed\"\n  },\n  {\n    n: [\n      \"macedonia flag\",\n      \"flag-mk\"\n    ],\n    u: \"1f1f2-1f1f0\"\n  },\n  {\n    n: [\n      \"mali flag\",\n      \"flag-ml\"\n    ],\n    u: \"1f1f2-1f1f1\"\n  },\n  {\n    n: [\n      \"myanmar (burma) flag\",\n      \"flag-mm\"\n    ],\n    u: \"1f1f2-1f1f2\"\n  },\n  {\n    n: [\n      \"mongolia flag\",\n      \"flag-mn\"\n    ],\n    u: \"1f1f2-1f1f3\"\n  },\n  {\n    n: [\n      \"macau sar china flag\",\n      \"flag-mo\"\n    ],\n    u: \"1f1f2-1f1f4\"\n  },\n  {\n    n: [\n      \"northern mariana islands flag\",\n      \"flag-mp\"\n    ],\n    u: \"1f1f2-1f1f5\"\n  },\n  {\n    n: [\n      \"martinique flag\",\n      \"flag-mq\"\n    ],\n    u: \"1f1f2-1f1f6\"\n  },\n  {\n    n: [\n      \"mauritania flag\",\n      \"flag-mr\"\n    ],\n    u: \"1f1f2-1f1f7\"\n  },\n  {\n    n: [\n      \"montserrat flag\",\n      \"flag-ms\"\n    ],\n    u: \"1f1f2-1f1f8\"\n  },\n  {\n    n: [\n      \"malta flag\",\n      \"flag-mt\"\n    ],\n    u: \"1f1f2-1f1f9\"\n  },\n  {\n    n: [\n      \"mauritius flag\",\n      \"flag-mu\"\n    ],\n    u: \"1f1f2-1f1fa\"\n  },\n  {\n    n: [\n      \"maldives flag\",\n      \"flag-mv\"\n    ],\n    u: \"1f1f2-1f1fb\"\n  },\n  {\n    n: [\n      \"malawi flag\",\n      \"flag-mw\"\n    ],\n    u: \"1f1f2-1f1fc\"\n  },\n  {\n    n: [\n      \"mexico flag\",\n      \"flag-mx\"\n    ],\n    u: \"1f1f2-1f1fd\"\n  },\n  {\n    n: [\n      \"malaysia flag\",\n      \"flag-my\"\n    ],\n    u: \"1f1f2-1f1fe\"\n  },\n  {\n    n: [\n      \"mozambique flag\",\n      \"flag-mz\"\n    ],\n    u: \"1f1f2-1f1ff\"\n  },\n  {\n    n: [\n      \"namibia flag\",\n      \"flag-na\"\n    ],\n    u: \"1f1f3-1f1e6\"\n  },\n  {\n    n: [\n      \"new caledonia flag\",\n      \"flag-nc\"\n    ],\n    u: \"1f1f3-1f1e8\"\n  },\n  {\n    n: [\n      \"niger flag\",\n      \"flag-ne\"\n    ],\n    u: \"1f1f3-1f1ea\"\n  },\n  {\n    n: [\n      \"norfolk island flag\",\n      \"flag-nf\"\n    ],\n    u: \"1f1f3-1f1eb\"\n  },\n  {\n    n: [\n      \"nigeria flag\",\n      \"flag-ng\"\n    ],\n    u: \"1f1f3-1f1ec\"\n  },\n  {\n    n: [\n      \"nicaragua flag\",\n      \"flag-ni\"\n    ],\n    u: \"1f1f3-1f1ee\"\n  },\n  {\n    n: [\n      \"netherlands flag\",\n      \"flag-nl\"\n    ],\n    u: \"1f1f3-1f1f1\"\n  },\n  {\n    n: [\n      \"norway flag\",\n      \"flag-no\"\n    ],\n    u: \"1f1f3-1f1f4\"\n  },\n  {\n    n: [\n      \"nepal flag\",\n      \"flag-np\"\n    ],\n    u: \"1f1f3-1f1f5\"\n  },\n  {\n    n: [\n      \"nauru flag\",\n      \"flag-nr\"\n    ],\n    u: \"1f1f3-1f1f7\"\n  },\n  {\n    n: [\n      \"niue flag\",\n      \"flag-nu\"\n    ],\n    u: \"1f1f3-1f1fa\"\n  },\n  {\n    n: [\n      \"new zealand flag\",\n      \"flag-nz\"\n    ],\n    u: \"1f1f3-1f1ff\"\n  },\n  {\n    n: [\n      \"oman flag\",\n      \"flag-om\"\n    ],\n    u: \"1f1f4-1f1f2\"\n  },\n  {\n    n: [\n      \"panama flag\",\n      \"flag-pa\"\n    ],\n    u: \"1f1f5-1f1e6\"\n  },\n  {\n    n: [\n      \"peru flag\",\n      \"flag-pe\"\n    ],\n    u: \"1f1f5-1f1ea\"\n  },\n  {\n    n: [\n      \"french polynesia flag\",\n      \"flag-pf\"\n    ],\n    u: \"1f1f5-1f1eb\"\n  },\n  {\n    n: [\n      \"papua new guinea flag\",\n      \"flag-pg\"\n    ],\n    u: \"1f1f5-1f1ec\"\n  },\n  {\n    n: [\n      \"philippines flag\",\n      \"flag-ph\"\n    ],\n    u: \"1f1f5-1f1ed\"\n  },\n  {\n    n: [\n      \"pakistan flag\",\n      \"flag-pk\"\n    ],\n    u: \"1f1f5-1f1f0\"\n  },\n  {\n    n: [\n      \"poland flag\",\n      \"flag-pl\"\n    ],\n    u: \"1f1f5-1f1f1\"\n  },\n  {\n    n: [\n      \"st. pierre & miquelon flag\",\n      \"flag-pm\"\n    ],\n    u: \"1f1f5-1f1f2\"\n  },\n  {\n    n: [\n      \"pitcairn islands flag\",\n      \"flag-pn\"\n    ],\n    u: \"1f1f5-1f1f3\"\n  },\n  {\n    n: [\n      \"puerto rico flag\",\n      \"flag-pr\"\n    ],\n    u: \"1f1f5-1f1f7\"\n  },\n  {\n    n: [\n      \"palestinian territories flag\",\n      \"flag-ps\"\n    ],\n    u: \"1f1f5-1f1f8\"\n  },\n  {\n    n: [\n      \"portugal flag\",\n      \"flag-pt\"\n    ],\n    u: \"1f1f5-1f1f9\"\n  },\n  {\n    n: [\n      \"palau flag\",\n      \"flag-pw\"\n    ],\n    u: \"1f1f5-1f1fc\"\n  },\n  {\n    n: [\n      \"paraguay flag\",\n      \"flag-py\"\n    ],\n    u: \"1f1f5-1f1fe\"\n  },\n  {\n    n: [\n      \"qatar flag\",\n      \"flag-qa\"\n    ],\n    u: \"1f1f6-1f1e6\"\n  },\n  {\n    n: [\n      \"r\\xE9union flag\",\n      \"flag-re\"\n    ],\n    u: \"1f1f7-1f1ea\"\n  },\n  {\n    n: [\n      \"romania flag\",\n      \"flag-ro\"\n    ],\n    u: \"1f1f7-1f1f4\"\n  },\n  {\n    n: [\n      \"serbia flag\",\n      \"flag-rs\"\n    ],\n    u: \"1f1f7-1f1f8\"\n  },\n  {\n    n: [\n      \"russia flag\",\n      \"ru\",\n      \"flag-ru\"\n    ],\n    u: \"1f1f7-1f1fa\"\n  },\n  {\n    n: [\n      \"rwanda flag\",\n      \"flag-rw\"\n    ],\n    u: \"1f1f7-1f1fc\"\n  },\n  {\n    n: [\n      \"saudi arabia flag\",\n      \"flag-sa\"\n    ],\n    u: \"1f1f8-1f1e6\"\n  },\n  {\n    n: [\n      \"solomon islands flag\",\n      \"flag-sb\"\n    ],\n    u: \"1f1f8-1f1e7\"\n  },\n  {\n    n: [\n      \"seychelles flag\",\n      \"flag-sc\"\n    ],\n    u: \"1f1f8-1f1e8\"\n  },\n  {\n    n: [\n      \"sudan flag\",\n      \"flag-sd\"\n    ],\n    u: \"1f1f8-1f1e9\"\n  },\n  {\n    n: [\n      \"sweden flag\",\n      \"flag-se\"\n    ],\n    u: \"1f1f8-1f1ea\"\n  },\n  {\n    n: [\n      \"singapore flag\",\n      \"flag-sg\"\n    ],\n    u: \"1f1f8-1f1ec\"\n  },\n  {\n    n: [\n      \"st. helena flag\",\n      \"flag-sh\"\n    ],\n    u: \"1f1f8-1f1ed\"\n  },\n  {\n    n: [\n      \"slovenia flag\",\n      \"flag-si\"\n    ],\n    u: \"1f1f8-1f1ee\"\n  },\n  {\n    n: [\n      \"svalbard & jan mayen flag\",\n      \"flag-sj\"\n    ],\n    u: \"1f1f8-1f1ef\"\n  },\n  {\n    n: [\n      \"slovakia flag\",\n      \"flag-sk\"\n    ],\n    u: \"1f1f8-1f1f0\"\n  },\n  {\n    n: [\n      \"sierra leone flag\",\n      \"flag-sl\"\n    ],\n    u: \"1f1f8-1f1f1\"\n  },\n  {\n    n: [\n      \"san marino flag\",\n      \"flag-sm\"\n    ],\n    u: \"1f1f8-1f1f2\"\n  },\n  {\n    n: [\n      \"senegal flag\",\n      \"flag-sn\"\n    ],\n    u: \"1f1f8-1f1f3\"\n  },\n  {\n    n: [\n      \"somalia flag\",\n      \"flag-so\"\n    ],\n    u: \"1f1f8-1f1f4\"\n  },\n  {\n    n: [\n      \"suriname flag\",\n      \"flag-sr\"\n    ],\n    u: \"1f1f8-1f1f7\"\n  },\n  {\n    n: [\n      \"south sudan flag\",\n      \"flag-ss\"\n    ],\n    u: \"1f1f8-1f1f8\"\n  },\n  {\n    n: [\n      \"s\\xE3o tom\\xE9 & pr\\xEDncipe flag\",\n      \"flag-st\"\n    ],\n    u: \"1f1f8-1f1f9\"\n  },\n  {\n    n: [\n      \"el salvador flag\",\n      \"flag-sv\"\n    ],\n    u: \"1f1f8-1f1fb\"\n  },\n  {\n    n: [\n      \"sint maarten flag\",\n      \"flag-sx\"\n    ],\n    u: \"1f1f8-1f1fd\"\n  },\n  {\n    n: [\n      \"syria flag\",\n      \"flag-sy\"\n    ],\n    u: \"1f1f8-1f1fe\"\n  },\n  {\n    n: [\n      \"swaziland flag\",\n      \"flag-sz\"\n    ],\n    u: \"1f1f8-1f1ff\"\n  },\n  {\n    n: [\n      \"tristan da cunha flag\",\n      \"flag-ta\"\n    ],\n    u: \"1f1f9-1f1e6\"\n  },\n  {\n    n: [\n      \"turks & caicos islands flag\",\n      \"flag-tc\"\n    ],\n    u: \"1f1f9-1f1e8\"\n  },\n  {\n    n: [\n      \"chad flag\",\n      \"flag-td\"\n    ],\n    u: \"1f1f9-1f1e9\"\n  },\n  {\n    n: [\n      \"french southern territories flag\",\n      \"flag-tf\"\n    ],\n    u: \"1f1f9-1f1eb\"\n  },\n  {\n    n: [\n      \"togo flag\",\n      \"flag-tg\"\n    ],\n    u: \"1f1f9-1f1ec\"\n  },\n  {\n    n: [\n      \"thailand flag\",\n      \"flag-th\"\n    ],\n    u: \"1f1f9-1f1ed\"\n  },\n  {\n    n: [\n      \"tajikistan flag\",\n      \"flag-tj\"\n    ],\n    u: \"1f1f9-1f1ef\"\n  },\n  {\n    n: [\n      \"tokelau flag\",\n      \"flag-tk\"\n    ],\n    u: \"1f1f9-1f1f0\"\n  },\n  {\n    n: [\n      \"timor-leste flag\",\n      \"flag-tl\"\n    ],\n    u: \"1f1f9-1f1f1\"\n  },\n  {\n    n: [\n      \"turkmenistan flag\",\n      \"flag-tm\"\n    ],\n    u: \"1f1f9-1f1f2\"\n  },\n  {\n    n: [\n      \"tunisia flag\",\n      \"flag-tn\"\n    ],\n    u: \"1f1f9-1f1f3\"\n  },\n  {\n    n: [\n      \"tonga flag\",\n      \"flag-to\"\n    ],\n    u: \"1f1f9-1f1f4\"\n  },\n  {\n    n: [\n      \"turkey flag\",\n      \"flag-tr\"\n    ],\n    u: \"1f1f9-1f1f7\"\n  },\n  {\n    n: [\n      \"trinidad & tobago flag\",\n      \"flag-tt\"\n    ],\n    u: \"1f1f9-1f1f9\"\n  },\n  {\n    n: [\n      \"tuvalu flag\",\n      \"flag-tv\"\n    ],\n    u: \"1f1f9-1f1fb\"\n  },\n  {\n    n: [\n      \"taiwan flag\",\n      \"flag-tw\"\n    ],\n    u: \"1f1f9-1f1fc\"\n  },\n  {\n    n: [\n      \"tanzania flag\",\n      \"flag-tz\"\n    ],\n    u: \"1f1f9-1f1ff\"\n  },\n  {\n    n: [\n      \"ukraine flag\",\n      \"flag-ua\"\n    ],\n    u: \"1f1fa-1f1e6\"\n  },\n  {\n    n: [\n      \"uganda flag\",\n      \"flag-ug\"\n    ],\n    u: \"1f1fa-1f1ec\"\n  },\n  {\n    n: [\n      \"u.s. outlying islands flag\",\n      \"flag-um\"\n    ],\n    u: \"1f1fa-1f1f2\"\n  },\n  {\n    n: [\n      \"united nations flag\",\n      \"flag-un\"\n    ],\n    u: \"1f1fa-1f1f3\"\n  },\n  {\n    n: [\n      \"united states flag\",\n      \"us\",\n      \"flag-us\"\n    ],\n    u: \"1f1fa-1f1f8\"\n  },\n  {\n    n: [\n      \"uruguay flag\",\n      \"flag-uy\"\n    ],\n    u: \"1f1fa-1f1fe\"\n  },\n  {\n    n: [\n      \"uzbekistan flag\",\n      \"flag-uz\"\n    ],\n    u: \"1f1fa-1f1ff\"\n  },\n  {\n    n: [\n      \"vatican city flag\",\n      \"flag-va\"\n    ],\n    u: \"1f1fb-1f1e6\"\n  },\n  {\n    n: [\n      \"st. vincent & grenadines flag\",\n      \"flag-vc\"\n    ],\n    u: \"1f1fb-1f1e8\"\n  },\n  {\n    n: [\n      \"venezuela flag\",\n      \"flag-ve\"\n    ],\n    u: \"1f1fb-1f1ea\"\n  },\n  {\n    n: [\n      \"british virgin islands flag\",\n      \"flag-vg\"\n    ],\n    u: \"1f1fb-1f1ec\"\n  },\n  {\n    n: [\n      \"u.s. virgin islands flag\",\n      \"flag-vi\"\n    ],\n    u: \"1f1fb-1f1ee\"\n  },\n  {\n    n: [\n      \"vietnam flag\",\n      \"flag-vn\"\n    ],\n    u: \"1f1fb-1f1f3\"\n  },\n  {\n    n: [\n      \"vanuatu flag\",\n      \"flag-vu\"\n    ],\n    u: \"1f1fb-1f1fa\"\n  },\n  {\n    n: [\n      \"wallis & futuna flag\",\n      \"flag-wf\"\n    ],\n    u: \"1f1fc-1f1eb\"\n  },\n  {\n    n: [\n      \"samoa flag\",\n      \"flag-ws\"\n    ],\n    u: \"1f1fc-1f1f8\"\n  },\n  {\n    n: [\n      \"kosovo flag\",\n      \"flag-xk\"\n    ],\n    u: \"1f1fd-1f1f0\"\n  },\n  {\n    n: [\n      \"yemen flag\",\n      \"flag-ye\"\n    ],\n    u: \"1f1fe-1f1ea\"\n  },\n  {\n    n: [\n      \"mayotte flag\",\n      \"flag-yt\"\n    ],\n    u: \"1f1fe-1f1f9\"\n  },\n  {\n    n: [\n      \"south africa flag\",\n      \"flag-za\"\n    ],\n    u: \"1f1ff-1f1e6\"\n  },\n  {\n    n: [\n      \"zambia flag\",\n      \"flag-zm\"\n    ],\n    u: \"1f1ff-1f1f2\"\n  },\n  {\n    n: [\n      \"zimbabwe flag\",\n      \"flag-zw\"\n    ],\n    u: \"1f1ff-1f1fc\"\n  },\n  {\n    n: [\n      \"england flag\",\n      \"flag-england\"\n    ],\n    u: \"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f\"\n  },\n  {\n    n: [\n      \"scotland flag\",\n      \"flag-scotland\"\n    ],\n    u: \"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f\"\n  },\n  {\n    n: [\n      \"wales flag\",\n      \"flag-wales\"\n    ],\n    u: \"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f\"\n  }\n];\nvar emojis = {\n  smileys_people: smileys_people$1,\n  animals_nature: animals_nature$1,\n  food_drink: food_drink$1,\n  activities: activities$1,\n  travel_places: travel_places$1,\n  objects: objects$1,\n  symbols: symbols$1,\n  flags: flags$1\n};\nvar _groups = [\n  {\n    key: \"recent\",\n    title: \"Recently Used\",\n    u: \"1f551\"\n  },\n  {\n    key: \"smileys_people\",\n    title: \"Smiles & People\",\n    u: \"1f600\"\n  },\n  {\n    key: \"animals_nature\",\n    title: \"Animals & Nature\",\n    u: \"1F431\"\n  },\n  {\n    key: \"food_drink\",\n    title: \"Food & Drink\",\n    u: \"2615\"\n  },\n  {\n    key: \"activities\",\n    title: \"Activities\",\n    u: \"26BD\"\n  },\n  {\n    key: \"travel_places\",\n    title: \"Travel & Places\",\n    u: \"1F697\"\n  },\n  {\n    key: \"objects\",\n    title: \"Objects\",\n    u: \"1F4A1\"\n  },\n  {\n    key: \"symbols\",\n    title: \"Symbols\",\n    u: \"1f4af\"\n  },\n  {\n    key: \"flags\",\n    title: \"Flags\",\n    u: \"1f3f3-fe0f\"\n  }\n];\nconst instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\nfunction getIdbProxyableTypes() {\n  return idbProxyableTypes || (idbProxyableTypes = [\n    IDBDatabase,\n    IDBObjectStore,\n    IDBIndex,\n    IDBCursor,\n    IDBTransaction\n  ]);\n}\nfunction getCursorAdvanceMethods() {\n  return cursorAdvanceMethods || (cursorAdvanceMethods = [\n    IDBCursor.prototype.advance,\n    IDBCursor.prototype.continue,\n    IDBCursor.prototype.continuePrimaryKey\n  ]);\n}\nconst cursorRequestMap = /* @__PURE__ */ new WeakMap();\nconst transactionDoneMap = /* @__PURE__ */ new WeakMap();\nconst transactionStoreNamesMap = /* @__PURE__ */ new WeakMap();\nconst transformCache = /* @__PURE__ */ new WeakMap();\nconst reverseTransformCache = /* @__PURE__ */ new WeakMap();\nfunction promisifyRequest(request) {\n  const promise = new Promise((resolve, reject) => {\n    const unlisten = () => {\n      request.removeEventListener(\"success\", success);\n      request.removeEventListener(\"error\", error);\n    };\n    const success = () => {\n      resolve(wrap(request.result));\n      unlisten();\n    };\n    const error = () => {\n      reject(request.error);\n      unlisten();\n    };\n    request.addEventListener(\"success\", success);\n    request.addEventListener(\"error\", error);\n  });\n  promise.then((value) => {\n    if (value instanceof IDBCursor) {\n      cursorRequestMap.set(value, request);\n    }\n  }).catch(() => {\n  });\n  reverseTransformCache.set(promise, request);\n  return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n  if (transactionDoneMap.has(tx))\n    return;\n  const done = new Promise((resolve, reject) => {\n    const unlisten = () => {\n      tx.removeEventListener(\"complete\", complete);\n      tx.removeEventListener(\"error\", error);\n      tx.removeEventListener(\"abort\", error);\n    };\n    const complete = () => {\n      resolve();\n      unlisten();\n    };\n    const error = () => {\n      reject(tx.error || new DOMException(\"AbortError\", \"AbortError\"));\n      unlisten();\n    };\n    tx.addEventListener(\"complete\", complete);\n    tx.addEventListener(\"error\", error);\n    tx.addEventListener(\"abort\", error);\n  });\n  transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n  get(target, prop, receiver) {\n    if (target instanceof IDBTransaction) {\n      if (prop === \"done\")\n        return transactionDoneMap.get(target);\n      if (prop === \"objectStoreNames\") {\n        return target.objectStoreNames || transactionStoreNamesMap.get(target);\n      }\n      if (prop === \"store\") {\n        return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);\n      }\n    }\n    return wrap(target[prop]);\n  },\n  set(target, prop, value) {\n    target[prop] = value;\n    return true;\n  },\n  has(target, prop) {\n    if (target instanceof IDBTransaction && (prop === \"done\" || prop === \"store\")) {\n      return true;\n    }\n    return prop in target;\n  }\n};\nfunction replaceTraps(callback) {\n  idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n  if (func === IDBDatabase.prototype.transaction && !(\"objectStoreNames\" in IDBTransaction.prototype)) {\n    return function(storeNames, ...args) {\n      const tx = func.call(unwrap(this), storeNames, ...args);\n      transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n      return wrap(tx);\n    };\n  }\n  if (getCursorAdvanceMethods().includes(func)) {\n    return function(...args) {\n      func.apply(unwrap(this), args);\n      return wrap(cursorRequestMap.get(this));\n    };\n  }\n  return function(...args) {\n    return wrap(func.apply(unwrap(this), args));\n  };\n}\nfunction transformCachableValue(value) {\n  if (typeof value === \"function\")\n    return wrapFunction(value);\n  if (value instanceof IDBTransaction)\n    cacheDonePromiseForTransaction(value);\n  if (instanceOfAny(value, getIdbProxyableTypes()))\n    return new Proxy(value, idbProxyTraps);\n  return value;\n}\nfunction wrap(value) {\n  if (value instanceof IDBRequest)\n    return promisifyRequest(value);\n  if (transformCache.has(value))\n    return transformCache.get(value);\n  const newValue = transformCachableValue(value);\n  if (newValue !== value) {\n    transformCache.set(value, newValue);\n    reverseTransformCache.set(newValue, value);\n  }\n  return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n  const request = indexedDB.open(name, version);\n  const openPromise = wrap(request);\n  if (upgrade) {\n    request.addEventListener(\"upgradeneeded\", (event) => {\n      upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n    });\n  }\n  if (blocked) {\n    request.addEventListener(\"blocked\", (event) => blocked(\n      event.oldVersion,\n      event.newVersion,\n      event\n    ));\n  }\n  openPromise.then((db) => {\n    if (terminated)\n      db.addEventListener(\"close\", () => terminated());\n    if (blocking) {\n      db.addEventListener(\"versionchange\", (event) => blocking(event.oldVersion, event.newVersion, event));\n    }\n  }).catch(() => {\n  });\n  return openPromise;\n}\nconst readMethods = [\"get\", \"getKey\", \"getAll\", \"getAllKeys\", \"count\"];\nconst writeMethods = [\"put\", \"add\", \"delete\", \"clear\"];\nconst cachedMethods = /* @__PURE__ */ new Map();\nfunction getMethod(target, prop) {\n  if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === \"string\")) {\n    return;\n  }\n  if (cachedMethods.get(prop))\n    return cachedMethods.get(prop);\n  const targetFuncName = prop.replace(/FromIndex$/, \"\");\n  const useIndex = prop !== targetFuncName;\n  const isWrite = writeMethods.includes(targetFuncName);\n  if (!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) {\n    return;\n  }\n  const method = async function(storeName, ...args) {\n    const tx = this.transaction(storeName, isWrite ? \"readwrite\" : \"readonly\");\n    let target2 = tx.store;\n    if (useIndex)\n      target2 = target2.index(args.shift());\n    return (await Promise.all([\n      target2[targetFuncName](...args),\n      isWrite && tx.done\n    ]))[0];\n  };\n  cachedMethods.set(prop, method);\n  return method;\n}\nreplaceTraps((oldTraps) => ({\n  ...oldTraps,\n  get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n  has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)\n}));\nconst DB_KEY = \"EMJ\";\nconst STORE_KEY = \"emojis\";\nconst DB_VERSION = 3;\nasync function initialize() {\n  const db = await openDB(DB_KEY, DB_VERSION, {\n    upgrade(db2, oldVersion) {\n      if (!db2.objectStoreNames.contains(STORE_KEY)) {\n        const store = db2.createObjectStore(STORE_KEY, {\n          keyPath: \"id\",\n          autoIncrement: true\n        });\n        store.createIndex(\"id\", \"id\", {\n          unique: true\n        });\n      }\n    }\n  });\n  db.close();\n}\ninitialize();\nconst defaultOptions = {\n  native: false,\n  hideSearch: true,\n  hideGroupIcons: false,\n  hideGroupNames: false,\n  staticTexts: {},\n  disabledGroups: [],\n  groupNames: {},\n  displayRecent: false,\n  additionalGroups: {},\n  groupOrder: [],\n  groupIcons: {}\n};\nasync function getRecentEmojis() {\n  const db = await openDB(DB_KEY, DB_VERSION);\n  const store = db.transaction(STORE_KEY, \"readonly\").objectStore(STORE_KEY);\n  return await store.getAll();\n}\nfunction Store() {\n  const state = reactive({\n    search: \"\",\n    emoji: DEFAULT_EMOJI,\n    activeGroup: \"\",\n    skinTone: SKIN_TONE_NEUTRAL,\n    options: defaultOptions,\n    additionalGroups: {},\n    recent: [],\n    get emojis() {\n      return {\n        recent: this.recent,\n        ...this.options.additionalGroups,\n        ...emojis\n      };\n    },\n    get disabled() {\n      let disabled = Array.isArray(this.options.disabledGroups) ? this.options.disabledGroups : [];\n      if (!this.options.displayRecent) {\n        disabled = [\"recent\", ...disabled];\n      }\n      return disabled;\n    },\n    get groups() {\n      return _groups.filter(\n        (group) => !this.disabled.includes(group.key)\n      );\n    },\n    get orderedGroupKeys() {\n      const keys = [\n        ...this.options.groupOrder,\n        ...Object.keys(this.options.additionalGroups),\n        ..._groups.map((group) => group.key)\n      ];\n      return [...new Set(keys)].filter((key) => !this.disabled.includes(key));\n    }\n  });\n  function initialize2() {\n    if (state.options.displayRecent) {\n      setInitialRecentEmojis();\n    }\n  }\n  async function getRecent() {\n    var _a;\n    let recent2 = await getRecentEmojis();\n    if (Array.isArray(recent2) && recent2.length) {\n      recent2 = JSON.parse(((_a = recent2[0]) == null ? void 0 : _a.value) || \"\");\n    } else {\n      recent2 = [];\n    }\n    return recent2;\n  }\n  function setInitialRecentEmojis() {\n    getRecent().then((recent2) => {\n      state.recent = recent2;\n      updateLocalStore();\n    });\n  }\n  const updateSearch = (value) => {\n    state.search = value;\n  };\n  const updateEmoji = (value) => {\n    state.emoji = value;\n  };\n  const updateActiveGroup = (group) => {\n    state.activeGroup = group;\n  };\n  const updateSkinTone = (tone = SKIN_TONE_NEUTRAL) => {\n    state.skinTone = tone;\n  };\n  const updateOptions = (options) => {\n    state.options = Object.assign({}, state.options, options);\n    initialize2();\n  };\n  async function updateLocalStore() {\n    const db = await openDB(DB_KEY, DB_VERSION);\n    const store = db.transaction(STORE_KEY, \"readwrite\").objectStore(STORE_KEY);\n    store.put({\n      id: 0,\n      value: JSON.stringify(state.recent)\n    });\n    return;\n  }\n  const updateSelect = (emoji) => {\n    if (state.options.displayRecent !== true)\n      return;\n    const index2 = state.recent.findIndex((item) => item.u === emoji.u);\n    if (index2 > 0)\n      state.recent.splice(index2, 1);\n    if (index2 === 0)\n      return;\n    const _emoji = { u: emoji.u, n: toRaw(emoji.n) };\n    state.recent = [_emoji, ...state.recent];\n    if (state.recent.length > 24)\n      state.recent.length = 24;\n    updateLocalStore();\n  };\n  return {\n    state: readonly(state),\n    updateSearch,\n    updateEmoji,\n    updateActiveGroup,\n    updateSkinTone,\n    updateOptions,\n    updateSelect\n  };\n}\nvar top = \"top\";\nvar bottom = \"bottom\";\nvar right = \"right\";\nvar left = \"left\";\nvar auto = \"auto\";\nvar basePlacements = [top, bottom, right, left];\nvar start = \"start\";\nvar end = \"end\";\nvar clippingParents = \"clippingParents\";\nvar viewport = \"viewport\";\nvar popper = \"popper\";\nvar reference = \"reference\";\nvar variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nvar placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nvar beforeRead = \"beforeRead\";\nvar read = \"read\";\nvar afterRead = \"afterRead\";\nvar beforeMain = \"beforeMain\";\nvar main = \"main\";\nvar afterMain = \"afterMain\";\nvar beforeWrite = \"beforeWrite\";\nvar write = \"write\";\nvar afterWrite = \"afterWrite\";\nvar modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\nfunction getNodeName(element) {\n  return element ? (element.nodeName || \"\").toLowerCase() : null;\n}\nfunction getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n  if (node.toString() !== \"[object Window]\") {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n  return node;\n}\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\nfunction isShadowRoot(node) {\n  if (typeof ShadowRoot === \"undefined\") {\n    return false;\n  }\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function(name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name];\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    }\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function(name2) {\n      var value = attributes[name2];\n      if (value === false) {\n        element.removeAttribute(name2);\n      } else {\n        element.setAttribute(name2, value === true ? \"\" : value);\n      }\n    });\n  });\n}\nfunction effect$2(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: \"0\",\n      top: \"0\",\n      margin: \"0\"\n    },\n    arrow: {\n      position: \"absolute\"\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n  return function() {\n    Object.keys(state.elements).forEach(function(name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);\n      var style = styleProperties.reduce(function(style2, property) {\n        style2[property] = \"\";\n        return style2;\n      }, {});\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function(attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n}\nvar applyStyles$1 = {\n  name: \"applyStyles\",\n  enabled: true,\n  phase: \"write\",\n  fn: applyStyles,\n  effect: effect$2,\n  requires: [\"computeStyles\"]\n};\nfunction getBasePlacement(placement) {\n  return placement.split(\"-\")[0];\n}\nvar max = Math.max;\nvar min = Math.min;\nvar round = Math.round;\nfunction getBoundingClientRect(element, includeScale) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  var rect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n  if (isHTMLElement(element) && includeScale) {\n    var offsetHeight = element.offsetHeight;\n    var offsetWidth = element.offsetWidth;\n    if (offsetWidth > 0) {\n      scaleX = round(rect.width) / offsetWidth || 1;\n    }\n    if (offsetHeight > 0) {\n      scaleY = round(rect.height) / offsetHeight || 1;\n    }\n  }\n  return {\n    width: rect.width / scaleX,\n    height: rect.height / scaleY,\n    top: rect.top / scaleY,\n    right: rect.right / scaleX,\n    bottom: rect.bottom / scaleY,\n    left: rect.left / scaleX,\n    x: rect.left / scaleX,\n    y: rect.top / scaleY\n  };\n}\nfunction getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element);\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width,\n    height\n  };\n}\nfunction contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode();\n  if (parent.contains(child)) {\n    return true;\n  } else if (rootNode && isShadowRoot(rootNode)) {\n    var next = child;\n    do {\n      if (next && parent.isSameNode(next)) {\n        return true;\n      }\n      next = next.parentNode || next.host;\n    } while (next);\n  }\n  return false;\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction isTableElement(element) {\n  return [\"table\", \"td\", \"th\"].indexOf(getNodeName(element)) >= 0;\n}\nfunction getDocumentElement(element) {\n  return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;\n}\nfunction getParentNode(element) {\n  if (getNodeName(element) === \"html\") {\n    return element;\n  }\n  return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);\n}\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || getComputedStyle(element).position === \"fixed\") {\n    return null;\n  }\n  return element.offsetParent;\n}\nfunction getContainingBlock(element) {\n  var isFirefox = navigator.userAgent.toLowerCase().indexOf(\"firefox\") !== -1;\n  var isIE = navigator.userAgent.indexOf(\"Trident\") !== -1;\n  if (isIE && isHTMLElement(element)) {\n    var elementCss = getComputedStyle(element);\n    if (elementCss.position === \"fixed\") {\n      return null;\n    }\n  }\n  var currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && [\"html\", \"body\"].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode);\n    if (css.transform !== \"none\" || css.perspective !== \"none\" || css.contain === \"paint\" || [\"transform\", \"perspective\"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === \"filter\" || isFirefox && css.filter && css.filter !== \"none\") {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n  return null;\n}\nfunction getOffsetParent(element) {\n  var window2 = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === \"static\") {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n  if (offsetParent && (getNodeName(offsetParent) === \"html\" || getNodeName(offsetParent) === \"body\" && getComputedStyle(offsetParent).position === \"static\")) {\n    return window2;\n  }\n  return offsetParent || getContainingBlock(element) || window2;\n}\nfunction getMainAxisFromPlacement(placement) {\n  return [\"top\", \"bottom\"].indexOf(placement) >= 0 ? \"x\" : \"y\";\n}\nfunction within(min$1, value, max$1) {\n  return max(min$1, min(value, max$1));\n}\nfunction withinMaxClamp(min2, value, max2) {\n  var v = within(min2, value, max2);\n  return v > max2 ? max2 : v;\n}\nfunction getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}\nfunction mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}\nfunction expandToHashMap(value, keys) {\n  return keys.reduce(function(hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}\nvar toPaddingObject = function toPaddingObject2(padding, state) {\n  padding = typeof padding === \"function\" ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== \"number\" ? padding : expandToHashMap(padding, basePlacements));\n};\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n  var state = _ref.state, name = _ref.name, options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets2 = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? \"height\" : \"width\";\n  if (!arrowElement || !popperOffsets2) {\n    return;\n  }\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === \"y\" ? top : left;\n  var maxProp = axis === \"y\" ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets2[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === \"y\" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2;\n  var min2 = paddingObject[minProp];\n  var max2 = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset2 = within(min2, center, max2);\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$);\n}\nfunction effect$1(_ref2) {\n  var state = _ref2.state, options = _ref2.options;\n  var _options$element = options.element, arrowElement = _options$element === void 0 ? \"[data-popper-arrow]\" : _options$element;\n  if (arrowElement == null) {\n    return;\n  }\n  if (typeof arrowElement === \"string\") {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n    if (!arrowElement) {\n      return;\n    }\n  }\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n  state.elements.arrow = arrowElement;\n}\nvar arrow$1 = {\n  name: \"arrow\",\n  enabled: true,\n  phase: \"main\",\n  fn: arrow,\n  effect: effect$1,\n  requires: [\"popperOffsets\"],\n  requiresIfExists: [\"preventOverflow\"]\n};\nfunction getVariation(placement) {\n  return placement.split(\"-\")[1];\n}\nvar unsetSides = {\n  top: \"auto\",\n  right: \"auto\",\n  bottom: \"auto\",\n  left: \"auto\"\n};\nfunction roundOffsetsByDPR(_ref) {\n  var x = _ref.x, y = _ref.y;\n  var win = window;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\nfunction mapToStyles(_ref2) {\n  var _Object$assign2;\n  var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;\n  var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === \"function\" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y;\n  var hasX = offsets.hasOwnProperty(\"x\");\n  var hasY = offsets.hasOwnProperty(\"y\");\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper2);\n    var heightProp = \"clientHeight\";\n    var widthProp = \"clientWidth\";\n    if (offsetParent === getWindow(popper2)) {\n      offsetParent = getDocumentElement(popper2);\n      if (getComputedStyle(offsetParent).position !== \"static\" && position === \"absolute\") {\n        heightProp = \"scrollHeight\";\n        widthProp = \"scrollWidth\";\n      }\n    }\n    offsetParent = offsetParent;\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n  var commonStyles = Object.assign({\n    position\n  }, adaptive && unsetSides);\n  if (gpuAcceleration) {\n    var _Object$assign;\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? \"0\" : \"\", _Object$assign[sideX] = hasX ? \"0\" : \"\", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : \"\", _Object$assign2[sideX] = hasX ? x + \"px\" : \"\", _Object$assign2.transform = \"\", _Object$assign2));\n}\nfunction computeStyles(_ref4) {\n  var state = _ref4.state, options = _ref4.options;\n  var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration,\n    isFixed: state.options.strategy === \"fixed\"\n  };\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive,\n      roundOffsets\n    })));\n  }\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: \"absolute\",\n      adaptive: false,\n      roundOffsets\n    })));\n  }\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    \"data-popper-placement\": state.placement\n  });\n}\nvar computeStyles$1 = {\n  name: \"computeStyles\",\n  enabled: true,\n  phase: \"beforeWrite\",\n  fn: computeStyles,\n  data: {}\n};\nvar passive = {\n  passive: true\n};\nfunction effect(_ref) {\n  var state = _ref.state, instance = _ref.instance, options = _ref.options;\n  var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;\n  var window2 = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n  if (scroll) {\n    scrollParents.forEach(function(scrollParent) {\n      scrollParent.addEventListener(\"scroll\", instance.update, passive);\n    });\n  }\n  if (resize) {\n    window2.addEventListener(\"resize\", instance.update, passive);\n  }\n  return function() {\n    if (scroll) {\n      scrollParents.forEach(function(scrollParent) {\n        scrollParent.removeEventListener(\"scroll\", instance.update, passive);\n      });\n    }\n    if (resize) {\n      window2.removeEventListener(\"resize\", instance.update, passive);\n    }\n  };\n}\nvar eventListeners = {\n  name: \"eventListeners\",\n  enabled: true,\n  phase: \"write\",\n  fn: function fn() {\n  },\n  effect,\n  data: {}\n};\nvar hash$1 = {\n  left: \"right\",\n  right: \"left\",\n  bottom: \"top\",\n  top: \"bottom\"\n};\nfunction getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function(matched) {\n    return hash$1[matched];\n  });\n}\nvar hash = {\n  start: \"end\",\n  end: \"start\"\n};\nfunction getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function(matched) {\n    return hash[matched];\n  });\n}\nfunction getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft,\n    scrollTop\n  };\n}\nfunction getWindowScrollBarX(element) {\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}\nfunction getViewportRect(element) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  return {\n    width,\n    height,\n    x: x + getWindowScrollBarX(element),\n    y\n  };\n}\nfunction getDocumentRect(element) {\n  var _element$ownerDocumen;\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n  if (getComputedStyle(body || html).direction === \"rtl\") {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction isScrollParent(element) {\n  var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\nfunction getScrollParent(node) {\n  if ([\"html\", \"body\", \"#document\"].indexOf(getNodeName(node)) >= 0) {\n    return node.ownerDocument.body;\n  }\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n  return getScrollParent(getParentNode(node));\n}\nfunction listScrollParents(element, list) {\n  var _element$ownerDocumen;\n  if (list === void 0) {\n    list = [];\n  }\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));\n}\nfunction rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}\nfunction getInnerBoundingClientRect(element) {\n  var rect = getBoundingClientRect(element);\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nfunction getClientRectFromMixedType(element, clippingParent) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n}\nfunction getClippingParents(element) {\n  var clippingParents2 = listScrollParents(getParentNode(element));\n  var canEscapeClipping = [\"absolute\", \"fixed\"].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n  if (!isElement(clipperElement)) {\n    return [];\n  }\n  return clippingParents2.filter(function(clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== \"body\" && (canEscapeClipping ? getComputedStyle(clippingParent).position !== \"static\" : true);\n  });\n}\nfunction getClippingRect(element, boundary, rootBoundary) {\n  var mainClippingParents = boundary === \"clippingParents\" ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents2[0];\n  var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}\nfunction computeOffsets(_ref) {\n  var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference2.x + reference2.width / 2 - element.width / 2;\n  var commonY = reference2.y + reference2.height / 2 - element.height / 2;\n  var offsets;\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference2.y - element.height\n      };\n      break;\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference2.y + reference2.height\n      };\n      break;\n    case right:\n      offsets = {\n        x: reference2.x + reference2.width,\n        y: commonY\n      };\n      break;\n    case left:\n      offsets = {\n        x: reference2.x - element.width,\n        y: commonY\n      };\n      break;\n    default:\n      offsets = {\n        x: reference2.x,\n        y: reference2.y\n      };\n  }\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n  if (mainAxis != null) {\n    var len = mainAxis === \"y\" ? \"height\" : \"width\";\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2);\n        break;\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2);\n        break;\n    }\n  }\n  return offsets;\n}\nfunction detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== \"number\" ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets2 = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: \"absolute\",\n    placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset;\n  if (elementContext === popper && offsetData) {\n    var offset2 = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function(key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? \"y\" : \"x\";\n      overflowOffsets[key] += offset2[axis] * multiply;\n    });\n  }\n  return overflowOffsets;\n}\nfunction computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {\n    return getVariation(placement2) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements$1.filter(function(placement2) {\n    return allowedAutoPlacements.indexOf(placement2) >= 0;\n  });\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements$1;\n  }\n  var overflows = allowedPlacements.reduce(function(acc, placement2) {\n    acc[placement2] = detectOverflow(state, {\n      placement: placement2,\n      boundary,\n      rootBoundary,\n      padding\n    })[getBasePlacement(placement2)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function(a, b) {\n    return overflows[a] - overflows[b];\n  });\n}\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\nfunction flip(_ref) {\n  var state = _ref.state, options = _ref.options, name = _ref.name;\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n  var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {\n    return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, {\n      placement: placement2,\n      boundary,\n      rootBoundary,\n      padding,\n      flipVariations,\n      allowedAutoPlacements\n    }) : placement2);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = /* @__PURE__ */ new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements2[0];\n  for (var i = 0; i < placements2.length; i++) {\n    var placement = placements2[i];\n    var _basePlacement = getBasePlacement(placement);\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? \"width\" : \"height\";\n    var overflow = detectOverflow(state, {\n      placement,\n      boundary,\n      rootBoundary,\n      altBoundary,\n      padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n    if (checks.every(function(check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n    checksMap.set(placement, checks);\n  }\n  if (makeFallbackChecks) {\n    var numberOfChecks = flipVariations ? 3 : 1;\n    var _loop = function _loop2(_i2) {\n      var fittingPlacement = placements2.find(function(placement2) {\n        var checks2 = checksMap.get(placement2);\n        if (checks2) {\n          return checks2.slice(0, _i2).every(function(check) {\n            return check;\n          });\n        }\n      });\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n      if (_ret === \"break\")\n        break;\n    }\n  }\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n}\nvar flip$1 = {\n  name: \"flip\",\n  enabled: true,\n  phase: \"main\",\n  fn: flip,\n  requiresIfExists: [\"offset\"],\n  data: {\n    _skip: false\n  }\n};\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function(side) {\n    return overflow[side] >= 0;\n  });\n}\nfunction hide(_ref) {\n  var state = _ref.state, name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: \"reference\"\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets,\n    popperEscapeOffsets,\n    isReferenceHidden,\n    hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    \"data-popper-reference-hidden\": isReferenceHidden,\n    \"data-popper-escaped\": hasPopperEscaped\n  });\n}\nvar hide$1 = {\n  name: \"hide\",\n  enabled: true,\n  phase: \"main\",\n  requiresIfExists: [\"preventOverflow\"],\n  fn: hide\n};\nfunction distanceAndSkiddingToXY(placement, rects, offset2) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n  var _ref = typeof offset2 === \"function\" ? offset2(Object.assign({}, rects, {\n    placement\n  })) : offset2, skidding = _ref[0], distance = _ref[1];\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\nfunction offset(_ref2) {\n  var state = _ref2.state, options = _ref2.options, name = _ref2.name;\n  var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function(acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n  state.modifiersData[name] = data;\n}\nvar offset$1 = {\n  name: \"offset\",\n  enabled: true,\n  phase: \"main\",\n  requires: [\"popperOffsets\"],\n  fn: offset\n};\nfunction popperOffsets(_ref) {\n  var state = _ref.state, name = _ref.name;\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: \"absolute\",\n    placement: state.placement\n  });\n}\nvar popperOffsets$1 = {\n  name: \"popperOffsets\",\n  enabled: true,\n  phase: \"read\",\n  fn: popperOffsets,\n  data: {}\n};\nfunction getAltAxis(axis) {\n  return axis === \"x\" ? \"y\" : \"x\";\n}\nfunction preventOverflow(_ref) {\n  var state = _ref.state, options = _ref.options, name = _ref.name;\n  var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary,\n    rootBoundary,\n    padding,\n    altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets2 = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === \"function\" ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === \"number\" ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n  if (!popperOffsets2) {\n    return;\n  }\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n    var mainSide = mainAxis === \"y\" ? top : left;\n    var altSide = mainAxis === \"y\" ? bottom : right;\n    var len = mainAxis === \"y\" ? \"height\" : \"width\";\n    var offset2 = popperOffsets2[mainAxis];\n    var min$1 = offset2 + overflow[mainSide];\n    var max$1 = offset2 - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData[\"arrow#persistent\"] ? state.modifiersData[\"arrow#persistent\"].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide];\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === \"y\" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset2 + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1);\n    popperOffsets2[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset2;\n  }\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n    var _mainSide = mainAxis === \"x\" ? top : left;\n    var _altSide = mainAxis === \"x\" ? bottom : right;\n    var _offset = popperOffsets2[altAxis];\n    var _len = altAxis === \"y\" ? \"height\" : \"width\";\n    var _min = _offset + overflow[_mainSide];\n    var _max = _offset - overflow[_altSide];\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n    popperOffsets2[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n  state.modifiersData[name] = data;\n}\nvar preventOverflow$1 = {\n  name: \"preventOverflow\",\n  enabled: true,\n  phase: \"main\",\n  fn: preventOverflow,\n  requiresIfExists: [\"offset\"]\n};\nfunction getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}\nfunction getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n}\nfunction getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== \"body\" || isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}\nfunction order(modifiers) {\n  var map = /* @__PURE__ */ new Map();\n  var visited = /* @__PURE__ */ new Set();\n  var result = [];\n  modifiers.forEach(function(modifier) {\n    map.set(modifier.name, modifier);\n  });\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function(dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n  modifiers.forEach(function(modifier) {\n    if (!visited.has(modifier.name)) {\n      sort(modifier);\n    }\n  });\n  return result;\n}\nfunction orderModifiers(modifiers) {\n  var orderedModifiers = order(modifiers);\n  return modifierPhases.reduce(function(acc, phase) {\n    return acc.concat(orderedModifiers.filter(function(modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}\nfunction debounce(fn2) {\n  var pending;\n  return function() {\n    if (!pending) {\n      pending = new Promise(function(resolve) {\n        Promise.resolve().then(function() {\n          pending = void 0;\n          resolve(fn2());\n        });\n      });\n    }\n    return pending;\n  };\n}\nfunction mergeByName(modifiers) {\n  var merged = modifiers.reduce(function(merged2, current) {\n    var existing = merged2[current.name];\n    merged2[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged2;\n  }, {});\n  return Object.keys(merged).map(function(key) {\n    return merged[key];\n  });\n}\nvar DEFAULT_OPTIONS = {\n  placement: \"bottom\",\n  modifiers: [],\n  strategy: \"absolute\"\n};\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  return !args.some(function(element) {\n    return !(element && typeof element.getBoundingClientRect === \"function\");\n  });\n}\nfunction popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n  var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions2 = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper2(reference2, popper2, options) {\n    if (options === void 0) {\n      options = defaultOptions2;\n    }\n    var state = {\n      placement: \"bottom\",\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions2),\n      modifiersData: {},\n      elements: {\n        reference: reference2,\n        popper: popper2\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options2 = typeof setOptionsAction === \"function\" ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions2, state.options, options2);\n        state.scrollParents = {\n          reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],\n          popper: listScrollParents(popper2)\n        };\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));\n        state.orderedModifiers = orderedModifiers.filter(function(m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n        var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;\n        if (!areValidElements(reference3, popper3)) {\n          return;\n        }\n        state.rects = {\n          reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === \"fixed\"),\n          popper: getLayoutRect(popper3)\n        };\n        state.reset = false;\n        state.placement = state.options.placement;\n        state.orderedModifiers.forEach(function(modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n        for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index2 = -1;\n            continue;\n          }\n          var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;\n          if (typeof fn2 === \"function\") {\n            state = fn2({\n              state,\n              options: _options,\n              name,\n              instance\n            }) || state;\n          }\n        }\n      },\n      update: debounce(function() {\n        return new Promise(function(resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n    if (!areValidElements(reference2, popper2)) {\n      return instance;\n    }\n    instance.setOptions(options).then(function(state2) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state2);\n      }\n    });\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function(_ref3) {\n        var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect;\n        if (typeof effect2 === \"function\") {\n          var cleanupFn = effect2({\n            state,\n            name,\n            instance,\n            options: options2\n          });\n          var noopFn = function noopFn2() {\n          };\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function(fn2) {\n        return fn2();\n      });\n      effectCleanupFns = [];\n    }\n    return instance;\n  };\n}\nvar defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\nvar createPopper = /* @__PURE__ */ popperGenerator({\n  defaultModifiers\n});\nvar smileys_people = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTSAxNiA0IEMgOS4zODI4MTMgNCA0IDkuMzgyODE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unction unicodeToEmoji(unicode) {\n  return unicode.split(\"-\").map((hex) => parseInt(hex, 16)).map((hex) => String.fromCodePoint(hex)).join(\"\");\n}\nfunction filterEmojis(emojis2, keyword, skinTone, disabledGroups = []) {\n  const _emojiData = {};\n  Object.keys(emojis2).forEach((key) => {\n    if (disabledGroups.includes(key)) {\n      return;\n    }\n    const _emojis = [];\n    emojis2[key].forEach((emoji) => {\n      var _a;\n      if (emoji[EMOJI_NAME_KEY][0].includes(keyword.toLocaleLowerCase())) {\n        let result = emoji[EMOJI_UNICODE_KEY];\n        if (skinTone !== SKIN_TONE_NEUTRAL && Array.isArray(emoji[EMOJI_VARIATIONS_KEY])) {\n          const v_index = ((_a = emoji[EMOJI_VARIATIONS_KEY]) == null ? void 0 : _a.findIndex(\n            (v) => v.includes(skinTone)\n          )) || -1;\n          if (v_index !== -1 && emoji[EMOJI_VARIATIONS_KEY]) {\n            result = emoji[EMOJI_VARIATIONS_KEY][v_index];\n          }\n        }\n        return _emojis.push({\n          ...emoji,\n          [EMOJI_RESULT_KEY]: result\n        });\n      }\n    });\n    if (_emojis.length) {\n      _emojiData[key] = _emojis;\n    }\n  });\n  return _emojiData;\n}\nfunction isMac() {\n  var _a;\n  let platform = ((_a = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : _a.platform) || (navigator == null ? void 0 : navigator.platform) || \"unknown\";\n  return platform.toUpperCase().indexOf(\"MAC\") !== -1;\n}\nfunction snakeToCapitalizedCase(string) {\n  return string.replace(\n    /^_*(.)|_+(.)/g,\n    (s, c, d) => c ? c.toUpperCase() : \" \" + d.toUpperCase()\n  );\n}\nvar _export_sfc = (sfc, props) => {\n  const target = sfc.__vccOpts || sfc;\n  for (const [key, val] of props) {\n    target[key] = val;\n  }\n  return target;\n};\nconst _sfc_main$4 = defineComponent({\n  name: \"Body\",\n  emits: {\n    select: (emoji) => true\n  },\n  setup() {\n    const { state, updateEmoji, updateSelect } = inject(\"store\");\n    const bodyInner = ref(null);\n    const emojis2 = computed(() => {\n      return filterEmojis(\n        state.emojis,\n        state.search,\n        state.skinTone,\n        state.options.disabledGroups\n      );\n    });\n    const _this = getCurrentInstance();\n    const hasGroupNames = computed(() => !state.options.hideGroupNames);\n    const isSticky = computed(() => !state.options.disableStickyGroupNames);\n    const groupNames = toRaw(state.options.groupNames);\n    const orderedKeys = state.orderedGroupKeys;\n    if (state.options.additionalGroups) {\n      Object.keys(state.options.additionalGroups).map((k) => {\n        if (state.options.groupNames[k]) {\n          groupNames[k] = state.options.groupNames[k];\n        } else {\n          groupNames[k] = snakeToCapitalizedCase(k);\n        }\n      });\n    }\n    const platform = isMac() ? \"is-mac\" : \"\";\n    function handleMouseEnter(emoji) {\n      updateEmoji(emoji);\n    }\n    function handleClick(emoji) {\n      updateSelect(emoji);\n      _this == null ? void 0 : _this.emit(\"select\", {\n        ...emoji,\n        t: state.skinTone,\n        i: unicodeToEmoji(emoji.r)\n      });\n    }\n    function handleError(event, unicode) {\n      var _a;\n      const button = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.closest(\"button\");\n      if (button) {\n        button.innerHTML = `<span>${unicodeToEmoji(unicode)}</span>`;\n      }\n    }\n    watch(\n      () => state.activeGroup,\n      () => {\n        var _a;\n        const target = (_a = bodyInner.value) == null ? void 0 : _a.querySelector(\"#\" + state.activeGroup);\n        if (target) {\n          target.parentNode.scrollTop = target.offsetTop - target.parentNode.offsetTop;\n        }\n      }\n    );\n    return {\n      emojis: emojis2,\n      bodyInner,\n      EMOJI_REMOTE_SRC,\n      GROUP_NAMES,\n      handleClick,\n      handleError,\n      handleMouseEnter,\n      native: state.options.native,\n      unicodeToEmoji,\n      EMOJI_RESULT_KEY,\n      EMOJI_NAME_KEY,\n      hasGroupNames,\n      isSticky,\n      platform,\n      groupNames,\n      orderedKeys\n    };\n  }\n});\nconst _hoisted_1$3 = { class: \"v3-body\" };\nconst _hoisted_2$3 = [\"id\"];\nconst _hoisted_3$3 = { class: \"v3-emojis\" };\nconst _hoisted_4$3 = [\"onMouseenter\", \"onClick\"];\nconst _hoisted_5$3 = { key: 0 };\nconst _hoisted_6$2 = [\"src\", \"alt\", \"onError\"];\nconst _hoisted_7$1 = {\n  key: 1,\n  class: \"v3-no-result\"\n};\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"div\", _hoisted_1$3, [\n    createElementVNode(\"div\", {\n      ref: \"bodyInner\",\n      class: normalizeClass([_ctx.platform, \"v3-body-inner\"])\n    }, [\n      _ctx.orderedKeys.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.orderedKeys, (key) => {\n        return openBlock(), createElementBlock(\"div\", {\n          id: key,\n          key,\n          class: \"v3-group\"\n        }, [\n          _ctx.hasGroupNames ? withDirectives((openBlock(), createElementBlock(\"h5\", {\n            key: 0,\n            class: normalizeClass(_ctx.isSticky ? `v3-sticky` : ``)\n          }, toDisplayString(_ctx.groupNames[key]), 3)), [\n            [vShow, _ctx.emojis[key]]\n          ]) : createCommentVNode(\"\", true),\n          withDirectives(createElementVNode(\"div\", _hoisted_3$3, [\n            (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.emojis[key], (emoji) => {\n              return openBlock(), createElementBlock(\"button\", {\n                key: emoji.r,\n                type: \"button\",\n                onMouseenter: ($event) => _ctx.handleMouseEnter(emoji),\n                onClick: ($event) => _ctx.handleClick(emoji)\n              }, [\n                _ctx.native ? (openBlock(), createElementBlock(\"span\", _hoisted_5$3, toDisplayString(_ctx.unicodeToEmoji(emoji.r)), 1)) : (openBlock(), createElementBlock(\"img\", {\n                  key: 1,\n                  src: _ctx.EMOJI_REMOTE_SRC + `/${emoji.r}.png`,\n                  alt: emoji.n[0],\n                  onError: ($event) => _ctx.handleError($event, emoji.r)\n                }, null, 40, _hoisted_6$2))\n              ], 40, _hoisted_4$3);\n            }), 128))\n          ], 512), [\n            [vShow, _ctx.emojis[key]]\n          ])\n        ], 8, _hoisted_2$3);\n      }), 128)) : (openBlock(), createElementBlock(\"span\", _hoisted_7$1, \" No emoji has been found! \"))\n    ], 2)\n  ]);\n}\nvar Body = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"render\", _sfc_render$4]]);\nvar animals_nature = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTSAxMi41IDUgQyAxMS40Mjk2ODggNSAxMC41IDUuNjA5Mzc1IDkuOTA2MjUgNi40Mzc1IEMgOS4zMTI1IDcuMjY1NjI1IDkgOC4zMzk4NDQgOSA5LjUgQyA5IDEwLjY2MDE1NiA5LjMxMjUgMTEuNzM0Mzc1IDkuOTA2MjUgMTIuNTYyNSBDIDEwLjUgMTMuMzkwNjI1IDExLjQyOTY4OCAxNCAxMi41IDE0IEMgMTMuNTcwMzEzIDE0IDE0LjUgMTMuMzkwNjI1IDE1LjA5Mzc1IDEyLjU2MjUgQyAxNS42ODc1IDExLjczNDM3NSAxNiAxMC42NjAxNTYgMTYgOS41IEMgMTYgOC4zMzk4NDQgMTUuNjg3NSA3LjI2NTYyNSAxNS4wOTM3NSA2LjQzNzUgQyAxNC41IDUuNjA5Mzc1IDEzLjU3MDMxMyA1IDEyLjUgNSBaIE0gMTYgOS41IEMgMTYgMTAuNjYwMTU2IDE2LjMxMjUgMTEuNzM0Mzc1IDE2LjkwNjI1IDEyLjU2MjUgQyAxNy41IDEzLjM5MDYyNSAxOC40Mjk2ODggMTQgMTkuNSAxNCBDIDIwLjU3MDMxMyAxNCAyMS41IDEzLjM5MDYyNSAyMi4wOTM3NSAxMi41NjI1IEMgMjIuNjg3NSAxMS43MzQzNzUgMjMgMTAuNjYwMTU2IDIzIDkuNSBDIDIzIDguMzM5ODQ0IDIyLjY4NzUgNy4yNjU2MjUgMjIuMDkzNzUgNi40Mzc1IEMgMjEuNSA1LjYwOTM3NSAyMC41NzAzMTMgNSAxOS41IDUgQyAxOC40Mjk2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\n  name: \"Header\",\n  setup(props) {\n    const { state, updateSearch, updateActiveGroup } = inject(\"store\");\n    const hasSearch = computed(() => !state.options.hideSearch);\n    const hasGroupIcons = computed(() => !state.options.hideGroupIcons);\n    const orderedKeys = JSON.parse(JSON.stringify(state.orderedGroupKeys));\n    const placeholder = computed(\n      () => state.options.staticTexts.placeholder || \"\"\n    );\n    const searchValue = computed({\n      get: () => state.search,\n      set: (value) => updateSearch(value)\n    });\n    const groups = [\n      ...state.groups,\n      ...Object.keys(state.options.additionalGroups).map((g) => ({\n        key: g,\n        title: state.options.groupNames[g] ? state.options.groupNames[g] : snakeToCapitalizedCase(g)\n      }))\n    ];\n    const orderedGroups = [];\n    orderedKeys.forEach((key) => {\n      const index2 = groups.findIndex((group) => group.key === key);\n      if (index2 === -1)\n        return;\n      orderedGroups.push(groups[index2]);\n      groups.splice(index2, 1);\n    });\n    return {\n      orderedGroups,\n      orderedKeys,\n      searchValue,\n      updateActiveGroup,\n      hasSearch,\n      hasGroupIcons,\n      placeholder,\n      icons: {\n        smileys_people,\n        animals_nature,\n        food_drink,\n        activities,\n        travel_places,\n        objects,\n        symbols,\n        flags,\n        ...state.options.groupIcons,\n        recent\n      }\n    };\n  }\n});\nconst _hoisted_1$2 = {\n  key: 0,\n  class: \"v3-header\"\n};\nconst _hoisted_2$2 = {\n  key: 0,\n  class: \"v3-groups\"\n};\nconst _hoisted_3$2 = [\"onClick\"];\nconst _hoisted_4$2 = [\"title\"];\nconst _hoisted_5$2 = [\"src\"];\nconst _hoisted_6$1 = {\n  key: 1,\n  class: \"v3-spacing\"\n};\nconst _hoisted_7 = {\n  key: 2,\n  class: \"v3-search\"\n};\nconst _hoisted_8 = [\"placeholder\"];\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n  return _ctx.hasGroupIcons || _ctx.hasSearch ? (openBlock(), createElementBlock(\"div\", _hoisted_1$2, [\n    _ctx.hasGroupIcons ? (openBlock(), createElementBlock(\"div\", _hoisted_2$2, [\n      (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.orderedGroups, (group) => {\n        return openBlock(), createElementBlock(\"button\", {\n          key: group.key,\n          type: \"button\",\n          class: normalizeClass([\"v3-group\", {\n            \"v3-is-hidden\": !_ctx.icons[group.key]\n          }]),\n          onClick: ($event) => _ctx.updateActiveGroup(group.key)\n        }, [\n          createElementVNode(\"span\", {\n            title: group.title,\n            class: \"v3-icon\"\n          }, [\n            createElementVNode(\"img\", {\n              src: _ctx.icons[group.key],\n              alt: \"\"\n            }, null, 8, _hoisted_5$2)\n          ], 8, _hoisted_4$2)\n        ], 10, _hoisted_3$2);\n      }), 128))\n    ])) : createCommentVNode(\"\", true),\n    _ctx.hasGroupIcons && _ctx.hasSearch ? (openBlock(), createElementBlock(\"div\", _hoisted_6$1)) : createCommentVNode(\"\", true),\n    _ctx.hasSearch ? (openBlock(), createElementBlock(\"div\", _hoisted_7, [\n      withDirectives(createElementVNode(\"input\", {\n        \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => _ctx.searchValue = $event),\n        type: \"text\",\n        placeholder: _ctx.placeholder\n      }, null, 8, _hoisted_8), [\n        [vModelText, _ctx.searchValue]\n      ])\n    ])) : createCommentVNode(\"\", true)\n  ])) : createCommentVNode(\"\", true);\n}\nvar Header = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$3]]);\nconst _sfc_main$2 = defineComponent({\n  name: \"Header\",\n  setup() {\n    const { state, updateSkinTone } = inject(\"store\");\n    const skinTone = ref(false);\n    const hasError = ref(false);\n    const stateSkinTone = computed(() => state.skinTone);\n    const skinToneText = computed(\n      () => state.options.staticTexts.skinTone || \"Skin tone\"\n    );\n    const hasSkinTones = computed(() => !state.options.disableSkinTones);\n    const platform = isMac() ? \"is-mac\" : \"\";\n    const emoji = computed(() => {\n      return {\n        ...state.emoji,\n        src: EMOJI_REMOTE_SRC + \"/\" + state.emoji[EMOJI_RESULT_KEY] + \".png\"\n      };\n    });\n    function updateSkinToneState(open = true) {\n      skinTone.value = open;\n    }\n    function toggleSkinToneState() {\n      skinTone.value = !skinTone.value;\n    }\n    function selectSkinTone(tone) {\n      updateSkinTone(tone);\n      updateSkinToneState(false);\n    }\n    watch(\n      () => state.emoji,\n      () => {\n        hasError.value = false;\n      }\n    );\n    return {\n      emoji,\n      SKIN_TONES,\n      updateSkinToneState,\n      skinTone,\n      stateSkinTone,\n      selectSkinTone,\n      toggleSkinToneState,\n      EMOJI_RESULT_KEY,\n      EMOJI_NAME_KEY,\n      skinToneText,\n      hasSkinTones,\n      native: state.options.native,\n      unicodeToEmoji,\n      platform,\n      hasError\n    };\n  }\n});\nconst _hoisted_1$1 = { class: \"v3-foot-left\" };\nconst _hoisted_2$1 = { key: 0 };\nconst _hoisted_3$1 = [\"alt\", \"src\"];\nconst _hoisted_4$1 = { class: \"v3-text\" };\nconst _hoisted_5$1 = { class: \"v3-text\" };\nconst _hoisted_6 = [\"onClick\"];\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"div\", {\n    class: \"v3-footer\",\n    onMouseleave: _cache[2] || (_cache[2] = ($event) => _ctx.updateSkinToneState(false))\n  }, [\n    createElementVNode(\"div\", _hoisted_1$1, [\n      createElementVNode(\"span\", {\n        class: normalizeClass([_ctx.platform, \"v3-icon\"])\n      }, [\n        _ctx.native || _ctx.hasError ? (openBlock(), createElementBlock(\"span\", _hoisted_2$1, toDisplayString(_ctx.unicodeToEmoji(_ctx.emoji.r)), 1)) : (openBlock(), createElementBlock(\"img\", {\n          key: 1,\n          alt: _ctx.unicodeToEmoji(_ctx.emoji.r),\n          src: _ctx.emoji.src,\n          onError: _cache[0] || (_cache[0] = ($event) => _ctx.hasError = true)\n        }, null, 40, _hoisted_3$1))\n      ], 2),\n      createElementVNode(\"span\", _hoisted_4$1, \" :\" + toDisplayString(_ctx.emoji[_ctx.EMOJI_NAME_KEY][1] || _ctx.emoji[_ctx.EMOJI_NAME_KEY][0]) + \": \", 1)\n    ]),\n    _ctx.hasSkinTones ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n      createElementVNode(\"button\", {\n        type: \"button\",\n        class: \"v3-tone\",\n        onClick: _cache[1] || (_cache[1] = (...args) => _ctx.toggleSkinToneState && _ctx.toggleSkinToneState(...args))\n      }, [\n        createElementVNode(\"span\", _hoisted_5$1, toDisplayString(_ctx.skinToneText), 1),\n        createElementVNode(\"span\", {\n          class: normalizeClass(`v3-icon v3-tone-${_ctx.stateSkinTone}`)\n        }, null, 2)\n      ]),\n      createElementVNode(\"div\", {\n        class: normalizeClass([_ctx.skinTone ? \"v3-is-open\" : \"\", \"v3-skin-tones\"])\n      }, [\n        (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.SKIN_TONES, (tone) => {\n          return openBlock(), createElementBlock(\"button\", {\n            key: tone,\n            type: \"button\",\n            class: normalizeClass([\"v3-skin-tone-\" + tone, \"v3-skin-tone\"]),\n            onClick: ($event) => _ctx.selectSkinTone(tone)\n          }, null, 10, _hoisted_6);\n        }), 128))\n      ], 2)\n    ], 64)) : createCommentVNode(\"\", true)\n  ], 32);\n}\nvar Footer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render$2]]);\nconst _sfc_main$1 = defineComponent({\n  name: \"PickerRoot\",\n  components: {\n    Header,\n    Body,\n    Footer\n  },\n  props: {\n    type: {\n      type: String,\n      default: \"\"\n    },\n    text: {\n      type: String,\n      default: \"\"\n    },\n    additionalGroups: {\n      type: Object,\n      default: () => ({})\n    },\n    groupOrder: {\n      type: Array,\n      default: () => []\n    },\n    groupIcons: {\n      type: Object,\n      default: () => ({})\n    },\n    groupNames: {\n      type: Object,\n      default: () => ({})\n    }\n  },\n  emits: {\n    select: (emoji) => true,\n    \"update:text\": (value) => true\n  },\n  setup(props, { emit }) {\n    const elem = ref();\n    const button = ref();\n    const picker = ref();\n    const open = ref(false);\n    const input = ref(props.text);\n    const isInputType = props.type === \"input\" || props.type === \"textarea\";\n    let cursor = -1;\n    const { state } = inject(\"store\");\n    const colorTheme = computed(() => state.options.colorTheme);\n    function onSelect(emoji) {\n      if (isInputType) {\n        const mode = state.options.mode;\n        if (mode === \"prepend\") {\n          input.value = emoji.i + input.value;\n        } else if (mode === \"insert\" && cursor !== -1) {\n          input.value = `${input.value.slice(0, cursor)}${emoji.i}${input.value.slice(cursor)}`;\n          cursor += emoji.i.length;\n        } else {\n          input.value += emoji.i;\n        }\n        emit(\"update:text\", input.value);\n      }\n      emit(\"select\", emoji);\n    }\n    function updateCursor() {\n      var _a;\n      if (elem.value) {\n        cursor = ((_a = elem.value) == null ? void 0 : _a.selectionEnd) || -1;\n      }\n    }\n    function clickListener(event) {\n      var _a;\n      const isOutside = !((_a = event.target) == null ? void 0 : _a.closest(\n        \".v3-input-picker-wrap\"\n      ));\n      if (isOutside && open.value) {\n        open.value = false;\n      }\n    }\n    function setupPopper() {\n      if (button.value && picker.value && isInputType) {\n        let offset2 = state.options.offset;\n        if (typeof offset2 !== \"number\") {\n          offset2 = 6;\n        }\n        createPopper(button.value, picker.value, {\n          placement: \"bottom-end\",\n          modifiers: [\n            {\n              name: \"offset\",\n              options: {\n                offset: [0, offset2]\n              }\n            }\n          ]\n        });\n        document.body.addEventListener(\"click\", clickListener);\n      }\n    }\n    function onChangeText(event) {\n      input.value = event.target.value || \"\";\n      emit(\"update:text\", input.value);\n    }\n    onMounted(() => {\n      setupPopper();\n    });\n    onBeforeUnmount(() => {\n      document.body.removeEventListener(\"click\", clickListener);\n    });\n    return {\n      face: smileys_people,\n      open,\n      onSelect,\n      input,\n      elem,\n      updateCursor,\n      button,\n      picker,\n      isInputType,\n      onChangeText,\n      colorTheme\n    };\n  }\n});\nconst _hoisted_1 = {\n  key: 0,\n  class: \"v3-input-emoji-picker\"\n};\nconst _hoisted_2 = { class: \"v3-input-picker-root\" };\nconst _hoisted_3 = [\"value\"];\nconst _hoisted_4 = [\"value\"];\nconst _hoisted_5 = [\"src\"];\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_Header = resolveComponent(\"Header\");\n  const _component_Body = resolveComponent(\"Body\");\n  const _component_Footer = resolveComponent(\"Footer\");\n  return _ctx.isInputType ? (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n    createElementVNode(\"div\", _hoisted_2, [\n      _ctx.type === \"input\" ? (openBlock(), createElementBlock(\"input\", {\n        key: 0,\n        ref: \"elem\",\n        value: _ctx.input,\n        type: \"text\",\n        class: \"v3-emoji-picker-input\",\n        onInput: _cache[0] || (_cache[0] = (...args) => _ctx.onChangeText && _ctx.onChangeText(...args)),\n        onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.updateCursor && _ctx.updateCursor(...args))\n      }, null, 40, _hoisted_3)) : (openBlock(), createElementBlock(\"textarea\", {\n        key: 1,\n        ref: \"elem\",\n        value: _ctx.input,\n        class: \"v3-emoji-picker-textarea\",\n        onInput: _cache[2] || (_cache[2] = (...args) => _ctx.onChangeText && _ctx.onChangeText(...args)),\n        onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.updateCursor && _ctx.updateCursor(...args))\n      }, null, 40, _hoisted_4)),\n      createElementVNode(\"div\", {\n        class: normalizeClass([\"v3-input-picker-wrap\", _ctx.open ? \"v3-picker-is-open\" : \"\"])\n      }, [\n        createElementVNode(\"button\", {\n          ref: \"button\",\n          type: \"button\",\n          class: \"v3-input-picker-icon\",\n          onClick: _cache[4] || (_cache[4] = ($event) => _ctx.open = !_ctx.open)\n        }, [\n          createElementVNode(\"img\", {\n            src: _ctx.face,\n            alt: \"\"\n          }, null, 8, _hoisted_5)\n        ], 512),\n        createElementVNode(\"div\", {\n          ref: \"picker\",\n          class: normalizeClass([\"v3-emoji-picker\", \"v3-color-theme-\" + _ctx.colorTheme])\n        }, [\n          createVNode(_component_Header),\n          createVNode(_component_Body, { onSelect: _ctx.onSelect }, null, 8, [\"onSelect\"]),\n          createVNode(_component_Footer)\n        ], 2)\n      ], 2)\n    ])\n  ])) : (openBlock(), createElementBlock(\"div\", {\n    key: 1,\n    class: normalizeClass([\"v3-emoji-picker\", \"v3-color-theme-\" + _ctx.colorTheme])\n  }, [\n    createVNode(_component_Header),\n    createVNode(_component_Body, { onSelect: _ctx.onSelect }, null, 8, [\"onSelect\"]),\n    createVNode(_component_Footer)\n  ], 2));\n}\nvar PickerRoot = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1]]);\nconst _sfc_main = defineComponent({\n  name: \"Picker\",\n  components: {\n    PickerRoot\n  },\n  props: {\n    native: {\n      type: Boolean,\n      default: false\n    },\n    hideSearch: {\n      type: Boolean,\n      default: false\n    },\n    hideGroupIcons: {\n      type: Boolean,\n      default: false\n    },\n    hideGroupNames: {\n      type: Boolean,\n      default: false\n    },\n    staticTexts: {\n      type: Object,\n      default: () => ({})\n    },\n    disableStickyGroupNames: {\n      type: Boolean,\n      default: false\n    },\n    disabledGroups: {\n      type: Array,\n      default: () => []\n    },\n    groupNames: {\n      type: Object,\n      default: () => ({})\n    },\n    disableSkinTones: {\n      type: Boolean,\n      default: false\n    },\n    text: {\n      type: String,\n      default: \"\"\n    },\n    mode: {\n      type: String,\n      default: \"insert\"\n    },\n    offset: {\n      type: Number,\n      default: 6\n    },\n    additionalGroups: {\n      type: Object,\n      default: () => ({})\n    },\n    groupOrder: {\n      type: Array,\n      default: () => []\n    },\n    groupIcons: {\n      type: Object,\n      default: () => ({})\n    },\n    pickerType: {\n      type: String,\n      default: \"\"\n    },\n    displayRecent: {\n      type: Boolean,\n      default: false\n    },\n    theme: {\n      type: String,\n      default: \"light\"\n    }\n  },\n  emits: {\n    \"update:text\": (text) => true,\n    select: (emoji) => true\n  },\n  setup(props, { emit }) {\n    const input = ref(props.text);\n    function onChangeText(text) {\n      input.value = text || \"\";\n      emit(\"update:text\", input.value);\n    }\n    const store = Store();\n    store.updateOptions({\n      native: props.native,\n      hideSearch: props.hideSearch,\n      hideGroupIcons: props.hideGroupIcons,\n      hideGroupNames: props.hideGroupNames,\n      staticTexts: { ...STATIC_TEXTS, ...props.staticTexts },\n      disableStickyGroupNames: props.disableStickyGroupNames,\n      disabledGroups: props.disabledGroups,\n      groupNames: { ...GROUP_NAMES, ...props.groupNames },\n      disableSkinTones: props.disableSkinTones,\n      displayRecent: props.displayRecent,\n      additionalGroups: props.additionalGroups,\n      mode: props.mode,\n      offset: props.offset,\n      groupOrder: props.groupOrder,\n      groupIcons: props.groupIcons,\n      colorTheme: COLOR_THEMES.includes(props.theme) ? props.theme : \"light\"\n    });\n    provide(\"store\", store);\n    return {\n      type: props.pickerType,\n      input,\n      onChangeText\n    };\n  }\n});\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_picker_root = resolveComponent(\"picker-root\");\n  return openBlock(), createBlock(_component_picker_root, {\n    type: _ctx.type,\n    text: _ctx.input,\n    onSelect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"select\", $event)),\n    \"onUpdate:text\": _ctx.onChangeText\n  }, null, 8, [\"type\", \"text\", \"onUpdate:text\"]);\n}\nvar Picker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render]]);\nvar index = \"\";\nexport { Picker as default };\n","import {ref} from 'vue'\nimport {onClickOutside} from '@vueuse/core'\n\n/**\n * Composable to create visibility toggles\n */\nexport function useVisibilityToggle(clickOutsideRef, ignore) {\n\n  //Create refs\n  const isVisible = ref(false)\n  const afterHideHook = ref(null)\n  const afterShowHook = ref(null)\n  const beforeHideHook = ref(null)\n  const beforeShowHook = ref(null)\n\n  //Hooks\n  const onHide = fn => afterHideHook.value = fn\n  const onShow = fn => afterShowHook.value = fn\n  const beforeHide = fn => beforeHideHook.value = fn\n  const beforeShow = fn => beforeShowHook.value = fn\n\n  //Helper to call a hook\n  const callHook = hook => {\n    if (hook.value) {\n      return hook.value()\n    }\n  }\n\n  //Hide handler\n  const hide = () => {\n    if (callHook(beforeHideHook) === false) {\n      return\n    }\n    isVisible.value = false\n    callHook(afterHideHook)\n  }\n\n  //Show handler\n  const show = () => {\n    if (callHook(beforeShowHook) === false) {\n      return\n    }\n    isVisible.value = true\n    callHook(afterShowHook)\n  }\n\n  //Toggle\n  const toggle = (event) => {\n    if (event) {\n      event.isHandled = true\n    }\n    if (isVisible.value) {\n      hide()\n    }\n    else {\n      show()\n    }\n  }\n\n  //Click outside handling if refs passed\n  if (clickOutsideRef) {\n\n    //Ensure ignore array\n    if (!Array.isArray(ignore)) {\n      ignore = ignore ? [ignore] : []\n    }\n\n    //Always ignore these global classes as we don't want dropdowns to close\n    //when these elements are interacted with\n    ignore.push('.vs__dropdown-menu')\n\n    //Apply handler\n    onClickOutside(clickOutsideRef, hide, {ignore})\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    isVisible,\n\n    //Functions\n    show,\n    hide,\n    toggle,\n    onShow,\n    onHide,\n    beforeHide,\n    beforeShow,\n  }\n}\n","<script setup>\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport Dropdown from '@/components/shared/dropdown/Dropdown.vue'\nimport EmojiPicker from 'vue3-emoji-picker'\nimport 'vue3-emoji-picker/css'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'emoji',\n])\ndefineProps({\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Dropdown toggling\nconst wrapper = ref(null)\nconst {\n  isVisible,\n  toggle,\n  hide,\n} = useVisibilityToggle(wrapper)\n\n//Select handler\nconst onSelectEmoji = data => {\n  emit('emoji', {\n    emoji: data.i,\n    names: data.n,\n    skinTone: data.t,\n    unicode: data.u,\n  })\n  hide()\n}\n</script>\n\n<template>\n  <DropdownWrapper ref=\"wrapper\">\n    <button\n      ref=\"trigger\"\n      type=\"button\"\n      :disabled=\"isDisabled\"\n      :class=\"$style.button\"\n      @click.stop=\"toggle()\"\n    >\n      ➕ 😀\n    </button>\n    <Dropdown\n      alignment=\"right\"\n      :class=\"$style.dropdown\"\n      :is-visible=\"isVisible\"\n    >\n      <EmojiPicker\n        :native=\"true\"\n        @select=\"onSelectEmoji\"\n      />\n    </Dropdown>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.button {\n  background: transparent;\n  border: none;\n  padding-bottom: 0.25rem; /* For dropdown spacing */\n  &[disabled] {\n    opacity: 0.5;\n    cursor: not-allowed;\n  }\n  &:active, &:focus {\n    outline: none;\n  }\n}\n</style>\n","<script setup>\nimport {toRefs, computed} from 'vue'\nimport {getCharacterCount} from '@/helpers/string.js'\nimport TransitionSlideIn from '@/components/shared/transitions/TransitionSlideIn.vue'\n\n//Emits and props\nconst props = defineProps({\n  str: {\n    type: String,\n    default: '',\n  },\n  limit: {\n    type: Number,\n    default: null,\n  },\n  label: {\n    type: String,\n    default: 'characters',\n  },\n  displayThreshold: {\n    type: Number,\n    default: .60,\n  },\n  warningThreshold: {\n    type: Number,\n    default: .80,\n  },\n  dangerThreshold: {\n    type: Number,\n    default: 1,\n  },\n  manualCount: {\n    type: Number,\n    default: null,\n  },\n})\n\n//Get props\nconst {\n  str,\n  limit,\n  manualCount,\n  displayThreshold,\n  warningThreshold,\n  dangerThreshold,\n} = toRefs(props)\n\n//Determine count\nconst dynamicCount = computed(() => getCharacterCount(str.value))\nconst count = computed(() => manualCount.value !== null ? manualCount.value : dynamicCount.value)\nconst hasLimit = computed(() => limit.value !== null)\n\n//Determine threshold flags\nconst isOverDisplayThreshold = computed(() => count.value >= limit.value * displayThreshold.value)\nconst isOverWarningThreshold = computed(() => count.value >= limit.value * warningThreshold.value)\nconst isOverDangerThreshold = computed(() => count.value >= limit.value * dangerThreshold.value)\n</script>\n\n<template>\n  <TransitionSlideIn>\n    <div\n      v-if=\"hasLimit && isOverDisplayThreshold\"\n      :class=\"$style.wrapper\"\n    >\n      <span\n        :class=\"{\n          [$style.text]: true,\n          [$style.warning]: isOverWarningThreshold,\n          [$style.danger]: isOverDangerThreshold,\n        }\"\n      >{{ count }} / {{ limit }} {{ label }}</span>\n    </div>\n  </TransitionSlideIn>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  padding-top: 0.25rem;\n}\n.text {\n  font-size: 0.75rem;\n  color: var(--color-text-muted);\n  transition: color var(--transition-ease);\n  &.warning {\n    color: var(--color-text-warning);\n  }\n  &.danger {\n    color: var(--color-text-danger);\n  }\n}\n</style>\n","import {useEventListener} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Use focus composable\n */\nexport function useFocus(element) {\n\n  //Track if element has focus\n  const hasFocus = ref(document.activeElement === element.value)\n\n  //Focus and blur helpers\n  const focus = () => element.value?.focus()\n  const blur = () => element.value?.blur()\n\n  //Apply event listeners\n  useEventListener(element, 'focus', () => hasFocus.value = true)\n  useEventListener(element, 'blur', () => hasFocus.value = false)\n\n  //Return methods\n  return {\n    focus,\n    blur,\n  }\n}\n","\n/**\n * Composable to insert text at cursor into an input element\n */\nexport function useTextInsertion(inputRef) {\n\n  //Insert text into input element\n  const insertText = textToInsert => {\n\n    //Can't insert if there's no ref (yet)\n    if (!inputRef.value) {\n      return\n    }\n\n    //Get props\n    const input = inputRef.value\n    const start = input.selectionStart\n    const end = input.selectionEnd\n    const textBefore = input.value.substring(0, start)\n    const textAfter = input.value.substring(end, input.value.length)\n\n    //Update the input's value and dispatch an input event to\n    //trigger changes to the model\n    input.value = `${textBefore}${textToInsert}${textAfter}`\n    input.dispatchEvent(new Event('input'))\n\n    //Focus after a short timeout\n    setTimeout(() => {\n      const newPos = start + textToInsert.length\n      input.setSelectionRange(newPos, newPos)\n      input.focus()\n    }, 100)\n  }\n\n  //Expose interface\n  return {\n    insertText,\n  }\n}\n","import {useEnv} from '@/composables/use-env.js'\nimport {ref, nextTick, onMounted} from 'vue'\n\n/**\n * Helpers to make the Capybara Peace Treaty work\n */\nexport function useCapybaraPeaceTreaty() {\n\n  //Initialize flag as undefined to avoid setting props unnecessarily\n  const isReady = ref(undefined)\n\n  //Check if running in test environment\n  const {isTest} = useEnv()\n\n  //Mark as ready on next tick (only in test environment)\n  if (isTest.value) {\n    onMounted(async () => {\n      await nextTick()\n      isReady.value = true\n    })\n  }\n\n  //Expose ready flag\n  return {\n    isReady,\n  }\n}\n","<script setup>\nimport InputWrapper from '@/components/shared/form/InputWrapper.vue'\nimport EmojiPicker from '@/components/shared/form/EmojiPicker.vue'\nimport CharacterLimitIndicator from '@/components/shared/form/CharacterLimitIndicator.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {useFocus} from '@/composables/use-focus.js'\nimport {useTextInsertion} from '@/composables/use-text-insertion.js'\nimport {useCapybaraPeaceTreaty} from '@/composables/use-capybara-peace-treaty.js'\nimport {getCharacterCount, getNumLineBreaks} from '@/helpers/string.js'\nimport {toRefs, ref, computed, onMounted, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n  'input',\n  'keyup',\n  'keydown',\n  'dirty',\n  'focus',\n  'blur',\n])\nconst props = defineProps({\n  type: {\n    type: String,\n    default: 'text',\n  },\n  value: {\n    type: [String, Number],\n    default: '',\n  },\n  selectOnFocus: {\n    type: Boolean,\n    default: false,\n  },\n  focusOnMount: {\n    type: Boolean,\n    default: false,\n  },\n  focusOnMountDelay: {\n    type: Number,\n    default: 0,\n  },\n  hasError: {\n    type: Boolean,\n    default: false,\n  },\n  hasSpinner: {\n    type: Boolean,\n    default: false,\n  },\n  isMultiline: {\n    type: Boolean,\n    default: false,\n  },\n  noMaxHeight: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  isSlim: {\n    type: Boolean,\n    default: false,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  isFocussed: {\n    type: Boolean,\n    default: false,\n  },\n  isReadonly: {\n    type: Boolean,\n    default: false,\n  },\n  autoExpands: {\n    type: Boolean,\n    default: true,\n  },\n  showEmojiPicker: {\n    type: Boolean,\n    default: false,\n  },\n  characterLimit: {\n    type: Number,\n    default: null,\n  },\n  ignoreCharacterLimit: {\n    type: Boolean,\n    default: false,\n  },\n  manualCharacterCount: {\n    type: Number,\n    default: null,\n  },\n  withEnterKeyHandling: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get props\nconst {\n  value,\n  isMultiline,\n  selectOnFocus,\n  withEnterKeyHandling,\n  showEmojiPicker,\n  characterLimit,\n  ignoreCharacterLimit,\n  manualCharacterCount,\n} = toRefs(props)\n\n//Input ref and value\nconst inputRef = ref(null)\nconst inputValue = ref(value.value || '')\n\n//Capybara peace treaty\nconst {isReady} = useCapybaraPeaceTreaty()\n\n//Watch value\nwatch(value, () => {\n  if (value.value === null || value.value === undefined) {\n    inputValue.value = ''\n  }\n  else {\n    inputValue.value = String(value.value)\n  }\n}, {immediate: true})\n\n//Max length value (factors in linebreaks and actual character count)\nconst maxLength = computed(() => {\n\n  //No limit\n  if (characterLimit.value === null || ignoreCharacterLimit.value) {\n    return null\n  }\n\n  //Determine limit factoring in linebreaks\n  const limit = characterLimit.value - getNumLineBreaks(inputValue.value)\n\n  //No manual count, just return the limit\n  if (manualCharacterCount.value === null) {\n    return limit\n  }\n\n  //Determine the difference between the manual count and the actual count\n  const count = getCharacterCount(inputValue.value)\n  const diff = manualCharacterCount.value - count\n\n  //Return the limit minus the difference to allow for the variation\n  return limit - diff\n})\n\n//Text insertion composable\nconst {insertText} = useTextInsertion(inputRef)\n\n//Input field event handlers\nconst onInput = event => {\n  const {value} = event.target\n  emit('input', {value})\n  emit('dirty', {value})\n}\nconst onKeydown = event => {\n  if (event.key === 'Enter' && withEnterKeyHandling.value) {\n    event.preventDefault()\n    if (event.altKey || event.shiftKey) {\n      insertText('\\n')\n      return\n    }\n  }\n  emit('keydown', event)\n}\nconst onKeyup = event => emit('keyup', event)\nconst onBlur = event => emit('blur', event)\nconst onFocus = event => {\n  if (selectOnFocus.value) {\n    event.target.select()\n  }\n  emit('focus', event)\n}\n\n//Expose focus and blur methods to allow parent components to focus/blur the input\nconst {focus, blur} = useFocus(inputRef)\ndefineExpose({\n  insertText,\n  focus,\n  blur,\n})\n\n//Focus on mount\nconst {focusOnMount, focusOnMountDelay} = toRefs(props)\nonMounted(() => {\n  if (focusOnMount.value) {\n    setTimeout(focus, focusOnMountDelay.value)\n  }\n})\n\n//Component\nconst component = computed(() => isMultiline.value ? 'textarea' : 'input')\n</script>\n\n<template>\n  <InputWrapper\n    :is-compact=\"isCompact\"\n    @click=\"$emit('click', $event)\"\n  >\n    <template #iconLeft>\n      <slot name=\"iconLeft\" />\n    </template>\n\n    <template #iconRight>\n      <Spinner v-if=\"hasSpinner\" />\n      <slot\n        v-else\n        name=\"iconRight\"\n      />\n    </template>\n\n    <component\n      :is=\"component\"\n      ref=\"inputRef\"\n      :value=\"inputValue\"\n      :type=\"type\"\n      :disabled=\"isDisabled\"\n      :readonly=\"isReadonly\"\n      :is-ready=\"isReady\"\n      :class=\"{\n        [$style.input]: true,\n        [$style.error]: hasError,\n        [$style.slim]: isSlim,\n        [$style.compact]: isCompact,\n        [$style.focussed]: isFocussed,\n        [$style.multiline]: isMultiline,\n        [$style.maxHeight]: !noMaxHeight,\n        [$style.autoExpands]: autoExpands,\n        [$style.withIconLeft]: $slots.iconLeft,\n        [$style.withIconRight]: $slots.iconRight || hasSpinner,\n      }\"\n      :maxlength=\"maxLength\"\n      v-bind=\"$attrs\"\n      @input=\"onInput($event)\"\n      @keyup=\"onKeyup($event)\"\n      @keydown=\"onKeydown($event)\"\n      @focus=\"onFocus($event)\"\n      @blur=\"onBlur($event)\"\n    />\n\n    <template #underInput>\n      <EmojiPicker\n        v-if=\"showEmojiPicker\"\n        ref=\"emojiButtonRef\"\n        :is-disabled=\"isDisabled\"\n        :class=\"$style.emojiPicker\"\n        @emoji=\"insertText($event.emoji)\"\n      />\n      <CharacterLimitIndicator\n        :str=\"inputValue\"\n        :limit=\"characterLimit\"\n        :manual-count=\"manualCharacterCount\"\n      />\n    </template>\n  </InputWrapper>\n</template>\n\n<style module lang=\"scss\">\n.input {\n  display: flex;\n  align-items: center;\n  height: var(--input-height);\n  min-height: var(--input-height);\n  width: 100%;\n  padding: 0.5rem 1rem;\n  border-radius: var(--border-radius-m);\n  border: 1px solid var(--color-input-borders);\n  color: var(--color-input-text);\n  font-size: var(--font-size-input) !important;\n  line-height: 24px !important;\n  background: var(--bg-input);\n  font-family: var(--font-family);\n  transition: box-shadow var(--transition-ease), border-color var(--transition-ease);\n  &.slim {\n    padding: 0.5rem 0.75rem;\n  }\n  &.compact {\n    height: var(--input-height-compact);\n    min-height: var(--input-height-compact);\n  }\n  &:focus {\n    outline: none;\n  }\n  &:focus:not(:disabled), &.focussed:not(:disabled) {\n    border-color: var(--color-input-borders-focus);\n    box-shadow: 0 0 0 1px var(--color-input-borders-focus);\n  }\n  &.error {\n    border-color: var(--color-input-borders-error) !important;\n    box-shadow: 0 0 0 1px var(--color-input-borders-error) !important;\n    color: var(--color-input-text-error);\n    &::placeholder {\n      color: var(--color-input-text-error) !important;\n      opacity: 0.5;\n    }\n  }\n  &:disabled {\n    border-color: var(--color-input-borders-disabled);\n    box-shadow: none;\n    color: var(--color-input-text-disabled);\n    background: var(--bg-input-disabled);\n    cursor: not-allowed;\n  }\n  &.withIconLeft {\n    padding-left: 3rem;\n    &.compact {\n      padding-left: 2.5rem;\n    }\n  }\n  &.withIconRight {\n    padding-right: 3rem;\n    &.compact {\n      padding-right: 2.5rem;\n    }\n  }\n  &::-webkit-search-cancel-button{\n    display: none;\n  }\n  &.multiline {\n    height: auto;\n    resize: vertical;\n    @supports not (field-sizing: content) {\n      height: 354px;\n    }\n    &.maxHeight {\n      max-height: 400px;\n    }\n    &.autoExpands {\n      @supports (field-sizing: content) {\n        /* Not yet supported in Safari/Firefox, but works brilliantly in Chrome/Edge/Opera */\n        field-sizing: content;\n      }\n    }\n  }\n}\n::placeholder {\n  opacity: 1;\n  color: var(--color-text-muted) !important;\n}\n.emojiPicker {\n  position: absolute;\n  top: 0.5rem;\n  right: 0;\n}\n</style>\n","<script setup>\n//SEE: https://vue3datepicker.com/\nimport VueDatePicker from '@vuepic/vue-datepicker'\nimport '@vuepic/vue-datepicker/dist/main.css'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {DateTime} from 'luxon'\nimport {dateTokens, dateFormats} from '@/constants/date-and-time.js'\nimport {tokenToDateTime, inputValueToUTCDateTime} from '@/helpers/date-and-time.js'\nimport {mapFn} from '@/helpers/array.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'dirty',\n])\nconst props = defineProps({\n  value: {\n    type: [String, DateTime, Array],\n    default: '',\n  },\n  displayFormat: {\n    type: String,\n    default: dateFormats.DATE_SHORT_US,\n  },\n  inputFormat: {\n    type: String,\n    default: dateFormats.ISO_DATE_ONLY,\n  },\n  outputFormat: {\n    type: String,\n    default: dateFormats.ISO_DATE_ONLY,\n  },\n  placeholder: {\n    type: String,\n    default: '',\n  },\n  autoApply: {\n    type: Boolean,\n    default: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  isClearable: {\n    type: Boolean,\n    default: false,\n  },\n  isRange: {\n    type: Boolean,\n    default: false,\n  },\n  alignment: {\n    type: String,\n    default: 'left',\n  },\n  hasError: {\n    type: Boolean,\n    default: false,\n  },\n  presetDates: {\n    type: Array,\n    default: () => [\n      {\n        label: 'Any',\n        value: null,\n      },\n      {\n        label: 'This month',\n        value: [\n          dateTokens.START_OF_MONTH,\n          dateTokens.END_OF_MONTH,\n        ],\n      },\n      {\n        label: 'Last month',\n        value: [\n          dateTokens.START_OF_LAST_MONTH,\n          dateTokens.END_OF_LAST_MONTH,\n        ],\n      },\n      {\n        label: 'This week',\n        value: [\n          dateTokens.START_OF_WEEK,\n          dateTokens.END_OF_WEEK,\n        ],\n      },\n      {\n        label: 'Last week',\n        value: [\n          dateTokens.START_OF_LAST_WEEK,\n          dateTokens.END_OF_LAST_WEEK,\n        ],\n      },\n      {\n        label: 'Today',\n        value: [\n          dateTokens.START_OF_DAY,\n          dateTokens.END_OF_DAY,\n        ],\n      },\n    ],\n  },\n})\n\n//Refs\nconst {timezone} = useTimezone()\nconst {value, displayFormat, inputFormat, outputFormat, presetDates, autoApply} = toRefs(props)\n\n//Convert input value to DateTime instance\nconst convertInputValueToDateTime = date => {\n  return inputValueToUTCDateTime(date, inputFormat.value, timezone.value)\n}\n\n//Convert the output from the Vue3 datepicker (JS Date) to a DateTime instance\n//with UTC timezone, but at the start of the day in the user's local timezone.\nconst convertJSDateToDateTime = date => {\n  return DateTime\n    .fromJSDate(date, {zone: timezone.value})\n    .startOf('day')\n    .setZone('utc')\n}\n\n//Convert a preset token to a DateTime instance\nconst convertPresetToDateTime = token => {\n  return tokenToDateTime(token, timezone.value)\n}\n\n//Convert a DateTime instance to datepicker input format (ISO string in user's timezone)\nconst convertDateTimeToPickerInput = dateTime => {\n  if (!dateTime) {\n    return null\n  }\n  return dateTime.setZone(timezone.value).toISO()\n}\n\n//Convert a DateTime instance to the display format. This will be in the user's timezone.\nconst convertDateTimeToDisplayFormat = dateTime => {\n  if (!dateTime) {\n    return ''\n  }\n  return dateTime.setZone(timezone.value).toFormat(displayFormat.value)\n}\n\n//Convert a DateTime instance to ISO string output format (always in UTC)\nconst convertDateTimeToISOString = dateTime => {\n  if (!dateTime) {\n    return null\n  }\n  return dateTime.setZone('utc').toISO()\n}\n\n//Convert a datetime to the formatted output value\nconst convertDateTimeToOutputFormat = dateTime => {\n  if (!dateTime || dateTime.invalid) {\n    return null\n  }\n  return dateTime.setZone(timezone.value).toFormat(outputFormat.value)\n}\n\n//The date time value contains the Luxon DateTime representation of the value\n//and takes care of conversion in case a String value is provided.\nconst dateTimeValue = computed(() => mapFn(value.value, convertInputValueToDateTime))\n\n//This value is what gets passed to the datepicker component\nconst modelValue = computed(() => mapFn(dateTimeValue.value, convertDateTimeToPickerInput))\n\n//The display value is what gets displayed to the user in the input field\n//This is always based on the Luxon DateTime representation of the value\nconst displayJoin = arr => arr.filter(Boolean).join(' – ')\nconst displayValue = computed(() => mapFn(dateTimeValue.value, convertDateTimeToDisplayFormat, displayJoin))\n\n//Datepicker refs\nconst datePicker = ref(null)\nconst isOpen = ref(false)\n\n//Emit value helper\nconst emitValue = value => {\n\n  //Determine auxillary values\n  const iso = mapFn(value, convertDateTimeToISOString)\n  const formattedValue = mapFn(value, convertDateTimeToOutputFormat)\n\n  //Emit\n  emit('input', {value, iso, formattedValue})\n  emit('dirty', {value, iso, formattedValue})\n\n  //Close menu if auto apply is enabled\n  if (autoApply.value) {\n    datePicker.value.closeMenu()\n  }\n}\n\n//Input and preset handling\nconst onInput = value => emitValue(mapFn(value, convertJSDateToDateTime))\nconst onPreset = token => emitValue(mapFn(token, convertPresetToDateTime))\n\n//Expose openInput method\nconst openInput = () => {\n  if (datePicker.value) {\n    datePicker.value.openMenu()\n  }\n}\n\n//Expose\ndefineExpose({\n  openInput,\n})\n</script>\n\n<template>\n  <VueDatePicker\n    ref=\"datePicker\"\n    :class=\"{\n      [$style[alignment]]: !!alignment,\n    }\"\n    :range=\"isRange ? {\n      partialRange: false,\n    } : undefined\"\n    :format=\"displayFormat\"\n    :model-value=\"modelValue\"\n    :timezone=\"timezone\"\n    :disabled=\"isDisabled\"\n    :auto-apply=\"autoApply\"\n    :six-weeks=\"true\"\n    :week-start=\"0\"\n    :transitions=\"{\n      menuAppearTop: 'datepicker',\n      menuAppearBottom: 'datepicker',\n    }\"\n    :hide-input-icon=\"true\"\n    :enable-time-picker=\"false\"\n    :month-change-on-scroll=\"false\"\n    v-bind=\"$attrs\"\n    @update:model-value=\"onInput($event)\"\n    @open=\"isOpen = true\"\n    @closed=\"isOpen = false\"\n  >\n    <template #trigger>\n      <TextInput\n        :class=\"{\n          [$style.input]: true,\n          [$style.range]: isRange,\n        }\"\n        :value=\"displayValue\"\n        :placeholder=\"placeholder\"\n        :is-focussed=\"isOpen\"\n        :is-disabled=\"isDisabled\"\n        :is-clickable=\"!isDisabled\"\n        :has-error=\"hasError\"\n        readonly\n      >\n        <template #iconLeft>\n          <Icon\n            icon=\"calendar_today\"\n            size=\"s\"\n            is-outlined\n            :is-clickable=\"!isDisabled\"\n          />\n        </template>\n        <template\n          v-if=\"isClearable && value && !isDisabled\"\n          #iconRight\n        >\n          <Icon\n            icon=\"close\"\n            size=\"s\"\n            is-outlined\n            is-clickable\n            @click.stop=\"emit('input', {value: ''})\"\n          />\n        </template>\n      </TextInput>\n    </template>\n    <template\n      v-if=\"isRange\"\n      #left-sidebar\n    >\n      <div :class=\"$style.presets\">\n        <div\n          v-for=\"preset in presetDates\"\n          :key=\"preset.value\"\n          :class=\"$style.preset\"\n          is-clickable\n          @click=\"onPreset(preset.value)\"\n        >\n          {{ preset.label }}\n        </div>\n      </div>\n    </template>\n    <template\n      #action-row=\"{selectDate, closePicker, disabled}\"\n    >\n      <ButtonBar>\n        <template #left>\n          <ActionButton\n            label=\"Cancel\"\n            type=\"secondary\"\n            @click=\"closePicker()\"\n          />\n        </template>\n        <template #right>\n          <ActionButton\n            label=\"Apply\"\n            type=\"primary\"\n            :is-disabled=\"disabled\"\n            @click=\"selectDate()\"\n          />\n        </template>\n      </ButtonBar>\n    </template>\n  </VueDatePicker>\n</template>\n\n<style module lang=\"scss\">\n.input {\n  min-width: 150px;\n  &.range {\n    min-width: 240px;\n  }\n}\n.presets {\n  display: flex;\n  flex-direction: column;\n  gap: 0.25rem;\n  padding: 0.25rem;\n}\n.preset {\n  white-space: nowrap;\n  padding: 0.5rem 1rem;\n  padding-right: 2rem;\n  border-radius: var(--border-radius-m);\n  transition: background-color var(--transition-cubic-fast);\n  &:hover {\n    background: var(--color-haze);\n  }\n}\n.left {\n  :global(.dp--menu-wrapper) {\n    left: 0 !important;\n  }\n}\n.right {\n  :global(.dp--menu-wrapper) {\n    left: auto !important;\n    right: 0;\n  }\n}\n\n:root {\n  --dp-font-family: var(--font-family);\n  --dp-border-radius: var(--border-radius-m);\n  --dp-cell-border-radius: var(--border-radius-s);\n  --dp-common-transition: all var(--transition-cubic-fast);\n  --dp-font-size: var(--font-size-m);\n  --dp-preview-font-size: var(--font-size-m);\n  --dp-menu-min-width: 280px;\n  --dp-button-height: 36px;\n  --dp-month-year-row-height: 36px;\n  --dp-month-year-row-button-size: 36px;\n  --dp-cell-size: 36px;\n  --dp-cell-padding: 0.25rem;\n  --dp-row-margin: 0.25rem 0;\n  --dp-common-padding: 0.5rem;\n  --dp-calendar-header-cell-padding: 0.5rem;\n}\n:global(.dp__theme_light) {\n  --dp-background-color: var(--color-white);\n  --dp-text-color: var(--color-text);\n  --dp-hover-color: var(--bg-highlight);\n  --dp-hover-text-color: var(--color-text);\n  --dp-hover-icon-color: var(--color-elements);\n  --dp-primary-color: var(--color-primary);\n  --dp-primary-disabled-color: var(--color-primary-muted);\n  --dp-primary-text-color: #f8f5f5;\n  --dp-secondary-color: #c0c4cc;\n  --dp-border-color: var(--color-borders);\n  --dp-menu-border-color: var(--color-borders);\n  --dp-border-color-hover: #aaaeb7;\n  --dp-border-color-focus: #aaaeb7;\n  --dp-disabled-color: #f6f6f6;\n  --dp-scroll-bar-background: var(--color-haze);\n  --dp-scroll-bar-color: var(--color-athens);\n  --dp-success-color: var(--color-text-success);\n  --dp-success-color-disabled: var(--color-text-success);\n  --dp-icon-color: var(--color-elements);\n  --dp-danger-color: var(--color-text-danger);\n  --dp-marker-color: #ff6f60;\n  --dp-tooltip-color: #fafafa;\n  --dp-disabled-color-text: #8e8e8e;\n  --dp-highlight-color: rgb(25 118 210 / 10%);\n  --dp-range-between-dates-background-color: var(--dp-hover-color, #f3f3f3);\n  --dp-range-between-dates-text-color: var(--dp-hover-text-color, #212121);\n  --dp-range-between-border-color: var(--dp-hover-color, #f3f3f3);\n}\n\n/* Style tweaks that aren't possible through configuration */\n:global(.dp--menu-wrapper) {\n  box-shadow: var(--box-shadow);\n}\n:global(.dp__arrow_top),\n:global(.dp__arrow_bottom),\n:global(.dp__button_bottom),\n:global(.dp__selection_preview) {\n  display: none;\n}\n:global(.dp__btn) {\n  outline: none !important;\n}\n:global(.dp__btn:hover), :global(.dp__inner_nav:hover) {\n  background: var(--color-haze);\n}\n:global(.dp__action_row) {\n  border-top: 1px solid var(--color-borders);\n}\n:global(.dp__inner_nav) {\n  border-radius: var(--border-radius-m);\n}\n:global(.dp__month_year_wrap) {\n  gap: 0.5rem;\n}\n</style>\n<style>\n.datepicker-enter-active, .datepicker-leave-active {\n  transition: all var(--transition-cubic-fast);\n}\n.datepicker-enter-from, .datepicker-leave-to {\n  transform: translateX(5px) translateY(-5px);\n  opacity: 0;\n}\n</style>\n","<script setup>\nimport InputWrapper from '@/components/shared/form/InputWrapper.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Tag from '@/components/shared/core/Tag.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport VSelect from 'vue-select' //SEE https://vue-select.org/api/props.html\nimport {useFloating, autoUpdate, flip, offset} from '@floating-ui/vue'\nimport {useEventListener} from '@vueuse/core'\nimport {useCapybaraPeaceTreaty} from '@/composables/use-capybara-peace-treaty.js'\nimport {useCssModule, ref, toRefs, computed, watch, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'dirty',\n  'open',\n  'close',\n  'search',\n])\nconst props = defineProps({\n  value: {\n    type: [String, Number, Object, Array, Boolean],\n    default: '',\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  labelProp: {\n    type: String,\n    default: 'label',\n  },\n  valueProp: {\n    type: String,\n    default: 'value',\n  },\n  isClearable: {\n    type: Boolean,\n    default: true,\n  },\n  isSearchable: {\n    type: Boolean,\n    default: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  hasError: {\n    type: Boolean,\n    default: false,\n  },\n  hasSpinner: {\n    type: Boolean,\n    default: false,\n  },\n  isMultiSelect: {\n    type: Boolean,\n    default: false,\n  },\n  showSelectionSummary: {\n    type: Boolean,\n    default: false,\n  },\n  isFlexible: {\n    type: Boolean,\n    default: false,\n  },\n  isSlim: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  isLow: {\n    type: Boolean,\n    default: false,\n  },\n  isCentered: {\n    type: Boolean,\n    default: false,\n  },\n  position: {\n    type: String,\n    default: 'bottom',\n  },\n  max: {\n    type: Number,\n    default: 0,\n  },\n  selectable: {\n    type: Function,\n    default: () => true,\n  },\n  isFilterable: {\n    type: Boolean,\n    default: true,\n  },\n\n  /* This needs to be true for top positioning to work correctly. However, if\n  a SelectInput is present in a modal, it will appear underneath the modal, as\n  it will be absolutely positioned and not included in the top layer that the\n  dialog sits in. So for those inputs you cannot use appendToBody true. */\n  appendToBody: {\n    type: Boolean,\n    default: false,\n  },\n\n  //Have to explicitly handle this prop, as it will otherwise be applied\n  //twice, once on the InputWrapper and once on the VSelect 🤷\n  testId: {\n    type: String,\n    default: undefined,\n  },\n  autoSelectFirstOption: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {value, options, valueProp, labelProp, isMultiSelect, isFlexible, max, autoSelectFirstOption} = toRefs(props)\nconst placement = ref(`${props.position}-start`) //Can't be the prop ref directly\nconst dropdownRef = ref(null) //Needed for useFloating\nconst vSelect = ref(null)\n\n//Capybara peace treaty\nconst {isReady} = useCapybaraPeaceTreaty()\n\n//Styles\nconst $style = useCssModule()\n\n//Use floating UI\nconst {floatingStyles} = useFloating(vSelect, dropdownRef, {\n  placement,\n  middleware: [\n    offset(8),\n    flip(),\n  ],\n  whileElementsMounted: autoUpdate,\n})\n\n//Calculate position\nconst calculatePosition = dropdown => {\n\n  //Store ref and set width\n  dropdownRef.value = dropdown\n\n  //We must apply this class manually because the dropdown is rendered on the body\n  //to allow positioning on top of the input using Floating UI. But that means\n  //it cannot inherti nested styles from the VSelect component.\n  //SEE: https://github.com/sagalbot/vue-select/issues/1852\n  if (isFlexible.value) {\n    dropdown.classList.add($style.flexible)\n    dropdown.style.minWidth = `${vSelect.value.$el.offsetWidth}px`\n  }\n  else {\n    dropdown.style.width = `${vSelect.value.$el.offsetWidth}px`\n  }\n}\n\n//Update floating styles\nwatch(floatingStyles, () => {\n  if (dropdownRef.value) {\n    Object.assign(dropdownRef.value.style, floatingStyles.value)\n  }\n})\n\n//Keydown map generator to allow for custom keydown handling\nconst keydownMapGenerator = (map, vm) => ({\n  ...map,\n\n  //ESC (must stop propagation and default to prevent a parent modal from closing)\n  27: event => {\n    event.preventDefault()\n    event.stopPropagation()\n    vm.onEscape()\n  },\n})\n\n//Get option value\nconst getOptionValue = option => {\n  if (option && typeof option === 'object') {\n    return option[valueProp.value]\n  }\n  return option ?? null\n}\n\n//Get option label\nconst getOptionLabel = option => {\n  if (option && typeof option === 'object') {\n    return option[labelProp.value]\n  }\n  return option ?? null\n}\n\n//Options array for VSelect. This is necessary, because VSelect passes the option\n//directly to v-bind=\"option\" (instead of doing v-bind=\"{option}\") for the #option\n//slot, which means if we pass in a model, it will get converted to a plain object\n//and no longer have access to virtual properties/getters. So we convert the\n//options here to plain objects first, including whatever the label prop is,\n//virtual or not.\n//SEE: https://github.com/sagalbot/vue-select/issues/1857\nconst optionsForVSelect = computed(() => {\n  return options.value.map(option => {\n    if (option && typeof option === 'object') {\n      return {\n        ...option,\n        [valueProp.value]: getOptionValue(option),\n        [labelProp.value]: getOptionLabel(option),\n      }\n    }\n    return option\n  })\n})\n\n//Selected value (option or options) for VSelect\nconst valueForVSelect = computed(() => {\n\n  //If we've already been given an array of options as value, pass as is so\n  //that we don't have to rely on the given options\n  if (Array.isArray(value.value) && typeof value.value[0] === 'object') {\n    return value.value\n  }\n\n  //Multi select\n  if (isMultiSelect.value) {\n\n    //If we already have objects as values, return as is\n    if (Array.isArray(value.value) && typeof value.value[0] === 'object') {\n      return value.value\n    }\n\n    //No options given? Can't determine selected options\n    if (!Array.isArray(options.value)) {\n      return []\n    }\n\n    //Determine from options\n    return options.value\n      .filter(option => value.value.includes(getOptionValue(option)))\n  }\n\n  //If we already have an object as value, return as is\n  if (typeof value.value === 'object' && value.value !== null) {\n    return value.value\n  }\n\n  //No options given? Can't determine selected option\n  if (!Array.isArray(options.value)) {\n    return null\n  }\n\n  //Determine from options\n  return options.value\n    .find(option => getOptionValue(option) === value.value)\n})\n\n//Input handling\nconst onInput = event => {\n\n  //Multi select\n  if (isMultiSelect.value) {\n\n    //Get options and value\n    const options = event\n    const value = options.map(option => option[valueProp.value])\n\n    //Don't emit if we're over the max\n    if (max.value && options.length > max.value) {\n      return\n    }\n\n    //Emit\n    emit('input', {value, options})\n    emit('dirty', {value, options})\n    return\n  }\n\n  //Single select\n  const option = event\n  const value = getOptionValue(option)\n  emit('input', {value, option})\n  emit('dirty', {value, option})\n}\n\n//Open and close status\nconst isOpen = ref(false)\nconst hasBeenOpened = ref(false)\n\nconst onOpen = () => {\n  isOpen.value = true\n  emit('open')\n\n  //Delayed flag toggle to prevent immediate close when clicking on the caret\n  setTimeout(() => hasBeenOpened.value = true, 250)\n}\nconst onClose = () => {\n  isOpen.value = false\n  hasBeenOpened.value = false\n  emit('close')\n}\n\n//Open/close dropdown\nconst openDropdown = () => vSelect.value.open = true\nconst closeDropdown = () => {\n  vSelect.value.open = false\n  hasBeenOpened.value = false\n}\nconst closeDropdownIfOpen = () => {\n  if (isOpen.value && hasBeenOpened.value) {\n    closeDropdown()\n  }\n}\n\n//Expose handlers to open/close the dropdown\ndefineExpose({\n  openDropdown,\n  closeDropdown,\n})\n\nonMounted(() => {\n  if (\n    autoSelectFirstOption.value &&\n    Array.isArray(options.value) &&\n    options.value.length > 0 &&\n    !value.value &&\n    !isMultiSelect.value\n  ) {\n    const firstOption = options.value[0]\n    const firstValue = getOptionValue(firstOption)\n\n    emit('input', {value: firstValue, option: firstOption})\n  }\n})\n\n//Apply event listener\nuseEventListener(document, 'click', closeDropdownIfOpen)\n</script>\n\n<template>\n  <InputWrapper>\n    <VSelect\n      v-bind=\"$attrs\"\n      ref=\"vSelect\"\n      dir=\"ltr\"\n      :label=\"labelProp\"\n      :model-value=\"valueForVSelect\"\n      :options=\"optionsForVSelect\"\n      :multiple=\"isMultiSelect\"\n      :clearable=\"isMultiSelect || isClearable\"\n      :searchable=\"isSearchable\"\n      :filterable=\"isFilterable\"\n      :disabled=\"isDisabled\"\n      :loading=\"hasSpinner\"\n      :close-on-select=\"!isMultiSelect\"\n      :deselect-from-dropdown=\"isMultiSelect\"\n      :selectable=\"selectable\"\n      :map-keydown=\"keydownMapGenerator\"\n      :test-id=\"testId\"\n      :is-ready=\"isReady\"\n      :get-option-label=\"getOptionLabel\"\n      :autoscroll=\"false\"\n      :class=\"{\n        [$style.input]: true,\n        [$style.slim]: isSlim,\n        [$style.low]: isLow,\n        [$style.error]: hasError,\n        [$style.centered]: isCentered,\n        [$style.disabled]: isDisabled,\n        [$style.nonSearchable]: !isSearchable,\n        [$style.compact]: isCompact,\n      }\"\n      :calculate-position=\"calculatePosition\"\n      :append-to-body=\"appendToBody || position === 'top'\"\n      @update:model-value=\"onInput($event)\"\n      @open=\"onOpen($event)\"\n      @close=\"onClose($event)\"\n      @search=\"$emit('search', $event)\"\n    >\n      <template #option=\"option\">\n        <div\n          :class=\"$style.option\"\n          :data-value=\"option[valueProp]\"\n        >\n          <slot\n            name=\"option\"\n            v-bind=\"option\"\n          >\n            <span :class=\"$style.optionLabel\">{{ option[labelProp] }}</span>\n          </slot>\n        </div>\n      </template>\n\n      <template #open-indicator=\"{attributes}\">\n        <Icon\n          v-if=\"!hasSpinner\"\n          :class=\"{\n            [$style.caret]: true,\n            [$style.slim]: isSlim,\n            [$style.open]: isOpen,\n          }\"\n          icon=\"expand_more\"\n          v-bind=\"attributes\"\n          @click=\"closeDropdownIfOpen()\"\n        />\n      </template>\n\n      <template #list-header>\n        <li><slot name=\"listHeader\" /></li>\n      </template>\n\n      <template #list-footer>\n        <li><slot name=\"listFooter\" /></li>\n      </template>\n\n      <template #no-options>\n        <div :class=\"$style.noOptions\">\n          <small text-muted>No options available</small>\n        </div>\n      </template>\n\n      <template #spinner=\"{loading}\">\n        <Spinner v-if=\"loading\" />\n      </template>\n\n      <template #selected-option-container=\"{option, deselect, multiple, disabled}\">\n        <div\n          v-if=\"multiple && showSelectionSummary\"\n          :class=\"{\n            [$style.selectedOption]: true,\n            [$style.searchable]: isSearchable,\n            [$style.hidden]: true,\n          }\"\n        >\n          {{ valueForVSelect.length }} selected\n        </div>\n        <Tag\n          v-else-if=\"multiple\"\n          :label=\"option[labelProp]\"\n          is-clearable\n          :is-disabled=\"disabled\"\n          @clear=\"deselect(option)\"\n        />\n        <div\n          v-else\n          :class=\"{\n            [$style.selectedOption]: true,\n            [$style.searchable]: isSearchable,\n            [$style.disabled]: disabled,\n          }\"\n        >\n          <slot\n            name=\"selectedOption\"\n            v-bind=\"option\"\n          >\n            {{ option[labelProp] }}\n          </slot>\n        </div>\n      </template>\n    </VSelect>\n  </InputWrapper>\n</template>\n\n<style module lang=\"scss\">\n.input {\n  display: flex;\n  align-items: center;\n  min-height: 42px !important;\n  height: auto !important;\n  width: 100%;\n  max-width: 100%;\n  padding: 0.5rem 1rem !important;\n  border-radius: var(--border-radius-m);\n  border-width: 1px;\n  border-color: var(--color-input-borders);\n  color: var(--color-input-text);\n  font-size: var(--font-size-input);\n  line-height: 24px !important;\n  background: var(--bg-input);\n  transition: box-shadow var(--transition-ease), border-color var(--transition-ease);\n  &.slim {\n    padding: 0.5rem 0.75rem 0.5rem 0.5rem !important;\n  }\n  &.compact {\n    height: var(--input-height-compact) !important;\n    min-height: var(--input-height-compact) !important;\n  }\n  &:focus {\n    outline: none;\n  }\n  &:focus:not(:disabled) {\n    border-color: var(--color-input-borders-focus);\n    box-shadow: 0 0 0 1px var(--color-input-borders-focus);\n  }\n  &.error {\n    border-color: var(--color-input-borders-error) !important;\n    box-shadow: 0 0 0 1px var(--color-input-borders-error) !important;\n    color: var(--color-input-text-error);\n    ::placeholder {\n      color: var(--color-input-text-error) !important;\n    }\n  }\n  &.disabled {\n    border-color: var(--color-input-borders-disabled);\n    box-shadow: none;\n    color: var(--color-input-text-disabled);\n    background: var(--bg-input-disabled);\n    cursor: not-allowed;\n  }\n  &.nonSearchable {\n    :global(.vs__search) {\n      display: none;\n    }\n  }\n  &.centered {\n    :global(.vs__selected-options) {\n      justify-content: center;\n    }\n  }\n  &.low {\n    :global(.vs__dropdown-menu) {\n      max-height: 120px !important;\n    }\n  }\n\n  /* For nested dropdown which isn't appended to body */\n  :global(.vs__dropdown-menu) {\n    width: 100% !important;\n    top: calc(100% + 0.5rem) !important;\n  }\n}\n.caret {\n  color: var(--color-elements);\n  cursor: pointer;\n  transition: transform var(--transition-ease);\n  margin-right: -0.25rem;\n  &.slim {\n    margin-right: -0.5rem;\n  }\n  &.open {\n    transform: rotate(180deg);\n  }\n}\n.option {\n  display: flex;\n  gap: 0.5rem;\n  align-items: center;\n  overflow: hidden;\n}\n.optionLabel {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  max-width: 100%;\n}\n.selectedOption {\n  color: var(--color-input-text);\n  font-size: 14px;\n  height: 26px;\n  line-height: 26px;\n  border-radius: var(--border-radius-s);\n  max-width: 100%;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  &.searchable {\n    max-width: calc(100% - 1rem); /* Leaves room for typing caret in the search */\n  }\n  &.disabled {\n    color: var(--color-text-disabled);\n  }\n  &.hidden:not(:first-child) {\n    display: none;\n  }\n}\n.noOptions {\n  padding: 0.25rem 0;\n}\n\n//Applied to dropdown menu when isFlexible is true\n.flexible {\n  width: fit-content;\n  max-width: min(80vw, 800px);\n}\n\n/* To overwrite styles from uxLocal.css, as we're now wrapping this component */\n/* Will want to tidy this up once all VSelects have been replaced by SelectInput */\n:global(.vs__dropdown-toggle) {\n  width: 100%;\n  min-height: 100% !important;\n  border: none !important;\n  border-radius: 0 !important;\n  background: none !important;\n  padding: 0 !important;\n  box-shadow: none !important;\n}\n:global(.vs__dropdown-menu) {\n  position: absolute;\n  width: max-content;\n  max-height: 280px !important;\n  top: 0;\n  left: 0;\n  box-shadow: 3px 3px 24px rgba(0, 0, 0, .2) !important;\n  border: none !important;\n  z-index: 9999; //Must be above dropdowns\n}\n:global(.vs__dropdown-option) {\n  border: none !important;\n  padding: 0.5rem 1rem !important;\n}\n:global(.vs__dropdown-option--disabled) {\n  background: var(--bg-item-disabled) !important;\n  color: var(--color-text-disabled) !important;\n}\n:global(.vs__dropdown-option--highlight), :global(.vs__dropdown-option--selected), :global(.vs__dropdown-option--disabled.vs__dropdown-option--highlight) {\n  background: var(--bg-highlight) !important;\n  color: var(--color-text-primary) !important;\n}\n:global(.vs__actions),\n:global(.vs__search),\n:global(.vs__search:focus) {\n  padding: 0 !important;\n}\n:global(.vs__clear) {\n  display: none;\n}\n:global(.vs__search)  {\n  outline: none !important;\n  z-index: auto !important;\n  font-size: var(--font-size-input) !important;\n  line-height: 26px !important; /* Elements jump around in height without this */\n  &:disabled {\n    background: none !important;\n  }\n}\n:global(.vs__search), :global(.vs__selected-options), :global(.vs__selected) {\n  height: 26px !important; /* Elements jump around in height without this */\n  border: none !important;\n}\n:global(.vs__selected) {\n  line-height: 26px !important; /* Elements jump around in height without this */\n}\n:global(.vs__selected-options) {\n  display: flex;\n  flex-wrap: nowrap;\n  gap: 0.25rem;\n  padding: 0;\n  min-height: 26px !important;\n  height: auto !important;\n  overflow: hidden;\n}\n</style>\n","<script setup>\nimport Tag from '@/components/shared/core/Tag.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport PillButton from '@/components/shared/form/PillButton.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {ref, toRefs, computed, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  label: {\n    type: String,\n    default: '',\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  selectedOptionIds: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Refs\nconst {selectedOptionIds, options} = toRefs(props)\nconst numSelectedOptions = computed(() => selectedOptionIds.value.length)\nconst selectedOptions = computed(() => {\n  return (options.value || [])\n    .filter(option => selectedOptionIds.value.includes(option.value))\n})\nconst firstSelectedOption = computed(() => {\n  if (selectedOptions.value.length === 0) {\n    return null\n  }\n  return selectedOptions.value[0]\n})\n\n//Selected option handling\nconst emitSelectedOptions = ids => emit('input', {value: ids})\nconst clearSelectedOptions = () => emitSelectedOptions([])\nconst removeSelectedOption = removeId => {\n  emitSelectedOptions(selectedOptionIds.value.filter(id => id !== removeId))\n}\n\n//All selected options toggle\nconst analyticsFilter = ref(null)\nconst dropdownPanel = ref(null)\nconst {\n  isVisible: isShowingAllSelectedOptions,\n  hide: hideAllSelectedOptions,\n  show: showAllSelectedOptions,\n} = useVisibilityToggle(analyticsFilter, dropdownPanel)\n\n//Hide automatically when we no longer have any selected options\nwatch(numSelectedOptions, () => {\n  if (numSelectedOptions.value === 0) {\n    hideAllSelectedOptions()\n  }\n})\n</script>\n\n<template>\n  <div\n    ref=\"analyticsFilter\"\n    :class=\"$style.wrapper\"\n  >\n    <div :class=\"$style.header\">\n      <label>{{ label }}</label>\n      <PillButton\n        v-if=\"numSelectedOptions > 0\"\n        :label=\"numSelectedOptions\"\n        is-clearable\n        is-selected\n        is-small\n        @clear=\"clearSelectedOptions()\"\n      />\n    </div>\n    <SelectInput\n      :value=\"selectedOptionIds\"\n      :options=\"options\"\n      is-multi-select\n      is-flexible\n      show-selection-summary\n      @input=\"emitSelectedOptions($event.value)\"\n      @open=\"hideAllSelectedOptions()\"\n    />\n    <div :class=\"$style.tags\">\n      <Tag\n        v-if=\"firstSelectedOption\"\n        :class=\"$style.tag\"\n        :label=\"firstSelectedOption.label\"\n        is-clearable\n        @clear=\"removeSelectedOption(firstSelectedOption.value)\"\n      />\n      <span\n        v-if=\"isShowingAllSelectedOptions\"\n        :class=\"$style.more\"\n        @click=\"hideAllSelectedOptions()\"\n      >close</span>\n      <span\n        v-else-if=\"numSelectedOptions > 1\"\n        :class=\"$style.more\"\n        @click=\"showAllSelectedOptions()\"\n      >+{{ numSelectedOptions - 1 }} more</span>\n\n      <DropdownPanel\n        ref=\"dropdownPanel\"\n        :is-visible=\"isShowingAllSelectedOptions\"\n        :class=\"$style.dropdown\"\n      >\n        <Tag\n          v-for=\"option in selectedOptions\"\n          :key=\"option.value\"\n          :class=\"$style.dropdownTag\"\n          :label=\"option.label\"\n          :line-clamp=\"2\"\n          is-clearable\n          @clear=\"removeSelectedOption(option.value)\"\n        />\n\n        <ActionButton\n          label=\"Clear filter\"\n          type=\"text\"\n          icon=\"close\"\n          :class=\"$style.clearFilterButton\"\n          @click=\"clearSelectedOptions()\"\n        />\n      </DropdownPanel>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  position: relative;\n  border: 1px solid var(--color-borders);\n  padding: 0.75rem;\n  border-radius: var(--border-radius-m);\n}\n.header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 1rem;\n  margin-bottom: 0.75rem;\n}\n.optionLabel {\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n}\n.tags {\n  margin-top: 1rem;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 1rem;\n}\n.tag {\n  flex-grow: 0;\n  overflow: hidden; /* To prevent flex child from growing beyond the parent */\n}\n.more {\n  flex: 0 0 60px;\n  cursor: pointer;\n  font-size: 14px;\n  text-decoration: underline;\n}\n.dropdown {\n  width: calc(100% + 2px);\n  margin-left: -1px;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n}\n.dropdownTag {\n  margin-bottom: 0.5rem;\n}\n.clearFilterButton {\n  margin-bottom: -0.5rem;\n}\n</style>\n","<script setup>\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport FiltersButton from '@/components/shared/buttons/FiltersButton.vue'\nimport TransitionSlideIn from '@/components/shared/transitions/TransitionSlideIn.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'clear',\n])\nconst props = defineProps({\n  buttonLabel: {\n    type: String,\n    default: 'Filters',\n  },\n  clearLabel: {\n    type: String,\n    default: 'Clear filters',\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n  canClear: {\n    type: Boolean,\n    default: true,\n  },\n  visibilityIgnoreRefs: {\n    type: Array,\n    default: () => [],\n  },\n  testId: {\n    type: String,\n    default: 'filtersDropdown',\n  },\n})\n\n//Get props\nconst {visibilityIgnoreRefs} = toRefs(props)\n\n//Filters dropdown toggling\nconst filtersPanel = ref(null)\nconst filtersToggle = ref(null)\nconst {\n  isVisible,\n  toggle,\n} = useVisibilityToggle(filtersPanel, [\n  filtersToggle,\n  ...visibilityIgnoreRefs.value,\n])\n</script>\n\n<template>\n  <DropdownWrapper :class=\"$style.wrapper\">\n    <FiltersButton\n      ref=\"filtersToggle\"\n      class=\"filtersToggle\"\n      :label=\"buttonLabel\"\n      :is-showing-filters=\"isVisible\"\n      :num-active-filters=\"numActiveFilters\"\n      :test-id=\"`${testId}Toggle`\"\n      @click=\"toggle()\"\n    />\n\n    <TransitionSlideIn>\n      <div\n        v-if=\"numActiveFilters > 0 && canClear\"\n        :class=\"$style.clearFilters\"\n      >\n        <ActionButton\n          :label=\"clearLabel\"\n          type=\"text\"\n          icon=\"close\"\n          icon-size=\"s\"\n          :test-id=\"`${testId}ClearButton`\"\n          @click.stop=\"$emit('clear')\"\n        />\n      </div>\n    </TransitionSlideIn>\n\n    <DropdownPanel\n      v-bind=\"$attrs\"\n      ref=\"filtersPanel\"\n      :is-visible=\"isVisible\"\n      :test-id=\"testId\"\n      :class=\"$style.dropdown\"\n    >\n      <slot />\n    </DropdownPanel>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  display: flex;\n  align-items: center;\n}\n.dropdown {\n  width: max-content;\n  min-width: 360px;\n  max-width: 40vw;\n}\n.toggle {\n  position: relative;\n  cursor: pointer;\n  border: 1px solid #cbcbd9 !important;\n  font-size: 14px;\n  height: 36px;\n  text-transform: inherit;\n  border-radius: var(--border-radius-m);\n  font-weight: 500;\n  padding: 0 15px 0 0;\n  line-height: 1.7;\n  outline: none;\n}\n.count {\n  position: absolute;\n  height: 17px;\n  width: 17px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: 50%;\n  color: #fff;\n  background-color: #333;\n  font-size: var(--font-size-xxs);\n  right: -8px;\n  top: -8px;\n}\n.clearFilters {\n  margin-left: 1rem;\n  display: flex;\n}\n</style>\n\n<style>\n.clear-filter-enter-active, .clear-filter-leave-active {\n  transition: all .1s cubic-bezier(0.25, 0.25, 0.75, 0.75) 0s;\n}\n.clear-filter-enter-from, .clear-filter-leave-to,\n.clear-filter-enter /* VUE 2 */ {\n  transform: translateX(5px) translateY(-5px);\n  opacity: 0;\n}\n</style>\n","<script setup>\nimport InputList from '@/components/shared/form/InputList.vue'\nimport PillButton from '@/components/shared/form/PillButton.vue'\nimport {toggleValueInArray} from '@/helpers/array.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  value: {\n    type: [String, Number, Boolean, Array],\n    default: null,\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  isMultiSelect: {\n    type: Boolean,\n    default: false,\n  },\n  isLarge: {\n    type: Boolean,\n    default: false,\n  },\n  canReset: {\n    type: Boolean,\n    default: false,\n  },\n  resetValue: {\n    type: [String, Number, Boolean],\n    default: null,\n  },\n  resetLabel: {\n    type: String,\n    default: 'Any',\n  },\n  labelProp: {\n    type: String,\n    default: 'label',\n  },\n  valueProp: {\n    type: String,\n    default: 'value',\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n})\n\n//Get refs\nconst {value, isMultiSelect, resetValue} = toRefs(props)\n\n//Emit new value\nconst emitValue = value => emit('input', {value})\n\n//Toggle value\nconst toggleValue = optionValue => {\n  if (isMultiSelect.value) {\n    const newValue = toggleValueInArray(value.value, optionValue)\n    emitValue(newValue)\n  }\n  else {\n    emitValue(optionValue)\n  }\n}\n\n//Clear value to the reset value\nconst clearValue = () => {\n  if (isMultiSelect.value) {\n    emitValue([])\n  }\n  else {\n    emitValue(resetValue.value)\n  }\n}\n\n//Check if a value is selected\nconst isSelected = optionValue => {\n  if (isMultiSelect.value) {\n    if (!Array.isArray(value.value)) {\n      return false\n    }\n    return value.value.includes(optionValue)\n  }\n  else {\n    return value.value === optionValue\n  }\n}\n\n//Check if\nconst isCleared = () => {\n  if (isMultiSelect.value) {\n    if (!Array.isArray(value.value)) {\n      return true\n    }\n    return value.value.length === 0\n  }\n  else {\n    return value.value === resetValue.value\n  }\n}\n</script>\n\n<template>\n  <InputList\n    v-bind=\"$attrs\"\n    is-inline\n  >\n    <PillButton\n      v-if=\"canReset\"\n      test-id=\"pillButtonReset\"\n      :label=\"resetLabel\"\n      :is-large=\"isLarge\"\n      :is-selected=\"isCleared()\"\n      @click=\"clearValue()\"\n    />\n    <PillButton\n      v-for=\"option in options\"\n      :key=\"option[valueProp]\"\n      :test-id=\"testId ? `pillButton_${testId}_${option[valueProp]}` : undefined\"\n      :is-large=\"isLarge\"\n      :is-selected=\"isSelected(option[valueProp])\"\n      @click=\"toggleValue(option[valueProp])\"\n    >\n      <slot\n        name=\"label\"\n        :option=\"option\"\n      >\n        {{ option[labelProp] }}\n      </slot>\n    </PillButton>\n  </InputList>\n</template>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\ndefineProps({\n  value: {\n    type: Array,\n    required: true,\n  },\n  canReset: {\n    type: Boolean,\n    default: true,\n  },\n  isMultiSelect: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Available options\nconst {availableAddressTypeOptions} = useCurrentOrganization()\n</script>\n\n<template>\n  <FormField label=\"Delivery methods\">\n    <PillButtonList\n      :value=\"value\"\n      :options=\"availableAddressTypeOptions\"\n      :can-reset=\"canReset\"\n      :is-multi-select=\"isMultiSelect\"\n      test-id=\"deliveryMethodsFilter\"\n      v-bind=\"$attrs\"\n      @input=\"$emit('input', $event)\"\n    />\n  </FormField>\n</template>\n","<script setup>\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  label: {\n    type: String,\n    default: '',\n  },\n  isChecked: {\n    type: Boolean,\n    default: false,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  subLabel: {\n    type: String,\n    default: '',\n  },\n  testId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Get refs\nconst {isDisabled} = toRefs(props)\n\n//Methods\nconst handleClick = (event) => {\n  if (!isDisabled.value) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <label\n    :test-id=\"testId\"\n    :is-checked=\"isChecked\"\n    :class=\"$style.wrapper\"\n    :is-clickable=\"!isDisabled\"\n    :is-disabled=\"isDisabled\"\n    @click=\"handleClick($event)\"\n  >\n    <slot\n      name=\"icon\"\n      :is-checked=\"isChecked\"\n      :is-disabled=\"isDisabled\"\n    />\n    <div\n      :class=\"$style.text\"\n      :text-muted=\"isDisabled\"\n      hide-empty\n    >\n      <span hide-empty>\n        <slot>{{ label }}</slot>\n      </span>\n      <small\n        text-muted\n        hide-empty\n      >\n        <slot name=\"subLabel\">{{ subLabel }}</slot>\n      </small>\n    </div>\n  </label>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.5rem;\n  padding: 0.25rem 0;\n  margin: 0;\n  opacity: 1;\n}\n.text {\n  display: flex;\n  flex-direction: column;\n}\n</style>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Channel model\n */\nexport class Channel extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'share'\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Channel} from '@/models/channel.model.js'\n\n/**\n * Read channels API service\n */\nexport class CommonChannelsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/common/channels'\n  itemKey = 'channel'\n  itemsKey = 'channels'\n  ModelClass = Channel\n}\n\n//Export singleton instance\nexport const commonChannelsApi = new CommonChannelsApi()\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport DeliveryMethodsFilter from '@/components/shared/filters/DeliveryMethodsFilter.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {commonChannelsApi} from '@/api/common-channels.api.js'\nimport {convertToOptions} from '@/helpers/options.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'changed-address-types',\n  'changed-channels',\n  'changed-course-type',\n  'changed-exclude-admins',\n  'changed-exclude-disabled-schedules',\n  'changed-exclude-deleted-schedules',\n  'clear-all',\n])\nconst props = defineProps({\n  selectedAddressTypes: {\n    type: Array,\n    default: () => [],\n  },\n  selectedCourseType: {\n    type: Boolean,\n    default: null,\n  },\n  selectedChannels: {\n    type: Array,\n    default: () => [],\n  },\n  excludeDisabledSchedules: {\n    type: Boolean,\n    default: false,\n  },\n  excludeDeletedSchedules: {\n    type: Boolean,\n    default: false,\n  },\n  excludeAdmins: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get props\nconst {\n  selectedAddressTypes,\n  selectedCourseType,\n  selectedChannels,\n  excludeDisabledSchedules,\n  excludeDeletedSchedules,\n  excludeAdmins,\n} = toRefs(props)\n\n//Load channels\nconst channelOptions = ref([])\nconst loadChannels = async () => {\n  const data = await commonChannelsApi.query()\n  channelOptions.value = convertToOptions(data.channels)\n}\n\n//Load channels now\nloadChannels()\n\n//Course type options\nconst courseTypeOptions = [\n  {label: 'Courses', value: false},\n  {label: 'Nudges', value: true},\n]\n\n//Number of active filters\nconst numActiveFilters = computed(() => (\n  (selectedAddressTypes.value.length > 0 ? 1 : 0) +\n  (selectedChannels.value.length > 0 ? 1 : 0) +\n  (selectedCourseType.value === null ? 0 : 1) +\n  (excludeDisabledSchedules.value ? 1 : 0) +\n  (excludeDeletedSchedules.value ? 1 : 0) +\n  (excludeAdmins.value ? 1 : 0)\n))\n\n//Filter toggles\nconst toggleAddressTypes = value => emit('changed-address-types', {value})\nconst toggleChannels = value => emit('changed-channels', {value})\nconst toggleCourseType = value => emit('changed-course-type', {value})\nconst toggleExcludeAdmins = value => emit('changed-exclude-admins', {value})\nconst toggleExcludeDisabledSchedules = value => emit('changed-exclude-disabled-schedules', {value})\nconst toggleExcludeDeletedSchedules = value => emit('changed-exclude-deleted-schedules', {value})\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    button-label=\"Advanced filters\"\n    clear-label=\"Clear advanced filters\"\n    @clear=\"$emit('clear-all')\"\n  >\n    <DeliveryMethodsFilter\n      :value=\"selectedAddressTypes\"\n      @input=\"toggleAddressTypes($event.value)\"\n    />\n\n    <FormField\n      v-if=\"channelOptions.length > 0\"\n      label=\"Channels\"\n    >\n      <PillButtonList\n        :value=\"selectedChannels\"\n        :options=\"channelOptions\"\n        is-multi-select\n        can-reset\n        @input=\"toggleChannels($event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Course type\">\n      <PillButtonList\n        :value=\"selectedCourseType\"\n        :options=\"courseTypeOptions\"\n        can-reset\n        @input=\"toggleCourseType($event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Schedule status\">\n      <Toggle\n        label=\"Exclude disabled\"\n        :is-checked=\"excludeDisabledSchedules\"\n        @click=\"toggleExcludeDisabledSchedules(!excludeDisabledSchedules)\"\n      />\n      <Toggle\n        label=\"Exclude deleted\"\n        :is-checked=\"excludeDeletedSchedules\"\n        @click=\"toggleExcludeDeletedSchedules(!excludeDeletedSchedules)\"\n      />\n    </FormField>\n\n    <FormField label=\"User type\">\n      <Toggle\n        label=\"Exclude admins\"\n        :is-checked=\"excludeAdmins\"\n        @click=\"toggleExcludeAdmins(!excludeAdmins)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","<script setup>\nimport StatusDot from '@/components/shared/core/StatusDot.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  label: {\n    type: String,\n    default: '',\n  },\n  value: {\n    type: [String, Number],\n    default: '',\n  },\n  subValue: {\n    type: String,\n    default: '',\n  },\n  status: {\n    type: String,\n    default: '',\n  },\n  help: {\n    type: String,\n    default: '',\n  },\n  isMuted: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  isClickable: {\n    type: Boolean,\n    default: false,\n  },\n  isCentered: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get props\nconst {isClickable} = toRefs(props)\n\n//Methods\nconst handleClick = (event) => {\n  if (isClickable.value) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    v-bind=\"$attrs\"\n    :class=\"{\n      [$style.card]: true,\n      [$style.clickable]: isClickable,\n      [$style.centered]: isCentered,\n    }\"\n    @click=\"handleClick($event)\"\n  >\n    <header\n      v-if=\"label\"\n      :class=\"$style.header\"\n    >\n      <slot name=\"label\">\n        <StatusDot\n          v-if=\"status\"\n          :status=\"status\"\n          size=\"s\"\n        />\n        <small\n          :class=\"$style.label\"\n          text-muted\n        >{{ label }}</small>\n        <Help\n          v-if=\"help\"\n          :text=\"help\"\n          position=\"top\"\n          is-compact\n        />\n      </slot>\n    </header>\n    <div :class=\"$style.main\">\n      <div\n        :class=\"{\n          [$style.value]: true,\n          [$style.compact]: isCompact,\n        }\"\n        :text-muted=\"isMuted\"\n      >\n        <slot>{{ value }}</slot>\n      </div>\n      <aside>\n        <slot name=\"aside\" />\n      </aside>\n    </div>\n    <small\n      text-muted\n      hide-empty\n    >\n      <slot name=\"subValue\">\n        {{ subValue }}\n      </slot>\n    </small>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.card {\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n  padding: 1rem;\n  border: 1px solid var(--color-borders);\n  border-radius: var(--border-radius-m);\n  background: var(--color-white);\n  &.clickable {\n    cursor: pointer;\n  }\n  &.centered {\n    align-items: center;\n  }\n}\n.header {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n.label {\n  text-transform: uppercase;\n}\n.main {\n  display: flex;\n  align-items: flex-end;\n  justify-content: space-between;\n  gap: 1rem;\n}\n.value {\n  font-size: var(--font-size-xxl);\n  line-height: 2rem;\n  &.compact {\n    font-size: var(--font-size-l);\n    font-weight: var(--font-weight-bold);\n  }\n}\n</style>\n","\n//Format number\nexport function formatNumber(number, options) {\n\n  //Empty input\n  if (number === null || number === undefined || isNaN(number)) {\n    return ''\n  }\n\n  //Sanitize input\n  if (number === Infinity || number === -Infinity) {\n    number = 0\n  }\n\n  //Default config\n  const defaults = {\n    useGrouping: true,\n    maximumFractionDigits: 2,\n  }\n\n  //Merge options and create formatter\n  options = Object.assign({}, defaults, options)\n  const formatter = new Intl.NumberFormat('en-US', options)\n\n  //Format number\n  return formatter.format(number)\n}\n\n//Format percentage\nexport function formatPercentage(fraction, options) {\n\n  //Empty input\n  if (fraction === null || fraction === undefined || isNaN(fraction)) {\n    return ''\n  }\n\n  //Sanitize input\n  if (fraction === Infinity || fraction === -Infinity) {\n    fraction = 0\n  }\n\n  //Default config\n  const defaults = {\n    useGrouping: true,\n    maximumFractionDigits: 0,\n  }\n\n  //Merge options and get formatted number\n  options = Object.assign({}, defaults, options)\n  const formatted = formatNumber(fraction * 100, options)\n\n  //Append percentage\n  return `${formatted}%`\n}\n","<script setup>\nimport {computed, toRefs} from 'vue'\nimport {formatPercentage} from '@/helpers/numbers.js'\n\n//Props\nconst props = defineProps({\n  fraction: {\n    type: Number,\n    default: null,\n  },\n  options: {\n    type: Object,\n    default: () => ({}),\n  },\n  emptyLabel: {\n    type: String,\n    default: '',\n  },\n})\n\n//Refs\nconst {fraction, options} = toRefs(props)\nconst isEmpty = computed(() => fraction.value === null || fraction.value === undefined || isNaN(fraction.value))\nconst percentage = computed(() => formatPercentage(fraction.value, options.value))\n</script>\n\n<template>\n  <span v-bind=\"$attrs\">{{ isEmpty ? emptyLabel : percentage }}</span>\n</template>\n","<script setup>\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\ndefineProps({\n  insights: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Settings\nconst {\n  isNpsSurveyEnabled,\n  isConfidenceLiftEnabled,\n  isLearnerSentimentEnabled,\n} = useCurrentOrganization()\n</script>\n<template>\n  <InfoCardsGrid\n    test-id=\"insightsGrid\"\n    :class=\"$style.insights\"\n    :cols=\"4\"\n  >\n    <InfoCard\n      label=\"Completion rate\"\n      help=\"Shows the percentage of enrolled learners who have completed their entire course or nudge.\"\n    >\n      <Percentage\n        :fraction=\"insights.completionRate\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      label=\"Progress rate\"\n      help=\"Indicates the overall progress of selected learners through their courses, averaged across all lessons.\"\n    >\n      <Percentage\n        :fraction=\"insights.progressRate\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      label=\"Answer accuracy\"\n      help=\"Reflects the correctness of learners' responses to questions with predefined correct answers.\"\n    >\n      <Percentage\n        :fraction=\"insights.answerAccuracy\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      label=\"Reply rate\"\n      help=\"The percentage of questions that received at least one response. (Calculated as: Questions with accepted responses ÷ Total questions asked)\"\n    >\n      <Percentage\n        :fraction=\"insights.replyRate\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      label=\"Drop-off rate\"\n      help=\"The percentage of learners who stop progressing at any point in a course due to stopping, pausing, opting out, or encountering an error.\"\n    >\n      <Percentage\n        :fraction=\"insights.dropOffRate\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      label=\"Engagement Rate\"\n      help=\"The percentage of learners who responded to at least one question. (Calculated as: Learners who responded ÷ Total number of learners who received questions)\"\n    >\n      <Percentage\n        :fraction=\"insights.engagementRate\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n    </InfoCard>\n    <InfoCard\n      v-if=\"isConfidenceLiftEnabled\"\n      label=\"Confidence lift\"\n      help=\"The average increase in learner confidence from the start to the end of a course, a key indicator of potential behavior change.\"\n    >\n      <Percentage\n        :fraction=\"insights.confidenceLift / 100\"\n        :options=\"{maximumFractionDigits: 1}\"\n        empty-label=\"N/A\"\n      />\n      <Icon\n        v-if=\"insights.confidenceLift > 0\"\n        icon=\"north\"\n        color=\"success\"\n      />\n      <Icon\n        v-else-if=\"insights.confidenceLift < 0\"\n        icon=\"south\"\n        color=\"danger\"\n      />\n    </InfoCard>\n    <InfoCard\n      v-if=\"isNpsSurveyEnabled\"\n      label=\"Learner NPS\"\n      help=\"Presents the average Net Promoter Score from learner feedback, indicating their likelihood to recommend the course.\"\n    >\n      {{ insights.npsScore || 'N/A' }}\n    </InfoCard>\n    <InfoCard\n      v-if=\"isLearnerSentimentEnabled\"\n      label=\"Learner sentiment\"\n      help=\"Reveals learners' likelihood to recommend their courses to colleagues, with higher scores suggesting better engagement potential.\"\n    >\n      {{ insights.learnerSentiment || 'N/A' }}\n    </InfoCard>\n    <InfoCard\n      label=\"In progress\"\n      help=\"Counts all learners currently enrolled in training, courses, or nudges, as per your selection.\"\n    >\n      {{ insights.numInProgress || 0 }}\n    </InfoCard>\n  </InfoCardsGrid>\n</template>\n\n<style module lang=\"scss\">\n.insights {\n  margin-bottom: 3rem;\n}\n</style>\n","<template>\n  <div\n    :class=\"$style.table\"\n    v-bind=\"$attrs\"\n  >\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.table {\n  position: relative;\n}\n</style>\n","<script setup>\nimport {ref} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'click',\n])\ndefineProps({\n  isHeader: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Hover flag\nconst hover = ref(false)\n</script>\n\n<template>\n  <div :class=\"$style.container\">\n    <div\n      :class=\"{\n        [$style.row]: true,\n        [$style.header]: isHeader,\n      }\"\n      @mouseenter=\"hover = true\"\n      @mouseleave=\"hover = false\"\n      @click=\"$emit('click', $event)\"\n    >\n      <slot :hover=\"hover\" />\n    </div>\n    <div :class=\"$style.expandedContent\">\n      <slot name=\"expandedContent\" />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n}\n\n.row {\n  display: flex;\n  padding: 0.75rem 0.5rem;\n  background-color: transparent;\n  transition: background-color ease-in-out .2s;\n  min-width: 100%;\n  color: inherit;\n  border-bottom: 1px solid var(--color-borders-light);\n  &:not(.header) {\n    &:hover {\n      background-color: var(--bg-panels);\n    }\n  }\n  &:last-child {\n    border-bottom: none;\n  }\n}\n\n.expandedContent {\n  display: flex;\n  flex-direction: column;\n}\n</style>\n","<script setup>\nimport {toRefs} from 'vue'\n\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  isClickable: {\n    type: Boolean,\n    default: false,\n  },\n  isColumn: {\n    type: Boolean,\n    default: false,\n  },\n  justify: {\n    type: String,\n    default: 'start',\n  },\n  alignItems: {\n    type: String,\n    default: 'center',\n  },\n})\n\n//Get refs\nconst {isClickable} = toRefs(props)\n\n//Handle click event\nconst handleClick = event => {\n  if (isClickable.value) {\n    emit('click', event)\n  }\n}\n</script>\n<template>\n  <div\n    :class=\"{\n      [$style.cell]: true,\n      [$style.clickable]: isClickable,\n      [$style[`justify-${justify}`]]: !!justify,\n      [$style[`align-${alignItems}`]]: !!alignItems,\n    }\"\n    @click=\"handleClick($event)\"\n  >\n    <div\n      :class=\"{\n        [$style.contents]: true,\n        [$style.column]: isColumn,\n      }\"\n    >\n      <slot />\n      <div\n        v-if=\"$slots.icons\"\n        :class=\"$style.icons\"\n      >\n        <slot name=\"icons\" />\n      </div>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.cell {\n  display: flex;\n  flex: 1 0 4rem;\n  min-width: 4rem;\n  transition: background-color .1s ease;\n  &:not(:last-child) {\n    padding-right: 1rem;\n  }\n  &.justify-start {\n    justify-content: flex-start;\n  }\n  &.justify-center {\n    justify-content: center;\n  }\n  &.justify-end {\n    justify-content: flex-end;\n  }\n  &.align-start {\n    align-items: flex-start;\n  }\n  &.align-center {\n    align-items: center;\n  }\n\n  &.clickable {\n    cursor: pointer;\n  }\n}\n.contents {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  width: 100%;\n  &.column {\n    flex-direction: column;\n    align-items: flex-start;\n    gap: 0.25rem;\n  }\n}\n.icons {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.25rem;\n  color: var(--light-gray);\n}\n</style>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'sort',\n])\nconst props = defineProps({\n  prop: {\n    type: String,\n    required: true,\n  },\n  currentSort: {\n    type: String,\n    default: '',\n  },\n  defaultDirection: {\n    type: String,\n    default: '',\n  },\n})\n\n//Refs\nconst {currentSort, prop, defaultDirection} = toRefs(props)\n\n//Computed props\nconst isActive = computed(() => currentSort.value.replace(/^-/, '') === prop.value)\nconst isDesc = computed(() => currentSort.value.match(/^-/))\n\n//Get direction\nconst getDir = () => {\n  if (!isActive.value) {\n    return defaultDirection.value\n  }\n  return isDesc.value ? '' : '-'\n}\n\n//Toggle\nconst toggle = () => {\n  const dir = getDir()\n  const sort = prop.value\n    .split(',')\n    .map(p => `${dir}${p}`)\n    .join(',')\n  emit('sort', {sort})\n}\n</script>\n\n<template>\n  <span\n    :class=\"$style.sort\"\n    @click=\"toggle()\"\n  >\n    <span>\n      <slot />\n    </span>\n    <Icon\n      v-if=\"isActive\"\n      icon=\"keyboard_arrow_up\"\n      size=\"s\"\n      :class=\"{\n        [$style.icon]: true,\n        [$style.desc]: isDesc,\n      }\"\n    />\n  </span>\n</template>\n\n<style module lang=\"scss\">\n.sort {\n  cursor: pointer;\n  display: flex;\n  white-space: normal;\n  align-items: center;\n}\n.icon {\n  transition: transform var(--transition-ease);\n  &.desc {\n    transform: rotate(180deg);\n  }\n}\n</style>\n","<script setup>\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport CountIndicator from '@/components/shared/core/CountIndicator.vue'\nimport {arraySequence} from '@/helpers/array.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'view-page',\n  'change-items-per-page',\n])\nconst props = defineProps({\n  currentPage: {\n    type: Number,\n    default: 1,\n  },\n  itemsPerPage: {\n    type: Number,\n    default: 25,\n  },\n  totalItems: {\n    type: Number,\n    default: 0,\n  },\n  maxPages: {\n    type: Number,\n    default: 10,\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n  showItemsPerPage: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Determine the number of pages\nconst {totalItems, itemsPerPage, maxPages} = toRefs(props)\nconst numPages = computed(() => Math.ceil(totalItems.value / itemsPerPage.value))\nconst pages = computed(() => arraySequence(1, numPages.value))\n</script>\n\n<template>\n  <div\n    v-if=\"totalItems > 0\"\n    :class=\"$style.container\"\n  >\n    <div :class=\"$style.paginator\">\n      <template v-if=\"numPages > maxPages\">\n        <span>Page</span>\n        <SelectInput\n          :class=\"$style.selector\"\n          :options=\"pages\"\n          :value=\"currentPage\"\n          :is-searchable=\"false\"\n          :is-clearable=\"false\"\n          :is-disabled=\"isLoading\"\n          position=\"top\"\n          is-centered\n          is-slim\n          @input=\"$emit('view-page', {page: $event.value})\"\n        />\n        <span>of {{ numPages }}</span>\n      </template>\n      <template v-else-if=\"numPages > 1\">\n        <ActionButton\n          :class=\"$style.button\"\n          icon=\"chevron_left\"\n          type=\"text\"\n          :is-disabled=\"currentPage === 1 || isLoading\"\n          @click=\"$emit('view-page', {page: currentPage - 1})\"\n        />\n        <CountIndicator\n          v-for=\"page in pages\"\n          :key=\"page\"\n          :count=\"page\"\n          :is-active=\"currentPage === page\"\n          is-large\n          :is-clickable=\"currentPage !== page && !isLoading\"\n          @click=\"$emit('view-page', {page})\"\n        />\n        <ActionButton\n          :class=\"$style.button\"\n          icon=\"chevron_right\"\n          type=\"text\"\n          :is-disabled=\"currentPage === numPages || isLoading\"\n          @click=\"$emit('view-page', {page: currentPage + 1})\"\n        />\n      </template>\n      <div v-else />\n    </div>\n    <div\n      v-if=\"showItemsPerPage\"\n      :class=\"$style.itemsPerPage\"\n    >\n      <span>Show</span>\n      <SelectInput\n        :class=\"$style.selector\"\n        :options=\"[10, 25, 50, 100]\"\n        :value=\"itemsPerPage\"\n        :is-searchable=\"false\"\n        :is-clearable=\"false\"\n        :is-disabled=\"isLoading\"\n        position=\"top\"\n        is-slim\n        @input=\"$emit('change-items-per-page', {itemsPerPage: $event.value})\"\n      />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  margin-top: 1rem;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 1rem;\n}\n.paginator {\n  flex: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 0.5rem;\n}\n.itemsPerPage {\n  flex: 0 0 7rem;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  gap: 0.5rem;\n}\n.button {\n  margin-top: 1px;\n}\n.selector {\n  flex: 0 0 4rem;\n}\n</style>\n","import {computed} from 'vue'\n\n/**\n * Use item selection composable\n */\nexport function useItemSelection(items, selectedItems) {\n\n  //Refs\n  const numSelectedItems = computed(() => selectedItems.value.length)\n  const hasSelectedItems = computed(() => selectedItems.value.length > 0)\n  const hasSelectedAllItems = computed(() => {\n\n    //Basic check\n    if (!hasSelectedItems.value || selectedItems.value.length !== items.value.length) {\n      return false\n    }\n\n    //Items check\n    return items.value.every(item => isItemSelected(item))\n  })\n\n  //Check if an item is selected\n  const isItemSelected = item => {\n\n    //Check by ID\n    if (typeof item === 'object' && item.id) {\n      return selectedItems.value.some(other => other.id === item.id)\n    }\n\n    //Check by item equality\n    return selectedItems.value.includes(item)\n  }\n\n  //Selection of a single item\n  const selectItem = item => {\n    if (!isItemSelected(item)) {\n      selectedItems.value = [...selectedItems.value, item]\n    }\n  }\n  const unselectItem = item => {\n    if (isItemSelected(item)) {\n      selectedItems.value = selectedItems.value.filter(selectedItem => selectedItem !== item)\n    }\n  }\n  const toggleItem = item => {\n    if (isItemSelected(item)) {\n      unselectItem(item)\n    }\n    else {\n      selectItem(item)\n    }\n  }\n\n  //Selection of all items\n  const selectAllItems = () => selectedItems.value = items.value.map(item => item)\n  const unselectAllItems = () => selectedItems.value = []\n  const toggleAllItems = () => {\n    if (hasSelectedAllItems.value) {\n      unselectAllItems()\n    }\n    else {\n      selectAllItems()\n    }\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    numSelectedItems,\n    hasSelectedItems,\n    hasSelectedAllItems,\n\n    //Methods\n    selectItem,\n    unselectItem,\n    toggleItem,\n    isItemSelected,\n    selectAllItems,\n    unselectAllItems,\n    toggleAllItems,\n  }\n}\n","<script setup>\nimport TableBody from '@/components/shared/table/TableBody.vue'\nimport TableRow from '@/components/shared/table/TableRow.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport Pagination from '@/components/shared/table/Pagination.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {toRefs, computed, useSlots, reactive} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'toggle-item',\n  'toggle-all-items',\n  'load-page',\n  'change-items-per-page',\n  'toggle-expand',\n])\nconst props = defineProps({\n  items: {\n    type: Array,\n    default: () => [],\n  },\n  selectedItems: {\n    type: Array,\n    default: () => [],\n  },\n  canSelectItems: {\n    type: Boolean,\n    default: false,\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n  showPagination: {\n    type: Boolean,\n    default: true,\n  },\n  canExpand: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: 'overviewTable',\n  },\n})\n\n// Expansion tracking\nconst expandedItems = reactive(new Set())\nconst toggleExpand = (itemId) => {\n  expandedItems.has(itemId) ? expandedItems.delete(itemId) :  expandedItems.add(itemId)\n  emit('toggle-expand', {itemId, isExpanded: expandedItems.has(itemId)})\n}\n\n//Using slots programmatically because for some reason the Vue template does not\n//detect $slots.itemActions. Maybe this is fixed in Vue 3.\nconst slots = useSlots()\nconst hasItemActions = computed(() => !!slots.itemActions)\n\n//Item selection\nconst {items, selectedItems} = toRefs(props)\nconst {\n  isItemSelected,\n  hasSelectedAllItems,\n} = useItemSelection(items, selectedItems)\n\n//Item toggling\nconst toggleAllItems = () => emit('toggle-all-items')\nconst toggleItem = item => emit('toggle-item', {item})\n</script>\n\n<template>\n  <TableBody :test-id=\"testId\">\n    <TableRow\n      v-if=\"$slots.headerRow && items.length > 0\"\n      is-header\n    >\n      <TableHeaderCell\n        v-if=\"canSelectItems\"\n        :class=\"$style.icon\"\n      >\n        <CheckBox\n          :is-checked=\"hasSelectedAllItems\"\n          @click=\"toggleAllItems()\"\n        />\n      </TableHeaderCell>\n      <TableHeaderCell\n        v-if=\"canExpand\"\n        :class=\"$style.icon\"\n      />\n      <slot name=\"headerRow\" />\n      <TableHeaderCell\n        v-if=\"hasItemActions\"\n        :class=\"$style.icon\"\n      >\n        &nbsp;\n      </TableHeaderCell>\n    </TableRow>\n    <TableRow\n      v-for=\"(item, index) in items\"\n      :key=\"item.id || index\"\n    >\n      <template #default=\"{hover}\">\n        <TableCell\n          v-if=\"canSelectItems\"\n          :class=\"$style.icon\"\n        >\n          <CheckBox\n            :is-checked=\"isItemSelected(item)\"\n            @click=\"toggleItem(item)\"\n          />\n        </TableCell>\n        <TableCell\n          v-if=\"canExpand\"\n          :class=\"$style.icon\"\n          is-clickable\n          @click=\"toggleExpand(item.id || index)\"\n        >\n          <Icon\n            :icon=\"expandedItems.has(item.id || index) ? 'expand_less' : 'expand_more'\"\n            color=\"muted\"\n          />\n        </TableCell>\n        <slot\n          name=\"row\"\n          :item=\"item\"\n          :hover=\"hover\"\n          :index=\"index\"\n          :is-expanded=\"expandedItems.has(item.id || index)\"\n        />\n        <TableCell\n          v-if=\"hasItemActions\"\n          :class=\"$style.icon\"\n        >\n          <slot\n            name=\"itemActions\"\n            :item=\"item\"\n            :hover=\"hover\"\n            :index=\"index\"\n          />\n        </TableCell>\n      </template>\n      <template #expandedContent>\n        <div\n          v-if=\"expandedItems.has(item.id || index)\"\n          :class=\"$style.expandedRow\"\n        >\n          <slot\n            name=\"expandedRow\"\n            :item=\"item\"\n            :index=\"index\"\n          />\n        </div>\n      </template>\n    </TableRow>\n\n    <Pagination\n      v-if=\"showPagination\"\n      v-bind=\"$attrs\"\n      show-items-per-page\n      :is-loading=\"isLoading\"\n      @view-page=\"emit('load-page', $event)\"\n      @change-items-per-page=\"emit('change-items-per-page', $event)\"\n    />\n\n    <Spinner\n      v-if=\"isLoading && items.length === 0\"\n      is-block\n    />\n\n    <TransitionFadeIn>\n      <slot name=\"bulkActions\" />\n    </TransitionFadeIn>\n  </TableBody>\n</template>\n\n<style module lang=\"scss\">\n.icon {\n  flex: 0 0 2.5rem;\n  min-width: 2.5rem;\n  display: flex;\n  justify-content: center;\n}\n</style>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {useFocus} from '@/composables/use-focus.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {toRefs, ref, computed, watch, watchEffect} from 'vue'\n\n//Emits and props\n//NOTE: It shouldn't be necessary to redefine these here for Vue 3\nconst emit = defineEmits([\n  'search',\n  'full-search',\n  'partial-search',\n  'clear-search',\n  'input',\n  'keydown',\n  'focus',\n  'blur',\n])\nconst props = defineProps({\n  name: {\n    type: String,\n    default: 'search',\n  },\n  searchTerm: {\n    type: String,\n    default: '',\n  },\n  debounce: {\n    type: Number,\n    default: 500,\n  },\n  placeholder: {\n    type: String,\n    default: 'Search',\n  },\n  autocomplete: {\n    type: String,\n    default: 'off',\n  },\n  testId: {\n    type: String,\n    default: 'searchInput',\n  },\n})\n\n//External search term prop\nconst {searchTerm, debounce} = toRefs(props)\n\n//Local search term refs\nconst localSearchTerm = ref('')\nconst searchEvent = computed(() => ({searchTerm: localSearchTerm.value.trim()}))\n\n//Helper to set local search term\nconst setLocalSearchTerm = value => localSearchTerm.value = value\nconst clearLocalSearchTerm = () => setLocalSearchTerm('')\n\n//Perform searches. A partial search event is triggered when a user is just typing,\n//whereas a full search is triggered when a user presses enter. A regular search\n//event is emitted in both cases in case the component consumer doesn't care how\n//the search was triggered.\nconst clearSearch = () => {\n  emit('clear-search')\n}\nconst partialSearch = () => {\n  emit('partial-search', searchEvent.value)\n  emit('search', searchEvent.value)\n}\nconst fullSearch = event => {\n\n  //Give the keyboard item selection handler time to block the search\n  //when Enter is pressed\n  setTimeout(() => {\n    if (!event.defaultPrevented) {\n      event.target.blur()\n      emit('full-search', searchEvent.value)\n      emit('search', searchEvent.value)\n    }\n  }, 50)\n}\n\n//Debounced partial search for typing\nconst partialSearchDebounced = useDebounceFn(partialSearch, debounce.value)\n\n//Update local search term ref\nconst onInput = event => {\n  emit('input', event)\n  if (!event.defaultPrevented) {\n    setLocalSearchTerm(event.value)\n  }\n}\n\n//Handle focus events to perform a partial search if needed\nconst onFocus = event => {\n  emit('focus', event)\n  if (!event.defaultPrevented) {\n    if (localSearchTerm.value && localSearchTerm.value.length > 2) {\n      partialSearch()\n    }\n  }\n}\n\n//Other handlers\nconst onBlur = event => emit('blur', event)\nconst onKeydown = event => emit('keydown', event)\n\n//Watch the search term prop to clear the local value\n//This allows the search to be cleared from a parent component\nwatchEffect(() => {\n  if (searchTerm.value === '') {\n    clearLocalSearchTerm()\n  }\n})\n\n//Watch the local search term for value changes to trigger a search\nwatch(localSearchTerm, () => {\n  if (localSearchTerm.value && localSearchTerm.value.length > 2) {\n    partialSearchDebounced()\n  }\n  else {\n    clearSearch()\n  }\n})\n\n//Expose focus and blur methods to allow parent components to focus/blur the input\nconst input = ref(null)\nconst {focus, blur} = useFocus(input)\ndefineExpose({\n  focus,\n  blur,\n})\n</script>\n\n<template>\n  <TextInput\n    ref=\"input\"\n    type=\"search\"\n    v-bind=\"$attrs\"\n    :name=\"name\"\n    :value=\"localSearchTerm\"\n    :placeholder=\"placeholder\"\n    :autocomplete=\"autocomplete\"\n    :test-id=\"testId\"\n    @input=\"onInput($event)\"\n    @keydown.enter=\"fullSearch($event)\"\n    @keydown=\"onKeydown($event)\"\n    @focus=\"onFocus($event)\"\n    @blur=\"onBlur($event)\"\n  >\n    <template #iconLeft>\n      <Icon\n        icon=\"search\"\n        is-clickable\n        @click=\"focus()\"\n      />\n    </template>\n\n    <template #iconRight>\n      <Icon\n        v-if=\"localSearchTerm\"\n        is-clickable\n        icon=\"close\"\n        @click=\"clearLocalSearchTerm()\"\n      />\n    </template>\n  </TextInput>\n</template>\n","<script setup>\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  value: {\n    type: [String, Number, Array],\n    default: null,\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  showUnknown: {\n    type: Boolean,\n    default: false,\n  },\n  showOther: {\n    type: Boolean,\n    default: false,\n  },\n  showValueForOther: {\n    type: Boolean,\n    default: false,\n  },\n  unknownLabel: {\n    type: String,\n    default: 'Unknown',\n  },\n  otherLabel: {\n    type: String,\n    default: 'Other',\n  },\n  labelProp: {\n    type: String,\n    default: 'label',\n  },\n  valueProp: {\n    type: String,\n    default: 'value',\n  },\n  prefix: {\n    type: String,\n    default: '',\n  },\n  suffix: {\n    type: String,\n    default: '',\n  },\n})\n\n//Get refs\nconst {\n  value,\n  options,\n  showUnknown,\n  showOther,\n  showValueForOther,\n  unknownLabel,\n  otherLabel,\n  labelProp,\n  valueProp,\n} = toRefs(props)\n\n//Helper to get label value of an option\nconst getLabel = optionValue => {\n\n  //Find option\n  const option = options.value.find(option => option[valueProp.value] === optionValue)\n  if (option) {\n    return option[labelProp.value]\n  }\n\n  //Option not found, but there is a value, show other label\n  else if (optionValue && showOther.value) {\n    if (showValueForOther.value) {\n      return optionValue\n    }\n    return otherLabel.value\n  }\n\n  //Show unknown label\n  else if (showUnknown.value) {\n    return unknownLabel.value\n  }\n\n  //Blank\n  return ''\n}\n\n//Determine label\nconst label = computed(() => {\n  if (Array.isArray(value.value)) {\n    return value.value\n      .map(getLabel)\n      .join(', ')\n  }\n  return getLabel(value.value)\n})\n</script>\n\n<template>\n  <span>{{ prefix }}{{ label }}{{ suffix }}</span>\n</template>\n","<script setup>\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport {toRefs, computed} from 'vue'\n\n// Props\nconst props = defineProps({\n  progress: {\n    type: Number,\n    default: 0,\n    validator: value => value >= 0 && value <= 1,\n  },\n  showLabel: {\n    type: Boolean,\n    default: false,\n  },\n  isCompact: {\n    type: Boolean,\n    default: false,\n  },\n  isIndeterminate: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {progress, isIndeterminate} = toRefs(props)\nconst isActive = computed(() => isIndeterminate.value || progress.value > 0)\nconst width = computed(() => isIndeterminate.value ? '' : `${progress.value * 100}%`)\n</script>\n\n<template>\n  <div\n    :class=\"{\n      [$style.container]: true,\n      [$style.compact]: isCompact,\n      [$style.active]: isActive,\n      [$style.indeterminate]: isIndeterminate,\n    }\"\n  >\n    <div\n      :class=\"$style.bar\"\n      role=\"progressbar\"\n    >\n      <div\n        :class=\"$style.fill\"\n        :style=\"{width}\"\n      />\n    </div>\n    <span\n      v-if=\"showLabel && !isIndeterminate\"\n      :class=\"$style.label\"\n    >\n      <slot name=\"label\">\n        <Percentage :fraction=\"progress\" />\n      </slot>\n    </span>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: -45deg) {\n  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);\n}\n@keyframes progress-bar-stripes {\n  from  { background-position: 0 0; }\n  to    { background-position: 40px 0; }\n}\n@keyframes progress-bar-stripes-compact {\n  from  { background-position: 0 0; }\n  to    { background-position: 20px 0; }\n}\n@keyframes progress-bar-indeterminate {\n  0% {\n    margin-left: 0;\n    width: 0;\n  }\n  20% {\n    width: 30%;\n  }\n  45% {\n    margin-left: 0%;\n  }\n  50% {\n    margin-left: 10%;\n    width: 60%;\n  }\n  60% {\n    margin-left: 40%;\n    width: 50%;\n  }\n  80% {\n    margin-left: 90%;\n  }\n  100% {\n    margin-left: 100%;\n    width: 0;\n  }\n}\n\n.container {\n  margin: 1rem 0;\n  display: flex;\n  gap: 1rem;\n  align-items: center;\n}\n.bar, .fill {\n  height: 13px;\n  border-radius: 20px;\n}\n.bar {\n  width: 100%;\n  background-color: var(--color-elements-light);\n  overflow: hidden;\n}\n.fill {\n  transition: width .5s ease-in-out, margin-left .5s ease-in-out;\n  background-color: var(--color-elements-active);\n  max-width: 100%;\n}\n.label {\n  flex: 0 0 2.75rem;\n  text-align: right;\n}\n\n/* Active style */\n.active {\n  .fill {\n    @include gradient-striped();\n    background-size: 40px 40px;\n    animation: progress-bar-stripes 2s linear infinite;\n  }\n  &.compact .fill {\n    background-size: 20px 20px;\n    animation: progress-bar-stripes-compact 2s linear infinite;\n  }\n  &.indeterminate .fill {\n    animation:\n      progress-bar-indeterminate 1.75s linear infinite,\n      progress-bar-stripes 0.75s linear infinite;\n  }\n  &.indeterminate.compact .fill {\n    animation:\n      progress-bar-indeterminate 1.75s linear infinite,\n      progress-bar-stripes-compact 0.75s linear infinite;\n  }\n}\n\n/* Compact style */\n.compact {\n  margin: 0;\n  gap: 0.25rem;\n  .bar, .fill {\n    height: 9px;\n  }\n  .label {\n    font-size: var(--font-size-text-small);\n    flex: 0 0 2.25rem;\n  }\n}\n</style>\n","\n//Data export statuses\nexport const dataExportStatuses = {\n  PENDING: 'pending',\n  QUEUED: 'queued',\n  PROCESSING: 'processing',\n  COMPLETED: 'completed',\n  FAILED: 'failed',\n}\n\n//Data export status options\nexport const dataExportStatusOptions = [\n  {\n    value: dataExportStatuses.PENDING,\n    label: 'Initializing export',\n  },\n  {\n    value: dataExportStatuses.QUEUED,\n    label: 'Export queued',\n  },\n  {\n    value: dataExportStatuses.PROCESSING,\n    label: 'Exporting data',\n  },\n  {\n    value: dataExportStatuses.COMPLETED,\n    label: 'Export complete',\n  },\n  {\n    value: dataExportStatuses.FAILED,\n    label: 'Export failed',\n  },\n]\n\n//Data export data types\nexport const dataExportDataTypes = {\n  CSV: 'csv',\n}\n\n//Data export content types\nexport const dataExportContentTypes = {\n  LEARNERS: 'learners',\n  ANALYTICS_ENROLLMENTS: 'analytics_enrollments',\n}\n","<script setup>\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport StickyBar from '@/components/shared/core/StickyBar.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport ErrorMessage from '@/components/shared/transform/ErrorMessage.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {dataExportStatuses, dataExportStatusOptions} from '@/constants/data-exports.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'close',\n])\nconst props = defineProps({\n  exportStatus: {\n    type: String,\n    required: true,\n  },\n  exportProgress: {\n    type: Number,\n    default: 0,\n  },\n  exportLink: {\n    type: String,\n    default: '',\n  },\n  exportError: {\n    type: [String, Error],\n    default: '',\n  },\n  showProgressBar: {\n    type: Boolean,\n    default: true,\n  },\n  willSendEmail: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Refs\nconst {exportStatus, exportError, exportLink, willSendEmail} = toRefs(props)\nconst isCompleted = computed(() => exportStatus.value === dataExportStatuses.COMPLETED)\nconst isFailed = computed(() => exportStatus.value === dataExportStatuses.FAILED)\nconst isProcessing = computed(() => exportStatus.value === dataExportStatuses.PROCESSING)\nconst isBusy = computed(() => !isCompleted.value && !isFailed.value)\nconst showEmail = computed(() => isProcessing.value && willSendEmail.value)\nconst suffix = computed(() => {\n  if (showEmail.value || exportLink.value) {\n    return ', '\n  }\n  if (exportError.value) {\n    return ': '\n  }\n  return ''\n})\n</script>\n\n<template>\n  <StickyBar\n    :class=\"$style.bar\"\n    is-fixed\n    @close=\"$emit('close')\"\n  >\n    <div :class=\"$style.content\">\n      <div :class=\"$style.status\">\n        <Spinner\n          v-if=\"isBusy\"\n          test-id=\"exportStatusSpinner\"\n        />\n        <Icon\n          v-else-if=\"isCompleted\"\n          icon=\"check\"\n        />\n        <Icon\n          v-else-if=\"isFailed\"\n          icon=\"warning\"\n        />\n        <span>\n          <LabelValue\n            :options=\"dataExportStatusOptions\"\n            :value=\"exportStatus\"\n            :suffix=\"suffix\"\n          />\n          <span v-if=\"showEmail\">we'll send you an email when your export is ready.</span>\n          <TextLink\n            v-if=\"exportLink\"\n            :url=\"exportLink\"\n            test-id=\"exportStatusLink\"\n            text=\"click here to download your data.\"\n            is-inline\n          />\n          <ErrorMessage\n            v-if=\"exportError\"\n            :class=\"$style.error\"\n            :error=\"exportError\"\n          />\n        </span>\n      </div>\n      <ProgressBar\n        v-if=\"showProgressBar && isProcessing\"\n        test-id=\"exportStatusProgressBar\"\n        :progress=\"exportProgress\"\n        is-compact\n        show-label\n      />\n    </div>\n  </StickyBar>\n</template>\n\n<style module lang=\"scss\">\n.bar {\n  max-width: 40rem;\n}\n.content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n}\n.status {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n.error {\n  color: var(--color-white);\n}\n</style>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Data export model\n */\nexport class DataExport extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {DataExport} from '@/models/data-export.model.js'\n\n/**\n * Data Export API service\n */\nexport class DataExportsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/data_exports'\n  itemKey = 'dataExport'\n  itemsKey = 'dataExports'\n  ModelClass = DataExport\n\n  /**\n   * Get download URL for a completed export\n   */\n  getDownloadUrl(id) {\n    return this.get(`${id}/download`)\n  }\n}\n\n//Export singleton instance\nexport const dataExportsApi = new DataExportsApi()\n","import {dataExportsApi} from '@/api/data-exports.api.js'\nimport {dataExportStatuses} from '@/constants/data-exports.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, isRef} from 'vue'\n\n/**\n * Data export status composable\n */\nexport function useDataExportStatus(exportId, options = {}) {\n\n  //Must specify export ID\n  if (!isRef(exportId)) {\n    throw new Error('Must specify export ID ref')\n  }\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Extract options\n  const {\n    maxAttempts = 150,\n    interval = 2000,\n    onUpdate = null,\n  } = options\n\n  //Refs\n  const exportInterval = ref(null)\n  const exportProgress = ref(0)\n  const exportStatus = ref(dataExportStatuses.PENDING)\n  const exportError = ref(null)\n  const exportLink = ref('')\n\n  //Reset refs\n  const resetExportStatus = () => {\n    exportInterval.value = null\n    exportProgress.value = 0\n    exportStatus.value = null\n    exportError.value = null\n    exportLink.value = ''\n  }\n\n  //Update refs based on server data\n  const updateExportStatus = data => {\n    exportLink.value = data.link || ''\n    exportStatus.value = data.status || dataExportStatuses.PENDING\n    exportProgress.value = data.progress || 0\n    onUpdate?.(data)\n  }\n\n  //Check export status\n  const attempts = ref(0)\n  const checkExportStatus = async () => {\n    try {\n\n      //Increment attempts\n      attempts.value++\n\n      //Fail if max attempts reached\n      if (attempts.value > maxAttempts) {\n        throw new Error(`The export is taking longer than expected. We’ll email you when it’s ready.`)\n      }\n\n      //Get processing status and update\n      const data = await dataExportsApi.findById(exportId.value)\n      updateExportStatus(data)\n\n      //Check if export is done\n      if (data.status === dataExportStatuses.COMPLETED) {\n        stopCheckingExportStatus()\n        return\n      }\n\n      //Check if export has failed\n      if (data.status === dataExportStatuses.FAILED) {\n        throw new Error(data.message || 'Export failed')\n      }\n    }\n    catch (error) {\n      exportError.value = error.message\n      exportStatus.value = dataExportStatuses.FAILED\n      stopCheckingExportStatus()\n      processError(error)\n      throw error\n    }\n  }\n\n  //Start checking export status\n  const startCheckingExportStatus = () => {\n\n    //Clear any existing interval\n    stopCheckingExportStatus()\n\n    //Check immediately the first time\n    attempts.value = 0\n    checkExportStatus()\n\n    //Set up interval\n    exportInterval.value = setInterval(checkExportStatus, interval)\n  }\n\n  //Stop checking export status\n  const stopCheckingExportStatus = () => {\n    clearInterval(exportInterval.value)\n  }\n\n  //Expose interface\n  return {\n    exportLink,\n    exportError,\n    exportStatus,\n    exportProgress,\n    startCheckingExportStatus,\n    stopCheckingExportStatus,\n    resetExportStatus,\n  }\n}\n","<script setup>\nimport ExportStatusBar from '@/components/shared/export/ExportStatusBar.vue'\nimport {useDataExportStatus} from '@/composables/use-data-export-status.js'\nimport {toRefs, watch,onMounted, onUnmounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'status-updated',\n])\nconst props = defineProps({\n  exportId: {\n    type: String,\n    required: true,\n  },\n  maxAttempts: {\n    type: Number,\n    default: 150,\n  },\n  interval: {\n    type: Number,\n    default: 2000,\n  },\n})\n\n//Refs\nconst {exportId, maxAttempts, interval} = toRefs(props)\nconst {\n  exportLink,\n  exportError,\n  exportStatus,\n  exportProgress,\n  resetExportStatus,\n  startCheckingExportStatus,\n  stopCheckingExportStatus,\n} = useDataExportStatus(exportId, {\n  maxAttempts: maxAttempts.value,\n  interval: interval.value,\n  onUpdate: data => emit('status-updated', {data}),\n})\n\n//Handle close\nconst handleClose = () => {\n  resetExportStatus()\n  stopCheckingExportStatus()\n  emit('close')\n}\n\n//Start/stop checking export status on mount/unmount\nonMounted(startCheckingExportStatus)\nonUnmounted(stopCheckingExportStatus)\n\n//Re-start checking export status when export ID changes\nwatch(exportId, startCheckingExportStatus)\n</script>\n\n<template>\n  <ExportStatusBar\n    v-bind=\"$attrs\"\n    :export-link=\"exportLink\"\n    :export-error=\"exportError\"\n    :export-status=\"exportStatus\"\n    :export-progress=\"exportProgress\"\n    is-fixed\n    @close=\"handleClose()\"\n  />\n</template>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Analytics API\n */\nexport class AnalyticsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/analytics'\n\n  /**\n   * Get base data\n   */\n  getBaseData(params) {\n    return this.get('/base_data', params)\n  }\n\n  /**\n   * Get step data\n   */\n  getStepData(params) {\n    return this.get('/step_data', params)\n  }\n\n  /**\n   * Get table data for given entity\n   */\n  getTableData(entity, params) {\n    return this.get(`/${entity}_table_data`, params)\n  }\n\n  /**\n   * Download table data CSV\n   */\n  downloadTableDataCsv(entity, params, filename) {\n    return this.downloadCsv(`/${entity}_table_data_csv`, params, filename || entity)\n  }\n}\n\n//Export singleton instance\nexport const analyticsApi = new AnalyticsApi()\n","import {dataExportsApi} from '@/api/data-exports.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Data export request composable\n */\nexport function useDataExportRequest(options = {}) {\n\n  //Must specify content type\n  if (!options.contentType) {\n    throw new Error('Must specify content type')\n  }\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const exportId = ref(null)\n  const isRequestingExport = ref(false)\n\n  //Call handler helper\n  const callHandler = (...args) => {\n    if (typeof options.handler === 'function') {\n      return options.handler(...args)\n    }\n    return dataExportsApi.create(...args)\n  }\n\n  //Reset export\n  const resetExport = () => {\n    exportId.value = null\n    isRequestingExport.value = false\n  }\n\n  //Request export\n  const requestExport = async (queryParams = {}) => {\n\n    //Already exporting\n    if (isRequestingExport.value) {\n      throw new Error('Export already in progress')\n    }\n\n    //Start export\n    try {\n\n      //Initialize flag and message\n      isRequestingExport.value = true\n\n      //Call handler and check status\n      const data = await callHandler({\n        contentType: options.contentType,\n        filename: options.filename,\n        parameters: queryParams,\n      })\n\n      //Set export ID\n      exportId.value = data.id\n      return data\n    }\n    catch (error) {\n      setFlashFailure('Failed to initialize export')\n      processError(error)\n      throw error\n    }\n    finally {\n      isRequestingExport.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    exportId,\n    isRequestingExport,\n    requestExport,\n    resetExport,\n  }\n}\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport ExportStatusBarDynamic from '@/components/shared/export/ExportStatusBarDynamic.vue'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {dataExportContentTypes} from '@/constants/data-exports.js'\nimport {useDataExportRequest} from '@/composables/use-data-export-request.js'\nimport {toRefs, ref, computed, onMounted} from 'vue'\n\n//NOTE: While this component has been refactored from using Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\ndefineEmits([\n  'set-user-id',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get props\nconst {baseParams} = toRefs(props)\n\n//Refs\nconst users = ref([])\nconst total = ref(0)\nconst isLoading = ref(false)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst itemsPerPage = ref(10)\nconst search = ref('')\nconst sort = ref('')\n\n//Combined query params\nconst params = computed(() => ({\n  ...baseParams.value,\n  page: currentPage.value,\n  length: itemsPerPage.value,\n  search: search.value,\n  sort: sort.value,\n}))\n\n//CSV params\nconst csvParams = computed(() => {\n  return {\n    ...params.value,\n    page: undefined,\n    length: undefined,\n  }\n})\n\n//Querying\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getTableData('users', params.value)\n    users.value = data.items\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Sort param handling\nconst changeSort = value => {\n  sort.value = value\n  loadData()\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeItemsPerPage = num => {\n  itemsPerPage.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\n//Data export\nconst {\n  exportId,\n  isRequestingExport,\n  requestExport,\n  resetExport,\n} = useDataExportRequest({\n  contentType: dataExportContentTypes.ANALYTICS_ENROLLMENTS,\n})\n\n//Download CSV\nconst downloadCsv = async () => {\n  try {\n    await requestExport(csvParams.value)\n  }\n  catch {\n    //Handled by useDataExport\n  }\n}\n\n//Load data on mount\nonMounted(loadData)\n</script>\n\n<template>\n  <section>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0 || isRequestingExport || !!exportId\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No data available\n    </p>\n\n    <OverviewTable\n      test-id=\"usersTable\"\n      :items=\"users\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"itemsPerPage\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell\n          :class=\"$style.name\"\n          is-sortable\n          sort-prop=\"name\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Name\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.address\"\n          is-sortable\n          sort-prop=\"address\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Account address\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.courses\"\n          is-sortable\n          sort-prop=\"courses\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          # of courses\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.progress\"\n          is-sortable\n          sort-prop=\"progress\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Current progress\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item: user}\">\n        <TableCell\n          :class=\"$style.name\"\n          is-clickable\n          @click=\"$emit('set-user-id', {userId: user.id})\"\n        >\n          <strong>{{ user.name }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.address\">\n          {{ user.accountAddress }}\n        </TableCell>\n        <TableCell :class=\"$style.courses\">\n          {{ user.courses }}\n        </TableCell>\n        <TableCell :class=\"$style.progress\">\n          <StatusBadge>\n            {{ user.progress }}\n          </StatusBadge>\n        </TableCell>\n      </template>\n      <template #bulkActions>\n        <ExportStatusBarDynamic\n          v-if=\"!!exportId\"\n          :export-id=\"exportId\"\n          @close=\"resetExport()\"\n        />\n      </template>\n    </OverviewTable>\n  </section>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 2;\n}\n.address {\n  flex: 3;\n}\n.courses {\n  flex: 0 0 11rem;\n}\n.progress {\n  flex: 0 0 9rem;\n}\n</style>\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//NOTE: While this component has been refactored from using Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\ndefineEmits([\n  'set-course-id',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get props\nconst {baseParams} = toRefs(props)\n\n//Refs\nconst courses = ref([])\nconst total = ref(0)\nconst isLoading = ref(false)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst itemsPerPage = ref(10)\nconst search = ref('')\nconst sort = ref('')\n\n//Combined params\nconst params = computed(() => ({\n  ...baseParams.value,\n  page: currentPage.value,\n  length: itemsPerPage.value,\n  search: search.value,\n  sort: sort.value,\n}))\n\n//Querying\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getTableData('courses', params.value)\n    courses.value = data.items\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Sort param handling\nconst changeSort = value => {\n  sort.value = value\n  loadData()\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeItemsPerPage = num => {\n  itemsPerPage.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\nconst csvParams = computed(() => {\n  return Object.fromEntries(\n    Object.entries(params.value)\n      .filter(([key]) => !['page', 'length'].includes(key))\n  )\n})\n\n//Download CSV\nconst downloadCsv = () => analyticsApi\n  .downloadTableDataCsv('courses', csvParams.value, 'Content')\n\n//Load courses\nloadData()\n</script>\n\n<template>\n  <section>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No data available\n    </p>\n\n    <OverviewTable\n      test-id=\"coursesTable\"\n      :items=\"courses\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"itemsPerPage\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell\n          :class=\"$style.name\"\n          is-sortable\n          sort-prop=\"name\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Name\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.numSchedules\"\n          is-sortable\n          sort-prop=\"numSchedules\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          # of schedules\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.numEnrollments\"\n          is-sortable\n          sort-prop=\"numEnrollments\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          # of enrollments\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item: course}\">\n        <TableCell\n          :class=\"$style.name\"\n          is-clickable\n          @click=\"$emit('set-course-id', {courseId: course.id})\"\n        >\n          <strong>{{ course.name }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.numSchedules\">\n          {{ course.numSchedules }}\n        </TableCell>\n        <TableCell :class=\"$style.numEnrollments\">\n          {{ course.numEnrollments }}\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </section>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 1;\n}\n.numSchedules {\n  flex: 0 0 10rem;\n}\n.numEnrollments {\n  flex: 0 0 10rem;\n}\n</style>\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//NOTE: While this component has been refactored from using Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\ndefineEmits([\n  'set-cohort-id',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get props\nconst {baseParams} = toRefs(props)\n\n//Refs\nconst cohorts = ref([])\nconst total = ref(0)\nconst isLoading = ref(false)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst itemsPerPage = ref(10)\nconst search = ref('')\nconst sort = ref('')\n\n//Combined params\nconst params = computed(() => ({\n  ...baseParams.value,\n  page: currentPage.value,\n  length: itemsPerPage.value,\n  search: search.value,\n  sort: sort.value,\n}))\n\n//Querying\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getTableData('cohorts', params.value)\n    cohorts.value = data.items\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Sort param handling\nconst changeSort = value => {\n  sort.value = value\n  loadData()\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeItemsPerPage = num => {\n  itemsPerPage.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\nconst csvParams = computed(() => {\n  return Object.fromEntries(\n    Object.entries(params.value)\n      .filter(([key]) => !['page', 'length'].includes(key))\n  )\n})\n\n//Download CSV\nconst downloadCsv = () => analyticsApi\n  .downloadTableDataCsv('cohorts', csvParams.value, 'Cohorts')\n\n//Load cohorts\nloadData()\n</script>\n\n<template>\n  <section>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No data available\n    </p>\n\n    <OverviewTable\n      test-id=\"cohortsTable\"\n      :items=\"cohorts\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"itemsPerPage\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell\n          :class=\"$style.name\"\n          is-sortable\n          sort-prop=\"name\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Name\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.numLearners\"\n          is-sortable\n          sort-prop=\"numLearners\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          # of learners\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.numSchedules\"\n          is-sortable\n          sort-prop=\"numSchedules\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          # of schedules\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item: cohort}\">\n        <TableCell\n          :class=\"$style.name\"\n          is-clickable\n          @click=\"$emit('set-cohort-id', {cohortId: cohort.id})\"\n        >\n          <strong>{{ cohort.name }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.numLearners\">\n          {{ cohort.numLearners }}\n        </TableCell>\n        <TableCell :class=\"$style.numSchedules\">\n          {{ cohort.numSchedules }}\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </section>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 1;\n}\n.numLearners {\n  flex: 0 0 10rem;\n}\n.numSchedules {\n  flex: 0 0 10rem;\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Responses API\n */\nexport class ResponsesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/responses'\n  itemsKey = 'responses'\n\n  /**\n   * Query grouped responses\n   */\n  queryGrouped(params) {\n    return this.get(`/grouped`, params)\n  }\n\n  /**\n   * Download CSV\n   */\n  downloadCsv(params) {\n    return super.downloadCsv(`/download_csv`, params)\n  }\n\n  /**\n   * Toggle a response correct\n   */\n  toggleCorrect(responseId) {\n    return this.post(`/${responseId}/toggle_correct`)\n  }\n}\n\n//Export singleton instance\nexport const responsesApi = new ResponsesApi()\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport {responsesApi} from '@/api/responses.api.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//NOTE: While this component has been refactored from using Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\ndefineEmits([\n  'set-course-id',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get props\nconst {baseParams} = toRefs(props)\n\n//Refs\nconst responses = ref([])\nconst total = ref(0)\nconst isLoading = ref(false)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst limit = ref(10)\nconst search = ref('')\nconst sort = ref('')\n\n//Combined params\nconst params = computed(() => ({\n  ...baseParams.value,\n  offset: (currentPage.value - 1) * limit.value,\n  limit: limit.value,\n  search: search.value,\n  sort: sort.value,\n}))\n\n//Querying\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await responsesApi.queryGrouped(params.value)\n    responses.value = data.responses\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Sort param handling\nconst changeSort = value => {\n  sort.value = value\n  loadData()\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeLimit = num => {\n  limit.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\n//Download CSV\nconst downloadCsv = () => responsesApi.downloadCsv(params.value)\n\n//Load responses\nloadData()\n</script>\n\n<template>\n  <section>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No data available\n    </p>\n\n    <OverviewTable\n      :items=\"responses\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"limit\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeLimit($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell\n          :class=\"$style.courseName\"\n          is-sortable\n          sort-prop=\"courseName\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Course name\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.totalResponses\"\n          is-sortable\n          sort-prop=\"totalResponses\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Total responses\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item: response}\">\n        <TableCell\n          :class=\"$style.courseName\"\n          is-clickable\n          @click=\"$emit('set-course-id', {courseId: response.courseId})\"\n        >\n          <strong>{{ response.courseName }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.totalResponses\">\n          {{ response.totalResponses }}\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </section>\n</template>\n\n<style module lang=\"scss\">\n.courseName {\n  flex: 1;\n}\n.totalResponses {\n  flex: 0 0 9rem;\n}\n</style>\n","<script setup>\nimport {computed, toRefs} from 'vue'\nimport {formatNumber} from '@/helpers/numbers.js'\n\n//Props\nconst props = defineProps({\n  number: {\n    type: Number,\n    default: null,\n  },\n  options: {\n    type: Object,\n    default: () => ({}),\n  },\n  emptyLabel: {\n    type: String,\n    default: '',\n  },\n})\n\n//Refs\nconst {number, options} = toRefs(props)\nconst isEmpty = computed(() => number.value === null || number.value === undefined || isNaN(number.value))\nconst formatted = computed(() => formatNumber(number.value, options.value))\n</script>\n\n<template>\n  <span v-bind=\"$attrs\">{{ isEmpty ? emptyLabel : formatted }}</span>\n</template>\n","\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {unref, ref} from 'vue'\n\n/**\n * Stored setting composable\n */\nexport function useStoredSetting(key, defaultValue = null) {\n\n  //Must provide a key\n  if (!key) {\n    throw new Error('Must provide a key')\n  }\n\n  //Local storage\n  const {getFromLocalStorage, setInLocalStorage} = useLocalStorage()\n  const setting = ref(getFromLocalStorage(unref(key)) || defaultValue)\n\n  //Change setting\n  const changeSetting = value => {\n    setting.value = value\n    setInLocalStorage(key, value)\n  }\n\n  //Expose interface\n  return {\n    setting,\n    changeSetting,\n  }\n}\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport TableBody from '@/components/shared/table/TableBody.vue'\nimport TableRow from '@/components/shared/table/TableRow.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport Number from '@/components/shared/transform/Number.vue'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {responsesApi} from '@/api/responses.api.js'\nimport {useStoredSetting} from '@/composables/use-stored-setting.js'\nimport {toRefs, ref, watch, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'toggle-drop-off',\n  'toggle-substep-details',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n  courseId: {\n    type: String,\n    required: true,\n  },\n})\n\n//Get props\nconst {baseParams, courseId} = toRefs(props)\n\n//Refs that will be populated with data\nconst isLoading = ref(false)\nconst course = ref(null)\nconst steps = ref([])\nconst numResponses = ref(0)\n\n//Stored settings\nconst {\n  setting: showProgressPercentage,\n  changeSetting: setProgressPercentage,\n} = useStoredSetting('analytics.showProgressPercentage', false)\nconst {\n  setting: showDropOffPercentage,\n  changeSetting: setDropOffPercentage,\n} = useStoredSetting('analytics.showDropOffPercentage', false)\n\n//Language\nconst language = computed(() => course.value?.language)\n\n//Querying\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getStepData({\n      ...baseParams.value,\n      courseId: courseId.value,\n      courseIds: undefined,\n    })\n    course.value = data.course\n    steps.value = data.steps\n    numResponses.value = data.numResponses\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Load step data\nwatch(courseId, loadData, {immediate: true})\n\n//Download CSV\nconst downloadCsv = substep => {\n  responsesApi.downloadCsv({\n    ...baseParams.value,\n    substepId: substep ? substep.id : null,\n  })\n}\n\n//Expose reload helper\ndefineExpose({\n  reloadData: () => loadData(),\n})\n</script>\n\n<template>\n  <Spinner\n    v-if=\"isLoading\"\n    is-block\n  />\n  <Alert\n    v-else-if=\"steps.length === 0\"\n    type=\"warning\"\n    text=\"Engagement data is unavailable for non-interactive content.\"\n    fit-content\n  />\n\n  <PageBlock\n    v-else\n    header=\"Engagement\"\n  >\n    <template #headerAside>\n      <DownloadButton\n        label=\"Download all\"\n        :is-disabled=\"numResponses === 0\"\n        @click=\"downloadCsv()\"\n      />\n    </template>\n\n    <TableBody>\n      <TableRow>\n        <TableHeaderCell :class=\"$style.name\">\n          Step\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.activeEnrollments\">\n          Lesson progress\n          <Help\n            :text=\"`${showProgressPercentage ? 'Percentage' : 'Number'} of all active enrollments that are on this step.`\"\n            is-compact\n          />\n          <template #sub>\n            <Toggle\n              sub-label=\"show %\"\n              :is-checked=\"showProgressPercentage\"\n              is-small\n              @click=\"setProgressPercentage(!showProgressPercentage)\"\n            />\n          </template>\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.dropOff\">\n          Drop-off\n          <Help\n            :text=\"`${showDropOffPercentage ? 'Percentage' : 'Number'} of enrollments that stopped, paused, opted out, or errored at this step.`\"\n            is-compact\n          />\n          <template #sub>\n            <Toggle\n              sub-label=\"show %\"\n              :is-checked=\"showDropOffPercentage\"\n              is-small\n              @click=\"setDropOffPercentage(!showDropOffPercentage)\"\n            />\n          </template>\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.replyRate\">\n          Reply rate\n          <Help\n            text=\"The percentage of questions that received at least one response. (Calculated as: Questions with accepted responses ÷ Total questions asked)\"\n            is-compact\n          />\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.accuracy\">\n          Answer accuracy\n          <Help\n            text=\"Percentage of enrollments that got this message and replied correctly\"\n            is-compact\n          />\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.export\" />\n      </TableRow>\n\n      <!-- STEP -->\n      <template\n        v-for=\"step in steps\"\n        :key=\"step.id\"\n      >\n        <TableRow>\n          <TableCell :class=\"$style.name\">\n            <strong>{{ step.name }}</strong>\n          </TableCell>\n          <TableCell :class=\"$style.activeEnrollments\">\n            <Percentage\n              v-if=\"showProgressPercentage\"\n              :fraction=\"step.percentActiveEnrollments\"\n              :options=\"{maximumFractionDigits: 1}\"\n            />\n            <Number\n              v-else\n              :number=\"step.numActiveEnrollments\"\n              :options=\"{maximumFractionDigits: 0}\"\n            />\n          </TableCell>\n          <TableCell\n            :class=\"$style.dropOff\"\n            :text-danger=\"step.dropOffRate > 0.15\"\n          >\n            <Percentage\n              v-if=\"showDropOffPercentage\"\n              :fraction=\"step.dropOffRate\"\n              :options=\"{maximumFractionDigits: 1}\"\n            />\n            <Number\n              v-else\n              :number=\"step.dropOffCount\"\n              :options=\"{maximumFractionDigits: 0}\"\n            />\n          </TableCell>\n          <TableCell\n            :class=\"$style.replyRate\"\n            :text-danger=\"step.replyRate !== null && step.replyRate < 0.3\"\n          >\n            <Percentage\n              :fraction=\"step.replyRate\"\n              empty-label=\"N/A\"\n            />\n          </TableCell>\n          <TableCell\n            :class=\"$style.accuracy\"\n            :text-danger=\"step.accuracy !== null && step.accuracy < 0.3\"\n          >\n            <Percentage\n              :fraction=\"step.accuracy\"\n              empty-label=\"N/A\"\n            />\n          </TableCell>\n          <TableCell :class=\"$style.export\" />\n        </TableRow>\n\n        <!-- SUBSTEPS -->\n        <template\n          v-for=\"substep in step.substeps\"\n          :key=\"substep.id\"\n        >\n          <TableRow>\n            <TableCell :class=\"$style.name\">\n              <TextLink\n                v-if=\"substep.isExpandable\"\n                :text=\"substep.questionHeader\"\n                @click=\"$emit('toggle-substep-details', {step, substep, language})\"\n              />\n              <span v-else>{{ substep.questionHeader }}</span>\n            </TableCell>\n            <TableCell :class=\"$style.activeEnrollments\">\n              <Percentage\n                v-if=\"showProgressPercentage\"\n                :fraction=\"substep.percentActiveEnrollments\"\n                :options=\"{maximumFractionDigits: 1}\"\n              />\n              <Number\n                v-else\n                :number=\"substep.numActiveEnrollments\"\n                :options=\"{maximumFractionDigits: 0}\"\n              />\n            </TableCell>\n            <TableCell\n              :class=\"$style.dropOff\"\n              :text-danger=\"step.dropOffRate > 0.15\"\n              is-clickable\n              @click=\"$emit('toggle-drop-off', {step, substep})\"\n            >\n              <Percentage\n                v-if=\"showDropOffPercentage\"\n                :fraction=\"substep.dropOffRate\"\n                :options=\"{maximumFractionDigits: 1}\"\n              />\n              <Number\n                v-else\n                :number=\"substep.dropOffCount\"\n                :options=\"{maximumFractionDigits: 0}\"\n                text-underline\n              />\n            </TableCell>\n            <TableCell\n              :class=\"$style.replyRate\"\n              :text-danger=\"substep.replyRate !== null && substep.replyRate < 0.3\"\n            >\n              <Percentage\n                :fraction=\"substep.replyRate\"\n                empty-label=\"N/A\"\n              />\n            </TableCell>\n            <TableCell\n              :class=\"$style.accuracy\"\n              :text-danger=\"substep.accuracy !== null && substep.accuracy < 0.5\"\n            >\n              <Percentage\n                :fraction=\"substep.accuracy\"\n                empty-label=\"N/A\"\n              />\n            </TableCell>\n            <TableCell\n              :class=\"$style.export\"\n              justify=\"end\"\n            >\n              <DownloadButton\n                v-if=\"substep.isExportable\"\n                :is-disabled=\"!substep.numResponses\"\n                icon-only\n                @click.stop=\"downloadCsv(substep)\"\n              />\n            </TableCell>\n          </TableRow>\n        </template>\n      </template>\n    </TableBody>\n  </PageBlock>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 1;\n}\n.dropOff {\n  flex: 0 0 8rem;\n}\n.activeEnrollments {\n  flex: 0 0 11rem;\n}\n.replyRate {\n  flex: 0 0 5rem;\n}\n.accuracy {\n  flex: 0 0 6rem;\n}\n.export {\n  flex: 0 0 4rem;\n}\n</style>\n","<script setup>\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\ndefineProps({\n  user: {\n    type: Object,\n    default: null,\n  },\n  showIdIfNameless: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Permissions\nconst {anonymizePii} = useCurrentOrganization()\n</script>\n\n<template>\n  <span v-if=\"user\">\n    <span v-if=\"anonymizePii\">\n      {{ user.id }}\n    </span>\n    <span>\n      {{ user.displayName }}\n    </span>\n  </span>\n</template>\n","<script setup>\nimport {inflect} from '@/helpers/string.js'\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  text: {\n    type: String,\n    required: true,\n  },\n  count: {\n    type: Number,\n    default: 1,\n  },\n  includeCount: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Inflected\nconst {text, count, includeCount} = toRefs(props)\nconst inflected = computed(() => inflect(text.value, count.value, includeCount.value))\n</script>\n\n<template>\n  {{ inflected }}\n</template>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport {stripHtml} from '@/helpers/string.js'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {toRefs, ref, computed, watch} from 'vue'\n\n//NOTE: While this component has been refactored from using Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\ndefineEmits([\n  'toggle-drop-off',\n  'close',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n  step: {\n    type: Object,\n    default: null,\n  },\n  substep: {\n    type: Object,\n    default: null,\n  },\n})\n\n//Get props\nconst {baseParams, substep} = toRefs(props)\n\n//Refs\nconst items = ref([])\nconst total = ref(0)\nconst isLoading = ref(false)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst itemsPerPage = ref(10)\nconst search = ref('')\n\n//Combined params\nconst params = computed(() => ({\n  ...baseParams.value,\n  page: currentPage.value,\n  length: itemsPerPage.value,\n  search: search.value,\n  substepId: substep.value?.id,\n}))\n\n//Querying\nconst loadData = async () => {\n\n  //Only when there is a substep\n  if (!substep.value) {\n    return\n  }\n\n  //Load data\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getTableData('drop_off', params.value)\n    items.value = data.items\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeItemsPerPage = num => {\n  itemsPerPage.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\n//Download CSV\nconst downloadCsv = () => analyticsApi\n  .downloadTableDataCsv('drop_off', params.value, 'Drop-off')\n\n//Load items\nwatch(substep, loadData)\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    is-full\n    @close=\"$emit('close')\"\n  >\n    <template #header>\n      <PageBlockHeader :header=\"`Drop-off for ${substep?.questionHeader}`\">\n        <template #subheaderText>\n          Out of the <Percentage\n            :fraction=\"step.dropOffRateForCourse\"\n            :options=\"{maximumFractionDigits: 1}\"\n          /> of enrollments that dropped off this course, <Percentage\n            :fraction=\"step.dropOffRate\"\n            :options=\"{maximumFractionDigits: 1}\"\n          /> happened on this step - a total of <Inflect\n            text=\"person\"\n            :count=\"step.dropOffCount\"\n            include-count\n          />.\n        </template>\n      </PageBlockHeader>\n    </template>\n\n    <OverviewTableHeader>\n      <template #filters>\n        <SelectInput\n          :class=\"$style.substepSelect\"\n          :value=\"substep.id\"\n          :is-clearable=\"false\"\n          label-prop=\"questionHeader\"\n          value-prop=\"id\"\n          :options=\"step.substeps\"\n          @input=\"$emit('toggle-drop-off', {step, substep: $event.option})\"\n        />\n      </template>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No drop-off for this {{ ['activation', 'passive'].includes(substep.substepType) ? 'content' : 'question' }} with the selected filters\n    </p>\n\n    <OverviewTable\n      :items=\"items\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"itemsPerPage\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      is-spaced\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell :class=\"$style.name\">\n          Learner name\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.address\">\n          Address\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.reason\">\n          Drop-off reason\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item}\">\n        <TableCell :class=\"$style.name\">\n          <strong>\n            <UserName :user=\"{id: item.id, displayName: item.name}\" />\n          </strong>\n        </TableCell>\n        <TableCell :class=\"$style.address\">\n          <div>\n            {{ item.addressValue }}\n            <br><small text-muted>\n              <AddressType :type=\"item.addressType\" />\n            </small>\n          </div>\n        </TableCell>\n        <TableCell :class=\"$style.reason\">\n          <div>\n            {{ item.dropOffReason }}\n            <br><small text-muted>{{ stripHtml(item.additionalInformation) }}</small>\n          </div>\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 1;\n}\n.address {\n  flex: 2\n}\n.reason {\n  flex: 2;\n}\n.substepSelect {\n  width: 500px;\n}\n</style>\n","\n//Languages constant\nexport const languages = {\n  ARABIC: 'ar',\n  BENGALI: 'bn',\n  CHINESE: 'zh',\n  SIMPLIFIED_CHINESE: 'zh-cn',\n  CZECH: 'cs',\n  DUTCH: 'nl',\n  ENGLISH: 'en',\n  FRENCH: 'fr',\n  FRENCH_CANADIAN: 'fr-ca',\n  GERMAN: 'de',\n  GUJARATI: 'gu',\n  HINDI: 'hi',\n  HUNGARIAN: 'hu',\n  INDONESIAN: 'id',\n  ITALIAN: 'it',\n  JAPANESE: 'ja',\n  JAVANESE: 'jv',\n  KOREAN: 'ko',\n  MALAY: 'ms',\n  MARATHI: 'mr',\n  PERSIAN: 'fa',\n  POLISH: 'pl',\n  PORTUGUESE: 'pt',\n  PUNJABI: 'pa',\n  ROMANIAN: 'ro',\n  RUSSIAN: 'ru',\n  SLOVAK: 'sk',\n  SPANISH: 'es',\n  TAMIL: 'ta',\n  TELUGU: 'te',\n  THAI: 'th',\n  TURKISH: 'tr',\n  UKRANIAN: 'uk',\n  URDU: 'ur',\n  VIETNAMESE: 'vi',\n}\n\n//Language options\nexport const languageOptions = [\n  {\n    value: languages.ENGLISH,\n    label: 'English',\n  },\n  {\n    value: languages.ARABIC,\n    label: 'العربية (Arabic)',\n  },\n  {\n    value: languages.BENGALI,\n    label: 'বাংলা (Bengali)',\n  },\n  {\n    value: languages.CHINESE,\n    label: '中文 (Mandarin Chinese)',\n  },\n  {\n    value: languages.SIMPLIFIED_CHINESE,\n    label: '简体中文 (Simplified Chinese)',\n  },\n  {\n    value: languages.CZECH,\n    label: 'Čeština (Czech)',\n  },\n  {\n    value: languages.DUTCH,\n    label: 'Nederlands (Dutch)',\n  },\n  {\n    value: languages.FRENCH,\n    label: 'Français (French)',\n  },\n  {\n    value: languages.FRENCH_CANADIAN,\n    label: 'Français (Canada)',\n  },\n  {\n    value: languages.GERMAN,\n    label: 'Deutsch (German)',\n  },\n  {\n    value: languages.GUJARATI,\n    label: 'ગુજરાતી (Gujarati)',\n  },\n  {\n    value: languages.HINDI,\n    label: 'हिंदी (Hindi)',\n  },\n  {\n    value: languages.HUNGARIAN,\n    label: 'Magyar (Hungarian)',\n  },\n  {\n    value: languages.INDONESIAN,\n    label: 'Bahasa Indonesia (Indonesian)',\n  },\n  {\n    value: languages.ITALIAN,\n    label: 'Italiano (Italian)',\n  },\n  {\n    value: languages.JAPANESE,\n    label: '日本語 (Japanese)',\n  },\n  {\n    value: languages.JAVANESE,\n    label: 'ꦧꦱꦗꦮ (Javanese)',\n  },\n  {\n    value: languages.KOREAN,\n    label: '한국어 (Korean)',\n  },\n  {\n    value: languages.MALAY,\n    label: 'Bahasa Melayu (Malay)',\n  },\n  {\n    value: languages.MARATHI,\n    label: 'मराठी (Marathi)',\n  },\n  {\n    value: languages.PERSIAN,\n    label: 'فارسی (Persian)',\n  },\n  {\n    value: languages.POLISH,\n    label: 'Polski (Polish)',\n  },\n  {\n    value: languages.PORTUGUESE,\n    label: 'Português (Portuguese)',\n  },\n  {\n    value: languages.PUNJABI,\n    label: 'ਪੰਜਾਬੀ (Punjabi)',\n  },\n  {\n    value: languages.ROMANIAN,\n    label: 'Română (Romanian)',\n  },\n  {\n    value: languages.RUSSIAN,\n    label: 'Русский (Russian)',\n  },\n  {\n    value: languages.SLOVAK,\n    label: 'Slovenčina (Slovak)',\n  },\n  {\n    value: languages.SPANISH,\n    label: 'Español (Spanish)',\n  },\n  {\n    value: languages.TAMIL,\n    label: 'தமிழ் (Tamil)',\n  },\n  {\n    value: languages.TELUGU,\n    label: 'తెలుగు (Telugu)',\n  },\n  {\n    value: languages.THAI,\n    label: 'ไทย (Thai)',\n  },\n  {\n    value: languages.TURKISH,\n    label: 'Türkçe (Turkish)',\n  },\n  {\n    value: languages.UKRANIAN,\n    label: 'Українська (Ukrainian)',\n  },\n  {\n    value: languages.URDU,\n    label: 'اردو (Urdu)',\n  },\n  {\n    value: languages.VIETNAMESE,\n    label: 'Tiếng Việt (Vietnamese)',\n  },\n]\n\n//Alphabets for various languages\nexport const alphabets = {\n  latin: [...Array(26).keys()].map(i => String.fromCharCode(i + 65)),\n  ar: [\n    'ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'و', 'ي',\n  ],\n  tr: [\n    'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z',\n  ],\n  uk: [\n    'А', 'Б', 'В', 'Г', 'Г', 'Д', 'Е', 'Є', 'Ж', 'З', 'И', 'І', 'Ї', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ь', 'Ю', 'Я',\n  ],\n}\n","import {arraySequence} from '@/helpers/array.js'\nimport {flatArrayToOptions} from '@/helpers/options.js'\nimport {languages, languageOptions} from '@/constants/languages.js'\n\n//Course creation type flow steps\nexport const courseCreateModalFlowSteps = {\n  MANUAL: 'manual',\n  AI: 'ai',\n}\n\n//Course edit flow steps\nexport const courseEditFlowSteps = {\n  DETAILS: 'details',\n  LESSONS: 'lessons',\n  NUDGE: 'nudge',\n}\n\n//Course statuses\nexport const courseStatuses = {\n  PUBLISHED: 'published',\n  DRAFT: 'draft',\n  NUDGE: 'nudge',\n  TEMPLATE: 'template',\n  ARCHIVED: 'archived',\n  GENERATING: 'generating',\n}\n\n//Course filter tabs\nexport const courseFilterTabs = {\n  ALL: 'all',\n  RECENT: 'recent',\n  FAVORITES: 'favorites',\n  ARCHIVED: 'archived',\n}\n\n//Course filter tab options\nexport const courseFilterTabOptions = [\n  {\n    value: courseFilterTabs.ALL,\n    key: courseFilterTabs.ALL,\n    label: 'All',\n  },\n  {\n    value: courseFilterTabs.RECENT,\n    key: courseFilterTabs.RECENT,\n    label: 'Recent',\n  },\n  {\n    value: courseFilterTabs.FAVORITES,\n    key: courseFilterTabs.FAVORITES,\n    label: 'Favorites',\n  },\n  {\n    value: courseFilterTabs.ARCHIVED,\n    key: courseFilterTabs.ARCHIVED,\n    label: 'Archived',\n  },\n]\n\n//Course filter statuses\nexport const courseFilterStatuses = {\n  DRAFT: 'draft',\n  PUBLISHED: 'published',\n  INACTIVE: 'inactive',\n}\n\n//Course filter status options\nexport const courseFilterStatusOptions = [\n  {\n    value: courseFilterStatuses.DRAFT,\n    label: 'Draft',\n  },\n  {\n    value: courseFilterStatuses.PUBLISHED,\n    label: 'Published',\n  },\n  {\n    value: courseFilterStatuses.INACTIVE,\n    label: 'Inactive',\n  },\n]\n\n//Course filter types\nexport const courseFilterTypes = {\n  COURSES: 'courses',\n  NUDGES: 'nudges',\n  FOLDERS: 'folders',\n}\n\n//Course filter type options\nexport const courseFilterTypeOptions = [\n  {\n    value: courseFilterTypes.COURSES,\n    label: 'Courses',\n  },\n  {\n    value: courseFilterTypes.NUDGES,\n    label: 'Nudges',\n  },\n  {\n    value: courseFilterTypes.FOLDERS,\n    label: 'Folders',\n  },\n]\n\n//Course training types\nexport const courseTrainingTypes = {\n  AWARENESS_BUILDING: 'awareness building',\n  REINFORCEMENT: 'reinforcement',\n  SKILL_BUILDING: 'skill building',\n  PRODUCT_TRAINING: 'product training',\n  ONBOARDING: 'onboarding',\n  COMPLIANCE: 'compliance',\n  KNOWLEDGE_CHECKS: 'knowledge checks',\n}\n\n//Course expertise levels\nexport const courseExpertiseLevels = {\n  BEGINNER: 'beginner',\n  INTERMEDIATE: 'intermediate',\n  EXPERT: 'expert',\n  CUSTOM: 'custom',\n}\n\n//Course training type options\nexport const courseTrainingTypeOptions = [\n  {\n    value: courseTrainingTypes.AWARENESS_BUILDING,\n    label: 'Awareness building',\n  },\n  {\n    value: courseTrainingTypes.REINFORCEMENT,\n    label: 'Reinforcement',\n  },\n  {\n    value: courseTrainingTypes.SKILL_BUILDING,\n    label: 'Skill building',\n  },\n  {\n    value: courseTrainingTypes.PRODUCT_TRAINING,\n    label: 'Product training',\n  },\n  {\n    value: courseTrainingTypes.ONBOARDING,\n    label: 'Onboarding',\n  },\n  {\n    value: courseTrainingTypes.COMPLIANCE,\n    label: 'Compliance',\n  },\n  // {\n  //   value: courseTrainingTypes.KNOWLEDGE_CHECKS,\n  //   label: 'Knowledge checks',\n  // },\n]\n\n//Course expertise levels\nexport const courseExpertiseLevelOptions = [\n  {\n    value: courseExpertiseLevels.BEGINNER,\n    label: 'Beginner',\n  },\n  {\n    value: courseExpertiseLevels.INTERMEDIATE,\n    label: 'Intermediate',\n  },\n  {\n    value: courseExpertiseLevels.EXPERT,\n    label: 'Expert',\n  },\n  {\n    value: courseExpertiseLevels.CUSTOM,\n    label: 'Custom',\n  },\n]\n\n//Course length options\nexport const courseLengthOptions = flatArrayToOptions(arraySequence(3, 10))\n\n//Course language options\nexport const courseLanguageOptions = languageOptions.\n  filter(option => [\n    languages.ARABIC,\n    languages.BENGALI,\n    languages.CHINESE,\n    languages.SIMPLIFIED_CHINESE,\n    languages.CZECH,\n    languages.DUTCH,\n    languages.ENGLISH,\n    languages.FRENCH,\n    languages.FRENCH_CANADIAN,\n    languages.GERMAN,\n    languages.GUJARATI,\n    languages.HINDI,\n    languages.HUNGARIAN,\n    languages.INDONESIAN,\n    languages.ITALIAN,\n    languages.JAPANESE,\n    languages.JAVANESE,\n    languages.KOREAN,\n    languages.MALAY,\n    languages.MARATHI,\n    languages.PERSIAN,\n    languages.POLISH,\n    languages.PORTUGUESE,\n    languages.PUNJABI,\n    languages.ROMANIAN,\n    languages.RUSSIAN,\n    languages.SLOVAK,\n    languages.SPANISH,\n    languages.TAMIL,\n    languages.TELUGU,\n    languages.THAI,\n    languages.TURKISH,\n    languages.UKRANIAN,\n    languages.URDU,\n    languages.VIETNAMESE,\n  ].includes(option.value))\n\n//Step types\nexport const stepTypes = {\n  NORMAL: 'normal',\n  ACTIVATION: 'activation',\n}\n\n//Substep types\nexport const substepTypes = {\n  ACTIVATION: 'activation',\n  WRITTEN_ANSWER: 'written_answer',\n  AI_EVALUATED: 'ai_evaluated',\n  CHOICE: 'choice',\n  RATING: 'rating',\n  CONFIDENCE_LIFT: 'confidence_lift',\n  NPS_SURVEY: 'nps_survey',\n  LEARNER_SENTIMENT: 'learner_sentiment',\n  PASSIVE: 'passive',\n}\n\n//Substep type options\nexport const substepTypeOptions = [\n  {\n    value: substepTypes.ACTIVATION,\n    label: 'activation message',\n  },\n  {\n    value: substepTypes.WRITTEN_ANSWER,\n    label: 'open-ended',\n  },\n  {\n    value: substepTypes.AI_EVALUATED,\n    label: 'open-ended (AI evaluated)',\n  },\n  {\n    value: substepTypes.CHOICE,\n    label: 'multiple choice',\n  },\n  {\n    value: substepTypes.RATING,\n    label: 'rating',\n  },\n  {\n    value: substepTypes.CONFIDENCE_LIFT,\n    label: 'confidence lift',\n  },\n  {\n    value: substepTypes.NPS_SURVEY,\n    label: 'NPS survey',\n  },\n  {\n    value: substepTypes.LEARNER_SENTIMENT,\n    label: 'learner sentiment',\n  },\n  {\n    value: substepTypes.PASSIVE,\n    label: 'passive',\n  },\n]\n\n//Substep types for survey substeps\nexport const surveySubstepTypes = [\n  substepTypes.CONFIDENCE_LIFT,\n  substepTypes.NPS_SURVEY,\n  substepTypes.LEARNER_SENTIMENT,\n]\n\n//Static character limits\nexport const characterLimits = {\n  STEP_NAME: 240,\n  STEP_TITLE: 240,\n  SUBSTEP_BODY: 1200,\n  SUBSTEP_COMBINED_SINGLE_SELECT: 300,\n  SUBSTEP_COMBINED_MULTI_SELECT: 260,\n  SUBSTEP_RESPONSE: 800,\n  WHATSAPP_MESSAGE: 1020,\n  ACTIVATION_MESSAGE: 500,\n  SOURCE_TEXT: 600000,\n  SOURCE_MATERIAL_TOTAL: 600000,\n}\n","import {alphabets} from '@/constants/languages'\nimport {computed} from 'vue'\n\n/**\n * Use language composable\n*/\nexport function useAlphabet(language) {\n\n  //Computed\n  const alphabet = computed(() => alphabets[language.value] || alphabets.latin)\n  const alphabetLength = computed(() => alphabet.value.length)\n\n  //Methods\n  const getAlphabetLetterForIndex = index => {\n    //Beyond Z? Prepend with first letter\n    if (index >= alphabetLength.value) {\n      return `${alphabet.value[0]}${getAlphabetLetterForIndex(index - alphabetLength.value, alphabet.value)}`\n    }\n\n    return alphabet.value[index]\n  }\n\n  //Expose interface\n  return {\n    alphabet,\n    alphabetLength,\n    getAlphabetLetterForIndex,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {substepTypes} from '@/constants/courses.js'\nimport {responsesApi} from '@/api/responses.api.js'\nimport {useAlphabet} from '@/composables/use-alphabet.js'\nimport {toRefs, ref, computed, watch} from 'vue'\n\n//NOTE: While this component has been refactored from usinsg Bootstrap tables\n//to using the OverviewTable component, it still uses legacy querying logic\n//which at some point should be refactored so that the useQuerying and useSearch\n//composables can be utilised, as well as the SearchPanel component, and perhaps\n//filters, etc.\n\n//Emits and props\nconst emit = defineEmits([\n  'toggle-substep-details',\n  'reload-data',\n  'close',\n])\nconst props = defineProps({\n  baseParams: {\n    type: Object,\n    required: true,\n  },\n  step: {\n    type: Object,\n    default: null,\n  },\n  substep: {\n    type: Object,\n    default: null,\n  },\n  language: {\n    type: String,\n    default: null,\n  },\n})\n\n//Get props\nconst {baseParams, substep, language} = toRefs(props)\n\n//Alphabet composable\nconst {getAlphabetLetterForIndex} = useAlphabet(language)\n\n//Refs\nconst responses = ref([])\nconst total = ref(0)\nconst accuracy = ref(0)\nconst inaccuracy = computed(() => 1 - accuracy.value)\nconst isLoading = ref(false)\nconst isAiEvaluated = computed(() => substep.value?.substepType === substepTypes.AI_EVALUATED)\nconst isMultipleChoice = computed(() => substep.value?.substepType === substepTypes.CHOICE)\n\n//Params and pagination\nconst currentPage = ref(1)\nconst limit = ref(10)\nconst search = ref('')\nconst sort = ref('')\n\n//Combined params\nconst params = computed(() => ({\n  ...baseParams.value,\n  offset: (currentPage.value - 1) * limit.value,\n  limit: limit.value,\n  search: search.value,\n  sort: sort.value,\n  substepId: substep.value?.id,\n}))\n\n//Querying\nconst loadData = async () => {\n\n  //Only when we have a substep\n  if (!substep.value) {\n    return\n  }\n\n  //Load\n  try {\n    isLoading.value = true\n    const data = await responsesApi.query(params.value)\n    responses.value = data.responses\n    accuracy.value = data.meta.accuracy\n    total.value = data.meta.total\n  }\n  catch {\n    //Fall through\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Sort param handling\nconst changeSort = value => {\n  sort.value = value\n  loadData()\n}\n\n//Search handling\nconst fullSearch = searchTerm => {\n  search.value = searchTerm\n  loadData()\n}\nconst clearSearch = () => {\n  search.value = ''\n  loadData()\n}\n\n//Pagination handling\nconst changeLimit = num => {\n  limit.value = num\n  loadData()\n}\nconst loadPage = page => {\n  currentPage.value = page\n  loadData()\n}\n\n//Toggle correct choice\nconst toggleCorrect = async response => {\n\n  //Ignore for non-AI evaluated substeps\n  if (!isAiEvaluated.value) {\n    return\n  }\n\n  //Toggle correct\n  try {\n    response.correct = !response.correct\n    await responsesApi.toggleCorrect(response.id)\n  }\n\n  //Revert if request failed for some reason\n  catch {\n    response.correct = !response.correct\n  }\n\n  //Reload data to update overall accuracy\n  finally {\n    emit('reload-data')\n  }\n}\n\n//Check if correct choice\nconst isCorrectChoice = choiceIndex => {\n  if (substep.value.multiselect) {\n    return substep.value.correctIndices?.includes(choiceIndex)\n  }\n  return substep.value.correctIndex == choiceIndex\n}\n\n//Download CSV\nconst downloadCsv = () => responsesApi.downloadCsv(params.value)\n\n//Load data\nwatch(substep, loadData)\n\n//Expose reload helper\ndefineExpose({\n  reloadData: () => loadData(),\n})\n</script>\n\n<template>\n  <Modal\n    :header=\"`Responses for ${substep?.questionHeader}`\"\n    v-bind=\"$attrs\"\n    is-full\n    @close=\"$emit('close')\"\n  >\n    <OverviewTableHeader>\n      <template #filters>\n        <SelectInput\n          :class=\"$style.substepSelect\"\n          :value=\"substep.id\"\n          :is-clearable=\"false\"\n          label-prop=\"questionHeader\"\n          value-prop=\"id\"\n          :options=\"step.substeps\"\n          @input=\"$emit('toggle-substep-details', {step, substep: $event.option, language})\"\n        />\n      </template>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"total === 0\"\n          @click=\"downloadCsv()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <p v-if=\"!isLoading && total === 0\">\n      No response data available for this question yet\n    </p>\n\n    <div\n      v-if=\"isMultipleChoice && total > 0\"\n      test-id=\"substepChoices\"\n      :class=\"$style.extra\"\n    >\n      <div\n        v-for=\"(choice, i) in substep.choices\"\n        :key=\"i\"\n        :test-id=\"isCorrectChoice(i) ? 'correctChoice' : undefined\"\n        :class=\"{\n          [$style.line]: true,\n          [$style.correct]: isCorrectChoice(i),\n        }\"\n      >\n        <span>{{ getAlphabetLetterForIndex(i) }}. {{ choice }}</span>\n        <span v-if=\"substep.multiselect\">{{ substep.choiceCounts[i] }} answered</span>\n        <Percentage\n          v-else\n          :options=\"{maximumFractionDigits: 1}\"\n          :fraction=\"substep.choiceRates[i]\"\n        />\n      </div>\n    </div>\n    <div\n      v-else-if=\"isAiEvaluated && total > 0\"\n      :class=\"$style.extra\"\n    >\n      <div\n        :class=\"{\n          [$style.line]: true,\n          [$style.correct]: true,\n        }\"\n      >\n        <span>Correct:</span>\n        <Percentage\n          :options=\"{maximumFractionDigits: 1}\"\n          :fraction=\"accuracy\"\n        />\n      </div>\n      <div :class=\"$style.line\">\n        <span>Incorrect:</span>\n        <Percentage\n          :options=\"{maximumFractionDigits: 1}\"\n          :fraction=\"inaccuracy\"\n        />\n      </div>\n    </div>\n\n    <OverviewTable\n      :items=\"responses\"\n      :is-loading=\"isLoading\"\n      :items-per-page=\"limit\"\n      :current-page=\"currentPage\"\n      :total-items=\"total\"\n      @load-page=\"loadPage($event.page)\"\n      @change-items-per-page=\"changeLimit($event.itemsPerPage)\"\n    >\n      <template #headerRow>\n        <TableHeaderCell\n          :class=\"$style.learnerName\"\n          is-sortable\n          sort-prop=\"learnerName\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Learner name\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.email\"\n          is-sortable\n          sort-prop=\"email\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Email\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.answer\"\n          is-sortable\n          sort-prop=\"answer\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Answer\n        </TableHeaderCell>\n        <TableHeaderCell\n          :class=\"$style.correct\"\n          is-sortable\n          sort-prop=\"correct\"\n          :current-sort=\"sort\"\n          @sort=\"changeSort($event.sort)\"\n        >\n          Correct\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item: response}\">\n        <TableCell :class=\"$style.learnerName\">\n          <strong>{{ response.learnerName }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.email\">\n          <strong>{{ response.email }}</strong>\n        </TableCell>\n        <TableCell :class=\"$style.answer\">\n          <Tooltip\n            :text=\"response.answer\"\n            :is-disabled=\"response.answer === response.parsedAnswer\"\n          >\n            {{ response.parsedAnswer }}\n          </Tooltip>\n        </TableCell>\n        <TableCell :class=\"$style.correct\">\n          <Tooltip\n            v-if=\"isAiEvaluated || isMultipleChoice\"\n            text=\"Click to toggle the correctness of the response\"\n            :is-disabled=\"!isAiEvaluated\"\n          >\n            <Icon\n              v-if=\"response.correct === true\"\n              icon=\"check_circle\"\n              color=\"success\"\n              :is-clickable=\"isAiEvaluated\"\n              @click=\"toggleCorrect(response)\"\n            />\n            <Icon\n              v-else-if=\"response.correct === false\"\n              icon=\"error_outline\"\n              color=\"danger\"\n              :is-clickable=\"isAiEvaluated\"\n              @click=\"toggleCorrect(response)\"\n            />\n          </Tooltip>\n          <span\n            v-else\n            text-muted\n          >N/A</span>\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.learnerName {\n  flex: 2;\n}\n.email {\n  flex: 2;\n}\n.answer {\n  flex: 2;\n}\n.correct {\n  flex: 0 0 3rem;\n}\n.extra {\n  margin-bottom: 1rem;\n}\n.line {\n  display: flex;\n  align-items: flex-end;\n  width: fit-content;\n  gap: 0.25rem;\n  &.correct {\n    color: var(--color-text-success);\n    background: var(--bg-status-success);\n  }\n}\n.substepSelect {\n  width: 500px;\n}\n</style>\n","/*!\n * @kurkle/color v0.3.2\n * https://github.com/kurkle/color#readme\n * (c) 2023 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v) {\n  return v + 0.5 | 0;\n}\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\nfunction p2b(v) {\n  return lim(round(v * 2.55), 0, 255);\n}\nfunction b2p(v) {\n  return lim(round(v / 2.55), 0, 100);\n}\nfunction n2b(v) {\n  return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v) {\n  return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v) {\n  return lim(round(v * 100), 0, 100);\n}\n\nconst map$1 = {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};\nconst hex = [...'0123456789ABCDEF'];\nconst h1 = b => hex[b & 0xF];\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq = b => ((b & 0xF0) >> 4) === (b & 0xF);\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\nfunction hexParse(str) {\n  var len = str.length;\n  var ret;\n  if (str[0] === '#') {\n    if (len === 4 || len === 5) {\n      ret = {\n        r: 255 & map$1[str[1]] * 17,\n        g: 255 & map$1[str[2]] * 17,\n        b: 255 & map$1[str[3]] * 17,\n        a: len === 5 ? map$1[str[4]] * 17 : 255\n      };\n    } else if (len === 7 || len === 9) {\n      ret = {\n        r: map$1[str[1]] << 4 | map$1[str[2]],\n        g: map$1[str[3]] << 4 | map$1[str[4]],\n        b: map$1[str[5]] << 4 | map$1[str[6]],\n        a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255\n      };\n    }\n  }\n  return ret;\n}\nconst alpha = (a, f) => a < 255 ? f(a) : '';\nfunction hexString(v) {\n  var f = isShort(v) ? h1 : h2;\n  return v\n    ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n    : undefined;\n}\n\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l) {\n  const a = s * Math.min(l, 1 - l);\n  const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n  return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v) {\n  const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n  return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b) {\n  const rgb = hsl2rgbn(h, 1, 0.5);\n  let i;\n  if (w + b > 1) {\n    i = 1 / (w + b);\n    w *= i;\n    b *= i;\n  }\n  for (i = 0; i < 3; i++) {\n    rgb[i] *= 1 - w - b;\n    rgb[i] += w;\n  }\n  return rgb;\n}\nfunction hueValue(r, g, b, d, max) {\n  if (r === max) {\n    return ((g - b) / d) + (g < b ? 6 : 0);\n  }\n  if (g === max) {\n    return (b - r) / d + 2;\n  }\n  return (r - g) / d + 4;\n}\nfunction rgb2hsl(v) {\n  const range = 255;\n  const r = v.r / range;\n  const g = v.g / range;\n  const b = v.b / range;\n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const l = (max + min) / 2;\n  let h, s, d;\n  if (max !== min) {\n    d = max - min;\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n    h = hueValue(r, g, b, d, max);\n    h = h * 60 + 0.5;\n  }\n  return [h | 0, s || 0, l];\n}\nfunction calln(f, a, b, c) {\n  return (\n    Array.isArray(a)\n      ? f(a[0], a[1], a[2])\n      : f(a, b, c)\n  ).map(n2b);\n}\nfunction hsl2rgb(h, s, l) {\n  return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b) {\n  return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v) {\n  return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h) {\n  return (h % 360 + 360) % 360;\n}\nfunction hueParse(str) {\n  const m = HUE_RE.exec(str);\n  let a = 255;\n  let v;\n  if (!m) {\n    return;\n  }\n  if (m[5] !== v) {\n    a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n  }\n  const h = hue(+m[2]);\n  const p1 = +m[3] / 100;\n  const p2 = +m[4] / 100;\n  if (m[1] === 'hwb') {\n    v = hwb2rgb(h, p1, p2);\n  } else if (m[1] === 'hsv') {\n    v = hsv2rgb(h, p1, p2);\n  } else {\n    v = hsl2rgb(h, p1, p2);\n  }\n  return {\n    r: v[0],\n    g: v[1],\n    b: v[2],\n    a: a\n  };\n}\nfunction rotate(v, deg) {\n  var h = rgb2hsl(v);\n  h[0] = hue(h[0] + deg);\n  h = hsl2rgb(h);\n  v.r = h[0];\n  v.g = h[1];\n  v.b = h[2];\n}\nfunction hslString(v) {\n  if (!v) {\n    return;\n  }\n  const a = rgb2hsl(v);\n  const h = a[0];\n  const s = n2p(a[1]);\n  const l = n2p(a[2]);\n  return v.a < 255\n    ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n    : `hsl(${h}, ${s}%, ${l}%)`;\n}\n\nconst map = {\n  x: 'dark',\n  Z: 'light',\n  Y: 're',\n  X: 'blu',\n  W: 'gr',\n  V: 'medium',\n  U: 'slate',\n  A: 'ee',\n  T: 'ol',\n  S: 'or',\n  B: 'ra',\n  C: 'lateg',\n  D: 'ights',\n  R: 'in',\n  Q: 'turquois',\n  E: 'hi',\n  P: 'ro',\n  O: 'al',\n  N: 'le',\n  M: 'de',\n  L: 'yello',\n  F: 'en',\n  K: 'ch',\n  G: 'arks',\n  H: 'ea',\n  I: 'ightg',\n  J: 'wh'\n};\nconst names$1 = {\n  OiceXe: 'f0f8ff',\n  antiquewEte: 'faebd7',\n  aqua: 'ffff',\n  aquamarRe: '7fffd4',\n  azuY: 'f0ffff',\n  beige: 'f5f5dc',\n  bisque: 'ffe4c4',\n  black: '0',\n  blanKedOmond: 'ffebcd',\n  Xe: 'ff',\n  XeviTet: '8a2be2',\n  bPwn: 'a52a2a',\n  burlywood: 'deb887',\n  caMtXe: '5f9ea0',\n  KartYuse: '7fff00',\n  KocTate: 'd2691e',\n  cSO: 'ff7f50',\n  cSnflowerXe: '6495ed',\n  cSnsilk: 'fff8dc',\n  crimson: 'dc143c',\n  cyan: 'ffff',\n  xXe: '8b',\n  xcyan: '8b8b',\n  xgTMnPd: 'b8860b',\n  xWay: 'a9a9a9',\n  xgYF: '6400',\n  xgYy: 'a9a9a9',\n  xkhaki: 'bdb76b',\n  xmagFta: '8b008b',\n  xTivegYF: '556b2f',\n  xSange: 'ff8c00',\n  xScEd: '9932cc',\n  xYd: '8b0000',\n  xsOmon: 'e9967a',\n  xsHgYF: '8fbc8f',\n  xUXe: '483d8b',\n  xUWay: '2f4f4f',\n  xUgYy: '2f4f4f',\n  xQe: 'ced1',\n  xviTet: '9400d3',\n  dAppRk: 'ff1493',\n  dApskyXe: 'bfff',\n  dimWay: '696969',\n  dimgYy: '696969',\n  dodgerXe: '1e90ff',\n  fiYbrick: 'b22222',\n  flSOwEte: 'fffaf0',\n  foYstWAn: '228b22',\n  fuKsia: 'ff00ff',\n  gaRsbSo: 'dcdcdc',\n  ghostwEte: 'f8f8ff',\n  gTd: 'ffd700',\n  gTMnPd: 'daa520',\n  Way: '808080',\n  gYF: '8000',\n  gYFLw: 'adff2f',\n  gYy: '808080',\n  honeyMw: 'f0fff0',\n  hotpRk: 'ff69b4',\n  RdianYd: 'cd5c5c',\n  Rdigo: '4b0082',\n  ivSy: 'fffff0',\n  khaki: 'f0e68c',\n  lavFMr: 'e6e6fa',\n  lavFMrXsh: 'fff0f5',\n  lawngYF: '7cfc00',\n  NmoncEffon: 'fffacd',\n  ZXe: 'add8e6',\n  ZcSO: 'f08080',\n  Zcyan: 'e0ffff',\n  ZgTMnPdLw: 'fafad2',\n  ZWay: 'd3d3d3',\n  ZgYF: '90ee90',\n  ZgYy: 'd3d3d3',\n  ZpRk: 'ffb6c1',\n  ZsOmon: 'ffa07a',\n  ZsHgYF: '20b2aa',\n  ZskyXe: '87cefa',\n  ZUWay: '778899',\n  ZUgYy: '778899',\n  ZstAlXe: 'b0c4de',\n  ZLw: 'ffffe0',\n  lime: 'ff00',\n  limegYF: '32cd32',\n  lRF: 'faf0e6',\n  magFta: 'ff00ff',\n  maPon: '800000',\n  VaquamarRe: '66cdaa',\n  VXe: 'cd',\n  VScEd: 'ba55d3',\n  VpurpN: '9370db',\n  VsHgYF: '3cb371',\n  VUXe: '7b68ee',\n  VsprRggYF: 'fa9a',\n  VQe: '48d1cc',\n  VviTetYd: 'c71585',\n  midnightXe: '191970',\n  mRtcYam: 'f5fffa',\n  mistyPse: 'ffe4e1',\n  moccasR: 'ffe4b5',\n  navajowEte: 'ffdead',\n  navy: '80',\n  Tdlace: 'fdf5e6',\n  Tive: '808000',\n  TivedBb: '6b8e23',\n  Sange: 'ffa500',\n  SangeYd: 'ff4500',\n  ScEd: 'da70d6',\n  pOegTMnPd: 'eee8aa',\n  pOegYF: '98fb98',\n  pOeQe: 'afeeee',\n  pOeviTetYd: 'db7093',\n  papayawEp: 'ffefd5',\n  pHKpuff: 'ffdab9',\n  peru: 'cd853f',\n  pRk: 'ffc0cb',\n  plum: 'dda0dd',\n  powMrXe: 'b0e0e6',\n  purpN: '800080',\n  YbeccapurpN: '663399',\n  Yd: 'ff0000',\n  Psybrown: 'bc8f8f',\n  PyOXe: '4169e1',\n  saddNbPwn: '8b4513',\n  sOmon: 'fa8072',\n  sandybPwn: 'f4a460',\n  sHgYF: '2e8b57',\n  sHshell: 'fff5ee',\n  siFna: 'a0522d',\n  silver: 'c0c0c0',\n  skyXe: '87ceeb',\n  UXe: '6a5acd',\n  UWay: '708090',\n  UgYy: '708090',\n  snow: 'fffafa',\n  sprRggYF: 'ff7f',\n  stAlXe: '4682b4',\n  tan: 'd2b48c',\n  teO: '8080',\n  tEstN: 'd8bfd8',\n  tomato: 'ff6347',\n  Qe: '40e0d0',\n  viTet: 'ee82ee',\n  JHt: 'f5deb3',\n  wEte: 'ffffff',\n  wEtesmoke: 'f5f5f5',\n  Lw: 'ffff00',\n  LwgYF: '9acd32'\n};\nfunction unpack() {\n  const unpacked = {};\n  const keys = Object.keys(names$1);\n  const tkeys = Object.keys(map);\n  let i, j, k, ok, nk;\n  for (i = 0; i < keys.length; i++) {\n    ok = nk = keys[i];\n    for (j = 0; j < tkeys.length; j++) {\n      k = tkeys[j];\n      nk = nk.replace(k, map[k]);\n    }\n    k = parseInt(names$1[ok], 16);\n    unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n  }\n  return unpacked;\n}\n\nlet names;\nfunction nameParse(str) {\n  if (!names) {\n    names = unpack();\n    names.transparent = [0, 0, 0, 0];\n  }\n  const a = names[str.toLowerCase()];\n  return a && {\n    r: a[0],\n    g: a[1],\n    b: a[2],\n    a: a.length === 4 ? a[3] : 255\n  };\n}\n\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str) {\n  const m = RGB_RE.exec(str);\n  let a = 255;\n  let r, g, b;\n  if (!m) {\n    return;\n  }\n  if (m[7] !== r) {\n    const v = +m[7];\n    a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n  }\n  r = +m[1];\n  g = +m[3];\n  b = +m[5];\n  r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n  g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n  b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n  return {\n    r: r,\n    g: g,\n    b: b,\n    a: a\n  };\n}\nfunction rgbString(v) {\n  return v && (\n    v.a < 255\n      ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n      : `rgb(${v.r}, ${v.g}, ${v.b})`\n  );\n}\n\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t) {\n  const r = from(b2n(rgb1.r));\n  const g = from(b2n(rgb1.g));\n  const b = from(b2n(rgb1.b));\n  return {\n    r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n    g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n    b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n    a: rgb1.a + t * (rgb2.a - rgb1.a)\n  };\n}\n\nfunction modHSL(v, i, ratio) {\n  if (v) {\n    let tmp = rgb2hsl(v);\n    tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n    tmp = hsl2rgb(tmp);\n    v.r = tmp[0];\n    v.g = tmp[1];\n    v.b = tmp[2];\n  }\n}\nfunction clone(v, proto) {\n  return v ? Object.assign(proto || {}, v) : v;\n}\nfunction fromObject(input) {\n  var v = {r: 0, g: 0, b: 0, a: 255};\n  if (Array.isArray(input)) {\n    if (input.length >= 3) {\n      v = {r: input[0], g: input[1], b: input[2], a: 255};\n      if (input.length > 3) {\n        v.a = n2b(input[3]);\n      }\n    }\n  } else {\n    v = clone(input, {r: 0, g: 0, b: 0, a: 1});\n    v.a = n2b(v.a);\n  }\n  return v;\n}\nfunction functionParse(str) {\n  if (str.charAt(0) === 'r') {\n    return rgbParse(str);\n  }\n  return hueParse(str);\n}\nclass Color {\n  constructor(input) {\n    if (input instanceof Color) {\n      return input;\n    }\n    const type = typeof input;\n    let v;\n    if (type === 'object') {\n      v = fromObject(input);\n    } else if (type === 'string') {\n      v = hexParse(input) || nameParse(input) || functionParse(input);\n    }\n    this._rgb = v;\n    this._valid = !!v;\n  }\n  get valid() {\n    return this._valid;\n  }\n  get rgb() {\n    var v = clone(this._rgb);\n    if (v) {\n      v.a = b2n(v.a);\n    }\n    return v;\n  }\n  set rgb(obj) {\n    this._rgb = fromObject(obj);\n  }\n  rgbString() {\n    return this._valid ? rgbString(this._rgb) : undefined;\n  }\n  hexString() {\n    return this._valid ? hexString(this._rgb) : undefined;\n  }\n  hslString() {\n    return this._valid ? hslString(this._rgb) : undefined;\n  }\n  mix(color, weight) {\n    if (color) {\n      const c1 = this.rgb;\n      const c2 = color.rgb;\n      let w2;\n      const p = weight === w2 ? 0.5 : weight;\n      const w = 2 * p - 1;\n      const a = c1.a - c2.a;\n      const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n      w2 = 1 - w1;\n      c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n      c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n      c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n      c1.a = p * c1.a + (1 - p) * c2.a;\n      this.rgb = c1;\n    }\n    return this;\n  }\n  interpolate(color, t) {\n    if (color) {\n      this._rgb = interpolate(this._rgb, color._rgb, t);\n    }\n    return this;\n  }\n  clone() {\n    return new Color(this.rgb);\n  }\n  alpha(a) {\n    this._rgb.a = n2b(a);\n    return this;\n  }\n  clearer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 - ratio;\n    return this;\n  }\n  greyscale() {\n    const rgb = this._rgb;\n    const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n    rgb.r = rgb.g = rgb.b = val;\n    return this;\n  }\n  opaquer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 + ratio;\n    return this;\n  }\n  negate() {\n    const v = this._rgb;\n    v.r = 255 - v.r;\n    v.g = 255 - v.g;\n    v.b = 255 - v.b;\n    return this;\n  }\n  lighten(ratio) {\n    modHSL(this._rgb, 2, ratio);\n    return this;\n  }\n  darken(ratio) {\n    modHSL(this._rgb, 2, -ratio);\n    return this;\n  }\n  saturate(ratio) {\n    modHSL(this._rgb, 1, ratio);\n    return this;\n  }\n  desaturate(ratio) {\n    modHSL(this._rgb, 1, -ratio);\n    return this;\n  }\n  rotate(deg) {\n    rotate(this._rgb, deg);\n    return this;\n  }\n}\n\nfunction index_esm(input) {\n  return new Color(input);\n}\n\nexport { Color, b2n, b2p, index_esm as default, hexParse, hexString, hsl2rgb, hslString, hsv2rgb, hueParse, hwb2rgb, lim, n2b, n2p, nameParse, p2b, rgb2hsl, rgbParse, rgbString, rotate, round };\n","/*!\n * Chart.js v4.4.6\n * https://www.chartjs.org\n * (c) 2024 Chart.js Contributors\n * Released under the MIT License\n */\nimport { Color } from '@kurkle/color';\n\n/**\n * @namespace Chart.helpers\n */ /**\n * An empty function that can be used, for example, for optional callback.\n */ function noop() {\n/* noop */ }\n/**\n * Returns a unique id, sequentially generated from a global variable.\n */ const uid = (()=>{\n    let id = 0;\n    return ()=>id++;\n})();\n/**\n * Returns true if `value` is neither null nor undefined, else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isNullOrUndef(value) {\n    return value === null || typeof value === 'undefined';\n}\n/**\n * Returns true if `value` is an array (including typed arrays), else returns false.\n * @param value - The value to test.\n * @function\n */ function isArray(value) {\n    if (Array.isArray && Array.isArray(value)) {\n        return true;\n    }\n    const type = Object.prototype.toString.call(value);\n    if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n        return true;\n    }\n    return false;\n}\n/**\n * Returns true if `value` is an object (excluding null), else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isObject(value) {\n    return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\n/**\n * Returns true if `value` is a finite number, else returns false\n * @param value  - The value to test.\n */ function isNumberFinite(value) {\n    return (typeof value === 'number' || value instanceof Number) && isFinite(+value);\n}\n/**\n * Returns `value` if finite, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is not finite.\n */ function finiteOrDefault(value, defaultValue) {\n    return isNumberFinite(value) ? value : defaultValue;\n}\n/**\n * Returns `value` if defined, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is undefined.\n */ function valueOrDefault(value, defaultValue) {\n    return typeof value === 'undefined' ? defaultValue : value;\n}\nconst toPercentage = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 : +value / dimension;\nconst toDimension = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 * dimension : +value;\n/**\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n * @param fn - The function to call.\n * @param args - The arguments with which `fn` should be called.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n */ function callback(fn, args, thisArg) {\n    if (fn && typeof fn.call === 'function') {\n        return fn.apply(thisArg, args);\n    }\n}\nfunction each(loopable, fn, thisArg, reverse) {\n    let i, len, keys;\n    if (isArray(loopable)) {\n        len = loopable.length;\n        if (reverse) {\n            for(i = len - 1; i >= 0; i--){\n                fn.call(thisArg, loopable[i], i);\n            }\n        } else {\n            for(i = 0; i < len; i++){\n                fn.call(thisArg, loopable[i], i);\n            }\n        }\n    } else if (isObject(loopable)) {\n        keys = Object.keys(loopable);\n        len = keys.length;\n        for(i = 0; i < len; i++){\n            fn.call(thisArg, loopable[keys[i]], keys[i]);\n        }\n    }\n}\n/**\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n * @param a0 - The array to compare\n * @param a1 - The array to compare\n * @private\n */ function _elementsEqual(a0, a1) {\n    let i, ilen, v0, v1;\n    if (!a0 || !a1 || a0.length !== a1.length) {\n        return false;\n    }\n    for(i = 0, ilen = a0.length; i < ilen; ++i){\n        v0 = a0[i];\n        v1 = a1[i];\n        if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Returns a deep copy of `source` without keeping references on objects and arrays.\n * @param source - The value to clone.\n */ function clone(source) {\n    if (isArray(source)) {\n        return source.map(clone);\n    }\n    if (isObject(source)) {\n        const target = Object.create(null);\n        const keys = Object.keys(source);\n        const klen = keys.length;\n        let k = 0;\n        for(; k < klen; ++k){\n            target[keys[k]] = clone(source[keys[k]]);\n        }\n        return target;\n    }\n    return source;\n}\nfunction isValidKey(key) {\n    return [\n        '__proto__',\n        'prototype',\n        'constructor'\n    ].indexOf(key) === -1;\n}\n/**\n * The default merger when Chart.helpers.merge is called without merger option.\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n * @private\n */ function _merger(key, target, source, options) {\n    if (!isValidKey(key)) {\n        return;\n    }\n    const tval = target[key];\n    const sval = source[key];\n    if (isObject(tval) && isObject(sval)) {\n        // eslint-disable-next-line @typescript-eslint/no-use-before-define\n        merge(tval, sval, options);\n    } else {\n        target[key] = clone(sval);\n    }\n}\nfunction merge(target, source, options) {\n    const sources = isArray(source) ? source : [\n        source\n    ];\n    const ilen = sources.length;\n    if (!isObject(target)) {\n        return target;\n    }\n    options = options || {};\n    const merger = options.merger || _merger;\n    let current;\n    for(let i = 0; i < ilen; ++i){\n        current = sources[i];\n        if (!isObject(current)) {\n            continue;\n        }\n        const keys = Object.keys(current);\n        for(let k = 0, klen = keys.length; k < klen; ++k){\n            merger(keys[k], target, current, options);\n        }\n    }\n    return target;\n}\nfunction mergeIf(target, source) {\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    return merge(target, source, {\n        merger: _mergerIf\n    });\n}\n/**\n * Merges source[key] in target[key] only if target[key] is undefined.\n * @private\n */ function _mergerIf(key, target, source) {\n    if (!isValidKey(key)) {\n        return;\n    }\n    const tval = target[key];\n    const sval = source[key];\n    if (isObject(tval) && isObject(sval)) {\n        mergeIf(tval, sval);\n    } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n        target[key] = clone(sval);\n    }\n}\n/**\n * @private\n */ function _deprecated(scope, value, previous, current) {\n    if (value !== undefined) {\n        console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n    }\n}\n// resolveObjectKey resolver cache\nconst keyResolvers = {\n    // Chart.helpers.core resolveObjectKey should resolve empty key to root object\n    '': (v)=>v,\n    // default resolvers\n    x: (o)=>o.x,\n    y: (o)=>o.y\n};\n/**\n * @private\n */ function _splitKey(key) {\n    const parts = key.split('.');\n    const keys = [];\n    let tmp = '';\n    for (const part of parts){\n        tmp += part;\n        if (tmp.endsWith('\\\\')) {\n            tmp = tmp.slice(0, -1) + '.';\n        } else {\n            keys.push(tmp);\n            tmp = '';\n        }\n    }\n    return keys;\n}\nfunction _getKeyResolver(key) {\n    const keys = _splitKey(key);\n    return (obj)=>{\n        for (const k of keys){\n            if (k === '') {\n                break;\n            }\n            obj = obj && obj[k];\n        }\n        return obj;\n    };\n}\nfunction resolveObjectKey(obj, key) {\n    const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n    return resolver(obj);\n}\n/**\n * @private\n */ function _capitalize(str) {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n}\nconst defined = (value)=>typeof value !== 'undefined';\nconst isFunction = (value)=>typeof value === 'function';\n// Adapted from https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality#31129384\nconst setsEqual = (a, b)=>{\n    if (a.size !== b.size) {\n        return false;\n    }\n    for (const item of a){\n        if (!b.has(item)) {\n            return false;\n        }\n    }\n    return true;\n};\n/**\n * @param e - The event\n * @private\n */ function _isClickEvent(e) {\n    return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n\n/**\n * @alias Chart.helpers.math\n * @namespace\n */ const PI = Math.PI;\nconst TAU = 2 * PI;\nconst PITAU = TAU + PI;\nconst INFINITY = Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG = PI / 180;\nconst HALF_PI = PI / 2;\nconst QUARTER_PI = PI / 4;\nconst TWO_THIRDS_PI = PI * 2 / 3;\nconst log10 = Math.log10;\nconst sign = Math.sign;\nfunction almostEquals(x, y, epsilon) {\n    return Math.abs(x - y) < epsilon;\n}\n/**\n * Implementation of the nice number algorithm used in determining where axis labels will go\n */ function niceNum(range) {\n    const roundedRange = Math.round(range);\n    range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n    const niceRange = Math.pow(10, Math.floor(log10(range)));\n    const fraction = range / niceRange;\n    const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n    return niceFraction * niceRange;\n}\n/**\n * Returns an array of factors sorted from 1 to sqrt(value)\n * @private\n */ function _factorize(value) {\n    const result = [];\n    const sqrt = Math.sqrt(value);\n    let i;\n    for(i = 1; i < sqrt; i++){\n        if (value % i === 0) {\n            result.push(i);\n            result.push(value / i);\n        }\n    }\n    if (sqrt === (sqrt | 0)) {\n        result.push(sqrt);\n    }\n    result.sort((a, b)=>a - b).pop();\n    return result;\n}\nfunction isNumber(n) {\n    return !isNaN(parseFloat(n)) && isFinite(n);\n}\nfunction almostWhole(x, epsilon) {\n    const rounded = Math.round(x);\n    return rounded - epsilon <= x && rounded + epsilon >= x;\n}\n/**\n * @private\n */ function _setMinAndMaxByKey(array, target, property) {\n    let i, ilen, value;\n    for(i = 0, ilen = array.length; i < ilen; i++){\n        value = array[i][property];\n        if (!isNaN(value)) {\n            target.min = Math.min(target.min, value);\n            target.max = Math.max(target.max, value);\n        }\n    }\n}\nfunction toRadians(degrees) {\n    return degrees * (PI / 180);\n}\nfunction toDegrees(radians) {\n    return radians * (180 / PI);\n}\n/**\n * Returns the number of decimal places\n * i.e. the number of digits after the decimal point, of the value of this Number.\n * @param x - A number.\n * @returns The number of decimal places.\n * @private\n */ function _decimalPlaces(x) {\n    if (!isNumberFinite(x)) {\n        return;\n    }\n    let e = 1;\n    let p = 0;\n    while(Math.round(x * e) / e !== x){\n        e *= 10;\n        p++;\n    }\n    return p;\n}\n// Gets the angle from vertical upright to the point about a centre.\nfunction getAngleFromPoint(centrePoint, anglePoint) {\n    const distanceFromXCenter = anglePoint.x - centrePoint.x;\n    const distanceFromYCenter = anglePoint.y - centrePoint.y;\n    const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n    let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n    if (angle < -0.5 * PI) {\n        angle += TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n    }\n    return {\n        angle,\n        distance: radialDistanceFromCenter\n    };\n}\nfunction distanceBetweenPoints(pt1, pt2) {\n    return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n/**\n * Shortest distance between angles, in either direction.\n * @private\n */ function _angleDiff(a, b) {\n    return (a - b + PITAU) % TAU - PI;\n}\n/**\n * Normalize angle to be between 0 and 2*PI\n * @private\n */ function _normalizeAngle(a) {\n    return (a % TAU + TAU) % TAU;\n}\n/**\n * @private\n */ function _angleBetween(angle, start, end, sameAngleIsFullCircle) {\n    const a = _normalizeAngle(angle);\n    const s = _normalizeAngle(start);\n    const e = _normalizeAngle(end);\n    const angleToStart = _normalizeAngle(s - a);\n    const angleToEnd = _normalizeAngle(e - a);\n    const startToAngle = _normalizeAngle(a - s);\n    const endToAngle = _normalizeAngle(a - e);\n    return a === s || a === e || sameAngleIsFullCircle && s === e || angleToStart > angleToEnd && startToAngle < endToAngle;\n}\n/**\n * Limit `value` between `min` and `max`\n * @param value\n * @param min\n * @param max\n * @private\n */ function _limitValue(value, min, max) {\n    return Math.max(min, Math.min(max, value));\n}\n/**\n * @param {number} value\n * @private\n */ function _int16Range(value) {\n    return _limitValue(value, -32768, 32767);\n}\n/**\n * @param value\n * @param start\n * @param end\n * @param [epsilon]\n * @private\n */ function _isBetween(value, start, end, epsilon = 1e-6) {\n    return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp) {\n    cmp = cmp || ((index)=>table[index] < value);\n    let hi = table.length - 1;\n    let lo = 0;\n    let mid;\n    while(hi - lo > 1){\n        mid = lo + hi >> 1;\n        if (cmp(mid)) {\n            lo = mid;\n        } else {\n            hi = mid;\n        }\n    }\n    return {\n        lo,\n        hi\n    };\n}\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @param last - lookup last index\n * @private\n */ const _lookupByKey = (table, key, value, last)=>_lookup(table, value, last ? (index)=>{\n        const ti = table[index][key];\n        return ti < value || ti === value && table[index + 1][key] === value;\n    } : (index)=>table[index][key] < value);\n/**\n * Reverse binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @private\n */ const _rlookupByKey = (table, key, value)=>_lookup(table, value, (index)=>table[index][key] >= value);\n/**\n * Return subset of `values` between `min` and `max` inclusive.\n * Values are assumed to be in sorted order.\n * @param values - sorted array of values\n * @param min - min value\n * @param max - max value\n */ function _filterBetween(values, min, max) {\n    let start = 0;\n    let end = values.length;\n    while(start < end && values[start] < min){\n        start++;\n    }\n    while(end > start && values[end - 1] > max){\n        end--;\n    }\n    return start > 0 || end < values.length ? values.slice(start, end) : values;\n}\nconst arrayEvents = [\n    'push',\n    'pop',\n    'shift',\n    'splice',\n    'unshift'\n];\nfunction listenArrayEvents(array, listener) {\n    if (array._chartjs) {\n        array._chartjs.listeners.push(listener);\n        return;\n    }\n    Object.defineProperty(array, '_chartjs', {\n        configurable: true,\n        enumerable: false,\n        value: {\n            listeners: [\n                listener\n            ]\n        }\n    });\n    arrayEvents.forEach((key)=>{\n        const method = '_onData' + _capitalize(key);\n        const base = array[key];\n        Object.defineProperty(array, key, {\n            configurable: true,\n            enumerable: false,\n            value (...args) {\n                const res = base.apply(this, args);\n                array._chartjs.listeners.forEach((object)=>{\n                    if (typeof object[method] === 'function') {\n                        object[method](...args);\n                    }\n                });\n                return res;\n            }\n        });\n    });\n}\nfunction unlistenArrayEvents(array, listener) {\n    const stub = array._chartjs;\n    if (!stub) {\n        return;\n    }\n    const listeners = stub.listeners;\n    const index = listeners.indexOf(listener);\n    if (index !== -1) {\n        listeners.splice(index, 1);\n    }\n    if (listeners.length > 0) {\n        return;\n    }\n    arrayEvents.forEach((key)=>{\n        delete array[key];\n    });\n    delete array._chartjs;\n}\n/**\n * @param items\n */ function _arrayUnique(items) {\n    const set = new Set(items);\n    if (set.size === items.length) {\n        return items;\n    }\n    return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily) {\n    return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n/**\n* Request animation polyfill\n*/ const requestAnimFrame = function() {\n    if (typeof window === 'undefined') {\n        return function(callback) {\n            return callback();\n        };\n    }\n    return window.requestAnimationFrame;\n}();\n/**\n * Throttles calling `fn` once per animation frame\n * Latest arguments are used on the actual call\n */ function throttled(fn, thisArg) {\n    let argsToUse = [];\n    let ticking = false;\n    return function(...args) {\n        // Save the args for use later\n        argsToUse = args;\n        if (!ticking) {\n            ticking = true;\n            requestAnimFrame.call(window, ()=>{\n                ticking = false;\n                fn.apply(thisArg, argsToUse);\n            });\n        }\n    };\n}\n/**\n * Debounces calling `fn` for `delay` ms\n */ function debounce(fn, delay) {\n    let timeout;\n    return function(...args) {\n        if (delay) {\n            clearTimeout(timeout);\n            timeout = setTimeout(fn, delay, args);\n        } else {\n            fn.apply(this, args);\n        }\n        return delay;\n    };\n}\n/**\n * Converts 'start' to 'left', 'end' to 'right' and others to 'center'\n * @private\n */ const _toLeftRightCenter = (align)=>align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\n/**\n * Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center`\n * @private\n */ const _alignStartEnd = (align, start, end)=>align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\n/**\n * Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left`\n * @private\n */ const _textX = (align, left, right, rtl)=>{\n    const check = rtl ? 'left' : 'right';\n    return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\n/**\n * Return start and count of visible points.\n * @private\n */ function _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {\n    const pointCount = points.length;\n    let start = 0;\n    let count = pointCount;\n    if (meta._sorted) {\n        const { iScale , _parsed  } = meta;\n        const axis = iScale.axis;\n        const { min , max , minDefined , maxDefined  } = iScale.getUserBounds();\n        if (minDefined) {\n            start = _limitValue(Math.min(// @ts-expect-error Need to type _parsed\n            _lookupByKey(_parsed, axis, min).lo, // @ts-expect-error Need to fix types on _lookupByKey\n            animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo), 0, pointCount - 1);\n        }\n        if (maxDefined) {\n            count = _limitValue(Math.max(// @ts-expect-error Need to type _parsed\n            _lookupByKey(_parsed, iScale.axis, max, true).hi + 1, // @ts-expect-error Need to fix types on _lookupByKey\n            animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1), start, pointCount) - start;\n        } else {\n            count = pointCount - start;\n        }\n    }\n    return {\n        start,\n        count\n    };\n}\n/**\n * Checks if the scale ranges have changed.\n * @param {object} meta - dataset meta.\n * @returns {boolean}\n * @private\n */ function _scaleRangesChanged(meta) {\n    const { xScale , yScale , _scaleRanges  } = meta;\n    const newRanges = {\n        xmin: xScale.min,\n        xmax: xScale.max,\n        ymin: yScale.min,\n        ymax: yScale.max\n    };\n    if (!_scaleRanges) {\n        meta._scaleRanges = newRanges;\n        return true;\n    }\n    const changed = _scaleRanges.xmin !== xScale.min || _scaleRanges.xmax !== xScale.max || _scaleRanges.ymin !== yScale.min || _scaleRanges.ymax !== yScale.max;\n    Object.assign(_scaleRanges, newRanges);\n    return changed;\n}\n\nconst atEdge = (t)=>t === 0 || t === 1;\nconst elasticIn = (t, s, p)=>-(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut = (t, s, p)=>Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easing.effects\n * @see http://www.robertpenner.com/easing/\n */ const effects = {\n    linear: (t)=>t,\n    easeInQuad: (t)=>t * t,\n    easeOutQuad: (t)=>-t * (t - 2),\n    easeInOutQuad: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1),\n    easeInCubic: (t)=>t * t * t,\n    easeOutCubic: (t)=>(t -= 1) * t * t + 1,\n    easeInOutCubic: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2),\n    easeInQuart: (t)=>t * t * t * t,\n    easeOutQuart: (t)=>-((t -= 1) * t * t * t - 1),\n    easeInOutQuart: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2),\n    easeInQuint: (t)=>t * t * t * t * t,\n    easeOutQuint: (t)=>(t -= 1) * t * t * t * t + 1,\n    easeInOutQuint: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2),\n    easeInSine: (t)=>-Math.cos(t * HALF_PI) + 1,\n    easeOutSine: (t)=>Math.sin(t * HALF_PI),\n    easeInOutSine: (t)=>-0.5 * (Math.cos(PI * t) - 1),\n    easeInExpo: (t)=>t === 0 ? 0 : Math.pow(2, 10 * (t - 1)),\n    easeOutExpo: (t)=>t === 1 ? 1 : -Math.pow(2, -10 * t) + 1,\n    easeInOutExpo: (t)=>atEdge(t) ? t : t < 0.5 ? 0.5 * Math.pow(2, 10 * (t * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n    easeInCirc: (t)=>t >= 1 ? t : -(Math.sqrt(1 - t * t) - 1),\n    easeOutCirc: (t)=>Math.sqrt(1 - (t -= 1) * t),\n    easeInOutCirc: (t)=>(t /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n    easeInElastic: (t)=>atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n    easeOutElastic: (t)=>atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n    easeInOutElastic (t) {\n        const s = 0.1125;\n        const p = 0.45;\n        return atEdge(t) ? t : t < 0.5 ? 0.5 * elasticIn(t * 2, s, p) : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n    },\n    easeInBack (t) {\n        const s = 1.70158;\n        return t * t * ((s + 1) * t - s);\n    },\n    easeOutBack (t) {\n        const s = 1.70158;\n        return (t -= 1) * t * ((s + 1) * t + s) + 1;\n    },\n    easeInOutBack (t) {\n        let s = 1.70158;\n        if ((t /= 0.5) < 1) {\n            return 0.5 * (t * t * (((s *= 1.525) + 1) * t - s));\n        }\n        return 0.5 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);\n    },\n    easeInBounce: (t)=>1 - effects.easeOutBounce(1 - t),\n    easeOutBounce (t) {\n        const m = 7.5625;\n        const d = 2.75;\n        if (t < 1 / d) {\n            return m * t * t;\n        }\n        if (t < 2 / d) {\n            return m * (t -= 1.5 / d) * t + 0.75;\n        }\n        if (t < 2.5 / d) {\n            return m * (t -= 2.25 / d) * t + 0.9375;\n        }\n        return m * (t -= 2.625 / d) * t + 0.984375;\n    },\n    easeInOutBounce: (t)=>t < 0.5 ? effects.easeInBounce(t * 2) * 0.5 : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5\n};\n\nfunction isPatternOrGradient(value) {\n    if (value && typeof value === 'object') {\n        const type = value.toString();\n        return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n    }\n    return false;\n}\nfunction color(value) {\n    return isPatternOrGradient(value) ? value : new Color(value);\n}\nfunction getHoverColor(value) {\n    return isPatternOrGradient(value) ? value : new Color(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst numbers = [\n    'x',\n    'y',\n    'borderWidth',\n    'radius',\n    'tension'\n];\nconst colors = [\n    'color',\n    'borderColor',\n    'backgroundColor'\n];\nfunction applyAnimationsDefaults(defaults) {\n    defaults.set('animation', {\n        delay: undefined,\n        duration: 1000,\n        easing: 'easeOutQuart',\n        fn: undefined,\n        from: undefined,\n        loop: undefined,\n        to: undefined,\n        type: undefined\n    });\n    defaults.describe('animation', {\n        _fallback: false,\n        _indexable: false,\n        _scriptable: (name)=>name !== 'onProgress' && name !== 'onComplete' && name !== 'fn'\n    });\n    defaults.set('animations', {\n        colors: {\n            type: 'color',\n            properties: colors\n        },\n        numbers: {\n            type: 'number',\n            properties: numbers\n        }\n    });\n    defaults.describe('animations', {\n        _fallback: 'animation'\n    });\n    defaults.set('transitions', {\n        active: {\n            animation: {\n                duration: 400\n            }\n        },\n        resize: {\n            animation: {\n                duration: 0\n            }\n        },\n        show: {\n            animations: {\n                colors: {\n                    from: 'transparent'\n                },\n                visible: {\n                    type: 'boolean',\n                    duration: 0\n                }\n            }\n        },\n        hide: {\n            animations: {\n                colors: {\n                    to: 'transparent'\n                },\n                visible: {\n                    type: 'boolean',\n                    easing: 'linear',\n                    fn: (v)=>v | 0\n                }\n            }\n        }\n    });\n}\n\nfunction applyLayoutsDefaults(defaults) {\n    defaults.set('layout', {\n        autoPadding: true,\n        padding: {\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0\n        }\n    });\n}\n\nconst intlCache = new Map();\nfunction getNumberFormat(locale, options) {\n    options = options || {};\n    const cacheKey = locale + JSON.stringify(options);\n    let formatter = intlCache.get(cacheKey);\n    if (!formatter) {\n        formatter = new Intl.NumberFormat(locale, options);\n        intlCache.set(cacheKey, formatter);\n    }\n    return formatter;\n}\nfunction formatNumber(num, locale, options) {\n    return getNumberFormat(locale, options).format(num);\n}\n\nconst formatters = {\n values (value) {\n        return isArray(value) ?  value : '' + value;\n    },\n numeric (tickValue, index, ticks) {\n        if (tickValue === 0) {\n            return '0';\n        }\n        const locale = this.chart.options.locale;\n        let notation;\n        let delta = tickValue;\n        if (ticks.length > 1) {\n            const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n            if (maxTick < 1e-4 || maxTick > 1e+15) {\n                notation = 'scientific';\n            }\n            delta = calculateDelta(tickValue, ticks);\n        }\n        const logDelta = log10(Math.abs(delta));\n        const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n        const options = {\n            notation,\n            minimumFractionDigits: numDecimal,\n            maximumFractionDigits: numDecimal\n        };\n        Object.assign(options, this.options.ticks.format);\n        return formatNumber(tickValue, locale, options);\n    },\n logarithmic (tickValue, index, ticks) {\n        if (tickValue === 0) {\n            return '0';\n        }\n        const remain = ticks[index].significand || tickValue / Math.pow(10, Math.floor(log10(tickValue)));\n        if ([\n            1,\n            2,\n            3,\n            5,\n            10,\n            15\n        ].includes(remain) || index > 0.8 * ticks.length) {\n            return formatters.numeric.call(this, tickValue, index, ticks);\n        }\n        return '';\n    }\n};\nfunction calculateDelta(tickValue, ticks) {\n    let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n    if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n        delta = tickValue - Math.floor(tickValue);\n    }\n    return delta;\n}\n var Ticks = {\n    formatters\n};\n\nfunction applyScaleDefaults(defaults) {\n    defaults.set('scale', {\n        display: true,\n        offset: false,\n        reverse: false,\n        beginAtZero: false,\n bounds: 'ticks',\n        clip: true,\n grace: 0,\n        grid: {\n            display: true,\n            lineWidth: 1,\n            drawOnChartArea: true,\n            drawTicks: true,\n            tickLength: 8,\n            tickWidth: (_ctx, options)=>options.lineWidth,\n            tickColor: (_ctx, options)=>options.color,\n            offset: false\n        },\n        border: {\n            display: true,\n            dash: [],\n            dashOffset: 0.0,\n            width: 1\n        },\n        title: {\n            display: false,\n            text: '',\n            padding: {\n                top: 4,\n                bottom: 4\n            }\n        },\n        ticks: {\n            minRotation: 0,\n            maxRotation: 50,\n            mirror: false,\n            textStrokeWidth: 0,\n            textStrokeColor: '',\n            padding: 3,\n            display: true,\n            autoSkip: true,\n            autoSkipPadding: 3,\n            labelOffset: 0,\n            callback: Ticks.formatters.values,\n            minor: {},\n            major: {},\n            align: 'center',\n            crossAlign: 'near',\n            showLabelBackdrop: false,\n            backdropColor: 'rgba(255, 255, 255, 0.75)',\n            backdropPadding: 2\n        }\n    });\n    defaults.route('scale.ticks', 'color', '', 'color');\n    defaults.route('scale.grid', 'color', '', 'borderColor');\n    defaults.route('scale.border', 'color', '', 'borderColor');\n    defaults.route('scale.title', 'color', '', 'color');\n    defaults.describe('scale', {\n        _fallback: false,\n        _scriptable: (name)=>!name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n        _indexable: (name)=>name !== 'borderDash' && name !== 'tickBorderDash' && name !== 'dash'\n    });\n    defaults.describe('scales', {\n        _fallback: 'scale'\n    });\n    defaults.describe('scale.ticks', {\n        _scriptable: (name)=>name !== 'backdropPadding' && name !== 'callback',\n        _indexable: (name)=>name !== 'backdropPadding'\n    });\n}\n\nconst overrides = Object.create(null);\nconst descriptors = Object.create(null);\n function getScope$1(node, key) {\n    if (!key) {\n        return node;\n    }\n    const keys = key.split('.');\n    for(let i = 0, n = keys.length; i < n; ++i){\n        const k = keys[i];\n        node = node[k] || (node[k] = Object.create(null));\n    }\n    return node;\n}\nfunction set(root, scope, values) {\n    if (typeof scope === 'string') {\n        return merge(getScope$1(root, scope), values);\n    }\n    return merge(getScope$1(root, ''), scope);\n}\n class Defaults {\n    constructor(_descriptors, _appliers){\n        this.animation = undefined;\n        this.backgroundColor = 'rgba(0,0,0,0.1)';\n        this.borderColor = 'rgba(0,0,0,0.1)';\n        this.color = '#666';\n        this.datasets = {};\n        this.devicePixelRatio = (context)=>context.chart.platform.getDevicePixelRatio();\n        this.elements = {};\n        this.events = [\n            'mousemove',\n            'mouseout',\n            'click',\n            'touchstart',\n            'touchmove'\n        ];\n        this.font = {\n            family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n            size: 12,\n            style: 'normal',\n            lineHeight: 1.2,\n            weight: null\n        };\n        this.hover = {};\n        this.hoverBackgroundColor = (ctx, options)=>getHoverColor(options.backgroundColor);\n        this.hoverBorderColor = (ctx, options)=>getHoverColor(options.borderColor);\n        this.hoverColor = (ctx, options)=>getHoverColor(options.color);\n        this.indexAxis = 'x';\n        this.interaction = {\n            mode: 'nearest',\n            intersect: true,\n            includeInvisible: false\n        };\n        this.maintainAspectRatio = true;\n        this.onHover = null;\n        this.onClick = null;\n        this.parsing = true;\n        this.plugins = {};\n        this.responsive = true;\n        this.scale = undefined;\n        this.scales = {};\n        this.showLine = true;\n        this.drawActiveElementsOnTop = true;\n        this.describe(_descriptors);\n        this.apply(_appliers);\n    }\n set(scope, values) {\n        return set(this, scope, values);\n    }\n get(scope) {\n        return getScope$1(this, scope);\n    }\n describe(scope, values) {\n        return set(descriptors, scope, values);\n    }\n    override(scope, values) {\n        return set(overrides, scope, values);\n    }\n route(scope, name, targetScope, targetName) {\n        const scopeObject = getScope$1(this, scope);\n        const targetScopeObject = getScope$1(this, targetScope);\n        const privateName = '_' + name;\n        Object.defineProperties(scopeObject, {\n            [privateName]: {\n                value: scopeObject[name],\n                writable: true\n            },\n            [name]: {\n                enumerable: true,\n                get () {\n                    const local = this[privateName];\n                    const target = targetScopeObject[targetName];\n                    if (isObject(local)) {\n                        return Object.assign({}, target, local);\n                    }\n                    return valueOrDefault(local, target);\n                },\n                set (value) {\n                    this[privateName] = value;\n                }\n            }\n        });\n    }\n    apply(appliers) {\n        appliers.forEach((apply)=>apply(this));\n    }\n}\nvar defaults = /* #__PURE__ */ new Defaults({\n    _scriptable: (name)=>!name.startsWith('on'),\n    _indexable: (name)=>name !== 'events',\n    hover: {\n        _fallback: 'interaction'\n    },\n    interaction: {\n        _scriptable: false,\n        _indexable: false\n    }\n}, [\n    applyAnimationsDefaults,\n    applyLayoutsDefaults,\n    applyScaleDefaults\n]);\n\n/**\n * Converts the given font object into a CSS font string.\n * @param font - A font object.\n * @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\n * @private\n */ function toFontString(font) {\n    if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n        return null;\n    }\n    return (font.style ? font.style + ' ' : '') + (font.weight ? font.weight + ' ' : '') + font.size + 'px ' + font.family;\n}\n/**\n * @private\n */ function _measureText(ctx, data, gc, longest, string) {\n    let textWidth = data[string];\n    if (!textWidth) {\n        textWidth = data[string] = ctx.measureText(string).width;\n        gc.push(string);\n    }\n    if (textWidth > longest) {\n        longest = textWidth;\n    }\n    return longest;\n}\n/**\n * @private\n */ // eslint-disable-next-line complexity\nfunction _longestText(ctx, font, arrayOfThings, cache) {\n    cache = cache || {};\n    let data = cache.data = cache.data || {};\n    let gc = cache.garbageCollect = cache.garbageCollect || [];\n    if (cache.font !== font) {\n        data = cache.data = {};\n        gc = cache.garbageCollect = [];\n        cache.font = font;\n    }\n    ctx.save();\n    ctx.font = font;\n    let longest = 0;\n    const ilen = arrayOfThings.length;\n    let i, j, jlen, thing, nestedThing;\n    for(i = 0; i < ilen; i++){\n        thing = arrayOfThings[i];\n        // Undefined strings and arrays should not be measured\n        if (thing !== undefined && thing !== null && !isArray(thing)) {\n            longest = _measureText(ctx, data, gc, longest, thing);\n        } else if (isArray(thing)) {\n            // if it is an array lets measure each element\n            // to do maybe simplify this function a bit so we can do this more recursively?\n            for(j = 0, jlen = thing.length; j < jlen; j++){\n                nestedThing = thing[j];\n                // Undefined strings and arrays should not be measured\n                if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n                    longest = _measureText(ctx, data, gc, longest, nestedThing);\n                }\n            }\n        }\n    }\n    ctx.restore();\n    const gcLen = gc.length / 2;\n    if (gcLen > arrayOfThings.length) {\n        for(i = 0; i < gcLen; i++){\n            delete data[gc[i]];\n        }\n        gc.splice(0, gcLen);\n    }\n    return longest;\n}\n/**\n * Returns the aligned pixel value to avoid anti-aliasing blur\n * @param chart - The chart instance.\n * @param pixel - A pixel value.\n * @param width - The width of the element.\n * @returns The aligned pixel value.\n * @private\n */ function _alignPixel(chart, pixel, width) {\n    const devicePixelRatio = chart.currentDevicePixelRatio;\n    const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n    return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n/**\n * Clears the entire canvas.\n */ function clearCanvas(canvas, ctx) {\n    if (!ctx && !canvas) {\n        return;\n    }\n    ctx = ctx || canvas.getContext('2d');\n    ctx.save();\n    // canvas.width and canvas.height do not consider the canvas transform,\n    // while clearRect does\n    ctx.resetTransform();\n    ctx.clearRect(0, 0, canvas.width, canvas.height);\n    ctx.restore();\n}\nfunction drawPoint(ctx, options, x, y) {\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    drawPointLegend(ctx, options, x, y, null);\n}\n// eslint-disable-next-line complexity\nfunction drawPointLegend(ctx, options, x, y, w) {\n    let type, xOffset, yOffset, size, cornerRadius, width, xOffsetW, yOffsetW;\n    const style = options.pointStyle;\n    const rotation = options.rotation;\n    const radius = options.radius;\n    let rad = (rotation || 0) * RAD_PER_DEG;\n    if (style && typeof style === 'object') {\n        type = style.toString();\n        if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n            ctx.save();\n            ctx.translate(x, y);\n            ctx.rotate(rad);\n            ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n            ctx.restore();\n            return;\n        }\n    }\n    if (isNaN(radius) || radius <= 0) {\n        return;\n    }\n    ctx.beginPath();\n    switch(style){\n        // Default includes circle\n        default:\n            if (w) {\n                ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n            } else {\n                ctx.arc(x, y, radius, 0, TAU);\n            }\n            ctx.closePath();\n            break;\n        case 'triangle':\n            width = w ? w / 2 : radius;\n            ctx.moveTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            rad += TWO_THIRDS_PI;\n            ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            rad += TWO_THIRDS_PI;\n            ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            ctx.closePath();\n            break;\n        case 'rectRounded':\n            // NOTE: the rounded rect implementation changed to use `arc` instead of\n            // `quadraticCurveTo` since it generates better results when rect is\n            // almost a circle. 0.516 (instead of 0.5) produces results with visually\n            // closer proportion to the previous impl and it is inscribed in the\n            // circle with `radius`. For more details, see the following PRs:\n            // https://github.com/chartjs/Chart.js/issues/5597\n            // https://github.com/chartjs/Chart.js/issues/5858\n            cornerRadius = radius * 0.516;\n            size = radius - cornerRadius;\n            xOffset = Math.cos(rad + QUARTER_PI) * size;\n            xOffsetW = Math.cos(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n            yOffset = Math.sin(rad + QUARTER_PI) * size;\n            yOffsetW = Math.sin(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n            ctx.arc(x - xOffsetW, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n            ctx.arc(x + yOffsetW, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n            ctx.arc(x + xOffsetW, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n            ctx.arc(x - yOffsetW, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n            ctx.closePath();\n            break;\n        case 'rect':\n            if (!rotation) {\n                size = Math.SQRT1_2 * radius;\n                width = w ? w / 2 : size;\n                ctx.rect(x - width, y - size, 2 * width, 2 * size);\n                break;\n            }\n            rad += QUARTER_PI;\n        /* falls through */ case 'rectRot':\n            xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n            xOffset = Math.cos(rad) * radius;\n            yOffset = Math.sin(rad) * radius;\n            yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            ctx.closePath();\n            break;\n        case 'crossRot':\n            rad += QUARTER_PI;\n        /* falls through */ case 'cross':\n            xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n            xOffset = Math.cos(rad) * radius;\n            yOffset = Math.sin(rad) * radius;\n            yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            break;\n        case 'star':\n            xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n            xOffset = Math.cos(rad) * radius;\n            yOffset = Math.sin(rad) * radius;\n            yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            rad += QUARTER_PI;\n            xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n            xOffset = Math.cos(rad) * radius;\n            yOffset = Math.sin(rad) * radius;\n            yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            break;\n        case 'line':\n            xOffset = w ? w / 2 : Math.cos(rad) * radius;\n            yOffset = Math.sin(rad) * radius;\n            ctx.moveTo(x - xOffset, y - yOffset);\n            ctx.lineTo(x + xOffset, y + yOffset);\n            break;\n        case 'dash':\n            ctx.moveTo(x, y);\n            ctx.lineTo(x + Math.cos(rad) * (w ? w / 2 : radius), y + Math.sin(rad) * radius);\n            break;\n        case false:\n            ctx.closePath();\n            break;\n    }\n    ctx.fill();\n    if (options.borderWidth > 0) {\n        ctx.stroke();\n    }\n}\n/**\n * Returns true if the point is inside the rectangle\n * @param point - The point to test\n * @param area - The rectangle\n * @param margin - allowed margin\n * @private\n */ function _isPointInArea(point, area, margin) {\n    margin = margin || 0.5; // margin - default is to match rounded decimals\n    return !area || point && point.x > area.left - margin && point.x < area.right + margin && point.y > area.top - margin && point.y < area.bottom + margin;\n}\nfunction clipArea(ctx, area) {\n    ctx.save();\n    ctx.beginPath();\n    ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n    ctx.clip();\n}\nfunction unclipArea(ctx) {\n    ctx.restore();\n}\n/**\n * @private\n */ function _steppedLineTo(ctx, previous, target, flip, mode) {\n    if (!previous) {\n        return ctx.lineTo(target.x, target.y);\n    }\n    if (mode === 'middle') {\n        const midpoint = (previous.x + target.x) / 2.0;\n        ctx.lineTo(midpoint, previous.y);\n        ctx.lineTo(midpoint, target.y);\n    } else if (mode === 'after' !== !!flip) {\n        ctx.lineTo(previous.x, target.y);\n    } else {\n        ctx.lineTo(target.x, previous.y);\n    }\n    ctx.lineTo(target.x, target.y);\n}\n/**\n * @private\n */ function _bezierCurveTo(ctx, previous, target, flip) {\n    if (!previous) {\n        return ctx.lineTo(target.x, target.y);\n    }\n    ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ? target.cp2x : target.cp1x, flip ? target.cp2y : target.cp1y, target.x, target.y);\n}\nfunction setRenderOpts(ctx, opts) {\n    if (opts.translation) {\n        ctx.translate(opts.translation[0], opts.translation[1]);\n    }\n    if (!isNullOrUndef(opts.rotation)) {\n        ctx.rotate(opts.rotation);\n    }\n    if (opts.color) {\n        ctx.fillStyle = opts.color;\n    }\n    if (opts.textAlign) {\n        ctx.textAlign = opts.textAlign;\n    }\n    if (opts.textBaseline) {\n        ctx.textBaseline = opts.textBaseline;\n    }\n}\nfunction decorateText(ctx, x, y, line, opts) {\n    if (opts.strikethrough || opts.underline) {\n        /**\n     * Now that IE11 support has been dropped, we can use more\n     * of the TextMetrics object. The actual bounding boxes\n     * are unflagged in Chrome, Firefox, Edge, and Safari so they\n     * can be safely used.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Browser_compatibility\n     */ const metrics = ctx.measureText(line);\n        const left = x - metrics.actualBoundingBoxLeft;\n        const right = x + metrics.actualBoundingBoxRight;\n        const top = y - metrics.actualBoundingBoxAscent;\n        const bottom = y + metrics.actualBoundingBoxDescent;\n        const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n        ctx.strokeStyle = ctx.fillStyle;\n        ctx.beginPath();\n        ctx.lineWidth = opts.decorationWidth || 2;\n        ctx.moveTo(left, yDecoration);\n        ctx.lineTo(right, yDecoration);\n        ctx.stroke();\n    }\n}\nfunction drawBackdrop(ctx, opts) {\n    const oldColor = ctx.fillStyle;\n    ctx.fillStyle = opts.color;\n    ctx.fillRect(opts.left, opts.top, opts.width, opts.height);\n    ctx.fillStyle = oldColor;\n}\n/**\n * Render text onto the canvas\n */ function renderText(ctx, text, x, y, font, opts = {}) {\n    const lines = isArray(text) ? text : [\n        text\n    ];\n    const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n    let i, line;\n    ctx.save();\n    ctx.font = font.string;\n    setRenderOpts(ctx, opts);\n    for(i = 0; i < lines.length; ++i){\n        line = lines[i];\n        if (opts.backdrop) {\n            drawBackdrop(ctx, opts.backdrop);\n        }\n        if (stroke) {\n            if (opts.strokeColor) {\n                ctx.strokeStyle = opts.strokeColor;\n            }\n            if (!isNullOrUndef(opts.strokeWidth)) {\n                ctx.lineWidth = opts.strokeWidth;\n            }\n            ctx.strokeText(line, x, y, opts.maxWidth);\n        }\n        ctx.fillText(line, x, y, opts.maxWidth);\n        decorateText(ctx, x, y, line, opts);\n        y += Number(font.lineHeight);\n    }\n    ctx.restore();\n}\n/**\n * Add a path of a rectangle with rounded corners to the current sub-path\n * @param ctx - Context\n * @param rect - Bounding rect\n */ function addRoundedRectPath(ctx, rect) {\n    const { x , y , w , h , radius  } = rect;\n    // top left arc\n    ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, 1.5 * PI, PI, true);\n    // line from top left to bottom left\n    ctx.lineTo(x, y + h - radius.bottomLeft);\n    // bottom left arc\n    ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n    // line from bottom left to bottom right\n    ctx.lineTo(x + w - radius.bottomRight, y + h);\n    // bottom right arc\n    ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n    // line from bottom right to top right\n    ctx.lineTo(x + w, y + radius.topRight);\n    // top right arc\n    ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n    // line from top right to top left\n    ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT = /^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/;\nconst FONT_STYLE = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;\n/**\n * @alias Chart.helpers.options\n * @namespace\n */ /**\n * Converts the given line height `value` in pixels for a specific font `size`.\n * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n * @param size - The font size (in pixels) used to resolve relative `value`.\n * @returns The effective line height in pixels (size * 1.2 if value is invalid).\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n * @since 2.7.0\n */ function toLineHeight(value, size) {\n    const matches = ('' + value).match(LINE_HEIGHT);\n    if (!matches || matches[1] === 'normal') {\n        return size * 1.2;\n    }\n    value = +matches[2];\n    switch(matches[3]){\n        case 'px':\n            return value;\n        case '%':\n            value /= 100;\n            break;\n    }\n    return size * value;\n}\nconst numberOrZero = (v)=>+v || 0;\nfunction _readValueToProps(value, props) {\n    const ret = {};\n    const objProps = isObject(props);\n    const keys = objProps ? Object.keys(props) : props;\n    const read = isObject(value) ? objProps ? (prop)=>valueOrDefault(value[prop], value[props[prop]]) : (prop)=>value[prop] : ()=>value;\n    for (const prop of keys){\n        ret[prop] = numberOrZero(read(prop));\n    }\n    return ret;\n}\n/**\n * Converts the given value into a TRBL object.\n * @param value - If a number, set the value to all TRBL component,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n *  x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left)\n * @since 3.0.0\n */ function toTRBL(value) {\n    return _readValueToProps(value, {\n        top: 'y',\n        right: 'x',\n        bottom: 'y',\n        left: 'x'\n    });\n}\n/**\n * Converts the given value into a TRBL corners object (similar with css border-radius).\n * @param value - If a number, set the value to all TRBL corner components,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)\n * @since 3.0.0\n */ function toTRBLCorners(value) {\n    return _readValueToProps(value, [\n        'topLeft',\n        'topRight',\n        'bottomLeft',\n        'bottomRight'\n    ]);\n}\n/**\n * Converts the given value into a padding object with pre-computed width/height.\n * @param value - If a number, set the value to all TRBL component,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n *  x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left, width, height)\n * @since 2.7.0\n */ function toPadding(value) {\n    const obj = toTRBL(value);\n    obj.width = obj.left + obj.right;\n    obj.height = obj.top + obj.bottom;\n    return obj;\n}\n/**\n * Parses font options and returns the font object.\n * @param options - A object that contains font options to be parsed.\n * @param fallback - A object that contains fallback font options.\n * @return The font object.\n * @private\n */ function toFont(options, fallback) {\n    options = options || {};\n    fallback = fallback || defaults.font;\n    let size = valueOrDefault(options.size, fallback.size);\n    if (typeof size === 'string') {\n        size = parseInt(size, 10);\n    }\n    let style = valueOrDefault(options.style, fallback.style);\n    if (style && !('' + style).match(FONT_STYLE)) {\n        console.warn('Invalid font style specified: \"' + style + '\"');\n        style = undefined;\n    }\n    const font = {\n        family: valueOrDefault(options.family, fallback.family),\n        lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n        size,\n        style,\n        weight: valueOrDefault(options.weight, fallback.weight),\n        string: ''\n    };\n    font.string = toFontString(font);\n    return font;\n}\n/**\n * Evaluates the given `inputs` sequentially and returns the first defined value.\n * @param inputs - An array of values, falling back to the last value.\n * @param context - If defined and the current value is a function, the value\n * is called with `context` as first argument and the result becomes the new input.\n * @param index - If defined and the current value is an array, the value\n * at `index` become the new input.\n * @param info - object to return information about resolution in\n * @param info.cacheable - Will be set to `false` if option is not cacheable.\n * @since 2.7.0\n */ function resolve(inputs, context, index, info) {\n    let cacheable = true;\n    let i, ilen, value;\n    for(i = 0, ilen = inputs.length; i < ilen; ++i){\n        value = inputs[i];\n        if (value === undefined) {\n            continue;\n        }\n        if (context !== undefined && typeof value === 'function') {\n            value = value(context);\n            cacheable = false;\n        }\n        if (index !== undefined && isArray(value)) {\n            value = value[index % value.length];\n            cacheable = false;\n        }\n        if (value !== undefined) {\n            if (info && !cacheable) {\n                info.cacheable = false;\n            }\n            return value;\n        }\n    }\n}\n/**\n * @param minmax\n * @param grace\n * @param beginAtZero\n * @private\n */ function _addGrace(minmax, grace, beginAtZero) {\n    const { min , max  } = minmax;\n    const change = toDimension(grace, (max - min) / 2);\n    const keepZero = (value, add)=>beginAtZero && value === 0 ? 0 : value + add;\n    return {\n        min: keepZero(min, -Math.abs(change)),\n        max: keepZero(max, change)\n    };\n}\nfunction createContext(parentContext, context) {\n    return Object.assign(Object.create(parentContext), context);\n}\n\n/**\n * Creates a Proxy for resolving raw values for options.\n * @param scopes - The option scopes to look for values, in resolution order\n * @param prefixes - The prefixes for values, in resolution order.\n * @param rootScopes - The root option scopes\n * @param fallback - Parent scopes fallback\n * @param getTarget - callback for getting the target for changed values\n * @returns Proxy\n * @private\n */ function _createResolver(scopes, prefixes = [\n    ''\n], rootScopes, fallback, getTarget = ()=>scopes[0]) {\n    const finalRootScopes = rootScopes || scopes;\n    if (typeof fallback === 'undefined') {\n        fallback = _resolve('_fallback', scopes);\n    }\n    const cache = {\n        [Symbol.toStringTag]: 'Object',\n        _cacheable: true,\n        _scopes: scopes,\n        _rootScopes: finalRootScopes,\n        _fallback: fallback,\n        _getTarget: getTarget,\n        override: (scope)=>_createResolver([\n                scope,\n                ...scopes\n            ], prefixes, finalRootScopes, fallback)\n    };\n    return new Proxy(cache, {\n        /**\n     * A trap for the delete operator.\n     */ deleteProperty (target, prop) {\n            delete target[prop]; // remove from cache\n            delete target._keys; // remove cached keys\n            delete scopes[0][prop]; // remove from top level scope\n            return true;\n        },\n        /**\n     * A trap for getting property values.\n     */ get (target, prop) {\n            return _cached(target, prop, ()=>_resolveWithPrefixes(prop, prefixes, scopes, target));\n        },\n        /**\n     * A trap for Object.getOwnPropertyDescriptor.\n     * Also used by Object.hasOwnProperty.\n     */ getOwnPropertyDescriptor (target, prop) {\n            return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n        },\n        /**\n     * A trap for Object.getPrototypeOf.\n     */ getPrototypeOf () {\n            return Reflect.getPrototypeOf(scopes[0]);\n        },\n        /**\n     * A trap for the in operator.\n     */ has (target, prop) {\n            return getKeysFromAllScopes(target).includes(prop);\n        },\n        /**\n     * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n     */ ownKeys (target) {\n            return getKeysFromAllScopes(target);\n        },\n        /**\n     * A trap for setting property values.\n     */ set (target, prop, value) {\n            const storage = target._storage || (target._storage = getTarget());\n            target[prop] = storage[prop] = value; // set to top level scope + cache\n            delete target._keys; // remove cached keys\n            return true;\n        }\n    });\n}\n/**\n * Returns an Proxy for resolving option values with context.\n * @param proxy - The Proxy returned by `_createResolver`\n * @param context - Context object for scriptable/indexable options\n * @param subProxy - The proxy provided for scriptable options\n * @param descriptorDefaults - Defaults for descriptors\n * @private\n */ function _attachContext(proxy, context, subProxy, descriptorDefaults) {\n    const cache = {\n        _cacheable: false,\n        _proxy: proxy,\n        _context: context,\n        _subProxy: subProxy,\n        _stack: new Set(),\n        _descriptors: _descriptors(proxy, descriptorDefaults),\n        setContext: (ctx)=>_attachContext(proxy, ctx, subProxy, descriptorDefaults),\n        override: (scope)=>_attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n    };\n    return new Proxy(cache, {\n        /**\n     * A trap for the delete operator.\n     */ deleteProperty (target, prop) {\n            delete target[prop]; // remove from cache\n            delete proxy[prop]; // remove from proxy\n            return true;\n        },\n        /**\n     * A trap for getting property values.\n     */ get (target, prop, receiver) {\n            return _cached(target, prop, ()=>_resolveWithContext(target, prop, receiver));\n        },\n        /**\n     * A trap for Object.getOwnPropertyDescriptor.\n     * Also used by Object.hasOwnProperty.\n     */ getOwnPropertyDescriptor (target, prop) {\n            return target._descriptors.allKeys ? Reflect.has(proxy, prop) ? {\n                enumerable: true,\n                configurable: true\n            } : undefined : Reflect.getOwnPropertyDescriptor(proxy, prop);\n        },\n        /**\n     * A trap for Object.getPrototypeOf.\n     */ getPrototypeOf () {\n            return Reflect.getPrototypeOf(proxy);\n        },\n        /**\n     * A trap for the in operator.\n     */ has (target, prop) {\n            return Reflect.has(proxy, prop);\n        },\n        /**\n     * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n     */ ownKeys () {\n            return Reflect.ownKeys(proxy);\n        },\n        /**\n     * A trap for setting property values.\n     */ set (target, prop, value) {\n            proxy[prop] = value; // set to proxy\n            delete target[prop]; // remove from cache\n            return true;\n        }\n    });\n}\n/**\n * @private\n */ function _descriptors(proxy, defaults = {\n    scriptable: true,\n    indexable: true\n}) {\n    const { _scriptable =defaults.scriptable , _indexable =defaults.indexable , _allKeys =defaults.allKeys  } = proxy;\n    return {\n        allKeys: _allKeys,\n        scriptable: _scriptable,\n        indexable: _indexable,\n        isScriptable: isFunction(_scriptable) ? _scriptable : ()=>_scriptable,\n        isIndexable: isFunction(_indexable) ? _indexable : ()=>_indexable\n    };\n}\nconst readKey = (prefix, name)=>prefix ? prefix + _capitalize(name) : name;\nconst needsSubResolver = (prop, value)=>isObject(value) && prop !== 'adapters' && (Object.getPrototypeOf(value) === null || value.constructor === Object);\nfunction _cached(target, prop, resolve) {\n    if (Object.prototype.hasOwnProperty.call(target, prop) || prop === 'constructor') {\n        return target[prop];\n    }\n    const value = resolve();\n    // cache the resolved value\n    target[prop] = value;\n    return value;\n}\nfunction _resolveWithContext(target, prop, receiver) {\n    const { _proxy , _context , _subProxy , _descriptors: descriptors  } = target;\n    let value = _proxy[prop]; // resolve from proxy\n    // resolve with context\n    if (isFunction(value) && descriptors.isScriptable(prop)) {\n        value = _resolveScriptable(prop, value, target, receiver);\n    }\n    if (isArray(value) && value.length) {\n        value = _resolveArray(prop, value, target, descriptors.isIndexable);\n    }\n    if (needsSubResolver(prop, value)) {\n        // if the resolved value is an object, create a sub resolver for it\n        value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n    }\n    return value;\n}\nfunction _resolveScriptable(prop, getValue, target, receiver) {\n    const { _proxy , _context , _subProxy , _stack  } = target;\n    if (_stack.has(prop)) {\n        throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n    }\n    _stack.add(prop);\n    let value = getValue(_context, _subProxy || receiver);\n    _stack.delete(prop);\n    if (needsSubResolver(prop, value)) {\n        // When scriptable option returns an object, create a resolver on that.\n        value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n    }\n    return value;\n}\nfunction _resolveArray(prop, value, target, isIndexable) {\n    const { _proxy , _context , _subProxy , _descriptors: descriptors  } = target;\n    if (typeof _context.index !== 'undefined' && isIndexable(prop)) {\n        return value[_context.index % value.length];\n    } else if (isObject(value[0])) {\n        // Array of objects, return array or resolvers\n        const arr = value;\n        const scopes = _proxy._scopes.filter((s)=>s !== arr);\n        value = [];\n        for (const item of arr){\n            const resolver = createSubResolver(scopes, _proxy, prop, item);\n            value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n        }\n    }\n    return value;\n}\nfunction resolveFallback(fallback, prop, value) {\n    return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\nconst getScope = (key, parent)=>key === true ? parent : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\nfunction addScopes(set, parentScopes, key, parentFallback, value) {\n    for (const parent of parentScopes){\n        const scope = getScope(key, parent);\n        if (scope) {\n            set.add(scope);\n            const fallback = resolveFallback(scope._fallback, key, value);\n            if (typeof fallback !== 'undefined' && fallback !== key && fallback !== parentFallback) {\n                // When we reach the descriptor that defines a new _fallback, return that.\n                // The fallback will resume to that new scope.\n                return fallback;\n            }\n        } else if (scope === false && typeof parentFallback !== 'undefined' && key !== parentFallback) {\n            // Fallback to `false` results to `false`, when falling back to different key.\n            // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations`\n            return null;\n        }\n    }\n    return false;\n}\nfunction createSubResolver(parentScopes, resolver, prop, value) {\n    const rootScopes = resolver._rootScopes;\n    const fallback = resolveFallback(resolver._fallback, prop, value);\n    const allScopes = [\n        ...parentScopes,\n        ...rootScopes\n    ];\n    const set = new Set();\n    set.add(value);\n    let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n    if (key === null) {\n        return false;\n    }\n    if (typeof fallback !== 'undefined' && fallback !== prop) {\n        key = addScopesFromKey(set, allScopes, fallback, key, value);\n        if (key === null) {\n            return false;\n        }\n    }\n    return _createResolver(Array.from(set), [\n        ''\n    ], rootScopes, fallback, ()=>subGetTarget(resolver, prop, value));\n}\nfunction addScopesFromKey(set, allScopes, key, fallback, item) {\n    while(key){\n        key = addScopes(set, allScopes, key, fallback, item);\n    }\n    return key;\n}\nfunction subGetTarget(resolver, prop, value) {\n    const parent = resolver._getTarget();\n    if (!(prop in parent)) {\n        parent[prop] = {};\n    }\n    const target = parent[prop];\n    if (isArray(target) && isObject(value)) {\n        // For array of objects, the object is used to store updated values\n        return value;\n    }\n    return target || {};\n}\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy) {\n    let value;\n    for (const prefix of prefixes){\n        value = _resolve(readKey(prefix, prop), scopes);\n        if (typeof value !== 'undefined') {\n            return needsSubResolver(prop, value) ? createSubResolver(scopes, proxy, prop, value) : value;\n        }\n    }\n}\nfunction _resolve(key, scopes) {\n    for (const scope of scopes){\n        if (!scope) {\n            continue;\n        }\n        const value = scope[key];\n        if (typeof value !== 'undefined') {\n            return value;\n        }\n    }\n}\nfunction getKeysFromAllScopes(target) {\n    let keys = target._keys;\n    if (!keys) {\n        keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n    }\n    return keys;\n}\nfunction resolveKeysFromAllScopes(scopes) {\n    const set = new Set();\n    for (const scope of scopes){\n        for (const key of Object.keys(scope).filter((k)=>!k.startsWith('_'))){\n            set.add(key);\n        }\n    }\n    return Array.from(set);\n}\nfunction _parseObjectDataRadialScale(meta, data, start, count) {\n    const { iScale  } = meta;\n    const { key ='r'  } = this._parsing;\n    const parsed = new Array(count);\n    let i, ilen, index, item;\n    for(i = 0, ilen = count; i < ilen; ++i){\n        index = i + start;\n        item = data[index];\n        parsed[i] = {\n            r: iScale.parse(resolveObjectKey(item, key), index)\n        };\n    }\n    return parsed;\n}\n\nconst EPSILON = Number.EPSILON || 1e-14;\nconst getPoint = (points, i)=>i < points.length && !points[i].skip && points[i];\nconst getValueAxis = (indexAxis)=>indexAxis === 'x' ? 'y' : 'x';\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t) {\n    // Props to Rob Spencer at scaled innovation for his post on splining between points\n    // http://scaledinnovation.com/analytics/splines/aboutSplines.html\n    // This function must also respect \"skipped\" points\n    const previous = firstPoint.skip ? middlePoint : firstPoint;\n    const current = middlePoint;\n    const next = afterPoint.skip ? middlePoint : afterPoint;\n    const d01 = distanceBetweenPoints(current, previous);\n    const d12 = distanceBetweenPoints(next, current);\n    let s01 = d01 / (d01 + d12);\n    let s12 = d12 / (d01 + d12);\n    // If all points are the same, s01 & s02 will be inf\n    s01 = isNaN(s01) ? 0 : s01;\n    s12 = isNaN(s12) ? 0 : s12;\n    const fa = t * s01; // scaling factor for triangle Ta\n    const fb = t * s12;\n    return {\n        previous: {\n            x: current.x - fa * (next.x - previous.x),\n            y: current.y - fa * (next.y - previous.y)\n        },\n        next: {\n            x: current.x + fb * (next.x - previous.x),\n            y: current.y + fb * (next.y - previous.y)\n        }\n    };\n}\n/**\n * Adjust tangents to ensure monotonic properties\n */ function monotoneAdjust(points, deltaK, mK) {\n    const pointsLen = points.length;\n    let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n    let pointAfter = getPoint(points, 0);\n    for(let i = 0; i < pointsLen - 1; ++i){\n        pointCurrent = pointAfter;\n        pointAfter = getPoint(points, i + 1);\n        if (!pointCurrent || !pointAfter) {\n            continue;\n        }\n        if (almostEquals(deltaK[i], 0, EPSILON)) {\n            mK[i] = mK[i + 1] = 0;\n            continue;\n        }\n        alphaK = mK[i] / deltaK[i];\n        betaK = mK[i + 1] / deltaK[i];\n        squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n        if (squaredMagnitude <= 9) {\n            continue;\n        }\n        tauK = 3 / Math.sqrt(squaredMagnitude);\n        mK[i] = alphaK * tauK * deltaK[i];\n        mK[i + 1] = betaK * tauK * deltaK[i];\n    }\n}\nfunction monotoneCompute(points, mK, indexAxis = 'x') {\n    const valueAxis = getValueAxis(indexAxis);\n    const pointsLen = points.length;\n    let delta, pointBefore, pointCurrent;\n    let pointAfter = getPoint(points, 0);\n    for(let i = 0; i < pointsLen; ++i){\n        pointBefore = pointCurrent;\n        pointCurrent = pointAfter;\n        pointAfter = getPoint(points, i + 1);\n        if (!pointCurrent) {\n            continue;\n        }\n        const iPixel = pointCurrent[indexAxis];\n        const vPixel = pointCurrent[valueAxis];\n        if (pointBefore) {\n            delta = (iPixel - pointBefore[indexAxis]) / 3;\n            pointCurrent[`cp1${indexAxis}`] = iPixel - delta;\n            pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];\n        }\n        if (pointAfter) {\n            delta = (pointAfter[indexAxis] - iPixel) / 3;\n            pointCurrent[`cp2${indexAxis}`] = iPixel + delta;\n            pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];\n        }\n    }\n}\n/**\n * This function calculates Bézier control points in a similar way than |splineCurve|,\n * but preserves monotonicity of the provided data and ensures no local extremums are added\n * between the dataset discrete points due to the interpolation.\n * See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n */ function splineCurveMonotone(points, indexAxis = 'x') {\n    const valueAxis = getValueAxis(indexAxis);\n    const pointsLen = points.length;\n    const deltaK = Array(pointsLen).fill(0);\n    const mK = Array(pointsLen);\n    // Calculate slopes (deltaK) and initialize tangents (mK)\n    let i, pointBefore, pointCurrent;\n    let pointAfter = getPoint(points, 0);\n    for(i = 0; i < pointsLen; ++i){\n        pointBefore = pointCurrent;\n        pointCurrent = pointAfter;\n        pointAfter = getPoint(points, i + 1);\n        if (!pointCurrent) {\n            continue;\n        }\n        if (pointAfter) {\n            const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n            // In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n            deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n        }\n        mK[i] = !pointBefore ? deltaK[i] : !pointAfter ? deltaK[i - 1] : sign(deltaK[i - 1]) !== sign(deltaK[i]) ? 0 : (deltaK[i - 1] + deltaK[i]) / 2;\n    }\n    monotoneAdjust(points, deltaK, mK);\n    monotoneCompute(points, mK, indexAxis);\n}\nfunction capControlPoint(pt, min, max) {\n    return Math.max(Math.min(pt, max), min);\n}\nfunction capBezierPoints(points, area) {\n    let i, ilen, point, inArea, inAreaPrev;\n    let inAreaNext = _isPointInArea(points[0], area);\n    for(i = 0, ilen = points.length; i < ilen; ++i){\n        inAreaPrev = inArea;\n        inArea = inAreaNext;\n        inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n        if (!inArea) {\n            continue;\n        }\n        point = points[i];\n        if (inAreaPrev) {\n            point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n            point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n        }\n        if (inAreaNext) {\n            point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n            point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n        }\n    }\n}\n/**\n * @private\n */ function _updateBezierControlPoints(points, options, area, loop, indexAxis) {\n    let i, ilen, point, controlPoints;\n    // Only consider points that are drawn in case the spanGaps option is used\n    if (options.spanGaps) {\n        points = points.filter((pt)=>!pt.skip);\n    }\n    if (options.cubicInterpolationMode === 'monotone') {\n        splineCurveMonotone(points, indexAxis);\n    } else {\n        let prev = loop ? points[points.length - 1] : points[0];\n        for(i = 0, ilen = points.length; i < ilen; ++i){\n            point = points[i];\n            controlPoints = splineCurve(prev, point, points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen], options.tension);\n            point.cp1x = controlPoints.previous.x;\n            point.cp1y = controlPoints.previous.y;\n            point.cp2x = controlPoints.next.x;\n            point.cp2y = controlPoints.next.y;\n            prev = point;\n        }\n    }\n    if (options.capBezierPoints) {\n        capBezierPoints(points, area);\n    }\n}\n\n/**\n * Note: typedefs are auto-exported, so use a made-up `dom` namespace where\n * necessary to avoid duplicates with `export * from './helpers`; see\n * https://github.com/microsoft/TypeScript/issues/46011\n * @typedef { import('../core/core.controller.js').default } dom.Chart\n * @typedef { import('../../types').ChartEvent } ChartEvent\n */ /**\n * @private\n */ function _isDomSupported() {\n    return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n/**\n * @private\n */ function _getParentNode(domNode) {\n    let parent = domNode.parentNode;\n    if (parent && parent.toString() === '[object ShadowRoot]') {\n        parent = parent.host;\n    }\n    return parent;\n}\n/**\n * convert max-width/max-height values that may be percentages into a number\n * @private\n */ function parseMaxStyle(styleValue, node, parentProperty) {\n    let valueInPixels;\n    if (typeof styleValue === 'string') {\n        valueInPixels = parseInt(styleValue, 10);\n        if (styleValue.indexOf('%') !== -1) {\n            // percentage * size in dimension\n            valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n        }\n    } else {\n        valueInPixels = styleValue;\n    }\n    return valueInPixels;\n}\nconst getComputedStyle = (element)=>element.ownerDocument.defaultView.getComputedStyle(element, null);\nfunction getStyle(el, property) {\n    return getComputedStyle(el).getPropertyValue(property);\n}\nconst positions = [\n    'top',\n    'right',\n    'bottom',\n    'left'\n];\nfunction getPositionedStyle(styles, style, suffix) {\n    const result = {};\n    suffix = suffix ? '-' + suffix : '';\n    for(let i = 0; i < 4; i++){\n        const pos = positions[i];\n        result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n    }\n    result.width = result.left + result.right;\n    result.height = result.top + result.bottom;\n    return result;\n}\nconst useOffsetPos = (x, y, target)=>(x > 0 || y > 0) && (!target || !target.shadowRoot);\n/**\n * @param e\n * @param canvas\n * @returns Canvas position\n */ function getCanvasPosition(e, canvas) {\n    const touches = e.touches;\n    const source = touches && touches.length ? touches[0] : e;\n    const { offsetX , offsetY  } = source;\n    let box = false;\n    let x, y;\n    if (useOffsetPos(offsetX, offsetY, e.target)) {\n        x = offsetX;\n        y = offsetY;\n    } else {\n        const rect = canvas.getBoundingClientRect();\n        x = source.clientX - rect.left;\n        y = source.clientY - rect.top;\n        box = true;\n    }\n    return {\n        x,\n        y,\n        box\n    };\n}\n/**\n * Gets an event's x, y coordinates, relative to the chart area\n * @param event\n * @param chart\n * @returns x and y coordinates of the event\n */ function getRelativePosition(event, chart) {\n    if ('native' in event) {\n        return event;\n    }\n    const { canvas , currentDevicePixelRatio  } = chart;\n    const style = getComputedStyle(canvas);\n    const borderBox = style.boxSizing === 'border-box';\n    const paddings = getPositionedStyle(style, 'padding');\n    const borders = getPositionedStyle(style, 'border', 'width');\n    const { x , y , box  } = getCanvasPosition(event, canvas);\n    const xOffset = paddings.left + (box && borders.left);\n    const yOffset = paddings.top + (box && borders.top);\n    let { width , height  } = chart;\n    if (borderBox) {\n        width -= paddings.width + borders.width;\n        height -= paddings.height + borders.height;\n    }\n    return {\n        x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n        y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n    };\n}\nfunction getContainerSize(canvas, width, height) {\n    let maxWidth, maxHeight;\n    if (width === undefined || height === undefined) {\n        const container = canvas && _getParentNode(canvas);\n        if (!container) {\n            width = canvas.clientWidth;\n            height = canvas.clientHeight;\n        } else {\n            const rect = container.getBoundingClientRect(); // this is the border box of the container\n            const containerStyle = getComputedStyle(container);\n            const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n            const containerPadding = getPositionedStyle(containerStyle, 'padding');\n            width = rect.width - containerPadding.width - containerBorder.width;\n            height = rect.height - containerPadding.height - containerBorder.height;\n            maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n            maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n        }\n    }\n    return {\n        width,\n        height,\n        maxWidth: maxWidth || INFINITY,\n        maxHeight: maxHeight || INFINITY\n    };\n}\nconst round1 = (v)=>Math.round(v * 10) / 10;\n// eslint-disable-next-line complexity\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {\n    const style = getComputedStyle(canvas);\n    const margins = getPositionedStyle(style, 'margin');\n    const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n    const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n    const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n    let { width , height  } = containerSize;\n    if (style.boxSizing === 'content-box') {\n        const borders = getPositionedStyle(style, 'border', 'width');\n        const paddings = getPositionedStyle(style, 'padding');\n        width -= paddings.width + borders.width;\n        height -= paddings.height + borders.height;\n    }\n    width = Math.max(0, width - margins.width);\n    height = Math.max(0, aspectRatio ? width / aspectRatio : height - margins.height);\n    width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n    height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n    if (width && !height) {\n        // https://github.com/chartjs/Chart.js/issues/4659\n        // If the canvas has width, but no height, default to aspectRatio of 2 (canvas default)\n        height = round1(width / 2);\n    }\n    const maintainHeight = bbWidth !== undefined || bbHeight !== undefined;\n    if (maintainHeight && aspectRatio && containerSize.height && height > containerSize.height) {\n        height = containerSize.height;\n        width = round1(Math.floor(height * aspectRatio));\n    }\n    return {\n        width,\n        height\n    };\n}\n/**\n * @param chart\n * @param forceRatio\n * @param forceStyle\n * @returns True if the canvas context size or transformation has changed.\n */ function retinaScale(chart, forceRatio, forceStyle) {\n    const pixelRatio = forceRatio || 1;\n    const deviceHeight = Math.floor(chart.height * pixelRatio);\n    const deviceWidth = Math.floor(chart.width * pixelRatio);\n    chart.height = Math.floor(chart.height);\n    chart.width = Math.floor(chart.width);\n    const canvas = chart.canvas;\n    // If no style has been set on the canvas, the render size is used as display size,\n    // making the chart visually bigger, so let's enforce it to the \"correct\" values.\n    // See https://github.com/chartjs/Chart.js/issues/3575\n    if (canvas.style && (forceStyle || !canvas.style.height && !canvas.style.width)) {\n        canvas.style.height = `${chart.height}px`;\n        canvas.style.width = `${chart.width}px`;\n    }\n    if (chart.currentDevicePixelRatio !== pixelRatio || canvas.height !== deviceHeight || canvas.width !== deviceWidth) {\n        chart.currentDevicePixelRatio = pixelRatio;\n        canvas.height = deviceHeight;\n        canvas.width = deviceWidth;\n        chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n        return true;\n    }\n    return false;\n}\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */ const supportsEventListenerOptions = function() {\n    let passiveSupported = false;\n    try {\n        const options = {\n            get passive () {\n                passiveSupported = true;\n                return false;\n            }\n        };\n        if (_isDomSupported()) {\n            window.addEventListener('test', null, options);\n            window.removeEventListener('test', null, options);\n        }\n    } catch (e) {\n    // continue regardless of error\n    }\n    return passiveSupported;\n}();\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns Size in pixels or undefined if unknown.\n */ function readUsedSize(element, property) {\n    const value = getStyle(element, property);\n    const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n    return matches ? +matches[1] : undefined;\n}\n\n/**\n * @private\n */ function _pointInLine(p1, p2, t, mode) {\n    return {\n        x: p1.x + t * (p2.x - p1.x),\n        y: p1.y + t * (p2.y - p1.y)\n    };\n}\n/**\n * @private\n */ function _steppedInterpolation(p1, p2, t, mode) {\n    return {\n        x: p1.x + t * (p2.x - p1.x),\n        y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y : mode === 'after' ? t < 1 ? p1.y : p2.y : t > 0 ? p2.y : p1.y\n    };\n}\n/**\n * @private\n */ function _bezierInterpolation(p1, p2, t, mode) {\n    const cp1 = {\n        x: p1.cp2x,\n        y: p1.cp2y\n    };\n    const cp2 = {\n        x: p2.cp1x,\n        y: p2.cp1y\n    };\n    const a = _pointInLine(p1, cp1, t);\n    const b = _pointInLine(cp1, cp2, t);\n    const c = _pointInLine(cp2, p2, t);\n    const d = _pointInLine(a, b, t);\n    const e = _pointInLine(b, c, t);\n    return _pointInLine(d, e, t);\n}\n\nconst getRightToLeftAdapter = function(rectX, width) {\n    return {\n        x (x) {\n            return rectX + rectX + width - x;\n        },\n        setWidth (w) {\n            width = w;\n        },\n        textAlign (align) {\n            if (align === 'center') {\n                return align;\n            }\n            return align === 'right' ? 'left' : 'right';\n        },\n        xPlus (x, value) {\n            return x - value;\n        },\n        leftForLtr (x, itemWidth) {\n            return x - itemWidth;\n        }\n    };\n};\nconst getLeftToRightAdapter = function() {\n    return {\n        x (x) {\n            return x;\n        },\n        setWidth (w) {},\n        textAlign (align) {\n            return align;\n        },\n        xPlus (x, value) {\n            return x + value;\n        },\n        leftForLtr (x, _itemWidth) {\n            return x;\n        }\n    };\n};\nfunction getRtlAdapter(rtl, rectX, width) {\n    return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\nfunction overrideTextDirection(ctx, direction) {\n    let style, original;\n    if (direction === 'ltr' || direction === 'rtl') {\n        style = ctx.canvas.style;\n        original = [\n            style.getPropertyValue('direction'),\n            style.getPropertyPriority('direction')\n        ];\n        style.setProperty('direction', direction, 'important');\n        ctx.prevTextDirection = original;\n    }\n}\nfunction restoreTextDirection(ctx, original) {\n    if (original !== undefined) {\n        delete ctx.prevTextDirection;\n        ctx.canvas.style.setProperty('direction', original[0], original[1]);\n    }\n}\n\nfunction propertyFn(property) {\n    if (property === 'angle') {\n        return {\n            between: _angleBetween,\n            compare: _angleDiff,\n            normalize: _normalizeAngle\n        };\n    }\n    return {\n        between: _isBetween,\n        compare: (a, b)=>a - b,\n        normalize: (x)=>x\n    };\n}\nfunction normalizeSegment({ start , end , count , loop , style  }) {\n    return {\n        start: start % count,\n        end: end % count,\n        loop: loop && (end - start + 1) % count === 0,\n        style\n    };\n}\nfunction getSegment(segment, points, bounds) {\n    const { property , start: startBound , end: endBound  } = bounds;\n    const { between , normalize  } = propertyFn(property);\n    const count = points.length;\n    let { start , end , loop  } = segment;\n    let i, ilen;\n    if (loop) {\n        start += count;\n        end += count;\n        for(i = 0, ilen = count; i < ilen; ++i){\n            if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n                break;\n            }\n            start--;\n            end--;\n        }\n        start %= count;\n        end %= count;\n    }\n    if (end < start) {\n        end += count;\n    }\n    return {\n        start,\n        end,\n        loop,\n        style: segment.style\n    };\n}\n function _boundSegment(segment, points, bounds) {\n    if (!bounds) {\n        return [\n            segment\n        ];\n    }\n    const { property , start: startBound , end: endBound  } = bounds;\n    const count = points.length;\n    const { compare , between , normalize  } = propertyFn(property);\n    const { start , end , loop , style  } = getSegment(segment, points, bounds);\n    const result = [];\n    let inside = false;\n    let subStart = null;\n    let value, point, prevValue;\n    const startIsBefore = ()=>between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n    const endIsBefore = ()=>compare(endBound, value) === 0 || between(endBound, prevValue, value);\n    const shouldStart = ()=>inside || startIsBefore();\n    const shouldStop = ()=>!inside || endIsBefore();\n    for(let i = start, prev = start; i <= end; ++i){\n        point = points[i % count];\n        if (point.skip) {\n            continue;\n        }\n        value = normalize(point[property]);\n        if (value === prevValue) {\n            continue;\n        }\n        inside = between(value, startBound, endBound);\n        if (subStart === null && shouldStart()) {\n            subStart = compare(value, startBound) === 0 ? i : prev;\n        }\n        if (subStart !== null && shouldStop()) {\n            result.push(normalizeSegment({\n                start: subStart,\n                end: i,\n                loop,\n                count,\n                style\n            }));\n            subStart = null;\n        }\n        prev = i;\n        prevValue = value;\n    }\n    if (subStart !== null) {\n        result.push(normalizeSegment({\n            start: subStart,\n            end,\n            loop,\n            count,\n            style\n        }));\n    }\n    return result;\n}\n function _boundSegments(line, bounds) {\n    const result = [];\n    const segments = line.segments;\n    for(let i = 0; i < segments.length; i++){\n        const sub = _boundSegment(segments[i], line.points, bounds);\n        if (sub.length) {\n            result.push(...sub);\n        }\n    }\n    return result;\n}\n function findStartAndEnd(points, count, loop, spanGaps) {\n    let start = 0;\n    let end = count - 1;\n    if (loop && !spanGaps) {\n        while(start < count && !points[start].skip){\n            start++;\n        }\n    }\n    while(start < count && points[start].skip){\n        start++;\n    }\n    start %= count;\n    if (loop) {\n        end += start;\n    }\n    while(end > start && points[end % count].skip){\n        end--;\n    }\n    end %= count;\n    return {\n        start,\n        end\n    };\n}\n function solidSegments(points, start, max, loop) {\n    const count = points.length;\n    const result = [];\n    let last = start;\n    let prev = points[start];\n    let end;\n    for(end = start + 1; end <= max; ++end){\n        const cur = points[end % count];\n        if (cur.skip || cur.stop) {\n            if (!prev.skip) {\n                loop = false;\n                result.push({\n                    start: start % count,\n                    end: (end - 1) % count,\n                    loop\n                });\n                start = last = cur.stop ? end : null;\n            }\n        } else {\n            last = end;\n            if (prev.skip) {\n                start = end;\n            }\n        }\n        prev = cur;\n    }\n    if (last !== null) {\n        result.push({\n            start: start % count,\n            end: last % count,\n            loop\n        });\n    }\n    return result;\n}\n function _computeSegments(line, segmentOptions) {\n    const points = line.points;\n    const spanGaps = line.options.spanGaps;\n    const count = points.length;\n    if (!count) {\n        return [];\n    }\n    const loop = !!line._loop;\n    const { start , end  } = findStartAndEnd(points, count, loop, spanGaps);\n    if (spanGaps === true) {\n        return splitByStyles(line, [\n            {\n                start,\n                end,\n                loop\n            }\n        ], points, segmentOptions);\n    }\n    const max = end < start ? end + count : end;\n    const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n    return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n function splitByStyles(line, segments, points, segmentOptions) {\n    if (!segmentOptions || !segmentOptions.setContext || !points) {\n        return segments;\n    }\n    return doSplitByStyles(line, segments, points, segmentOptions);\n}\n function doSplitByStyles(line, segments, points, segmentOptions) {\n    const chartContext = line._chart.getContext();\n    const baseStyle = readStyle(line.options);\n    const { _datasetIndex: datasetIndex , options: { spanGaps  }  } = line;\n    const count = points.length;\n    const result = [];\n    let prevStyle = baseStyle;\n    let start = segments[0].start;\n    let i = start;\n    function addStyle(s, e, l, st) {\n        const dir = spanGaps ? -1 : 1;\n        if (s === e) {\n            return;\n        }\n        s += count;\n        while(points[s % count].skip){\n            s -= dir;\n        }\n        while(points[e % count].skip){\n            e += dir;\n        }\n        if (s % count !== e % count) {\n            result.push({\n                start: s % count,\n                end: e % count,\n                loop: l,\n                style: st\n            });\n            prevStyle = st;\n            start = e % count;\n        }\n    }\n    for (const segment of segments){\n        start = spanGaps ? start : segment.start;\n        let prev = points[start % count];\n        let style;\n        for(i = start + 1; i <= segment.end; i++){\n            const pt = points[i % count];\n            style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n                type: 'segment',\n                p0: prev,\n                p1: pt,\n                p0DataIndex: (i - 1) % count,\n                p1DataIndex: i % count,\n                datasetIndex\n            })));\n            if (styleChanged(style, prevStyle)) {\n                addStyle(start, i - 1, segment.loop, prevStyle);\n            }\n            prev = pt;\n            prevStyle = style;\n        }\n        if (start < i - 1) {\n            addStyle(start, i - 1, segment.loop, prevStyle);\n        }\n    }\n    return result;\n}\nfunction readStyle(options) {\n    return {\n        backgroundColor: options.backgroundColor,\n        borderCapStyle: options.borderCapStyle,\n        borderDash: options.borderDash,\n        borderDashOffset: options.borderDashOffset,\n        borderJoinStyle: options.borderJoinStyle,\n        borderWidth: options.borderWidth,\n        borderColor: options.borderColor\n    };\n}\nfunction styleChanged(style, prevStyle) {\n    if (!prevStyle) {\n        return false;\n    }\n    const cache = [];\n    const replacer = function(key, value) {\n        if (!isPatternOrGradient(value)) {\n            return value;\n        }\n        if (!cache.includes(value)) {\n            cache.push(value);\n        }\n        return cache.indexOf(value);\n    };\n    return JSON.stringify(style, replacer) !== JSON.stringify(prevStyle, replacer);\n}\n\nexport { unclipArea as $, _rlookupByKey as A, _lookupByKey as B, _isPointInArea as C, getAngleFromPoint as D, toPadding as E, each as F, getMaximumSize as G, HALF_PI as H, _getParentNode as I, readUsedSize as J, supportsEventListenerOptions as K, throttled as L, _isDomSupported as M, _factorize as N, finiteOrDefault as O, PI as P, callback as Q, _addGrace as R, _limitValue as S, TAU as T, toDegrees as U, _measureText as V, _int16Range as W, _alignPixel as X, clipArea as Y, renderText as Z, _arrayUnique as _, resolve as a, fontString as a$, toFont as a0, _toLeftRightCenter as a1, _alignStartEnd as a2, overrides as a3, merge as a4, _capitalize as a5, descriptors as a6, isFunction as a7, _attachContext as a8, _createResolver as a9, overrideTextDirection as aA, _textX as aB, restoreTextDirection as aC, drawPointLegend as aD, distanceBetweenPoints as aE, noop as aF, _setMinAndMaxByKey as aG, niceNum as aH, almostWhole as aI, almostEquals as aJ, _decimalPlaces as aK, Ticks as aL, log10 as aM, _longestText as aN, _filterBetween as aO, _lookup as aP, isPatternOrGradient as aQ, getHoverColor as aR, clone as aS, _merger as aT, _mergerIf as aU, _deprecated as aV, _splitKey as aW, toFontString as aX, splineCurve as aY, splineCurveMonotone as aZ, getStyle as a_, _descriptors as aa, mergeIf as ab, uid as ac, debounce as ad, retinaScale as ae, clearCanvas as af, setsEqual as ag, _elementsEqual as ah, _isClickEvent as ai, _isBetween as aj, _readValueToProps as ak, _updateBezierControlPoints as al, _computeSegments as am, _boundSegments as an, _steppedInterpolation as ao, _bezierInterpolation as ap, _pointInLine as aq, _steppedLineTo as ar, _bezierCurveTo as as, drawPoint as at, addRoundedRectPath as au, toTRBL as av, toTRBLCorners as aw, _boundSegment as ax, _normalizeAngle as ay, getRtlAdapter as az, isArray as b, toLineHeight as b0, PITAU as b1, INFINITY as b2, RAD_PER_DEG as b3, QUARTER_PI as b4, TWO_THIRDS_PI as b5, _angleDiff as b6, color as c, defaults as d, effects as e, resolveObjectKey as f, isNumberFinite as g, defined as h, isObject as i, createContext as j, isNullOrUndef as k, listenArrayEvents as l, toPercentage as m, toDimension as n, formatNumber as o, _angleBetween as p, _getStartAndCountOfVisiblePoints as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, _scaleRangesChanged as w, isNumber as x, _parseObjectDataRadialScale as y, getRelativePosition as z };\n//# sourceMappingURL=helpers.segment.js.map\n","/*!\n * Chart.js v4.4.6\n * https://www.chartjs.org\n * (c) 2024 Chart.js Contributors\n * Released under the MIT License\n */\nimport { r as requestAnimFrame, a as resolve, e as effects, c as color, i as isObject, d as defaults, b as isArray, v as valueOrDefault, u as unlistenArrayEvents, l as listenArrayEvents, f as resolveObjectKey, g as isNumberFinite, h as defined, s as sign, j as createContext, k as isNullOrUndef, _ as _arrayUnique, t as toRadians, m as toPercentage, n as toDimension, T as TAU, o as formatNumber, p as _angleBetween, H as HALF_PI, P as PI, q as _getStartAndCountOfVisiblePoints, w as _scaleRangesChanged, x as isNumber, y as _parseObjectDataRadialScale, z as getRelativePosition, A as _rlookupByKey, B as _lookupByKey, C as _isPointInArea, D as getAngleFromPoint, E as toPadding, F as each, G as getMaximumSize, I as _getParentNode, J as readUsedSize, K as supportsEventListenerOptions, L as throttled, M as _isDomSupported, N as _factorize, O as finiteOrDefault, Q as callback, R as _addGrace, S as _limitValue, U as toDegrees, V as _measureText, W as _int16Range, X as _alignPixel, Y as clipArea, Z as renderText, $ as unclipArea, a0 as toFont, a1 as _toLeftRightCenter, a2 as _alignStartEnd, a3 as overrides, a4 as merge, a5 as _capitalize, a6 as descriptors, a7 as isFunction, a8 as _attachContext, a9 as _createResolver, aa as _descriptors, ab as mergeIf, ac as uid, ad as debounce, ae as retinaScale, af as clearCanvas, ag as setsEqual, ah as _elementsEqual, ai as _isClickEvent, aj as _isBetween, ak as _readValueToProps, al as _updateBezierControlPoints, am as _computeSegments, an as _boundSegments, ao as _steppedInterpolation, ap as _bezierInterpolation, aq as _pointInLine, ar as _steppedLineTo, as as _bezierCurveTo, at as drawPoint, au as addRoundedRectPath, av as toTRBL, aw as toTRBLCorners, ax as _boundSegment, ay as _normalizeAngle, az as getRtlAdapter, aA as overrideTextDirection, aB as _textX, aC as restoreTextDirection, aD as drawPointLegend, aE as distanceBetweenPoints, aF as noop, aG as _setMinAndMaxByKey, aH as niceNum, aI as almostWhole, aJ as almostEquals, aK as _decimalPlaces, aL as Ticks, aM as log10, aN as _longestText, aO as _filterBetween, aP as _lookup } from './chunks/helpers.segment.js';\nimport '@kurkle/color';\n\nclass Animator {\n    constructor(){\n        this._request = null;\n        this._charts = new Map();\n        this._running = false;\n        this._lastDate = undefined;\n    }\n _notify(chart, anims, date, type) {\n        const callbacks = anims.listeners[type];\n        const numSteps = anims.duration;\n        callbacks.forEach((fn)=>fn({\n                chart,\n                initial: anims.initial,\n                numSteps,\n                currentStep: Math.min(date - anims.start, numSteps)\n            }));\n    }\n _refresh() {\n        if (this._request) {\n            return;\n        }\n        this._running = true;\n        this._request = requestAnimFrame.call(window, ()=>{\n            this._update();\n            this._request = null;\n            if (this._running) {\n                this._refresh();\n            }\n        });\n    }\n _update(date = Date.now()) {\n        let remaining = 0;\n        this._charts.forEach((anims, chart)=>{\n            if (!anims.running || !anims.items.length) {\n                return;\n            }\n            const items = anims.items;\n            let i = items.length - 1;\n            let draw = false;\n            let item;\n            for(; i >= 0; --i){\n                item = items[i];\n                if (item._active) {\n                    if (item._total > anims.duration) {\n                        anims.duration = item._total;\n                    }\n                    item.tick(date);\n                    draw = true;\n                } else {\n                    items[i] = items[items.length - 1];\n                    items.pop();\n                }\n            }\n            if (draw) {\n                chart.draw();\n                this._notify(chart, anims, date, 'progress');\n            }\n            if (!items.length) {\n                anims.running = false;\n                this._notify(chart, anims, date, 'complete');\n                anims.initial = false;\n            }\n            remaining += items.length;\n        });\n        this._lastDate = date;\n        if (remaining === 0) {\n            this._running = false;\n        }\n    }\n _getAnims(chart) {\n        const charts = this._charts;\n        let anims = charts.get(chart);\n        if (!anims) {\n            anims = {\n                running: false,\n                initial: true,\n                items: [],\n                listeners: {\n                    complete: [],\n                    progress: []\n                }\n            };\n            charts.set(chart, anims);\n        }\n        return anims;\n    }\n listen(chart, event, cb) {\n        this._getAnims(chart).listeners[event].push(cb);\n    }\n add(chart, items) {\n        if (!items || !items.length) {\n            return;\n        }\n        this._getAnims(chart).items.push(...items);\n    }\n has(chart) {\n        return this._getAnims(chart).items.length > 0;\n    }\n start(chart) {\n        const anims = this._charts.get(chart);\n        if (!anims) {\n            return;\n        }\n        anims.running = true;\n        anims.start = Date.now();\n        anims.duration = anims.items.reduce((acc, cur)=>Math.max(acc, cur._duration), 0);\n        this._refresh();\n    }\n    running(chart) {\n        if (!this._running) {\n            return false;\n        }\n        const anims = this._charts.get(chart);\n        if (!anims || !anims.running || !anims.items.length) {\n            return false;\n        }\n        return true;\n    }\n stop(chart) {\n        const anims = this._charts.get(chart);\n        if (!anims || !anims.items.length) {\n            return;\n        }\n        const items = anims.items;\n        let i = items.length - 1;\n        for(; i >= 0; --i){\n            items[i].cancel();\n        }\n        anims.items = [];\n        this._notify(chart, anims, Date.now(), 'complete');\n    }\n remove(chart) {\n        return this._charts.delete(chart);\n    }\n}\nvar animator = /* #__PURE__ */ new Animator();\n\nconst transparent = 'transparent';\nconst interpolators = {\n    boolean (from, to, factor) {\n        return factor > 0.5 ? to : from;\n    },\n color (from, to, factor) {\n        const c0 = color(from || transparent);\n        const c1 = c0.valid && color(to || transparent);\n        return c1 && c1.valid ? c1.mix(c0, factor).hexString() : to;\n    },\n    number (from, to, factor) {\n        return from + (to - from) * factor;\n    }\n};\nclass Animation {\n    constructor(cfg, target, prop, to){\n        const currentValue = target[prop];\n        to = resolve([\n            cfg.to,\n            to,\n            currentValue,\n            cfg.from\n        ]);\n        const from = resolve([\n            cfg.from,\n            currentValue,\n            to\n        ]);\n        this._active = true;\n        this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n        this._easing = effects[cfg.easing] || effects.linear;\n        this._start = Math.floor(Date.now() + (cfg.delay || 0));\n        this._duration = this._total = Math.floor(cfg.duration);\n        this._loop = !!cfg.loop;\n        this._target = target;\n        this._prop = prop;\n        this._from = from;\n        this._to = to;\n        this._promises = undefined;\n    }\n    active() {\n        return this._active;\n    }\n    update(cfg, to, date) {\n        if (this._active) {\n            this._notify(false);\n            const currentValue = this._target[this._prop];\n            const elapsed = date - this._start;\n            const remain = this._duration - elapsed;\n            this._start = date;\n            this._duration = Math.floor(Math.max(remain, cfg.duration));\n            this._total += elapsed;\n            this._loop = !!cfg.loop;\n            this._to = resolve([\n                cfg.to,\n                to,\n                currentValue,\n                cfg.from\n            ]);\n            this._from = resolve([\n                cfg.from,\n                currentValue,\n                to\n            ]);\n        }\n    }\n    cancel() {\n        if (this._active) {\n            this.tick(Date.now());\n            this._active = false;\n            this._notify(false);\n        }\n    }\n    tick(date) {\n        const elapsed = date - this._start;\n        const duration = this._duration;\n        const prop = this._prop;\n        const from = this._from;\n        const loop = this._loop;\n        const to = this._to;\n        let factor;\n        this._active = from !== to && (loop || elapsed < duration);\n        if (!this._active) {\n            this._target[prop] = to;\n            this._notify(true);\n            return;\n        }\n        if (elapsed < 0) {\n            this._target[prop] = from;\n            return;\n        }\n        factor = elapsed / duration % 2;\n        factor = loop && factor > 1 ? 2 - factor : factor;\n        factor = this._easing(Math.min(1, Math.max(0, factor)));\n        this._target[prop] = this._fn(from, to, factor);\n    }\n    wait() {\n        const promises = this._promises || (this._promises = []);\n        return new Promise((res, rej)=>{\n            promises.push({\n                res,\n                rej\n            });\n        });\n    }\n    _notify(resolved) {\n        const method = resolved ? 'res' : 'rej';\n        const promises = this._promises || [];\n        for(let i = 0; i < promises.length; i++){\n            promises[i][method]();\n        }\n    }\n}\n\nclass Animations {\n    constructor(chart, config){\n        this._chart = chart;\n        this._properties = new Map();\n        this.configure(config);\n    }\n    configure(config) {\n        if (!isObject(config)) {\n            return;\n        }\n        const animationOptions = Object.keys(defaults.animation);\n        const animatedProps = this._properties;\n        Object.getOwnPropertyNames(config).forEach((key)=>{\n            const cfg = config[key];\n            if (!isObject(cfg)) {\n                return;\n            }\n            const resolved = {};\n            for (const option of animationOptions){\n                resolved[option] = cfg[option];\n            }\n            (isArray(cfg.properties) && cfg.properties || [\n                key\n            ]).forEach((prop)=>{\n                if (prop === key || !animatedProps.has(prop)) {\n                    animatedProps.set(prop, resolved);\n                }\n            });\n        });\n    }\n _animateOptions(target, values) {\n        const newOptions = values.options;\n        const options = resolveTargetOptions(target, newOptions);\n        if (!options) {\n            return [];\n        }\n        const animations = this._createAnimations(options, newOptions);\n        if (newOptions.$shared) {\n            awaitAll(target.options.$animations, newOptions).then(()=>{\n                target.options = newOptions;\n            }, ()=>{\n            });\n        }\n        return animations;\n    }\n _createAnimations(target, values) {\n        const animatedProps = this._properties;\n        const animations = [];\n        const running = target.$animations || (target.$animations = {});\n        const props = Object.keys(values);\n        const date = Date.now();\n        let i;\n        for(i = props.length - 1; i >= 0; --i){\n            const prop = props[i];\n            if (prop.charAt(0) === '$') {\n                continue;\n            }\n            if (prop === 'options') {\n                animations.push(...this._animateOptions(target, values));\n                continue;\n            }\n            const value = values[prop];\n            let animation = running[prop];\n            const cfg = animatedProps.get(prop);\n            if (animation) {\n                if (cfg && animation.active()) {\n                    animation.update(cfg, value, date);\n                    continue;\n                } else {\n                    animation.cancel();\n                }\n            }\n            if (!cfg || !cfg.duration) {\n                target[prop] = value;\n                continue;\n            }\n            running[prop] = animation = new Animation(cfg, target, prop, value);\n            animations.push(animation);\n        }\n        return animations;\n    }\n update(target, values) {\n        if (this._properties.size === 0) {\n            Object.assign(target, values);\n            return;\n        }\n        const animations = this._createAnimations(target, values);\n        if (animations.length) {\n            animator.add(this._chart, animations);\n            return true;\n        }\n    }\n}\nfunction awaitAll(animations, properties) {\n    const running = [];\n    const keys = Object.keys(properties);\n    for(let i = 0; i < keys.length; i++){\n        const anim = animations[keys[i]];\n        if (anim && anim.active()) {\n            running.push(anim.wait());\n        }\n    }\n    return Promise.all(running);\n}\nfunction resolveTargetOptions(target, newOptions) {\n    if (!newOptions) {\n        return;\n    }\n    let options = target.options;\n    if (!options) {\n        target.options = newOptions;\n        return;\n    }\n    if (options.$shared) {\n        target.options = options = Object.assign({}, options, {\n            $shared: false,\n            $animations: {}\n        });\n    }\n    return options;\n}\n\nfunction scaleClip(scale, allowedOverflow) {\n    const opts = scale && scale.options || {};\n    const reverse = opts.reverse;\n    const min = opts.min === undefined ? allowedOverflow : 0;\n    const max = opts.max === undefined ? allowedOverflow : 0;\n    return {\n        start: reverse ? max : min,\n        end: reverse ? min : max\n    };\n}\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n    if (allowedOverflow === false) {\n        return false;\n    }\n    const x = scaleClip(xScale, allowedOverflow);\n    const y = scaleClip(yScale, allowedOverflow);\n    return {\n        top: y.end,\n        right: x.end,\n        bottom: y.start,\n        left: x.start\n    };\n}\nfunction toClip(value) {\n    let t, r, b, l;\n    if (isObject(value)) {\n        t = value.top;\n        r = value.right;\n        b = value.bottom;\n        l = value.left;\n    } else {\n        t = r = b = l = value;\n    }\n    return {\n        top: t,\n        right: r,\n        bottom: b,\n        left: l,\n        disabled: value === false\n    };\n}\nfunction getSortedDatasetIndices(chart, filterVisible) {\n    const keys = [];\n    const metasets = chart._getSortedDatasetMetas(filterVisible);\n    let i, ilen;\n    for(i = 0, ilen = metasets.length; i < ilen; ++i){\n        keys.push(metasets[i].index);\n    }\n    return keys;\n}\nfunction applyStack(stack, value, dsIndex, options = {}) {\n    const keys = stack.keys;\n    const singleMode = options.mode === 'single';\n    let i, ilen, datasetIndex, otherValue;\n    if (value === null) {\n        return;\n    }\n    let found = false;\n    for(i = 0, ilen = keys.length; i < ilen; ++i){\n        datasetIndex = +keys[i];\n        if (datasetIndex === dsIndex) {\n            found = true;\n            if (options.all) {\n                continue;\n            }\n            break;\n        }\n        otherValue = stack.values[datasetIndex];\n        if (isNumberFinite(otherValue) && (singleMode || value === 0 || sign(value) === sign(otherValue))) {\n            value += otherValue;\n        }\n    }\n    if (!found && !options.all) {\n        return 0;\n    }\n    return value;\n}\nfunction convertObjectDataToArray(data, meta) {\n    const { iScale , vScale  } = meta;\n    const iAxisKey = iScale.axis === 'x' ? 'x' : 'y';\n    const vAxisKey = vScale.axis === 'x' ? 'x' : 'y';\n    const keys = Object.keys(data);\n    const adata = new Array(keys.length);\n    let i, ilen, key;\n    for(i = 0, ilen = keys.length; i < ilen; ++i){\n        key = keys[i];\n        adata[i] = {\n            [iAxisKey]: key,\n            [vAxisKey]: data[key]\n        };\n    }\n    return adata;\n}\nfunction isStacked(scale, meta) {\n    const stacked = scale && scale.options.stacked;\n    return stacked || stacked === undefined && meta.stack !== undefined;\n}\nfunction getStackKey(indexScale, valueScale, meta) {\n    return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;\n}\nfunction getUserBounds(scale) {\n    const { min , max , minDefined , maxDefined  } = scale.getUserBounds();\n    return {\n        min: minDefined ? min : Number.NEGATIVE_INFINITY,\n        max: maxDefined ? max : Number.POSITIVE_INFINITY\n    };\n}\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n    const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n    return subStack[indexValue] || (subStack[indexValue] = {});\n}\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n    for (const meta of vScale.getMatchingVisibleMetas(type).reverse()){\n        const value = stack[meta.index];\n        if (positive && value > 0 || !positive && value < 0) {\n            return meta.index;\n        }\n    }\n    return null;\n}\nfunction updateStacks(controller, parsed) {\n    const { chart , _cachedMeta: meta  } = controller;\n    const stacks = chart._stacks || (chart._stacks = {});\n    const { iScale , vScale , index: datasetIndex  } = meta;\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const key = getStackKey(iScale, vScale, meta);\n    const ilen = parsed.length;\n    let stack;\n    for(let i = 0; i < ilen; ++i){\n        const item = parsed[i];\n        const { [iAxis]: index , [vAxis]: value  } = item;\n        const itemStacks = item._stacks || (item._stacks = {});\n        stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n        stack[datasetIndex] = value;\n        stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n        stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n        const visualValues = stack._visualValues || (stack._visualValues = {});\n        visualValues[datasetIndex] = value;\n    }\n}\nfunction getFirstScaleId(chart, axis) {\n    const scales = chart.scales;\n    return Object.keys(scales).filter((key)=>scales[key].axis === axis).shift();\n}\nfunction createDatasetContext(parent, index) {\n    return createContext(parent, {\n        active: false,\n        dataset: undefined,\n        datasetIndex: index,\n        index,\n        mode: 'default',\n        type: 'dataset'\n    });\n}\nfunction createDataContext(parent, index, element) {\n    return createContext(parent, {\n        active: false,\n        dataIndex: index,\n        parsed: undefined,\n        raw: undefined,\n        element,\n        index,\n        mode: 'default',\n        type: 'data'\n    });\n}\nfunction clearStacks(meta, items) {\n    const datasetIndex = meta.controller.index;\n    const axis = meta.vScale && meta.vScale.axis;\n    if (!axis) {\n        return;\n    }\n    items = items || meta._parsed;\n    for (const parsed of items){\n        const stacks = parsed._stacks;\n        if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n            return;\n        }\n        delete stacks[axis][datasetIndex];\n        if (stacks[axis]._visualValues !== undefined && stacks[axis]._visualValues[datasetIndex] !== undefined) {\n            delete stacks[axis]._visualValues[datasetIndex];\n        }\n    }\n}\nconst isDirectUpdateMode = (mode)=>mode === 'reset' || mode === 'none';\nconst cloneIfNotShared = (cached, shared)=>shared ? cached : Object.assign({}, cached);\nconst createStack = (canStack, meta, chart)=>canStack && !meta.hidden && meta._stacked && {\n        keys: getSortedDatasetIndices(chart, true),\n        values: null\n    };\nclass DatasetController {\n static defaults = {};\n static datasetElementType = null;\n static dataElementType = null;\n constructor(chart, datasetIndex){\n        this.chart = chart;\n        this._ctx = chart.ctx;\n        this.index = datasetIndex;\n        this._cachedDataOpts = {};\n        this._cachedMeta = this.getMeta();\n        this._type = this._cachedMeta.type;\n        this.options = undefined;\n         this._parsing = false;\n        this._data = undefined;\n        this._objectData = undefined;\n        this._sharedOptions = undefined;\n        this._drawStart = undefined;\n        this._drawCount = undefined;\n        this.enableOptionSharing = false;\n        this.supportsDecimation = false;\n        this.$context = undefined;\n        this._syncList = [];\n        this.datasetElementType = new.target.datasetElementType;\n        this.dataElementType = new.target.dataElementType;\n        this.initialize();\n    }\n    initialize() {\n        const meta = this._cachedMeta;\n        this.configure();\n        this.linkScales();\n        meta._stacked = isStacked(meta.vScale, meta);\n        this.addElements();\n        if (this.options.fill && !this.chart.isPluginEnabled('filler')) {\n            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\");\n        }\n    }\n    updateIndex(datasetIndex) {\n        if (this.index !== datasetIndex) {\n            clearStacks(this._cachedMeta);\n        }\n        this.index = datasetIndex;\n    }\n    linkScales() {\n        const chart = this.chart;\n        const meta = this._cachedMeta;\n        const dataset = this.getDataset();\n        const chooseId = (axis, x, y, r)=>axis === 'x' ? x : axis === 'r' ? r : y;\n        const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n        const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n        const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n        const indexAxis = meta.indexAxis;\n        const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n        const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n        meta.xScale = this.getScaleForId(xid);\n        meta.yScale = this.getScaleForId(yid);\n        meta.rScale = this.getScaleForId(rid);\n        meta.iScale = this.getScaleForId(iid);\n        meta.vScale = this.getScaleForId(vid);\n    }\n    getDataset() {\n        return this.chart.data.datasets[this.index];\n    }\n    getMeta() {\n        return this.chart.getDatasetMeta(this.index);\n    }\n getScaleForId(scaleID) {\n        return this.chart.scales[scaleID];\n    }\n _getOtherScale(scale) {\n        const meta = this._cachedMeta;\n        return scale === meta.iScale ? meta.vScale : meta.iScale;\n    }\n    reset() {\n        this._update('reset');\n    }\n _destroy() {\n        const meta = this._cachedMeta;\n        if (this._data) {\n            unlistenArrayEvents(this._data, this);\n        }\n        if (meta._stacked) {\n            clearStacks(meta);\n        }\n    }\n _dataCheck() {\n        const dataset = this.getDataset();\n        const data = dataset.data || (dataset.data = []);\n        const _data = this._data;\n        if (isObject(data)) {\n            const meta = this._cachedMeta;\n            this._data = convertObjectDataToArray(data, meta);\n        } else if (_data !== data) {\n            if (_data) {\n                unlistenArrayEvents(_data, this);\n                const meta = this._cachedMeta;\n                clearStacks(meta);\n                meta._parsed = [];\n            }\n            if (data && Object.isExtensible(data)) {\n                listenArrayEvents(data, this);\n            }\n            this._syncList = [];\n            this._data = data;\n        }\n    }\n    addElements() {\n        const meta = this._cachedMeta;\n        this._dataCheck();\n        if (this.datasetElementType) {\n            meta.dataset = new this.datasetElementType();\n        }\n    }\n    buildOrUpdateElements(resetNewElements) {\n        const meta = this._cachedMeta;\n        const dataset = this.getDataset();\n        let stackChanged = false;\n        this._dataCheck();\n        const oldStacked = meta._stacked;\n        meta._stacked = isStacked(meta.vScale, meta);\n        if (meta.stack !== dataset.stack) {\n            stackChanged = true;\n            clearStacks(meta);\n            meta.stack = dataset.stack;\n        }\n        this._resyncElements(resetNewElements);\n        if (stackChanged || oldStacked !== meta._stacked) {\n            updateStacks(this, meta._parsed);\n            meta._stacked = isStacked(meta.vScale, meta);\n        }\n    }\n configure() {\n        const config = this.chart.config;\n        const scopeKeys = config.datasetScopeKeys(this._type);\n        const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n        this.options = config.createResolver(scopes, this.getContext());\n        this._parsing = this.options.parsing;\n        this._cachedDataOpts = {};\n    }\n parse(start, count) {\n        const { _cachedMeta: meta , _data: data  } = this;\n        const { iScale , _stacked  } = meta;\n        const iAxis = iScale.axis;\n        let sorted = start === 0 && count === data.length ? true : meta._sorted;\n        let prev = start > 0 && meta._parsed[start - 1];\n        let i, cur, parsed;\n        if (this._parsing === false) {\n            meta._parsed = data;\n            meta._sorted = true;\n            parsed = data;\n        } else {\n            if (isArray(data[start])) {\n                parsed = this.parseArrayData(meta, data, start, count);\n            } else if (isObject(data[start])) {\n                parsed = this.parseObjectData(meta, data, start, count);\n            } else {\n                parsed = this.parsePrimitiveData(meta, data, start, count);\n            }\n            const isNotInOrderComparedToPrev = ()=>cur[iAxis] === null || prev && cur[iAxis] < prev[iAxis];\n            for(i = 0; i < count; ++i){\n                meta._parsed[i + start] = cur = parsed[i];\n                if (sorted) {\n                    if (isNotInOrderComparedToPrev()) {\n                        sorted = false;\n                    }\n                    prev = cur;\n                }\n            }\n            meta._sorted = sorted;\n        }\n        if (_stacked) {\n            updateStacks(this, parsed);\n        }\n    }\n parsePrimitiveData(meta, data, start, count) {\n        const { iScale , vScale  } = meta;\n        const iAxis = iScale.axis;\n        const vAxis = vScale.axis;\n        const labels = iScale.getLabels();\n        const singleScale = iScale === vScale;\n        const parsed = new Array(count);\n        let i, ilen, index;\n        for(i = 0, ilen = count; i < ilen; ++i){\n            index = i + start;\n            parsed[i] = {\n                [iAxis]: singleScale || iScale.parse(labels[index], index),\n                [vAxis]: vScale.parse(data[index], index)\n            };\n        }\n        return parsed;\n    }\n parseArrayData(meta, data, start, count) {\n        const { xScale , yScale  } = meta;\n        const parsed = new Array(count);\n        let i, ilen, index, item;\n        for(i = 0, ilen = count; i < ilen; ++i){\n            index = i + start;\n            item = data[index];\n            parsed[i] = {\n                x: xScale.parse(item[0], index),\n                y: yScale.parse(item[1], index)\n            };\n        }\n        return parsed;\n    }\n parseObjectData(meta, data, start, count) {\n        const { xScale , yScale  } = meta;\n        const { xAxisKey ='x' , yAxisKey ='y'  } = this._parsing;\n        const parsed = new Array(count);\n        let i, ilen, index, item;\n        for(i = 0, ilen = count; i < ilen; ++i){\n            index = i + start;\n            item = data[index];\n            parsed[i] = {\n                x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n                y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n            };\n        }\n        return parsed;\n    }\n getParsed(index) {\n        return this._cachedMeta._parsed[index];\n    }\n getDataElement(index) {\n        return this._cachedMeta.data[index];\n    }\n applyStack(scale, parsed, mode) {\n        const chart = this.chart;\n        const meta = this._cachedMeta;\n        const value = parsed[scale.axis];\n        const stack = {\n            keys: getSortedDatasetIndices(chart, true),\n            values: parsed._stacks[scale.axis]._visualValues\n        };\n        return applyStack(stack, value, meta.index, {\n            mode\n        });\n    }\n updateRangeFromParsed(range, scale, parsed, stack) {\n        const parsedValue = parsed[scale.axis];\n        let value = parsedValue === null ? NaN : parsedValue;\n        const values = stack && parsed._stacks[scale.axis];\n        if (stack && values) {\n            stack.values = values;\n            value = applyStack(stack, parsedValue, this._cachedMeta.index);\n        }\n        range.min = Math.min(range.min, value);\n        range.max = Math.max(range.max, value);\n    }\n getMinMax(scale, canStack) {\n        const meta = this._cachedMeta;\n        const _parsed = meta._parsed;\n        const sorted = meta._sorted && scale === meta.iScale;\n        const ilen = _parsed.length;\n        const otherScale = this._getOtherScale(scale);\n        const stack = createStack(canStack, meta, this.chart);\n        const range = {\n            min: Number.POSITIVE_INFINITY,\n            max: Number.NEGATIVE_INFINITY\n        };\n        const { min: otherMin , max: otherMax  } = getUserBounds(otherScale);\n        let i, parsed;\n        function _skip() {\n            parsed = _parsed[i];\n            const otherValue = parsed[otherScale.axis];\n            return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n        }\n        for(i = 0; i < ilen; ++i){\n            if (_skip()) {\n                continue;\n            }\n            this.updateRangeFromParsed(range, scale, parsed, stack);\n            if (sorted) {\n                break;\n            }\n        }\n        if (sorted) {\n            for(i = ilen - 1; i >= 0; --i){\n                if (_skip()) {\n                    continue;\n                }\n                this.updateRangeFromParsed(range, scale, parsed, stack);\n                break;\n            }\n        }\n        return range;\n    }\n    getAllParsedValues(scale) {\n        const parsed = this._cachedMeta._parsed;\n        const values = [];\n        let i, ilen, value;\n        for(i = 0, ilen = parsed.length; i < ilen; ++i){\n            value = parsed[i][scale.axis];\n            if (isNumberFinite(value)) {\n                values.push(value);\n            }\n        }\n        return values;\n    }\n getMaxOverflow() {\n        return false;\n    }\n getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const iScale = meta.iScale;\n        const vScale = meta.vScale;\n        const parsed = this.getParsed(index);\n        return {\n            label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n            value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n        };\n    }\n _update(mode) {\n        const meta = this._cachedMeta;\n        this.update(mode || 'default');\n        meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n    }\n update(mode) {}\n    draw() {\n        const ctx = this._ctx;\n        const chart = this.chart;\n        const meta = this._cachedMeta;\n        const elements = meta.data || [];\n        const area = chart.chartArea;\n        const active = [];\n        const start = this._drawStart || 0;\n        const count = this._drawCount || elements.length - start;\n        const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n        let i;\n        if (meta.dataset) {\n            meta.dataset.draw(ctx, area, start, count);\n        }\n        for(i = start; i < start + count; ++i){\n            const element = elements[i];\n            if (element.hidden) {\n                continue;\n            }\n            if (element.active && drawActiveElementsOnTop) {\n                active.push(element);\n            } else {\n                element.draw(ctx, area);\n            }\n        }\n        for(i = 0; i < active.length; ++i){\n            active[i].draw(ctx, area);\n        }\n    }\n getStyle(index, active) {\n        const mode = active ? 'active' : 'default';\n        return index === undefined && this._cachedMeta.dataset ? this.resolveDatasetElementOptions(mode) : this.resolveDataElementOptions(index || 0, mode);\n    }\n getContext(index, active, mode) {\n        const dataset = this.getDataset();\n        let context;\n        if (index >= 0 && index < this._cachedMeta.data.length) {\n            const element = this._cachedMeta.data[index];\n            context = element.$context || (element.$context = createDataContext(this.getContext(), index, element));\n            context.parsed = this.getParsed(index);\n            context.raw = dataset.data[index];\n            context.index = context.dataIndex = index;\n        } else {\n            context = this.$context || (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n            context.dataset = dataset;\n            context.index = context.datasetIndex = this.index;\n        }\n        context.active = !!active;\n        context.mode = mode;\n        return context;\n    }\n resolveDatasetElementOptions(mode) {\n        return this._resolveElementOptions(this.datasetElementType.id, mode);\n    }\n resolveDataElementOptions(index, mode) {\n        return this._resolveElementOptions(this.dataElementType.id, mode, index);\n    }\n _resolveElementOptions(elementType, mode = 'default', index) {\n        const active = mode === 'active';\n        const cache = this._cachedDataOpts;\n        const cacheKey = elementType + '-' + mode;\n        const cached = cache[cacheKey];\n        const sharing = this.enableOptionSharing && defined(index);\n        if (cached) {\n            return cloneIfNotShared(cached, sharing);\n        }\n        const config = this.chart.config;\n        const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n        const prefixes = active ? [\n            `${elementType}Hover`,\n            'hover',\n            elementType,\n            ''\n        ] : [\n            elementType,\n            ''\n        ];\n        const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n        const names = Object.keys(defaults.elements[elementType]);\n        const context = ()=>this.getContext(index, active, mode);\n        const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n        if (values.$shared) {\n            values.$shared = sharing;\n            cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n        }\n        return values;\n    }\n _resolveAnimations(index, transition, active) {\n        const chart = this.chart;\n        const cache = this._cachedDataOpts;\n        const cacheKey = `animation-${transition}`;\n        const cached = cache[cacheKey];\n        if (cached) {\n            return cached;\n        }\n        let options;\n        if (chart.options.animation !== false) {\n            const config = this.chart.config;\n            const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n            const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n            options = config.createResolver(scopes, this.getContext(index, active, transition));\n        }\n        const animations = new Animations(chart, options && options.animations);\n        if (options && options._cacheable) {\n            cache[cacheKey] = Object.freeze(animations);\n        }\n        return animations;\n    }\n getSharedOptions(options) {\n        if (!options.$shared) {\n            return;\n        }\n        return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n    }\n includeOptions(mode, sharedOptions) {\n        return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n    }\n _getSharedOptions(start, mode) {\n        const firstOpts = this.resolveDataElementOptions(start, mode);\n        const previouslySharedOptions = this._sharedOptions;\n        const sharedOptions = this.getSharedOptions(firstOpts);\n        const includeOptions = this.includeOptions(mode, sharedOptions) || sharedOptions !== previouslySharedOptions;\n        this.updateSharedOptions(sharedOptions, mode, firstOpts);\n        return {\n            sharedOptions,\n            includeOptions\n        };\n    }\n updateElement(element, index, properties, mode) {\n        if (isDirectUpdateMode(mode)) {\n            Object.assign(element, properties);\n        } else {\n            this._resolveAnimations(index, mode).update(element, properties);\n        }\n    }\n updateSharedOptions(sharedOptions, mode, newOptions) {\n        if (sharedOptions && !isDirectUpdateMode(mode)) {\n            this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n        }\n    }\n _setStyle(element, index, mode, active) {\n        element.active = active;\n        const options = this.getStyle(index, active);\n        this._resolveAnimations(index, mode, active).update(element, {\n            options: !active && this.getSharedOptions(options) || options\n        });\n    }\n    removeHoverStyle(element, datasetIndex, index) {\n        this._setStyle(element, index, 'active', false);\n    }\n    setHoverStyle(element, datasetIndex, index) {\n        this._setStyle(element, index, 'active', true);\n    }\n _removeDatasetHoverStyle() {\n        const element = this._cachedMeta.dataset;\n        if (element) {\n            this._setStyle(element, undefined, 'active', false);\n        }\n    }\n _setDatasetHoverStyle() {\n        const element = this._cachedMeta.dataset;\n        if (element) {\n            this._setStyle(element, undefined, 'active', true);\n        }\n    }\n _resyncElements(resetNewElements) {\n        const data = this._data;\n        const elements = this._cachedMeta.data;\n        for (const [method, arg1, arg2] of this._syncList){\n            this[method](arg1, arg2);\n        }\n        this._syncList = [];\n        const numMeta = elements.length;\n        const numData = data.length;\n        const count = Math.min(numData, numMeta);\n        if (count) {\n            this.parse(0, count);\n        }\n        if (numData > numMeta) {\n            this._insertElements(numMeta, numData - numMeta, resetNewElements);\n        } else if (numData < numMeta) {\n            this._removeElements(numData, numMeta - numData);\n        }\n    }\n _insertElements(start, count, resetNewElements = true) {\n        const meta = this._cachedMeta;\n        const data = meta.data;\n        const end = start + count;\n        let i;\n        const move = (arr)=>{\n            arr.length += count;\n            for(i = arr.length - 1; i >= end; i--){\n                arr[i] = arr[i - count];\n            }\n        };\n        move(data);\n        for(i = start; i < end; ++i){\n            data[i] = new this.dataElementType();\n        }\n        if (this._parsing) {\n            move(meta._parsed);\n        }\n        this.parse(start, count);\n        if (resetNewElements) {\n            this.updateElements(data, start, count, 'reset');\n        }\n    }\n    updateElements(element, start, count, mode) {}\n _removeElements(start, count) {\n        const meta = this._cachedMeta;\n        if (this._parsing) {\n            const removed = meta._parsed.splice(start, count);\n            if (meta._stacked) {\n                clearStacks(meta, removed);\n            }\n        }\n        meta.data.splice(start, count);\n    }\n _sync(args) {\n        if (this._parsing) {\n            this._syncList.push(args);\n        } else {\n            const [method, arg1, arg2] = args;\n            this[method](arg1, arg2);\n        }\n        this.chart._dataChanges.push([\n            this.index,\n            ...args\n        ]);\n    }\n    _onDataPush() {\n        const count = arguments.length;\n        this._sync([\n            '_insertElements',\n            this.getDataset().data.length - count,\n            count\n        ]);\n    }\n    _onDataPop() {\n        this._sync([\n            '_removeElements',\n            this._cachedMeta.data.length - 1,\n            1\n        ]);\n    }\n    _onDataShift() {\n        this._sync([\n            '_removeElements',\n            0,\n            1\n        ]);\n    }\n    _onDataSplice(start, count) {\n        if (count) {\n            this._sync([\n                '_removeElements',\n                start,\n                count\n            ]);\n        }\n        const newCount = arguments.length - 2;\n        if (newCount) {\n            this._sync([\n                '_insertElements',\n                start,\n                newCount\n            ]);\n        }\n    }\n    _onDataUnshift() {\n        this._sync([\n            '_insertElements',\n            0,\n            arguments.length\n        ]);\n    }\n}\n\nfunction getAllScaleValues(scale, type) {\n    if (!scale._cache.$bar) {\n        const visibleMetas = scale.getMatchingVisibleMetas(type);\n        let values = [];\n        for(let i = 0, ilen = visibleMetas.length; i < ilen; i++){\n            values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n        }\n        scale._cache.$bar = _arrayUnique(values.sort((a, b)=>a - b));\n    }\n    return scale._cache.$bar;\n}\n function computeMinSampleSize(meta) {\n    const scale = meta.iScale;\n    const values = getAllScaleValues(scale, meta.type);\n    let min = scale._length;\n    let i, ilen, curr, prev;\n    const updateMinAndPrev = ()=>{\n        if (curr === 32767 || curr === -32768) {\n            return;\n        }\n        if (defined(prev)) {\n            min = Math.min(min, Math.abs(curr - prev) || min);\n        }\n        prev = curr;\n    };\n    for(i = 0, ilen = values.length; i < ilen; ++i){\n        curr = scale.getPixelForValue(values[i]);\n        updateMinAndPrev();\n    }\n    prev = undefined;\n    for(i = 0, ilen = scale.ticks.length; i < ilen; ++i){\n        curr = scale.getPixelForTick(i);\n        updateMinAndPrev();\n    }\n    return min;\n}\n function computeFitCategoryTraits(index, ruler, options, stackCount) {\n    const thickness = options.barThickness;\n    let size, ratio;\n    if (isNullOrUndef(thickness)) {\n        size = ruler.min * options.categoryPercentage;\n        ratio = options.barPercentage;\n    } else {\n        size = thickness * stackCount;\n        ratio = 1;\n    }\n    return {\n        chunk: size / stackCount,\n        ratio,\n        start: ruler.pixels[index] - size / 2\n    };\n}\n function computeFlexCategoryTraits(index, ruler, options, stackCount) {\n    const pixels = ruler.pixels;\n    const curr = pixels[index];\n    let prev = index > 0 ? pixels[index - 1] : null;\n    let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n    const percent = options.categoryPercentage;\n    if (prev === null) {\n        prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n    }\n    if (next === null) {\n        next = curr + curr - prev;\n    }\n    const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n    const size = Math.abs(next - prev) / 2 * percent;\n    return {\n        chunk: size / stackCount,\n        ratio: options.barPercentage,\n        start\n    };\n}\nfunction parseFloatBar(entry, item, vScale, i) {\n    const startValue = vScale.parse(entry[0], i);\n    const endValue = vScale.parse(entry[1], i);\n    const min = Math.min(startValue, endValue);\n    const max = Math.max(startValue, endValue);\n    let barStart = min;\n    let barEnd = max;\n    if (Math.abs(min) > Math.abs(max)) {\n        barStart = max;\n        barEnd = min;\n    }\n    item[vScale.axis] = barEnd;\n    item._custom = {\n        barStart,\n        barEnd,\n        start: startValue,\n        end: endValue,\n        min,\n        max\n    };\n}\nfunction parseValue(entry, item, vScale, i) {\n    if (isArray(entry)) {\n        parseFloatBar(entry, item, vScale, i);\n    } else {\n        item[vScale.axis] = vScale.parse(entry, i);\n    }\n    return item;\n}\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n    const iScale = meta.iScale;\n    const vScale = meta.vScale;\n    const labels = iScale.getLabels();\n    const singleScale = iScale === vScale;\n    const parsed = [];\n    let i, ilen, item, entry;\n    for(i = start, ilen = start + count; i < ilen; ++i){\n        entry = data[i];\n        item = {};\n        item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n        parsed.push(parseValue(entry, item, vScale, i));\n    }\n    return parsed;\n}\nfunction isFloatBar(custom) {\n    return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\nfunction barSign(size, vScale, actualBase) {\n    if (size !== 0) {\n        return sign(size);\n    }\n    return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\nfunction borderProps(properties) {\n    let reverse, start, end, top, bottom;\n    if (properties.horizontal) {\n        reverse = properties.base > properties.x;\n        start = 'left';\n        end = 'right';\n    } else {\n        reverse = properties.base < properties.y;\n        start = 'bottom';\n        end = 'top';\n    }\n    if (reverse) {\n        top = 'end';\n        bottom = 'start';\n    } else {\n        top = 'start';\n        bottom = 'end';\n    }\n    return {\n        start,\n        end,\n        reverse,\n        top,\n        bottom\n    };\n}\nfunction setBorderSkipped(properties, options, stack, index) {\n    let edge = options.borderSkipped;\n    const res = {};\n    if (!edge) {\n        properties.borderSkipped = res;\n        return;\n    }\n    if (edge === true) {\n        properties.borderSkipped = {\n            top: true,\n            right: true,\n            bottom: true,\n            left: true\n        };\n        return;\n    }\n    const { start , end , reverse , top , bottom  } = borderProps(properties);\n    if (edge === 'middle' && stack) {\n        properties.enableBorderRadius = true;\n        if ((stack._top || 0) === index) {\n            edge = top;\n        } else if ((stack._bottom || 0) === index) {\n            edge = bottom;\n        } else {\n            res[parseEdge(bottom, start, end, reverse)] = true;\n            edge = top;\n        }\n    }\n    res[parseEdge(edge, start, end, reverse)] = true;\n    properties.borderSkipped = res;\n}\nfunction parseEdge(edge, a, b, reverse) {\n    if (reverse) {\n        edge = swap(edge, a, b);\n        edge = startEnd(edge, b, a);\n    } else {\n        edge = startEnd(edge, a, b);\n    }\n    return edge;\n}\nfunction swap(orig, v1, v2) {\n    return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\nfunction startEnd(v, start, end) {\n    return v === 'start' ? start : v === 'end' ? end : v;\n}\nfunction setInflateAmount(properties, { inflateAmount  }, ratio) {\n    properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount;\n}\nclass BarController extends DatasetController {\n    static id = 'bar';\n static defaults = {\n        datasetElementType: false,\n        dataElementType: 'bar',\n        categoryPercentage: 0.8,\n        barPercentage: 0.9,\n        grouped: true,\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'base',\n                    'width',\n                    'height'\n                ]\n            }\n        }\n    };\n static overrides = {\n        scales: {\n            _index_: {\n                type: 'category',\n                offset: true,\n                grid: {\n                    offset: true\n                }\n            },\n            _value_: {\n                type: 'linear',\n                beginAtZero: true\n            }\n        }\n    };\n parsePrimitiveData(meta, data, start, count) {\n        return parseArrayOrPrimitive(meta, data, start, count);\n    }\n parseArrayData(meta, data, start, count) {\n        return parseArrayOrPrimitive(meta, data, start, count);\n    }\n parseObjectData(meta, data, start, count) {\n        const { iScale , vScale  } = meta;\n        const { xAxisKey ='x' , yAxisKey ='y'  } = this._parsing;\n        const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n        const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n        const parsed = [];\n        let i, ilen, item, obj;\n        for(i = start, ilen = start + count; i < ilen; ++i){\n            obj = data[i];\n            item = {};\n            item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n            parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n        }\n        return parsed;\n    }\n updateRangeFromParsed(range, scale, parsed, stack) {\n        super.updateRangeFromParsed(range, scale, parsed, stack);\n        const custom = parsed._custom;\n        if (custom && scale === this._cachedMeta.vScale) {\n            range.min = Math.min(range.min, custom.min);\n            range.max = Math.max(range.max, custom.max);\n        }\n    }\n getMaxOverflow() {\n        return 0;\n    }\n getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const { iScale , vScale  } = meta;\n        const parsed = this.getParsed(index);\n        const custom = parsed._custom;\n        const value = isFloatBar(custom) ? '[' + custom.start + ', ' + custom.end + ']' : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n        return {\n            label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n            value\n        };\n    }\n    initialize() {\n        this.enableOptionSharing = true;\n        super.initialize();\n        const meta = this._cachedMeta;\n        meta.stack = this.getDataset().stack;\n    }\n    update(mode) {\n        const meta = this._cachedMeta;\n        this.updateElements(meta.data, 0, meta.data.length, mode);\n    }\n    updateElements(bars, start, count, mode) {\n        const reset = mode === 'reset';\n        const { index , _cachedMeta: { vScale  }  } = this;\n        const base = vScale.getBasePixel();\n        const horizontal = vScale.isHorizontal();\n        const ruler = this._getRuler();\n        const { sharedOptions , includeOptions  } = this._getSharedOptions(start, mode);\n        for(let i = start; i < start + count; i++){\n            const parsed = this.getParsed(i);\n            const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {\n                base,\n                head: base\n            } : this._calculateBarValuePixels(i);\n            const ipixels = this._calculateBarIndexPixels(i, ruler);\n            const stack = (parsed._stacks || {})[vScale.axis];\n            const properties = {\n                horizontal,\n                base: vpixels.base,\n                enableBorderRadius: !stack || isFloatBar(parsed._custom) || index === stack._top || index === stack._bottom,\n                x: horizontal ? vpixels.head : ipixels.center,\n                y: horizontal ? ipixels.center : vpixels.head,\n                height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n                width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n            };\n            if (includeOptions) {\n                properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n            }\n            const options = properties.options || bars[i].options;\n            setBorderSkipped(properties, options, stack, index);\n            setInflateAmount(properties, options, ruler.ratio);\n            this.updateElement(bars[i], i, properties, mode);\n        }\n    }\n _getStacks(last, dataIndex) {\n        const { iScale  } = this._cachedMeta;\n        const metasets = iScale.getMatchingVisibleMetas(this._type).filter((meta)=>meta.controller.options.grouped);\n        const stacked = iScale.options.stacked;\n        const stacks = [];\n        const currentParsed = this._cachedMeta.controller.getParsed(dataIndex);\n        const iScaleValue = currentParsed && currentParsed[iScale.axis];\n        const skipNull = (meta)=>{\n            const parsed = meta._parsed.find((item)=>item[iScale.axis] === iScaleValue);\n            const val = parsed && parsed[meta.vScale.axis];\n            if (isNullOrUndef(val) || isNaN(val)) {\n                return true;\n            }\n        };\n        for (const meta of metasets){\n            if (dataIndex !== undefined && skipNull(meta)) {\n                continue;\n            }\n            if (stacked === false || stacks.indexOf(meta.stack) === -1 || stacked === undefined && meta.stack === undefined) {\n                stacks.push(meta.stack);\n            }\n            if (meta.index === last) {\n                break;\n            }\n        }\n        if (!stacks.length) {\n            stacks.push(undefined);\n        }\n        return stacks;\n    }\n _getStackCount(index) {\n        return this._getStacks(undefined, index).length;\n    }\n _getStackIndex(datasetIndex, name, dataIndex) {\n        const stacks = this._getStacks(datasetIndex, dataIndex);\n        const index = name !== undefined ? stacks.indexOf(name) : -1;\n        return index === -1 ? stacks.length - 1 : index;\n    }\n _getRuler() {\n        const opts = this.options;\n        const meta = this._cachedMeta;\n        const iScale = meta.iScale;\n        const pixels = [];\n        let i, ilen;\n        for(i = 0, ilen = meta.data.length; i < ilen; ++i){\n            pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n        }\n        const barThickness = opts.barThickness;\n        const min = barThickness || computeMinSampleSize(meta);\n        return {\n            min,\n            pixels,\n            start: iScale._startPixel,\n            end: iScale._endPixel,\n            stackCount: this._getStackCount(),\n            scale: iScale,\n            grouped: opts.grouped,\n            ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n        };\n    }\n _calculateBarValuePixels(index) {\n        const { _cachedMeta: { vScale , _stacked , index: datasetIndex  } , options: { base: baseValue , minBarLength  }  } = this;\n        const actualBase = baseValue || 0;\n        const parsed = this.getParsed(index);\n        const custom = parsed._custom;\n        const floating = isFloatBar(custom);\n        let value = parsed[vScale.axis];\n        let start = 0;\n        let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n        let head, size;\n        if (length !== value) {\n            start = length - value;\n            length = value;\n        }\n        if (floating) {\n            value = custom.barStart;\n            length = custom.barEnd - custom.barStart;\n            if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n                start = 0;\n            }\n            start += value;\n        }\n        const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n        let base = vScale.getPixelForValue(startValue);\n        if (this.chart.getDataVisibility(index)) {\n            head = vScale.getPixelForValue(start + length);\n        } else {\n            head = base;\n        }\n        size = head - base;\n        if (Math.abs(size) < minBarLength) {\n            size = barSign(size, vScale, actualBase) * minBarLength;\n            if (value === actualBase) {\n                base -= size / 2;\n            }\n            const startPixel = vScale.getPixelForDecimal(0);\n            const endPixel = vScale.getPixelForDecimal(1);\n            const min = Math.min(startPixel, endPixel);\n            const max = Math.max(startPixel, endPixel);\n            base = Math.max(Math.min(base, max), min);\n            head = base + size;\n            if (_stacked && !floating) {\n                parsed._stacks[vScale.axis]._visualValues[datasetIndex] = vScale.getValueForPixel(head) - vScale.getValueForPixel(base);\n            }\n        }\n        if (base === vScale.getPixelForValue(actualBase)) {\n            const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n            base += halfGrid;\n            size -= halfGrid;\n        }\n        return {\n            size,\n            base,\n            head,\n            center: head + size / 2\n        };\n    }\n _calculateBarIndexPixels(index, ruler) {\n        const scale = ruler.scale;\n        const options = this.options;\n        const skipNull = options.skipNull;\n        const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n        let center, size;\n        if (ruler.grouped) {\n            const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n            const range = options.barThickness === 'flex' ? computeFlexCategoryTraits(index, ruler, options, stackCount) : computeFitCategoryTraits(index, ruler, options, stackCount);\n            const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n            center = range.start + range.chunk * stackIndex + range.chunk / 2;\n            size = Math.min(maxBarThickness, range.chunk * range.ratio);\n        } else {\n            center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n            size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n        }\n        return {\n            base: center - size / 2,\n            head: center + size / 2,\n            center,\n            size\n        };\n    }\n    draw() {\n        const meta = this._cachedMeta;\n        const vScale = meta.vScale;\n        const rects = meta.data;\n        const ilen = rects.length;\n        let i = 0;\n        for(; i < ilen; ++i){\n            if (this.getParsed(i)[vScale.axis] !== null && !rects[i].hidden) {\n                rects[i].draw(this._ctx);\n            }\n        }\n    }\n}\n\nclass BubbleController extends DatasetController {\n    static id = 'bubble';\n static defaults = {\n        datasetElementType: false,\n        dataElementType: 'point',\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'borderWidth',\n                    'radius'\n                ]\n            }\n        }\n    };\n static overrides = {\n        scales: {\n            x: {\n                type: 'linear'\n            },\n            y: {\n                type: 'linear'\n            }\n        }\n    };\n    initialize() {\n        this.enableOptionSharing = true;\n        super.initialize();\n    }\n parsePrimitiveData(meta, data, start, count) {\n        const parsed = super.parsePrimitiveData(meta, data, start, count);\n        for(let i = 0; i < parsed.length; i++){\n            parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n        }\n        return parsed;\n    }\n parseArrayData(meta, data, start, count) {\n        const parsed = super.parseArrayData(meta, data, start, count);\n        for(let i = 0; i < parsed.length; i++){\n            const item = data[start + i];\n            parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n        }\n        return parsed;\n    }\n parseObjectData(meta, data, start, count) {\n        const parsed = super.parseObjectData(meta, data, start, count);\n        for(let i = 0; i < parsed.length; i++){\n            const item = data[start + i];\n            parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n        }\n        return parsed;\n    }\n getMaxOverflow() {\n        const data = this._cachedMeta.data;\n        let max = 0;\n        for(let i = data.length - 1; i >= 0; --i){\n            max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n        }\n        return max > 0 && max;\n    }\n getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const labels = this.chart.data.labels || [];\n        const { xScale , yScale  } = meta;\n        const parsed = this.getParsed(index);\n        const x = xScale.getLabelForValue(parsed.x);\n        const y = yScale.getLabelForValue(parsed.y);\n        const r = parsed._custom;\n        return {\n            label: labels[index] || '',\n            value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n        };\n    }\n    update(mode) {\n        const points = this._cachedMeta.data;\n        this.updateElements(points, 0, points.length, mode);\n    }\n    updateElements(points, start, count, mode) {\n        const reset = mode === 'reset';\n        const { iScale , vScale  } = this._cachedMeta;\n        const { sharedOptions , includeOptions  } = this._getSharedOptions(start, mode);\n        const iAxis = iScale.axis;\n        const vAxis = vScale.axis;\n        for(let i = start; i < start + count; i++){\n            const point = points[i];\n            const parsed = !reset && this.getParsed(i);\n            const properties = {};\n            const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n            const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n            properties.skip = isNaN(iPixel) || isNaN(vPixel);\n            if (includeOptions) {\n                properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n                if (reset) {\n                    properties.options.radius = 0;\n                }\n            }\n            this.updateElement(point, i, properties, mode);\n        }\n    }\n resolveDataElementOptions(index, mode) {\n        const parsed = this.getParsed(index);\n        let values = super.resolveDataElementOptions(index, mode);\n        if (values.$shared) {\n            values = Object.assign({}, values, {\n                $shared: false\n            });\n        }\n        const radius = values.radius;\n        if (mode !== 'active') {\n            values.radius = 0;\n        }\n        values.radius += valueOrDefault(parsed && parsed._custom, radius);\n        return values;\n    }\n}\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n    let ratioX = 1;\n    let ratioY = 1;\n    let offsetX = 0;\n    let offsetY = 0;\n    if (circumference < TAU) {\n        const startAngle = rotation;\n        const endAngle = startAngle + circumference;\n        const startX = Math.cos(startAngle);\n        const startY = Math.sin(startAngle);\n        const endX = Math.cos(endAngle);\n        const endY = Math.sin(endAngle);\n        const calcMax = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n        const calcMin = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n        const maxX = calcMax(0, startX, endX);\n        const maxY = calcMax(HALF_PI, startY, endY);\n        const minX = calcMin(PI, startX, endX);\n        const minY = calcMin(PI + HALF_PI, startY, endY);\n        ratioX = (maxX - minX) / 2;\n        ratioY = (maxY - minY) / 2;\n        offsetX = -(maxX + minX) / 2;\n        offsetY = -(maxY + minY) / 2;\n    }\n    return {\n        ratioX,\n        ratioY,\n        offsetX,\n        offsetY\n    };\n}\nclass DoughnutController extends DatasetController {\n    static id = 'doughnut';\n static defaults = {\n        datasetElementType: false,\n        dataElementType: 'arc',\n        animation: {\n            animateRotate: true,\n            animateScale: false\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'circumference',\n                    'endAngle',\n                    'innerRadius',\n                    'outerRadius',\n                    'startAngle',\n                    'x',\n                    'y',\n                    'offset',\n                    'borderWidth',\n                    'spacing'\n                ]\n            }\n        },\n        cutout: '50%',\n        rotation: 0,\n        circumference: 360,\n        radius: '100%',\n        spacing: 0,\n        indexAxis: 'r'\n    };\n    static descriptors = {\n        _scriptable: (name)=>name !== 'spacing',\n        _indexable: (name)=>name !== 'spacing' && !name.startsWith('borderDash') && !name.startsWith('hoverBorderDash')\n    };\n static overrides = {\n        aspectRatio: 1,\n        plugins: {\n            legend: {\n                labels: {\n                    generateLabels (chart) {\n                        const data = chart.data;\n                        if (data.labels.length && data.datasets.length) {\n                            const { labels: { pointStyle , color  }  } = chart.legend.options;\n                            return data.labels.map((label, i)=>{\n                                const meta = chart.getDatasetMeta(0);\n                                const style = meta.controller.getStyle(i);\n                                return {\n                                    text: label,\n                                    fillStyle: style.backgroundColor,\n                                    strokeStyle: style.borderColor,\n                                    fontColor: color,\n                                    lineWidth: style.borderWidth,\n                                    pointStyle: pointStyle,\n                                    hidden: !chart.getDataVisibility(i),\n                                    index: i\n                                };\n                            });\n                        }\n                        return [];\n                    }\n                },\n                onClick (e, legendItem, legend) {\n                    legend.chart.toggleDataVisibility(legendItem.index);\n                    legend.chart.update();\n                }\n            }\n        }\n    };\n    constructor(chart, datasetIndex){\n        super(chart, datasetIndex);\n        this.enableOptionSharing = true;\n        this.innerRadius = undefined;\n        this.outerRadius = undefined;\n        this.offsetX = undefined;\n        this.offsetY = undefined;\n    }\n    linkScales() {}\n parse(start, count) {\n        const data = this.getDataset().data;\n        const meta = this._cachedMeta;\n        if (this._parsing === false) {\n            meta._parsed = data;\n        } else {\n            let getter = (i)=>+data[i];\n            if (isObject(data[start])) {\n                const { key ='value'  } = this._parsing;\n                getter = (i)=>+resolveObjectKey(data[i], key);\n            }\n            let i, ilen;\n            for(i = start, ilen = start + count; i < ilen; ++i){\n                meta._parsed[i] = getter(i);\n            }\n        }\n    }\n _getRotation() {\n        return toRadians(this.options.rotation - 90);\n    }\n _getCircumference() {\n        return toRadians(this.options.circumference);\n    }\n _getRotationExtents() {\n        let min = TAU;\n        let max = -TAU;\n        for(let i = 0; i < this.chart.data.datasets.length; ++i){\n            if (this.chart.isDatasetVisible(i) && this.chart.getDatasetMeta(i).type === this._type) {\n                const controller = this.chart.getDatasetMeta(i).controller;\n                const rotation = controller._getRotation();\n                const circumference = controller._getCircumference();\n                min = Math.min(min, rotation);\n                max = Math.max(max, rotation + circumference);\n            }\n        }\n        return {\n            rotation: min,\n            circumference: max - min\n        };\n    }\n update(mode) {\n        const chart = this.chart;\n        const { chartArea  } = chart;\n        const meta = this._cachedMeta;\n        const arcs = meta.data;\n        const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n        const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n        const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n        const chartWeight = this._getRingWeight(this.index);\n        const { circumference , rotation  } = this._getRotationExtents();\n        const { ratioX , ratioY , offsetX , offsetY  } = getRatioAndOffset(rotation, circumference, cutout);\n        const maxWidth = (chartArea.width - spacing) / ratioX;\n        const maxHeight = (chartArea.height - spacing) / ratioY;\n        const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n        const outerRadius = toDimension(this.options.radius, maxRadius);\n        const innerRadius = Math.max(outerRadius * cutout, 0);\n        const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n        this.offsetX = offsetX * outerRadius;\n        this.offsetY = offsetY * outerRadius;\n        meta.total = this.calculateTotal();\n        this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n        this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n        this.updateElements(arcs, 0, arcs.length, mode);\n    }\n _circumference(i, reset) {\n        const opts = this.options;\n        const meta = this._cachedMeta;\n        const circumference = this._getCircumference();\n        if (reset && opts.animation.animateRotate || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n            return 0;\n        }\n        return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n    }\n    updateElements(arcs, start, count, mode) {\n        const reset = mode === 'reset';\n        const chart = this.chart;\n        const chartArea = chart.chartArea;\n        const opts = chart.options;\n        const animationOpts = opts.animation;\n        const centerX = (chartArea.left + chartArea.right) / 2;\n        const centerY = (chartArea.top + chartArea.bottom) / 2;\n        const animateScale = reset && animationOpts.animateScale;\n        const innerRadius = animateScale ? 0 : this.innerRadius;\n        const outerRadius = animateScale ? 0 : this.outerRadius;\n        const { sharedOptions , includeOptions  } = this._getSharedOptions(start, mode);\n        let startAngle = this._getRotation();\n        let i;\n        for(i = 0; i < start; ++i){\n            startAngle += this._circumference(i, reset);\n        }\n        for(i = start; i < start + count; ++i){\n            const circumference = this._circumference(i, reset);\n            const arc = arcs[i];\n            const properties = {\n                x: centerX + this.offsetX,\n                y: centerY + this.offsetY,\n                startAngle,\n                endAngle: startAngle + circumference,\n                circumference,\n                outerRadius,\n                innerRadius\n            };\n            if (includeOptions) {\n                properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n            }\n            startAngle += circumference;\n            this.updateElement(arc, i, properties, mode);\n        }\n    }\n    calculateTotal() {\n        const meta = this._cachedMeta;\n        const metaData = meta.data;\n        let total = 0;\n        let i;\n        for(i = 0; i < metaData.length; i++){\n            const value = meta._parsed[i];\n            if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n                total += Math.abs(value);\n            }\n        }\n        return total;\n    }\n    calculateCircumference(value) {\n        const total = this._cachedMeta.total;\n        if (total > 0 && !isNaN(value)) {\n            return TAU * (Math.abs(value) / total);\n        }\n        return 0;\n    }\n    getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const chart = this.chart;\n        const labels = chart.data.labels || [];\n        const value = formatNumber(meta._parsed[index], chart.options.locale);\n        return {\n            label: labels[index] || '',\n            value\n        };\n    }\n    getMaxBorderWidth(arcs) {\n        let max = 0;\n        const chart = this.chart;\n        let i, ilen, meta, controller, options;\n        if (!arcs) {\n            for(i = 0, ilen = chart.data.datasets.length; i < ilen; ++i){\n                if (chart.isDatasetVisible(i)) {\n                    meta = chart.getDatasetMeta(i);\n                    arcs = meta.data;\n                    controller = meta.controller;\n                    break;\n                }\n            }\n        }\n        if (!arcs) {\n            return 0;\n        }\n        for(i = 0, ilen = arcs.length; i < ilen; ++i){\n            options = controller.resolveDataElementOptions(i);\n            if (options.borderAlign !== 'inner') {\n                max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n            }\n        }\n        return max;\n    }\n    getMaxOffset(arcs) {\n        let max = 0;\n        for(let i = 0, ilen = arcs.length; i < ilen; ++i){\n            const options = this.resolveDataElementOptions(i);\n            max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n        }\n        return max;\n    }\n _getRingWeightOffset(datasetIndex) {\n        let ringWeightOffset = 0;\n        for(let i = 0; i < datasetIndex; ++i){\n            if (this.chart.isDatasetVisible(i)) {\n                ringWeightOffset += this._getRingWeight(i);\n            }\n        }\n        return ringWeightOffset;\n    }\n _getRingWeight(datasetIndex) {\n        return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n    }\n _getVisibleDatasetWeightTotal() {\n        return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n    }\n}\n\nclass LineController extends DatasetController {\n    static id = 'line';\n static defaults = {\n        datasetElementType: 'line',\n        dataElementType: 'point',\n        showLine: true,\n        spanGaps: false\n    };\n static overrides = {\n        scales: {\n            _index_: {\n                type: 'category'\n            },\n            _value_: {\n                type: 'linear'\n            }\n        }\n    };\n    initialize() {\n        this.enableOptionSharing = true;\n        this.supportsDecimation = true;\n        super.initialize();\n    }\n    update(mode) {\n        const meta = this._cachedMeta;\n        const { dataset: line , data: points = [] , _dataset  } = meta;\n        const animationsDisabled = this.chart._animationsDisabled;\n        let { start , count  } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n        this._drawStart = start;\n        this._drawCount = count;\n        if (_scaleRangesChanged(meta)) {\n            start = 0;\n            count = points.length;\n        }\n        line._chart = this.chart;\n        line._datasetIndex = this.index;\n        line._decimated = !!_dataset._decimated;\n        line.points = points;\n        const options = this.resolveDatasetElementOptions(mode);\n        if (!this.options.showLine) {\n            options.borderWidth = 0;\n        }\n        options.segment = this.options.segment;\n        this.updateElement(line, undefined, {\n            animated: !animationsDisabled,\n            options\n        }, mode);\n        this.updateElements(points, start, count, mode);\n    }\n    updateElements(points, start, count, mode) {\n        const reset = mode === 'reset';\n        const { iScale , vScale , _stacked , _dataset  } = this._cachedMeta;\n        const { sharedOptions , includeOptions  } = this._getSharedOptions(start, mode);\n        const iAxis = iScale.axis;\n        const vAxis = vScale.axis;\n        const { spanGaps , segment  } = this.options;\n        const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n        const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n        const end = start + count;\n        const pointsCount = points.length;\n        let prevParsed = start > 0 && this.getParsed(start - 1);\n        for(let i = 0; i < pointsCount; ++i){\n            const point = points[i];\n            const properties = directUpdate ? point : {};\n            if (i < start || i >= end) {\n                properties.skip = true;\n                continue;\n            }\n            const parsed = this.getParsed(i);\n            const nullData = isNullOrUndef(parsed[vAxis]);\n            const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n            const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n            properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n            properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n            if (segment) {\n                properties.parsed = parsed;\n                properties.raw = _dataset.data[i];\n            }\n            if (includeOptions) {\n                properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n            }\n            if (!directUpdate) {\n                this.updateElement(point, i, properties, mode);\n            }\n            prevParsed = parsed;\n        }\n    }\n getMaxOverflow() {\n        const meta = this._cachedMeta;\n        const dataset = meta.dataset;\n        const border = dataset.options && dataset.options.borderWidth || 0;\n        const data = meta.data || [];\n        if (!data.length) {\n            return border;\n        }\n        const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n        const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n        return Math.max(border, firstPoint, lastPoint) / 2;\n    }\n    draw() {\n        const meta = this._cachedMeta;\n        meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n        super.draw();\n    }\n}\n\nclass PolarAreaController extends DatasetController {\n    static id = 'polarArea';\n static defaults = {\n        dataElementType: 'arc',\n        animation: {\n            animateRotate: true,\n            animateScale: true\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'startAngle',\n                    'endAngle',\n                    'innerRadius',\n                    'outerRadius'\n                ]\n            }\n        },\n        indexAxis: 'r',\n        startAngle: 0\n    };\n static overrides = {\n        aspectRatio: 1,\n        plugins: {\n            legend: {\n                labels: {\n                    generateLabels (chart) {\n                        const data = chart.data;\n                        if (data.labels.length && data.datasets.length) {\n                            const { labels: { pointStyle , color  }  } = chart.legend.options;\n                            return data.labels.map((label, i)=>{\n                                const meta = chart.getDatasetMeta(0);\n                                const style = meta.controller.getStyle(i);\n                                return {\n                                    text: label,\n                                    fillStyle: style.backgroundColor,\n                                    strokeStyle: style.borderColor,\n                                    fontColor: color,\n                                    lineWidth: style.borderWidth,\n                                    pointStyle: pointStyle,\n                                    hidden: !chart.getDataVisibility(i),\n                                    index: i\n                                };\n                            });\n                        }\n                        return [];\n                    }\n                },\n                onClick (e, legendItem, legend) {\n                    legend.chart.toggleDataVisibility(legendItem.index);\n                    legend.chart.update();\n                }\n            }\n        },\n        scales: {\n            r: {\n                type: 'radialLinear',\n                angleLines: {\n                    display: false\n                },\n                beginAtZero: true,\n                grid: {\n                    circular: true\n                },\n                pointLabels: {\n                    display: false\n                },\n                startAngle: 0\n            }\n        }\n    };\n    constructor(chart, datasetIndex){\n        super(chart, datasetIndex);\n        this.innerRadius = undefined;\n        this.outerRadius = undefined;\n    }\n    getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const chart = this.chart;\n        const labels = chart.data.labels || [];\n        const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n        return {\n            label: labels[index] || '',\n            value\n        };\n    }\n    parseObjectData(meta, data, start, count) {\n        return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n    }\n    update(mode) {\n        const arcs = this._cachedMeta.data;\n        this._updateRadius();\n        this.updateElements(arcs, 0, arcs.length, mode);\n    }\n getMinMax() {\n        const meta = this._cachedMeta;\n        const range = {\n            min: Number.POSITIVE_INFINITY,\n            max: Number.NEGATIVE_INFINITY\n        };\n        meta.data.forEach((element, index)=>{\n            const parsed = this.getParsed(index).r;\n            if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n                if (parsed < range.min) {\n                    range.min = parsed;\n                }\n                if (parsed > range.max) {\n                    range.max = parsed;\n                }\n            }\n        });\n        return range;\n    }\n _updateRadius() {\n        const chart = this.chart;\n        const chartArea = chart.chartArea;\n        const opts = chart.options;\n        const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n        const outerRadius = Math.max(minSize / 2, 0);\n        const innerRadius = Math.max(opts.cutoutPercentage ? outerRadius / 100 * opts.cutoutPercentage : 1, 0);\n        const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n        this.outerRadius = outerRadius - radiusLength * this.index;\n        this.innerRadius = this.outerRadius - radiusLength;\n    }\n    updateElements(arcs, start, count, mode) {\n        const reset = mode === 'reset';\n        const chart = this.chart;\n        const opts = chart.options;\n        const animationOpts = opts.animation;\n        const scale = this._cachedMeta.rScale;\n        const centerX = scale.xCenter;\n        const centerY = scale.yCenter;\n        const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n        let angle = datasetStartAngle;\n        let i;\n        const defaultAngle = 360 / this.countVisibleElements();\n        for(i = 0; i < start; ++i){\n            angle += this._computeAngle(i, mode, defaultAngle);\n        }\n        for(i = start; i < start + count; i++){\n            const arc = arcs[i];\n            let startAngle = angle;\n            let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n            let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n            angle = endAngle;\n            if (reset) {\n                if (animationOpts.animateScale) {\n                    outerRadius = 0;\n                }\n                if (animationOpts.animateRotate) {\n                    startAngle = endAngle = datasetStartAngle;\n                }\n            }\n            const properties = {\n                x: centerX,\n                y: centerY,\n                innerRadius: 0,\n                outerRadius,\n                startAngle,\n                endAngle,\n                options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n            };\n            this.updateElement(arc, i, properties, mode);\n        }\n    }\n    countVisibleElements() {\n        const meta = this._cachedMeta;\n        let count = 0;\n        meta.data.forEach((element, index)=>{\n            if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n                count++;\n            }\n        });\n        return count;\n    }\n _computeAngle(index, mode, defaultAngle) {\n        return this.chart.getDataVisibility(index) ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle) : 0;\n    }\n}\n\nclass PieController extends DoughnutController {\n    static id = 'pie';\n static defaults = {\n        cutout: 0,\n        rotation: 0,\n        circumference: 360,\n        radius: '100%'\n    };\n}\n\nclass RadarController extends DatasetController {\n    static id = 'radar';\n static defaults = {\n        datasetElementType: 'line',\n        dataElementType: 'point',\n        indexAxis: 'r',\n        showLine: true,\n        elements: {\n            line: {\n                fill: 'start'\n            }\n        }\n    };\n static overrides = {\n        aspectRatio: 1,\n        scales: {\n            r: {\n                type: 'radialLinear'\n            }\n        }\n    };\n getLabelAndValue(index) {\n        const vScale = this._cachedMeta.vScale;\n        const parsed = this.getParsed(index);\n        return {\n            label: vScale.getLabels()[index],\n            value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n        };\n    }\n    parseObjectData(meta, data, start, count) {\n        return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n    }\n    update(mode) {\n        const meta = this._cachedMeta;\n        const line = meta.dataset;\n        const points = meta.data || [];\n        const labels = meta.iScale.getLabels();\n        line.points = points;\n        if (mode !== 'resize') {\n            const options = this.resolveDatasetElementOptions(mode);\n            if (!this.options.showLine) {\n                options.borderWidth = 0;\n            }\n            const properties = {\n                _loop: true,\n                _fullLoop: labels.length === points.length,\n                options\n            };\n            this.updateElement(line, undefined, properties, mode);\n        }\n        this.updateElements(points, 0, points.length, mode);\n    }\n    updateElements(points, start, count, mode) {\n        const scale = this._cachedMeta.rScale;\n        const reset = mode === 'reset';\n        for(let i = start; i < start + count; i++){\n            const point = points[i];\n            const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n            const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n            const x = reset ? scale.xCenter : pointPosition.x;\n            const y = reset ? scale.yCenter : pointPosition.y;\n            const properties = {\n                x,\n                y,\n                angle: pointPosition.angle,\n                skip: isNaN(x) || isNaN(y),\n                options\n            };\n            this.updateElement(point, i, properties, mode);\n        }\n    }\n}\n\nclass ScatterController extends DatasetController {\n    static id = 'scatter';\n static defaults = {\n        datasetElementType: false,\n        dataElementType: 'point',\n        showLine: false,\n        fill: false\n    };\n static overrides = {\n        interaction: {\n            mode: 'point'\n        },\n        scales: {\n            x: {\n                type: 'linear'\n            },\n            y: {\n                type: 'linear'\n            }\n        }\n    };\n getLabelAndValue(index) {\n        const meta = this._cachedMeta;\n        const labels = this.chart.data.labels || [];\n        const { xScale , yScale  } = meta;\n        const parsed = this.getParsed(index);\n        const x = xScale.getLabelForValue(parsed.x);\n        const y = yScale.getLabelForValue(parsed.y);\n        return {\n            label: labels[index] || '',\n            value: '(' + x + ', ' + y + ')'\n        };\n    }\n    update(mode) {\n        const meta = this._cachedMeta;\n        const { data: points = []  } = meta;\n        const animationsDisabled = this.chart._animationsDisabled;\n        let { start , count  } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n        this._drawStart = start;\n        this._drawCount = count;\n        if (_scaleRangesChanged(meta)) {\n            start = 0;\n            count = points.length;\n        }\n        if (this.options.showLine) {\n            if (!this.datasetElementType) {\n                this.addElements();\n            }\n            const { dataset: line , _dataset  } = meta;\n            line._chart = this.chart;\n            line._datasetIndex = this.index;\n            line._decimated = !!_dataset._decimated;\n            line.points = points;\n            const options = this.resolveDatasetElementOptions(mode);\n            options.segment = this.options.segment;\n            this.updateElement(line, undefined, {\n                animated: !animationsDisabled,\n                options\n            }, mode);\n        } else if (this.datasetElementType) {\n            delete meta.dataset;\n            this.datasetElementType = false;\n        }\n        this.updateElements(points, start, count, mode);\n    }\n    addElements() {\n        const { showLine  } = this.options;\n        if (!this.datasetElementType && showLine) {\n            this.datasetElementType = this.chart.registry.getElement('line');\n        }\n        super.addElements();\n    }\n    updateElements(points, start, count, mode) {\n        const reset = mode === 'reset';\n        const { iScale , vScale , _stacked , _dataset  } = this._cachedMeta;\n        const firstOpts = this.resolveDataElementOptions(start, mode);\n        const sharedOptions = this.getSharedOptions(firstOpts);\n        const includeOptions = this.includeOptions(mode, sharedOptions);\n        const iAxis = iScale.axis;\n        const vAxis = vScale.axis;\n        const { spanGaps , segment  } = this.options;\n        const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n        const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n        let prevParsed = start > 0 && this.getParsed(start - 1);\n        for(let i = start; i < start + count; ++i){\n            const point = points[i];\n            const parsed = this.getParsed(i);\n            const properties = directUpdate ? point : {};\n            const nullData = isNullOrUndef(parsed[vAxis]);\n            const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n            const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n            properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n            properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n            if (segment) {\n                properties.parsed = parsed;\n                properties.raw = _dataset.data[i];\n            }\n            if (includeOptions) {\n                properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n            }\n            if (!directUpdate) {\n                this.updateElement(point, i, properties, mode);\n            }\n            prevParsed = parsed;\n        }\n        this.updateSharedOptions(sharedOptions, mode, firstOpts);\n    }\n getMaxOverflow() {\n        const meta = this._cachedMeta;\n        const data = meta.data || [];\n        if (!this.options.showLine) {\n            let max = 0;\n            for(let i = data.length - 1; i >= 0; --i){\n                max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n            }\n            return max > 0 && max;\n        }\n        const dataset = meta.dataset;\n        const border = dataset.options && dataset.options.borderWidth || 0;\n        if (!data.length) {\n            return border;\n        }\n        const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n        const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n        return Math.max(border, firstPoint, lastPoint) / 2;\n    }\n}\n\nvar controllers = /*#__PURE__*/Object.freeze({\n__proto__: null,\nBarController: BarController,\nBubbleController: BubbleController,\nDoughnutController: DoughnutController,\nLineController: LineController,\nPieController: PieController,\nPolarAreaController: PolarAreaController,\nRadarController: RadarController,\nScatterController: ScatterController\n});\n\n/**\n * @namespace Chart._adapters\n * @since 2.8.0\n * @private\n */ function abstract() {\n    throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */ class DateAdapterBase {\n    /**\n   * Override default date adapter methods.\n   * Accepts type parameter to define options type.\n   * @example\n   * Chart._adapters._date.override<{myAdapterOption: string}>({\n   *   init() {\n   *     console.log(this.options.myAdapterOption);\n   *   }\n   * })\n   */ static override(members) {\n        Object.assign(DateAdapterBase.prototype, members);\n    }\n    options;\n    constructor(options){\n        this.options = options || {};\n    }\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    init() {}\n    formats() {\n        return abstract();\n    }\n    parse() {\n        return abstract();\n    }\n    format() {\n        return abstract();\n    }\n    add() {\n        return abstract();\n    }\n    diff() {\n        return abstract();\n    }\n    startOf() {\n        return abstract();\n    }\n    endOf() {\n        return abstract();\n    }\n}\nvar adapters = {\n    _date: DateAdapterBase\n};\n\nfunction binarySearch(metaset, axis, value, intersect) {\n    const { controller , data , _sorted  } = metaset;\n    const iScale = controller._cachedMeta.iScale;\n    if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n        const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n        if (!intersect) {\n            return lookupMethod(data, axis, value);\n        } else if (controller._sharedOptions) {\n            const el = data[0];\n            const range = typeof el.getRange === 'function' && el.getRange(axis);\n            if (range) {\n                const start = lookupMethod(data, axis, value - range);\n                const end = lookupMethod(data, axis, value + range);\n                return {\n                    lo: start.lo,\n                    hi: end.hi\n                };\n            }\n        }\n    }\n    return {\n        lo: 0,\n        hi: data.length - 1\n    };\n}\n function evaluateInteractionItems(chart, axis, position, handler, intersect) {\n    const metasets = chart.getSortedVisibleDatasetMetas();\n    const value = position[axis];\n    for(let i = 0, ilen = metasets.length; i < ilen; ++i){\n        const { index , data  } = metasets[i];\n        const { lo , hi  } = binarySearch(metasets[i], axis, value, intersect);\n        for(let j = lo; j <= hi; ++j){\n            const element = data[j];\n            if (!element.skip) {\n                handler(element, index, j);\n            }\n        }\n    }\n}\n function getDistanceMetricForAxis(axis) {\n    const useX = axis.indexOf('x') !== -1;\n    const useY = axis.indexOf('y') !== -1;\n    return function(pt1, pt2) {\n        const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n        const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n        return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n    };\n}\n function getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n    const items = [];\n    if (!includeInvisible && !chart.isPointInArea(position)) {\n        return items;\n    }\n    const evaluationFunc = function(element, datasetIndex, index) {\n        if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n            return;\n        }\n        if (element.inRange(position.x, position.y, useFinalPosition)) {\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    };\n    evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n    return items;\n}\n function getNearestRadialItems(chart, position, axis, useFinalPosition) {\n    let items = [];\n    function evaluationFunc(element, datasetIndex, index) {\n        const { startAngle , endAngle  } = element.getProps([\n            'startAngle',\n            'endAngle'\n        ], useFinalPosition);\n        const { angle  } = getAngleFromPoint(element, {\n            x: position.x,\n            y: position.y\n        });\n        if (_angleBetween(angle, startAngle, endAngle)) {\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    }\n    evaluateInteractionItems(chart, axis, position, evaluationFunc);\n    return items;\n}\n function getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n    let items = [];\n    const distanceMetric = getDistanceMetricForAxis(axis);\n    let minDistance = Number.POSITIVE_INFINITY;\n    function evaluationFunc(element, datasetIndex, index) {\n        const inRange = element.inRange(position.x, position.y, useFinalPosition);\n        if (intersect && !inRange) {\n            return;\n        }\n        const center = element.getCenterPoint(useFinalPosition);\n        const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n        if (!pointInArea && !inRange) {\n            return;\n        }\n        const distance = distanceMetric(position, center);\n        if (distance < minDistance) {\n            items = [\n                {\n                    element,\n                    datasetIndex,\n                    index\n                }\n            ];\n            minDistance = distance;\n        } else if (distance === minDistance) {\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    }\n    evaluateInteractionItems(chart, axis, position, evaluationFunc);\n    return items;\n}\n function getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n    if (!includeInvisible && !chart.isPointInArea(position)) {\n        return [];\n    }\n    return axis === 'r' && !intersect ? getNearestRadialItems(chart, position, axis, useFinalPosition) : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n function getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n    const items = [];\n    const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n    let intersectsItem = false;\n    evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index)=>{\n        if (element[rangeMethod] && element[rangeMethod](position[axis], useFinalPosition)) {\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n            intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n        }\n    });\n    if (intersect && !intersectsItem) {\n        return [];\n    }\n    return items;\n}\n var Interaction = {\n    evaluateInteractionItems,\n    modes: {\n index (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            const axis = options.axis || 'x';\n            const includeInvisible = options.includeInvisible || false;\n            const items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n            const elements = [];\n            if (!items.length) {\n                return [];\n            }\n            chart.getSortedVisibleDatasetMetas().forEach((meta)=>{\n                const index = items[0].index;\n                const element = meta.data[index];\n                if (element && !element.skip) {\n                    elements.push({\n                        element,\n                        datasetIndex: meta.index,\n                        index\n                    });\n                }\n            });\n            return elements;\n        },\n dataset (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            const axis = options.axis || 'xy';\n            const includeInvisible = options.includeInvisible || false;\n            let items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n            if (items.length > 0) {\n                const datasetIndex = items[0].datasetIndex;\n                const data = chart.getDatasetMeta(datasetIndex).data;\n                items = [];\n                for(let i = 0; i < data.length; ++i){\n                    items.push({\n                        element: data[i],\n                        datasetIndex,\n                        index: i\n                    });\n                }\n            }\n            return items;\n        },\n point (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            const axis = options.axis || 'xy';\n            const includeInvisible = options.includeInvisible || false;\n            return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n        },\n nearest (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            const axis = options.axis || 'xy';\n            const includeInvisible = options.includeInvisible || false;\n            return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n        },\n x (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n        },\n y (chart, e, options, useFinalPosition) {\n            const position = getRelativePosition(e, chart);\n            return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n        }\n    }\n};\n\nconst STATIC_POSITIONS = [\n    'left',\n    'top',\n    'right',\n    'bottom'\n];\nfunction filterByPosition(array, position) {\n    return array.filter((v)=>v.pos === position);\n}\nfunction filterDynamicPositionByAxis(array, axis) {\n    return array.filter((v)=>STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\nfunction sortByWeight(array, reverse) {\n    return array.sort((a, b)=>{\n        const v0 = reverse ? b : a;\n        const v1 = reverse ? a : b;\n        return v0.weight === v1.weight ? v0.index - v1.index : v0.weight - v1.weight;\n    });\n}\nfunction wrapBoxes(boxes) {\n    const layoutBoxes = [];\n    let i, ilen, box, pos, stack, stackWeight;\n    for(i = 0, ilen = (boxes || []).length; i < ilen; ++i){\n        box = boxes[i];\n        ({ position: pos , options: { stack , stackWeight =1  }  } = box);\n        layoutBoxes.push({\n            index: i,\n            box,\n            pos,\n            horizontal: box.isHorizontal(),\n            weight: box.weight,\n            stack: stack && pos + stack,\n            stackWeight\n        });\n    }\n    return layoutBoxes;\n}\nfunction buildStacks(layouts) {\n    const stacks = {};\n    for (const wrap of layouts){\n        const { stack , pos , stackWeight  } = wrap;\n        if (!stack || !STATIC_POSITIONS.includes(pos)) {\n            continue;\n        }\n        const _stack = stacks[stack] || (stacks[stack] = {\n            count: 0,\n            placed: 0,\n            weight: 0,\n            size: 0\n        });\n        _stack.count++;\n        _stack.weight += stackWeight;\n    }\n    return stacks;\n}\n function setLayoutDims(layouts, params) {\n    const stacks = buildStacks(layouts);\n    const { vBoxMaxWidth , hBoxMaxHeight  } = params;\n    let i, ilen, layout;\n    for(i = 0, ilen = layouts.length; i < ilen; ++i){\n        layout = layouts[i];\n        const { fullSize  } = layout.box;\n        const stack = stacks[layout.stack];\n        const factor = stack && layout.stackWeight / stack.weight;\n        if (layout.horizontal) {\n            layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n            layout.height = hBoxMaxHeight;\n        } else {\n            layout.width = vBoxMaxWidth;\n            layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n        }\n    }\n    return stacks;\n}\nfunction buildLayoutBoxes(boxes) {\n    const layoutBoxes = wrapBoxes(boxes);\n    const fullSize = sortByWeight(layoutBoxes.filter((wrap)=>wrap.box.fullSize), true);\n    const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n    const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n    const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n    const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n    const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n    const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n    return {\n        fullSize,\n        leftAndTop: left.concat(top),\n        rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n        chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n        vertical: left.concat(right).concat(centerVertical),\n        horizontal: top.concat(bottom).concat(centerHorizontal)\n    };\n}\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n    return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\nfunction updateMaxPadding(maxPadding, boxPadding) {\n    maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n    maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n    maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n    maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\nfunction updateDims(chartArea, params, layout, stacks) {\n    const { pos , box  } = layout;\n    const maxPadding = chartArea.maxPadding;\n    if (!isObject(pos)) {\n        if (layout.size) {\n            chartArea[pos] -= layout.size;\n        }\n        const stack = stacks[layout.stack] || {\n            size: 0,\n            count: 1\n        };\n        stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n        layout.size = stack.size / stack.count;\n        chartArea[pos] += layout.size;\n    }\n    if (box.getPadding) {\n        updateMaxPadding(maxPadding, box.getPadding());\n    }\n    const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n    const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n    const widthChanged = newWidth !== chartArea.w;\n    const heightChanged = newHeight !== chartArea.h;\n    chartArea.w = newWidth;\n    chartArea.h = newHeight;\n    return layout.horizontal ? {\n        same: widthChanged,\n        other: heightChanged\n    } : {\n        same: heightChanged,\n        other: widthChanged\n    };\n}\nfunction handleMaxPadding(chartArea) {\n    const maxPadding = chartArea.maxPadding;\n    function updatePos(pos) {\n        const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n        chartArea[pos] += change;\n        return change;\n    }\n    chartArea.y += updatePos('top');\n    chartArea.x += updatePos('left');\n    updatePos('right');\n    updatePos('bottom');\n}\nfunction getMargins(horizontal, chartArea) {\n    const maxPadding = chartArea.maxPadding;\n    function marginForPositions(positions) {\n        const margin = {\n            left: 0,\n            top: 0,\n            right: 0,\n            bottom: 0\n        };\n        positions.forEach((pos)=>{\n            margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n        });\n        return margin;\n    }\n    return horizontal ? marginForPositions([\n        'left',\n        'right'\n    ]) : marginForPositions([\n        'top',\n        'bottom'\n    ]);\n}\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n    const refitBoxes = [];\n    let i, ilen, layout, box, refit, changed;\n    for(i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i){\n        layout = boxes[i];\n        box = layout.box;\n        box.update(layout.width || chartArea.w, layout.height || chartArea.h, getMargins(layout.horizontal, chartArea));\n        const { same , other  } = updateDims(chartArea, params, layout, stacks);\n        refit |= same && refitBoxes.length;\n        changed = changed || other;\n        if (!box.fullSize) {\n            refitBoxes.push(layout);\n        }\n    }\n    return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\nfunction setBoxDims(box, left, top, width, height) {\n    box.top = top;\n    box.left = left;\n    box.right = left + width;\n    box.bottom = top + height;\n    box.width = width;\n    box.height = height;\n}\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n    const userPadding = params.padding;\n    let { x , y  } = chartArea;\n    for (const layout of boxes){\n        const box = layout.box;\n        const stack = stacks[layout.stack] || {\n            count: 1,\n            placed: 0,\n            weight: 1\n        };\n        const weight = layout.stackWeight / stack.weight || 1;\n        if (layout.horizontal) {\n            const width = chartArea.w * weight;\n            const height = stack.size || box.height;\n            if (defined(stack.start)) {\n                y = stack.start;\n            }\n            if (box.fullSize) {\n                setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n            } else {\n                setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n            }\n            stack.start = y;\n            stack.placed += width;\n            y = box.bottom;\n        } else {\n            const height = chartArea.h * weight;\n            const width = stack.size || box.width;\n            if (defined(stack.start)) {\n                x = stack.start;\n            }\n            if (box.fullSize) {\n                setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n            } else {\n                setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n            }\n            stack.start = x;\n            stack.placed += height;\n            x = box.right;\n        }\n    }\n    chartArea.x = x;\n    chartArea.y = y;\n}\nvar layouts = {\n addBox (chart, item) {\n        if (!chart.boxes) {\n            chart.boxes = [];\n        }\n        item.fullSize = item.fullSize || false;\n        item.position = item.position || 'top';\n        item.weight = item.weight || 0;\n        item._layers = item._layers || function() {\n            return [\n                {\n                    z: 0,\n                    draw (chartArea) {\n                        item.draw(chartArea);\n                    }\n                }\n            ];\n        };\n        chart.boxes.push(item);\n    },\n removeBox (chart, layoutItem) {\n        const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n        if (index !== -1) {\n            chart.boxes.splice(index, 1);\n        }\n    },\n configure (chart, item, options) {\n        item.fullSize = options.fullSize;\n        item.position = options.position;\n        item.weight = options.weight;\n    },\n update (chart, width, height, minPadding) {\n        if (!chart) {\n            return;\n        }\n        const padding = toPadding(chart.options.layout.padding);\n        const availableWidth = Math.max(width - padding.width, 0);\n        const availableHeight = Math.max(height - padding.height, 0);\n        const boxes = buildLayoutBoxes(chart.boxes);\n        const verticalBoxes = boxes.vertical;\n        const horizontalBoxes = boxes.horizontal;\n        each(chart.boxes, (box)=>{\n            if (typeof box.beforeLayout === 'function') {\n                box.beforeLayout();\n            }\n        });\n        const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap)=>wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n        const params = Object.freeze({\n            outerWidth: width,\n            outerHeight: height,\n            padding,\n            availableWidth,\n            availableHeight,\n            vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n            hBoxMaxHeight: availableHeight / 2\n        });\n        const maxPadding = Object.assign({}, padding);\n        updateMaxPadding(maxPadding, toPadding(minPadding));\n        const chartArea = Object.assign({\n            maxPadding,\n            w: availableWidth,\n            h: availableHeight,\n            x: padding.left,\n            y: padding.top\n        }, padding);\n        const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n        fitBoxes(boxes.fullSize, chartArea, params, stacks);\n        fitBoxes(verticalBoxes, chartArea, params, stacks);\n        if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n            fitBoxes(verticalBoxes, chartArea, params, stacks);\n        }\n        handleMaxPadding(chartArea);\n        placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n        chartArea.x += chartArea.w;\n        chartArea.y += chartArea.h;\n        placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n        chart.chartArea = {\n            left: chartArea.left,\n            top: chartArea.top,\n            right: chartArea.left + chartArea.w,\n            bottom: chartArea.top + chartArea.h,\n            height: chartArea.h,\n            width: chartArea.w\n        };\n        each(boxes.chartArea, (layout)=>{\n            const box = layout.box;\n            Object.assign(box, chart.chartArea);\n            box.update(chartArea.w, chartArea.h, {\n                left: 0,\n                top: 0,\n                right: 0,\n                bottom: 0\n            });\n        });\n    }\n};\n\nclass BasePlatform {\n acquireContext(canvas, aspectRatio) {}\n releaseContext(context) {\n        return false;\n    }\n addEventListener(chart, type, listener) {}\n removeEventListener(chart, type, listener) {}\n getDevicePixelRatio() {\n        return 1;\n    }\n getMaximumSize(element, width, height, aspectRatio) {\n        width = Math.max(0, width || element.width);\n        height = height || element.height;\n        return {\n            width,\n            height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n        };\n    }\n isAttached(canvas) {\n        return true;\n    }\n updateConfig(config) {\n    }\n}\n\nclass BasicPlatform extends BasePlatform {\n    acquireContext(item) {\n        return item && item.getContext && item.getContext('2d') || null;\n    }\n    updateConfig(config) {\n        config.options.animation = false;\n    }\n}\n\nconst EXPANDO_KEY = '$chartjs';\n const EVENT_TYPES = {\n    touchstart: 'mousedown',\n    touchmove: 'mousemove',\n    touchend: 'mouseup',\n    pointerenter: 'mouseenter',\n    pointerdown: 'mousedown',\n    pointermove: 'mousemove',\n    pointerup: 'mouseup',\n    pointerleave: 'mouseout',\n    pointerout: 'mouseout'\n};\nconst isNullOrEmpty = (value)=>value === null || value === '';\n function initCanvas(canvas, aspectRatio) {\n    const style = canvas.style;\n    const renderHeight = canvas.getAttribute('height');\n    const renderWidth = canvas.getAttribute('width');\n    canvas[EXPANDO_KEY] = {\n        initial: {\n            height: renderHeight,\n            width: renderWidth,\n            style: {\n                display: style.display,\n                height: style.height,\n                width: style.width\n            }\n        }\n    };\n    style.display = style.display || 'block';\n    style.boxSizing = style.boxSizing || 'border-box';\n    if (isNullOrEmpty(renderWidth)) {\n        const displayWidth = readUsedSize(canvas, 'width');\n        if (displayWidth !== undefined) {\n            canvas.width = displayWidth;\n        }\n    }\n    if (isNullOrEmpty(renderHeight)) {\n        if (canvas.style.height === '') {\n            canvas.height = canvas.width / (aspectRatio || 2);\n        } else {\n            const displayHeight = readUsedSize(canvas, 'height');\n            if (displayHeight !== undefined) {\n                canvas.height = displayHeight;\n            }\n        }\n    }\n    return canvas;\n}\nconst eventListenerOptions = supportsEventListenerOptions ? {\n    passive: true\n} : false;\nfunction addListener(node, type, listener) {\n    if (node) {\n        node.addEventListener(type, listener, eventListenerOptions);\n    }\n}\nfunction removeListener(chart, type, listener) {\n    if (chart && chart.canvas) {\n        chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n    }\n}\nfunction fromNativeEvent(event, chart) {\n    const type = EVENT_TYPES[event.type] || event.type;\n    const { x , y  } = getRelativePosition(event, chart);\n    return {\n        type,\n        chart,\n        native: event,\n        x: x !== undefined ? x : null,\n        y: y !== undefined ? y : null\n    };\n}\nfunction nodeListContains(nodeList, canvas) {\n    for (const node of nodeList){\n        if (node === canvas || node.contains(canvas)) {\n            return true;\n        }\n    }\n}\nfunction createAttachObserver(chart, type, listener) {\n    const canvas = chart.canvas;\n    const observer = new MutationObserver((entries)=>{\n        let trigger = false;\n        for (const entry of entries){\n            trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n            trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n        }\n        if (trigger) {\n            listener();\n        }\n    });\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    });\n    return observer;\n}\nfunction createDetachObserver(chart, type, listener) {\n    const canvas = chart.canvas;\n    const observer = new MutationObserver((entries)=>{\n        let trigger = false;\n        for (const entry of entries){\n            trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n            trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n        }\n        if (trigger) {\n            listener();\n        }\n    });\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    });\n    return observer;\n}\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\nfunction onWindowResize() {\n    const dpr = window.devicePixelRatio;\n    if (dpr === oldDevicePixelRatio) {\n        return;\n    }\n    oldDevicePixelRatio = dpr;\n    drpListeningCharts.forEach((resize, chart)=>{\n        if (chart.currentDevicePixelRatio !== dpr) {\n            resize();\n        }\n    });\n}\nfunction listenDevicePixelRatioChanges(chart, resize) {\n    if (!drpListeningCharts.size) {\n        window.addEventListener('resize', onWindowResize);\n    }\n    drpListeningCharts.set(chart, resize);\n}\nfunction unlistenDevicePixelRatioChanges(chart) {\n    drpListeningCharts.delete(chart);\n    if (!drpListeningCharts.size) {\n        window.removeEventListener('resize', onWindowResize);\n    }\n}\nfunction createResizeObserver(chart, type, listener) {\n    const canvas = chart.canvas;\n    const container = canvas && _getParentNode(canvas);\n    if (!container) {\n        return;\n    }\n    const resize = throttled((width, height)=>{\n        const w = container.clientWidth;\n        listener(width, height);\n        if (w < container.clientWidth) {\n            listener();\n        }\n    }, window);\n    const observer = new ResizeObserver((entries)=>{\n        const entry = entries[0];\n        const width = entry.contentRect.width;\n        const height = entry.contentRect.height;\n        if (width === 0 && height === 0) {\n            return;\n        }\n        resize(width, height);\n    });\n    observer.observe(container);\n    listenDevicePixelRatioChanges(chart, resize);\n    return observer;\n}\nfunction releaseObserver(chart, type, observer) {\n    if (observer) {\n        observer.disconnect();\n    }\n    if (type === 'resize') {\n        unlistenDevicePixelRatioChanges(chart);\n    }\n}\nfunction createProxyAndListen(chart, type, listener) {\n    const canvas = chart.canvas;\n    const proxy = throttled((event)=>{\n        if (chart.ctx !== null) {\n            listener(fromNativeEvent(event, chart));\n        }\n    }, chart);\n    addListener(canvas, type, proxy);\n    return proxy;\n}\n class DomPlatform extends BasePlatform {\n acquireContext(canvas, aspectRatio) {\n        const context = canvas && canvas.getContext && canvas.getContext('2d');\n        if (context && context.canvas === canvas) {\n            initCanvas(canvas, aspectRatio);\n            return context;\n        }\n        return null;\n    }\n releaseContext(context) {\n        const canvas = context.canvas;\n        if (!canvas[EXPANDO_KEY]) {\n            return false;\n        }\n        const initial = canvas[EXPANDO_KEY].initial;\n        [\n            'height',\n            'width'\n        ].forEach((prop)=>{\n            const value = initial[prop];\n            if (isNullOrUndef(value)) {\n                canvas.removeAttribute(prop);\n            } else {\n                canvas.setAttribute(prop, value);\n            }\n        });\n        const style = initial.style || {};\n        Object.keys(style).forEach((key)=>{\n            canvas.style[key] = style[key];\n        });\n        canvas.width = canvas.width;\n        delete canvas[EXPANDO_KEY];\n        return true;\n    }\n addEventListener(chart, type, listener) {\n        this.removeEventListener(chart, type);\n        const proxies = chart.$proxies || (chart.$proxies = {});\n        const handlers = {\n            attach: createAttachObserver,\n            detach: createDetachObserver,\n            resize: createResizeObserver\n        };\n        const handler = handlers[type] || createProxyAndListen;\n        proxies[type] = handler(chart, type, listener);\n    }\n removeEventListener(chart, type) {\n        const proxies = chart.$proxies || (chart.$proxies = {});\n        const proxy = proxies[type];\n        if (!proxy) {\n            return;\n        }\n        const handlers = {\n            attach: releaseObserver,\n            detach: releaseObserver,\n            resize: releaseObserver\n        };\n        const handler = handlers[type] || removeListener;\n        handler(chart, type, proxy);\n        proxies[type] = undefined;\n    }\n    getDevicePixelRatio() {\n        return window.devicePixelRatio;\n    }\n getMaximumSize(canvas, width, height, aspectRatio) {\n        return getMaximumSize(canvas, width, height, aspectRatio);\n    }\n isAttached(canvas) {\n        const container = canvas && _getParentNode(canvas);\n        return !!(container && container.isConnected);\n    }\n}\n\nfunction _detectPlatform(canvas) {\n    if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {\n        return BasicPlatform;\n    }\n    return DomPlatform;\n}\n\nclass Element {\n    static defaults = {};\n    static defaultRoutes = undefined;\n    x;\n    y;\n    active = false;\n    options;\n    $animations;\n    tooltipPosition(useFinalPosition) {\n        const { x , y  } = this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return {\n            x,\n            y\n        };\n    }\n    hasValue() {\n        return isNumber(this.x) && isNumber(this.y);\n    }\n    getProps(props, final) {\n        const anims = this.$animations;\n        if (!final || !anims) {\n            // let's not create an object, if not needed\n            return this;\n        }\n        const ret = {};\n        props.forEach((prop)=>{\n            ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];\n        });\n        return ret;\n    }\n}\n\nfunction autoSkip(scale, ticks) {\n    const tickOpts = scale.options.ticks;\n    const determinedMaxTicks = determineMaxTicks(scale);\n    const ticksLimit = Math.min(tickOpts.maxTicksLimit || determinedMaxTicks, determinedMaxTicks);\n    const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n    const numMajorIndices = majorIndices.length;\n    const first = majorIndices[0];\n    const last = majorIndices[numMajorIndices - 1];\n    const newTicks = [];\n    if (numMajorIndices > ticksLimit) {\n        skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n        return newTicks;\n    }\n    const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n    if (numMajorIndices > 0) {\n        let i, ilen;\n        const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n        skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n        for(i = 0, ilen = numMajorIndices - 1; i < ilen; i++){\n            skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n        }\n        skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n        return newTicks;\n    }\n    skip(ticks, newTicks, spacing);\n    return newTicks;\n}\nfunction determineMaxTicks(scale) {\n    const offset = scale.options.offset;\n    const tickLength = scale._tickSize();\n    const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n    const maxChart = scale._maxLength / tickLength;\n    return Math.floor(Math.min(maxScale, maxChart));\n}\n function calculateSpacing(majorIndices, ticks, ticksLimit) {\n    const evenMajorSpacing = getEvenSpacing(majorIndices);\n    const spacing = ticks.length / ticksLimit;\n    if (!evenMajorSpacing) {\n        return Math.max(spacing, 1);\n    }\n    const factors = _factorize(evenMajorSpacing);\n    for(let i = 0, ilen = factors.length - 1; i < ilen; i++){\n        const factor = factors[i];\n        if (factor > spacing) {\n            return factor;\n        }\n    }\n    return Math.max(spacing, 1);\n}\n function getMajorIndices(ticks) {\n    const result = [];\n    let i, ilen;\n    for(i = 0, ilen = ticks.length; i < ilen; i++){\n        if (ticks[i].major) {\n            result.push(i);\n        }\n    }\n    return result;\n}\n function skipMajors(ticks, newTicks, majorIndices, spacing) {\n    let count = 0;\n    let next = majorIndices[0];\n    let i;\n    spacing = Math.ceil(spacing);\n    for(i = 0; i < ticks.length; i++){\n        if (i === next) {\n            newTicks.push(ticks[i]);\n            count++;\n            next = majorIndices[count * spacing];\n        }\n    }\n}\n function skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n    const start = valueOrDefault(majorStart, 0);\n    const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n    let count = 0;\n    let length, i, next;\n    spacing = Math.ceil(spacing);\n    if (majorEnd) {\n        length = majorEnd - majorStart;\n        spacing = length / Math.floor(length / spacing);\n    }\n    next = start;\n    while(next < 0){\n        count++;\n        next = Math.round(start + count * spacing);\n    }\n    for(i = Math.max(start, 0); i < end; i++){\n        if (i === next) {\n            newTicks.push(ticks[i]);\n            count++;\n            next = Math.round(start + count * spacing);\n        }\n    }\n}\n function getEvenSpacing(arr) {\n    const len = arr.length;\n    let i, diff;\n    if (len < 2) {\n        return false;\n    }\n    for(diff = arr[0], i = 1; i < len; ++i){\n        if (arr[i] - arr[i - 1] !== diff) {\n            return false;\n        }\n    }\n    return diff;\n}\n\nconst reverseAlign = (align)=>align === 'left' ? 'right' : align === 'right' ? 'left' : align;\nconst offsetFromEdge = (scale, edge, offset)=>edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\nconst getTicksLimit = (ticksLength, maxTicksLimit)=>Math.min(maxTicksLimit || ticksLength, ticksLength);\n function sample(arr, numItems) {\n    const result = [];\n    const increment = arr.length / numItems;\n    const len = arr.length;\n    let i = 0;\n    for(; i < len; i += increment){\n        result.push(arr[Math.floor(i)]);\n    }\n    return result;\n}\n function getPixelForGridLine(scale, index, offsetGridLines) {\n    const length = scale.ticks.length;\n    const validIndex = Math.min(index, length - 1);\n    const start = scale._startPixel;\n    const end = scale._endPixel;\n    const epsilon = 1e-6;\n    let lineValue = scale.getPixelForTick(validIndex);\n    let offset;\n    if (offsetGridLines) {\n        if (length === 1) {\n            offset = Math.max(lineValue - start, end - lineValue);\n        } else if (index === 0) {\n            offset = (scale.getPixelForTick(1) - lineValue) / 2;\n        } else {\n            offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n        }\n        lineValue += validIndex < index ? offset : -offset;\n        if (lineValue < start - epsilon || lineValue > end + epsilon) {\n            return;\n        }\n    }\n    return lineValue;\n}\n function garbageCollect(caches, length) {\n    each(caches, (cache)=>{\n        const gc = cache.gc;\n        const gcLen = gc.length / 2;\n        let i;\n        if (gcLen > length) {\n            for(i = 0; i < gcLen; ++i){\n                delete cache.data[gc[i]];\n            }\n            gc.splice(0, gcLen);\n        }\n    });\n}\n function getTickMarkLength(options) {\n    return options.drawTicks ? options.tickLength : 0;\n}\n function getTitleHeight(options, fallback) {\n    if (!options.display) {\n        return 0;\n    }\n    const font = toFont(options.font, fallback);\n    const padding = toPadding(options.padding);\n    const lines = isArray(options.text) ? options.text.length : 1;\n    return lines * font.lineHeight + padding.height;\n}\nfunction createScaleContext(parent, scale) {\n    return createContext(parent, {\n        scale,\n        type: 'scale'\n    });\n}\nfunction createTickContext(parent, index, tick) {\n    return createContext(parent, {\n        tick,\n        index,\n        type: 'tick'\n    });\n}\nfunction titleAlign(align, position, reverse) {\n     let ret = _toLeftRightCenter(align);\n    if (reverse && position !== 'right' || !reverse && position === 'right') {\n        ret = reverseAlign(ret);\n    }\n    return ret;\n}\nfunction titleArgs(scale, offset, position, align) {\n    const { top , left , bottom , right , chart  } = scale;\n    const { chartArea , scales  } = chart;\n    let rotation = 0;\n    let maxWidth, titleX, titleY;\n    const height = bottom - top;\n    const width = right - left;\n    if (scale.isHorizontal()) {\n        titleX = _alignStartEnd(align, left, right);\n        if (isObject(position)) {\n            const positionAxisID = Object.keys(position)[0];\n            const value = position[positionAxisID];\n            titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n        } else if (position === 'center') {\n            titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n        } else {\n            titleY = offsetFromEdge(scale, position, offset);\n        }\n        maxWidth = right - left;\n    } else {\n        if (isObject(position)) {\n            const positionAxisID = Object.keys(position)[0];\n            const value = position[positionAxisID];\n            titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;\n        } else if (position === 'center') {\n            titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n        } else {\n            titleX = offsetFromEdge(scale, position, offset);\n        }\n        titleY = _alignStartEnd(align, bottom, top);\n        rotation = position === 'left' ? -HALF_PI : HALF_PI;\n    }\n    return {\n        titleX,\n        titleY,\n        maxWidth,\n        rotation\n    };\n}\nclass Scale extends Element {\n    constructor(cfg){\n        super();\n         this.id = cfg.id;\n         this.type = cfg.type;\n         this.options = undefined;\n         this.ctx = cfg.ctx;\n         this.chart = cfg.chart;\n         this.top = undefined;\n         this.bottom = undefined;\n         this.left = undefined;\n         this.right = undefined;\n         this.width = undefined;\n         this.height = undefined;\n        this._margins = {\n            left: 0,\n            right: 0,\n            top: 0,\n            bottom: 0\n        };\n         this.maxWidth = undefined;\n         this.maxHeight = undefined;\n         this.paddingTop = undefined;\n         this.paddingBottom = undefined;\n         this.paddingLeft = undefined;\n         this.paddingRight = undefined;\n         this.axis = undefined;\n         this.labelRotation = undefined;\n        this.min = undefined;\n        this.max = undefined;\n        this._range = undefined;\n         this.ticks = [];\n         this._gridLineItems = null;\n         this._labelItems = null;\n         this._labelSizes = null;\n        this._length = 0;\n        this._maxLength = 0;\n        this._longestTextCache = {};\n         this._startPixel = undefined;\n         this._endPixel = undefined;\n        this._reversePixels = false;\n        this._userMax = undefined;\n        this._userMin = undefined;\n        this._suggestedMax = undefined;\n        this._suggestedMin = undefined;\n        this._ticksLength = 0;\n        this._borderValue = 0;\n        this._cache = {};\n        this._dataLimitsCached = false;\n        this.$context = undefined;\n    }\n init(options) {\n        this.options = options.setContext(this.getContext());\n        this.axis = options.axis;\n        this._userMin = this.parse(options.min);\n        this._userMax = this.parse(options.max);\n        this._suggestedMin = this.parse(options.suggestedMin);\n        this._suggestedMax = this.parse(options.suggestedMax);\n    }\n parse(raw, index) {\n        return raw;\n    }\n getUserBounds() {\n        let { _userMin , _userMax , _suggestedMin , _suggestedMax  } = this;\n        _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n        _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n        _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n        _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n        return {\n            min: finiteOrDefault(_userMin, _suggestedMin),\n            max: finiteOrDefault(_userMax, _suggestedMax),\n            minDefined: isNumberFinite(_userMin),\n            maxDefined: isNumberFinite(_userMax)\n        };\n    }\n getMinMax(canStack) {\n        let { min , max , minDefined , maxDefined  } = this.getUserBounds();\n        let range;\n        if (minDefined && maxDefined) {\n            return {\n                min,\n                max\n            };\n        }\n        const metas = this.getMatchingVisibleMetas();\n        for(let i = 0, ilen = metas.length; i < ilen; ++i){\n            range = metas[i].controller.getMinMax(this, canStack);\n            if (!minDefined) {\n                min = Math.min(min, range.min);\n            }\n            if (!maxDefined) {\n                max = Math.max(max, range.max);\n            }\n        }\n        min = maxDefined && min > max ? max : min;\n        max = minDefined && min > max ? min : max;\n        return {\n            min: finiteOrDefault(min, finiteOrDefault(max, min)),\n            max: finiteOrDefault(max, finiteOrDefault(min, max))\n        };\n    }\n getPadding() {\n        return {\n            left: this.paddingLeft || 0,\n            top: this.paddingTop || 0,\n            right: this.paddingRight || 0,\n            bottom: this.paddingBottom || 0\n        };\n    }\n getTicks() {\n        return this.ticks;\n    }\n getLabels() {\n        const data = this.chart.data;\n        return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n    }\n getLabelItems(chartArea = this.chart.chartArea) {\n        const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n        return items;\n    }\n    beforeLayout() {\n        this._cache = {};\n        this._dataLimitsCached = false;\n    }\n    beforeUpdate() {\n        callback(this.options.beforeUpdate, [\n            this\n        ]);\n    }\n update(maxWidth, maxHeight, margins) {\n        const { beginAtZero , grace , ticks: tickOpts  } = this.options;\n        const sampleSize = tickOpts.sampleSize;\n        this.beforeUpdate();\n        this.maxWidth = maxWidth;\n        this.maxHeight = maxHeight;\n        this._margins = margins = Object.assign({\n            left: 0,\n            right: 0,\n            top: 0,\n            bottom: 0\n        }, margins);\n        this.ticks = null;\n        this._labelSizes = null;\n        this._gridLineItems = null;\n        this._labelItems = null;\n        this.beforeSetDimensions();\n        this.setDimensions();\n        this.afterSetDimensions();\n        this._maxLength = this.isHorizontal() ? this.width + margins.left + margins.right : this.height + margins.top + margins.bottom;\n        if (!this._dataLimitsCached) {\n            this.beforeDataLimits();\n            this.determineDataLimits();\n            this.afterDataLimits();\n            this._range = _addGrace(this, grace, beginAtZero);\n            this._dataLimitsCached = true;\n        }\n        this.beforeBuildTicks();\n        this.ticks = this.buildTicks() || [];\n        this.afterBuildTicks();\n        const samplingEnabled = sampleSize < this.ticks.length;\n        this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n        this.configure();\n        this.beforeCalculateLabelRotation();\n        this.calculateLabelRotation();\n        this.afterCalculateLabelRotation();\n        if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n            this.ticks = autoSkip(this, this.ticks);\n            this._labelSizes = null;\n            this.afterAutoSkip();\n        }\n        if (samplingEnabled) {\n            this._convertTicksToLabels(this.ticks);\n        }\n        this.beforeFit();\n        this.fit();\n        this.afterFit();\n        this.afterUpdate();\n    }\n configure() {\n        let reversePixels = this.options.reverse;\n        let startPixel, endPixel;\n        if (this.isHorizontal()) {\n            startPixel = this.left;\n            endPixel = this.right;\n        } else {\n            startPixel = this.top;\n            endPixel = this.bottom;\n            reversePixels = !reversePixels;\n        }\n        this._startPixel = startPixel;\n        this._endPixel = endPixel;\n        this._reversePixels = reversePixels;\n        this._length = endPixel - startPixel;\n        this._alignToPixels = this.options.alignToPixels;\n    }\n    afterUpdate() {\n        callback(this.options.afterUpdate, [\n            this\n        ]);\n    }\n    beforeSetDimensions() {\n        callback(this.options.beforeSetDimensions, [\n            this\n        ]);\n    }\n    setDimensions() {\n        if (this.isHorizontal()) {\n            this.width = this.maxWidth;\n            this.left = 0;\n            this.right = this.width;\n        } else {\n            this.height = this.maxHeight;\n            this.top = 0;\n            this.bottom = this.height;\n        }\n        this.paddingLeft = 0;\n        this.paddingTop = 0;\n        this.paddingRight = 0;\n        this.paddingBottom = 0;\n    }\n    afterSetDimensions() {\n        callback(this.options.afterSetDimensions, [\n            this\n        ]);\n    }\n    _callHooks(name) {\n        this.chart.notifyPlugins(name, this.getContext());\n        callback(this.options[name], [\n            this\n        ]);\n    }\n    beforeDataLimits() {\n        this._callHooks('beforeDataLimits');\n    }\n    determineDataLimits() {}\n    afterDataLimits() {\n        this._callHooks('afterDataLimits');\n    }\n    beforeBuildTicks() {\n        this._callHooks('beforeBuildTicks');\n    }\n buildTicks() {\n        return [];\n    }\n    afterBuildTicks() {\n        this._callHooks('afterBuildTicks');\n    }\n    beforeTickToLabelConversion() {\n        callback(this.options.beforeTickToLabelConversion, [\n            this\n        ]);\n    }\n generateTickLabels(ticks) {\n        const tickOpts = this.options.ticks;\n        let i, ilen, tick;\n        for(i = 0, ilen = ticks.length; i < ilen; i++){\n            tick = ticks[i];\n            tick.label = callback(tickOpts.callback, [\n                tick.value,\n                i,\n                ticks\n            ], this);\n        }\n    }\n    afterTickToLabelConversion() {\n        callback(this.options.afterTickToLabelConversion, [\n            this\n        ]);\n    }\n    beforeCalculateLabelRotation() {\n        callback(this.options.beforeCalculateLabelRotation, [\n            this\n        ]);\n    }\n    calculateLabelRotation() {\n        const options = this.options;\n        const tickOpts = options.ticks;\n        const numTicks = getTicksLimit(this.ticks.length, options.ticks.maxTicksLimit);\n        const minRotation = tickOpts.minRotation || 0;\n        const maxRotation = tickOpts.maxRotation;\n        let labelRotation = minRotation;\n        let tickWidth, maxHeight, maxLabelDiagonal;\n        if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n            this.labelRotation = minRotation;\n            return;\n        }\n        const labelSizes = this._getLabelSizes();\n        const maxLabelWidth = labelSizes.widest.width;\n        const maxLabelHeight = labelSizes.highest.height;\n        const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n        tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n        if (maxLabelWidth + 6 > tickWidth) {\n            tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n            maxHeight = this.maxHeight - getTickMarkLength(options.grid) - tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n            maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n            labelRotation = toDegrees(Math.min(Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)), Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))));\n            labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n        }\n        this.labelRotation = labelRotation;\n    }\n    afterCalculateLabelRotation() {\n        callback(this.options.afterCalculateLabelRotation, [\n            this\n        ]);\n    }\n    afterAutoSkip() {}\n    beforeFit() {\n        callback(this.options.beforeFit, [\n            this\n        ]);\n    }\n    fit() {\n        const minSize = {\n            width: 0,\n            height: 0\n        };\n        const { chart , options: { ticks: tickOpts , title: titleOpts , grid: gridOpts  }  } = this;\n        const display = this._isVisible();\n        const isHorizontal = this.isHorizontal();\n        if (display) {\n            const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n            if (isHorizontal) {\n                minSize.width = this.maxWidth;\n                minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n            } else {\n                minSize.height = this.maxHeight;\n                minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n            }\n            if (tickOpts.display && this.ticks.length) {\n                const { first , last , widest , highest  } = this._getLabelSizes();\n                const tickPadding = tickOpts.padding * 2;\n                const angleRadians = toRadians(this.labelRotation);\n                const cos = Math.cos(angleRadians);\n                const sin = Math.sin(angleRadians);\n                if (isHorizontal) {\n                    const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n                    minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n                } else {\n                    const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n                    minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n                }\n                this._calculatePadding(first, last, sin, cos);\n            }\n        }\n        this._handleMargins();\n        if (isHorizontal) {\n            this.width = this._length = chart.width - this._margins.left - this._margins.right;\n            this.height = minSize.height;\n        } else {\n            this.width = minSize.width;\n            this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n        }\n    }\n    _calculatePadding(first, last, sin, cos) {\n        const { ticks: { align , padding  } , position  } = this.options;\n        const isRotated = this.labelRotation !== 0;\n        const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n        if (this.isHorizontal()) {\n            const offsetLeft = this.getPixelForTick(0) - this.left;\n            const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n            let paddingLeft = 0;\n            let paddingRight = 0;\n            if (isRotated) {\n                if (labelsBelowTicks) {\n                    paddingLeft = cos * first.width;\n                    paddingRight = sin * last.height;\n                } else {\n                    paddingLeft = sin * first.height;\n                    paddingRight = cos * last.width;\n                }\n            } else if (align === 'start') {\n                paddingRight = last.width;\n            } else if (align === 'end') {\n                paddingLeft = first.width;\n            } else if (align !== 'inner') {\n                paddingLeft = first.width / 2;\n                paddingRight = last.width / 2;\n            }\n            this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n            this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n        } else {\n            let paddingTop = last.height / 2;\n            let paddingBottom = first.height / 2;\n            if (align === 'start') {\n                paddingTop = 0;\n                paddingBottom = first.height;\n            } else if (align === 'end') {\n                paddingTop = last.height;\n                paddingBottom = 0;\n            }\n            this.paddingTop = paddingTop + padding;\n            this.paddingBottom = paddingBottom + padding;\n        }\n    }\n _handleMargins() {\n        if (this._margins) {\n            this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n            this._margins.top = Math.max(this.paddingTop, this._margins.top);\n            this._margins.right = Math.max(this.paddingRight, this._margins.right);\n            this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n        }\n    }\n    afterFit() {\n        callback(this.options.afterFit, [\n            this\n        ]);\n    }\n isHorizontal() {\n        const { axis , position  } = this.options;\n        return position === 'top' || position === 'bottom' || axis === 'x';\n    }\n isFullSize() {\n        return this.options.fullSize;\n    }\n _convertTicksToLabels(ticks) {\n        this.beforeTickToLabelConversion();\n        this.generateTickLabels(ticks);\n        let i, ilen;\n        for(i = 0, ilen = ticks.length; i < ilen; i++){\n            if (isNullOrUndef(ticks[i].label)) {\n                ticks.splice(i, 1);\n                ilen--;\n                i--;\n            }\n        }\n        this.afterTickToLabelConversion();\n    }\n _getLabelSizes() {\n        let labelSizes = this._labelSizes;\n        if (!labelSizes) {\n            const sampleSize = this.options.ticks.sampleSize;\n            let ticks = this.ticks;\n            if (sampleSize < ticks.length) {\n                ticks = sample(ticks, sampleSize);\n            }\n            this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length, this.options.ticks.maxTicksLimit);\n        }\n        return labelSizes;\n    }\n _computeLabelSizes(ticks, length, maxTicksLimit) {\n        const { ctx , _longestTextCache: caches  } = this;\n        const widths = [];\n        const heights = [];\n        const increment = Math.floor(length / getTicksLimit(length, maxTicksLimit));\n        let widestLabelSize = 0;\n        let highestLabelSize = 0;\n        let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n        for(i = 0; i < length; i += increment){\n            label = ticks[i].label;\n            tickFont = this._resolveTickFontOptions(i);\n            ctx.font = fontString = tickFont.string;\n            cache = caches[fontString] = caches[fontString] || {\n                data: {},\n                gc: []\n            };\n            lineHeight = tickFont.lineHeight;\n            width = height = 0;\n            if (!isNullOrUndef(label) && !isArray(label)) {\n                width = _measureText(ctx, cache.data, cache.gc, width, label);\n                height = lineHeight;\n            } else if (isArray(label)) {\n                for(j = 0, jlen = label.length; j < jlen; ++j){\n                    nestedLabel =  label[j];\n                    if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n                        width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n                        height += lineHeight;\n                    }\n                }\n            }\n            widths.push(width);\n            heights.push(height);\n            widestLabelSize = Math.max(width, widestLabelSize);\n            highestLabelSize = Math.max(height, highestLabelSize);\n        }\n        garbageCollect(caches, length);\n        const widest = widths.indexOf(widestLabelSize);\n        const highest = heights.indexOf(highestLabelSize);\n        const valueAt = (idx)=>({\n                width: widths[idx] || 0,\n                height: heights[idx] || 0\n            });\n        return {\n            first: valueAt(0),\n            last: valueAt(length - 1),\n            widest: valueAt(widest),\n            highest: valueAt(highest),\n            widths,\n            heights\n        };\n    }\n getLabelForValue(value) {\n        return value;\n    }\n getPixelForValue(value, index) {\n        return NaN;\n    }\n getValueForPixel(pixel) {}\n getPixelForTick(index) {\n        const ticks = this.ticks;\n        if (index < 0 || index > ticks.length - 1) {\n            return null;\n        }\n        return this.getPixelForValue(ticks[index].value);\n    }\n getPixelForDecimal(decimal) {\n        if (this._reversePixels) {\n            decimal = 1 - decimal;\n        }\n        const pixel = this._startPixel + decimal * this._length;\n        return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n    }\n getDecimalForPixel(pixel) {\n        const decimal = (pixel - this._startPixel) / this._length;\n        return this._reversePixels ? 1 - decimal : decimal;\n    }\n getBasePixel() {\n        return this.getPixelForValue(this.getBaseValue());\n    }\n getBaseValue() {\n        const { min , max  } = this;\n        return min < 0 && max < 0 ? max : min > 0 && max > 0 ? min : 0;\n    }\n getContext(index) {\n        const ticks = this.ticks || [];\n        if (index >= 0 && index < ticks.length) {\n            const tick = ticks[index];\n            return tick.$context || (tick.$context = createTickContext(this.getContext(), index, tick));\n        }\n        return this.$context || (this.$context = createScaleContext(this.chart.getContext(), this));\n    }\n _tickSize() {\n        const optionTicks = this.options.ticks;\n        const rot = toRadians(this.labelRotation);\n        const cos = Math.abs(Math.cos(rot));\n        const sin = Math.abs(Math.sin(rot));\n        const labelSizes = this._getLabelSizes();\n        const padding = optionTicks.autoSkipPadding || 0;\n        const w = labelSizes ? labelSizes.widest.width + padding : 0;\n        const h = labelSizes ? labelSizes.highest.height + padding : 0;\n        return this.isHorizontal() ? h * cos > w * sin ? w / cos : h / sin : h * sin < w * cos ? h / cos : w / sin;\n    }\n _isVisible() {\n        const display = this.options.display;\n        if (display !== 'auto') {\n            return !!display;\n        }\n        return this.getMatchingVisibleMetas().length > 0;\n    }\n _computeGridLineItems(chartArea) {\n        const axis = this.axis;\n        const chart = this.chart;\n        const options = this.options;\n        const { grid , position , border  } = options;\n        const offset = grid.offset;\n        const isHorizontal = this.isHorizontal();\n        const ticks = this.ticks;\n        const ticksLength = ticks.length + (offset ? 1 : 0);\n        const tl = getTickMarkLength(grid);\n        const items = [];\n        const borderOpts = border.setContext(this.getContext());\n        const axisWidth = borderOpts.display ? borderOpts.width : 0;\n        const axisHalfWidth = axisWidth / 2;\n        const alignBorderValue = function(pixel) {\n            return _alignPixel(chart, pixel, axisWidth);\n        };\n        let borderValue, i, lineValue, alignedLineValue;\n        let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n        if (position === 'top') {\n            borderValue = alignBorderValue(this.bottom);\n            ty1 = this.bottom - tl;\n            ty2 = borderValue - axisHalfWidth;\n            y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n            y2 = chartArea.bottom;\n        } else if (position === 'bottom') {\n            borderValue = alignBorderValue(this.top);\n            y1 = chartArea.top;\n            y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n            ty1 = borderValue + axisHalfWidth;\n            ty2 = this.top + tl;\n        } else if (position === 'left') {\n            borderValue = alignBorderValue(this.right);\n            tx1 = this.right - tl;\n            tx2 = borderValue - axisHalfWidth;\n            x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n            x2 = chartArea.right;\n        } else if (position === 'right') {\n            borderValue = alignBorderValue(this.left);\n            x1 = chartArea.left;\n            x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n            tx1 = borderValue + axisHalfWidth;\n            tx2 = this.left + tl;\n        } else if (axis === 'x') {\n            if (position === 'center') {\n                borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n            } else if (isObject(position)) {\n                const positionAxisID = Object.keys(position)[0];\n                const value = position[positionAxisID];\n                borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n            }\n            y1 = chartArea.top;\n            y2 = chartArea.bottom;\n            ty1 = borderValue + axisHalfWidth;\n            ty2 = ty1 + tl;\n        } else if (axis === 'y') {\n            if (position === 'center') {\n                borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n            } else if (isObject(position)) {\n                const positionAxisID = Object.keys(position)[0];\n                const value = position[positionAxisID];\n                borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n            }\n            tx1 = borderValue - axisHalfWidth;\n            tx2 = tx1 - tl;\n            x1 = chartArea.left;\n            x2 = chartArea.right;\n        }\n        const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n        const step = Math.max(1, Math.ceil(ticksLength / limit));\n        for(i = 0; i < ticksLength; i += step){\n            const context = this.getContext(i);\n            const optsAtIndex = grid.setContext(context);\n            const optsAtIndexBorder = border.setContext(context);\n            const lineWidth = optsAtIndex.lineWidth;\n            const lineColor = optsAtIndex.color;\n            const borderDash = optsAtIndexBorder.dash || [];\n            const borderDashOffset = optsAtIndexBorder.dashOffset;\n            const tickWidth = optsAtIndex.tickWidth;\n            const tickColor = optsAtIndex.tickColor;\n            const tickBorderDash = optsAtIndex.tickBorderDash || [];\n            const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n            lineValue = getPixelForGridLine(this, i, offset);\n            if (lineValue === undefined) {\n                continue;\n            }\n            alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n            if (isHorizontal) {\n                tx1 = tx2 = x1 = x2 = alignedLineValue;\n            } else {\n                ty1 = ty2 = y1 = y2 = alignedLineValue;\n            }\n            items.push({\n                tx1,\n                ty1,\n                tx2,\n                ty2,\n                x1,\n                y1,\n                x2,\n                y2,\n                width: lineWidth,\n                color: lineColor,\n                borderDash,\n                borderDashOffset,\n                tickWidth,\n                tickColor,\n                tickBorderDash,\n                tickBorderDashOffset\n            });\n        }\n        this._ticksLength = ticksLength;\n        this._borderValue = borderValue;\n        return items;\n    }\n _computeLabelItems(chartArea) {\n        const axis = this.axis;\n        const options = this.options;\n        const { position , ticks: optionTicks  } = options;\n        const isHorizontal = this.isHorizontal();\n        const ticks = this.ticks;\n        const { align , crossAlign , padding , mirror  } = optionTicks;\n        const tl = getTickMarkLength(options.grid);\n        const tickAndPadding = tl + padding;\n        const hTickAndPadding = mirror ? -padding : tickAndPadding;\n        const rotation = -toRadians(this.labelRotation);\n        const items = [];\n        let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n        let textBaseline = 'middle';\n        if (position === 'top') {\n            y = this.bottom - hTickAndPadding;\n            textAlign = this._getXAxisLabelAlignment();\n        } else if (position === 'bottom') {\n            y = this.top + hTickAndPadding;\n            textAlign = this._getXAxisLabelAlignment();\n        } else if (position === 'left') {\n            const ret = this._getYAxisLabelAlignment(tl);\n            textAlign = ret.textAlign;\n            x = ret.x;\n        } else if (position === 'right') {\n            const ret = this._getYAxisLabelAlignment(tl);\n            textAlign = ret.textAlign;\n            x = ret.x;\n        } else if (axis === 'x') {\n            if (position === 'center') {\n                y = (chartArea.top + chartArea.bottom) / 2 + tickAndPadding;\n            } else if (isObject(position)) {\n                const positionAxisID = Object.keys(position)[0];\n                const value = position[positionAxisID];\n                y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n            }\n            textAlign = this._getXAxisLabelAlignment();\n        } else if (axis === 'y') {\n            if (position === 'center') {\n                x = (chartArea.left + chartArea.right) / 2 - tickAndPadding;\n            } else if (isObject(position)) {\n                const positionAxisID = Object.keys(position)[0];\n                const value = position[positionAxisID];\n                x = this.chart.scales[positionAxisID].getPixelForValue(value);\n            }\n            textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n        }\n        if (axis === 'y') {\n            if (align === 'start') {\n                textBaseline = 'top';\n            } else if (align === 'end') {\n                textBaseline = 'bottom';\n            }\n        }\n        const labelSizes = this._getLabelSizes();\n        for(i = 0, ilen = ticks.length; i < ilen; ++i){\n            tick = ticks[i];\n            label = tick.label;\n            const optsAtIndex = optionTicks.setContext(this.getContext(i));\n            pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n            font = this._resolveTickFontOptions(i);\n            lineHeight = font.lineHeight;\n            lineCount = isArray(label) ? label.length : 1;\n            const halfCount = lineCount / 2;\n            const color = optsAtIndex.color;\n            const strokeColor = optsAtIndex.textStrokeColor;\n            const strokeWidth = optsAtIndex.textStrokeWidth;\n            let tickTextAlign = textAlign;\n            if (isHorizontal) {\n                x = pixel;\n                if (textAlign === 'inner') {\n                    if (i === ilen - 1) {\n                        tickTextAlign = !this.options.reverse ? 'right' : 'left';\n                    } else if (i === 0) {\n                        tickTextAlign = !this.options.reverse ? 'left' : 'right';\n                    } else {\n                        tickTextAlign = 'center';\n                    }\n                }\n                if (position === 'top') {\n                    if (crossAlign === 'near' || rotation !== 0) {\n                        textOffset = -lineCount * lineHeight + lineHeight / 2;\n                    } else if (crossAlign === 'center') {\n                        textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n                    } else {\n                        textOffset = -labelSizes.highest.height + lineHeight / 2;\n                    }\n                } else {\n                    if (crossAlign === 'near' || rotation !== 0) {\n                        textOffset = lineHeight / 2;\n                    } else if (crossAlign === 'center') {\n                        textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n                    } else {\n                        textOffset = labelSizes.highest.height - lineCount * lineHeight;\n                    }\n                }\n                if (mirror) {\n                    textOffset *= -1;\n                }\n                if (rotation !== 0 && !optsAtIndex.showLabelBackdrop) {\n                    x += lineHeight / 2 * Math.sin(rotation);\n                }\n            } else {\n                y = pixel;\n                textOffset = (1 - lineCount) * lineHeight / 2;\n            }\n            let backdrop;\n            if (optsAtIndex.showLabelBackdrop) {\n                const labelPadding = toPadding(optsAtIndex.backdropPadding);\n                const height = labelSizes.heights[i];\n                const width = labelSizes.widths[i];\n                let top = textOffset - labelPadding.top;\n                let left = 0 - labelPadding.left;\n                switch(textBaseline){\n                    case 'middle':\n                        top -= height / 2;\n                        break;\n                    case 'bottom':\n                        top -= height;\n                        break;\n                }\n                switch(textAlign){\n                    case 'center':\n                        left -= width / 2;\n                        break;\n                    case 'right':\n                        left -= width;\n                        break;\n                    case 'inner':\n                        if (i === ilen - 1) {\n                            left -= width;\n                        } else if (i > 0) {\n                            left -= width / 2;\n                        }\n                        break;\n                }\n                backdrop = {\n                    left,\n                    top,\n                    width: width + labelPadding.width,\n                    height: height + labelPadding.height,\n                    color: optsAtIndex.backdropColor\n                };\n            }\n            items.push({\n                label,\n                font,\n                textOffset,\n                options: {\n                    rotation,\n                    color,\n                    strokeColor,\n                    strokeWidth,\n                    textAlign: tickTextAlign,\n                    textBaseline,\n                    translation: [\n                        x,\n                        y\n                    ],\n                    backdrop\n                }\n            });\n        }\n        return items;\n    }\n    _getXAxisLabelAlignment() {\n        const { position , ticks  } = this.options;\n        const rotation = -toRadians(this.labelRotation);\n        if (rotation) {\n            return position === 'top' ? 'left' : 'right';\n        }\n        let align = 'center';\n        if (ticks.align === 'start') {\n            align = 'left';\n        } else if (ticks.align === 'end') {\n            align = 'right';\n        } else if (ticks.align === 'inner') {\n            align = 'inner';\n        }\n        return align;\n    }\n    _getYAxisLabelAlignment(tl) {\n        const { position , ticks: { crossAlign , mirror , padding  }  } = this.options;\n        const labelSizes = this._getLabelSizes();\n        const tickAndPadding = tl + padding;\n        const widest = labelSizes.widest.width;\n        let textAlign;\n        let x;\n        if (position === 'left') {\n            if (mirror) {\n                x = this.right + padding;\n                if (crossAlign === 'near') {\n                    textAlign = 'left';\n                } else if (crossAlign === 'center') {\n                    textAlign = 'center';\n                    x += widest / 2;\n                } else {\n                    textAlign = 'right';\n                    x += widest;\n                }\n            } else {\n                x = this.right - tickAndPadding;\n                if (crossAlign === 'near') {\n                    textAlign = 'right';\n                } else if (crossAlign === 'center') {\n                    textAlign = 'center';\n                    x -= widest / 2;\n                } else {\n                    textAlign = 'left';\n                    x = this.left;\n                }\n            }\n        } else if (position === 'right') {\n            if (mirror) {\n                x = this.left + padding;\n                if (crossAlign === 'near') {\n                    textAlign = 'right';\n                } else if (crossAlign === 'center') {\n                    textAlign = 'center';\n                    x -= widest / 2;\n                } else {\n                    textAlign = 'left';\n                    x -= widest;\n                }\n            } else {\n                x = this.left + tickAndPadding;\n                if (crossAlign === 'near') {\n                    textAlign = 'left';\n                } else if (crossAlign === 'center') {\n                    textAlign = 'center';\n                    x += widest / 2;\n                } else {\n                    textAlign = 'right';\n                    x = this.right;\n                }\n            }\n        } else {\n            textAlign = 'right';\n        }\n        return {\n            textAlign,\n            x\n        };\n    }\n _computeLabelArea() {\n        if (this.options.ticks.mirror) {\n            return;\n        }\n        const chart = this.chart;\n        const position = this.options.position;\n        if (position === 'left' || position === 'right') {\n            return {\n                top: 0,\n                left: this.left,\n                bottom: chart.height,\n                right: this.right\n            };\n        }\n        if (position === 'top' || position === 'bottom') {\n            return {\n                top: this.top,\n                left: 0,\n                bottom: this.bottom,\n                right: chart.width\n            };\n        }\n    }\n drawBackground() {\n        const { ctx , options: { backgroundColor  } , left , top , width , height  } = this;\n        if (backgroundColor) {\n            ctx.save();\n            ctx.fillStyle = backgroundColor;\n            ctx.fillRect(left, top, width, height);\n            ctx.restore();\n        }\n    }\n    getLineWidthForValue(value) {\n        const grid = this.options.grid;\n        if (!this._isVisible() || !grid.display) {\n            return 0;\n        }\n        const ticks = this.ticks;\n        const index = ticks.findIndex((t)=>t.value === value);\n        if (index >= 0) {\n            const opts = grid.setContext(this.getContext(index));\n            return opts.lineWidth;\n        }\n        return 0;\n    }\n drawGrid(chartArea) {\n        const grid = this.options.grid;\n        const ctx = this.ctx;\n        const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n        let i, ilen;\n        const drawLine = (p1, p2, style)=>{\n            if (!style.width || !style.color) {\n                return;\n            }\n            ctx.save();\n            ctx.lineWidth = style.width;\n            ctx.strokeStyle = style.color;\n            ctx.setLineDash(style.borderDash || []);\n            ctx.lineDashOffset = style.borderDashOffset;\n            ctx.beginPath();\n            ctx.moveTo(p1.x, p1.y);\n            ctx.lineTo(p2.x, p2.y);\n            ctx.stroke();\n            ctx.restore();\n        };\n        if (grid.display) {\n            for(i = 0, ilen = items.length; i < ilen; ++i){\n                const item = items[i];\n                if (grid.drawOnChartArea) {\n                    drawLine({\n                        x: item.x1,\n                        y: item.y1\n                    }, {\n                        x: item.x2,\n                        y: item.y2\n                    }, item);\n                }\n                if (grid.drawTicks) {\n                    drawLine({\n                        x: item.tx1,\n                        y: item.ty1\n                    }, {\n                        x: item.tx2,\n                        y: item.ty2\n                    }, {\n                        color: item.tickColor,\n                        width: item.tickWidth,\n                        borderDash: item.tickBorderDash,\n                        borderDashOffset: item.tickBorderDashOffset\n                    });\n                }\n            }\n        }\n    }\n drawBorder() {\n        const { chart , ctx , options: { border , grid  }  } = this;\n        const borderOpts = border.setContext(this.getContext());\n        const axisWidth = border.display ? borderOpts.width : 0;\n        if (!axisWidth) {\n            return;\n        }\n        const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n        const borderValue = this._borderValue;\n        let x1, x2, y1, y2;\n        if (this.isHorizontal()) {\n            x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n            x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n            y1 = y2 = borderValue;\n        } else {\n            y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n            y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n            x1 = x2 = borderValue;\n        }\n        ctx.save();\n        ctx.lineWidth = borderOpts.width;\n        ctx.strokeStyle = borderOpts.color;\n        ctx.beginPath();\n        ctx.moveTo(x1, y1);\n        ctx.lineTo(x2, y2);\n        ctx.stroke();\n        ctx.restore();\n    }\n drawLabels(chartArea) {\n        const optionTicks = this.options.ticks;\n        if (!optionTicks.display) {\n            return;\n        }\n        const ctx = this.ctx;\n        const area = this._computeLabelArea();\n        if (area) {\n            clipArea(ctx, area);\n        }\n        const items = this.getLabelItems(chartArea);\n        for (const item of items){\n            const renderTextOptions = item.options;\n            const tickFont = item.font;\n            const label = item.label;\n            const y = item.textOffset;\n            renderText(ctx, label, 0, y, tickFont, renderTextOptions);\n        }\n        if (area) {\n            unclipArea(ctx);\n        }\n    }\n drawTitle() {\n        const { ctx , options: { position , title , reverse  }  } = this;\n        if (!title.display) {\n            return;\n        }\n        const font = toFont(title.font);\n        const padding = toPadding(title.padding);\n        const align = title.align;\n        let offset = font.lineHeight / 2;\n        if (position === 'bottom' || position === 'center' || isObject(position)) {\n            offset += padding.bottom;\n            if (isArray(title.text)) {\n                offset += font.lineHeight * (title.text.length - 1);\n            }\n        } else {\n            offset += padding.top;\n        }\n        const { titleX , titleY , maxWidth , rotation  } = titleArgs(this, offset, position, align);\n        renderText(ctx, title.text, 0, 0, font, {\n            color: title.color,\n            maxWidth,\n            rotation,\n            textAlign: titleAlign(align, position, reverse),\n            textBaseline: 'middle',\n            translation: [\n                titleX,\n                titleY\n            ]\n        });\n    }\n    draw(chartArea) {\n        if (!this._isVisible()) {\n            return;\n        }\n        this.drawBackground();\n        this.drawGrid(chartArea);\n        this.drawBorder();\n        this.drawTitle();\n        this.drawLabels(chartArea);\n    }\n _layers() {\n        const opts = this.options;\n        const tz = opts.ticks && opts.ticks.z || 0;\n        const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n        const bz = valueOrDefault(opts.border && opts.border.z, 0);\n        if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n            return [\n                {\n                    z: tz,\n                    draw: (chartArea)=>{\n                        this.draw(chartArea);\n                    }\n                }\n            ];\n        }\n        return [\n            {\n                z: gz,\n                draw: (chartArea)=>{\n                    this.drawBackground();\n                    this.drawGrid(chartArea);\n                    this.drawTitle();\n                }\n            },\n            {\n                z: bz,\n                draw: ()=>{\n                    this.drawBorder();\n                }\n            },\n            {\n                z: tz,\n                draw: (chartArea)=>{\n                    this.drawLabels(chartArea);\n                }\n            }\n        ];\n    }\n getMatchingVisibleMetas(type) {\n        const metas = this.chart.getSortedVisibleDatasetMetas();\n        const axisID = this.axis + 'AxisID';\n        const result = [];\n        let i, ilen;\n        for(i = 0, ilen = metas.length; i < ilen; ++i){\n            const meta = metas[i];\n            if (meta[axisID] === this.id && (!type || meta.type === type)) {\n                result.push(meta);\n            }\n        }\n        return result;\n    }\n _resolveTickFontOptions(index) {\n        const opts = this.options.ticks.setContext(this.getContext(index));\n        return toFont(opts.font);\n    }\n _maxDigits() {\n        const fontSize = this._resolveTickFontOptions(0).lineHeight;\n        return (this.isHorizontal() ? this.width : this.height) / fontSize;\n    }\n}\n\nclass TypedRegistry {\n    constructor(type, scope, override){\n        this.type = type;\n        this.scope = scope;\n        this.override = override;\n        this.items = Object.create(null);\n    }\n    isForType(type) {\n        return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n    }\n register(item) {\n        const proto = Object.getPrototypeOf(item);\n        let parentScope;\n        if (isIChartComponent(proto)) {\n            parentScope = this.register(proto);\n        }\n        const items = this.items;\n        const id = item.id;\n        const scope = this.scope + '.' + id;\n        if (!id) {\n            throw new Error('class does not have id: ' + item);\n        }\n        if (id in items) {\n            return scope;\n        }\n        items[id] = item;\n        registerDefaults(item, scope, parentScope);\n        if (this.override) {\n            defaults.override(item.id, item.overrides);\n        }\n        return scope;\n    }\n get(id) {\n        return this.items[id];\n    }\n unregister(item) {\n        const items = this.items;\n        const id = item.id;\n        const scope = this.scope;\n        if (id in items) {\n            delete items[id];\n        }\n        if (scope && id in defaults[scope]) {\n            delete defaults[scope][id];\n            if (this.override) {\n                delete overrides[id];\n            }\n        }\n    }\n}\nfunction registerDefaults(item, scope, parentScope) {\n    const itemDefaults = merge(Object.create(null), [\n        parentScope ? defaults.get(parentScope) : {},\n        defaults.get(scope),\n        item.defaults\n    ]);\n    defaults.set(scope, itemDefaults);\n    if (item.defaultRoutes) {\n        routeDefaults(scope, item.defaultRoutes);\n    }\n    if (item.descriptors) {\n        defaults.describe(scope, item.descriptors);\n    }\n}\nfunction routeDefaults(scope, routes) {\n    Object.keys(routes).forEach((property)=>{\n        const propertyParts = property.split('.');\n        const sourceName = propertyParts.pop();\n        const sourceScope = [\n            scope\n        ].concat(propertyParts).join('.');\n        const parts = routes[property].split('.');\n        const targetName = parts.pop();\n        const targetScope = parts.join('.');\n        defaults.route(sourceScope, sourceName, targetScope, targetName);\n    });\n}\nfunction isIChartComponent(proto) {\n    return 'id' in proto && 'defaults' in proto;\n}\n\nclass Registry {\n    constructor(){\n        this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n        this.elements = new TypedRegistry(Element, 'elements');\n        this.plugins = new TypedRegistry(Object, 'plugins');\n        this.scales = new TypedRegistry(Scale, 'scales');\n        this._typedRegistries = [\n            this.controllers,\n            this.scales,\n            this.elements\n        ];\n    }\n add(...args) {\n        this._each('register', args);\n    }\n    remove(...args) {\n        this._each('unregister', args);\n    }\n addControllers(...args) {\n        this._each('register', args, this.controllers);\n    }\n addElements(...args) {\n        this._each('register', args, this.elements);\n    }\n addPlugins(...args) {\n        this._each('register', args, this.plugins);\n    }\n addScales(...args) {\n        this._each('register', args, this.scales);\n    }\n getController(id) {\n        return this._get(id, this.controllers, 'controller');\n    }\n getElement(id) {\n        return this._get(id, this.elements, 'element');\n    }\n getPlugin(id) {\n        return this._get(id, this.plugins, 'plugin');\n    }\n getScale(id) {\n        return this._get(id, this.scales, 'scale');\n    }\n removeControllers(...args) {\n        this._each('unregister', args, this.controllers);\n    }\n removeElements(...args) {\n        this._each('unregister', args, this.elements);\n    }\n removePlugins(...args) {\n        this._each('unregister', args, this.plugins);\n    }\n removeScales(...args) {\n        this._each('unregister', args, this.scales);\n    }\n _each(method, args, typedRegistry) {\n        [\n            ...args\n        ].forEach((arg)=>{\n            const reg = typedRegistry || this._getRegistryForType(arg);\n            if (typedRegistry || reg.isForType(arg) || reg === this.plugins && arg.id) {\n                this._exec(method, reg, arg);\n            } else {\n                each(arg, (item)=>{\n                    const itemReg = typedRegistry || this._getRegistryForType(item);\n                    this._exec(method, itemReg, item);\n                });\n            }\n        });\n    }\n _exec(method, registry, component) {\n        const camelMethod = _capitalize(method);\n        callback(component['before' + camelMethod], [], component);\n        registry[method](component);\n        callback(component['after' + camelMethod], [], component);\n    }\n _getRegistryForType(type) {\n        for(let i = 0; i < this._typedRegistries.length; i++){\n            const reg = this._typedRegistries[i];\n            if (reg.isForType(type)) {\n                return reg;\n            }\n        }\n        return this.plugins;\n    }\n _get(id, typedRegistry, type) {\n        const item = typedRegistry.get(id);\n        if (item === undefined) {\n            throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n        }\n        return item;\n    }\n}\nvar registry = /* #__PURE__ */ new Registry();\n\nclass PluginService {\n    constructor(){\n        this._init = [];\n    }\n notify(chart, hook, args, filter) {\n        if (hook === 'beforeInit') {\n            this._init = this._createDescriptors(chart, true);\n            this._notify(this._init, chart, 'install');\n        }\n        const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n        const result = this._notify(descriptors, chart, hook, args);\n        if (hook === 'afterDestroy') {\n            this._notify(descriptors, chart, 'stop');\n            this._notify(this._init, chart, 'uninstall');\n        }\n        return result;\n    }\n _notify(descriptors, chart, hook, args) {\n        args = args || {};\n        for (const descriptor of descriptors){\n            const plugin = descriptor.plugin;\n            const method = plugin[hook];\n            const params = [\n                chart,\n                args,\n                descriptor.options\n            ];\n            if (callback(method, params, plugin) === false && args.cancelable) {\n                return false;\n            }\n        }\n        return true;\n    }\n    invalidate() {\n        if (!isNullOrUndef(this._cache)) {\n            this._oldCache = this._cache;\n            this._cache = undefined;\n        }\n    }\n _descriptors(chart) {\n        if (this._cache) {\n            return this._cache;\n        }\n        const descriptors = this._cache = this._createDescriptors(chart);\n        this._notifyStateChanges(chart);\n        return descriptors;\n    }\n    _createDescriptors(chart, all) {\n        const config = chart && chart.config;\n        const options = valueOrDefault(config.options && config.options.plugins, {});\n        const plugins = allPlugins(config);\n        return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n    }\n _notifyStateChanges(chart) {\n        const previousDescriptors = this._oldCache || [];\n        const descriptors = this._cache;\n        const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.plugin.id === y.plugin.id));\n        this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n        this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n    }\n}\n function allPlugins(config) {\n    const localIds = {};\n    const plugins = [];\n    const keys = Object.keys(registry.plugins.items);\n    for(let i = 0; i < keys.length; i++){\n        plugins.push(registry.getPlugin(keys[i]));\n    }\n    const local = config.plugins || [];\n    for(let i = 0; i < local.length; i++){\n        const plugin = local[i];\n        if (plugins.indexOf(plugin) === -1) {\n            plugins.push(plugin);\n            localIds[plugin.id] = true;\n        }\n    }\n    return {\n        plugins,\n        localIds\n    };\n}\nfunction getOpts(options, all) {\n    if (!all && options === false) {\n        return null;\n    }\n    if (options === true) {\n        return {};\n    }\n    return options;\n}\nfunction createDescriptors(chart, { plugins , localIds  }, options, all) {\n    const result = [];\n    const context = chart.getContext();\n    for (const plugin of plugins){\n        const id = plugin.id;\n        const opts = getOpts(options[id], all);\n        if (opts === null) {\n            continue;\n        }\n        result.push({\n            plugin,\n            options: pluginOpts(chart.config, {\n                plugin,\n                local: localIds[id]\n            }, opts, context)\n        });\n    }\n    return result;\n}\nfunction pluginOpts(config, { plugin , local  }, opts, context) {\n    const keys = config.pluginScopeKeys(plugin);\n    const scopes = config.getOptionScopes(opts, keys);\n    if (local && plugin.defaults) {\n        scopes.push(plugin.defaults);\n    }\n    return config.createResolver(scopes, context, [\n        ''\n    ], {\n        scriptable: false,\n        indexable: false,\n        allKeys: true\n    });\n}\n\nfunction getIndexAxis(type, options) {\n    const datasetDefaults = defaults.datasets[type] || {};\n    const datasetOptions = (options.datasets || {})[type] || {};\n    return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n    let axis = id;\n    if (id === '_index_') {\n        axis = indexAxis;\n    } else if (id === '_value_') {\n        axis = indexAxis === 'x' ? 'y' : 'x';\n    }\n    return axis;\n}\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n    return axis === indexAxis ? '_index_' : '_value_';\n}\nfunction idMatchesAxis(id) {\n    if (id === 'x' || id === 'y' || id === 'r') {\n        return id;\n    }\n}\nfunction axisFromPosition(position) {\n    if (position === 'top' || position === 'bottom') {\n        return 'x';\n    }\n    if (position === 'left' || position === 'right') {\n        return 'y';\n    }\n}\nfunction determineAxis(id, ...scaleOptions) {\n    if (idMatchesAxis(id)) {\n        return id;\n    }\n    for (const opts of scaleOptions){\n        const axis = opts.axis || axisFromPosition(opts.position) || id.length > 1 && idMatchesAxis(id[0].toLowerCase());\n        if (axis) {\n            return axis;\n        }\n    }\n    throw new Error(`Cannot determine type of '${id}' axis. Please provide 'axis' or 'position' option.`);\n}\nfunction getAxisFromDataset(id, axis, dataset) {\n    if (dataset[axis + 'AxisID'] === id) {\n        return {\n            axis\n        };\n    }\n}\nfunction retrieveAxisFromDatasets(id, config) {\n    if (config.data && config.data.datasets) {\n        const boundDs = config.data.datasets.filter((d)=>d.xAxisID === id || d.yAxisID === id);\n        if (boundDs.length) {\n            return getAxisFromDataset(id, 'x', boundDs[0]) || getAxisFromDataset(id, 'y', boundDs[0]);\n        }\n    }\n    return {};\n}\nfunction mergeScaleConfig(config, options) {\n    const chartDefaults = overrides[config.type] || {\n        scales: {}\n    };\n    const configScales = options.scales || {};\n    const chartIndexAxis = getIndexAxis(config.type, options);\n    const scales = Object.create(null);\n    Object.keys(configScales).forEach((id)=>{\n        const scaleConf = configScales[id];\n        if (!isObject(scaleConf)) {\n            return console.error(`Invalid scale configuration for scale: ${id}`);\n        }\n        if (scaleConf._proxy) {\n            return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n        }\n        const axis = determineAxis(id, scaleConf, retrieveAxisFromDatasets(id, config), defaults.scales[scaleConf.type]);\n        const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n        const defaultScaleOptions = chartDefaults.scales || {};\n        scales[id] = mergeIf(Object.create(null), [\n            {\n                axis\n            },\n            scaleConf,\n            defaultScaleOptions[axis],\n            defaultScaleOptions[defaultId]\n        ]);\n    });\n    config.data.datasets.forEach((dataset)=>{\n        const type = dataset.type || config.type;\n        const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n        const datasetDefaults = overrides[type] || {};\n        const defaultScaleOptions = datasetDefaults.scales || {};\n        Object.keys(defaultScaleOptions).forEach((defaultID)=>{\n            const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n            const id = dataset[axis + 'AxisID'] || axis;\n            scales[id] = scales[id] || Object.create(null);\n            mergeIf(scales[id], [\n                {\n                    axis\n                },\n                configScales[id],\n                defaultScaleOptions[defaultID]\n            ]);\n        });\n    });\n    Object.keys(scales).forEach((key)=>{\n        const scale = scales[key];\n        mergeIf(scale, [\n            defaults.scales[scale.type],\n            defaults.scale\n        ]);\n    });\n    return scales;\n}\nfunction initOptions(config) {\n    const options = config.options || (config.options = {});\n    options.plugins = valueOrDefault(options.plugins, {});\n    options.scales = mergeScaleConfig(config, options);\n}\nfunction initData(data) {\n    data = data || {};\n    data.datasets = data.datasets || [];\n    data.labels = data.labels || [];\n    return data;\n}\nfunction initConfig(config) {\n    config = config || {};\n    config.data = initData(config.data);\n    initOptions(config);\n    return config;\n}\nconst keyCache = new Map();\nconst keysCached = new Set();\nfunction cachedKeys(cacheKey, generate) {\n    let keys = keyCache.get(cacheKey);\n    if (!keys) {\n        keys = generate();\n        keyCache.set(cacheKey, keys);\n        keysCached.add(keys);\n    }\n    return keys;\n}\nconst addIfFound = (set, obj, key)=>{\n    const opts = resolveObjectKey(obj, key);\n    if (opts !== undefined) {\n        set.add(opts);\n    }\n};\nclass Config {\n    constructor(config){\n        this._config = initConfig(config);\n        this._scopeCache = new Map();\n        this._resolverCache = new Map();\n    }\n    get platform() {\n        return this._config.platform;\n    }\n    get type() {\n        return this._config.type;\n    }\n    set type(type) {\n        this._config.type = type;\n    }\n    get data() {\n        return this._config.data;\n    }\n    set data(data) {\n        this._config.data = initData(data);\n    }\n    get options() {\n        return this._config.options;\n    }\n    set options(options) {\n        this._config.options = options;\n    }\n    get plugins() {\n        return this._config.plugins;\n    }\n    update() {\n        const config = this._config;\n        this.clearCache();\n        initOptions(config);\n    }\n    clearCache() {\n        this._scopeCache.clear();\n        this._resolverCache.clear();\n    }\n datasetScopeKeys(datasetType) {\n        return cachedKeys(datasetType, ()=>[\n                [\n                    `datasets.${datasetType}`,\n                    ''\n                ]\n            ]);\n    }\n datasetAnimationScopeKeys(datasetType, transition) {\n        return cachedKeys(`${datasetType}.transition.${transition}`, ()=>[\n                [\n                    `datasets.${datasetType}.transitions.${transition}`,\n                    `transitions.${transition}`\n                ],\n                [\n                    `datasets.${datasetType}`,\n                    ''\n                ]\n            ]);\n    }\n datasetElementScopeKeys(datasetType, elementType) {\n        return cachedKeys(`${datasetType}-${elementType}`, ()=>[\n                [\n                    `datasets.${datasetType}.elements.${elementType}`,\n                    `datasets.${datasetType}`,\n                    `elements.${elementType}`,\n                    ''\n                ]\n            ]);\n    }\n pluginScopeKeys(plugin) {\n        const id = plugin.id;\n        const type = this.type;\n        return cachedKeys(`${type}-plugin-${id}`, ()=>[\n                [\n                    `plugins.${id}`,\n                    ...plugin.additionalOptionScopes || []\n                ]\n            ]);\n    }\n _cachedScopes(mainScope, resetCache) {\n        const _scopeCache = this._scopeCache;\n        let cache = _scopeCache.get(mainScope);\n        if (!cache || resetCache) {\n            cache = new Map();\n            _scopeCache.set(mainScope, cache);\n        }\n        return cache;\n    }\n getOptionScopes(mainScope, keyLists, resetCache) {\n        const { options , type  } = this;\n        const cache = this._cachedScopes(mainScope, resetCache);\n        const cached = cache.get(keyLists);\n        if (cached) {\n            return cached;\n        }\n        const scopes = new Set();\n        keyLists.forEach((keys)=>{\n            if (mainScope) {\n                scopes.add(mainScope);\n                keys.forEach((key)=>addIfFound(scopes, mainScope, key));\n            }\n            keys.forEach((key)=>addIfFound(scopes, options, key));\n            keys.forEach((key)=>addIfFound(scopes, overrides[type] || {}, key));\n            keys.forEach((key)=>addIfFound(scopes, defaults, key));\n            keys.forEach((key)=>addIfFound(scopes, descriptors, key));\n        });\n        const array = Array.from(scopes);\n        if (array.length === 0) {\n            array.push(Object.create(null));\n        }\n        if (keysCached.has(keyLists)) {\n            cache.set(keyLists, array);\n        }\n        return array;\n    }\n chartOptionScopes() {\n        const { options , type  } = this;\n        return [\n            options,\n            overrides[type] || {},\n            defaults.datasets[type] || {},\n            {\n                type\n            },\n            defaults,\n            descriptors\n        ];\n    }\n resolveNamedOptions(scopes, names, context, prefixes = [\n        ''\n    ]) {\n        const result = {\n            $shared: true\n        };\n        const { resolver , subPrefixes  } = getResolver(this._resolverCache, scopes, prefixes);\n        let options = resolver;\n        if (needContext(resolver, names)) {\n            result.$shared = false;\n            context = isFunction(context) ? context() : context;\n            const subResolver = this.createResolver(scopes, context, subPrefixes);\n            options = _attachContext(resolver, context, subResolver);\n        }\n        for (const prop of names){\n            result[prop] = options[prop];\n        }\n        return result;\n    }\n createResolver(scopes, context, prefixes = [\n        ''\n    ], descriptorDefaults) {\n        const { resolver  } = getResolver(this._resolverCache, scopes, prefixes);\n        return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;\n    }\n}\nfunction getResolver(resolverCache, scopes, prefixes) {\n    let cache = resolverCache.get(scopes);\n    if (!cache) {\n        cache = new Map();\n        resolverCache.set(scopes, cache);\n    }\n    const cacheKey = prefixes.join();\n    let cached = cache.get(cacheKey);\n    if (!cached) {\n        const resolver = _createResolver(scopes, prefixes);\n        cached = {\n            resolver,\n            subPrefixes: prefixes.filter((p)=>!p.toLowerCase().includes('hover'))\n        };\n        cache.set(cacheKey, cached);\n    }\n    return cached;\n}\nconst hasFunction = (value)=>isObject(value) && Object.getOwnPropertyNames(value).some((key)=>isFunction(value[key]));\nfunction needContext(proxy, names) {\n    const { isScriptable , isIndexable  } = _descriptors(proxy);\n    for (const prop of names){\n        const scriptable = isScriptable(prop);\n        const indexable = isIndexable(prop);\n        const value = (indexable || scriptable) && proxy[prop];\n        if (scriptable && (isFunction(value) || hasFunction(value)) || indexable && isArray(value)) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvar version = \"4.4.6\";\n\nconst KNOWN_POSITIONS = [\n    'top',\n    'bottom',\n    'left',\n    'right',\n    'chartArea'\n];\nfunction positionIsHorizontal(position, axis) {\n    return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';\n}\nfunction compare2Level(l1, l2) {\n    return function(a, b) {\n        return a[l1] === b[l1] ? a[l2] - b[l2] : a[l1] - b[l1];\n    };\n}\nfunction onAnimationsComplete(context) {\n    const chart = context.chart;\n    const animationOptions = chart.options.animation;\n    chart.notifyPlugins('afterRender');\n    callback(animationOptions && animationOptions.onComplete, [\n        context\n    ], chart);\n}\nfunction onAnimationProgress(context) {\n    const chart = context.chart;\n    const animationOptions = chart.options.animation;\n    callback(animationOptions && animationOptions.onProgress, [\n        context\n    ], chart);\n}\n function getCanvas(item) {\n    if (_isDomSupported() && typeof item === 'string') {\n        item = document.getElementById(item);\n    } else if (item && item.length) {\n        item = item[0];\n    }\n    if (item && item.canvas) {\n        item = item.canvas;\n    }\n    return item;\n}\nconst instances = {};\nconst getChart = (key)=>{\n    const canvas = getCanvas(key);\n    return Object.values(instances).filter((c)=>c.canvas === canvas).pop();\n};\nfunction moveNumericKeys(obj, start, move) {\n    const keys = Object.keys(obj);\n    for (const key of keys){\n        const intKey = +key;\n        if (intKey >= start) {\n            const value = obj[key];\n            delete obj[key];\n            if (move > 0 || intKey > start) {\n                obj[intKey + move] = value;\n            }\n        }\n    }\n}\n function determineLastEvent(e, lastEvent, inChartArea, isClick) {\n    if (!inChartArea || e.type === 'mouseout') {\n        return null;\n    }\n    if (isClick) {\n        return lastEvent;\n    }\n    return e;\n}\nfunction getSizeForArea(scale, chartArea, field) {\n    return scale.options.clip ? scale[field] : chartArea[field];\n}\nfunction getDatasetArea(meta, chartArea) {\n    const { xScale , yScale  } = meta;\n    if (xScale && yScale) {\n        return {\n            left: getSizeForArea(xScale, chartArea, 'left'),\n            right: getSizeForArea(xScale, chartArea, 'right'),\n            top: getSizeForArea(yScale, chartArea, 'top'),\n            bottom: getSizeForArea(yScale, chartArea, 'bottom')\n        };\n    }\n    return chartArea;\n}\nclass Chart {\n    static defaults = defaults;\n    static instances = instances;\n    static overrides = overrides;\n    static registry = registry;\n    static version = version;\n    static getChart = getChart;\n    static register(...items) {\n        registry.add(...items);\n        invalidatePlugins();\n    }\n    static unregister(...items) {\n        registry.remove(...items);\n        invalidatePlugins();\n    }\n    constructor(item, userConfig){\n        const config = this.config = new Config(userConfig);\n        const initialCanvas = getCanvas(item);\n        const existingChart = getChart(initialCanvas);\n        if (existingChart) {\n            throw new Error('Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' + ' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.');\n        }\n        const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n        this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n        this.platform.updateConfig(config);\n        const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n        const canvas = context && context.canvas;\n        const height = canvas && canvas.height;\n        const width = canvas && canvas.width;\n        this.id = uid();\n        this.ctx = context;\n        this.canvas = canvas;\n        this.width = width;\n        this.height = height;\n        this._options = options;\n        this._aspectRatio = this.aspectRatio;\n        this._layers = [];\n        this._metasets = [];\n        this._stacks = undefined;\n        this.boxes = [];\n        this.currentDevicePixelRatio = undefined;\n        this.chartArea = undefined;\n        this._active = [];\n        this._lastEvent = undefined;\n        this._listeners = {};\n         this._responsiveListeners = undefined;\n        this._sortedMetasets = [];\n        this.scales = {};\n        this._plugins = new PluginService();\n        this.$proxies = {};\n        this._hiddenIndices = {};\n        this.attached = false;\n        this._animationsDisabled = undefined;\n        this.$context = undefined;\n        this._doResize = debounce((mode)=>this.update(mode), options.resizeDelay || 0);\n        this._dataChanges = [];\n        instances[this.id] = this;\n        if (!context || !canvas) {\n            console.error(\"Failed to create chart: can't acquire context from the given item\");\n            return;\n        }\n        animator.listen(this, 'complete', onAnimationsComplete);\n        animator.listen(this, 'progress', onAnimationProgress);\n        this._initialize();\n        if (this.attached) {\n            this.update();\n        }\n    }\n    get aspectRatio() {\n        const { options: { aspectRatio , maintainAspectRatio  } , width , height , _aspectRatio  } = this;\n        if (!isNullOrUndef(aspectRatio)) {\n            return aspectRatio;\n        }\n        if (maintainAspectRatio && _aspectRatio) {\n            return _aspectRatio;\n        }\n        return height ? width / height : null;\n    }\n    get data() {\n        return this.config.data;\n    }\n    set data(data) {\n        this.config.data = data;\n    }\n    get options() {\n        return this._options;\n    }\n    set options(options) {\n        this.config.options = options;\n    }\n    get registry() {\n        return registry;\n    }\n _initialize() {\n        this.notifyPlugins('beforeInit');\n        if (this.options.responsive) {\n            this.resize();\n        } else {\n            retinaScale(this, this.options.devicePixelRatio);\n        }\n        this.bindEvents();\n        this.notifyPlugins('afterInit');\n        return this;\n    }\n    clear() {\n        clearCanvas(this.canvas, this.ctx);\n        return this;\n    }\n    stop() {\n        animator.stop(this);\n        return this;\n    }\n resize(width, height) {\n        if (!animator.running(this)) {\n            this._resize(width, height);\n        } else {\n            this._resizeBeforeDraw = {\n                width,\n                height\n            };\n        }\n    }\n    _resize(width, height) {\n        const options = this.options;\n        const canvas = this.canvas;\n        const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n        const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n        const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n        const mode = this.width ? 'resize' : 'attach';\n        this.width = newSize.width;\n        this.height = newSize.height;\n        this._aspectRatio = this.aspectRatio;\n        if (!retinaScale(this, newRatio, true)) {\n            return;\n        }\n        this.notifyPlugins('resize', {\n            size: newSize\n        });\n        callback(options.onResize, [\n            this,\n            newSize\n        ], this);\n        if (this.attached) {\n            if (this._doResize(mode)) {\n                this.render();\n            }\n        }\n    }\n    ensureScalesHaveIDs() {\n        const options = this.options;\n        const scalesOptions = options.scales || {};\n        each(scalesOptions, (axisOptions, axisID)=>{\n            axisOptions.id = axisID;\n        });\n    }\n buildOrUpdateScales() {\n        const options = this.options;\n        const scaleOpts = options.scales;\n        const scales = this.scales;\n        const updated = Object.keys(scales).reduce((obj, id)=>{\n            obj[id] = false;\n            return obj;\n        }, {});\n        let items = [];\n        if (scaleOpts) {\n            items = items.concat(Object.keys(scaleOpts).map((id)=>{\n                const scaleOptions = scaleOpts[id];\n                const axis = determineAxis(id, scaleOptions);\n                const isRadial = axis === 'r';\n                const isHorizontal = axis === 'x';\n                return {\n                    options: scaleOptions,\n                    dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n                    dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n                };\n            }));\n        }\n        each(items, (item)=>{\n            const scaleOptions = item.options;\n            const id = scaleOptions.id;\n            const axis = determineAxis(id, scaleOptions);\n            const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n            if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n                scaleOptions.position = item.dposition;\n            }\n            updated[id] = true;\n            let scale = null;\n            if (id in scales && scales[id].type === scaleType) {\n                scale = scales[id];\n            } else {\n                const scaleClass = registry.getScale(scaleType);\n                scale = new scaleClass({\n                    id,\n                    type: scaleType,\n                    ctx: this.ctx,\n                    chart: this\n                });\n                scales[scale.id] = scale;\n            }\n            scale.init(scaleOptions, options);\n        });\n        each(updated, (hasUpdated, id)=>{\n            if (!hasUpdated) {\n                delete scales[id];\n            }\n        });\n        each(scales, (scale)=>{\n            layouts.configure(this, scale, scale.options);\n            layouts.addBox(this, scale);\n        });\n    }\n _updateMetasets() {\n        const metasets = this._metasets;\n        const numData = this.data.datasets.length;\n        const numMeta = metasets.length;\n        metasets.sort((a, b)=>a.index - b.index);\n        if (numMeta > numData) {\n            for(let i = numData; i < numMeta; ++i){\n                this._destroyDatasetMeta(i);\n            }\n            metasets.splice(numData, numMeta - numData);\n        }\n        this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n    }\n _removeUnreferencedMetasets() {\n        const { _metasets: metasets , data: { datasets  }  } = this;\n        if (metasets.length > datasets.length) {\n            delete this._stacks;\n        }\n        metasets.forEach((meta, index)=>{\n            if (datasets.filter((x)=>x === meta._dataset).length === 0) {\n                this._destroyDatasetMeta(index);\n            }\n        });\n    }\n    buildOrUpdateControllers() {\n        const newControllers = [];\n        const datasets = this.data.datasets;\n        let i, ilen;\n        this._removeUnreferencedMetasets();\n        for(i = 0, ilen = datasets.length; i < ilen; i++){\n            const dataset = datasets[i];\n            let meta = this.getDatasetMeta(i);\n            const type = dataset.type || this.config.type;\n            if (meta.type && meta.type !== type) {\n                this._destroyDatasetMeta(i);\n                meta = this.getDatasetMeta(i);\n            }\n            meta.type = type;\n            meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n            meta.order = dataset.order || 0;\n            meta.index = i;\n            meta.label = '' + dataset.label;\n            meta.visible = this.isDatasetVisible(i);\n            if (meta.controller) {\n                meta.controller.updateIndex(i);\n                meta.controller.linkScales();\n            } else {\n                const ControllerClass = registry.getController(type);\n                const { datasetElementType , dataElementType  } = defaults.datasets[type];\n                Object.assign(ControllerClass, {\n                    dataElementType: registry.getElement(dataElementType),\n                    datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n                });\n                meta.controller = new ControllerClass(this, i);\n                newControllers.push(meta.controller);\n            }\n        }\n        this._updateMetasets();\n        return newControllers;\n    }\n _resetElements() {\n        each(this.data.datasets, (dataset, datasetIndex)=>{\n            this.getDatasetMeta(datasetIndex).controller.reset();\n        }, this);\n    }\n reset() {\n        this._resetElements();\n        this.notifyPlugins('reset');\n    }\n    update(mode) {\n        const config = this.config;\n        config.update();\n        const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n        const animsDisabled = this._animationsDisabled = !options.animation;\n        this._updateScales();\n        this._checkEventBindings();\n        this._updateHiddenIndices();\n        this._plugins.invalidate();\n        if (this.notifyPlugins('beforeUpdate', {\n            mode,\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        const newControllers = this.buildOrUpdateControllers();\n        this.notifyPlugins('beforeElementsUpdate');\n        let minPadding = 0;\n        for(let i = 0, ilen = this.data.datasets.length; i < ilen; i++){\n            const { controller  } = this.getDatasetMeta(i);\n            const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n            controller.buildOrUpdateElements(reset);\n            minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n        }\n        minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n        this._updateLayout(minPadding);\n        if (!animsDisabled) {\n            each(newControllers, (controller)=>{\n                controller.reset();\n            });\n        }\n        this._updateDatasets(mode);\n        this.notifyPlugins('afterUpdate', {\n            mode\n        });\n        this._layers.sort(compare2Level('z', '_idx'));\n        const { _active , _lastEvent  } = this;\n        if (_lastEvent) {\n            this._eventHandler(_lastEvent, true);\n        } else if (_active.length) {\n            this._updateHoverStyles(_active, _active, true);\n        }\n        this.render();\n    }\n _updateScales() {\n        each(this.scales, (scale)=>{\n            layouts.removeBox(this, scale);\n        });\n        this.ensureScalesHaveIDs();\n        this.buildOrUpdateScales();\n    }\n _checkEventBindings() {\n        const options = this.options;\n        const existingEvents = new Set(Object.keys(this._listeners));\n        const newEvents = new Set(options.events);\n        if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n            this.unbindEvents();\n            this.bindEvents();\n        }\n    }\n _updateHiddenIndices() {\n        const { _hiddenIndices  } = this;\n        const changes = this._getUniformDataChanges() || [];\n        for (const { method , start , count  } of changes){\n            const move = method === '_removeElements' ? -count : count;\n            moveNumericKeys(_hiddenIndices, start, move);\n        }\n    }\n _getUniformDataChanges() {\n        const _dataChanges = this._dataChanges;\n        if (!_dataChanges || !_dataChanges.length) {\n            return;\n        }\n        this._dataChanges = [];\n        const datasetCount = this.data.datasets.length;\n        const makeSet = (idx)=>new Set(_dataChanges.filter((c)=>c[0] === idx).map((c, i)=>i + ',' + c.splice(1).join(',')));\n        const changeSet = makeSet(0);\n        for(let i = 1; i < datasetCount; i++){\n            if (!setsEqual(changeSet, makeSet(i))) {\n                return;\n            }\n        }\n        return Array.from(changeSet).map((c)=>c.split(',')).map((a)=>({\n                method: a[1],\n                start: +a[2],\n                count: +a[3]\n            }));\n    }\n _updateLayout(minPadding) {\n        if (this.notifyPlugins('beforeLayout', {\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        layouts.update(this, this.width, this.height, minPadding);\n        const area = this.chartArea;\n        const noArea = area.width <= 0 || area.height <= 0;\n        this._layers = [];\n        each(this.boxes, (box)=>{\n            if (noArea && box.position === 'chartArea') {\n                return;\n            }\n            if (box.configure) {\n                box.configure();\n            }\n            this._layers.push(...box._layers());\n        }, this);\n        this._layers.forEach((item, index)=>{\n            item._idx = index;\n        });\n        this.notifyPlugins('afterLayout');\n    }\n _updateDatasets(mode) {\n        if (this.notifyPlugins('beforeDatasetsUpdate', {\n            mode,\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        for(let i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n            this.getDatasetMeta(i).controller.configure();\n        }\n        for(let i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n            this._updateDataset(i, isFunction(mode) ? mode({\n                datasetIndex: i\n            }) : mode);\n        }\n        this.notifyPlugins('afterDatasetsUpdate', {\n            mode\n        });\n    }\n _updateDataset(index, mode) {\n        const meta = this.getDatasetMeta(index);\n        const args = {\n            meta,\n            index,\n            mode,\n            cancelable: true\n        };\n        if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n            return;\n        }\n        meta.controller._update(mode);\n        args.cancelable = false;\n        this.notifyPlugins('afterDatasetUpdate', args);\n    }\n    render() {\n        if (this.notifyPlugins('beforeRender', {\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        if (animator.has(this)) {\n            if (this.attached && !animator.running(this)) {\n                animator.start(this);\n            }\n        } else {\n            this.draw();\n            onAnimationsComplete({\n                chart: this\n            });\n        }\n    }\n    draw() {\n        let i;\n        if (this._resizeBeforeDraw) {\n            const { width , height  } = this._resizeBeforeDraw;\n            this._resizeBeforeDraw = null;\n            this._resize(width, height);\n        }\n        this.clear();\n        if (this.width <= 0 || this.height <= 0) {\n            return;\n        }\n        if (this.notifyPlugins('beforeDraw', {\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        const layers = this._layers;\n        for(i = 0; i < layers.length && layers[i].z <= 0; ++i){\n            layers[i].draw(this.chartArea);\n        }\n        this._drawDatasets();\n        for(; i < layers.length; ++i){\n            layers[i].draw(this.chartArea);\n        }\n        this.notifyPlugins('afterDraw');\n    }\n _getSortedDatasetMetas(filterVisible) {\n        const metasets = this._sortedMetasets;\n        const result = [];\n        let i, ilen;\n        for(i = 0, ilen = metasets.length; i < ilen; ++i){\n            const meta = metasets[i];\n            if (!filterVisible || meta.visible) {\n                result.push(meta);\n            }\n        }\n        return result;\n    }\n getSortedVisibleDatasetMetas() {\n        return this._getSortedDatasetMetas(true);\n    }\n _drawDatasets() {\n        if (this.notifyPlugins('beforeDatasetsDraw', {\n            cancelable: true\n        }) === false) {\n            return;\n        }\n        const metasets = this.getSortedVisibleDatasetMetas();\n        for(let i = metasets.length - 1; i >= 0; --i){\n            this._drawDataset(metasets[i]);\n        }\n        this.notifyPlugins('afterDatasetsDraw');\n    }\n _drawDataset(meta) {\n        const ctx = this.ctx;\n        const clip = meta._clip;\n        const useClip = !clip.disabled;\n        const area = getDatasetArea(meta, this.chartArea);\n        const args = {\n            meta,\n            index: meta.index,\n            cancelable: true\n        };\n        if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n            return;\n        }\n        if (useClip) {\n            clipArea(ctx, {\n                left: clip.left === false ? 0 : area.left - clip.left,\n                right: clip.right === false ? this.width : area.right + clip.right,\n                top: clip.top === false ? 0 : area.top - clip.top,\n                bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n            });\n        }\n        meta.controller.draw();\n        if (useClip) {\n            unclipArea(ctx);\n        }\n        args.cancelable = false;\n        this.notifyPlugins('afterDatasetDraw', args);\n    }\n isPointInArea(point) {\n        return _isPointInArea(point, this.chartArea, this._minPadding);\n    }\n    getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n        const method = Interaction.modes[mode];\n        if (typeof method === 'function') {\n            return method(this, e, options, useFinalPosition);\n        }\n        return [];\n    }\n    getDatasetMeta(datasetIndex) {\n        const dataset = this.data.datasets[datasetIndex];\n        const metasets = this._metasets;\n        let meta = metasets.filter((x)=>x && x._dataset === dataset).pop();\n        if (!meta) {\n            meta = {\n                type: null,\n                data: [],\n                dataset: null,\n                controller: null,\n                hidden: null,\n                xAxisID: null,\n                yAxisID: null,\n                order: dataset && dataset.order || 0,\n                index: datasetIndex,\n                _dataset: dataset,\n                _parsed: [],\n                _sorted: false\n            };\n            metasets.push(meta);\n        }\n        return meta;\n    }\n    getContext() {\n        return this.$context || (this.$context = createContext(null, {\n            chart: this,\n            type: 'chart'\n        }));\n    }\n    getVisibleDatasetCount() {\n        return this.getSortedVisibleDatasetMetas().length;\n    }\n    isDatasetVisible(datasetIndex) {\n        const dataset = this.data.datasets[datasetIndex];\n        if (!dataset) {\n            return false;\n        }\n        const meta = this.getDatasetMeta(datasetIndex);\n        return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n    }\n    setDatasetVisibility(datasetIndex, visible) {\n        const meta = this.getDatasetMeta(datasetIndex);\n        meta.hidden = !visible;\n    }\n    toggleDataVisibility(index) {\n        this._hiddenIndices[index] = !this._hiddenIndices[index];\n    }\n    getDataVisibility(index) {\n        return !this._hiddenIndices[index];\n    }\n _updateVisibility(datasetIndex, dataIndex, visible) {\n        const mode = visible ? 'show' : 'hide';\n        const meta = this.getDatasetMeta(datasetIndex);\n        const anims = meta.controller._resolveAnimations(undefined, mode);\n        if (defined(dataIndex)) {\n            meta.data[dataIndex].hidden = !visible;\n            this.update();\n        } else {\n            this.setDatasetVisibility(datasetIndex, visible);\n            anims.update(meta, {\n                visible\n            });\n            this.update((ctx)=>ctx.datasetIndex === datasetIndex ? mode : undefined);\n        }\n    }\n    hide(datasetIndex, dataIndex) {\n        this._updateVisibility(datasetIndex, dataIndex, false);\n    }\n    show(datasetIndex, dataIndex) {\n        this._updateVisibility(datasetIndex, dataIndex, true);\n    }\n _destroyDatasetMeta(datasetIndex) {\n        const meta = this._metasets[datasetIndex];\n        if (meta && meta.controller) {\n            meta.controller._destroy();\n        }\n        delete this._metasets[datasetIndex];\n    }\n    _stop() {\n        let i, ilen;\n        this.stop();\n        animator.remove(this);\n        for(i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n            this._destroyDatasetMeta(i);\n        }\n    }\n    destroy() {\n        this.notifyPlugins('beforeDestroy');\n        const { canvas , ctx  } = this;\n        this._stop();\n        this.config.clearCache();\n        if (canvas) {\n            this.unbindEvents();\n            clearCanvas(canvas, ctx);\n            this.platform.releaseContext(ctx);\n            this.canvas = null;\n            this.ctx = null;\n        }\n        delete instances[this.id];\n        this.notifyPlugins('afterDestroy');\n    }\n    toBase64Image(...args) {\n        return this.canvas.toDataURL(...args);\n    }\n bindEvents() {\n        this.bindUserEvents();\n        if (this.options.responsive) {\n            this.bindResponsiveEvents();\n        } else {\n            this.attached = true;\n        }\n    }\n bindUserEvents() {\n        const listeners = this._listeners;\n        const platform = this.platform;\n        const _add = (type, listener)=>{\n            platform.addEventListener(this, type, listener);\n            listeners[type] = listener;\n        };\n        const listener = (e, x, y)=>{\n            e.offsetX = x;\n            e.offsetY = y;\n            this._eventHandler(e);\n        };\n        each(this.options.events, (type)=>_add(type, listener));\n    }\n bindResponsiveEvents() {\n        if (!this._responsiveListeners) {\n            this._responsiveListeners = {};\n        }\n        const listeners = this._responsiveListeners;\n        const platform = this.platform;\n        const _add = (type, listener)=>{\n            platform.addEventListener(this, type, listener);\n            listeners[type] = listener;\n        };\n        const _remove = (type, listener)=>{\n            if (listeners[type]) {\n                platform.removeEventListener(this, type, listener);\n                delete listeners[type];\n            }\n        };\n        const listener = (width, height)=>{\n            if (this.canvas) {\n                this.resize(width, height);\n            }\n        };\n        let detached;\n        const attached = ()=>{\n            _remove('attach', attached);\n            this.attached = true;\n            this.resize();\n            _add('resize', listener);\n            _add('detach', detached);\n        };\n        detached = ()=>{\n            this.attached = false;\n            _remove('resize', listener);\n            this._stop();\n            this._resize(0, 0);\n            _add('attach', attached);\n        };\n        if (platform.isAttached(this.canvas)) {\n            attached();\n        } else {\n            detached();\n        }\n    }\n unbindEvents() {\n        each(this._listeners, (listener, type)=>{\n            this.platform.removeEventListener(this, type, listener);\n        });\n        this._listeners = {};\n        each(this._responsiveListeners, (listener, type)=>{\n            this.platform.removeEventListener(this, type, listener);\n        });\n        this._responsiveListeners = undefined;\n    }\n    updateHoverStyle(items, mode, enabled) {\n        const prefix = enabled ? 'set' : 'remove';\n        let meta, item, i, ilen;\n        if (mode === 'dataset') {\n            meta = this.getDatasetMeta(items[0].datasetIndex);\n            meta.controller['_' + prefix + 'DatasetHoverStyle']();\n        }\n        for(i = 0, ilen = items.length; i < ilen; ++i){\n            item = items[i];\n            const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n            if (controller) {\n                controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n            }\n        }\n    }\n getActiveElements() {\n        return this._active || [];\n    }\n setActiveElements(activeElements) {\n        const lastActive = this._active || [];\n        const active = activeElements.map(({ datasetIndex , index  })=>{\n            const meta = this.getDatasetMeta(datasetIndex);\n            if (!meta) {\n                throw new Error('No dataset found at index ' + datasetIndex);\n            }\n            return {\n                datasetIndex,\n                element: meta.data[index],\n                index\n            };\n        });\n        const changed = !_elementsEqual(active, lastActive);\n        if (changed) {\n            this._active = active;\n            this._lastEvent = null;\n            this._updateHoverStyles(active, lastActive);\n        }\n    }\n notifyPlugins(hook, args, filter) {\n        return this._plugins.notify(this, hook, args, filter);\n    }\n isPluginEnabled(pluginId) {\n        return this._plugins._cache.filter((p)=>p.plugin.id === pluginId).length === 1;\n    }\n _updateHoverStyles(active, lastActive, replay) {\n        const hoverOptions = this.options.hover;\n        const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.datasetIndex === y.datasetIndex && x.index === y.index));\n        const deactivated = diff(lastActive, active);\n        const activated = replay ? active : diff(active, lastActive);\n        if (deactivated.length) {\n            this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n        }\n        if (activated.length && hoverOptions.mode) {\n            this.updateHoverStyle(activated, hoverOptions.mode, true);\n        }\n    }\n _eventHandler(e, replay) {\n        const args = {\n            event: e,\n            replay,\n            cancelable: true,\n            inChartArea: this.isPointInArea(e)\n        };\n        const eventFilter = (plugin)=>(plugin.options.events || this.options.events).includes(e.native.type);\n        if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n            return;\n        }\n        const changed = this._handleEvent(e, replay, args.inChartArea);\n        args.cancelable = false;\n        this.notifyPlugins('afterEvent', args, eventFilter);\n        if (changed || args.changed) {\n            this.render();\n        }\n        return this;\n    }\n _handleEvent(e, replay, inChartArea) {\n        const { _active: lastActive = [] , options  } = this;\n        const useFinalPosition = replay;\n        const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n        const isClick = _isClickEvent(e);\n        const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n        if (inChartArea) {\n            this._lastEvent = null;\n            callback(options.onHover, [\n                e,\n                active,\n                this\n            ], this);\n            if (isClick) {\n                callback(options.onClick, [\n                    e,\n                    active,\n                    this\n                ], this);\n            }\n        }\n        const changed = !_elementsEqual(active, lastActive);\n        if (changed || replay) {\n            this._active = active;\n            this._updateHoverStyles(active, lastActive, replay);\n        }\n        this._lastEvent = lastEvent;\n        return changed;\n    }\n _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n        if (e.type === 'mouseout') {\n            return [];\n        }\n        if (!inChartArea) {\n            return lastActive;\n        }\n        const hoverOptions = this.options.hover;\n        return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n    }\n}\nfunction invalidatePlugins() {\n    return each(Chart.instances, (chart)=>chart._plugins.invalidate());\n}\n\nfunction clipArc(ctx, element, endAngle) {\n    const { startAngle , pixelMargin , x , y , outerRadius , innerRadius  } = element;\n    let angleMargin = pixelMargin / outerRadius;\n    // Draw an inner border by clipping the arc and drawing a double-width border\n    // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n    ctx.beginPath();\n    ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n    if (innerRadius > pixelMargin) {\n        angleMargin = pixelMargin / innerRadius;\n        ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n    } else {\n        ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n    }\n    ctx.closePath();\n    ctx.clip();\n}\nfunction toRadiusCorners(value) {\n    return _readValueToProps(value, [\n        'outerStart',\n        'outerEnd',\n        'innerStart',\n        'innerEnd'\n    ]);\n}\n/**\n * Parse border radius from the provided options\n */ function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {\n    const o = toRadiusCorners(arc.options.borderRadius);\n    const halfThickness = (outerRadius - innerRadius) / 2;\n    const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n    // Outer limits are complicated. We want to compute the available angular distance at\n    // a radius of outerRadius - borderRadius because for small angular distances, this term limits.\n    // We compute at r = outerRadius - borderRadius because this circle defines the center of the border corners.\n    //\n    // If the borderRadius is large, that value can become negative.\n    // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius\n    // we know that the thickness term will dominate and compute the limits at that point\n    const computeOuterLimit = (val)=>{\n        const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n        return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n    };\n    return {\n        outerStart: computeOuterLimit(o.outerStart),\n        outerEnd: computeOuterLimit(o.outerEnd),\n        innerStart: _limitValue(o.innerStart, 0, innerLimit),\n        innerEnd: _limitValue(o.innerEnd, 0, innerLimit)\n    };\n}\n/**\n * Convert (r, 𝜃) to (x, y)\n */ function rThetaToXY(r, theta, x, y) {\n    return {\n        x: x + r * Math.cos(theta),\n        y: y + r * Math.sin(theta)\n    };\n}\n/**\n * Path the arc, respecting border radius by separating into left and right halves.\n *\n *   Start      End\n *\n *    1--->a--->2    Outer\n *   /           \\\n *   8           3\n *   |           |\n *   |           |\n *   7           4\n *   \\           /\n *    6<---b<---5    Inner\n */ function pathArc(ctx, element, offset, spacing, end, circular) {\n    const { x , y , startAngle: start , pixelMargin , innerRadius: innerR  } = element;\n    const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n    const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n    let spacingOffset = 0;\n    const alpha = end - start;\n    if (spacing) {\n        // When spacing is present, it is the same for all items\n        // So we adjust the start and end angle of the arc such that\n        // the distance is the same as it would be without the spacing\n        const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n        const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n        const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n        const adjustedAngle = avNogSpacingRadius !== 0 ? alpha * avNogSpacingRadius / (avNogSpacingRadius + spacing) : alpha;\n        spacingOffset = (alpha - adjustedAngle) / 2;\n    }\n    const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n    const angleOffset = (alpha - beta) / 2;\n    const startAngle = start + angleOffset + spacingOffset;\n    const endAngle = end - angleOffset - spacingOffset;\n    const { outerStart , outerEnd , innerStart , innerEnd  } = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);\n    const outerStartAdjustedRadius = outerRadius - outerStart;\n    const outerEndAdjustedRadius = outerRadius - outerEnd;\n    const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n    const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n    const innerStartAdjustedRadius = innerRadius + innerStart;\n    const innerEndAdjustedRadius = innerRadius + innerEnd;\n    const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n    const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n    ctx.beginPath();\n    if (circular) {\n        // The first arc segments from point 1 to point a to point 2\n        const outerMidAdjustedAngle = (outerStartAdjustedAngle + outerEndAdjustedAngle) / 2;\n        ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerMidAdjustedAngle);\n        ctx.arc(x, y, outerRadius, outerMidAdjustedAngle, outerEndAdjustedAngle);\n        // The corner segment from point 2 to point 3\n        if (outerEnd > 0) {\n            const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n        }\n        // The line from point 3 to point 4\n        const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n        ctx.lineTo(p4.x, p4.y);\n        // The corner segment from point 4 to point 5\n        if (innerEnd > 0) {\n            const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n        }\n        // The inner arc from point 5 to point b to point 6\n        const innerMidAdjustedAngle = (endAngle - innerEnd / innerRadius + (startAngle + innerStart / innerRadius)) / 2;\n        ctx.arc(x, y, innerRadius, endAngle - innerEnd / innerRadius, innerMidAdjustedAngle, true);\n        ctx.arc(x, y, innerRadius, innerMidAdjustedAngle, startAngle + innerStart / innerRadius, true);\n        // The corner segment from point 6 to point 7\n        if (innerStart > 0) {\n            const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n        }\n        // The line from point 7 to point 8\n        const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n        ctx.lineTo(p8.x, p8.y);\n        // The corner segment from point 8 to point 1\n        if (outerStart > 0) {\n            const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n        }\n    } else {\n        ctx.moveTo(x, y);\n        const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n        const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n        ctx.lineTo(outerStartX, outerStartY);\n        const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n        const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n        ctx.lineTo(outerEndX, outerEndY);\n    }\n    ctx.closePath();\n}\nfunction drawArc(ctx, element, offset, spacing, circular) {\n    const { fullCircles , startAngle , circumference  } = element;\n    let endAngle = element.endAngle;\n    if (fullCircles) {\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        for(let i = 0; i < fullCircles; ++i){\n            ctx.fill();\n        }\n        if (!isNaN(circumference)) {\n            endAngle = startAngle + (circumference % TAU || TAU);\n        }\n    }\n    pathArc(ctx, element, offset, spacing, endAngle, circular);\n    ctx.fill();\n    return endAngle;\n}\nfunction drawBorder(ctx, element, offset, spacing, circular) {\n    const { fullCircles , startAngle , circumference , options  } = element;\n    const { borderWidth , borderJoinStyle , borderDash , borderDashOffset  } = options;\n    const inner = options.borderAlign === 'inner';\n    if (!borderWidth) {\n        return;\n    }\n    ctx.setLineDash(borderDash || []);\n    ctx.lineDashOffset = borderDashOffset;\n    if (inner) {\n        ctx.lineWidth = borderWidth * 2;\n        ctx.lineJoin = borderJoinStyle || 'round';\n    } else {\n        ctx.lineWidth = borderWidth;\n        ctx.lineJoin = borderJoinStyle || 'bevel';\n    }\n    let endAngle = element.endAngle;\n    if (fullCircles) {\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        for(let i = 0; i < fullCircles; ++i){\n            ctx.stroke();\n        }\n        if (!isNaN(circumference)) {\n            endAngle = startAngle + (circumference % TAU || TAU);\n        }\n    }\n    if (inner) {\n        clipArc(ctx, element, endAngle);\n    }\n    if (!fullCircles) {\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        ctx.stroke();\n    }\n}\nclass ArcElement extends Element {\n    static id = 'arc';\n    static defaults = {\n        borderAlign: 'center',\n        borderColor: '#fff',\n        borderDash: [],\n        borderDashOffset: 0,\n        borderJoinStyle: undefined,\n        borderRadius: 0,\n        borderWidth: 2,\n        offset: 0,\n        spacing: 0,\n        angle: undefined,\n        circular: true\n    };\n    static defaultRoutes = {\n        backgroundColor: 'backgroundColor'\n    };\n    static descriptors = {\n        _scriptable: true,\n        _indexable: (name)=>name !== 'borderDash'\n    };\n    circumference;\n    endAngle;\n    fullCircles;\n    innerRadius;\n    outerRadius;\n    pixelMargin;\n    startAngle;\n    constructor(cfg){\n        super();\n        this.options = undefined;\n        this.circumference = undefined;\n        this.startAngle = undefined;\n        this.endAngle = undefined;\n        this.innerRadius = undefined;\n        this.outerRadius = undefined;\n        this.pixelMargin = 0;\n        this.fullCircles = 0;\n        if (cfg) {\n            Object.assign(this, cfg);\n        }\n    }\n    inRange(chartX, chartY, useFinalPosition) {\n        const point = this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        const { angle , distance  } = getAngleFromPoint(point, {\n            x: chartX,\n            y: chartY\n        });\n        const { startAngle , endAngle , innerRadius , outerRadius , circumference  } = this.getProps([\n            'startAngle',\n            'endAngle',\n            'innerRadius',\n            'outerRadius',\n            'circumference'\n        ], useFinalPosition);\n        const rAdjust = (this.options.spacing + this.options.borderWidth) / 2;\n        const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n        const nonZeroBetween = _angleBetween(angle, startAngle, endAngle) && startAngle !== endAngle;\n        const betweenAngles = _circumference >= TAU || nonZeroBetween;\n        const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n        return betweenAngles && withinRadius;\n    }\n    getCenterPoint(useFinalPosition) {\n        const { x , y , startAngle , endAngle , innerRadius , outerRadius  } = this.getProps([\n            'x',\n            'y',\n            'startAngle',\n            'endAngle',\n            'innerRadius',\n            'outerRadius'\n        ], useFinalPosition);\n        const { offset , spacing  } = this.options;\n        const halfAngle = (startAngle + endAngle) / 2;\n        const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n        return {\n            x: x + Math.cos(halfAngle) * halfRadius,\n            y: y + Math.sin(halfAngle) * halfRadius\n        };\n    }\n    tooltipPosition(useFinalPosition) {\n        return this.getCenterPoint(useFinalPosition);\n    }\n    draw(ctx) {\n        const { options , circumference  } = this;\n        const offset = (options.offset || 0) / 4;\n        const spacing = (options.spacing || 0) / 2;\n        const circular = options.circular;\n        this.pixelMargin = options.borderAlign === 'inner' ? 0.33 : 0;\n        this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n        if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n            return;\n        }\n        ctx.save();\n        const halfAngle = (this.startAngle + this.endAngle) / 2;\n        ctx.translate(Math.cos(halfAngle) * offset, Math.sin(halfAngle) * offset);\n        const fix = 1 - Math.sin(Math.min(PI, circumference || 0));\n        const radiusOffset = offset * fix;\n        ctx.fillStyle = options.backgroundColor;\n        ctx.strokeStyle = options.borderColor;\n        drawArc(ctx, this, radiusOffset, spacing, circular);\n        drawBorder(ctx, this, radiusOffset, spacing, circular);\n        ctx.restore();\n    }\n}\n\nfunction setStyle(ctx, options, style = options) {\n    ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n    ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n    ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n    ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n    ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n    ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\nfunction lineTo(ctx, previous, target) {\n    ctx.lineTo(target.x, target.y);\n}\n function getLineMethod(options) {\n    if (options.stepped) {\n        return _steppedLineTo;\n    }\n    if (options.tension || options.cubicInterpolationMode === 'monotone') {\n        return _bezierCurveTo;\n    }\n    return lineTo;\n}\nfunction pathVars(points, segment, params = {}) {\n    const count = points.length;\n    const { start: paramsStart = 0 , end: paramsEnd = count - 1  } = params;\n    const { start: segmentStart , end: segmentEnd  } = segment;\n    const start = Math.max(paramsStart, segmentStart);\n    const end = Math.min(paramsEnd, segmentEnd);\n    const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n    return {\n        count,\n        start,\n        loop: segment.loop,\n        ilen: end < start && !outside ? count + end - start : end - start\n    };\n}\n function pathSegment(ctx, line, segment, params) {\n    const { points , options  } = line;\n    const { count , start , loop , ilen  } = pathVars(points, segment, params);\n    const lineMethod = getLineMethod(options);\n    let { move =true , reverse  } = params || {};\n    let i, point, prev;\n    for(i = 0; i <= ilen; ++i){\n        point = points[(start + (reverse ? ilen - i : i)) % count];\n        if (point.skip) {\n            continue;\n        } else if (move) {\n            ctx.moveTo(point.x, point.y);\n            move = false;\n        } else {\n            lineMethod(ctx, prev, point, reverse, options.stepped);\n        }\n        prev = point;\n    }\n    if (loop) {\n        point = points[(start + (reverse ? ilen : 0)) % count];\n        lineMethod(ctx, prev, point, reverse, options.stepped);\n    }\n    return !!loop;\n}\n function fastPathSegment(ctx, line, segment, params) {\n    const points = line.points;\n    const { count , start , ilen  } = pathVars(points, segment, params);\n    const { move =true , reverse  } = params || {};\n    let avgX = 0;\n    let countX = 0;\n    let i, point, prevX, minY, maxY, lastY;\n    const pointIndex = (index)=>(start + (reverse ? ilen - index : index)) % count;\n    const drawX = ()=>{\n        if (minY !== maxY) {\n            ctx.lineTo(avgX, maxY);\n            ctx.lineTo(avgX, minY);\n            ctx.lineTo(avgX, lastY);\n        }\n    };\n    if (move) {\n        point = points[pointIndex(0)];\n        ctx.moveTo(point.x, point.y);\n    }\n    for(i = 0; i <= ilen; ++i){\n        point = points[pointIndex(i)];\n        if (point.skip) {\n            continue;\n        }\n        const x = point.x;\n        const y = point.y;\n        const truncX = x | 0;\n        if (truncX === prevX) {\n            if (y < minY) {\n                minY = y;\n            } else if (y > maxY) {\n                maxY = y;\n            }\n            avgX = (countX * avgX + x) / ++countX;\n        } else {\n            drawX();\n            ctx.lineTo(x, y);\n            prevX = truncX;\n            countX = 0;\n            minY = maxY = y;\n        }\n        lastY = y;\n    }\n    drawX();\n}\n function _getSegmentMethod(line) {\n    const opts = line.options;\n    const borderDash = opts.borderDash && opts.borderDash.length;\n    const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n    return useFastPath ? fastPathSegment : pathSegment;\n}\n function _getInterpolationMethod(options) {\n    if (options.stepped) {\n        return _steppedInterpolation;\n    }\n    if (options.tension || options.cubicInterpolationMode === 'monotone') {\n        return _bezierInterpolation;\n    }\n    return _pointInLine;\n}\nfunction strokePathWithCache(ctx, line, start, count) {\n    let path = line._path;\n    if (!path) {\n        path = line._path = new Path2D();\n        if (line.path(path, start, count)) {\n            path.closePath();\n        }\n    }\n    setStyle(ctx, line.options);\n    ctx.stroke(path);\n}\nfunction strokePathDirect(ctx, line, start, count) {\n    const { segments , options  } = line;\n    const segmentMethod = _getSegmentMethod(line);\n    for (const segment of segments){\n        setStyle(ctx, options, segment.style);\n        ctx.beginPath();\n        if (segmentMethod(ctx, line, segment, {\n            start,\n            end: start + count - 1\n        })) {\n            ctx.closePath();\n        }\n        ctx.stroke();\n    }\n}\nconst usePath2D = typeof Path2D === 'function';\nfunction draw(ctx, line, start, count) {\n    if (usePath2D && !line.options.segment) {\n        strokePathWithCache(ctx, line, start, count);\n    } else {\n        strokePathDirect(ctx, line, start, count);\n    }\n}\nclass LineElement extends Element {\n    static id = 'line';\n static defaults = {\n        borderCapStyle: 'butt',\n        borderDash: [],\n        borderDashOffset: 0,\n        borderJoinStyle: 'miter',\n        borderWidth: 3,\n        capBezierPoints: true,\n        cubicInterpolationMode: 'default',\n        fill: false,\n        spanGaps: false,\n        stepped: false,\n        tension: 0\n    };\n static defaultRoutes = {\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    static descriptors = {\n        _scriptable: true,\n        _indexable: (name)=>name !== 'borderDash' && name !== 'fill'\n    };\n    constructor(cfg){\n        super();\n        this.animated = true;\n        this.options = undefined;\n        this._chart = undefined;\n        this._loop = undefined;\n        this._fullLoop = undefined;\n        this._path = undefined;\n        this._points = undefined;\n        this._segments = undefined;\n        this._decimated = false;\n        this._pointsUpdated = false;\n        this._datasetIndex = undefined;\n        if (cfg) {\n            Object.assign(this, cfg);\n        }\n    }\n    updateControlPoints(chartArea, indexAxis) {\n        const options = this.options;\n        if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n            const loop = options.spanGaps ? this._loop : this._fullLoop;\n            _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n            this._pointsUpdated = true;\n        }\n    }\n    set points(points) {\n        this._points = points;\n        delete this._segments;\n        delete this._path;\n        this._pointsUpdated = false;\n    }\n    get points() {\n        return this._points;\n    }\n    get segments() {\n        return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n    }\n first() {\n        const segments = this.segments;\n        const points = this.points;\n        return segments.length && points[segments[0].start];\n    }\n last() {\n        const segments = this.segments;\n        const points = this.points;\n        const count = segments.length;\n        return count && points[segments[count - 1].end];\n    }\n interpolate(point, property) {\n        const options = this.options;\n        const value = point[property];\n        const points = this.points;\n        const segments = _boundSegments(this, {\n            property,\n            start: value,\n            end: value\n        });\n        if (!segments.length) {\n            return;\n        }\n        const result = [];\n        const _interpolate = _getInterpolationMethod(options);\n        let i, ilen;\n        for(i = 0, ilen = segments.length; i < ilen; ++i){\n            const { start , end  } = segments[i];\n            const p1 = points[start];\n            const p2 = points[end];\n            if (p1 === p2) {\n                result.push(p1);\n                continue;\n            }\n            const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n            const interpolated = _interpolate(p1, p2, t, options.stepped);\n            interpolated[property] = point[property];\n            result.push(interpolated);\n        }\n        return result.length === 1 ? result[0] : result;\n    }\n pathSegment(ctx, segment, params) {\n        const segmentMethod = _getSegmentMethod(this);\n        return segmentMethod(ctx, this, segment, params);\n    }\n path(ctx, start, count) {\n        const segments = this.segments;\n        const segmentMethod = _getSegmentMethod(this);\n        let loop = this._loop;\n        start = start || 0;\n        count = count || this.points.length - start;\n        for (const segment of segments){\n            loop &= segmentMethod(ctx, this, segment, {\n                start,\n                end: start + count - 1\n            });\n        }\n        return !!loop;\n    }\n draw(ctx, chartArea, start, count) {\n        const options = this.options || {};\n        const points = this.points || [];\n        if (points.length && options.borderWidth) {\n            ctx.save();\n            draw(ctx, this, start, count);\n            ctx.restore();\n        }\n        if (this.animated) {\n            this._pointsUpdated = false;\n            this._path = undefined;\n        }\n    }\n}\n\nfunction inRange$1(el, pos, axis, useFinalPosition) {\n    const options = el.options;\n    const { [axis]: value  } = el.getProps([\n        axis\n    ], useFinalPosition);\n    return Math.abs(pos - value) < options.radius + options.hitRadius;\n}\nclass PointElement extends Element {\n    static id = 'point';\n    parsed;\n    skip;\n    stop;\n    /**\n   * @type {any}\n   */ static defaults = {\n        borderWidth: 1,\n        hitRadius: 1,\n        hoverBorderWidth: 1,\n        hoverRadius: 4,\n        pointStyle: 'circle',\n        radius: 3,\n        rotation: 0\n    };\n    /**\n   * @type {any}\n   */ static defaultRoutes = {\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    constructor(cfg){\n        super();\n        this.options = undefined;\n        this.parsed = undefined;\n        this.skip = undefined;\n        this.stop = undefined;\n        if (cfg) {\n            Object.assign(this, cfg);\n        }\n    }\n    inRange(mouseX, mouseY, useFinalPosition) {\n        const options = this.options;\n        const { x , y  } = this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2) < Math.pow(options.hitRadius + options.radius, 2);\n    }\n    inXRange(mouseX, useFinalPosition) {\n        return inRange$1(this, mouseX, 'x', useFinalPosition);\n    }\n    inYRange(mouseY, useFinalPosition) {\n        return inRange$1(this, mouseY, 'y', useFinalPosition);\n    }\n    getCenterPoint(useFinalPosition) {\n        const { x , y  } = this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return {\n            x,\n            y\n        };\n    }\n    size(options) {\n        options = options || this.options || {};\n        let radius = options.radius || 0;\n        radius = Math.max(radius, radius && options.hoverRadius || 0);\n        const borderWidth = radius && options.borderWidth || 0;\n        return (radius + borderWidth) * 2;\n    }\n    draw(ctx, area) {\n        const options = this.options;\n        if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n            return;\n        }\n        ctx.strokeStyle = options.borderColor;\n        ctx.lineWidth = options.borderWidth;\n        ctx.fillStyle = options.backgroundColor;\n        drawPoint(ctx, options, this.x, this.y);\n    }\n    getRange() {\n        const options = this.options || {};\n        // @ts-expect-error Fallbacks should never be hit in practice\n        return options.radius + options.hitRadius;\n    }\n}\n\nfunction getBarBounds(bar, useFinalPosition) {\n    const { x , y , base , width , height  } =  bar.getProps([\n        'x',\n        'y',\n        'base',\n        'width',\n        'height'\n    ], useFinalPosition);\n    let left, right, top, bottom, half;\n    if (bar.horizontal) {\n        half = height / 2;\n        left = Math.min(x, base);\n        right = Math.max(x, base);\n        top = y - half;\n        bottom = y + half;\n    } else {\n        half = width / 2;\n        left = x - half;\n        right = x + half;\n        top = Math.min(y, base);\n        bottom = Math.max(y, base);\n    }\n    return {\n        left,\n        top,\n        right,\n        bottom\n    };\n}\nfunction skipOrLimit(skip, value, min, max) {\n    return skip ? 0 : _limitValue(value, min, max);\n}\nfunction parseBorderWidth(bar, maxW, maxH) {\n    const value = bar.options.borderWidth;\n    const skip = bar.borderSkipped;\n    const o = toTRBL(value);\n    return {\n        t: skipOrLimit(skip.top, o.top, 0, maxH),\n        r: skipOrLimit(skip.right, o.right, 0, maxW),\n        b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n        l: skipOrLimit(skip.left, o.left, 0, maxW)\n    };\n}\nfunction parseBorderRadius(bar, maxW, maxH) {\n    const { enableBorderRadius  } = bar.getProps([\n        'enableBorderRadius'\n    ]);\n    const value = bar.options.borderRadius;\n    const o = toTRBLCorners(value);\n    const maxR = Math.min(maxW, maxH);\n    const skip = bar.borderSkipped;\n    const enableBorder = enableBorderRadius || isObject(value);\n    return {\n        topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n        topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n        bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n        bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n    };\n}\nfunction boundingRects(bar) {\n    const bounds = getBarBounds(bar);\n    const width = bounds.right - bounds.left;\n    const height = bounds.bottom - bounds.top;\n    const border = parseBorderWidth(bar, width / 2, height / 2);\n    const radius = parseBorderRadius(bar, width / 2, height / 2);\n    return {\n        outer: {\n            x: bounds.left,\n            y: bounds.top,\n            w: width,\n            h: height,\n            radius\n        },\n        inner: {\n            x: bounds.left + border.l,\n            y: bounds.top + border.t,\n            w: width - border.l - border.r,\n            h: height - border.t - border.b,\n            radius: {\n                topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n                topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n                bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n                bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r))\n            }\n        }\n    };\n}\nfunction inRange(bar, x, y, useFinalPosition) {\n    const skipX = x === null;\n    const skipY = y === null;\n    const skipBoth = skipX && skipY;\n    const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n    return bounds && (skipX || _isBetween(x, bounds.left, bounds.right)) && (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\nfunction hasRadius(radius) {\n    return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\n function addNormalRectPath(ctx, rect) {\n    ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\nfunction inflateRect(rect, amount, refRect = {}) {\n    const x = rect.x !== refRect.x ? -amount : 0;\n    const y = rect.y !== refRect.y ? -amount : 0;\n    const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n    const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n    return {\n        x: rect.x + x,\n        y: rect.y + y,\n        w: rect.w + w,\n        h: rect.h + h,\n        radius: rect.radius\n    };\n}\nclass BarElement extends Element {\n    static id = 'bar';\n static defaults = {\n        borderSkipped: 'start',\n        borderWidth: 0,\n        borderRadius: 0,\n        inflateAmount: 'auto',\n        pointStyle: undefined\n    };\n static defaultRoutes = {\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    constructor(cfg){\n        super();\n        this.options = undefined;\n        this.horizontal = undefined;\n        this.base = undefined;\n        this.width = undefined;\n        this.height = undefined;\n        this.inflateAmount = undefined;\n        if (cfg) {\n            Object.assign(this, cfg);\n        }\n    }\n    draw(ctx) {\n        const { inflateAmount , options: { borderColor , backgroundColor  }  } = this;\n        const { inner , outer  } = boundingRects(this);\n        const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n        ctx.save();\n        if (outer.w !== inner.w || outer.h !== inner.h) {\n            ctx.beginPath();\n            addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n            ctx.clip();\n            addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n            ctx.fillStyle = borderColor;\n            ctx.fill('evenodd');\n        }\n        ctx.beginPath();\n        addRectPath(ctx, inflateRect(inner, inflateAmount));\n        ctx.fillStyle = backgroundColor;\n        ctx.fill();\n        ctx.restore();\n    }\n    inRange(mouseX, mouseY, useFinalPosition) {\n        return inRange(this, mouseX, mouseY, useFinalPosition);\n    }\n    inXRange(mouseX, useFinalPosition) {\n        return inRange(this, mouseX, null, useFinalPosition);\n    }\n    inYRange(mouseY, useFinalPosition) {\n        return inRange(this, null, mouseY, useFinalPosition);\n    }\n    getCenterPoint(useFinalPosition) {\n        const { x , y , base , horizontal  } =  this.getProps([\n            'x',\n            'y',\n            'base',\n            'horizontal'\n        ], useFinalPosition);\n        return {\n            x: horizontal ? (x + base) / 2 : x,\n            y: horizontal ? y : (y + base) / 2\n        };\n    }\n    getRange(axis) {\n        return axis === 'x' ? this.width / 2 : this.height / 2;\n    }\n}\n\nvar elements = /*#__PURE__*/Object.freeze({\n__proto__: null,\nArcElement: ArcElement,\nBarElement: BarElement,\nLineElement: LineElement,\nPointElement: PointElement\n});\n\nconst BORDER_COLORS = [\n    'rgb(54, 162, 235)',\n    'rgb(255, 99, 132)',\n    'rgb(255, 159, 64)',\n    'rgb(255, 205, 86)',\n    'rgb(75, 192, 192)',\n    'rgb(153, 102, 255)',\n    'rgb(201, 203, 207)' // grey\n];\n// Border colors with 50% transparency\nconst BACKGROUND_COLORS = /* #__PURE__ */ BORDER_COLORS.map((color)=>color.replace('rgb(', 'rgba(').replace(')', ', 0.5)'));\nfunction getBorderColor(i) {\n    return BORDER_COLORS[i % BORDER_COLORS.length];\n}\nfunction getBackgroundColor(i) {\n    return BACKGROUND_COLORS[i % BACKGROUND_COLORS.length];\n}\nfunction colorizeDefaultDataset(dataset, i) {\n    dataset.borderColor = getBorderColor(i);\n    dataset.backgroundColor = getBackgroundColor(i);\n    return ++i;\n}\nfunction colorizeDoughnutDataset(dataset, i) {\n    dataset.backgroundColor = dataset.data.map(()=>getBorderColor(i++));\n    return i;\n}\nfunction colorizePolarAreaDataset(dataset, i) {\n    dataset.backgroundColor = dataset.data.map(()=>getBackgroundColor(i++));\n    return i;\n}\nfunction getColorizer(chart) {\n    let i = 0;\n    return (dataset, datasetIndex)=>{\n        const controller = chart.getDatasetMeta(datasetIndex).controller;\n        if (controller instanceof DoughnutController) {\n            i = colorizeDoughnutDataset(dataset, i);\n        } else if (controller instanceof PolarAreaController) {\n            i = colorizePolarAreaDataset(dataset, i);\n        } else if (controller) {\n            i = colorizeDefaultDataset(dataset, i);\n        }\n    };\n}\nfunction containsColorsDefinitions(descriptors) {\n    let k;\n    for(k in descriptors){\n        if (descriptors[k].borderColor || descriptors[k].backgroundColor) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction containsColorsDefinition(descriptor) {\n    return descriptor && (descriptor.borderColor || descriptor.backgroundColor);\n}\nfunction containsDefaultColorsDefenitions() {\n    return defaults.borderColor !== 'rgba(0,0,0,0.1)' || defaults.backgroundColor !== 'rgba(0,0,0,0.1)';\n}\nvar plugin_colors = {\n    id: 'colors',\n    defaults: {\n        enabled: true,\n        forceOverride: false\n    },\n    beforeLayout (chart, _args, options) {\n        if (!options.enabled) {\n            return;\n        }\n        const { data: { datasets  } , options: chartOptions  } = chart.config;\n        const { elements  } = chartOptions;\n        const containsColorDefenition = containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || elements && containsColorsDefinitions(elements) || containsDefaultColorsDefenitions();\n        if (!options.forceOverride && containsColorDefenition) {\n            return;\n        }\n        const colorizer = getColorizer(chart);\n        datasets.forEach(colorizer);\n    }\n};\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n const samples = options.samples || availableWidth;\n    if (samples >= count) {\n        return data.slice(start, start + count);\n    }\n    const decimated = [];\n    const bucketWidth = (count - 2) / (samples - 2);\n    let sampledIndex = 0;\n    const endIndex = start + count - 1;\n    let a = start;\n    let i, maxAreaPoint, maxArea, area, nextA;\n    decimated[sampledIndex++] = data[a];\n    for(i = 0; i < samples - 2; i++){\n        let avgX = 0;\n        let avgY = 0;\n        let j;\n        const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n        const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n        const avgRangeLength = avgRangeEnd - avgRangeStart;\n        for(j = avgRangeStart; j < avgRangeEnd; j++){\n            avgX += data[j].x;\n            avgY += data[j].y;\n        }\n        avgX /= avgRangeLength;\n        avgY /= avgRangeLength;\n        const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n        const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n        const { x: pointAx , y: pointAy  } = data[a];\n        maxArea = area = -1;\n        for(j = rangeOffs; j < rangeTo; j++){\n            area = 0.5 * Math.abs((pointAx - avgX) * (data[j].y - pointAy) - (pointAx - data[j].x) * (avgY - pointAy));\n            if (area > maxArea) {\n                maxArea = area;\n                maxAreaPoint = data[j];\n                nextA = j;\n            }\n        }\n        decimated[sampledIndex++] = maxAreaPoint;\n        a = nextA;\n    }\n    decimated[sampledIndex++] = data[endIndex];\n    return decimated;\n}\nfunction minMaxDecimation(data, start, count, availableWidth) {\n    let avgX = 0;\n    let countX = 0;\n    let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n    const decimated = [];\n    const endIndex = start + count - 1;\n    const xMin = data[start].x;\n    const xMax = data[endIndex].x;\n    const dx = xMax - xMin;\n    for(i = start; i < start + count; ++i){\n        point = data[i];\n        x = (point.x - xMin) / dx * availableWidth;\n        y = point.y;\n        const truncX = x | 0;\n        if (truncX === prevX) {\n            if (y < minY) {\n                minY = y;\n                minIndex = i;\n            } else if (y > maxY) {\n                maxY = y;\n                maxIndex = i;\n            }\n            avgX = (countX * avgX + point.x) / ++countX;\n        } else {\n            const lastIndex = i - 1;\n            if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n                const intermediateIndex1 = Math.min(minIndex, maxIndex);\n                const intermediateIndex2 = Math.max(minIndex, maxIndex);\n                if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n                    decimated.push({\n                        ...data[intermediateIndex1],\n                        x: avgX\n                    });\n                }\n                if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n                    decimated.push({\n                        ...data[intermediateIndex2],\n                        x: avgX\n                    });\n                }\n            }\n            if (i > 0 && lastIndex !== startIndex) {\n                decimated.push(data[lastIndex]);\n            }\n            decimated.push(point);\n            prevX = truncX;\n            countX = 0;\n            minY = maxY = y;\n            minIndex = maxIndex = startIndex = i;\n        }\n    }\n    return decimated;\n}\nfunction cleanDecimatedDataset(dataset) {\n    if (dataset._decimated) {\n        const data = dataset._data;\n        delete dataset._decimated;\n        delete dataset._data;\n        Object.defineProperty(dataset, 'data', {\n            configurable: true,\n            enumerable: true,\n            writable: true,\n            value: data\n        });\n    }\n}\nfunction cleanDecimatedData(chart) {\n    chart.data.datasets.forEach((dataset)=>{\n        cleanDecimatedDataset(dataset);\n    });\n}\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n    const pointCount = points.length;\n    let start = 0;\n    let count;\n    const { iScale  } = meta;\n    const { min , max , minDefined , maxDefined  } = iScale.getUserBounds();\n    if (minDefined) {\n        start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n    }\n    if (maxDefined) {\n        count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n    } else {\n        count = pointCount - start;\n    }\n    return {\n        start,\n        count\n    };\n}\nvar plugin_decimation = {\n    id: 'decimation',\n    defaults: {\n        algorithm: 'min-max',\n        enabled: false\n    },\n    beforeElementsUpdate: (chart, args, options)=>{\n        if (!options.enabled) {\n            cleanDecimatedData(chart);\n            return;\n        }\n        const availableWidth = chart.width;\n        chart.data.datasets.forEach((dataset, datasetIndex)=>{\n            const { _data , indexAxis  } = dataset;\n            const meta = chart.getDatasetMeta(datasetIndex);\n            const data = _data || dataset.data;\n            if (resolve([\n                indexAxis,\n                chart.options.indexAxis\n            ]) === 'y') {\n                return;\n            }\n            if (!meta.controller.supportsDecimation) {\n                return;\n            }\n            const xAxis = chart.scales[meta.xAxisID];\n            if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n                return;\n            }\n            if (chart.options.parsing) {\n                return;\n            }\n            let { start , count  } = getStartAndCountOfVisiblePointsSimplified(meta, data);\n            const threshold = options.threshold || 4 * availableWidth;\n            if (count <= threshold) {\n                cleanDecimatedDataset(dataset);\n                return;\n            }\n            if (isNullOrUndef(_data)) {\n                dataset._data = data;\n                delete dataset.data;\n                Object.defineProperty(dataset, 'data', {\n                    configurable: true,\n                    enumerable: true,\n                    get: function() {\n                        return this._decimated;\n                    },\n                    set: function(d) {\n                        this._data = d;\n                    }\n                });\n            }\n            let decimated;\n            switch(options.algorithm){\n                case 'lttb':\n                    decimated = lttbDecimation(data, start, count, availableWidth, options);\n                    break;\n                case 'min-max':\n                    decimated = minMaxDecimation(data, start, count, availableWidth);\n                    break;\n                default:\n                    throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n            }\n            dataset._decimated = decimated;\n        });\n    },\n    destroy (chart) {\n        cleanDecimatedData(chart);\n    }\n};\n\nfunction _segments(line, target, property) {\n    const segments = line.segments;\n    const points = line.points;\n    const tpoints = target.points;\n    const parts = [];\n    for (const segment of segments){\n        let { start , end  } = segment;\n        end = _findSegmentEnd(start, end, points);\n        const bounds = _getBounds(property, points[start], points[end], segment.loop);\n        if (!target.segments) {\n            parts.push({\n                source: segment,\n                target: bounds,\n                start: points[start],\n                end: points[end]\n            });\n            continue;\n        }\n        const targetSegments = _boundSegments(target, bounds);\n        for (const tgt of targetSegments){\n            const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n            const fillSources = _boundSegment(segment, points, subBounds);\n            for (const fillSource of fillSources){\n                parts.push({\n                    source: fillSource,\n                    target: tgt,\n                    start: {\n                        [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n                    },\n                    end: {\n                        [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n                    }\n                });\n            }\n        }\n    }\n    return parts;\n}\nfunction _getBounds(property, first, last, loop) {\n    if (loop) {\n        return;\n    }\n    let start = first[property];\n    let end = last[property];\n    if (property === 'angle') {\n        start = _normalizeAngle(start);\n        end = _normalizeAngle(end);\n    }\n    return {\n        property,\n        start,\n        end\n    };\n}\nfunction _pointsFromSegments(boundary, line) {\n    const { x =null , y =null  } = boundary || {};\n    const linePoints = line.points;\n    const points = [];\n    line.segments.forEach(({ start , end  })=>{\n        end = _findSegmentEnd(start, end, linePoints);\n        const first = linePoints[start];\n        const last = linePoints[end];\n        if (y !== null) {\n            points.push({\n                x: first.x,\n                y\n            });\n            points.push({\n                x: last.x,\n                y\n            });\n        } else if (x !== null) {\n            points.push({\n                x,\n                y: first.y\n            });\n            points.push({\n                x,\n                y: last.y\n            });\n        }\n    });\n    return points;\n}\nfunction _findSegmentEnd(start, end, points) {\n    for(; end > start; end--){\n        const point = points[end];\n        if (!isNaN(point.x) && !isNaN(point.y)) {\n            break;\n        }\n    }\n    return end;\n}\nfunction _getEdge(a, b, prop, fn) {\n    if (a && b) {\n        return fn(a[prop], b[prop]);\n    }\n    return a ? a[prop] : b ? b[prop] : 0;\n}\n\nfunction _createBoundaryLine(boundary, line) {\n    let points = [];\n    let _loop = false;\n    if (isArray(boundary)) {\n        _loop = true;\n        points = boundary;\n    } else {\n        points = _pointsFromSegments(boundary, line);\n    }\n    return points.length ? new LineElement({\n        points,\n        options: {\n            tension: 0\n        },\n        _loop,\n        _fullLoop: _loop\n    }) : null;\n}\nfunction _shouldApplyFill(source) {\n    return source && source.fill !== false;\n}\n\nfunction _resolveTarget(sources, index, propagate) {\n    const source = sources[index];\n    let fill = source.fill;\n    const visited = [\n        index\n    ];\n    let target;\n    if (!propagate) {\n        return fill;\n    }\n    while(fill !== false && visited.indexOf(fill) === -1){\n        if (!isNumberFinite(fill)) {\n            return fill;\n        }\n        target = sources[fill];\n        if (!target) {\n            return false;\n        }\n        if (target.visible) {\n            return fill;\n        }\n        visited.push(fill);\n        fill = target.fill;\n    }\n    return false;\n}\n function _decodeFill(line, index, count) {\n     const fill = parseFillOption(line);\n    if (isObject(fill)) {\n        return isNaN(fill.value) ? false : fill;\n    }\n    let target = parseFloat(fill);\n    if (isNumberFinite(target) && Math.floor(target) === target) {\n        return decodeTargetIndex(fill[0], index, target, count);\n    }\n    return [\n        'origin',\n        'start',\n        'end',\n        'stack',\n        'shape'\n    ].indexOf(fill) >= 0 && fill;\n}\nfunction decodeTargetIndex(firstCh, index, target, count) {\n    if (firstCh === '-' || firstCh === '+') {\n        target = index + target;\n    }\n    if (target === index || target < 0 || target >= count) {\n        return false;\n    }\n    return target;\n}\n function _getTargetPixel(fill, scale) {\n    let pixel = null;\n    if (fill === 'start') {\n        pixel = scale.bottom;\n    } else if (fill === 'end') {\n        pixel = scale.top;\n    } else if (isObject(fill)) {\n        pixel = scale.getPixelForValue(fill.value);\n    } else if (scale.getBasePixel) {\n        pixel = scale.getBasePixel();\n    }\n    return pixel;\n}\n function _getTargetValue(fill, scale, startValue) {\n    let value;\n    if (fill === 'start') {\n        value = startValue;\n    } else if (fill === 'end') {\n        value = scale.options.reverse ? scale.min : scale.max;\n    } else if (isObject(fill)) {\n        value = fill.value;\n    } else {\n        value = scale.getBaseValue();\n    }\n    return value;\n}\n function parseFillOption(line) {\n    const options = line.options;\n    const fillOption = options.fill;\n    let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n    if (fill === undefined) {\n        fill = !!options.backgroundColor;\n    }\n    if (fill === false || fill === null) {\n        return false;\n    }\n    if (fill === true) {\n        return 'origin';\n    }\n    return fill;\n}\n\nfunction _buildStackLine(source) {\n    const { scale , index , line  } = source;\n    const points = [];\n    const segments = line.segments;\n    const sourcePoints = line.points;\n    const linesBelow = getLinesBelow(scale, index);\n    linesBelow.push(_createBoundaryLine({\n        x: null,\n        y: scale.bottom\n    }, line));\n    for(let i = 0; i < segments.length; i++){\n        const segment = segments[i];\n        for(let j = segment.start; j <= segment.end; j++){\n            addPointsBelow(points, sourcePoints[j], linesBelow);\n        }\n    }\n    return new LineElement({\n        points,\n        options: {}\n    });\n}\n function getLinesBelow(scale, index) {\n    const below = [];\n    const metas = scale.getMatchingVisibleMetas('line');\n    for(let i = 0; i < metas.length; i++){\n        const meta = metas[i];\n        if (meta.index === index) {\n            break;\n        }\n        if (!meta.hidden) {\n            below.unshift(meta.dataset);\n        }\n    }\n    return below;\n}\n function addPointsBelow(points, sourcePoint, linesBelow) {\n    const postponed = [];\n    for(let j = 0; j < linesBelow.length; j++){\n        const line = linesBelow[j];\n        const { first , last , point  } = findPoint(line, sourcePoint, 'x');\n        if (!point || first && last) {\n            continue;\n        }\n        if (first) {\n            postponed.unshift(point);\n        } else {\n            points.push(point);\n            if (!last) {\n                break;\n            }\n        }\n    }\n    points.push(...postponed);\n}\n function findPoint(line, sourcePoint, property) {\n    const point = line.interpolate(sourcePoint, property);\n    if (!point) {\n        return {};\n    }\n    const pointValue = point[property];\n    const segments = line.segments;\n    const linePoints = line.points;\n    let first = false;\n    let last = false;\n    for(let i = 0; i < segments.length; i++){\n        const segment = segments[i];\n        const firstValue = linePoints[segment.start][property];\n        const lastValue = linePoints[segment.end][property];\n        if (_isBetween(pointValue, firstValue, lastValue)) {\n            first = pointValue === firstValue;\n            last = pointValue === lastValue;\n            break;\n        }\n    }\n    return {\n        first,\n        last,\n        point\n    };\n}\n\nclass simpleArc {\n    constructor(opts){\n        this.x = opts.x;\n        this.y = opts.y;\n        this.radius = opts.radius;\n    }\n    pathSegment(ctx, bounds, opts) {\n        const { x , y , radius  } = this;\n        bounds = bounds || {\n            start: 0,\n            end: TAU\n        };\n        ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n        return !opts.bounds;\n    }\n    interpolate(point) {\n        const { x , y , radius  } = this;\n        const angle = point.angle;\n        return {\n            x: x + Math.cos(angle) * radius,\n            y: y + Math.sin(angle) * radius,\n            angle\n        };\n    }\n}\n\nfunction _getTarget(source) {\n    const { chart , fill , line  } = source;\n    if (isNumberFinite(fill)) {\n        return getLineByIndex(chart, fill);\n    }\n    if (fill === 'stack') {\n        return _buildStackLine(source);\n    }\n    if (fill === 'shape') {\n        return true;\n    }\n    const boundary = computeBoundary(source);\n    if (boundary instanceof simpleArc) {\n        return boundary;\n    }\n    return _createBoundaryLine(boundary, line);\n}\n function getLineByIndex(chart, index) {\n    const meta = chart.getDatasetMeta(index);\n    const visible = meta && chart.isDatasetVisible(index);\n    return visible ? meta.dataset : null;\n}\nfunction computeBoundary(source) {\n    const scale = source.scale || {};\n    if (scale.getPointPositionForValue) {\n        return computeCircularBoundary(source);\n    }\n    return computeLinearBoundary(source);\n}\nfunction computeLinearBoundary(source) {\n    const { scale ={} , fill  } = source;\n    const pixel = _getTargetPixel(fill, scale);\n    if (isNumberFinite(pixel)) {\n        const horizontal = scale.isHorizontal();\n        return {\n            x: horizontal ? pixel : null,\n            y: horizontal ? null : pixel\n        };\n    }\n    return null;\n}\nfunction computeCircularBoundary(source) {\n    const { scale , fill  } = source;\n    const options = scale.options;\n    const length = scale.getLabels().length;\n    const start = options.reverse ? scale.max : scale.min;\n    const value = _getTargetValue(fill, scale, start);\n    const target = [];\n    if (options.grid.circular) {\n        const center = scale.getPointPositionForValue(0, start);\n        return new simpleArc({\n            x: center.x,\n            y: center.y,\n            radius: scale.getDistanceFromCenterForValue(value)\n        });\n    }\n    for(let i = 0; i < length; ++i){\n        target.push(scale.getPointPositionForValue(i, value));\n    }\n    return target;\n}\n\nfunction _drawfill(ctx, source, area) {\n    const target = _getTarget(source);\n    const { line , scale , axis  } = source;\n    const lineOpts = line.options;\n    const fillOption = lineOpts.fill;\n    const color = lineOpts.backgroundColor;\n    const { above =color , below =color  } = fillOption || {};\n    if (target && line.points.length) {\n        clipArea(ctx, area);\n        doFill(ctx, {\n            line,\n            target,\n            above,\n            below,\n            area,\n            scale,\n            axis\n        });\n        unclipArea(ctx);\n    }\n}\nfunction doFill(ctx, cfg) {\n    const { line , target , above , below , area , scale  } = cfg;\n    const property = line._loop ? 'angle' : cfg.axis;\n    ctx.save();\n    if (property === 'x' && below !== above) {\n        clipVertical(ctx, target, area.top);\n        fill(ctx, {\n            line,\n            target,\n            color: above,\n            scale,\n            property\n        });\n        ctx.restore();\n        ctx.save();\n        clipVertical(ctx, target, area.bottom);\n    }\n    fill(ctx, {\n        line,\n        target,\n        color: below,\n        scale,\n        property\n    });\n    ctx.restore();\n}\nfunction clipVertical(ctx, target, clipY) {\n    const { segments , points  } = target;\n    let first = true;\n    let lineLoop = false;\n    ctx.beginPath();\n    for (const segment of segments){\n        const { start , end  } = segment;\n        const firstPoint = points[start];\n        const lastPoint = points[_findSegmentEnd(start, end, points)];\n        if (first) {\n            ctx.moveTo(firstPoint.x, firstPoint.y);\n            first = false;\n        } else {\n            ctx.lineTo(firstPoint.x, clipY);\n            ctx.lineTo(firstPoint.x, firstPoint.y);\n        }\n        lineLoop = !!target.pathSegment(ctx, segment, {\n            move: lineLoop\n        });\n        if (lineLoop) {\n            ctx.closePath();\n        } else {\n            ctx.lineTo(lastPoint.x, clipY);\n        }\n    }\n    ctx.lineTo(target.first().x, clipY);\n    ctx.closePath();\n    ctx.clip();\n}\nfunction fill(ctx, cfg) {\n    const { line , target , property , color , scale  } = cfg;\n    const segments = _segments(line, target, property);\n    for (const { source: src , target: tgt , start , end  } of segments){\n        const { style: { backgroundColor =color  } = {}  } = src;\n        const notShape = target !== true;\n        ctx.save();\n        ctx.fillStyle = backgroundColor;\n        clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n        ctx.beginPath();\n        const lineLoop = !!line.pathSegment(ctx, src);\n        let loop;\n        if (notShape) {\n            if (lineLoop) {\n                ctx.closePath();\n            } else {\n                interpolatedLineTo(ctx, target, end, property);\n            }\n            const targetLoop = !!target.pathSegment(ctx, tgt, {\n                move: lineLoop,\n                reverse: true\n            });\n            loop = lineLoop && targetLoop;\n            if (!loop) {\n                interpolatedLineTo(ctx, target, start, property);\n            }\n        }\n        ctx.closePath();\n        ctx.fill(loop ? 'evenodd' : 'nonzero');\n        ctx.restore();\n    }\n}\nfunction clipBounds(ctx, scale, bounds) {\n    const { top , bottom  } = scale.chart.chartArea;\n    const { property , start , end  } = bounds || {};\n    if (property === 'x') {\n        ctx.beginPath();\n        ctx.rect(start, top, end - start, bottom - top);\n        ctx.clip();\n    }\n}\nfunction interpolatedLineTo(ctx, target, point, property) {\n    const interpolatedPoint = target.interpolate(point, property);\n    if (interpolatedPoint) {\n        ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n    }\n}\n\nvar index = {\n    id: 'filler',\n    afterDatasetsUpdate (chart, _args, options) {\n        const count = (chart.data.datasets || []).length;\n        const sources = [];\n        let meta, i, line, source;\n        for(i = 0; i < count; ++i){\n            meta = chart.getDatasetMeta(i);\n            line = meta.dataset;\n            source = null;\n            if (line && line.options && line instanceof LineElement) {\n                source = {\n                    visible: chart.isDatasetVisible(i),\n                    index: i,\n                    fill: _decodeFill(line, i, count),\n                    chart,\n                    axis: meta.controller.options.indexAxis,\n                    scale: meta.vScale,\n                    line\n                };\n            }\n            meta.$filler = source;\n            sources.push(source);\n        }\n        for(i = 0; i < count; ++i){\n            source = sources[i];\n            if (!source || source.fill === false) {\n                continue;\n            }\n            source.fill = _resolveTarget(sources, i, options.propagate);\n        }\n    },\n    beforeDraw (chart, _args, options) {\n        const draw = options.drawTime === 'beforeDraw';\n        const metasets = chart.getSortedVisibleDatasetMetas();\n        const area = chart.chartArea;\n        for(let i = metasets.length - 1; i >= 0; --i){\n            const source = metasets[i].$filler;\n            if (!source) {\n                continue;\n            }\n            source.line.updateControlPoints(area, source.axis);\n            if (draw && source.fill) {\n                _drawfill(chart.ctx, source, area);\n            }\n        }\n    },\n    beforeDatasetsDraw (chart, _args, options) {\n        if (options.drawTime !== 'beforeDatasetsDraw') {\n            return;\n        }\n        const metasets = chart.getSortedVisibleDatasetMetas();\n        for(let i = metasets.length - 1; i >= 0; --i){\n            const source = metasets[i].$filler;\n            if (_shouldApplyFill(source)) {\n                _drawfill(chart.ctx, source, chart.chartArea);\n            }\n        }\n    },\n    beforeDatasetDraw (chart, args, options) {\n        const source = args.meta.$filler;\n        if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n            return;\n        }\n        _drawfill(chart.ctx, source, chart.chartArea);\n    },\n    defaults: {\n        propagate: true,\n        drawTime: 'beforeDatasetDraw'\n    }\n};\n\nconst getBoxSize = (labelOpts, fontSize)=>{\n    let { boxHeight =fontSize , boxWidth =fontSize  } = labelOpts;\n    if (labelOpts.usePointStyle) {\n        boxHeight = Math.min(boxHeight, fontSize);\n        boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n    }\n    return {\n        boxWidth,\n        boxHeight,\n        itemHeight: Math.max(fontSize, boxHeight)\n    };\n};\nconst itemsEqual = (a, b)=>a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\nclass Legend extends Element {\n constructor(config){\n        super();\n        this._added = false;\n        this.legendHitBoxes = [];\n this._hoveredItem = null;\n        this.doughnutMode = false;\n        this.chart = config.chart;\n        this.options = config.options;\n        this.ctx = config.ctx;\n        this.legendItems = undefined;\n        this.columnSizes = undefined;\n        this.lineWidths = undefined;\n        this.maxHeight = undefined;\n        this.maxWidth = undefined;\n        this.top = undefined;\n        this.bottom = undefined;\n        this.left = undefined;\n        this.right = undefined;\n        this.height = undefined;\n        this.width = undefined;\n        this._margins = undefined;\n        this.position = undefined;\n        this.weight = undefined;\n        this.fullSize = undefined;\n    }\n    update(maxWidth, maxHeight, margins) {\n        this.maxWidth = maxWidth;\n        this.maxHeight = maxHeight;\n        this._margins = margins;\n        this.setDimensions();\n        this.buildLabels();\n        this.fit();\n    }\n    setDimensions() {\n        if (this.isHorizontal()) {\n            this.width = this.maxWidth;\n            this.left = this._margins.left;\n            this.right = this.width;\n        } else {\n            this.height = this.maxHeight;\n            this.top = this._margins.top;\n            this.bottom = this.height;\n        }\n    }\n    buildLabels() {\n        const labelOpts = this.options.labels || {};\n        let legendItems = callback(labelOpts.generateLabels, [\n            this.chart\n        ], this) || [];\n        if (labelOpts.filter) {\n            legendItems = legendItems.filter((item)=>labelOpts.filter(item, this.chart.data));\n        }\n        if (labelOpts.sort) {\n            legendItems = legendItems.sort((a, b)=>labelOpts.sort(a, b, this.chart.data));\n        }\n        if (this.options.reverse) {\n            legendItems.reverse();\n        }\n        this.legendItems = legendItems;\n    }\n    fit() {\n        const { options , ctx  } = this;\n        if (!options.display) {\n            this.width = this.height = 0;\n            return;\n        }\n        const labelOpts = options.labels;\n        const labelFont = toFont(labelOpts.font);\n        const fontSize = labelFont.size;\n        const titleHeight = this._computeTitleHeight();\n        const { boxWidth , itemHeight  } = getBoxSize(labelOpts, fontSize);\n        let width, height;\n        ctx.font = labelFont.string;\n        if (this.isHorizontal()) {\n            width = this.maxWidth;\n            height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n        } else {\n            height = this.maxHeight;\n            width = this._fitCols(titleHeight, labelFont, boxWidth, itemHeight) + 10;\n        }\n        this.width = Math.min(width, options.maxWidth || this.maxWidth);\n        this.height = Math.min(height, options.maxHeight || this.maxHeight);\n    }\n _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n        const { ctx , maxWidth , options: { labels: { padding  }  }  } = this;\n        const hitboxes = this.legendHitBoxes = [];\n        const lineWidths = this.lineWidths = [\n            0\n        ];\n        const lineHeight = itemHeight + padding;\n        let totalHeight = titleHeight;\n        ctx.textAlign = 'left';\n        ctx.textBaseline = 'middle';\n        let row = -1;\n        let top = -lineHeight;\n        this.legendItems.forEach((legendItem, i)=>{\n            const itemWidth = boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n            if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n                totalHeight += lineHeight;\n                lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n                top += lineHeight;\n                row++;\n            }\n            hitboxes[i] = {\n                left: 0,\n                top,\n                row,\n                width: itemWidth,\n                height: itemHeight\n            };\n            lineWidths[lineWidths.length - 1] += itemWidth + padding;\n        });\n        return totalHeight;\n    }\n    _fitCols(titleHeight, labelFont, boxWidth, _itemHeight) {\n        const { ctx , maxHeight , options: { labels: { padding  }  }  } = this;\n        const hitboxes = this.legendHitBoxes = [];\n        const columnSizes = this.columnSizes = [];\n        const heightLimit = maxHeight - titleHeight;\n        let totalWidth = padding;\n        let currentColWidth = 0;\n        let currentColHeight = 0;\n        let left = 0;\n        let col = 0;\n        this.legendItems.forEach((legendItem, i)=>{\n            const { itemWidth , itemHeight  } = calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight);\n            if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n                totalWidth += currentColWidth + padding;\n                columnSizes.push({\n                    width: currentColWidth,\n                    height: currentColHeight\n                });\n                left += currentColWidth + padding;\n                col++;\n                currentColWidth = currentColHeight = 0;\n            }\n            hitboxes[i] = {\n                left,\n                top: currentColHeight,\n                col,\n                width: itemWidth,\n                height: itemHeight\n            };\n            currentColWidth = Math.max(currentColWidth, itemWidth);\n            currentColHeight += itemHeight + padding;\n        });\n        totalWidth += currentColWidth;\n        columnSizes.push({\n            width: currentColWidth,\n            height: currentColHeight\n        });\n        return totalWidth;\n    }\n    adjustHitBoxes() {\n        if (!this.options.display) {\n            return;\n        }\n        const titleHeight = this._computeTitleHeight();\n        const { legendHitBoxes: hitboxes , options: { align , labels: { padding  } , rtl  }  } = this;\n        const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n        if (this.isHorizontal()) {\n            let row = 0;\n            let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n            for (const hitbox of hitboxes){\n                if (row !== hitbox.row) {\n                    row = hitbox.row;\n                    left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n                }\n                hitbox.top += this.top + titleHeight + padding;\n                hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n                left += hitbox.width + padding;\n            }\n        } else {\n            let col = 0;\n            let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n            for (const hitbox of hitboxes){\n                if (hitbox.col !== col) {\n                    col = hitbox.col;\n                    top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n                }\n                hitbox.top = top;\n                hitbox.left += this.left + padding;\n                hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n                top += hitbox.height + padding;\n            }\n        }\n    }\n    isHorizontal() {\n        return this.options.position === 'top' || this.options.position === 'bottom';\n    }\n    draw() {\n        if (this.options.display) {\n            const ctx = this.ctx;\n            clipArea(ctx, this);\n            this._draw();\n            unclipArea(ctx);\n        }\n    }\n _draw() {\n        const { options: opts , columnSizes , lineWidths , ctx  } = this;\n        const { align , labels: labelOpts  } = opts;\n        const defaultColor = defaults.color;\n        const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n        const labelFont = toFont(labelOpts.font);\n        const { padding  } = labelOpts;\n        const fontSize = labelFont.size;\n        const halfFontSize = fontSize / 2;\n        let cursor;\n        this.drawTitle();\n        ctx.textAlign = rtlHelper.textAlign('left');\n        ctx.textBaseline = 'middle';\n        ctx.lineWidth = 0.5;\n        ctx.font = labelFont.string;\n        const { boxWidth , boxHeight , itemHeight  } = getBoxSize(labelOpts, fontSize);\n        const drawLegendBox = function(x, y, legendItem) {\n            if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n                return;\n            }\n            ctx.save();\n            const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n            ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n            ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n            ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n            ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n            ctx.lineWidth = lineWidth;\n            ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n            ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n            if (labelOpts.usePointStyle) {\n                const drawOptions = {\n                    radius: boxHeight * Math.SQRT2 / 2,\n                    pointStyle: legendItem.pointStyle,\n                    rotation: legendItem.rotation,\n                    borderWidth: lineWidth\n                };\n                const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n                const centerY = y + halfFontSize;\n                drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n            } else {\n                const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n                const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n                const borderRadius = toTRBLCorners(legendItem.borderRadius);\n                ctx.beginPath();\n                if (Object.values(borderRadius).some((v)=>v !== 0)) {\n                    addRoundedRectPath(ctx, {\n                        x: xBoxLeft,\n                        y: yBoxTop,\n                        w: boxWidth,\n                        h: boxHeight,\n                        radius: borderRadius\n                    });\n                } else {\n                    ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n                }\n                ctx.fill();\n                if (lineWidth !== 0) {\n                    ctx.stroke();\n                }\n            }\n            ctx.restore();\n        };\n        const fillText = function(x, y, legendItem) {\n            renderText(ctx, legendItem.text, x, y + itemHeight / 2, labelFont, {\n                strikethrough: legendItem.hidden,\n                textAlign: rtlHelper.textAlign(legendItem.textAlign)\n            });\n        };\n        const isHorizontal = this.isHorizontal();\n        const titleHeight = this._computeTitleHeight();\n        if (isHorizontal) {\n            cursor = {\n                x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n                y: this.top + padding + titleHeight,\n                line: 0\n            };\n        } else {\n            cursor = {\n                x: this.left + padding,\n                y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n                line: 0\n            };\n        }\n        overrideTextDirection(this.ctx, opts.textDirection);\n        const lineHeight = itemHeight + padding;\n        this.legendItems.forEach((legendItem, i)=>{\n            ctx.strokeStyle = legendItem.fontColor;\n            ctx.fillStyle = legendItem.fontColor;\n            const textWidth = ctx.measureText(legendItem.text).width;\n            const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n            const width = boxWidth + halfFontSize + textWidth;\n            let x = cursor.x;\n            let y = cursor.y;\n            rtlHelper.setWidth(this.width);\n            if (isHorizontal) {\n                if (i > 0 && x + width + padding > this.right) {\n                    y = cursor.y += lineHeight;\n                    cursor.line++;\n                    x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n                }\n            } else if (i > 0 && y + lineHeight > this.bottom) {\n                x = cursor.x = x + columnSizes[cursor.line].width + padding;\n                cursor.line++;\n                y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n            }\n            const realX = rtlHelper.x(x);\n            drawLegendBox(realX, y, legendItem);\n            x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n            fillText(rtlHelper.x(x), y, legendItem);\n            if (isHorizontal) {\n                cursor.x += width + padding;\n            } else if (typeof legendItem.text !== 'string') {\n                const fontLineHeight = labelFont.lineHeight;\n                cursor.y += calculateLegendItemHeight(legendItem, fontLineHeight) + padding;\n            } else {\n                cursor.y += lineHeight;\n            }\n        });\n        restoreTextDirection(this.ctx, opts.textDirection);\n    }\n drawTitle() {\n        const opts = this.options;\n        const titleOpts = opts.title;\n        const titleFont = toFont(titleOpts.font);\n        const titlePadding = toPadding(titleOpts.padding);\n        if (!titleOpts.display) {\n            return;\n        }\n        const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n        const ctx = this.ctx;\n        const position = titleOpts.position;\n        const halfFontSize = titleFont.size / 2;\n        const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n        let y;\n        let left = this.left;\n        let maxWidth = this.width;\n        if (this.isHorizontal()) {\n            maxWidth = Math.max(...this.lineWidths);\n            y = this.top + topPaddingPlusHalfFontSize;\n            left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n        } else {\n            const maxHeight = this.columnSizes.reduce((acc, size)=>Math.max(acc, size.height), 0);\n            y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n        }\n        const x = _alignStartEnd(position, left, left + maxWidth);\n        ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n        ctx.textBaseline = 'middle';\n        ctx.strokeStyle = titleOpts.color;\n        ctx.fillStyle = titleOpts.color;\n        ctx.font = titleFont.string;\n        renderText(ctx, titleOpts.text, x, y, titleFont);\n    }\n _computeTitleHeight() {\n        const titleOpts = this.options.title;\n        const titleFont = toFont(titleOpts.font);\n        const titlePadding = toPadding(titleOpts.padding);\n        return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n    }\n _getLegendItemAt(x, y) {\n        let i, hitBox, lh;\n        if (_isBetween(x, this.left, this.right) && _isBetween(y, this.top, this.bottom)) {\n            lh = this.legendHitBoxes;\n            for(i = 0; i < lh.length; ++i){\n                hitBox = lh[i];\n                if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width) && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n                    return this.legendItems[i];\n                }\n            }\n        }\n        return null;\n    }\n handleEvent(e) {\n        const opts = this.options;\n        if (!isListened(e.type, opts)) {\n            return;\n        }\n        const hoveredItem = this._getLegendItemAt(e.x, e.y);\n        if (e.type === 'mousemove' || e.type === 'mouseout') {\n            const previous = this._hoveredItem;\n            const sameItem = itemsEqual(previous, hoveredItem);\n            if (previous && !sameItem) {\n                callback(opts.onLeave, [\n                    e,\n                    previous,\n                    this\n                ], this);\n            }\n            this._hoveredItem = hoveredItem;\n            if (hoveredItem && !sameItem) {\n                callback(opts.onHover, [\n                    e,\n                    hoveredItem,\n                    this\n                ], this);\n            }\n        } else if (hoveredItem) {\n            callback(opts.onClick, [\n                e,\n                hoveredItem,\n                this\n            ], this);\n        }\n    }\n}\nfunction calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {\n    const itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);\n    const itemHeight = calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight);\n    return {\n        itemWidth,\n        itemHeight\n    };\n}\nfunction calculateItemWidth(legendItem, boxWidth, labelFont, ctx) {\n    let legendItemText = legendItem.text;\n    if (legendItemText && typeof legendItemText !== 'string') {\n        legendItemText = legendItemText.reduce((a, b)=>a.length > b.length ? a : b);\n    }\n    return boxWidth + labelFont.size / 2 + ctx.measureText(legendItemText).width;\n}\nfunction calculateItemHeight(_itemHeight, legendItem, fontLineHeight) {\n    let itemHeight = _itemHeight;\n    if (typeof legendItem.text !== 'string') {\n        itemHeight = calculateLegendItemHeight(legendItem, fontLineHeight);\n    }\n    return itemHeight;\n}\nfunction calculateLegendItemHeight(legendItem, fontLineHeight) {\n    const labelHeight = legendItem.text ? legendItem.text.length : 0;\n    return fontLineHeight * labelHeight;\n}\nfunction isListened(type, opts) {\n    if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n        return true;\n    }\n    if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n        return true;\n    }\n    return false;\n}\nvar plugin_legend = {\n    id: 'legend',\n _element: Legend,\n    start (chart, _args, options) {\n        const legend = chart.legend = new Legend({\n            ctx: chart.ctx,\n            options,\n            chart\n        });\n        layouts.configure(chart, legend, options);\n        layouts.addBox(chart, legend);\n    },\n    stop (chart) {\n        layouts.removeBox(chart, chart.legend);\n        delete chart.legend;\n    },\n    beforeUpdate (chart, _args, options) {\n        const legend = chart.legend;\n        layouts.configure(chart, legend, options);\n        legend.options = options;\n    },\n    afterUpdate (chart) {\n        const legend = chart.legend;\n        legend.buildLabels();\n        legend.adjustHitBoxes();\n    },\n    afterEvent (chart, args) {\n        if (!args.replay) {\n            chart.legend.handleEvent(args.event);\n        }\n    },\n    defaults: {\n        display: true,\n        position: 'top',\n        align: 'center',\n        fullSize: true,\n        reverse: false,\n        weight: 1000,\n        onClick (e, legendItem, legend) {\n            const index = legendItem.datasetIndex;\n            const ci = legend.chart;\n            if (ci.isDatasetVisible(index)) {\n                ci.hide(index);\n                legendItem.hidden = true;\n            } else {\n                ci.show(index);\n                legendItem.hidden = false;\n            }\n        },\n        onHover: null,\n        onLeave: null,\n        labels: {\n            color: (ctx)=>ctx.chart.options.color,\n            boxWidth: 40,\n            padding: 10,\n            generateLabels (chart) {\n                const datasets = chart.data.datasets;\n                const { labels: { usePointStyle , pointStyle , textAlign , color , useBorderRadius , borderRadius  }  } = chart.legend.options;\n                return chart._getSortedDatasetMetas().map((meta)=>{\n                    const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n                    const borderWidth = toPadding(style.borderWidth);\n                    return {\n                        text: datasets[meta.index].label,\n                        fillStyle: style.backgroundColor,\n                        fontColor: color,\n                        hidden: !meta.visible,\n                        lineCap: style.borderCapStyle,\n                        lineDash: style.borderDash,\n                        lineDashOffset: style.borderDashOffset,\n                        lineJoin: style.borderJoinStyle,\n                        lineWidth: (borderWidth.width + borderWidth.height) / 4,\n                        strokeStyle: style.borderColor,\n                        pointStyle: pointStyle || style.pointStyle,\n                        rotation: style.rotation,\n                        textAlign: textAlign || style.textAlign,\n                        borderRadius: useBorderRadius && (borderRadius || style.borderRadius),\n                        datasetIndex: meta.index\n                    };\n                }, this);\n            }\n        },\n        title: {\n            color: (ctx)=>ctx.chart.options.color,\n            display: false,\n            position: 'center',\n            text: ''\n        }\n    },\n    descriptors: {\n        _scriptable: (name)=>!name.startsWith('on'),\n        labels: {\n            _scriptable: (name)=>![\n                    'generateLabels',\n                    'filter',\n                    'sort'\n                ].includes(name)\n        }\n    }\n};\n\nclass Title extends Element {\n constructor(config){\n        super();\n        this.chart = config.chart;\n        this.options = config.options;\n        this.ctx = config.ctx;\n        this._padding = undefined;\n        this.top = undefined;\n        this.bottom = undefined;\n        this.left = undefined;\n        this.right = undefined;\n        this.width = undefined;\n        this.height = undefined;\n        this.position = undefined;\n        this.weight = undefined;\n        this.fullSize = undefined;\n    }\n    update(maxWidth, maxHeight) {\n        const opts = this.options;\n        this.left = 0;\n        this.top = 0;\n        if (!opts.display) {\n            this.width = this.height = this.right = this.bottom = 0;\n            return;\n        }\n        this.width = this.right = maxWidth;\n        this.height = this.bottom = maxHeight;\n        const lineCount = isArray(opts.text) ? opts.text.length : 1;\n        this._padding = toPadding(opts.padding);\n        const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n        if (this.isHorizontal()) {\n            this.height = textSize;\n        } else {\n            this.width = textSize;\n        }\n    }\n    isHorizontal() {\n        const pos = this.options.position;\n        return pos === 'top' || pos === 'bottom';\n    }\n    _drawArgs(offset) {\n        const { top , left , bottom , right , options  } = this;\n        const align = options.align;\n        let rotation = 0;\n        let maxWidth, titleX, titleY;\n        if (this.isHorizontal()) {\n            titleX = _alignStartEnd(align, left, right);\n            titleY = top + offset;\n            maxWidth = right - left;\n        } else {\n            if (options.position === 'left') {\n                titleX = left + offset;\n                titleY = _alignStartEnd(align, bottom, top);\n                rotation = PI * -0.5;\n            } else {\n                titleX = right - offset;\n                titleY = _alignStartEnd(align, top, bottom);\n                rotation = PI * 0.5;\n            }\n            maxWidth = bottom - top;\n        }\n        return {\n            titleX,\n            titleY,\n            maxWidth,\n            rotation\n        };\n    }\n    draw() {\n        const ctx = this.ctx;\n        const opts = this.options;\n        if (!opts.display) {\n            return;\n        }\n        const fontOpts = toFont(opts.font);\n        const lineHeight = fontOpts.lineHeight;\n        const offset = lineHeight / 2 + this._padding.top;\n        const { titleX , titleY , maxWidth , rotation  } = this._drawArgs(offset);\n        renderText(ctx, opts.text, 0, 0, fontOpts, {\n            color: opts.color,\n            maxWidth,\n            rotation,\n            textAlign: _toLeftRightCenter(opts.align),\n            textBaseline: 'middle',\n            translation: [\n                titleX,\n                titleY\n            ]\n        });\n    }\n}\nfunction createTitle(chart, titleOpts) {\n    const title = new Title({\n        ctx: chart.ctx,\n        options: titleOpts,\n        chart\n    });\n    layouts.configure(chart, title, titleOpts);\n    layouts.addBox(chart, title);\n    chart.titleBlock = title;\n}\nvar plugin_title = {\n    id: 'title',\n _element: Title,\n    start (chart, _args, options) {\n        createTitle(chart, options);\n    },\n    stop (chart) {\n        const titleBlock = chart.titleBlock;\n        layouts.removeBox(chart, titleBlock);\n        delete chart.titleBlock;\n    },\n    beforeUpdate (chart, _args, options) {\n        const title = chart.titleBlock;\n        layouts.configure(chart, title, options);\n        title.options = options;\n    },\n    defaults: {\n        align: 'center',\n        display: false,\n        font: {\n            weight: 'bold'\n        },\n        fullSize: true,\n        padding: 10,\n        position: 'top',\n        text: '',\n        weight: 2000\n    },\n    defaultRoutes: {\n        color: 'color'\n    },\n    descriptors: {\n        _scriptable: true,\n        _indexable: false\n    }\n};\n\nconst map = new WeakMap();\nvar plugin_subtitle = {\n    id: 'subtitle',\n    start (chart, _args, options) {\n        const title = new Title({\n            ctx: chart.ctx,\n            options,\n            chart\n        });\n        layouts.configure(chart, title, options);\n        layouts.addBox(chart, title);\n        map.set(chart, title);\n    },\n    stop (chart) {\n        layouts.removeBox(chart, map.get(chart));\n        map.delete(chart);\n    },\n    beforeUpdate (chart, _args, options) {\n        const title = map.get(chart);\n        layouts.configure(chart, title, options);\n        title.options = options;\n    },\n    defaults: {\n        align: 'center',\n        display: false,\n        font: {\n            weight: 'normal'\n        },\n        fullSize: true,\n        padding: 0,\n        position: 'top',\n        text: '',\n        weight: 1500\n    },\n    defaultRoutes: {\n        color: 'color'\n    },\n    descriptors: {\n        _scriptable: true,\n        _indexable: false\n    }\n};\n\nconst positioners = {\n average (items) {\n        if (!items.length) {\n            return false;\n        }\n        let i, len;\n        let xSet = new Set();\n        let y = 0;\n        let count = 0;\n        for(i = 0, len = items.length; i < len; ++i){\n            const el = items[i].element;\n            if (el && el.hasValue()) {\n                const pos = el.tooltipPosition();\n                xSet.add(pos.x);\n                y += pos.y;\n                ++count;\n            }\n        }\n        if (count === 0 || xSet.size === 0) {\n            return false;\n        }\n        const xAverage = [\n            ...xSet\n        ].reduce((a, b)=>a + b) / xSet.size;\n        return {\n            x: xAverage,\n            y: y / count\n        };\n    },\n nearest (items, eventPosition) {\n        if (!items.length) {\n            return false;\n        }\n        let x = eventPosition.x;\n        let y = eventPosition.y;\n        let minDistance = Number.POSITIVE_INFINITY;\n        let i, len, nearestElement;\n        for(i = 0, len = items.length; i < len; ++i){\n            const el = items[i].element;\n            if (el && el.hasValue()) {\n                const center = el.getCenterPoint();\n                const d = distanceBetweenPoints(eventPosition, center);\n                if (d < minDistance) {\n                    minDistance = d;\n                    nearestElement = el;\n                }\n            }\n        }\n        if (nearestElement) {\n            const tp = nearestElement.tooltipPosition();\n            x = tp.x;\n            y = tp.y;\n        }\n        return {\n            x,\n            y\n        };\n    }\n};\nfunction pushOrConcat(base, toPush) {\n    if (toPush) {\n        if (isArray(toPush)) {\n            Array.prototype.push.apply(base, toPush);\n        } else {\n            base.push(toPush);\n        }\n    }\n    return base;\n}\n function splitNewlines(str) {\n    if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n        return str.split('\\n');\n    }\n    return str;\n}\n function createTooltipItem(chart, item) {\n    const { element , datasetIndex , index  } = item;\n    const controller = chart.getDatasetMeta(datasetIndex).controller;\n    const { label , value  } = controller.getLabelAndValue(index);\n    return {\n        chart,\n        label,\n        parsed: controller.getParsed(index),\n        raw: chart.data.datasets[datasetIndex].data[index],\n        formattedValue: value,\n        dataset: controller.getDataset(),\n        dataIndex: index,\n        datasetIndex,\n        element\n    };\n}\n function getTooltipSize(tooltip, options) {\n    const ctx = tooltip.chart.ctx;\n    const { body , footer , title  } = tooltip;\n    const { boxWidth , boxHeight  } = options;\n    const bodyFont = toFont(options.bodyFont);\n    const titleFont = toFont(options.titleFont);\n    const footerFont = toFont(options.footerFont);\n    const titleLineCount = title.length;\n    const footerLineCount = footer.length;\n    const bodyLineItemCount = body.length;\n    const padding = toPadding(options.padding);\n    let height = padding.height;\n    let width = 0;\n    let combinedBodyLength = body.reduce((count, bodyItem)=>count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n    combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n    if (titleLineCount) {\n        height += titleLineCount * titleFont.lineHeight + (titleLineCount - 1) * options.titleSpacing + options.titleMarginBottom;\n    }\n    if (combinedBodyLength) {\n        const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n        height += bodyLineItemCount * bodyLineHeight + (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight + (combinedBodyLength - 1) * options.bodySpacing;\n    }\n    if (footerLineCount) {\n        height += options.footerMarginTop + footerLineCount * footerFont.lineHeight + (footerLineCount - 1) * options.footerSpacing;\n    }\n    let widthPadding = 0;\n    const maxLineWidth = function(line) {\n        width = Math.max(width, ctx.measureText(line).width + widthPadding);\n    };\n    ctx.save();\n    ctx.font = titleFont.string;\n    each(tooltip.title, maxLineWidth);\n    ctx.font = bodyFont.string;\n    each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n    widthPadding = options.displayColors ? boxWidth + 2 + options.boxPadding : 0;\n    each(body, (bodyItem)=>{\n        each(bodyItem.before, maxLineWidth);\n        each(bodyItem.lines, maxLineWidth);\n        each(bodyItem.after, maxLineWidth);\n    });\n    widthPadding = 0;\n    ctx.font = footerFont.string;\n    each(tooltip.footer, maxLineWidth);\n    ctx.restore();\n    width += padding.width;\n    return {\n        width,\n        height\n    };\n}\nfunction determineYAlign(chart, size) {\n    const { y , height  } = size;\n    if (y < height / 2) {\n        return 'top';\n    } else if (y > chart.height - height / 2) {\n        return 'bottom';\n    }\n    return 'center';\n}\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n    const { x , width  } = size;\n    const caret = options.caretSize + options.caretPadding;\n    if (xAlign === 'left' && x + width + caret > chart.width) {\n        return true;\n    }\n    if (xAlign === 'right' && x - width - caret < 0) {\n        return true;\n    }\n}\nfunction determineXAlign(chart, options, size, yAlign) {\n    const { x , width  } = size;\n    const { width: chartWidth , chartArea: { left , right  }  } = chart;\n    let xAlign = 'center';\n    if (yAlign === 'center') {\n        xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n    } else if (x <= width / 2) {\n        xAlign = 'left';\n    } else if (x >= chartWidth - width / 2) {\n        xAlign = 'right';\n    }\n    if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n        xAlign = 'center';\n    }\n    return xAlign;\n}\n function determineAlignment(chart, options, size) {\n    const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n    return {\n        xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n        yAlign\n    };\n}\nfunction alignX(size, xAlign) {\n    let { x , width  } = size;\n    if (xAlign === 'right') {\n        x -= width;\n    } else if (xAlign === 'center') {\n        x -= width / 2;\n    }\n    return x;\n}\nfunction alignY(size, yAlign, paddingAndSize) {\n    let { y , height  } = size;\n    if (yAlign === 'top') {\n        y += paddingAndSize;\n    } else if (yAlign === 'bottom') {\n        y -= height + paddingAndSize;\n    } else {\n        y -= height / 2;\n    }\n    return y;\n}\n function getBackgroundPoint(options, size, alignment, chart) {\n    const { caretSize , caretPadding , cornerRadius  } = options;\n    const { xAlign , yAlign  } = alignment;\n    const paddingAndSize = caretSize + caretPadding;\n    const { topLeft , topRight , bottomLeft , bottomRight  } = toTRBLCorners(cornerRadius);\n    let x = alignX(size, xAlign);\n    const y = alignY(size, yAlign, paddingAndSize);\n    if (yAlign === 'center') {\n        if (xAlign === 'left') {\n            x += paddingAndSize;\n        } else if (xAlign === 'right') {\n            x -= paddingAndSize;\n        }\n    } else if (xAlign === 'left') {\n        x -= Math.max(topLeft, bottomLeft) + caretSize;\n    } else if (xAlign === 'right') {\n        x += Math.max(topRight, bottomRight) + caretSize;\n    }\n    return {\n        x: _limitValue(x, 0, chart.width - size.width),\n        y: _limitValue(y, 0, chart.height - size.height)\n    };\n}\nfunction getAlignedX(tooltip, align, options) {\n    const padding = toPadding(options.padding);\n    return align === 'center' ? tooltip.x + tooltip.width / 2 : align === 'right' ? tooltip.x + tooltip.width - padding.right : tooltip.x + padding.left;\n}\n function getBeforeAfterBodyLines(callback) {\n    return pushOrConcat([], splitNewlines(callback));\n}\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n    return createContext(parent, {\n        tooltip,\n        tooltipItems,\n        type: 'tooltip'\n    });\n}\nfunction overrideCallbacks(callbacks, context) {\n    const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n    return override ? callbacks.override(override) : callbacks;\n}\nconst defaultCallbacks = {\n    beforeTitle: noop,\n    title (tooltipItems) {\n        if (tooltipItems.length > 0) {\n            const item = tooltipItems[0];\n            const labels = item.chart.data.labels;\n            const labelCount = labels ? labels.length : 0;\n            if (this && this.options && this.options.mode === 'dataset') {\n                return item.dataset.label || '';\n            } else if (item.label) {\n                return item.label;\n            } else if (labelCount > 0 && item.dataIndex < labelCount) {\n                return labels[item.dataIndex];\n            }\n        }\n        return '';\n    },\n    afterTitle: noop,\n    beforeBody: noop,\n    beforeLabel: noop,\n    label (tooltipItem) {\n        if (this && this.options && this.options.mode === 'dataset') {\n            return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n        }\n        let label = tooltipItem.dataset.label || '';\n        if (label) {\n            label += ': ';\n        }\n        const value = tooltipItem.formattedValue;\n        if (!isNullOrUndef(value)) {\n            label += value;\n        }\n        return label;\n    },\n    labelColor (tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n            borderColor: options.borderColor,\n            backgroundColor: options.backgroundColor,\n            borderWidth: options.borderWidth,\n            borderDash: options.borderDash,\n            borderDashOffset: options.borderDashOffset,\n            borderRadius: 0\n        };\n    },\n    labelTextColor () {\n        return this.options.bodyColor;\n    },\n    labelPointStyle (tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n            pointStyle: options.pointStyle,\n            rotation: options.rotation\n        };\n    },\n    afterLabel: noop,\n    afterBody: noop,\n    beforeFooter: noop,\n    footer: noop,\n    afterFooter: noop\n};\n function invokeCallbackWithFallback(callbacks, name, ctx, arg) {\n    const result = callbacks[name].call(ctx, arg);\n    if (typeof result === 'undefined') {\n        return defaultCallbacks[name].call(ctx, arg);\n    }\n    return result;\n}\nclass Tooltip extends Element {\n static positioners = positioners;\n    constructor(config){\n        super();\n        this.opacity = 0;\n        this._active = [];\n        this._eventPosition = undefined;\n        this._size = undefined;\n        this._cachedAnimations = undefined;\n        this._tooltipItems = [];\n        this.$animations = undefined;\n        this.$context = undefined;\n        this.chart = config.chart;\n        this.options = config.options;\n        this.dataPoints = undefined;\n        this.title = undefined;\n        this.beforeBody = undefined;\n        this.body = undefined;\n        this.afterBody = undefined;\n        this.footer = undefined;\n        this.xAlign = undefined;\n        this.yAlign = undefined;\n        this.x = undefined;\n        this.y = undefined;\n        this.height = undefined;\n        this.width = undefined;\n        this.caretX = undefined;\n        this.caretY = undefined;\n        this.labelColors = undefined;\n        this.labelPointStyles = undefined;\n        this.labelTextColors = undefined;\n    }\n    initialize(options) {\n        this.options = options;\n        this._cachedAnimations = undefined;\n        this.$context = undefined;\n    }\n _resolveAnimations() {\n        const cached = this._cachedAnimations;\n        if (cached) {\n            return cached;\n        }\n        const chart = this.chart;\n        const options = this.options.setContext(this.getContext());\n        const opts = options.enabled && chart.options.animation && options.animations;\n        const animations = new Animations(this.chart, opts);\n        if (opts._cacheable) {\n            this._cachedAnimations = Object.freeze(animations);\n        }\n        return animations;\n    }\n getContext() {\n        return this.$context || (this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n    }\n    getTitle(context, options) {\n        const { callbacks  } = options;\n        const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);\n        const title = invokeCallbackWithFallback(callbacks, 'title', this, context);\n        const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);\n        let lines = [];\n        lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n        lines = pushOrConcat(lines, splitNewlines(title));\n        lines = pushOrConcat(lines, splitNewlines(afterTitle));\n        return lines;\n    }\n    getBeforeBody(tooltipItems, options) {\n        return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'beforeBody', this, tooltipItems));\n    }\n    getBody(tooltipItems, options) {\n        const { callbacks  } = options;\n        const bodyItems = [];\n        each(tooltipItems, (context)=>{\n            const bodyItem = {\n                before: [],\n                lines: [],\n                after: []\n            };\n            const scoped = overrideCallbacks(callbacks, context);\n            pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));\n            pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));\n            pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));\n            bodyItems.push(bodyItem);\n        });\n        return bodyItems;\n    }\n    getAfterBody(tooltipItems, options) {\n        return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'afterBody', this, tooltipItems));\n    }\n    getFooter(tooltipItems, options) {\n        const { callbacks  } = options;\n        const beforeFooter = invokeCallbackWithFallback(callbacks, 'beforeFooter', this, tooltipItems);\n        const footer = invokeCallbackWithFallback(callbacks, 'footer', this, tooltipItems);\n        const afterFooter = invokeCallbackWithFallback(callbacks, 'afterFooter', this, tooltipItems);\n        let lines = [];\n        lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n        lines = pushOrConcat(lines, splitNewlines(footer));\n        lines = pushOrConcat(lines, splitNewlines(afterFooter));\n        return lines;\n    }\n _createItems(options) {\n        const active = this._active;\n        const data = this.chart.data;\n        const labelColors = [];\n        const labelPointStyles = [];\n        const labelTextColors = [];\n        let tooltipItems = [];\n        let i, len;\n        for(i = 0, len = active.length; i < len; ++i){\n            tooltipItems.push(createTooltipItem(this.chart, active[i]));\n        }\n        if (options.filter) {\n            tooltipItems = tooltipItems.filter((element, index, array)=>options.filter(element, index, array, data));\n        }\n        if (options.itemSort) {\n            tooltipItems = tooltipItems.sort((a, b)=>options.itemSort(a, b, data));\n        }\n        each(tooltipItems, (context)=>{\n            const scoped = overrideCallbacks(options.callbacks, context);\n            labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', this, context));\n            labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', this, context));\n            labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', this, context));\n        });\n        this.labelColors = labelColors;\n        this.labelPointStyles = labelPointStyles;\n        this.labelTextColors = labelTextColors;\n        this.dataPoints = tooltipItems;\n        return tooltipItems;\n    }\n    update(changed, replay) {\n        const options = this.options.setContext(this.getContext());\n        const active = this._active;\n        let properties;\n        let tooltipItems = [];\n        if (!active.length) {\n            if (this.opacity !== 0) {\n                properties = {\n                    opacity: 0\n                };\n            }\n        } else {\n            const position = positioners[options.position].call(this, active, this._eventPosition);\n            tooltipItems = this._createItems(options);\n            this.title = this.getTitle(tooltipItems, options);\n            this.beforeBody = this.getBeforeBody(tooltipItems, options);\n            this.body = this.getBody(tooltipItems, options);\n            this.afterBody = this.getAfterBody(tooltipItems, options);\n            this.footer = this.getFooter(tooltipItems, options);\n            const size = this._size = getTooltipSize(this, options);\n            const positionAndSize = Object.assign({}, position, size);\n            const alignment = determineAlignment(this.chart, options, positionAndSize);\n            const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n            this.xAlign = alignment.xAlign;\n            this.yAlign = alignment.yAlign;\n            properties = {\n                opacity: 1,\n                x: backgroundPoint.x,\n                y: backgroundPoint.y,\n                width: size.width,\n                height: size.height,\n                caretX: position.x,\n                caretY: position.y\n            };\n        }\n        this._tooltipItems = tooltipItems;\n        this.$context = undefined;\n        if (properties) {\n            this._resolveAnimations().update(this, properties);\n        }\n        if (changed && options.external) {\n            options.external.call(this, {\n                chart: this.chart,\n                tooltip: this,\n                replay\n            });\n        }\n    }\n    drawCaret(tooltipPoint, ctx, size, options) {\n        const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n        ctx.lineTo(caretPosition.x1, caretPosition.y1);\n        ctx.lineTo(caretPosition.x2, caretPosition.y2);\n        ctx.lineTo(caretPosition.x3, caretPosition.y3);\n    }\n    getCaretPosition(tooltipPoint, size, options) {\n        const { xAlign , yAlign  } = this;\n        const { caretSize , cornerRadius  } = options;\n        const { topLeft , topRight , bottomLeft , bottomRight  } = toTRBLCorners(cornerRadius);\n        const { x: ptX , y: ptY  } = tooltipPoint;\n        const { width , height  } = size;\n        let x1, x2, x3, y1, y2, y3;\n        if (yAlign === 'center') {\n            y2 = ptY + height / 2;\n            if (xAlign === 'left') {\n                x1 = ptX;\n                x2 = x1 - caretSize;\n                y1 = y2 + caretSize;\n                y3 = y2 - caretSize;\n            } else {\n                x1 = ptX + width;\n                x2 = x1 + caretSize;\n                y1 = y2 - caretSize;\n                y3 = y2 + caretSize;\n            }\n            x3 = x1;\n        } else {\n            if (xAlign === 'left') {\n                x2 = ptX + Math.max(topLeft, bottomLeft) + caretSize;\n            } else if (xAlign === 'right') {\n                x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n            } else {\n                x2 = this.caretX;\n            }\n            if (yAlign === 'top') {\n                y1 = ptY;\n                y2 = y1 - caretSize;\n                x1 = x2 - caretSize;\n                x3 = x2 + caretSize;\n            } else {\n                y1 = ptY + height;\n                y2 = y1 + caretSize;\n                x1 = x2 + caretSize;\n                x3 = x2 - caretSize;\n            }\n            y3 = y1;\n        }\n        return {\n            x1,\n            x2,\n            x3,\n            y1,\n            y2,\n            y3\n        };\n    }\n    drawTitle(pt, ctx, options) {\n        const title = this.title;\n        const length = title.length;\n        let titleFont, titleSpacing, i;\n        if (length) {\n            const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n            pt.x = getAlignedX(this, options.titleAlign, options);\n            ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n            ctx.textBaseline = 'middle';\n            titleFont = toFont(options.titleFont);\n            titleSpacing = options.titleSpacing;\n            ctx.fillStyle = options.titleColor;\n            ctx.font = titleFont.string;\n            for(i = 0; i < length; ++i){\n                ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n                pt.y += titleFont.lineHeight + titleSpacing;\n                if (i + 1 === length) {\n                    pt.y += options.titleMarginBottom - titleSpacing;\n                }\n            }\n        }\n    }\n _drawColorBox(ctx, pt, i, rtlHelper, options) {\n        const labelColor = this.labelColors[i];\n        const labelPointStyle = this.labelPointStyles[i];\n        const { boxHeight , boxWidth  } = options;\n        const bodyFont = toFont(options.bodyFont);\n        const colorX = getAlignedX(this, 'left', options);\n        const rtlColorX = rtlHelper.x(colorX);\n        const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n        const colorY = pt.y + yOffSet;\n        if (options.usePointStyle) {\n            const drawOptions = {\n                radius: Math.min(boxWidth, boxHeight) / 2,\n                pointStyle: labelPointStyle.pointStyle,\n                rotation: labelPointStyle.rotation,\n                borderWidth: 1\n            };\n            const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n            const centerY = colorY + boxHeight / 2;\n            ctx.strokeStyle = options.multiKeyBackground;\n            ctx.fillStyle = options.multiKeyBackground;\n            drawPoint(ctx, drawOptions, centerX, centerY);\n            ctx.strokeStyle = labelColor.borderColor;\n            ctx.fillStyle = labelColor.backgroundColor;\n            drawPoint(ctx, drawOptions, centerX, centerY);\n        } else {\n            ctx.lineWidth = isObject(labelColor.borderWidth) ? Math.max(...Object.values(labelColor.borderWidth)) : labelColor.borderWidth || 1;\n            ctx.strokeStyle = labelColor.borderColor;\n            ctx.setLineDash(labelColor.borderDash || []);\n            ctx.lineDashOffset = labelColor.borderDashOffset || 0;\n            const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth);\n            const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);\n            const borderRadius = toTRBLCorners(labelColor.borderRadius);\n            if (Object.values(borderRadius).some((v)=>v !== 0)) {\n                ctx.beginPath();\n                ctx.fillStyle = options.multiKeyBackground;\n                addRoundedRectPath(ctx, {\n                    x: outerX,\n                    y: colorY,\n                    w: boxWidth,\n                    h: boxHeight,\n                    radius: borderRadius\n                });\n                ctx.fill();\n                ctx.stroke();\n                ctx.fillStyle = labelColor.backgroundColor;\n                ctx.beginPath();\n                addRoundedRectPath(ctx, {\n                    x: innerX,\n                    y: colorY + 1,\n                    w: boxWidth - 2,\n                    h: boxHeight - 2,\n                    radius: borderRadius\n                });\n                ctx.fill();\n            } else {\n                ctx.fillStyle = options.multiKeyBackground;\n                ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n                ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n                ctx.fillStyle = labelColor.backgroundColor;\n                ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n            }\n        }\n        ctx.fillStyle = this.labelTextColors[i];\n    }\n    drawBody(pt, ctx, options) {\n        const { body  } = this;\n        const { bodySpacing , bodyAlign , displayColors , boxHeight , boxWidth , boxPadding  } = options;\n        const bodyFont = toFont(options.bodyFont);\n        let bodyLineHeight = bodyFont.lineHeight;\n        let xLinePadding = 0;\n        const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n        const fillLineOfText = function(line) {\n            ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n            pt.y += bodyLineHeight + bodySpacing;\n        };\n        const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n        let bodyItem, textColor, lines, i, j, ilen, jlen;\n        ctx.textAlign = bodyAlign;\n        ctx.textBaseline = 'middle';\n        ctx.font = bodyFont.string;\n        pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n        ctx.fillStyle = options.bodyColor;\n        each(this.beforeBody, fillLineOfText);\n        xLinePadding = displayColors && bodyAlignForCalculation !== 'right' ? bodyAlign === 'center' ? boxWidth / 2 + boxPadding : boxWidth + 2 + boxPadding : 0;\n        for(i = 0, ilen = body.length; i < ilen; ++i){\n            bodyItem = body[i];\n            textColor = this.labelTextColors[i];\n            ctx.fillStyle = textColor;\n            each(bodyItem.before, fillLineOfText);\n            lines = bodyItem.lines;\n            if (displayColors && lines.length) {\n                this._drawColorBox(ctx, pt, i, rtlHelper, options);\n                bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n            }\n            for(j = 0, jlen = lines.length; j < jlen; ++j){\n                fillLineOfText(lines[j]);\n                bodyLineHeight = bodyFont.lineHeight;\n            }\n            each(bodyItem.after, fillLineOfText);\n        }\n        xLinePadding = 0;\n        bodyLineHeight = bodyFont.lineHeight;\n        each(this.afterBody, fillLineOfText);\n        pt.y -= bodySpacing;\n    }\n    drawFooter(pt, ctx, options) {\n        const footer = this.footer;\n        const length = footer.length;\n        let footerFont, i;\n        if (length) {\n            const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n            pt.x = getAlignedX(this, options.footerAlign, options);\n            pt.y += options.footerMarginTop;\n            ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n            ctx.textBaseline = 'middle';\n            footerFont = toFont(options.footerFont);\n            ctx.fillStyle = options.footerColor;\n            ctx.font = footerFont.string;\n            for(i = 0; i < length; ++i){\n                ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n                pt.y += footerFont.lineHeight + options.footerSpacing;\n            }\n        }\n    }\n    drawBackground(pt, ctx, tooltipSize, options) {\n        const { xAlign , yAlign  } = this;\n        const { x , y  } = pt;\n        const { width , height  } = tooltipSize;\n        const { topLeft , topRight , bottomLeft , bottomRight  } = toTRBLCorners(options.cornerRadius);\n        ctx.fillStyle = options.backgroundColor;\n        ctx.strokeStyle = options.borderColor;\n        ctx.lineWidth = options.borderWidth;\n        ctx.beginPath();\n        ctx.moveTo(x + topLeft, y);\n        if (yAlign === 'top') {\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + width - topRight, y);\n        ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n        if (yAlign === 'center' && xAlign === 'right') {\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + width, y + height - bottomRight);\n        ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n        if (yAlign === 'bottom') {\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + bottomLeft, y + height);\n        ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n        if (yAlign === 'center' && xAlign === 'left') {\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x, y + topLeft);\n        ctx.quadraticCurveTo(x, y, x + topLeft, y);\n        ctx.closePath();\n        ctx.fill();\n        if (options.borderWidth > 0) {\n            ctx.stroke();\n        }\n    }\n _updateAnimationTarget(options) {\n        const chart = this.chart;\n        const anims = this.$animations;\n        const animX = anims && anims.x;\n        const animY = anims && anims.y;\n        if (animX || animY) {\n            const position = positioners[options.position].call(this, this._active, this._eventPosition);\n            if (!position) {\n                return;\n            }\n            const size = this._size = getTooltipSize(this, options);\n            const positionAndSize = Object.assign({}, position, this._size);\n            const alignment = determineAlignment(chart, options, positionAndSize);\n            const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n            if (animX._to !== point.x || animY._to !== point.y) {\n                this.xAlign = alignment.xAlign;\n                this.yAlign = alignment.yAlign;\n                this.width = size.width;\n                this.height = size.height;\n                this.caretX = position.x;\n                this.caretY = position.y;\n                this._resolveAnimations().update(this, point);\n            }\n        }\n    }\n _willRender() {\n        return !!this.opacity;\n    }\n    draw(ctx) {\n        const options = this.options.setContext(this.getContext());\n        let opacity = this.opacity;\n        if (!opacity) {\n            return;\n        }\n        this._updateAnimationTarget(options);\n        const tooltipSize = {\n            width: this.width,\n            height: this.height\n        };\n        const pt = {\n            x: this.x,\n            y: this.y\n        };\n        opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n        const padding = toPadding(options.padding);\n        const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n        if (options.enabled && hasTooltipContent) {\n            ctx.save();\n            ctx.globalAlpha = opacity;\n            this.drawBackground(pt, ctx, tooltipSize, options);\n            overrideTextDirection(ctx, options.textDirection);\n            pt.y += padding.top;\n            this.drawTitle(pt, ctx, options);\n            this.drawBody(pt, ctx, options);\n            this.drawFooter(pt, ctx, options);\n            restoreTextDirection(ctx, options.textDirection);\n            ctx.restore();\n        }\n    }\n getActiveElements() {\n        return this._active || [];\n    }\n setActiveElements(activeElements, eventPosition) {\n        const lastActive = this._active;\n        const active = activeElements.map(({ datasetIndex , index  })=>{\n            const meta = this.chart.getDatasetMeta(datasetIndex);\n            if (!meta) {\n                throw new Error('Cannot find a dataset at index ' + datasetIndex);\n            }\n            return {\n                datasetIndex,\n                element: meta.data[index],\n                index\n            };\n        });\n        const changed = !_elementsEqual(lastActive, active);\n        const positionChanged = this._positionChanged(active, eventPosition);\n        if (changed || positionChanged) {\n            this._active = active;\n            this._eventPosition = eventPosition;\n            this._ignoreReplayEvents = true;\n            this.update(true);\n        }\n    }\n handleEvent(e, replay, inChartArea = true) {\n        if (replay && this._ignoreReplayEvents) {\n            return false;\n        }\n        this._ignoreReplayEvents = false;\n        const options = this.options;\n        const lastActive = this._active || [];\n        const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n        const positionChanged = this._positionChanged(active, e);\n        const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n        if (changed) {\n            this._active = active;\n            if (options.enabled || options.external) {\n                this._eventPosition = {\n                    x: e.x,\n                    y: e.y\n                };\n                this.update(true, replay);\n            }\n        }\n        return changed;\n    }\n _getActiveElements(e, lastActive, replay, inChartArea) {\n        const options = this.options;\n        if (e.type === 'mouseout') {\n            return [];\n        }\n        if (!inChartArea) {\n            return lastActive.filter((i)=>this.chart.data.datasets[i.datasetIndex] && this.chart.getDatasetMeta(i.datasetIndex).controller.getParsed(i.index) !== undefined);\n        }\n        const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n        if (options.reverse) {\n            active.reverse();\n        }\n        return active;\n    }\n _positionChanged(active, e) {\n        const { caretX , caretY , options  } = this;\n        const position = positioners[options.position].call(this, active, e);\n        return position !== false && (caretX !== position.x || caretY !== position.y);\n    }\n}\nvar plugin_tooltip = {\n    id: 'tooltip',\n    _element: Tooltip,\n    positioners,\n    afterInit (chart, _args, options) {\n        if (options) {\n            chart.tooltip = new Tooltip({\n                chart,\n                options\n            });\n        }\n    },\n    beforeUpdate (chart, _args, options) {\n        if (chart.tooltip) {\n            chart.tooltip.initialize(options);\n        }\n    },\n    reset (chart, _args, options) {\n        if (chart.tooltip) {\n            chart.tooltip.initialize(options);\n        }\n    },\n    afterDraw (chart) {\n        const tooltip = chart.tooltip;\n        if (tooltip && tooltip._willRender()) {\n            const args = {\n                tooltip\n            };\n            if (chart.notifyPlugins('beforeTooltipDraw', {\n                ...args,\n                cancelable: true\n            }) === false) {\n                return;\n            }\n            tooltip.draw(chart.ctx);\n            chart.notifyPlugins('afterTooltipDraw', args);\n        }\n    },\n    afterEvent (chart, args) {\n        if (chart.tooltip) {\n            const useFinalPosition = args.replay;\n            if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n                args.changed = true;\n            }\n        }\n    },\n    defaults: {\n        enabled: true,\n        external: null,\n        position: 'average',\n        backgroundColor: 'rgba(0,0,0,0.8)',\n        titleColor: '#fff',\n        titleFont: {\n            weight: 'bold'\n        },\n        titleSpacing: 2,\n        titleMarginBottom: 6,\n        titleAlign: 'left',\n        bodyColor: '#fff',\n        bodySpacing: 2,\n        bodyFont: {},\n        bodyAlign: 'left',\n        footerColor: '#fff',\n        footerSpacing: 2,\n        footerMarginTop: 6,\n        footerFont: {\n            weight: 'bold'\n        },\n        footerAlign: 'left',\n        padding: 6,\n        caretPadding: 2,\n        caretSize: 5,\n        cornerRadius: 6,\n        boxHeight: (ctx, opts)=>opts.bodyFont.size,\n        boxWidth: (ctx, opts)=>opts.bodyFont.size,\n        multiKeyBackground: '#fff',\n        displayColors: true,\n        boxPadding: 0,\n        borderColor: 'rgba(0,0,0,0)',\n        borderWidth: 0,\n        animation: {\n            duration: 400,\n            easing: 'easeOutQuart'\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'width',\n                    'height',\n                    'caretX',\n                    'caretY'\n                ]\n            },\n            opacity: {\n                easing: 'linear',\n                duration: 200\n            }\n        },\n        callbacks: defaultCallbacks\n    },\n    defaultRoutes: {\n        bodyFont: 'font',\n        footerFont: 'font',\n        titleFont: 'font'\n    },\n    descriptors: {\n        _scriptable: (name)=>name !== 'filter' && name !== 'itemSort' && name !== 'external',\n        _indexable: false,\n        callbacks: {\n            _scriptable: false,\n            _indexable: false\n        },\n        animation: {\n            _fallback: false\n        },\n        animations: {\n            _fallback: 'animation'\n        }\n    },\n    additionalOptionScopes: [\n        'interaction'\n    ]\n};\n\nvar plugins = /*#__PURE__*/Object.freeze({\n__proto__: null,\nColors: plugin_colors,\nDecimation: plugin_decimation,\nFiller: index,\nLegend: plugin_legend,\nSubTitle: plugin_subtitle,\nTitle: plugin_title,\nTooltip: plugin_tooltip\n});\n\nconst addIfString = (labels, raw, index, addedLabels)=>{\n    if (typeof raw === 'string') {\n        index = labels.push(raw) - 1;\n        addedLabels.unshift({\n            index,\n            label: raw\n        });\n    } else if (isNaN(raw)) {\n        index = null;\n    }\n    return index;\n};\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n    const first = labels.indexOf(raw);\n    if (first === -1) {\n        return addIfString(labels, raw, index, addedLabels);\n    }\n    const last = labels.lastIndexOf(raw);\n    return first !== last ? index : first;\n}\nconst validIndex = (index, max)=>index === null ? null : _limitValue(Math.round(index), 0, max);\nfunction _getLabelForValue(value) {\n    const labels = this.getLabels();\n    if (value >= 0 && value < labels.length) {\n        return labels[value];\n    }\n    return value;\n}\nclass CategoryScale extends Scale {\n    static id = 'category';\n static defaults = {\n        ticks: {\n            callback: _getLabelForValue\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this._startValue = undefined;\n        this._valueRange = 0;\n        this._addedLabels = [];\n    }\n    init(scaleOptions) {\n        const added = this._addedLabels;\n        if (added.length) {\n            const labels = this.getLabels();\n            for (const { index , label  } of added){\n                if (labels[index] === label) {\n                    labels.splice(index, 1);\n                }\n            }\n            this._addedLabels = [];\n        }\n        super.init(scaleOptions);\n    }\n    parse(raw, index) {\n        if (isNullOrUndef(raw)) {\n            return null;\n        }\n        const labels = this.getLabels();\n        index = isFinite(index) && labels[index] === raw ? index : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n        return validIndex(index, labels.length - 1);\n    }\n    determineDataLimits() {\n        const { minDefined , maxDefined  } = this.getUserBounds();\n        let { min , max  } = this.getMinMax(true);\n        if (this.options.bounds === 'ticks') {\n            if (!minDefined) {\n                min = 0;\n            }\n            if (!maxDefined) {\n                max = this.getLabels().length - 1;\n            }\n        }\n        this.min = min;\n        this.max = max;\n    }\n    buildTicks() {\n        const min = this.min;\n        const max = this.max;\n        const offset = this.options.offset;\n        const ticks = [];\n        let labels = this.getLabels();\n        labels = min === 0 && max === labels.length - 1 ? labels : labels.slice(min, max + 1);\n        this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n        this._startValue = this.min - (offset ? 0.5 : 0);\n        for(let value = min; value <= max; value++){\n            ticks.push({\n                value\n            });\n        }\n        return ticks;\n    }\n    getLabelForValue(value) {\n        return _getLabelForValue.call(this, value);\n    }\n configure() {\n        super.configure();\n        if (!this.isHorizontal()) {\n            this._reversePixels = !this._reversePixels;\n        }\n    }\n    getPixelForValue(value) {\n        if (typeof value !== 'number') {\n            value = this.parse(value);\n        }\n        return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n    }\n    getPixelForTick(index) {\n        const ticks = this.ticks;\n        if (index < 0 || index > ticks.length - 1) {\n            return null;\n        }\n        return this.getPixelForValue(ticks[index].value);\n    }\n    getValueForPixel(pixel) {\n        return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n    }\n    getBasePixel() {\n        return this.bottom;\n    }\n}\n\nfunction generateTicks$1(generationOptions, dataRange) {\n    const ticks = [];\n    const MIN_SPACING = 1e-14;\n    const { bounds , step , min , max , precision , count , maxTicks , maxDigits , includeBounds  } = generationOptions;\n    const unit = step || 1;\n    const maxSpaces = maxTicks - 1;\n    const { min: rmin , max: rmax  } = dataRange;\n    const minDefined = !isNullOrUndef(min);\n    const maxDefined = !isNullOrUndef(max);\n    const countDefined = !isNullOrUndef(count);\n    const minSpacing = (rmax - rmin) / (maxDigits + 1);\n    let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n    let factor, niceMin, niceMax, numSpaces;\n    if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n        return [\n            {\n                value: rmin\n            },\n            {\n                value: rmax\n            }\n        ];\n    }\n    numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n    if (numSpaces > maxSpaces) {\n        spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n    }\n    if (!isNullOrUndef(precision)) {\n        factor = Math.pow(10, precision);\n        spacing = Math.ceil(spacing * factor) / factor;\n    }\n    if (bounds === 'ticks') {\n        niceMin = Math.floor(rmin / spacing) * spacing;\n        niceMax = Math.ceil(rmax / spacing) * spacing;\n    } else {\n        niceMin = rmin;\n        niceMax = rmax;\n    }\n    if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n        numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n        spacing = (max - min) / numSpaces;\n        niceMin = min;\n        niceMax = max;\n    } else if (countDefined) {\n        niceMin = minDefined ? min : niceMin;\n        niceMax = maxDefined ? max : niceMax;\n        numSpaces = count - 1;\n        spacing = (niceMax - niceMin) / numSpaces;\n    } else {\n        numSpaces = (niceMax - niceMin) / spacing;\n        if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n            numSpaces = Math.round(numSpaces);\n        } else {\n            numSpaces = Math.ceil(numSpaces);\n        }\n    }\n    const decimalPlaces = Math.max(_decimalPlaces(spacing), _decimalPlaces(niceMin));\n    factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n    niceMin = Math.round(niceMin * factor) / factor;\n    niceMax = Math.round(niceMax * factor) / factor;\n    let j = 0;\n    if (minDefined) {\n        if (includeBounds && niceMin !== min) {\n            ticks.push({\n                value: min\n            });\n            if (niceMin < min) {\n                j++;\n            }\n            if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n                j++;\n            }\n        } else if (niceMin < min) {\n            j++;\n        }\n    }\n    for(; j < numSpaces; ++j){\n        const tickValue = Math.round((niceMin + j * spacing) * factor) / factor;\n        if (maxDefined && tickValue > max) {\n            break;\n        }\n        ticks.push({\n            value: tickValue\n        });\n    }\n    if (maxDefined && includeBounds && niceMax !== max) {\n        if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n            ticks[ticks.length - 1].value = max;\n        } else {\n            ticks.push({\n                value: max\n            });\n        }\n    } else if (!maxDefined || niceMax === max) {\n        ticks.push({\n            value: niceMax\n        });\n    }\n    return ticks;\n}\nfunction relativeLabelSize(value, minSpacing, { horizontal , minRotation  }) {\n    const rad = toRadians(minRotation);\n    const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n    const length = 0.75 * minSpacing * ('' + value).length;\n    return Math.min(minSpacing / ratio, length);\n}\nclass LinearScaleBase extends Scale {\n    constructor(cfg){\n        super(cfg);\n         this.start = undefined;\n         this.end = undefined;\n         this._startValue = undefined;\n         this._endValue = undefined;\n        this._valueRange = 0;\n    }\n    parse(raw, index) {\n        if (isNullOrUndef(raw)) {\n            return null;\n        }\n        if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n            return null;\n        }\n        return +raw;\n    }\n    handleTickRangeOptions() {\n        const { beginAtZero  } = this.options;\n        const { minDefined , maxDefined  } = this.getUserBounds();\n        let { min , max  } = this;\n        const setMin = (v)=>min = minDefined ? min : v;\n        const setMax = (v)=>max = maxDefined ? max : v;\n        if (beginAtZero) {\n            const minSign = sign(min);\n            const maxSign = sign(max);\n            if (minSign < 0 && maxSign < 0) {\n                setMax(0);\n            } else if (minSign > 0 && maxSign > 0) {\n                setMin(0);\n            }\n        }\n        if (min === max) {\n            let offset = max === 0 ? 1 : Math.abs(max * 0.05);\n            setMax(max + offset);\n            if (!beginAtZero) {\n                setMin(min - offset);\n            }\n        }\n        this.min = min;\n        this.max = max;\n    }\n    getTickLimit() {\n        const tickOpts = this.options.ticks;\n        let { maxTicksLimit , stepSize  } = tickOpts;\n        let maxTicks;\n        if (stepSize) {\n            maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n            if (maxTicks > 1000) {\n                console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n                maxTicks = 1000;\n            }\n        } else {\n            maxTicks = this.computeTickLimit();\n            maxTicksLimit = maxTicksLimit || 11;\n        }\n        if (maxTicksLimit) {\n            maxTicks = Math.min(maxTicksLimit, maxTicks);\n        }\n        return maxTicks;\n    }\n computeTickLimit() {\n        return Number.POSITIVE_INFINITY;\n    }\n    buildTicks() {\n        const opts = this.options;\n        const tickOpts = opts.ticks;\n        let maxTicks = this.getTickLimit();\n        maxTicks = Math.max(2, maxTicks);\n        const numericGeneratorOptions = {\n            maxTicks,\n            bounds: opts.bounds,\n            min: opts.min,\n            max: opts.max,\n            precision: tickOpts.precision,\n            step: tickOpts.stepSize,\n            count: tickOpts.count,\n            maxDigits: this._maxDigits(),\n            horizontal: this.isHorizontal(),\n            minRotation: tickOpts.minRotation || 0,\n            includeBounds: tickOpts.includeBounds !== false\n        };\n        const dataRange = this._range || this;\n        const ticks = generateTicks$1(numericGeneratorOptions, dataRange);\n        if (opts.bounds === 'ticks') {\n            _setMinAndMaxByKey(ticks, this, 'value');\n        }\n        if (opts.reverse) {\n            ticks.reverse();\n            this.start = this.max;\n            this.end = this.min;\n        } else {\n            this.start = this.min;\n            this.end = this.max;\n        }\n        return ticks;\n    }\n configure() {\n        const ticks = this.ticks;\n        let start = this.min;\n        let end = this.max;\n        super.configure();\n        if (this.options.offset && ticks.length) {\n            const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n            start -= offset;\n            end += offset;\n        }\n        this._startValue = start;\n        this._endValue = end;\n        this._valueRange = end - start;\n    }\n    getLabelForValue(value) {\n        return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n    }\n}\n\nclass LinearScale extends LinearScaleBase {\n    static id = 'linear';\n static defaults = {\n        ticks: {\n            callback: Ticks.formatters.numeric\n        }\n    };\n    determineDataLimits() {\n        const { min , max  } = this.getMinMax(true);\n        this.min = isNumberFinite(min) ? min : 0;\n        this.max = isNumberFinite(max) ? max : 1;\n        this.handleTickRangeOptions();\n    }\n computeTickLimit() {\n        const horizontal = this.isHorizontal();\n        const length = horizontal ? this.width : this.height;\n        const minRotation = toRadians(this.options.ticks.minRotation);\n        const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n        const tickFont = this._resolveTickFontOptions(0);\n        return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n    }\n    getPixelForValue(value) {\n        return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n    }\n    getValueForPixel(pixel) {\n        return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n    }\n}\n\nconst log10Floor = (v)=>Math.floor(log10(v));\nconst changeExponent = (v, m)=>Math.pow(10, log10Floor(v) + m);\nfunction isMajor(tickVal) {\n    const remain = tickVal / Math.pow(10, log10Floor(tickVal));\n    return remain === 1;\n}\nfunction steps(min, max, rangeExp) {\n    const rangeStep = Math.pow(10, rangeExp);\n    const start = Math.floor(min / rangeStep);\n    const end = Math.ceil(max / rangeStep);\n    return end - start;\n}\nfunction startExp(min, max) {\n    const range = max - min;\n    let rangeExp = log10Floor(range);\n    while(steps(min, max, rangeExp) > 10){\n        rangeExp++;\n    }\n    while(steps(min, max, rangeExp) < 10){\n        rangeExp--;\n    }\n    return Math.min(rangeExp, log10Floor(min));\n}\n function generateTicks(generationOptions, { min , max  }) {\n    min = finiteOrDefault(generationOptions.min, min);\n    const ticks = [];\n    const minExp = log10Floor(min);\n    let exp = startExp(min, max);\n    let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n    const stepSize = Math.pow(10, exp);\n    const base = minExp > exp ? Math.pow(10, minExp) : 0;\n    const start = Math.round((min - base) * precision) / precision;\n    const offset = Math.floor((min - base) / stepSize / 10) * stepSize * 10;\n    let significand = Math.floor((start - offset) / Math.pow(10, exp));\n    let value = finiteOrDefault(generationOptions.min, Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision);\n    while(value < max){\n        ticks.push({\n            value,\n            major: isMajor(value),\n            significand\n        });\n        if (significand >= 10) {\n            significand = significand < 15 ? 15 : 20;\n        } else {\n            significand++;\n        }\n        if (significand >= 20) {\n            exp++;\n            significand = 2;\n            precision = exp >= 0 ? 1 : precision;\n        }\n        value = Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision;\n    }\n    const lastTick = finiteOrDefault(generationOptions.max, value);\n    ticks.push({\n        value: lastTick,\n        major: isMajor(lastTick),\n        significand\n    });\n    return ticks;\n}\nclass LogarithmicScale extends Scale {\n    static id = 'logarithmic';\n static defaults = {\n        ticks: {\n            callback: Ticks.formatters.logarithmic,\n            major: {\n                enabled: true\n            }\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this.start = undefined;\n         this.end = undefined;\n         this._startValue = undefined;\n        this._valueRange = 0;\n    }\n    parse(raw, index) {\n        const value = LinearScaleBase.prototype.parse.apply(this, [\n            raw,\n            index\n        ]);\n        if (value === 0) {\n            this._zero = true;\n            return undefined;\n        }\n        return isNumberFinite(value) && value > 0 ? value : null;\n    }\n    determineDataLimits() {\n        const { min , max  } = this.getMinMax(true);\n        this.min = isNumberFinite(min) ? Math.max(0, min) : null;\n        this.max = isNumberFinite(max) ? Math.max(0, max) : null;\n        if (this.options.beginAtZero) {\n            this._zero = true;\n        }\n        if (this._zero && this.min !== this._suggestedMin && !isNumberFinite(this._userMin)) {\n            this.min = min === changeExponent(this.min, 0) ? changeExponent(this.min, -1) : changeExponent(this.min, 0);\n        }\n        this.handleTickRangeOptions();\n    }\n    handleTickRangeOptions() {\n        const { minDefined , maxDefined  } = this.getUserBounds();\n        let min = this.min;\n        let max = this.max;\n        const setMin = (v)=>min = minDefined ? min : v;\n        const setMax = (v)=>max = maxDefined ? max : v;\n        if (min === max) {\n            if (min <= 0) {\n                setMin(1);\n                setMax(10);\n            } else {\n                setMin(changeExponent(min, -1));\n                setMax(changeExponent(max, +1));\n            }\n        }\n        if (min <= 0) {\n            setMin(changeExponent(max, -1));\n        }\n        if (max <= 0) {\n            setMax(changeExponent(min, +1));\n        }\n        this.min = min;\n        this.max = max;\n    }\n    buildTicks() {\n        const opts = this.options;\n        const generationOptions = {\n            min: this._userMin,\n            max: this._userMax\n        };\n        const ticks = generateTicks(generationOptions, this);\n        if (opts.bounds === 'ticks') {\n            _setMinAndMaxByKey(ticks, this, 'value');\n        }\n        if (opts.reverse) {\n            ticks.reverse();\n            this.start = this.max;\n            this.end = this.min;\n        } else {\n            this.start = this.min;\n            this.end = this.max;\n        }\n        return ticks;\n    }\n getLabelForValue(value) {\n        return value === undefined ? '0' : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n    }\n configure() {\n        const start = this.min;\n        super.configure();\n        this._startValue = log10(start);\n        this._valueRange = log10(this.max) - log10(start);\n    }\n    getPixelForValue(value) {\n        if (value === undefined || value === 0) {\n            value = this.min;\n        }\n        if (value === null || isNaN(value)) {\n            return NaN;\n        }\n        return this.getPixelForDecimal(value === this.min ? 0 : (log10(value) - this._startValue) / this._valueRange);\n    }\n    getValueForPixel(pixel) {\n        const decimal = this.getDecimalForPixel(pixel);\n        return Math.pow(10, this._startValue + decimal * this._valueRange);\n    }\n}\n\nfunction getTickBackdropHeight(opts) {\n    const tickOpts = opts.ticks;\n    if (tickOpts.display && opts.display) {\n        const padding = toPadding(tickOpts.backdropPadding);\n        return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n    }\n    return 0;\n}\nfunction measureLabelSize(ctx, font, label) {\n    label = isArray(label) ? label : [\n        label\n    ];\n    return {\n        w: _longestText(ctx, font.string, label),\n        h: label.length * font.lineHeight\n    };\n}\nfunction determineLimits(angle, pos, size, min, max) {\n    if (angle === min || angle === max) {\n        return {\n            start: pos - size / 2,\n            end: pos + size / 2\n        };\n    } else if (angle < min || angle > max) {\n        return {\n            start: pos - size,\n            end: pos\n        };\n    }\n    return {\n        start: pos,\n        end: pos + size\n    };\n}\n function fitWithPointLabels(scale) {\n    const orig = {\n        l: scale.left + scale._padding.left,\n        r: scale.right - scale._padding.right,\n        t: scale.top + scale._padding.top,\n        b: scale.bottom - scale._padding.bottom\n    };\n    const limits = Object.assign({}, orig);\n    const labelSizes = [];\n    const padding = [];\n    const valueCount = scale._pointLabels.length;\n    const pointLabelOpts = scale.options.pointLabels;\n    const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n    for(let i = 0; i < valueCount; i++){\n        const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n        padding[i] = opts.padding;\n        const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n        const plFont = toFont(opts.font);\n        const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n        labelSizes[i] = textSize;\n        const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n        const angle = Math.round(toDegrees(angleRadians));\n        const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n        const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n        updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n    }\n    scale.setCenterPoint(orig.l - limits.l, limits.r - orig.r, orig.t - limits.t, limits.b - orig.b);\n    scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n    const sin = Math.abs(Math.sin(angle));\n    const cos = Math.abs(Math.cos(angle));\n    let x = 0;\n    let y = 0;\n    if (hLimits.start < orig.l) {\n        x = (orig.l - hLimits.start) / sin;\n        limits.l = Math.min(limits.l, orig.l - x);\n    } else if (hLimits.end > orig.r) {\n        x = (hLimits.end - orig.r) / sin;\n        limits.r = Math.max(limits.r, orig.r + x);\n    }\n    if (vLimits.start < orig.t) {\n        y = (orig.t - vLimits.start) / cos;\n        limits.t = Math.min(limits.t, orig.t - y);\n    } else if (vLimits.end > orig.b) {\n        y = (vLimits.end - orig.b) / cos;\n        limits.b = Math.max(limits.b, orig.b + y);\n    }\n}\nfunction createPointLabelItem(scale, index, itemOpts) {\n    const outerDistance = scale.drawingArea;\n    const { extra , additionalAngle , padding , size  } = itemOpts;\n    const pointLabelPosition = scale.getPointPosition(index, outerDistance + extra + padding, additionalAngle);\n    const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n    const y = yForAngle(pointLabelPosition.y, size.h, angle);\n    const textAlign = getTextAlignForAngle(angle);\n    const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n    return {\n        visible: true,\n        x: pointLabelPosition.x,\n        y,\n        textAlign,\n        left,\n        top: y,\n        right: left + size.w,\n        bottom: y + size.h\n    };\n}\nfunction isNotOverlapped(item, area) {\n    if (!area) {\n        return true;\n    }\n    const { left , top , right , bottom  } = item;\n    const apexesInArea = _isPointInArea({\n        x: left,\n        y: top\n    }, area) || _isPointInArea({\n        x: left,\n        y: bottom\n    }, area) || _isPointInArea({\n        x: right,\n        y: top\n    }, area) || _isPointInArea({\n        x: right,\n        y: bottom\n    }, area);\n    return !apexesInArea;\n}\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n    const items = [];\n    const valueCount = scale._pointLabels.length;\n    const opts = scale.options;\n    const { centerPointLabels , display  } = opts.pointLabels;\n    const itemOpts = {\n        extra: getTickBackdropHeight(opts) / 2,\n        additionalAngle: centerPointLabels ? PI / valueCount : 0\n    };\n    let area;\n    for(let i = 0; i < valueCount; i++){\n        itemOpts.padding = padding[i];\n        itemOpts.size = labelSizes[i];\n        const item = createPointLabelItem(scale, i, itemOpts);\n        items.push(item);\n        if (display === 'auto') {\n            item.visible = isNotOverlapped(item, area);\n            if (item.visible) {\n                area = item;\n            }\n        }\n    }\n    return items;\n}\nfunction getTextAlignForAngle(angle) {\n    if (angle === 0 || angle === 180) {\n        return 'center';\n    } else if (angle < 180) {\n        return 'left';\n    }\n    return 'right';\n}\nfunction leftForTextAlign(x, w, align) {\n    if (align === 'right') {\n        x -= w;\n    } else if (align === 'center') {\n        x -= w / 2;\n    }\n    return x;\n}\nfunction yForAngle(y, h, angle) {\n    if (angle === 90 || angle === 270) {\n        y -= h / 2;\n    } else if (angle > 270 || angle < 90) {\n        y -= h;\n    }\n    return y;\n}\nfunction drawPointLabelBox(ctx, opts, item) {\n    const { left , top , right , bottom  } = item;\n    const { backdropColor  } = opts;\n    if (!isNullOrUndef(backdropColor)) {\n        const borderRadius = toTRBLCorners(opts.borderRadius);\n        const padding = toPadding(opts.backdropPadding);\n        ctx.fillStyle = backdropColor;\n        const backdropLeft = left - padding.left;\n        const backdropTop = top - padding.top;\n        const backdropWidth = right - left + padding.width;\n        const backdropHeight = bottom - top + padding.height;\n        if (Object.values(borderRadius).some((v)=>v !== 0)) {\n            ctx.beginPath();\n            addRoundedRectPath(ctx, {\n                x: backdropLeft,\n                y: backdropTop,\n                w: backdropWidth,\n                h: backdropHeight,\n                radius: borderRadius\n            });\n            ctx.fill();\n        } else {\n            ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n        }\n    }\n}\nfunction drawPointLabels(scale, labelCount) {\n    const { ctx , options: { pointLabels  }  } = scale;\n    for(let i = labelCount - 1; i >= 0; i--){\n        const item = scale._pointLabelItems[i];\n        if (!item.visible) {\n            continue;\n        }\n        const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n        drawPointLabelBox(ctx, optsAtIndex, item);\n        const plFont = toFont(optsAtIndex.font);\n        const { x , y , textAlign  } = item;\n        renderText(ctx, scale._pointLabels[i], x, y + plFont.lineHeight / 2, plFont, {\n            color: optsAtIndex.color,\n            textAlign: textAlign,\n            textBaseline: 'middle'\n        });\n    }\n}\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n    const { ctx  } = scale;\n    if (circular) {\n        ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n    } else {\n        let pointPosition = scale.getPointPosition(0, radius);\n        ctx.moveTo(pointPosition.x, pointPosition.y);\n        for(let i = 1; i < labelCount; i++){\n            pointPosition = scale.getPointPosition(i, radius);\n            ctx.lineTo(pointPosition.x, pointPosition.y);\n        }\n    }\n}\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts) {\n    const ctx = scale.ctx;\n    const circular = gridLineOpts.circular;\n    const { color , lineWidth  } = gridLineOpts;\n    if (!circular && !labelCount || !color || !lineWidth || radius < 0) {\n        return;\n    }\n    ctx.save();\n    ctx.strokeStyle = color;\n    ctx.lineWidth = lineWidth;\n    ctx.setLineDash(borderOpts.dash || []);\n    ctx.lineDashOffset = borderOpts.dashOffset;\n    ctx.beginPath();\n    pathRadiusLine(scale, radius, circular, labelCount);\n    ctx.closePath();\n    ctx.stroke();\n    ctx.restore();\n}\nfunction createPointLabelContext(parent, index, label) {\n    return createContext(parent, {\n        label,\n        index,\n        type: 'pointLabel'\n    });\n}\nclass RadialLinearScale extends LinearScaleBase {\n    static id = 'radialLinear';\n static defaults = {\n        display: true,\n        animate: true,\n        position: 'chartArea',\n        angleLines: {\n            display: true,\n            lineWidth: 1,\n            borderDash: [],\n            borderDashOffset: 0.0\n        },\n        grid: {\n            circular: false\n        },\n        startAngle: 0,\n        ticks: {\n            showLabelBackdrop: true,\n            callback: Ticks.formatters.numeric\n        },\n        pointLabels: {\n            backdropColor: undefined,\n            backdropPadding: 2,\n            display: true,\n            font: {\n                size: 10\n            },\n            callback (label) {\n                return label;\n            },\n            padding: 5,\n            centerPointLabels: false\n        }\n    };\n    static defaultRoutes = {\n        'angleLines.color': 'borderColor',\n        'pointLabels.color': 'color',\n        'ticks.color': 'color'\n    };\n    static descriptors = {\n        angleLines: {\n            _fallback: 'grid'\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this.xCenter = undefined;\n         this.yCenter = undefined;\n         this.drawingArea = undefined;\n         this._pointLabels = [];\n        this._pointLabelItems = [];\n    }\n    setDimensions() {\n        const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n        const w = this.width = this.maxWidth - padding.width;\n        const h = this.height = this.maxHeight - padding.height;\n        this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n        this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n        this.drawingArea = Math.floor(Math.min(w, h) / 2);\n    }\n    determineDataLimits() {\n        const { min , max  } = this.getMinMax(false);\n        this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;\n        this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;\n        this.handleTickRangeOptions();\n    }\n computeTickLimit() {\n        return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n    }\n    generateTickLabels(ticks) {\n        LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n        this._pointLabels = this.getLabels().map((value, index)=>{\n            const label = callback(this.options.pointLabels.callback, [\n                value,\n                index\n            ], this);\n            return label || label === 0 ? label : '';\n        }).filter((v, i)=>this.chart.getDataVisibility(i));\n    }\n    fit() {\n        const opts = this.options;\n        if (opts.display && opts.pointLabels.display) {\n            fitWithPointLabels(this);\n        } else {\n            this.setCenterPoint(0, 0, 0, 0);\n        }\n    }\n    setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n        this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n        this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n        this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n    }\n    getIndexAngle(index) {\n        const angleMultiplier = TAU / (this._pointLabels.length || 1);\n        const startAngle = this.options.startAngle || 0;\n        return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n    }\n    getDistanceFromCenterForValue(value) {\n        if (isNullOrUndef(value)) {\n            return NaN;\n        }\n        const scalingFactor = this.drawingArea / (this.max - this.min);\n        if (this.options.reverse) {\n            return (this.max - value) * scalingFactor;\n        }\n        return (value - this.min) * scalingFactor;\n    }\n    getValueForDistanceFromCenter(distance) {\n        if (isNullOrUndef(distance)) {\n            return NaN;\n        }\n        const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n        return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n    }\n    getPointLabelContext(index) {\n        const pointLabels = this._pointLabels || [];\n        if (index >= 0 && index < pointLabels.length) {\n            const pointLabel = pointLabels[index];\n            return createPointLabelContext(this.getContext(), index, pointLabel);\n        }\n    }\n    getPointPosition(index, distanceFromCenter, additionalAngle = 0) {\n        const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n        return {\n            x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n            y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n            angle\n        };\n    }\n    getPointPositionForValue(index, value) {\n        return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n    }\n    getBasePosition(index) {\n        return this.getPointPositionForValue(index || 0, this.getBaseValue());\n    }\n    getPointLabelPosition(index) {\n        const { left , top , right , bottom  } = this._pointLabelItems[index];\n        return {\n            left,\n            top,\n            right,\n            bottom\n        };\n    }\n drawBackground() {\n        const { backgroundColor , grid: { circular  }  } = this.options;\n        if (backgroundColor) {\n            const ctx = this.ctx;\n            ctx.save();\n            ctx.beginPath();\n            pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n            ctx.closePath();\n            ctx.fillStyle = backgroundColor;\n            ctx.fill();\n            ctx.restore();\n        }\n    }\n drawGrid() {\n        const ctx = this.ctx;\n        const opts = this.options;\n        const { angleLines , grid , border  } = opts;\n        const labelCount = this._pointLabels.length;\n        let i, offset, position;\n        if (opts.pointLabels.display) {\n            drawPointLabels(this, labelCount);\n        }\n        if (grid.display) {\n            this.ticks.forEach((tick, index)=>{\n                if (index !== 0 || index === 0 && this.min < 0) {\n                    offset = this.getDistanceFromCenterForValue(tick.value);\n                    const context = this.getContext(index);\n                    const optsAtIndex = grid.setContext(context);\n                    const optsAtIndexBorder = border.setContext(context);\n                    drawRadiusLine(this, optsAtIndex, offset, labelCount, optsAtIndexBorder);\n                }\n            });\n        }\n        if (angleLines.display) {\n            ctx.save();\n            for(i = labelCount - 1; i >= 0; i--){\n                const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n                const { color , lineWidth  } = optsAtIndex;\n                if (!lineWidth || !color) {\n                    continue;\n                }\n                ctx.lineWidth = lineWidth;\n                ctx.strokeStyle = color;\n                ctx.setLineDash(optsAtIndex.borderDash);\n                ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n                offset = this.getDistanceFromCenterForValue(opts.reverse ? this.min : this.max);\n                position = this.getPointPosition(i, offset);\n                ctx.beginPath();\n                ctx.moveTo(this.xCenter, this.yCenter);\n                ctx.lineTo(position.x, position.y);\n                ctx.stroke();\n            }\n            ctx.restore();\n        }\n    }\n drawBorder() {}\n drawLabels() {\n        const ctx = this.ctx;\n        const opts = this.options;\n        const tickOpts = opts.ticks;\n        if (!tickOpts.display) {\n            return;\n        }\n        const startAngle = this.getIndexAngle(0);\n        let offset, width;\n        ctx.save();\n        ctx.translate(this.xCenter, this.yCenter);\n        ctx.rotate(startAngle);\n        ctx.textAlign = 'center';\n        ctx.textBaseline = 'middle';\n        this.ticks.forEach((tick, index)=>{\n            if (index === 0 && this.min >= 0 && !opts.reverse) {\n                return;\n            }\n            const optsAtIndex = tickOpts.setContext(this.getContext(index));\n            const tickFont = toFont(optsAtIndex.font);\n            offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n            if (optsAtIndex.showLabelBackdrop) {\n                ctx.font = tickFont.string;\n                width = ctx.measureText(tick.label).width;\n                ctx.fillStyle = optsAtIndex.backdropColor;\n                const padding = toPadding(optsAtIndex.backdropPadding);\n                ctx.fillRect(-width / 2 - padding.left, -offset - tickFont.size / 2 - padding.top, width + padding.width, tickFont.size + padding.height);\n            }\n            renderText(ctx, tick.label, 0, -offset, tickFont, {\n                color: optsAtIndex.color,\n                strokeColor: optsAtIndex.textStrokeColor,\n                strokeWidth: optsAtIndex.textStrokeWidth\n            });\n        });\n        ctx.restore();\n    }\n drawTitle() {}\n}\n\nconst INTERVALS = {\n    millisecond: {\n        common: true,\n        size: 1,\n        steps: 1000\n    },\n    second: {\n        common: true,\n        size: 1000,\n        steps: 60\n    },\n    minute: {\n        common: true,\n        size: 60000,\n        steps: 60\n    },\n    hour: {\n        common: true,\n        size: 3600000,\n        steps: 24\n    },\n    day: {\n        common: true,\n        size: 86400000,\n        steps: 30\n    },\n    week: {\n        common: false,\n        size: 604800000,\n        steps: 4\n    },\n    month: {\n        common: true,\n        size: 2.628e9,\n        steps: 12\n    },\n    quarter: {\n        common: false,\n        size: 7.884e9,\n        steps: 4\n    },\n    year: {\n        common: true,\n        size: 3.154e10\n    }\n};\n const UNITS =  /* #__PURE__ */ Object.keys(INTERVALS);\n function sorter(a, b) {\n    return a - b;\n}\n function parse(scale, input) {\n    if (isNullOrUndef(input)) {\n        return null;\n    }\n    const adapter = scale._adapter;\n    const { parser , round , isoWeekday  } = scale._parseOpts;\n    let value = input;\n    if (typeof parser === 'function') {\n        value = parser(value);\n    }\n    if (!isNumberFinite(value)) {\n        value = typeof parser === 'string' ? adapter.parse(value,  parser) : adapter.parse(value);\n    }\n    if (value === null) {\n        return null;\n    }\n    if (round) {\n        value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true) ? adapter.startOf(value, 'isoWeek', isoWeekday) : adapter.startOf(value, round);\n    }\n    return +value;\n}\n function determineUnitForAutoTicks(minUnit, min, max, capacity) {\n    const ilen = UNITS.length;\n    for(let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i){\n        const interval = INTERVALS[UNITS[i]];\n        const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n        if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n            return UNITS[i];\n        }\n    }\n    return UNITS[ilen - 1];\n}\n function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n    for(let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--){\n        const unit = UNITS[i];\n        if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n            return unit;\n        }\n    }\n    return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n function determineMajorUnit(unit) {\n    for(let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i){\n        if (INTERVALS[UNITS[i]].common) {\n            return UNITS[i];\n        }\n    }\n}\n function addTick(ticks, time, timestamps) {\n    if (!timestamps) {\n        ticks[time] = true;\n    } else if (timestamps.length) {\n        const { lo , hi  } = _lookup(timestamps, time);\n        const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n        ticks[timestamp] = true;\n    }\n}\n function setMajorTicks(scale, ticks, map, majorUnit) {\n    const adapter = scale._adapter;\n    const first = +adapter.startOf(ticks[0].value, majorUnit);\n    const last = ticks[ticks.length - 1].value;\n    let major, index;\n    for(major = first; major <= last; major = +adapter.add(major, 1, majorUnit)){\n        index = map[major];\n        if (index >= 0) {\n            ticks[index].major = true;\n        }\n    }\n    return ticks;\n}\n function ticksFromTimestamps(scale, values, majorUnit) {\n    const ticks = [];\n     const map = {};\n    const ilen = values.length;\n    let i, value;\n    for(i = 0; i < ilen; ++i){\n        value = values[i];\n        map[value] = i;\n        ticks.push({\n            value,\n            major: false\n        });\n    }\n    return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\nclass TimeScale extends Scale {\n    static id = 'time';\n static defaults = {\n bounds: 'data',\n        adapters: {},\n        time: {\n            parser: false,\n            unit: false,\n            round: false,\n            isoWeekday: false,\n            minUnit: 'millisecond',\n            displayFormats: {}\n        },\n        ticks: {\n source: 'auto',\n            callback: false,\n            major: {\n                enabled: false\n            }\n        }\n    };\n constructor(props){\n        super(props);\n         this._cache = {\n            data: [],\n            labels: [],\n            all: []\n        };\n         this._unit = 'day';\n         this._majorUnit = undefined;\n        this._offsets = {};\n        this._normalized = false;\n        this._parseOpts = undefined;\n    }\n    init(scaleOpts, opts = {}) {\n        const time = scaleOpts.time || (scaleOpts.time = {});\n         const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n        adapter.init(opts);\n        mergeIf(time.displayFormats, adapter.formats());\n        this._parseOpts = {\n            parser: time.parser,\n            round: time.round,\n            isoWeekday: time.isoWeekday\n        };\n        super.init(scaleOpts);\n        this._normalized = opts.normalized;\n    }\n parse(raw, index) {\n        if (raw === undefined) {\n            return null;\n        }\n        return parse(this, raw);\n    }\n    beforeLayout() {\n        super.beforeLayout();\n        this._cache = {\n            data: [],\n            labels: [],\n            all: []\n        };\n    }\n    determineDataLimits() {\n        const options = this.options;\n        const adapter = this._adapter;\n        const unit = options.time.unit || 'day';\n        let { min , max , minDefined , maxDefined  } = this.getUserBounds();\n function _applyBounds(bounds) {\n            if (!minDefined && !isNaN(bounds.min)) {\n                min = Math.min(min, bounds.min);\n            }\n            if (!maxDefined && !isNaN(bounds.max)) {\n                max = Math.max(max, bounds.max);\n            }\n        }\n        if (!minDefined || !maxDefined) {\n            _applyBounds(this._getLabelBounds());\n            if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n                _applyBounds(this.getMinMax(false));\n            }\n        }\n        min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n        max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n        this.min = Math.min(min, max - 1);\n        this.max = Math.max(min + 1, max);\n    }\n _getLabelBounds() {\n        const arr = this.getLabelTimestamps();\n        let min = Number.POSITIVE_INFINITY;\n        let max = Number.NEGATIVE_INFINITY;\n        if (arr.length) {\n            min = arr[0];\n            max = arr[arr.length - 1];\n        }\n        return {\n            min,\n            max\n        };\n    }\n buildTicks() {\n        const options = this.options;\n        const timeOpts = options.time;\n        const tickOpts = options.ticks;\n        const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n        if (options.bounds === 'ticks' && timestamps.length) {\n            this.min = this._userMin || timestamps[0];\n            this.max = this._userMax || timestamps[timestamps.length - 1];\n        }\n        const min = this.min;\n        const max = this.max;\n        const ticks = _filterBetween(timestamps, min, max);\n        this._unit = timeOpts.unit || (tickOpts.autoSkip ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min)) : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n        this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined : determineMajorUnit(this._unit);\n        this.initOffsets(timestamps);\n        if (options.reverse) {\n            ticks.reverse();\n        }\n        return ticksFromTimestamps(this, ticks, this._majorUnit);\n    }\n    afterAutoSkip() {\n        if (this.options.offsetAfterAutoskip) {\n            this.initOffsets(this.ticks.map((tick)=>+tick.value));\n        }\n    }\n initOffsets(timestamps = []) {\n        let start = 0;\n        let end = 0;\n        let first, last;\n        if (this.options.offset && timestamps.length) {\n            first = this.getDecimalForValue(timestamps[0]);\n            if (timestamps.length === 1) {\n                start = 1 - first;\n            } else {\n                start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n            }\n            last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n            if (timestamps.length === 1) {\n                end = last;\n            } else {\n                end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n            }\n        }\n        const limit = timestamps.length < 3 ? 0.5 : 0.25;\n        start = _limitValue(start, 0, limit);\n        end = _limitValue(end, 0, limit);\n        this._offsets = {\n            start,\n            end,\n            factor: 1 / (start + 1 + end)\n        };\n    }\n _generate() {\n        const adapter = this._adapter;\n        const min = this.min;\n        const max = this.max;\n        const options = this.options;\n        const timeOpts = options.time;\n        const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n        const stepSize = valueOrDefault(options.ticks.stepSize, 1);\n        const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n        const hasWeekday = isNumber(weekday) || weekday === true;\n        const ticks = {};\n        let first = min;\n        let time, count;\n        if (hasWeekday) {\n            first = +adapter.startOf(first, 'isoWeek', weekday);\n        }\n        first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n        if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n            throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n        }\n        const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n        for(time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++){\n            addTick(ticks, time, timestamps);\n        }\n        if (time === max || options.bounds === 'ticks' || count === 1) {\n            addTick(ticks, time, timestamps);\n        }\n        return Object.keys(ticks).sort(sorter).map((x)=>+x);\n    }\n getLabelForValue(value) {\n        const adapter = this._adapter;\n        const timeOpts = this.options.time;\n        if (timeOpts.tooltipFormat) {\n            return adapter.format(value, timeOpts.tooltipFormat);\n        }\n        return adapter.format(value, timeOpts.displayFormats.datetime);\n    }\n format(value, format) {\n        const options = this.options;\n        const formats = options.time.displayFormats;\n        const unit = this._unit;\n        const fmt = format || formats[unit];\n        return this._adapter.format(value, fmt);\n    }\n _tickFormatFunction(time, index, ticks, format) {\n        const options = this.options;\n        const formatter = options.ticks.callback;\n        if (formatter) {\n            return callback(formatter, [\n                time,\n                index,\n                ticks\n            ], this);\n        }\n        const formats = options.time.displayFormats;\n        const unit = this._unit;\n        const majorUnit = this._majorUnit;\n        const minorFormat = unit && formats[unit];\n        const majorFormat = majorUnit && formats[majorUnit];\n        const tick = ticks[index];\n        const major = majorUnit && majorFormat && tick && tick.major;\n        return this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n    }\n generateTickLabels(ticks) {\n        let i, ilen, tick;\n        for(i = 0, ilen = ticks.length; i < ilen; ++i){\n            tick = ticks[i];\n            tick.label = this._tickFormatFunction(tick.value, i, ticks);\n        }\n    }\n getDecimalForValue(value) {\n        return value === null ? NaN : (value - this.min) / (this.max - this.min);\n    }\n getPixelForValue(value) {\n        const offsets = this._offsets;\n        const pos = this.getDecimalForValue(value);\n        return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n    }\n getValueForPixel(pixel) {\n        const offsets = this._offsets;\n        const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n        return this.min + pos * (this.max - this.min);\n    }\n _getLabelSize(label) {\n        const ticksOpts = this.options.ticks;\n        const tickLabelWidth = this.ctx.measureText(label).width;\n        const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n        const cosRotation = Math.cos(angle);\n        const sinRotation = Math.sin(angle);\n        const tickFontSize = this._resolveTickFontOptions(0).size;\n        return {\n            w: tickLabelWidth * cosRotation + tickFontSize * sinRotation,\n            h: tickLabelWidth * sinRotation + tickFontSize * cosRotation\n        };\n    }\n _getLabelCapacity(exampleTime) {\n        const timeOpts = this.options.time;\n        const displayFormats = timeOpts.displayFormats;\n        const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n        const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [\n            exampleTime\n        ], this._majorUnit), format);\n        const size = this._getLabelSize(exampleLabel);\n        const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n        return capacity > 0 ? capacity : 1;\n    }\n getDataTimestamps() {\n        let timestamps = this._cache.data || [];\n        let i, ilen;\n        if (timestamps.length) {\n            return timestamps;\n        }\n        const metas = this.getMatchingVisibleMetas();\n        if (this._normalized && metas.length) {\n            return this._cache.data = metas[0].controller.getAllParsedValues(this);\n        }\n        for(i = 0, ilen = metas.length; i < ilen; ++i){\n            timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n        }\n        return this._cache.data = this.normalize(timestamps);\n    }\n getLabelTimestamps() {\n        const timestamps = this._cache.labels || [];\n        let i, ilen;\n        if (timestamps.length) {\n            return timestamps;\n        }\n        const labels = this.getLabels();\n        for(i = 0, ilen = labels.length; i < ilen; ++i){\n            timestamps.push(parse(this, labels[i]));\n        }\n        return this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps);\n    }\n normalize(values) {\n        return _arrayUnique(values.sort(sorter));\n    }\n}\n\nfunction interpolate(table, val, reverse) {\n    let lo = 0;\n    let hi = table.length - 1;\n    let prevSource, nextSource, prevTarget, nextTarget;\n    if (reverse) {\n        if (val >= table[lo].pos && val <= table[hi].pos) {\n            ({ lo , hi  } = _lookupByKey(table, 'pos', val));\n        }\n        ({ pos: prevSource , time: prevTarget  } = table[lo]);\n        ({ pos: nextSource , time: nextTarget  } = table[hi]);\n    } else {\n        if (val >= table[lo].time && val <= table[hi].time) {\n            ({ lo , hi  } = _lookupByKey(table, 'time', val));\n        }\n        ({ time: prevSource , pos: prevTarget  } = table[lo]);\n        ({ time: nextSource , pos: nextTarget  } = table[hi]);\n    }\n    const span = nextSource - prevSource;\n    return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\nclass TimeSeriesScale extends TimeScale {\n    static id = 'timeseries';\n static defaults = TimeScale.defaults;\n constructor(props){\n        super(props);\n         this._table = [];\n         this._minPos = undefined;\n         this._tableRange = undefined;\n    }\n initOffsets() {\n        const timestamps = this._getTimestampsForTable();\n        const table = this._table = this.buildLookupTable(timestamps);\n        this._minPos = interpolate(table, this.min);\n        this._tableRange = interpolate(table, this.max) - this._minPos;\n        super.initOffsets(timestamps);\n    }\n buildLookupTable(timestamps) {\n        const { min , max  } = this;\n        const items = [];\n        const table = [];\n        let i, ilen, prev, curr, next;\n        for(i = 0, ilen = timestamps.length; i < ilen; ++i){\n            curr = timestamps[i];\n            if (curr >= min && curr <= max) {\n                items.push(curr);\n            }\n        }\n        if (items.length < 2) {\n            return [\n                {\n                    time: min,\n                    pos: 0\n                },\n                {\n                    time: max,\n                    pos: 1\n                }\n            ];\n        }\n        for(i = 0, ilen = items.length; i < ilen; ++i){\n            next = items[i + 1];\n            prev = items[i - 1];\n            curr = items[i];\n            if (Math.round((next + prev) / 2) !== curr) {\n                table.push({\n                    time: curr,\n                    pos: i / (ilen - 1)\n                });\n            }\n        }\n        return table;\n    }\n _generate() {\n        const min = this.min;\n        const max = this.max;\n        let timestamps = super.getDataTimestamps();\n        if (!timestamps.includes(min) || !timestamps.length) {\n            timestamps.splice(0, 0, min);\n        }\n        if (!timestamps.includes(max) || timestamps.length === 1) {\n            timestamps.push(max);\n        }\n        return timestamps.sort((a, b)=>a - b);\n    }\n _getTimestampsForTable() {\n        let timestamps = this._cache.all || [];\n        if (timestamps.length) {\n            return timestamps;\n        }\n        const data = this.getDataTimestamps();\n        const label = this.getLabelTimestamps();\n        if (data.length && label.length) {\n            timestamps = this.normalize(data.concat(label));\n        } else {\n            timestamps = data.length ? data : label;\n        }\n        timestamps = this._cache.all = timestamps;\n        return timestamps;\n    }\n getDecimalForValue(value) {\n        return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n    }\n getValueForPixel(pixel) {\n        const offsets = this._offsets;\n        const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n        return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n    }\n}\n\nvar scales = /*#__PURE__*/Object.freeze({\n__proto__: null,\nCategoryScale: CategoryScale,\nLinearScale: LinearScale,\nLogarithmicScale: LogarithmicScale,\nRadialLinearScale: RadialLinearScale,\nTimeScale: TimeScale,\nTimeSeriesScale: TimeSeriesScale\n});\n\nconst registerables = [\n    controllers,\n    elements,\n    plugins,\n    scales\n];\n\nexport { Animation, Animations, ArcElement, BarController, BarElement, BasePlatform, BasicPlatform, BubbleController, CategoryScale, Chart, plugin_colors as Colors, DatasetController, plugin_decimation as Decimation, DomPlatform, DoughnutController, Element, index as Filler, Interaction, plugin_legend as Legend, LineController, LineElement, LinearScale, LogarithmicScale, PieController, PointElement, PolarAreaController, RadarController, RadialLinearScale, Scale, ScatterController, plugin_subtitle as SubTitle, Ticks, TimeScale, TimeSeriesScale, plugin_title as Title, plugin_tooltip as Tooltip, adapters as _adapters, _detectPlatform, animator, controllers, defaults, elements, layouts, plugins, registerables, registry, scales };\n//# sourceMappingURL=chart.js.map\n","import { Chart as Chart$1, BarController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, BubbleController, ScatterController } from 'chart.js';\nimport { version, isProxy, toRaw, defineComponent, ref, shallowRef, onMounted, onUnmounted, watch, nextTick, h } from 'vue';\n\nconst CommonProps = {\n    data: {\n        type: Object,\n        required: true\n    },\n    options: {\n        type: Object,\n        default: ()=>({})\n    },\n    plugins: {\n        type: Array,\n        default: ()=>[]\n    },\n    datasetIdKey: {\n        type: String,\n        default: \"label\"\n    },\n    updateMode: {\n        type: String,\n        default: undefined\n    }\n};\nconst A11yProps = {\n    ariaLabel: {\n        type: String\n    },\n    ariaDescribedby: {\n        type: String\n    }\n};\nconst Props = {\n    type: {\n        type: String,\n        required: true\n    },\n    destroyDelay: {\n        type: Number,\n        default: 0 // No delay by default\n    },\n    ...CommonProps,\n    ...A11yProps\n};\n\nconst compatProps = version[0] === \"2\" ? (internals, props)=>Object.assign(internals, {\n        attrs: props\n    }) : (internals, props)=>Object.assign(internals, props);\nfunction toRawIfProxy(obj) {\n    return isProxy(obj) ? toRaw(obj) : obj;\n}\nfunction cloneProxy(obj) {\n    let src = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : obj;\n    return isProxy(src) ? new Proxy(obj, {}) : obj;\n}\nfunction setOptions(chart, nextOptions) {\n    const options = chart.options;\n    if (options && nextOptions) {\n        Object.assign(options, nextOptions);\n    }\n}\nfunction setLabels(currentData, nextLabels) {\n    currentData.labels = nextLabels;\n}\nfunction setDatasets(currentData, nextDatasets, datasetIdKey) {\n    const addedDatasets = [];\n    currentData.datasets = nextDatasets.map((nextDataset)=>{\n        // given the new set, find it's current match\n        const currentDataset = currentData.datasets.find((dataset)=>dataset[datasetIdKey] === nextDataset[datasetIdKey]);\n        // There is no original to update, so simply add new one\n        if (!currentDataset || !nextDataset.data || addedDatasets.includes(currentDataset)) {\n            return {\n                ...nextDataset\n            };\n        }\n        addedDatasets.push(currentDataset);\n        Object.assign(currentDataset, nextDataset);\n        return currentDataset;\n    });\n}\nfunction cloneData(data, datasetIdKey) {\n    const nextData = {\n        labels: [],\n        datasets: []\n    };\n    setLabels(nextData, data.labels);\n    setDatasets(nextData, data.datasets, datasetIdKey);\n    return nextData;\n}\n/**\n * Get dataset from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getDatasetAtEvent(chart, event) {\n    return chart.getElementsAtEventForMode(event, \"dataset\", {\n        intersect: true\n    }, false);\n}\n/**\n * Get single dataset element from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getElementAtEvent(chart, event) {\n    return chart.getElementsAtEventForMode(event, \"nearest\", {\n        intersect: true\n    }, false);\n}\n/**\n * Get all dataset elements from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getElementsAtEvent(chart, event) {\n    return chart.getElementsAtEventForMode(event, \"index\", {\n        intersect: true\n    }, false);\n}\n\nconst Chart = defineComponent({\n    props: Props,\n    setup (props, param) {\n        let { expose , slots  } = param;\n        const canvasRef = ref(null);\n        const chartRef = shallowRef(null);\n        expose({\n            chart: chartRef\n        });\n        const renderChart = ()=>{\n            if (!canvasRef.value) return;\n            const { type , data , options , plugins , datasetIdKey  } = props;\n            const clonedData = cloneData(data, datasetIdKey);\n            const proxiedData = cloneProxy(clonedData, data);\n            chartRef.value = new Chart$1(canvasRef.value, {\n                type,\n                data: proxiedData,\n                options: {\n                    ...options\n                },\n                plugins\n            });\n        };\n        const destroyChart = ()=>{\n            const chart = toRaw(chartRef.value);\n            if (chart) {\n                if (props.destroyDelay > 0) {\n                    setTimeout(()=>{\n                        chart.destroy();\n                        chartRef.value = null;\n                    }, props.destroyDelay);\n                } else {\n                    chart.destroy();\n                    chartRef.value = null;\n                }\n            }\n        };\n        const update = (chart)=>{\n            chart.update(props.updateMode);\n        };\n        onMounted(renderChart);\n        onUnmounted(destroyChart);\n        watch([\n            ()=>props.options,\n            ()=>props.data\n        ], (param, param1)=>{\n            let [nextOptionsProxy, nextDataProxy] = param, [prevOptionsProxy, prevDataProxy] = param1;\n            const chart = toRaw(chartRef.value);\n            if (!chart) {\n                return;\n            }\n            let shouldUpdate = false;\n            if (nextOptionsProxy) {\n                const nextOptions = toRawIfProxy(nextOptionsProxy);\n                const prevOptions = toRawIfProxy(prevOptionsProxy);\n                if (nextOptions && nextOptions !== prevOptions) {\n                    setOptions(chart, nextOptions);\n                    shouldUpdate = true;\n                }\n            }\n            if (nextDataProxy) {\n                const nextLabels = toRawIfProxy(nextDataProxy.labels);\n                const prevLabels = toRawIfProxy(prevDataProxy.labels);\n                const nextDatasets = toRawIfProxy(nextDataProxy.datasets);\n                const prevDatasets = toRawIfProxy(prevDataProxy.datasets);\n                if (nextLabels !== prevLabels) {\n                    setLabels(chart.config.data, nextLabels);\n                    shouldUpdate = true;\n                }\n                if (nextDatasets && nextDatasets !== prevDatasets) {\n                    setDatasets(chart.config.data, nextDatasets, props.datasetIdKey);\n                    shouldUpdate = true;\n                }\n            }\n            if (shouldUpdate) {\n                nextTick(()=>{\n                    update(chart);\n                });\n            }\n        }, {\n            deep: true\n        });\n        return ()=>{\n            return h(\"canvas\", {\n                role: \"img\",\n                ariaLabel: props.ariaLabel,\n                ariaDescribedby: props.ariaDescribedby,\n                ref: canvasRef\n            }, [\n                h(\"p\", {}, [\n                    slots.default ? slots.default() : \"\"\n                ])\n            ]);\n        };\n    }\n});\n\nfunction createTypedChart(type, registerables) {\n    Chart$1.register(registerables);\n    return defineComponent({\n        props: CommonProps,\n        setup (props, param) {\n            let { expose  } = param;\n            const ref = shallowRef(null);\n            const reforwardRef = (chartRef)=>{\n                ref.value = chartRef?.chart;\n            };\n            expose({\n                chart: ref\n            });\n            return ()=>{\n                return h(Chart, compatProps({\n                    ref: reforwardRef\n                }, {\n                    type,\n                    ...props\n                }));\n            };\n        }\n    });\n}\nconst Bar = /* #__PURE__ */ createTypedChart(\"bar\", BarController);\nconst Doughnut = /* #__PURE__ */ createTypedChart(\"doughnut\", DoughnutController);\nconst Line = /* #__PURE__ */ createTypedChart(\"line\", LineController);\nconst Pie = /* #__PURE__ */ createTypedChart(\"pie\", PieController);\nconst PolarArea = /* #__PURE__ */ createTypedChart(\"polarArea\", PolarAreaController);\nconst Radar = /* #__PURE__ */ createTypedChart(\"radar\", RadarController);\nconst Bubble = /* #__PURE__ */ createTypedChart(\"bubble\", BubbleController);\nconst Scatter = /* #__PURE__ */ createTypedChart(\"scatter\", ScatterController);\n\nexport { Bar, Bubble, Chart, Doughnut, Line, Pie, PolarArea, Radar, Scatter, createTypedChart, getDatasetAtEvent, getElementAtEvent, getElementsAtEvent };\n//# sourceMappingURL=index.js.map\n","<script setup>\nimport {toRefs, ref, watch, onMounted, nextTick} from 'vue'\nimport {Line} from 'vue-chartjs'\nimport {Chart as ChartJS, Title, Tooltip, Legend, LineElement, LinearScale, CategoryScale, PointElement, Filler} from 'chart.js'\n\nChartJS.register(Title, Tooltip, Legend, LineElement, LinearScale, CategoryScale, PointElement, Filler)\n\n// Props\nconst props = defineProps({\n  chartdata: {\n    type: Object,\n    required: true,\n  },\n})\n\n// Get refs\nconst {chartdata} = toRefs(props)\n\n// Refs\nconst chartRef = ref(null)\nconst options = ref({\n  responsive: true,\n  maintainAspectRatio: false,\n  scales: {\n    y: {\n      beginAtZero: true,\n    },\n  },\n  elements: {\n    line: {\n      tension: 0.4,\n      fill: true,\n      backgroundColor: 'rgba(255, 99, 132, 0.2)',\n    },\n  },\n})\n\n// Methods\nfunction renderLineChart() {\n  if (chartRef.value && chartRef.value.chart) {\n    chartRef.value.chart.update()\n  }\n}\n\n// Watchers\nwatch(chartdata, () => {\n  nextTick(() => {\n    renderLineChart()\n  })\n}, {deep: true})\n\n// Lifecycle hooks\nonMounted(() => {\n  renderLineChart()\n})\n</script>\n\n<template>\n  <Line\n    ref=\"chartRef\"\n    :data=\"chartdata\"\n    :options=\"options\"\n    :height=\"350\"\n  />\n</template>\n","\n//Ensure a value is a boolean\nexport function ensureBoolean(value, preserveEmty = false) {\n  if (value === null || value === undefined) {\n    return preserveEmty ? value : false\n  }\n  if (typeof value === 'boolean') {\n    return value\n  }\n  if (value === 'true') {\n    return true\n  }\n  if (value === 'false') {\n    return false\n  }\n  return Boolean(value)\n}\n","import {ref, computed} from 'vue'\n\n/**\n * Tabs composable\n */\nexport function useTabs(tabs) {\n\n  //Must have at least one tab\n  tabs = ref(tabs)\n  if (!Array.isArray(tabs.value) || tabs.value.length === 0) {\n    throw new Error(`Must provide at least one tab`)\n  }\n\n  //Active tab\n  const activeTabKey = ref(tabs.value[0].key)\n  const activeTab = computed(() => tabs.value.find(tab => tab.key === activeTabKey.value))\n\n  //Check if tab is active\n  const checkTabKeyActive = key => activeTabKey.value === key\n  const checkTabActive = tab => checkTabKeyActive(tab.key)\n\n  //Navigation\n  const setActiveTabKey = key => activeTabKey.value = key\n  const setActiveTab = tab => setActiveTabKey(tab.key)\n\n  //Expose interface\n  return {\n    tabs,\n    activeTabKey,\n    activeTab,\n    checkTabKeyActive,\n    checkTabActive,\n    setActiveTabKey,\n    setActiveTab,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport TransitionSlideIn from '@/components/shared/transitions/TransitionSlideIn.vue'\nimport AnalyticsFilter from '@/components/analytics/AnalyticsFilter.vue'\nimport AdvancedAnalyticsFilter from '@/components/analytics/AdvancedAnalyticsFilter.vue'\nimport AnalyticsInsightCards from '@/components/analytics/AnalyticsInsightCards.vue'\nimport AnalyticsDashboardLearners from '@/components/analytics/AnalyticsDashboardLearners.vue'\nimport AnalyticsDashboardCourses from '@/components/analytics/AnalyticsDashboardCourses.vue'\nimport AnalyticsDashboardCohorts from '@/components/analytics/AnalyticsDashboardCohorts.vue'\nimport AnalyticsDashboardResponses from '@/components/analytics/AnalyticsDashboardResponses.vue'\nimport AnalyticsDashboardEngagement from '@/components/analytics/AnalyticsDashboardEngagement.vue'\nimport AnalyticsDashboardDropOffs from '@/components/analytics/AnalyticsDashboardDropOffs.vue'\nimport AnalyticsDashboardSubstepDetails from '@/components/analytics/AnalyticsDashboardSubstepDetails.vue'\nimport LineChart from '@/components/analytics/LineChart.vue'\nimport {analyticsApi} from '@/api/analytics.api.js'\nimport {convertToOptions} from '@/helpers/options.js'\nimport {ensureArray} from '@/helpers/array.js'\nimport {ensureBoolean} from '@/helpers/boolean.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {ref, computed} from 'vue'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Analytics')\n\n//Routing\nconst {queryParams, replaceRoute} = useRouting()\n\n//Main tabs\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {label: 'Insights', key: 'insights'},\n  {label: 'Engagement', key: 'engagement'},\n])\n\n//Table tabs\nconst {\n  tabs: tableTabs,\n  activeTab: activeTableTab,\n  setActiveTab: setActiveTableTab,\n} = useTabs([\n  {label: 'Enrollments', key: 'enrollments'},\n  {label: 'Content', key: 'courses'},\n  {label: 'Cohorts', key: 'cohorts'},\n  {label: 'Responses', key: 'responses'},\n])\n\n//Options and data\nconst courseOptions = ref([])\nconst distributionOptions = ref([])\nconst cohortOptions = ref([])\nconst userOptions = ref([])\nconst insights = ref({})\nconst chartData = ref({})\n\n//Selected step/substep\nconst showDropOff = ref(false)\nconst showSubstepDetails = ref(false)\nconst selectedStep = ref(null)\nconst selectedSubstep = ref(null)\nconst language = ref(null)\n\n//Filter refs\nconst selectedCourseIds = ref(ensureArray(queryParams.value.courseIds))\nconst selectedCohortIds = ref(ensureArray(queryParams.value.cohortIds))\nconst selectedChannelIds = ref(ensureArray(queryParams.value.channelIds))\nconst selectedScheduleIds = ref(ensureArray(queryParams.value.scheduleIds))\nconst selectedLearnerIds = ref(ensureArray(queryParams.value.learnerIds))\nconst selectedAddressTypes = ref(ensureArray(queryParams.value.selectedAddressTypes))\nconst excludeDisabledSchedules = ref(ensureBoolean(queryParams.value.excludeDisabledSchedules, true))\nconst excludeDeletedSchedules = ref(ensureBoolean(queryParams.value.excludeDeletedSchedules, true))\nconst excludeAdmins = ref(ensureBoolean(queryParams.value.excludeAdmins, true))\nconst includeNudges = ref(ensureBoolean(queryParams.value.includeNudges, true))\nconst dateRange = ref(queryParams.value.dateRangeBegin && queryParams.value.dateRangeEnd ? [\n  queryParams.value.dateRangeBegin,\n  queryParams.value.dateRangeEnd,\n] : null)\n\n//Computed\nconst isSingleCourseSelected = computed(() => selectedCourseIds.value.length === 1)\nconst firstCourseId = computed(() => selectedCourseIds.value[0])\nconst hasIdFilters = computed(() => (\n  selectedCourseIds.value.length ||\n  selectedCohortIds.value.length ||\n  selectedScheduleIds.value.length ||\n  selectedLearnerIds.value.length\n))\n\n//Base params\nconst baseParams = computed(() => ({\n  courseIds: selectedCourseIds.value,\n  cohortIds: selectedCohortIds.value,\n  channelIds: selectedChannelIds.value,\n  distributionIds: selectedScheduleIds.value,\n  userIds: selectedLearnerIds.value,\n  dateRangeBegin: dateRange.value?.[0],\n  dateRangeEnd: dateRange.value?.[1],\n  includeNudges: (includeNudges.value !== null) ? includeNudges.value : undefined,\n  excludeAdmins: excludeAdmins.value || undefined,\n  excludeDisabledSchedules: excludeDisabledSchedules.value || undefined,\n  excludeDeletedSchedules: excludeDeletedSchedules.value || undefined,\n  selectedAddressTypes: selectedAddressTypes.value,\n  showDropOff: showDropOff.value || undefined,\n}))\n\n//Route params\nconst routeParams = computed(() => ({\n  courseIds: selectedCourseIds.value,\n  cohortIds: selectedCohortIds.value,\n  channelIds: selectedChannelIds.value,\n  scheduleIds: selectedScheduleIds.value,\n  learnerIds: selectedLearnerIds.value,\n  dateRangeBegin: dateRange.value?.[0],\n  dateRangeEnd: dateRange.value?.[1],\n  includeNudges: includeNudges.value,\n  excludeAdmins: excludeAdmins.value,\n  excludeDisabledSchedules: excludeDisabledSchedules.value,\n  excludeDeletedSchedules: excludeDeletedSchedules.value,\n  selectedAddressTypes: selectedAddressTypes.value,\n}))\n\n//Extract stuff from response data\nconst extractData = data => {\n  courseOptions.value = convertToOptions(data.courseOptions || [])\n  distributionOptions.value = convertToOptions(data.distributionOptions || [])\n  cohortOptions.value = convertToOptions(data.cohortOptions || [])\n  userOptions.value = convertToOptions(data.userOptions || [])\n  insights.value = data.insights\n  chartData.value = data.chartData\n}\n\n//Loading data\nconst isLoading = ref(true)\nconst loadData = async () => {\n  try {\n    isLoading.value = true\n    const data = await analyticsApi.getBaseData(baseParams.value)\n    replaceRoute({query: routeParams.value})\n    extractData(data)\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Load data\nloadData()\n\n//Reset/clear filters\nconst resetIdFilters = () => {\n  selectedCourseIds.value = []\n  selectedCohortIds.value = []\n  selectedScheduleIds.value = []\n  selectedLearnerIds.value = []\n}\nconst resetAdvancedFilters = () => {\n  excludeAdmins.value = false\n  excludeDeletedSchedules.value = false\n  excludeDisabledSchedules.value = false\n  includeNudges.value = null\n  selectedAddressTypes.value = []\n  selectedChannelIds.value = []\n}\nconst clearAdvancedFilters = () => {\n  resetAdvancedFilters()\n  loadData()\n}\nconst clearAllFilters = () => {\n  resetIdFilters()\n  resetAdvancedFilters()\n  loadData()\n}\n\n//Update filters\nconst updateAddressTypes = value => {\n  selectedAddressTypes.value = value\n  loadData()\n}\nconst updateCourseType = value => {\n  includeNudges.value = value\n  loadData()\n}\nconst updateChannels = value => {\n  selectedChannelIds.value = value\n  loadData()\n}\nconst updateExcludeAdmins = value => {\n  excludeAdmins.value = value\n  loadData()\n}\nconst updateExcludeDisabledSchedules = value => {\n  excludeDisabledSchedules.value = value\n  loadData()\n}\nconst updateExcludeDeletedSchedules = value => {\n  excludeDeletedSchedules.value = value\n  loadData()\n}\nconst setDateRange = value => {\n  dateRange.value = value\n  loadData()\n}\nconst setSelectedCourseIds = ids => {\n  selectedCourseIds.value = ids\n  loadData()\n}\nconst setSelectedCohortIds = ids => {\n  selectedCohortIds.value = ids\n  loadData()\n}\nconst setSelectedDistributionIds = ids => {\n  selectedScheduleIds.value = ids\n  loadData()\n}\nconst setSelectedUserIds = ids => {\n  selectedLearnerIds.value = ids\n  loadData()\n}\nconst setSpecificCourseId = id => {\n  resetIdFilters()\n  setSelectedCourseIds([id])\n}\nconst setSpecificCohortId = id => {\n  resetIdFilters()\n  setSelectedCohortIds([id])\n}\nconst setSpecificUserId = id => {\n  resetIdFilters()\n  setSelectedUserIds([id])\n}\n\n//Toggle drop-off\nconst toggleDropOff = (step = null, substep = null) => {\n  selectedSubstep.value = substep\n  selectedStep.value = step\n  showDropOff.value = Boolean(step && substep)\n}\n\n//Toggle substep details\nconst toggleSubstepDetails = (step = null, substep = null, lang = null) => {\n  selectedSubstep.value = substep\n  selectedStep.value = step\n  language.value = lang\n  showSubstepDetails.value = Boolean(step && substep)\n}\n\n//Reload data in various views for accuracy after toggling question correct/incorrect\nconst engagementView = ref(null)\nconst substepDetailsView = ref(null)\nconst reloadData = () => {\n  engagementView.value?.reloadData()\n  substepDetailsView.value?.reloadData()\n}\n</script>\n\n<template>\n  <PageWrapper>\n    <!-- ADVANCED FILTERS -->\n    <div :class=\"$style.topFilters\">\n      <div :class=\"$style.advancedFilter\">\n        <AdvancedAnalyticsFilter\n          :selected-address-types=\"selectedAddressTypes\"\n          :selected-channels=\"selectedChannelIds\"\n          :selected-course-type=\"includeNudges\"\n          :exclude-admins=\"excludeAdmins\"\n          :exclude-disabled-schedules=\"excludeDisabledSchedules\"\n          :exclude-deleted-schedules=\"excludeDeletedSchedules\"\n          @changed-address-types=\"updateAddressTypes($event.value)\"\n          @changed-channels=\"updateChannels($event.value)\"\n          @changed-course-type=\"updateCourseType($event.value)\"\n          @changed-exclude-admins=\"updateExcludeAdmins($event.value)\"\n          @changed-exclude-disabled-schedules=\"updateExcludeDisabledSchedules($event.value)\"\n          @changed-exclude-deleted-schedules=\"updateExcludeDeletedSchedules($event.value)\"\n          @clear-all=\"clearAdvancedFilters()\"\n        />\n        <TransitionSlideIn>\n          <div\n            v-if=\"hasIdFilters\"\n            :class=\"$style.clearAllFilters\"\n          >\n            <ActionButton\n              label=\"Clear all filters\"\n              type=\"text\"\n              icon=\"close\"\n              icon-size=\"s\"\n              @click=\"clearAllFilters()\"\n            />\n          </div>\n        </TransitionSlideIn>\n      </div>\n\n      <!-- ENROLLMENT DATES -->\n      <div :class=\"$style.enrollmentDates\">\n        <FormField label=\"Enrollment dates\">\n          <DateInput\n            :value=\"dateRange\"\n            alignment=\"right\"\n            is-range\n            @input=\"setDateRange($event.iso)\"\n          />\n        </FormFIeld>\n      </div>\n    </div>\n\n    <!-- ANALYTICS FILTERS -->\n    <div :class=\"$style.analyticsFilters\">\n      <AnalyticsFilter\n        :class=\"$style.analyticsFilter\"\n        label=\"Content\"\n        :options=\"courseOptions\"\n        :selected-option-ids=\"selectedCourseIds\"\n        @input=\"setSelectedCourseIds($event.value)\"\n      />\n      <AnalyticsFilter\n        :class=\"$style.analyticsFilter\"\n        label=\"Cohort\"\n        :options=\"cohortOptions\"\n        :selected-option-ids=\"selectedCohortIds\"\n        @input=\"setSelectedCohortIds($event.value)\"\n      />\n      <AnalyticsFilter\n        :class=\"$style.analyticsFilter\"\n        label=\"Schedule\"\n        :options=\"distributionOptions\"\n        :selected-option-ids=\"selectedScheduleIds\"\n        @input=\"setSelectedDistributionIds($event.value)\"\n      />\n      <AnalyticsFilter\n        :class=\"$style.analyticsFilter\"\n        label=\"Learner\"\n        :options=\"userOptions\"\n        :selected-option-ids=\"selectedLearnerIds\"\n        @input=\"setSelectedUserIds($event.value)\"\n      />\n    </div>\n\n    <!-- TAB NAVIGATION -->\n    <TabNavigation\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      @change-tab=\"setActiveTab($event.tab)\"\n    />\n\n    <Spinner\n      v-if=\"isLoading\"\n      is-block\n    />\n\n    <!-- INSIGHTS -->\n    <template v-else-if=\"activeTab.key === 'insights'\">\n      <AnalyticsInsightCards\n        :insights=\"insights\"\n      />\n\n      <!-- ENROLLMENT OVER TIME -->\n      <PageBlock header=\"Enrollment over time\">\n        <LineChart :chartdata=\"chartData\" />\n      </PageBlock>\n\n      <!-- TABLES -->\n      <PageBlock>\n        <TabNavigation\n          :tabs=\"tableTabs\"\n          :active-tab=\"activeTableTab\"\n          @change-tab=\"setActiveTableTab($event.tab)\"\n        />\n\n        <AnalyticsDashboardLearners\n          v-if=\"activeTableTab.key === 'enrollments'\"\n          :base-params=\"baseParams\"\n          @set-user-id=\"setSpecificUserId($event.userId)\"\n        />\n        <AnalyticsDashboardCourses\n          v-else-if=\"activeTableTab.key === 'courses'\"\n          :base-params=\"baseParams\"\n          @set-course-id=\"setSpecificCourseId($event.courseId)\"\n        />\n        <AnalyticsDashboardCohorts\n          v-else-if=\"activeTableTab.key === 'cohorts'\"\n          :base-params=\"baseParams\"\n          @set-cohort-id=\"setSpecificCohortId($event.cohortId)\"\n        />\n        <AnalyticsDashboardResponses\n          v-else-if=\"activeTableTab.key === 'responses'\"\n          :base-params=\"baseParams\"\n          @set-course-id=\"setSpecificCourseId($event.courseId)\"\n        />\n      </PageBlock>\n    </template>\n\n    <!-- ENGAGEMENT -->\n    <template v-else-if=\"activeTab.key === 'engagement'\">\n      <Alert\n        v-if=\"!isSingleCourseSelected\"\n        type=\"info\"\n        text=\"Please select a single course to view learner responses and engagement data.\"\n        fit-content\n      />\n\n      <!-- ENGAGEMENT -->\n      <AnalyticsDashboardEngagement\n        v-if=\"isSingleCourseSelected\"\n        ref=\"engagementView\"\n        :base-params=\"baseParams\"\n        :course-id=\"firstCourseId\"\n        @toggle-substep-details=\"toggleSubstepDetails($event.step, $event.substep, $event.language)\"\n        @toggle-drop-off=\"toggleDropOff($event.step, $event.substep)\"\n      />\n\n      <!-- DROP-OFF -->\n      <AnalyticsDashboardDropOffs\n        :is-open=\"showDropOff\"\n        :base-params=\"baseParams\"\n        :step=\"selectedStep\"\n        :substep=\"selectedSubstep\"\n        @toggle-drop-off=\"toggleDropOff($event.step, $event.substep)\"\n        @close=\"toggleDropOff()\"\n      />\n\n      <!-- SUBSTEP DETAILS -->\n      <AnalyticsDashboardSubstepDetails\n        ref=\"substepDetailsView\"\n        :is-open=\"showSubstepDetails\"\n        :base-params=\"baseParams\"\n        :step=\"selectedStep\"\n        :substep=\"selectedSubstep\"\n        :language=\"language\"\n        @toggle-substep-details=\"toggleSubstepDetails($event.step, $event.substep, $event.language)\"\n        @reload-data=\"reloadData()\"\n        @close=\"toggleSubstepDetails()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.topFilters {\n  display: flex;\n  align-items: flex-end;\n  gap: 1rem;\n  @media (min-width: 1140px) {\n    gap: 3rem; /* To align with the filters below */\n  }\n}\n.advancedFilter {\n  flex: 1;\n  display: flex;\n  align-items: center;\n  @media (min-width: 1140px) {\n    flex: 3;\n  }\n}\n.analyticsFilters {\n  margin-top: 1.5rem;\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1rem;\n}\n.analyticsFilter {\n  flex: 0 0 calc(50% - 0.5rem);\n  max-width: calc(50% - 0.5rem);\n  @media (min-width: 1140px) {\n    flex: 0 0 calc(25% - 0.75rem);\n    max-width: calc(25% - 0.75rem);\n  }\n}\n.clearAllFilters {\n  margin-left: 1rem;\n}\n.enrollmentDates {\n  flex: 1;\n}\n</style>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport {toRefs, computed, watch, onMounted} from 'vue'\n\n//Props and emits\nconst emit = defineEmits([\n  'input',\n  'dirty',\n])\nconst props = defineProps({\n  dropdownOptions: {\n    type: Array,\n    required: true,\n  },\n  conditionItem: {\n    type: Object,\n    required: true,\n  },\n  path: {\n    type: Array,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  validations: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get refs\nconst {conditionItem, dropdownOptions, path} = toRefs(props)\n\n//Computed\nconst isEmpty = computed(() => Object.keys(conditionItem.value).length === 0)\n\n//Watch\nwatch(dropdownOptions.value, (newVal) => {\n  // NOTE: If there is only one available option, we default to that option. Doing this here instead of in the parent component so that we know which condition item(s) to update\n  if (newVal.length === 1) {\n    emit('input', {value: newVal[0], path: path.value})\n  }\n})\n\n//Mounted\nonMounted(() => {\n  // NOTE: This is for when we add a new conditionItem. If there is only one available dropdown option, we should default the new item to that option. Doing this here instead of in the parent component so that we know which condition item to update\n  if (isEmpty.value && dropdownOptions.value.length === 1) {\n    emit('input', {value: dropdownOptions.value[0], path: path.value})\n  }\n})\n</script>\n\n<template>\n  <FormField\n    label=\"Value\"\n    is-required\n  >\n    <SelectInput\n      :is-clearable=\"false\"\n      :is-disabled=\"isDisabled\"\n      :has-error=\"validations.$error\"\n      :options=\"dropdownOptions\"\n      :value=\"conditionItem?.value\"\n      v-bind=\"$attrs\"\n      @input=\"$emit('input', {value: $event.option, path: path});\"\n      @dirty=\"$emit('dirty', $event)\"\n    />\n  </FormField>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport {useDebounceFn} from '@vueuse/core'\nimport {computed, onMounted, watch, toRefs} from 'vue'\n\n// Props and emits\nconst emit = defineEmits([\n  'input',\n  'dirty',\n])\nconst props = defineProps({\n  dropdownOptions: {\n    type: Array,\n    required: true,\n  },\n  conditionItem: {\n    type: Object,\n    required: true,\n  },\n  path: {\n    type: Array,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  validations: {\n    type: Object,\n    required: true,\n  },\n  operatorOptions: {\n    type: Object,\n    required: true,\n  },\n  relativeTimeOptions: {\n    type: Object,\n    required: true,\n  },\n})\n\n// Get refs\nconst {conditionItem, dropdownOptions, path, operatorOptions, relativeTimeOptions} = toRefs(props)\n\n// Computed\nconst dataType = computed(() => conditionItem.value['dataType'])\nconst showRelativeTimeOptions = computed(() => conditionItem.value['operator'] === 'relative')\nconst filteredOperatorOptions = computed(() => operatorOptions.value[dataType.value] || [])\nconst getOperatorValue = computed(() => filteredOperatorOptions.value.find(option => option.value === conditionItem.value['operator']) || filteredOperatorOptions.value[0])\nconst filteredRelativeTimeOptions = computed(() => relativeTimeOptions.value[conditionItem.value['operator']] || [])\nconst isEmpty = computed(() => Object.keys(conditionItem.value).length === 0)\n\n//Watch\nwatch(dropdownOptions.value, (newVal) => {\n  // NOTE: If there is only one available option, we default to that option. Doing this here instead of in the parent component so that we know which condition item(s) to update\n  if (newVal.length === 1) {\n    emit('input', {value: newVal[0], path: props.path})\n  }\n})\n\n//Lifecycle\nonMounted(() => {\n  // NOTE: This is for when we add a new conditionItem. If there is only one available dropdown option, we should default the new item to that option. Doing this here instead of in the parent component so that we know which condition item to update\n  if (isEmpty.value && dropdownOptions.value.length === 1) {\n    emit('input', {value: dropdownOptions.value[0], path: path.value})\n  }\n})\n\n// Methods\nconst updateUserInput = (value) => {\n  const operator = conditionItem.value.operator || filteredOperatorOptions.value[0]?.value\n  emit('input', {value: {...conditionItem.value, userInput: value,  operator}, path: path.value})\n}\nconst updateOperator = (value) => {\n  const operator = value || filteredOperatorOptions.value[0]?.value\n  const isRelativeOperator = operator === 'relative' || conditionItem.value.operator === 'relative'\n  const userInput = isRelativeOperator ? '' : conditionItem.value.userInput\n  emit('input', {value: {...conditionItem.value, userInput, operator},path: path.value})\n}\nconst updateCondition = value => {\n  emit('input', {value: {...value, operator: '', userInput: ''}, path: path.value})\n}\nconst updateValueDebounced = useDebounceFn((...args) => updateUserInput(...args), 250)\n</script>\n\n<template>\n  <div class=\"flex justify-between gap-x-3\">\n    <div class=\"w-[40%]\">\n      <FormField\n        label=\"Field\"\n        is-required\n      >\n        <SelectInput\n          :is-clearable=\"false\"\n          :is-disabled=\"isDisabled\"\n          :has-error=\"validations.$error\"\n          :options=\"dropdownOptions\"\n          :value=\"conditionItem?.value\"\n          @input=\"updateCondition($event.option)\"\n          @dirty=\"$emit('dirty', $event)\"\n        />\n      </FormField>\n    </div>\n    <div class=\"w-[20%]\">\n      <FormField\n        label=\"Condition\"\n        is-required\n      >\n        <SelectInput\n          :is-clearable=\"false\"\n          :is-disabled=\"isDisabled || isEmpty\"\n          :has-error=\"validations.$error\"\n          :options=\"filteredOperatorOptions\"\n          :value=\"getOperatorValue?.value\"\n          @input=\"updateOperator($event.value)\"\n          @dirty=\"$emit('dirty', $event)\"\n        />\n      </FormField>\n    </div>\n    <div class=\"w-[40%]\">\n      <FormField\n        label=\"Value\"\n        is-required\n      >\n        <DateInput\n          v-if=\"dataType === 'datetime' && !showRelativeTimeOptions\"\n          :is-disabled=\"isDisabled || isEmpty\"\n          :has-error=\"validations.$error\"\n          :value=\"conditionItem['userInput']\"\n          @input=\"updateUserInput($event.formattedValue)\"\n        />\n        <SelectInput\n          v-else-if=\"dataType === 'datetime' && showRelativeTimeOptions\"\n          :is-clearable=\"false\"\n          :is-disabled=\"isDisabled || isEmpty\"\n          :has-error=\"validations.$error\"\n          :options=\"filteredRelativeTimeOptions\"\n          :value=\"conditionItem['userInput']\"\n          @input=\"updateUserInput($event.value)\"\n          @dirty=\"$emit('dirty', $event)\"\n        />\n        <SelectInput\n          v-else-if=\"dataType === 'boolean'\"\n          :is-clearable=\"false\"\n          :is-disabled=\"isDisabled || isEmpty\"\n          :has-error=\"validations.$error\"\n          :options=\"[{label: 'True', value: true}, {label: 'False', value: false}]\"\n          :value=\"conditionItem['userInput']\"\n          @input=\"updateUserInput($event.value)\"\n          @dirty=\"$emit('dirty', $event)\"\n        />\n        <TextInput\n          v-else\n          :is-disabled=\"isDisabled || isEmpty\"\n          :has-error=\"validations.$error\"\n          :value=\"conditionItem['userInput']\"\n          @input=\"updateValueDebounced($event.value, 'userInput')\"\n          @dirty=\"$emit('dirty', $event)\"\n        />\n      </FormField>\n    </div>\n  </div>\n</template>\n","  <!-- ***************** NOTES ****************\n\n  This component is designed to handle a complex, nested data structure for automation conditions. The expected data format involves objects containing 'AND' or 'OR' keys, each pointing to an array of objects. These objects can further nest 'AND' or 'OR' structures, creating a deeply nested hierarchy. Here are key points to understand about this file:\n\n  Data Structure Expectation: The component works with data structured as objects with 'AND' or 'OR' keys. Each of these keys should point to an array containing further objects. These objects can themselves contain 'AND' or 'OR' keys, pointing to more arrays.\n\n  Examples:\n  EXAMPLE1 = { AND: [ { a: 'a' }, { b: 'b' }, { c: 'c' } ] }\n  EXAMPLE2 = { AND: [ { OR: [ { a: 'a' }, { b: 'b' }, { c: 'c' } ] }, { OR: [ { c: 'c' }, { d: 'd' } ] } ] }\n  EXAMPLE3 = { AND: [ { OR: [ { a: 'a' }, { AND: [ { c: 'c' }, { d: 'd' }, { OR: [ { e: 'e'  } ] } ] } ] } ] }\n\n  Support for Text and Dropdown Editors: The component can render different types of editors (text-condition-editor and dropdown-condition-editor) based on the condition items' properties. Currently we show the text editor when the component is called for the trigger section and the source is 'file' but this could be expanded upon\n\n  Props: Includes settings for dropdown options, depth of recursion, conditions data, and various configurations like showTextInputs, disabled, position, etc.\n\n  Methods: Contains a buildPath method to construct the path for each condition item, which is crucial for knowing which item in the nested structure to update.\n\n  Validation Integration: Currently each group of condition items passed to the main component (trigger_conditions and action_conditions) are each validated as a group in the NewEditForm component. This is to contain validation logic in the parent component. We may want to try and redo this at some point to have the validation logic in the text/dropdown condition editors themselves on a per conditionItem basis, but this is a bit tricky since we need the parent to know if each conditionItem is valid or not.\n  ***************************************** -->\n\n<script setup>\nimport DropdownConditionEditor from '@/components/automations/DropdownConditionEditor.vue'\nimport TextConditionEditor from '@/components/automations/TextConditionEditor.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {computed, toRefs} from 'vue'\n\n// Props and emits\ndefineEmits([\n  'input',\n  'dirty',\n])\nconst props = defineProps({\n  dropdownOptions: {\n    type: Array,\n    required: true,\n  },\n  depth: {\n    type: Number,\n    default: 0,\n  },\n  condition: {\n    type: Object,\n    required: true,\n  },\n  showTextInputs: {\n    type: Boolean,\n    required: true,\n  },\n  path: {\n    type: Array,\n    default: () => [],\n  },\n  operatorOptions: {\n    type: Object,\n    default: () => {},\n  },\n  relativeTimeOptions: {\n    type: Object,\n    default: () => {},\n  },\n})\n\n//Get refs\nconst {path, condition} = toRefs(props)\n\n//Computed\nconst conditionKey = computed(() => Object.keys(condition.value)[0])\nconst conditionPath = computed(() => [...path.value, conditionKey.value, 0])\nconst conditionItem = computed(() => {\n  // NOTE: Since we don't currently support nested 'AND'/'OR' groups, we can assume that the first item in the array is the only item in the group for now. This way we don't have to recursively call ConditionEditor for nested groups.\n  const value = condition.value.and || condition.value.or\n  return value[0]\n})\n</script>\n\n<template>\n  <FlexColumn>\n    <TextConditionEditor\n      v-if=\"showTextInputs\"\n      :condition-item=\"conditionItem\"\n      :dropdown-options=\"dropdownOptions\"\n      :operator-options=\"operatorOptions\"\n      :path=\"conditionPath\"\n      :relative-time-options=\"relativeTimeOptions\"\n      v-bind=\"$attrs\"\n      @input=\"$emit('input', $event)\"\n      @dirty=\"$emit('dirty', $event)\"\n    />\n    <DropdownConditionEditor\n      v-else\n      :condition-item=\"conditionItem\"\n      :dropdown-options=\"dropdownOptions\"\n      :path=\"conditionPath\"\n      v-bind=\"$attrs\"\n      @input=\"$emit('input', $event)\"\n      @dirty=\"$emit('dirty', $event)\"\n    />\n  </FlexColumn>\n</template>\n","<script setup>\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {ref, toRefs, watch} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n  isSaved: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {isSaving, isSaved} = toRefs(props)\nconst showSavingIndicator = ref(false)\nconst showSavedIndicator = ref(false)\n\n//This flag is used to ensure the saving indicator shows up for at least 500ms\nconst canHideSavingIndicator = ref(true)\n\n//This flag is used to remember that a successful save occurred\nconst hasSaved = ref(false)\n\n//Toggle saving indicator for a minimum of 500ms\nwatch([isSaving, canHideSavingIndicator], () => {\n  if (isSaving.value && !showSavingIndicator.value) {\n    canHideSavingIndicator.value = false\n    showSavingIndicator.value = true\n    setTimeout(() => canHideSavingIndicator.value = true, 500)\n  }\n  else if (!isSaving.value && canHideSavingIndicator.value) {\n    showSavingIndicator.value = false\n  }\n})\n\n//Toggle saved flag\nwatch(isSaved, () => {\n  if (isSaved.value) {\n    hasSaved.value = true\n  }\n})\n\n//Toggle saved indicator after a brief delay to let the saving indicator\n//transition finish, and automatically hide the saved indicator again after 2s\nwatch([hasSaved, showSavingIndicator], () => {\n  if (hasSaved.value && !showSavingIndicator.value) {\n    setTimeout(() => showSavedIndicator.value = true, 250)\n    setTimeout(() => {\n      hasSaved.value = false\n      showSavedIndicator.value = false\n    }, 1250)\n  }\n})\n</script>\n\n<template>\n  <TransitionFadeIn>\n    <div\n      v-if=\"showSavedIndicator\"\n      :class=\"$style.saveIndicator\"\n      test-id=\"savedIndicator\"\n    >\n      <Icon\n        icon=\"check\"\n        color=\"success\"\n        size=\"s\"\n      />\n      <span text-success>Saved</span>\n    </div>\n    <div\n      v-else-if=\"showSavingIndicator\"\n      :class=\"$style.saveIndicator\"\n      test-id=\"savingIndicator\"\n    >\n      <Spinner is-small />\n      <span text-muted>Saving</span>\n    </div>\n  </TransitionFadeIn>\n</template>\n\n<style module lang=\"scss\">\n.saveIndicator {\n  display: flex;\n  align-items: center;\n  gap: 0.35rem;\n  font-size: var(--font-size-s);\n  width: 4rem;\n}\n</style>\n","import { unref } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction isFunction(val) {\n  return typeof val === 'function';\n}\nfunction isObject(o) {\n  return o !== null && typeof o === 'object' && !Array.isArray(o);\n}\nfunction normalizeValidatorObject(validator) {\n  return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {\n    $validator: validator\n  };\n}\nfunction isPromise(object) {\n  return isObject(object) && isFunction(object.then);\n}\nfunction unwrapValidatorResponse(result) {\n  if (typeof result === 'object') return result.$valid;\n  return result;\n}\nfunction unwrapNormalizedValidator(validator) {\n  return validator.$validator || validator;\n}\n\nfunction withParams($params, $validator) {\n  if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to \"withParams\" should be an object, provided ${typeof $params}`);\n  if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n  const validatorObj = normalizeValidatorObject($validator);\n  validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);\n  return validatorObj;\n}\n\nfunction withMessage($message, $validator) {\n  if (!isFunction($message) && typeof unref($message) !== 'string') throw new Error(`[@vuelidate/validators]: First parameter to \"withMessage\" should be string or a function returning a string, provided ${typeof $message}`);\n  if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n  const validatorObj = normalizeValidatorObject($validator);\n  validatorObj.$message = $message;\n  return validatorObj;\n}\n\nfunction withAsync($validator) {\n  let $watchTargets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  const validatorObj = normalizeValidatorObject($validator);\n  return _objectSpread2(_objectSpread2({}, validatorObj), {}, {\n    $async: true,\n    $watchTargets\n  });\n}\n\nfunction forEach(validators) {\n  return {\n    $validator(collection) {\n      for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        others[_key - 1] = arguments[_key];\n      }\n\n      return unref(collection).reduce((previous, collectionItem, index) => {\n        const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {\n          let [property, $model] = _ref;\n          const innerValidators = validators[property] || {};\n          const propertyResult = Object.entries(innerValidators).reduce((all, _ref2) => {\n            let [validatorName, currentValidator] = _ref2;\n            const validatorFunction = unwrapNormalizedValidator(currentValidator);\n            const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);\n            const $valid = unwrapValidatorResponse($response);\n            all.$data[validatorName] = $response;\n            all.$data.$invalid = !$valid || !!all.$data.$invalid;\n            all.$data.$error = all.$data.$invalid;\n\n            if (!$valid) {\n              let $message = currentValidator.$message || '';\n              const $params = currentValidator.$params || {};\n\n              if (typeof $message === 'function') {\n                $message = $message({\n                  $pending: false,\n                  $invalid: !$valid,\n                  $params,\n                  $model,\n                  $response\n                });\n              }\n\n              all.$errors.push({\n                $property: property,\n                $message,\n                $params,\n                $response,\n                $model,\n                $pending: false,\n                $validator: validatorName\n              });\n            }\n\n            return {\n              $valid: all.$valid && $valid,\n              $data: all.$data,\n              $errors: all.$errors\n            };\n          }, {\n            $valid: true,\n            $data: {},\n            $errors: []\n          });\n          all.$data[property] = propertyResult.$data;\n          all.$errors[property] = propertyResult.$errors;\n          return {\n            $valid: all.$valid && propertyResult.$valid,\n            $data: all.$data,\n            $errors: all.$errors\n          };\n        }, {\n          $valid: true,\n          $data: {},\n          $errors: {}\n        });\n        return {\n          $valid: previous.$valid && collectionEntryResult.$valid,\n          $data: previous.$data.concat(collectionEntryResult.$data),\n          $errors: previous.$errors.concat(collectionEntryResult.$errors)\n        };\n      }, {\n        $valid: true,\n        $data: [],\n        $errors: []\n      });\n    },\n\n    $message: _ref3 => {\n      let {\n        $response\n      } = _ref3;\n      return $response ? $response.$errors.map(context => {\n        return Object.values(context).map(errors => errors.map(error => error.$message)).reduce((a, b) => a.concat(b), []);\n      }) : [];\n    }\n  };\n}\n\nconst req = value => {\n  value = unref(value);\n  if (Array.isArray(value)) return !!value.length;\n\n  if (value === undefined || value === null) {\n    return false;\n  }\n\n  if (value === false) {\n    return true;\n  }\n\n  if (value instanceof Date) {\n    return !isNaN(value.getTime());\n  }\n\n  if (typeof value === 'object') {\n    for (let _ in value) return true;\n\n    return false;\n  }\n\n  return !!String(value).length;\n};\nconst len = value => {\n  value = unref(value);\n  if (Array.isArray(value)) return value.length;\n\n  if (typeof value === 'object') {\n    return Object.keys(value).length;\n  }\n\n  return String(value).length;\n};\nfunction regex() {\n  for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {\n    expr[_key] = arguments[_key];\n  }\n\n  return value => {\n    value = unref(value);\n    return !req(value) || expr.every(reg => {\n      reg.lastIndex = 0;\n      return reg.test(value);\n    });\n  };\n}\n\nvar common = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  forEach: forEach,\n  len: len,\n  normalizeValidatorObject: normalizeValidatorObject,\n  regex: regex,\n  req: req,\n  unwrap: unref,\n  unwrapNormalizedValidator: unwrapNormalizedValidator,\n  unwrapValidatorResponse: unwrapValidatorResponse,\n  withAsync: withAsync,\n  withMessage: withMessage,\n  withParams: withParams\n});\n\nvar alpha$1 = regex(/^[a-zA-Z]*$/);\n\nvar alpha = {\n  $validator: alpha$1,\n  $message: 'The value is not alphabetical',\n  $params: {\n    type: 'alpha'\n  }\n};\n\nvar alphaNum$1 = regex(/^[a-zA-Z0-9]*$/);\n\nvar alphaNum = {\n  $validator: alphaNum$1,\n  $message: 'The value must be alpha-numeric',\n  $params: {\n    type: 'alphaNum'\n  }\n};\n\nvar numeric$1 = regex(/^\\d*(\\.\\d+)?$/);\n\nvar numeric = {\n  $validator: numeric$1,\n  $message: 'Value must be numeric',\n  $params: {\n    type: 'numeric'\n  }\n};\n\nfunction between$1 (min, max) {\n  return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +unref(min) <= +value && +unref(max) >= +value;\n}\n\nfunction between (min, max) {\n  return {\n    $validator: between$1(min, max),\n    $message: _ref => {\n      let {\n        $params\n      } = _ref;\n      return `The value must be between ${$params.min} and ${$params.max}`;\n    },\n    $params: {\n      min,\n      max,\n      type: 'between'\n    }\n  };\n}\n\nconst emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nvar email$1 = regex(emailRegex);\n\nvar email = {\n  $validator: email$1,\n  $message: 'Value is not a valid email address',\n  $params: {\n    type: 'email'\n  }\n};\n\nfunction ipAddress$1 (value) {\n  if (!req(value)) {\n    return true;\n  }\n\n  if (typeof value !== 'string') {\n    return false;\n  }\n\n  const nibbles = value.split('.');\n  return nibbles.length === 4 && nibbles.every(nibbleValid);\n}\n\nconst nibbleValid = nibble => {\n  if (nibble.length > 3 || nibble.length === 0) {\n    return false;\n  }\n\n  if (nibble[0] === '0' && nibble !== '0') {\n    return false;\n  }\n\n  if (!nibble.match(/^\\d+$/)) {\n    return false;\n  }\n\n  const numeric = +nibble | 0;\n  return numeric >= 0 && numeric <= 255;\n};\n\nvar ipAddress = {\n  $validator: ipAddress$1,\n  $message: 'The value is not a valid IP address',\n  $params: {\n    type: 'ipAddress'\n  }\n};\n\nfunction macAddress$1 () {\n  let separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';\n  return value => {\n    separator = unref(separator);\n\n    if (!req(value)) {\n      return true;\n    }\n\n    if (typeof value !== 'string') {\n      return false;\n    }\n\n    const parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;\n    return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);\n  };\n}\n\nconst hexValid = hex => hex.toLowerCase().match(/^[0-9a-f]{2}$/);\n\nfunction macAddress (separator) {\n  return {\n    $validator: macAddress$1(separator),\n    $message: 'The value is not a valid MAC Address',\n    $params: {\n      type: 'macAddress'\n    }\n  };\n}\n\nfunction maxLength$1 (length) {\n  return value => !req(value) || len(value) <= unref(length);\n}\n\nfunction maxLength (max) {\n  return {\n    $validator: maxLength$1(max),\n    $message: _ref => {\n      let {\n        $params\n      } = _ref;\n      return `The maximum length allowed is ${$params.max}`;\n    },\n    $params: {\n      max,\n      type: 'maxLength'\n    }\n  };\n}\n\nfunction minLength$1 (length) {\n  return value => !req(value) || len(value) >= unref(length);\n}\n\nfunction minLength (min) {\n  return {\n    $validator: minLength$1(min),\n    $message: _ref => {\n      let {\n        $params\n      } = _ref;\n      return `This field should be at least ${$params.min} characters long`;\n    },\n    $params: {\n      min,\n      type: 'minLength'\n    }\n  };\n}\n\nfunction required$1 (value) {\n  if (typeof value === 'string') {\n    value = value.trim();\n  }\n\n  return req(value);\n}\n\nvar required = {\n  $validator: required$1,\n  $message: 'Value is required',\n  $params: {\n    type: 'required'\n  }\n};\n\nconst validate$1 = (prop, val) => prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredIf$1(propOrFunction) {\n  return function (value, parentVM) {\n    if (typeof propOrFunction !== 'function') {\n      return validate$1(unref(propOrFunction), value);\n    }\n\n    const result = propOrFunction.call(this, value, parentVM);\n    return validate$1(result, value);\n  };\n}\n\nfunction requiredIf (prop) {\n  return {\n    $validator: requiredIf$1(prop),\n    $message: 'The value is required',\n    $params: {\n      type: 'requiredIf',\n      prop\n    }\n  };\n}\n\nconst validate = (prop, val) => !prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredUnless$1(propOrFunction) {\n  return function (value, parentVM) {\n    if (typeof propOrFunction !== 'function') {\n      return validate(unref(propOrFunction), value);\n    }\n\n    const result = propOrFunction.call(this, value, parentVM);\n    return validate(result, value);\n  };\n}\n\nfunction requiredUnless (prop) {\n  return {\n    $validator: requiredUnless$1(prop),\n    $message: 'The value is required',\n    $params: {\n      type: 'requiredUnless',\n      prop\n    }\n  };\n}\n\nfunction sameAs$1 (equalTo) {\n  return value => unref(value) === unref(equalTo);\n}\n\nfunction sameAs (equalTo) {\n  let otherName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'other';\n  return {\n    $validator: sameAs$1(equalTo),\n    $message: _ref => {\n      return `The value must be equal to the ${otherName} value`;\n    },\n    $params: {\n      equalTo,\n      otherName,\n      type: 'sameAs'\n    }\n  };\n}\n\nconst urlRegex = /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\nvar url$1 = regex(urlRegex);\n\nvar url = {\n  $validator: url$1,\n  $message: 'The value is not a valid URL address',\n  $params: {\n    type: 'url'\n  }\n};\n\nfunction syncOr(validators) {\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return validators.reduce((valid, fn) => {\n      if (unwrapValidatorResponse(valid)) return valid;\n      return unwrapNormalizedValidator(fn).apply(this, args);\n    }, false);\n  };\n}\n\nfunction asyncOr(validators) {\n  return function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return validators.reduce(async (valid, fn) => {\n      const r = await valid;\n      if (unwrapValidatorResponse(r)) return r;\n      return unwrapNormalizedValidator(fn).apply(this, args);\n    }, Promise.resolve(false));\n  };\n}\n\nfunction or$1() {\n  for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n    validators[_key3] = arguments[_key3];\n  }\n\n  const $async = validators.some(v => v.$async);\n  const $watchTargets = validators.reduce((all, v) => {\n    if (!v.$watchTargets) return all;\n    return all.concat(v.$watchTargets);\n  }, []);\n\n  let $validator = () => false;\n\n  if (validators.length) $validator = $async ? asyncOr(validators) : syncOr(validators);\n  return {\n    $async,\n    $validator,\n    $watchTargets\n  };\n}\n\nfunction or () {\n  return withParams({\n    type: 'or'\n  }, withMessage('The value does not match any of the provided validators', or$1(...arguments)));\n}\n\nfunction syncAnd(validators) {\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return validators.reduce((valid, fn) => {\n      if (!unwrapValidatorResponse(valid)) return valid;\n      return unwrapNormalizedValidator(fn).apply(this, args);\n    }, true);\n  };\n}\n\nfunction asyncAnd(validators) {\n  return function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return validators.reduce(async (valid, fn) => {\n      const r = await valid;\n      if (!unwrapValidatorResponse(r)) return r;\n      return unwrapNormalizedValidator(fn).apply(this, args);\n    }, Promise.resolve(true));\n  };\n}\n\nfunction and$1() {\n  for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n    validators[_key3] = arguments[_key3];\n  }\n\n  const $async = validators.some(v => v.$async);\n  const $watchTargets = validators.reduce((all, v) => {\n    if (!v.$watchTargets) return all;\n    return all.concat(v.$watchTargets);\n  }, []);\n\n  let $validator = () => false;\n\n  if (validators.length) $validator = $async ? asyncAnd(validators) : syncAnd(validators);\n  return {\n    $async,\n    $validator,\n    $watchTargets\n  };\n}\n\nfunction and () {\n  return withParams({\n    type: 'and'\n  }, withMessage('The value does not match all of the provided validators', and$1(...arguments)));\n}\n\nfunction not$1 (validator) {\n  return function (value, vm) {\n    if (!req(value)) return true;\n    const response = unwrapNormalizedValidator(validator).call(this, value, vm);\n    if (!isPromise(response)) return !unwrapValidatorResponse(response);\n    return response.then(r => !unwrapValidatorResponse(r));\n  };\n}\n\nfunction not (validator) {\n  return {\n    $validator: not$1(validator),\n    $message: `The value does not match the provided validator`,\n    $params: {\n      type: 'not'\n    }\n  };\n}\n\nfunction minValue$1 (min) {\n  return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value >= +unref(min);\n}\n\nfunction minValue (min) {\n  return {\n    $validator: minValue$1(min),\n    $message: _ref => {\n      let {\n        $params\n      } = _ref;\n      return `The minimum value allowed is ${$params.min}`;\n    },\n    $params: {\n      min,\n      type: 'minValue'\n    }\n  };\n}\n\nfunction maxValue$1 (max) {\n  return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value <= +unref(max);\n}\n\nvar maxValue = (max => ({\n  $validator: maxValue$1(max),\n  $message: _ref => {\n    let {\n      $params\n    } = _ref;\n    return `The maximum value allowed is ${$params.max}`;\n  },\n  $params: {\n    max,\n    type: 'maxValue'\n  }\n}));\n\nvar integer$1 = regex(/(^[0-9]*$)|(^-[0-9]+$)/);\n\nvar integer = {\n  $validator: integer$1,\n  $message: 'Value is not an integer',\n  $params: {\n    type: 'integer'\n  }\n};\n\nvar decimal$1 = regex(/^[-]?\\d*(\\.\\d+)?$/);\n\nvar decimal = {\n  $validator: decimal$1,\n  $message: 'Value must be decimal',\n  $params: {\n    type: 'decimal'\n  }\n};\n\nfunction createI18nMessage(_ref) {\n  let {\n    t,\n    messagePath = _ref2 => {\n      let {\n        $validator\n      } = _ref2;\n      return `validations.${$validator}`;\n    },\n    messageParams = params => params\n  } = _ref;\n  return function withI18nMessage(validator) {\n    let {\n      withArguments = false,\n      messagePath: localMessagePath = messagePath,\n      messageParams: localMessageParams = messageParams\n    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    function message(props) {\n      return t(localMessagePath(props), localMessageParams(_objectSpread2({\n        model: props.$model,\n        property: props.$property,\n        pending: props.$pending,\n        invalid: props.$invalid,\n        response: props.$response,\n        validator: props.$validator,\n        propertyPath: props.$propertyPath\n      }, props.$params)));\n    }\n\n    if (withArguments && typeof validator === 'function') {\n      return function () {\n        return withMessage(message, validator(...arguments));\n      };\n    }\n\n    return withMessage(message, validator);\n  };\n}\n\nexport { alpha, alphaNum, and, between, createI18nMessage, decimal, email, common as helpers, integer, ipAddress, macAddress, maxLength, maxValue, minLength, minValue, not, numeric, or, required, requiredIf, requiredUnless, sameAs, url };\n","import {getCharacterCount} from '@/helpers/string.js'\nimport {isEmptyObject} from '@/helpers/object.js'\nimport {unref} from 'vue'\nimport {\n  required,\n  requiredIf,\n  maxLength,\n  minLength,\n  maxValue,\n  minValue,\n  url,\n  email,\n  between,\n  integer,\n  helpers\n} from '@vuelidate/validators'\n\n/**\n * Validators composable\n */\nexport function useValidators() {\n\n  //Get helpers\n  const {withMessage, forEach, withAsync} = helpers\n\n  //Debounced async validator\n  const asyncValidator = (message, validator) => withMessage(\n    message, withAsync(validator)\n  )\n\n  //Custom character count validator\n  const characterCount = (valueRef, limitMaybeRef) => withMessage(\n    `Character limit exceeded`, () => {\n\n      //Unref\n      const value = unref(valueRef)\n      const limit = unref(limitMaybeRef)\n\n      //Determine count if string given\n      const count = (typeof value === 'string') ?\n        getCharacterCount(value) : value\n\n      //Ensure under limit\n      return count <= limit\n    }\n  )\n\n  //Combined character count validator\n  const combinedCharacterCount = ref => withMessage(\n    `Combined character limit exceeded`, () => {\n      return ref.value.combinedCharacterCount <= ref.value.combinedCaracterLimit\n    }\n  )\n\n  //Wrappers for better error message wording\n  const requiredWithMessage = fieldName => withMessage(`${fieldName} is required`, required)\n  const requiredIfWithMessage = (fieldName, ref) => withMessage(`${fieldName} is required`, requiredIf(ref))\n  const emailWithMessage = withMessage('Invalid email address', email)\n  const urlWithMessage = withMessage('Invalid website address', url)\n  const integerWithMessage = withMessage('Invalid number', integer)\n\n  //No empty objects\n  const noEmptyObjects = value => !isEmptyObject(value)\n\n  //Expose interface\n  return {\n    asyncValidator,\n    withMessage,\n    forEach,\n    required: requiredWithMessage,\n    requiredIf: requiredIfWithMessage,\n    email: emailWithMessage,\n    url: urlWithMessage,\n    characterCount,\n    combinedCharacterCount,\n    maxLength,\n    minLength,\n    maxValue,\n    minValue,\n    between,\n    integerWithMessage,\n    noEmptyObjects,\n  }\n}\n","import { isReactive, isReadonly, computed, unref, ref, watch, isRef, reactive, nextTick, inject, provide, getCurrentInstance, onBeforeMount, onBeforeUnmount } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction unwrapObj(obj) {\n  let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return Object.keys(obj).reduce((o, k) => {\n    if (ignoreKeys.includes(k)) return o;\n    o[k] = unref(obj[k]);\n    return o;\n  }, {});\n}\nfunction isFunction(val) {\n  return typeof val === 'function';\n}\nfunction isProxy(value) {\n  return isReactive(value) || isReadonly(value);\n}\nfunction get(obj, stringPath, def) {\n  let current = obj;\n  const path = stringPath.split('.');\n\n  for (let i = 0; i < path.length; i++) {\n    if (!current[path[i]]) return def;\n    current = current[path[i]];\n  }\n\n  return current;\n}\nfunction gatherBooleanGroupProperties(group, nestedResults, property) {\n  return computed(() => {\n    return group.some(path => {\n      return get(nestedResults, path, {\n        [property]: false\n      })[property];\n    });\n  });\n}\nfunction gatherArrayGroupProperties(group, nestedResults, property) {\n  return computed(() => {\n    return group.reduce((all, path) => {\n      const fetchedProperty = get(nestedResults, path, {\n        [property]: false\n      })[property] || [];\n      return all.concat(fetchedProperty);\n    }, []);\n  });\n}\n\nfunction callRule(rule, value, siblingState, instance) {\n  return rule.call(instance, unref(value), unref(siblingState), instance);\n}\n\nfunction normalizeValidatorResponse(result) {\n  return result.$valid !== undefined ? !result.$valid : !result;\n}\n\nfunction createAsyncResult(rule, model, $pending, $dirty, _ref, $response, instance) {\n  let {\n    $lazy,\n    $rewardEarly\n  } = _ref;\n  let watchTargets = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];\n  let siblingState = arguments.length > 8 ? arguments[8] : undefined;\n  let $lastInvalidState = arguments.length > 9 ? arguments[9] : undefined;\n  let $lastCommittedOn = arguments.length > 10 ? arguments[10] : undefined;\n  const $invalid = ref(!!$dirty.value);\n  const $pendingCounter = ref(0);\n  $pending.value = false;\n  const $unwatch = watch([model, $dirty].concat(watchTargets, $lastCommittedOn), () => {\n    if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value && !$pending.value) {\n      return;\n    }\n\n    let ruleResult;\n\n    try {\n      ruleResult = callRule(rule, model, siblingState, instance);\n    } catch (err) {\n      ruleResult = Promise.reject(err);\n    }\n\n    $pendingCounter.value++;\n    $pending.value = !!$pendingCounter.value;\n    $invalid.value = false;\n    Promise.resolve(ruleResult).then(data => {\n      $pendingCounter.value--;\n      $pending.value = !!$pendingCounter.value;\n      $response.value = data;\n      $invalid.value = normalizeValidatorResponse(data);\n    }).catch(error => {\n      $pendingCounter.value--;\n      $pending.value = !!$pendingCounter.value;\n      $response.value = error;\n      $invalid.value = true;\n    });\n  }, {\n    immediate: true,\n    deep: typeof model === 'object'\n  });\n  return {\n    $invalid,\n    $unwatch\n  };\n}\n\nfunction createSyncResult(rule, model, $dirty, _ref2, $response, instance, siblingState, $lastInvalidState) {\n  let {\n    $lazy,\n    $rewardEarly\n  } = _ref2;\n\n  const $unwatch = () => ({});\n\n  const $invalid = computed(() => {\n    if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value) {\n      return false;\n    }\n\n    let returnValue = true;\n\n    try {\n      const result = callRule(rule, model, siblingState, instance);\n      $response.value = result;\n      returnValue = normalizeValidatorResponse(result);\n    } catch (err) {\n      $response.value = err;\n    }\n\n    return returnValue;\n  });\n  return {\n    $unwatch,\n    $invalid\n  };\n}\n\nfunction createValidatorResult(rule, model, $dirty, config, instance, validatorName, propertyKey, propertyPath, siblingState, $lastInvalidState, $lastCommittedOn) {\n  const $pending = ref(false);\n  const $params = rule.$params || {};\n  const $response = ref(null);\n  let $invalid;\n  let $unwatch;\n\n  if (rule.$async) {\n    ({\n      $invalid,\n      $unwatch\n    } = createAsyncResult(rule.$validator, model, $pending, $dirty, config, $response, instance, rule.$watchTargets, siblingState, $lastInvalidState, $lastCommittedOn));\n  } else {\n    ({\n      $invalid,\n      $unwatch\n    } = createSyncResult(rule.$validator, model, $dirty, config, $response, instance, siblingState, $lastInvalidState));\n  }\n\n  const message = rule.$message;\n  const $message = isFunction(message) ? computed(() => message(unwrapObj({\n    $pending,\n    $invalid,\n    $params: unwrapObj($params),\n    $model: model,\n    $response,\n    $validator: validatorName,\n    $propertyPath: propertyPath,\n    $property: propertyKey\n  }))) : message || '';\n  return {\n    $message,\n    $params,\n    $pending,\n    $invalid,\n    $response,\n    $unwatch\n  };\n}\n\nfunction sortValidations() {\n  let validationsRaw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  const validations = unref(validationsRaw);\n  const validationKeys = Object.keys(validations);\n  const rules = {};\n  const nestedValidators = {};\n  const config = {};\n  let validationGroups = null;\n  validationKeys.forEach(key => {\n    const v = validations[key];\n\n    switch (true) {\n      case isFunction(v.$validator):\n        rules[key] = v;\n        break;\n\n      case isFunction(v):\n        rules[key] = {\n          $validator: v\n        };\n        break;\n\n      case key === '$validationGroups':\n        validationGroups = v;\n        break;\n\n      case key.startsWith('$'):\n        config[key] = v;\n        break;\n\n      default:\n        nestedValidators[key] = v;\n    }\n  });\n  return {\n    rules,\n    nestedValidators,\n    config,\n    validationGroups\n  };\n}\n\nconst ROOT_PATH = '__root';\n\nfunction createValidationResults(rules, model, key, resultsCache, path, config, instance, externalResults, siblingState) {\n  const ruleKeys = Object.keys(rules);\n  const cachedResult = resultsCache.get(path, rules);\n  const $dirty = ref(false);\n  const $lastInvalidState = ref(false);\n  const $lastCommittedOn = ref(0);\n\n  if (cachedResult) {\n    if (!cachedResult.$partial) return cachedResult;\n    cachedResult.$unwatch();\n    $dirty.value = cachedResult.$dirty.value;\n  }\n\n  const result = {\n    $dirty,\n    $path: path,\n    $touch: () => {\n      if (!$dirty.value) $dirty.value = true;\n    },\n    $reset: () => {\n      if ($dirty.value) $dirty.value = false;\n    },\n    $commit: () => {}\n  };\n\n  if (!ruleKeys.length) {\n    cachedResult && resultsCache.set(path, rules, result);\n    return result;\n  }\n\n  ruleKeys.forEach(ruleKey => {\n    result[ruleKey] = createValidatorResult(rules[ruleKey], model, result.$dirty, config, instance, ruleKey, key, path, siblingState, $lastInvalidState, $lastCommittedOn);\n  });\n  result.$externalResults = computed(() => {\n    if (!externalResults.value) return [];\n    return [].concat(externalResults.value).map((stringError, index) => ({\n      $propertyPath: path,\n      $property: key,\n      $validator: '$externalResults',\n      $uid: `${path}-externalResult-${index}`,\n      $message: stringError,\n      $params: {},\n      $response: null,\n      $pending: false\n    }));\n  });\n  result.$invalid = computed(() => {\n    const r = ruleKeys.some(ruleKey => unref(result[ruleKey].$invalid));\n    $lastInvalidState.value = r;\n    return !!result.$externalResults.value.length || r;\n  });\n  result.$pending = computed(() => ruleKeys.some(ruleKey => unref(result[ruleKey].$pending)));\n  result.$error = computed(() => result.$dirty.value ? result.$pending.value || result.$invalid.value : false);\n  result.$silentErrors = computed(() => ruleKeys.filter(ruleKey => unref(result[ruleKey].$invalid)).map(ruleKey => {\n    const res = result[ruleKey];\n    return reactive({\n      $propertyPath: path,\n      $property: key,\n      $validator: ruleKey,\n      $uid: `${path}-${ruleKey}`,\n      $message: res.$message,\n      $params: res.$params,\n      $response: res.$response,\n      $pending: res.$pending\n    });\n  }).concat(result.$externalResults.value));\n  result.$errors = computed(() => result.$dirty.value ? result.$silentErrors.value : []);\n\n  result.$unwatch = () => ruleKeys.forEach(ruleKey => {\n    result[ruleKey].$unwatch();\n  });\n\n  result.$commit = () => {\n    $lastInvalidState.value = true;\n    $lastCommittedOn.value = Date.now();\n  };\n\n  resultsCache.set(path, rules, result);\n  return result;\n}\n\nfunction collectNestedValidationResults(validations, nestedState, path, resultsCache, config, instance, nestedExternalResults) {\n  const nestedValidationKeys = Object.keys(validations);\n  if (!nestedValidationKeys.length) return {};\n  return nestedValidationKeys.reduce((results, nestedKey) => {\n    results[nestedKey] = setValidations({\n      validations: validations[nestedKey],\n      state: nestedState,\n      key: nestedKey,\n      parentKey: path,\n      resultsCache,\n      globalConfig: config,\n      instance,\n      externalResults: nestedExternalResults\n    });\n    return results;\n  }, {});\n}\n\nfunction createMetaFields(results, nestedResults, childResults) {\n  const allResults = computed(() => [nestedResults, childResults].filter(res => res).reduce((allRes, res) => {\n    return allRes.concat(Object.values(unref(res)));\n  }, []));\n  const $dirty = computed({\n    get() {\n      return results.$dirty.value || (allResults.value.length ? allResults.value.every(r => r.$dirty) : false);\n    },\n\n    set(v) {\n      results.$dirty.value = v;\n    }\n\n  });\n  const $silentErrors = computed(() => {\n    const modelErrors = unref(results.$silentErrors) || [];\n    const nestedErrors = allResults.value.filter(result => (unref(result).$silentErrors || []).length).reduce((errors, result) => {\n      return errors.concat(...result.$silentErrors);\n    }, []);\n    return modelErrors.concat(nestedErrors);\n  });\n  const $errors = computed(() => {\n    const modelErrors = unref(results.$errors) || [];\n    const nestedErrors = allResults.value.filter(result => (unref(result).$errors || []).length).reduce((errors, result) => {\n      return errors.concat(...result.$errors);\n    }, []);\n    return modelErrors.concat(nestedErrors);\n  });\n  const $invalid = computed(() => allResults.value.some(r => r.$invalid) || unref(results.$invalid) || false);\n  const $pending = computed(() => allResults.value.some(r => unref(r.$pending)) || unref(results.$pending) || false);\n  const $anyDirty = computed(() => allResults.value.some(r => r.$dirty) || allResults.value.some(r => r.$anyDirty) || $dirty.value);\n  const $error = computed(() => $dirty.value ? $pending.value || $invalid.value : false);\n\n  const $touch = () => {\n    results.$touch();\n    allResults.value.forEach(result => {\n      result.$touch();\n    });\n  };\n\n  const $commit = () => {\n    results.$commit();\n    allResults.value.forEach(result => {\n      result.$commit();\n    });\n  };\n\n  const $reset = () => {\n    results.$reset();\n    allResults.value.forEach(result => {\n      result.$reset();\n    });\n  };\n\n  if (allResults.value.length && allResults.value.every(nr => nr.$dirty)) $touch();\n  return {\n    $dirty,\n    $errors,\n    $invalid,\n    $anyDirty,\n    $error,\n    $pending,\n    $touch,\n    $reset,\n    $silentErrors,\n    $commit\n  };\n}\n\nfunction setValidations(_ref) {\n  let {\n    validations,\n    state,\n    key,\n    parentKey,\n    childResults,\n    resultsCache,\n    globalConfig = {},\n    instance,\n    externalResults\n  } = _ref;\n  const path = parentKey ? `${parentKey}.${key}` : key;\n  const {\n    rules,\n    nestedValidators,\n    config,\n    validationGroups\n  } = sortValidations(validations);\n\n  const mergedConfig = _objectSpread2(_objectSpread2({}, globalConfig), config);\n\n  const nestedState = key ? computed(() => {\n    const s = unref(state);\n    return s ? unref(s[key]) : undefined;\n  }) : state;\n\n  const cachedExternalResults = _objectSpread2({}, unref(externalResults) || {});\n\n  const nestedExternalResults = computed(() => {\n    const results = unref(externalResults);\n    if (!key) return results;\n    return results ? unref(results[key]) : undefined;\n  });\n  const results = createValidationResults(rules, nestedState, key, resultsCache, path, mergedConfig, instance, nestedExternalResults, state);\n  const nestedResults = collectNestedValidationResults(nestedValidators, nestedState, path, resultsCache, mergedConfig, instance, nestedExternalResults);\n  const $validationGroups = {};\n\n  if (validationGroups) {\n    Object.entries(validationGroups).forEach(_ref2 => {\n      let [key, group] = _ref2;\n      $validationGroups[key] = {\n        $invalid: gatherBooleanGroupProperties(group, nestedResults, '$invalid'),\n        $error: gatherBooleanGroupProperties(group, nestedResults, '$error'),\n        $pending: gatherBooleanGroupProperties(group, nestedResults, '$pending'),\n        $errors: gatherArrayGroupProperties(group, nestedResults, '$errors'),\n        $silentErrors: gatherArrayGroupProperties(group, nestedResults, '$silentErrors')\n      };\n    });\n  }\n\n  const {\n    $dirty,\n    $errors,\n    $invalid,\n    $anyDirty,\n    $error,\n    $pending,\n    $touch,\n    $reset,\n    $silentErrors,\n    $commit\n  } = createMetaFields(results, nestedResults, childResults);\n  const $model = key ? computed({\n    get: () => unref(nestedState),\n    set: val => {\n      $dirty.value = true;\n      const s = unref(state);\n      const external = unref(externalResults);\n\n      if (external) {\n        external[key] = cachedExternalResults[key];\n      }\n\n      if (isRef(s[key])) {\n        s[key].value = val;\n      } else {\n        s[key] = val;\n      }\n    }\n  }) : null;\n\n  if (key && mergedConfig.$autoDirty) {\n    watch(nestedState, () => {\n      if (!$dirty.value) $touch();\n      const external = unref(externalResults);\n\n      if (external) {\n        external[key] = cachedExternalResults[key];\n      }\n    }, {\n      flush: 'sync'\n    });\n  }\n\n  async function $validate() {\n    $touch();\n\n    if (mergedConfig.$rewardEarly) {\n      $commit();\n      await nextTick();\n    }\n\n    await nextTick();\n    return new Promise(resolve => {\n      if (!$pending.value) return resolve(!$invalid.value);\n      const unwatch = watch($pending, () => {\n        resolve(!$invalid.value);\n        unwatch();\n      });\n    });\n  }\n\n  function $getResultsForChild(key) {\n    return (childResults.value || {})[key];\n  }\n\n  function $clearExternalResults() {\n    if (isRef(externalResults)) {\n      externalResults.value = cachedExternalResults;\n    } else {\n      if (Object.keys(cachedExternalResults).length === 0) {\n        Object.keys(externalResults).forEach(k => {\n          delete externalResults[k];\n        });\n      } else {\n        Object.assign(externalResults, cachedExternalResults);\n      }\n    }\n  }\n\n  return reactive(_objectSpread2(_objectSpread2(_objectSpread2({}, results), {}, {\n    $model,\n    $dirty,\n    $error,\n    $errors,\n    $invalid,\n    $anyDirty,\n    $pending,\n    $touch,\n    $reset,\n    $path: path || ROOT_PATH,\n    $silentErrors,\n    $validate,\n    $commit\n  }, childResults && {\n    $getResultsForChild,\n    $clearExternalResults,\n    $validationGroups\n  }), nestedResults));\n}\n\nclass ResultsStorage {\n  constructor() {\n    this.storage = new Map();\n  }\n\n  set(path, rules, result) {\n    this.storage.set(path, {\n      rules,\n      result\n    });\n  }\n\n  checkRulesValidity(path, rules, storedRules) {\n    const storedRulesKeys = Object.keys(storedRules);\n    const newRulesKeys = Object.keys(rules);\n    if (newRulesKeys.length !== storedRulesKeys.length) return false;\n    const hasAllValidators = newRulesKeys.every(ruleKey => storedRulesKeys.includes(ruleKey));\n    if (!hasAllValidators) return false;\n    return newRulesKeys.every(ruleKey => {\n      if (!rules[ruleKey].$params) return true;\n      return Object.keys(rules[ruleKey].$params).every(paramKey => {\n        return unref(storedRules[ruleKey].$params[paramKey]) === unref(rules[ruleKey].$params[paramKey]);\n      });\n    });\n  }\n\n  get(path, rules) {\n    const storedRuleResultPair = this.storage.get(path);\n    if (!storedRuleResultPair) return undefined;\n    const {\n      rules: storedRules,\n      result\n    } = storedRuleResultPair;\n    const isValidCache = this.checkRulesValidity(path, rules, storedRules);\n    const $unwatch = result.$unwatch ? result.$unwatch : () => ({});\n    if (!isValidCache) return {\n      $dirty: result.$dirty,\n      $partial: true,\n      $unwatch\n    };\n    return result;\n  }\n\n}\n\nconst CollectFlag = {\n  COLLECT_ALL: true,\n  COLLECT_NONE: false\n};\nconst VuelidateInjectChildResults = Symbol('vuelidate#injectChildResults');\nconst VuelidateRemoveChildResults = Symbol('vuelidate#removeChildResults');\nfunction nestedValidations(_ref) {\n  let {\n    $scope,\n    instance\n  } = _ref;\n  const childResultsRaw = {};\n  const childResultsKeys = ref([]);\n  const childResults = computed(() => childResultsKeys.value.reduce((results, key) => {\n    results[key] = unref(childResultsRaw[key]);\n    return results;\n  }, {}));\n\n  function injectChildResultsIntoParent(results, _ref2) {\n    let {\n      $registerAs: key,\n      $scope: childScope,\n      $stopPropagation\n    } = _ref2;\n    if ($stopPropagation || $scope === CollectFlag.COLLECT_NONE || childScope === CollectFlag.COLLECT_NONE || $scope !== CollectFlag.COLLECT_ALL && $scope !== childScope) return;\n    childResultsRaw[key] = results;\n    childResultsKeys.value.push(key);\n  }\n\n  instance.__vuelidateInjectInstances = [].concat(instance.__vuelidateInjectInstances || [], injectChildResultsIntoParent);\n\n  function removeChildResultsFromParent(key) {\n    childResultsKeys.value = childResultsKeys.value.filter(childKey => childKey !== key);\n    delete childResultsRaw[key];\n  }\n\n  instance.__vuelidateRemoveInstances = [].concat(instance.__vuelidateRemoveInstances || [], removeChildResultsFromParent);\n  const sendValidationResultsToParent = inject(VuelidateInjectChildResults, []);\n  provide(VuelidateInjectChildResults, instance.__vuelidateInjectInstances);\n  const removeValidationResultsFromParent = inject(VuelidateRemoveChildResults, []);\n  provide(VuelidateRemoveChildResults, instance.__vuelidateRemoveInstances);\n  return {\n    childResults,\n    sendValidationResultsToParent,\n    removeValidationResultsFromParent\n  };\n}\n\nfunction ComputedProxyFactory(target) {\n  return new Proxy(target, {\n    get(target, prop) {\n      return typeof target[prop] === 'object' ? ComputedProxyFactory(target[prop]) : computed(() => target[prop]);\n    }\n\n  });\n}\n\nlet uid = 0;\nfunction useVuelidate(validations, state) {\n  var _getCurrentInstance;\n\n  let globalConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  if (arguments.length === 1) {\n    globalConfig = validations;\n    validations = undefined;\n    state = undefined;\n  }\n\n  let {\n    $registerAs,\n    $scope = CollectFlag.COLLECT_ALL,\n    $stopPropagation,\n    $externalResults,\n    currentVueInstance\n  } = globalConfig;\n  const instance = currentVueInstance || ((_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy);\n  const componentOptions = instance ? instance.$options : {};\n\n  if (!$registerAs) {\n    uid += 1;\n    $registerAs = `_vuelidate_${uid}`;\n  }\n\n  const validationResults = ref({});\n  const resultsCache = new ResultsStorage();\n  const {\n    childResults,\n    sendValidationResultsToParent,\n    removeValidationResultsFromParent\n  } = instance ? nestedValidations({\n    $scope,\n    instance\n  }) : {\n    childResults: ref({})\n  };\n\n  if (!validations && componentOptions.validations) {\n    const rules = componentOptions.validations;\n    state = ref({});\n    onBeforeMount(() => {\n      state.value = instance;\n      watch(() => isFunction(rules) ? rules.call(state.value, new ComputedProxyFactory(state.value)) : rules, validations => {\n        validationResults.value = setValidations({\n          validations,\n          state,\n          childResults,\n          resultsCache,\n          globalConfig,\n          instance,\n          externalResults: $externalResults || instance.vuelidateExternalResults\n        });\n      }, {\n        immediate: true\n      });\n    });\n    globalConfig = componentOptions.validationsConfig || globalConfig;\n  } else {\n    const validationsWatchTarget = isRef(validations) || isProxy(validations) ? validations : reactive(validations || {});\n    watch(validationsWatchTarget, newValidationRules => {\n      validationResults.value = setValidations({\n        validations: newValidationRules,\n        state,\n        childResults,\n        resultsCache,\n        globalConfig,\n        instance: instance !== null && instance !== void 0 ? instance : {},\n        externalResults: $externalResults\n      });\n    }, {\n      immediate: true\n    });\n  }\n\n  if (instance) {\n    sendValidationResultsToParent.forEach(f => f(validationResults, {\n      $registerAs,\n      $scope,\n      $stopPropagation\n    }));\n    onBeforeUnmount(() => removeValidationResultsFromParent.forEach(f => f($registerAs)));\n  }\n\n  return computed(() => {\n    return _objectSpread2(_objectSpread2({}, unref(validationResults.value)), childResults.value);\n  });\n}\n\nexport { CollectFlag, useVuelidate as default, useVuelidate };\n","\n/**\n * Automation statuses\n */\nexport const automationStatuses = {\n  ACTIVE: 'active',\n  DISABLED: 'disabled',\n}\n\n/**\n * Automation status options\n */\nexport const automationStatusOptions = [\n  {\n    value: automationStatuses.ACTIVE,\n    label: 'Active',\n  },\n  {\n    value: automationStatuses.DISABLED,\n    label: 'Disabled',\n  },\n]\n","import {BaseModel} from '@/models/base.model.js'\nimport {automationStatuses} from '@/constants/automations.js'\n\n/**\n * Automation model\n */\nexport class Automation extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'manufacturing'\n  }\n\n  get status() {\n    return this.isEnabled ? automationStatuses.ACTIVE : automationStatuses.DISABLED\n  }\n\n  get isActive() {\n    return this.isEnabled\n  }\n\n  get isDisabled() {\n    return !this.isEnabled\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Automation} from '@/models/automation.model.js'\n\n/**\n * Automations API service\n */\nexport class AutomationsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/automations'\n  itemKey = 'automation'\n  itemsKey = 'automations'\n  ModelClass = Automation\n\n  requestPreview(automation) {\n    return this\n      .post('/preview_data', {automation})\n  }\n\n  getDropdownOptions() {\n    return this\n      .get('/dropdown_options')\n  }\n}\n\n//Export singleton instance\nexport const automationsApi = new AutomationsApi()\n","import {automationsApi} from '@/api/automations.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Automation validation composable\n */\nexport function useAutomationValidation(existingAutomation) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingAutomationExists = ref(false)\n\n  //Check if automation exists by given properties\n  const checkAutomationExists = async data => {\n    try {\n      isCheckingAutomationExists.value = true\n      return await automationsApi.checkExists({\n        ...data,\n        excludeId: existingAutomation?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingAutomationExists.value = false\n    }\n  }\n\n  //Debounced check for automation existence\n  const checkAutomationExistsDebounced = useDebounceFn(checkAutomationExists, 500)\n\n  //Unique automation name validator\n  const uniqueName = asyncValidator(\n    'An automation with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      const exists = await checkAutomationExistsDebounced({name})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkAutomationExists,\n    checkAutomationExistsDebounced,\n    isCheckingAutomationExists,\n    uniqueName,\n  }\n}\n","import {automationsApi} from '@/api/automations.api'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Automation preview composable\n */\nexport function useAutomationPreview(model) {\n\n  //Refs\n  const isRequestingAutomationPreview = ref(false)\n  const automationPreviewText = ref('')\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Request preview\n  const requestAutomationPreview = async () =>{\n    try {\n      automationPreviewText.value = ''\n      isRequestingAutomationPreview.value = true\n      const data = await automationsApi.requestPreview(model.value)\n      automationPreviewText.value = data.automationPreviewText\n    }\n    catch (error) {\n      setFlashFailure('Failed to get preview')\n      processError(error)\n      throw error\n    }\n    finally {\n      isRequestingAutomationPreview.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isRequestingAutomationPreview,\n    automationPreviewText,\n    requestAutomationPreview,\n  }\n}\n","import {automationsApi} from '@/api/automations.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Automation dropdown options composable\n */\nexport function useAutomationDropdownOptions() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const sourceOptions = ref([])\n  const triggerOptions = ref({})\n  const triggerConditionsOptions = ref({})\n  const actionOptions = ref({})\n  const actionConditionsOptions = ref({})\n  const operatorOptions = ref({})\n  const relativeTimeOptions = ref({})\n\n  //Load dropdown options\n  const loadAutomationDropdownOptions = async () => {\n    try {\n      const data = await automationsApi.getDropdownOptions()\n      sourceOptions.value = data.sourceOptions\n      triggerOptions.value = data.triggerOptions\n      triggerConditionsOptions.value = data.triggerConditionsOptions\n      actionOptions.value = data.actionOptions\n      actionConditionsOptions.value = data.actionConditionsOptions\n      operatorOptions.value = data.operatorOptions\n      relativeTimeOptions.value = data.relativeTimeOptions\n    }\n    catch (error) {\n      processError(error)\n    }\n  }\n\n  //Expose interface\n  return {\n    sourceOptions,\n    triggerOptions,\n    triggerConditionsOptions,\n    actionOptions,\n    actionConditionsOptions,\n    operatorOptions,\n    relativeTimeOptions,\n    loadAutomationDropdownOptions,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport ConditionEditor from '@/components/automations/ConditionEditor.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useAutomationValidation} from '@/composables/use-automation-validation.js'\nimport {useAutomationPreview} from '@/composables/use-automation-preview.js'\nimport {useAutomationDropdownOptions} from '@/composables/use-automation-dropdown-options.js'\nimport {ref, computed, watch, onMounted, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'back',\n  'save',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {model, isSaving} = toRefs(props)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Refs\nconst maxDays = ref(999)\nconst minDays = ref(0)\n\n//Computed\nconst showRelativeTimeInput = computed(() => model.value.trigger === 'metadata_matched')\nconst canRequestAutomationPreview = computed(() => validExceptName.value && !isRequestingAutomationPreview.value && !isSaving.value)\nconst isInvalid = computed(() => {\n  // NOTE: for some reason $v.value.$invalid sometimes returns true despite all the below being false, so we need to check each condition individually\n  return $v.value.name.$invalid || $v.value.source.$invalid || $v.value.trigger.$invalid || $v.value.action.$invalid || $v.value.triggerConditions.$invalid || $v.value.actionConditions.$invalid || $v.value.numDaysDelayBeforeAction.$invalid || $v.value.$pending || isSaving.value || isRequestingAutomationPreview.value\n})\nconst availableTriggerConditionsOptions = computed(() => triggerConditionsOptions.value[model.value.trigger?.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase())] || [])\nconst availableActionConditionsOptions = computed(() =>  actionConditionsOptions.value[model.value.action?.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase())] || [])\n// NOTE: a name is not needed for the preview to work, so we don't need to validate it before requesting preview data\nconst validExceptName = computed(() => !$v.value.source.$invalid && !$v.value.trigger.$invalid && !$v.value.action.$invalid && !$v.value.triggerConditions.$invalid && !$v.value.actionConditions.$invalid && !$v.value.numDaysDelayBeforeAction.$invalid)\nconst availableActionOptions = computed(() => actionOptions.value[model.value.trigger?.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase())] || [])\nconst availableTriggerOptions = computed(() => triggerOptions.value[model.value.source?.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase())] || [])\n\n//Composables\nconst {\n  isRequestingAutomationPreview,\n  automationPreviewText,\n  requestAutomationPreview,\n} = useAutomationPreview(model)\nconst {\n  sourceOptions,\n  triggerOptions,\n  triggerConditionsOptions,\n  actionOptions,\n  actionConditionsOptions,\n  operatorOptions,\n  relativeTimeOptions,\n  loadAutomationDropdownOptions,\n} = useAutomationDropdownOptions()\n\n//Watchers\nwatch(availableActionOptions, (options) => {\n  if (options.length === 1 && model.value.action === '') {\n    handleActionInput(options[0].value)\n  }\n})\nwatch(availableTriggerOptions, (options) => {\n  if (options.length === 1 && model.value.trigger === '') {\n    handleTriggerInput(options[0].value)\n  }\n})\nwatch(showRelativeTimeInput, (show) => {\n  if (!show) {\n    updateModel({numDaysDelayBeforeAction: 0})\n  }\n})\n\n//Methods\nconst handleSourceInput = value => {\n  updateModel({source: value, trigger: '', triggerConditions: {and: [{}]}, action: '', actionConditions: {and: [{}]}})\n  requestPreview()\n}\nconst handleUseExistingDataFirstEnable = () => {\n  updateModel({useExistingDataFirstEnable: !model.value.useExistingDataFirstEnable})\n  requestPreview()\n}\nconst handleActionInput = value => {\n  updateModel({action: value, actionConditions: {and: [{}]}})\n  requestPreview()\n}\nconst handleTriggerInput = value => {\n  updateModel({trigger: value, action: '', actionConditions: {and: [{}]}, triggerConditions: {and: [{}]}})\n  requestPreview()\n}\nconst handleActionConditionsInput = ({value, path}) => {\n  const options = updateNestedValueByPath(model.value.actionConditions, value, path)\n  updateModel({actionConditions: options})\n  requestPreview()\n}\nconst handleTriggerConditionsInput = ({value, path}) => {\n  const options = updateNestedValueByPath(model.value.triggerConditions, value, path)\n  updateModel({triggerConditions: options})\n  requestPreview()\n}\nconst handleNumDaysDelayBeforeAction = value => {\n  const numValue = parseInt(value)\n  updateModel({numDaysDelayBeforeAction: numValue})\n  requestPreview()\n}\nconst updateNestedValueByPath = (base, value, path) => {\n  let keyOrIndex\n  let fullStructure = JSON.parse(JSON.stringify(base))\n  let currentInFull = fullStructure\n  let parentInFull = null\n\n  for (let i = 0; i < path.length; i++) {\n    parentInFull = currentInFull // Keep track of the parent object in full structure\n    keyOrIndex = path[i]\n\n    // Update the full structure\n    if (Array.isArray(currentInFull[keyOrIndex])) {\n      currentInFull[keyOrIndex] = [...currentInFull[keyOrIndex]]\n    }\n    else if (typeof currentInFull[keyOrIndex] === 'object' && currentInFull[keyOrIndex] !== null) {\n      currentInFull[keyOrIndex] = {...currentInFull[keyOrIndex]}\n    }\n\n    currentInFull = currentInFull[keyOrIndex]\n    base = base[keyOrIndex]\n\n    // If we're not at the end, make sure this keyOrIndex leads to an object\n    if (i < path.length - 1 && typeof base !== 'object') {\n      console.error('Path does not lead to an object:', path.slice(0, i + 1))\n      return // Exit early if the path is broken\n    }\n  }\n\n  // Update both the original reference and the full structure\n  parentInFull[keyOrIndex] = value\n\n  return fullStructure // Return the fully updated structure\n}\nconst requestPreview = () => {\n  if (canRequestAutomationPreview.value) {\n    requestAutomationPreview()\n  }\n}\nconst saveModel = async () => {\n  $v.value.$touch()\n  emit('save')\n}\n\n//Validations\nconst {uniqueName, isCheckingAutomationExists} = useAutomationValidation(model)\nconst {required, noEmptyObjects, withMessage, between, integerWithMessage} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Name'),\n    uniqueName,\n  },\n  source: {\n    required: required('Source'),\n  },\n  trigger: {\n    required: required('Trigger'),\n  },\n  action: {\n    required: required('Action'),\n  },\n  triggerConditions: {\n    noEmptyObjects: withMessage('Please complete all selections', (value) => noEmptyObjects(value)),\n  },\n  actionConditions: {\n    noEmptyObjects: withMessage('Please complete all selections', (value) => noEmptyObjects(value)),\n  },\n  numDaysDelayBeforeAction: {\n    between: withMessage(\n      `Please enter a number between ${minDays.value} and ${maxDays.value}`,\n      between(minDays.value, maxDays.value)\n    ),\n    integer: integerWithMessage,\n  },\n}, model)\n\n//Lifecycle\nonMounted(async () => {\n  try {\n    await loadAutomationDropdownOptions()\n    if (sourceOptions.value.length == 1 && model.value.source === '') {\n      handleSourceInput(sourceOptions.value[0].value)\n    }\n    if (model.value.id) {\n      requestPreview()\n    }\n  }\n  catch {\n    //Fall through\n  }\n})\n</script>\n\n<template>\n  <PageWrapper sticky-footer>\n    <FlexRow\n      v-if=\"model\"\n      align-items=\"start\"\n    >\n      <FlexColumn>\n        <PageBlock>\n          <FormField\n            is-required\n            label=\"Automation name\"\n            :errors=\"$v.name.$errors\"\n          >\n            <TextInput\n              test-id=\"name\"\n              :value=\"model.name\"\n              :has-error=\"$v.name.$error && !$v.name.$pending\"\n              is-required\n              :character-limit=\"255\"\n              :has-spinner=\"isCheckingAutomationExists\"\n              @input=\"updateModel({name: $event.value})\"\n              @dirty=\"$v.name.$touch()\"\n            />\n          </FormField>\n        </PageBlock>\n        <PageBlock header=\"1. Identify trigger\">\n          <FormField\n            label=\"Source\"\n            is-required\n            :errors=\"$v.source.$errors\"\n          >\n            <SelectInput\n              test-id=\"source\"\n              :options=\"sourceOptions\"\n              :value=\"model.source\"\n              :is-clearable=\"false\"\n              :has-error=\"$v.source.$error\"\n              @input=\"handleSourceInput($event.value)\"\n              @dirty=\"$v.source.$touch()\"\n            />\n          </FormField>\n          <FormField\n            label=\"Event\"\n            is-required\n            :errors=\"$v.trigger.$errors\"\n          >\n            <SelectInput\n              test-id=\"trigger\"\n              :options=\"availableTriggerOptions\"\n              :value=\"model.trigger\"\n              :is-disabled=\"!availableTriggerOptions.length\"\n              :is-clearable=\"false\"\n              :has-error=\"$v.trigger.$error\"\n              @input=\"handleTriggerInput($event.value)\"\n              @dirty=\"$v.trigger.$touch()\"\n            />\n          </FormField>\n          <FormField :errors=\"$v.triggerConditions.$errors\">\n            <ConditionEditor\n              test-id=\"triggerCondition\"\n              :condition=\"model.triggerConditions\"\n              :is-disabled=\"!availableTriggerConditionsOptions.length\"\n              :dropdown-options=\"availableTriggerConditionsOptions\"\n              :operator-options=\"operatorOptions\"\n              :relative-time-options=\"relativeTimeOptions\"\n              :show-text-inputs=\"model.source === 'file'\"\n              :validations=\"$v.triggerConditions\"\n              @input=\"handleTriggerConditionsInput($event)\"\n              @dirty=\"$v.triggerConditions.$touch()\"\n            />\n          </FormField>\n          <FormField v-if=\"!(model.enableCount > 0) && model.source === 'file'\">\n            <CheckBox\n              :is-checked=\"model.useExistingDataFirstEnable\"\n              :is-disabled=\"model.isEnabledUpdatedAt\"\n              label=\"Run automation against data that exists before automation is enabled.\"\n              @click=\"handleUseExistingDataFirstEnable()\"\n            />\n          </FormField>\n        </PageBlock>\n\n        <PageBlock header=\"2. Determine action\">\n          <FormField\n            label=\"Action\"\n            is-required\n            :errors=\"$v.action.$errors\"\n          >\n            <SelectInput\n              test-id=\"action\"\n              :options=\"availableActionOptions\"\n              :value=\"model.action\"\n              :is-disabled=\"!availableActionOptions.length\"\n              :is-clearable=\"false\"\n              :has-error=\"$v.action.$error\"\n              @input=\"handleActionInput($event.value)\"\n              @dirty=\"$v.action.$touch()\"\n            />\n          </FormField>\n          <FormField\n            v-if=\"showRelativeTimeInput\"\n            label=\" Number of days after trigger criteria is met\"\n            :errors=\"$v.numDaysDelayBeforeAction.$errors\"\n            is-required\n          >\n            <TextInput\n              test-id=\"numDaysDelayBeforeAction\"\n              :value=\"model.numDaysDelayBeforeAction\"\n              is-required\n              type=\"number\"\n              :has-error=\"$v.numDaysDelayBeforeAction.$error\"\n              @input=\"handleNumDaysDelayBeforeAction($event.value)\"\n              @dirty=\"$v.numDaysDelayBeforeAction.$touch()\"\n            />\n          </FormField>\n          <FormField :errors=\"$v.actionConditions.$errors\">\n            <ConditionEditor\n              position=\"top\"\n              test-id=\"actionCondition\"\n              :condition=\"model.actionConditions\"\n              :is-disabled=\"!availableActionConditionsOptions.length\"\n              :dropdown-options=\"availableActionConditionsOptions\"\n              :show-text-inputs=\"false\"\n              :validations=\"$v.actionConditions\"\n              @input=\"handleActionConditionsInput($event)\"\n              @dirty=\"$v.actionConditions.$touch()\"\n            />\n          </FormField>\n        </PageBlock>\n      </FlexColumn>\n\n      <FlexColumn :with-margin=\"false\">\n        <PageBlock header=\"Preview automation\">\n          <Alert\n            v-if=\"validExceptName\"\n            is-spaced\n            :text=\"automationPreviewText\"\n          />\n        </PageBlock>\n      </FlexColumn>\n    </FlexRow>\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-go-back=\"true\"\n        :is-disabled-confirm=\"isInvalid\"\n        :has-spinner-confirm=\"isSaving\"\n        :label-confirm=\"isSaving ? 'Saving...' : 'Save'\"\n        @confirm=\"saveModel()\"\n        @back=\"$emit('back')\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n","import {automationsApi} from '@/api/automations.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, watch} from 'vue'\n\n/**\n * Automation editing composable\n */\nexport function useAutomationEditing(automation) {\n\n  //Composables\n  const {setFlashFailure, setFlashSuccess} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Model\n  const model = ref(\n    {\n      name: '',\n      description: '',\n      source: '',\n      is_enabled: false,\n      trigger: '',\n      triggerConditions: {and: [{}]},\n      action: '',\n      actionConditions: {and: [{}]},\n      useExistingDataFirstEnable: false,\n      numDaysDelayBeforeAction: 0,\n    }\n  )\n\n  //Save automation on server\n  const isUpdatingAutomation = ref(false)\n  const saveAutomation = async () => {\n\n    //Toggle flag and commence update\n    isUpdatingAutomation.value = true\n\n    //Extract data for update\n    const {id} = automation.value\n    const data = model.value\n\n    //Update\n    try {\n      const automation = await automationsApi.updateById(id, data)\n      setFlashSuccess('Automation updated')\n      return automation\n    }\n    catch (error) {\n      setFlashFailure('Failed to update automation')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingAutomation.value = false\n    }\n  }\n\n  //Update model\n  const updateModel = data => {\n    Object.assign(model.value, data)\n  }\n\n  watch(automation, (newValue, oldValue) => {\n    if (newValue && !oldValue) {\n      Object.assign(model.value, newValue)\n    }\n  })\n\n  //Expose interface\n  return {\n    model,\n    updateModel,\n    saveAutomation,\n    isUpdatingAutomation,\n  }\n}\n","<script setup>\nimport AutomationsForm from '@/components/automations/AutomationsForm.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useAutomationEditing} from '@/composables/use-automation-editing.js'\nimport {automationsApi} from '@/api/automations.api.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Edit automation')\n\n//Navigation\nconst {goToAutomationsOverview} = useNavigation()\n\n//Routing\nconst {routeParams, replaceRoute} = useRouting()\nconst {id} = routeParams.value\n\n//Model ref\nconst automation = ref(null)\nconst isLoading = ref(true)\n\nautomationsApi\n  .findById(id)\n  .then(item => automation.value = item)\n  .catch(() => replaceRoute('automations-overview'))\n  .finally(() => isLoading.value = false)\n//Composables\nconst {\n  model,\n  updateModel,\n  saveAutomation,\n  isUpdatingAutomation,\n} = useAutomationEditing(automation)\n\n//Save\nconst save = () => {\n  try {\n    saveAutomation()\n    goToAutomationsOverview()\n  }\n  catch {\n    //Handled by the useAutomationEditing composable\n  }\n}\n</script>\n\n<template>\n  <AutomationsForm\n    v-if=\"!isLoading\"\n    :model=\"model\"\n    :is-saving=\"isUpdatingAutomation\"\n    @update=\"updateModel($event.data)\"\n    @back=\"goToAutomationsOverview()\"\n    @save=\"save()\"\n  />\n</template>\n","<script setup>\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  rows: {\n    type: Number,\n    default: 0,\n  },\n  isScrollable: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Height CSS\nconst {rows} = toRefs(props)\nconst height = computed(() => {\n  if (rows.value > 0) {\n    return `${rows.value * 61 + 1}px`\n  }\n  return 'auto'\n})\n</script>\n\n<template>\n  <div\n    :class=\"{\n      [$style.container]: true,\n      [$style.scrollable]: isScrollable,\n    }\"\n    :style=\"{height}\"\n  >\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n  width: 100%;\n  &.scrollable {\n    padding-right: 1rem;\n    overflow-y: auto;\n    max-height: 306px; //Fits 5 rows, and will scroll if there are more\n  }\n}\n</style>\n","import {ref, computed, nextTick} from 'vue'\nimport {useEventListener} from '@vueuse/core'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\n\n/**\n * Composable to select items using the keyboard\n */\nexport function useKeyboardItemSelection(itemRefs, focusRef) {\n\n  //Composables\n  const {scrollIntoView} = useScrollIntoView()\n\n  //Create refs\n  const selectedIndex = ref(-1)\n  const confirmedIndex = ref(-1)\n  const numItems = computed(() => itemRefs.value.length)\n  const hasItems = computed(() => numItems.value > 0)\n  const selectedRef = computed(() => itemRefs.value[selectedIndex.value] || null)\n\n  //Selection\n  const selectNext = () => {\n    if (selectedIndex.value < numItems.value - 1) {\n      selectedIndex.value++\n      nextTick(() => scrollIntoView(selectedRef, {block: 'nearest'}))\n    }\n  }\n  const selectPrev = () => {\n    if (selectedIndex.value > -1) {\n      selectedIndex.value--\n      nextTick(() => scrollIntoView(selectedRef, {block: 'nearest'}))\n    }\n  }\n  const clearSelection = () => {\n    selectedIndex.value = -1\n  }\n\n  //Keydown handler\n  const keydownHandler = (event) => {\n    if (!hasItems.value) {\n      return\n    }\n    if (event.key === 'ArrowDown') {\n      event.preventDefault()\n      selectNext()\n      if (focusRef.value)  {\n        focusRef.value.blur()\n      }\n    }\n    else if (event.key === 'ArrowUp') {\n      event.preventDefault()\n      selectPrev()\n      if (focusRef.value)  {\n        if (selectedIndex.value === -1) {\n          focusRef.value.focus()\n        }\n        else {\n          focusRef.value.blur()\n        }\n      }\n    }\n    else if (event.key === 'Enter' && selectedIndex.value > -1) {\n      event.preventDefault()\n      confirmedIndex.value = selectedIndex.value\n    }\n  }\n\n  //Apply event listener\n  useEventListener(document, 'keydown', keydownHandler)\n\n  //Expose interface\n  return {\n\n    //Refs\n    selectedIndex,\n    confirmedIndex,\n\n    //Functions\n    selectNext,\n    selectPrev,\n    clearSelection,\n  }\n}\n","<script setup>\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport ListItemsContainer from '@/components/shared/search/ListItemsContainer.vue'\nimport ListItem from '@/components/shared/search/ListItem.vue'\nimport {useKeyboardItemSelection} from '@/composables/use-keyboard-item-selection.js'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {useFocus} from '@/composables/use-focus.js'\nimport {ref, computed, toRefs, watch, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'partial-search',\n  'full-search',\n  'clear-search',\n  'select-result',\n])\nconst props = defineProps({\n  searchResults: {\n    type: Array,\n    default: () => [],\n  },\n  defaultResultIcon: {\n    type: String,\n    default: 'article',\n  },\n  resultLabelProp: {\n    type: String,\n    default: 'name',\n  },\n  resultIconProp: {\n    type: String,\n    default: 'icon',\n  },\n  hasPartialSearch: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Results\nconst {searchResults, hasPartialSearch} = toRefs(props)\nconst numResults = computed(() => searchResults.value.length)\nconst hasResults = computed(() => numResults.value > 0)\n\n//Results dropdown toggling\nconst resultsPanel = ref(null)\nconst {\n  isVisible: isShowingResults,\n  hide: hideResults,\n} = useVisibilityToggle(resultsPanel)\nconst showResultsIfHasResults = () => isShowingResults.value = hasResults.value\n\n//Item selection\nconst resultRefs = ref([])\nconst searchPanel = ref(null)\nconst {\n  selectedIndex,\n  confirmedIndex,\n  clearSelection,\n} = useKeyboardItemSelection(resultRefs, searchPanel)\n\n//Search event handling\nconst partialSearch = event => {\n  if (!hasPartialSearch.value) {\n    return\n  }\n  showResultsIfHasResults()\n  clearSelection()\n  emit('partial-search', event)\n}\nconst fullSearch = event => {\n  emit('full-search', event)\n  hideResults()\n}\nconst clearSearch = () => emit('clear-search')\n\n//Watch for results\nwatch(hasResults, showResultsIfHasResults)\n\n//Partial result selection\nconst selectResult = result => emit('select-result', {result})\nwatchEffect(() => {\n  if (confirmedIndex.value > -1) {\n    const result = searchResults.value[confirmedIndex.value]\n    selectResult(result)\n  }\n})\n\n//Expose focus and blur methods to allow parent components to focus/blur the input\nconst input = ref(null)\nconst {focus, blur} = useFocus(input)\ndefineExpose({\n  focus,\n  blur,\n})\n</script>\n\n<template>\n  <div\n    is-relative\n    :class=\"$style.panel\"\n  >\n    <SearchInput\n      ref=\"input\"\n      v-bind=\"$attrs\"\n      @clear-search=\"clearSearch()\"\n      @partial-search=\"partialSearch($event)\"\n      @full-search=\"fullSearch($event)\"\n    />\n\n    <DropdownPanel\n      ref=\"resultsPanel\"\n      :is-visible=\"isShowingResults\"\n      :class=\"$style.dropdown\"\n    >\n      <ListItemsContainer\n        :class=\"$style.container\"\n        is-padded\n        is-scrollable\n      >\n        <slot name=\"searchResults\">\n          <ListItem\n            v-for=\"(result, i) in searchResults\"\n            :key=\"result.id\"\n            ref=\"resultRefs\"\n            :icon=\"(resultIconProp && result[resultIconProp]) ? result[resultIconProp] : defaultResultIcon\"\n            :is-selected=\"selectedIndex === i\"\n            @click=\"selectResult(result)\"\n          >\n            <template #label>\n              <slot\n                name=\"resultLabel\"\n                :result=\"result\"\n              >\n                {{ result[resultLabelProp] }}\n              </slot>\n            </template>\n          </ListItem>\n        </slot>\n      </ListItemsContainer>\n    </DropdownPanel>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  width: 100%;\n}\n.panel {\n  border-radius: 0.5rem;\n  flex: 1;\n  max-width: 380px;\n}\n.container {\n  max-height: 304px; /* Fits 5 results */\n}\n</style>\n","<script setup>\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport {automationStatuses, automationStatusOptions} from '@/constants/automations.js'\nimport {componentColors} from '@/constants/components.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {useDate} from '@/composables/use-date.js'\nimport {toRefs, computed, ref} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  automation: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Determine color for status badge\nconst {automation} = toRefs(props)\n\n//Refs\nconst format = ref(dateFormats.DATE)\n\n//Computed\nconst date = computed(() => automation.value.isEnabledUpdatedAt || automation.value.createdAt)\nconst color = computed(() => {\n  switch (automation.value.status) {\n    case automationStatuses.ACTIVE:\n      return componentColors.SUCCESS\n    case automationStatuses.DISABLED:\n      return componentColors.DANGER\n    default:\n      return ''\n  }\n})\nconst label = computed(() => automationStatusOptions.find(option => option.value === automation.value.status)?.label)\nconst text = computed(() => `${label.value} as of ${formattedDate.value}`)\n\n//Composables\nconst {formattedDate} = useDate(date, format)\n</script>\n\n<template>\n  <Tooltip\n    :is-disabled=\"!text\"\n    :text=\"text\"\n    position=\"top\"\n  >\n    <StatusBadge\n      icon=\"circle\"\n      :color=\"color\"\n      v-bind=\"$attrs\"\n    >\n      <LabelValue\n        :options=\"automationStatusOptions\"\n        :value=\"automation.status\"\n      />\n    </StatusBadge>\n  </Tooltip>\n</template>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {ref, computed, toRefs, useSlots} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  label: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  href: {\n    type: String,\n    default: '',\n  },\n  route: {\n    type: Object,\n    default: null,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get props\nconst {isDisabled} = toRefs(props)\n\n//Using slots programmatically because for some reason the Vue template does not\n//detect $slots.itemActions. Maybe this is fixed in Vue 3.\nconst slots = useSlots()\nconst hasNestedContent = computed(() => !!slots.nested)\n\n//Visibility toggle for nested menu\nconst item = ref(null)\nconst {\n  isVisible,\n  show,\n  hide,\n} = useVisibilityToggle(item)\n\n//Handle click\nconst handleClick = (event) => {\n  if (isDisabled.value || hasNestedContent.value) {\n    event.preventDefault()\n    event.stopPropagation()\n  }\n  else {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <li\n    ref=\"item\"\n    :class=\"$style.wrapper\"\n    @mouseover=\"show\"\n    @mouseleave=\"hide\"\n  >\n    <RouterLink\n      v-if=\"route && !isDisabled\"\n      :to=\"route\"\n      :class=\"$style.item\"\n    >\n      <Icon\n        v-if=\"icon\"\n        :icon=\"icon\"\n        :class=\"$style.icon\"\n      />\n      <span :class=\"$style.label\">\n        <slot name=\"label\">{{ label }}</slot>\n      </span>\n    </RouterLink>\n    <a\n      v-else-if=\"href && !isDisabled\"\n      :href=\"href\"\n      :class=\"$style.item\"\n    >\n      <Icon\n        v-if=\"icon\"\n        :icon=\"icon\"\n        :class=\"$style.icon\"\n      />\n      <span :class=\"$style.label\">\n        <slot>{{ label }}</slot>\n      </span>\n    </a>\n    <div\n      v-else\n      :class=\"{\n        [$style.item]: true,\n        [$style.disabled]: isDisabled,\n      }\"\n      @click=\"handleClick($event)\"\n    >\n      <Icon\n        v-if=\"icon\"\n        :icon=\"icon\"\n        :class=\"$style.icon\"\n      />\n      <span :class=\"$style.label\">\n        {{ label }}\n      </span>\n      <Icon\n        v-if=\"hasNestedContent\"\n        icon=\"chevron_right\"\n        :class=\"$style.chevron\"\n      />\n    </div>\n\n    <slot\n      name=\"nested\"\n      :is-visible=\"isVisible\"\n      :hide=\"hide\"\n    />\n  </li>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  margin: 0;\n}\n.item {\n  position: relative;\n  display: flex;\n  padding: 0 1rem;\n  align-items: center;\n  height: 2.5rem;\n  cursor: pointer;\n  color: var(--color-white);\n  a {\n    color: var(--color-white);\n  }\n  &:hover {\n    background: #454b51;\n    text-decoration: none;\n    color: var(--color-white);\n  }\n  &.disabled {\n    cursor: not-allowed;\n    color: var(--color-text-muted);\n    &:hover {\n      background: transparent;\n      color: var(--color-text-muted);\n    }\n  }\n}\n.icon {\n  min-width: 2.5rem;\n  max-width: 2.5rem;\n}\n.chevron {\n  margin-right: -0.75rem;\n  color: var(--color-elements);\n}\n.label {\n  padding-right: 0.5rem;\n  white-space: nowrap;\n  display: inline-block;\n  flex: 1;\n  &::first-letter {\n    text-transform: uppercase\n  }\n}\n</style>\n","<script setup>\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport Dropdown from '@/components/shared/dropdown/Dropdown.vue'\nimport DropdownMenu from '@/components/shared/dropdown/DropdownMenu.vue'\nimport MoreActionsButton from '@/components/shared/buttons/MoreActionsButton.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {ref} from 'vue'\n\n//Props\ndefineProps({\n  isFlipped: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n})\n\n//Dropdown toggling\nconst wrapper = ref(null)\nconst menu = ref(null)\nconst {\n  isVisible,\n  toggle,\n  hide,\n} = useVisibilityToggle(wrapper)\n</script>\n\n<template>\n  <DropdownWrapper ref=\"wrapper\">\n    <MoreActionsButton\n      :test-id=\"testId ? `${testId}Toggle` : undefined\"\n      @click.stop=\"toggle()\"\n    />\n    <Dropdown\n      alignment=\"right\"\n      :class=\"{\n        [$style.dropdown]: true,\n        [$style.flipped]: isFlipped,\n      }\"\n      :is-visible=\"isVisible\"\n    >\n      <DropdownMenu\n        ref=\"menu\"\n        :test-id=\"testId ? `${testId}Menu` : undefined\"\n        @click.stop=\"hide()\"\n      >\n        <slot />\n      </DropdownMenu>\n    </Dropdown>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  margin-right: 0.5rem;\n  box-shadow: var(--box-shadow-strong);\n  &.flipped {\n    bottom: 2.25rem;\n  }\n}\n</style>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {Automation} from '@/models/automation.model.js'\n\n//Emits and props\ndefineProps({\n  automation: {\n    type: Automation,\n    required: true,\n  },\n})\n\n//Navigation\nconst {\n  goToEditAutomation,\n} = useNavigation()\n</script>\n\n<template>\n  <ActionsDropdownMenu v-bind=\"$attrs\">\n    <DropdownMenuItem\n      :is-disabled=\"automation.isEnabled\"\n      label=\"Edit\"\n      @click=\"goToEditAutomation(automation.id)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","import {useStoredSetting} from '@/composables/use-stored-setting.js'\n\n/**\n * Items per page composable\n */\nexport function useItemsPerPage(type = 'global', defaultValue = 10) {\n\n  //Stored setting\n  const {\n    setting: itemsPerPage,\n    changeSetting: setItemsPerPage,\n  } = useStoredSetting(`${type}.itemsPerPage`, defaultValue)\n\n  //Expose interface\n  return {\n    itemsPerPage,\n    setItemsPerPage,\n  }\n}\n","import {arraysMatch, insertAfter, setValueAtIndex} from '@/helpers/array.js'\nimport {useItemsPerPage} from '@/composables/use-items-per-page.js'\nimport {useThrottleFn} from '@vueuse/core'\nimport {ref, unref, computed, isRef, watch} from 'vue'\n\n/**\n * Querying composable\n */\nexport function useQuerying(options) {\n\n  //Must have handler\n  if (typeof options.handler !== 'function') {\n    throw new Error(`Must provide at least a handler function`)\n  }\n\n  //Items per page\n  const {itemsPerPage, setItemsPerPage} = useItemsPerPage(\n    options.key, options.defaultItemsPerPage\n  )\n\n  //Refs\n  const items = ref([])\n  const total = ref(0)\n  const offset = ref(0)\n  const limit = ref(unref(options.limit) || itemsPerPage.value || 10)\n  const sort = ref(unref(options.sort) || '')\n  const search = ref('')\n  const fields = ref(unref(options.fields) || [])\n  const filter = ref(unref(options.filter) || {})\n  const hasItems = computed(() => items.value.length > 0)\n  const isLoadingItems = ref(true)\n  const isLoadingMoreItems = ref(false)\n  const hasLoadedItems = ref(false) //First time load\n  const currentPage = computed(() => Math.floor(offset.value / limit.value) + 1)\n  const hasLoadedAllItems = computed(() => items.value.length >= total.value)\n  const isBatchQuerying = ref(false)\n\n  //Get query params\n  const getQueryParams = () => {\n    return Object.assign({}, filter.value || {}, {\n      sort: sort.value || undefined,\n      offset: offset.value || undefined,\n      limit: limit.value || undefined,\n      search: search.value || undefined,\n      fields: fields.value || undefined,\n    })\n  }\n\n  //Get query params for exports (non paginated)\n  const getExportQueryParams = () => {\n    return Object.assign({}, filter.value || {}, {\n      sort: sort.value || undefined,\n      search: search.value || undefined,\n    })\n  }\n\n  //Item querying (does not update items ref)\n  const queryItems = async (queryParams, flatArray = false) => {\n\n    //Get response\n    const response = await options.handler(queryParams)\n    const {meta, items} = response\n\n    //Return as flat array?\n    if (flatArray) {\n      return items\n    }\n\n    //Return items and meta data\n    return {items, meta}\n  }\n\n  //Item loader (does update items ref)\n  const loadItems = async () => {\n    try {\n\n      //Query items\n      const queryParams = getQueryParams()\n      const response = await queryItems(queryParams)\n\n      //Set data\n      items.value = response.items\n      total.value = response.meta.total\n      offset.value = response.meta.offset\n\n      if (isBatchQuerying.value && !hasLoadedAllItems.value) {\n        while (!hasLoadedAllItems.value) {\n          await loadMoreItems()\n        }\n      }\n    }\n    finally {\n      isLoadingItems.value = false\n      hasLoadedItems.value = true\n    }\n  }\n\n  //Reload data\n  const reloadItems = () => {\n    items.value = []\n    offset.value = 0\n    isLoadingItems.value = true\n    isBatchQuerying.value ? loadItemsBatched() : loadItems()\n  }\n\n  //Unload items\n  const unloadItems = () => {\n    items.value = []\n    offset.value = 0\n    total.value = 0\n  }\n\n  //Load page handler\n  const loadItemsForPage = async page => {\n    page = unref(page)\n    offset.value = (page - 1) * limit.value\n    isLoadingItems.value = true\n    loadItems()\n  }\n\n  //Load more handler\n  const loadMoreItems = async () => {\n\n    //Everything's been loaded\n    if (items.value.length >= total.value) {\n      return\n    }\n\n    //Load more items\n    try {\n\n      //Set flag and increase offset\n      isLoadingMoreItems.value = true\n      offset.value += limit.value\n\n      //Query items\n      const queryParams = getQueryParams()\n      const response = await queryItems(queryParams)\n\n      //Set new items value\n      items.value = [\n        ...items.value,\n        ...response.items,\n      ]\n\n      //Set meta data\n      total.value = response.meta.total\n      offset.value = response.meta.offset\n    }\n    finally {\n      isLoadingMoreItems.value = false\n      hasLoadedItems.value = true\n    }\n  }\n\n  const loadMoreItemsThrottled = useThrottleFn(loadMoreItems, 250)\n\n  const loadItemsBatched = async () => {\n    isBatchQuerying.value = true\n    await loadItems()\n  }\n\n  //Wrapped items per page\n  const changeItemsPerPage = num => {\n    setItemsPerPage(num)\n    changeLimit(num)\n  }\n\n  //Change limit\n  const changeLimit = (newLimit, reload = true) => {\n    newLimit = unref(newLimit)\n    if (limit.value === newLimit) {\n      return\n    }\n    limit.value = newLimit\n    if (reload) {\n      reloadItems()\n    }\n  }\n\n  //Sort handler\n  const changeSort = (newSort, reload = true) => {\n    newSort = unref(newSort)\n    if (sort.value === newSort) {\n      return\n    }\n    sort.value = newSort\n    if (reload) {\n      reloadItems()\n    }\n  }\n\n  //Search handler\n  const changeSearch = (newSearch, reload = true) => {\n    newSearch = unref(newSearch)\n    if (search.value === newSearch) {\n      return\n    }\n    search.value = newSearch\n    if (reload) {\n      reloadItems()\n    }\n  }\n\n  //Clear search\n  const clearSearch = (reload = true) => {\n    changeSearch('', reload)\n  }\n\n  //Set filter\n  const setFilter = (newFilter, reload = true) => {\n    newFilter = unref(newFilter) || {}\n    if (isFilterActive(newFilter)) {\n      return\n    }\n    filter.value = newFilter\n    if (reload) {\n      reloadItems()\n    }\n  }\n\n  //Reset filter to default\n  const resetFilter = (reload = true) => {\n    setFilter(options.filter, reload)\n  }\n\n  //Change filter\n  const changeFilter = (filterObj, reload = true) => {\n    const newFilter = Object.assign({}, filter.value, unref(filterObj))\n    setFilter(newFilter, reload)\n  }\n\n  //Check if a specific filter is currently active\n  const isFilterActive = filterObj => {\n    if (Object.keys(filterObj).length !== Object.keys(filter.value).length) {\n      return false\n    }\n    return Object.keys(filterObj).every(key => {\n      return filterObj[key] === filter.value[key]\n    })\n  }\n\n  //Check if a filter value is empty\n  const isEmptyFilterValue = value => {\n    return (\n      value === null ||\n      value === undefined ||\n      (Array.isArray(value) && value.length === 0)\n    )\n  }\n\n  //Check if a filter value is the same as the default value\n  const isDefaultFilterValue = (value, defaultValue) => {\n    if (Array.isArray(value) && Array.isArray(defaultValue)) {\n      return arraysMatch(value, defaultValue)\n    }\n    return value === defaultValue\n  }\n\n  //Check how many (non-default) filters are active\n  const numActiveFilters = computed(() => {\n    let num = 0\n    for (const key in filter.value) {\n\n      //Default value specified for this filter key\n      if (options.filter && typeof options.filter[key] !== 'undefined') {\n        if (!isDefaultFilterValue(filter.value[key], options.filter[key])) {\n          num++\n        }\n      }\n\n      //No default value specified, simply check if value is empty\n      else if (!isEmptyFilterValue(filter.value[key])) {\n        num++\n      }\n    }\n    return num\n  })\n\n  //Manually add an item to the list (e.g. when creating a new item)\n  const addItem = (item, afterItem)  => {\n    items.value = insertAfter(items.value, afterItem, item)\n    total.value++\n  }\n\n  //Manually remove an item from the list (e.g. when deleting an item)\n  const removeItem = item => {\n    items.value = items.value.filter(i => i.id !== item.id)\n    total.value--\n  }\n\n  //Manually replace an item in the list\n  const replaceItem = newItem => {\n    const index = items.value.findIndex(i => i.id === newItem.id)\n    if (index >= 0) {\n      items.value = setValueAtIndex(items.value, index, newItem)\n    }\n  }\n\n  //Watch for default filter changes\n  if (isRef(options.filter)) {\n    watch(options.filter, () => resetFilter())\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    items,\n    total,\n    offset,\n    limit,\n    sort,\n    search,\n    filter,\n    numActiveFilters,\n    itemsPerPage,\n    currentPage,\n    hasItems,\n    isLoadingItems,\n    isLoadingMoreItems,\n    hasLoadedItems,\n    hasLoadedAllItems,\n\n    //Methods\n    queryItems,\n    loadItems,\n    loadItemsBatched,\n    loadItemsForPage,\n    loadMoreItems,\n    loadMoreItemsThrottled,\n    unloadItems,\n    reloadItems,\n    changeLimit,\n    changeSort,\n    changeSearch,\n    changeFilter,\n    changeItemsPerPage,\n    clearSearch,\n    resetFilter,\n    isFilterActive,\n    getQueryParams,\n    getExportQueryParams,\n    addItem,\n    removeItem,\n    replaceItem,\n  }\n}\n","import {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Search composable\n */\nexport function useSearch(fullSearchHandler, partialSearchHandler) {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const searchTerm = ref('')\n  const partialSearchResults = ref([])\n  const isDoingFullSearch = ref(false)\n\n  //Perform a partial search\n  const partialSearch = async search => {\n\n    //Not when still doing a full search\n    if (isDoingFullSearch.value) {\n      return\n    }\n\n    //Perform partial search\n    try {\n      const results = await partialSearchHandler(search)\n\n      //Only update the search results if we not doing a full search\n      if (!isDoingFullSearch.value) {\n        partialSearchResults.value = results\n      }\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n  }\n\n  //Perform a full search\n  const fullSearch = async search => {\n\n    //Indicate we're doing a full search and update search term\n    isDoingFullSearch.value = true\n    partialSearchResults.value = []\n    searchTerm.value = search\n\n    //Call handler\n    try {\n      await fullSearchHandler(search)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n\n      //Clear the flag after a short delay to ensure partial search results that\n      //return later don't interfere with the full search\n      setTimeout(() => {\n        isDoingFullSearch.value = false\n      }, 500)\n    }\n  }\n\n  //Clear the search\n  const clearSearch = () => fullSearch('')\n\n  //Expose interface\n  return {\n    searchTerm,\n    partialSearchResults,\n    isDoingFullSearch,\n    partialSearch,\n    fullSearch,\n    clearSearch,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport AutomationStatus from '@/components/automations/AutomationStatus.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport AutomationActionsMenu from '@/components/automations/AutomationActionsMenu.vue'\nimport {automationsApi} from '@/api/automations.api.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport {useSearch} from '@/composables/use-search.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Automations')\n\n//Navigation\nconst {\n  goToCreateAutomation,\n  goToEditAutomation,\n} = useNavigation()\n\n//Refs\nconst automationBeingEdited = ref(null)\nconst isUpdatingAutomation = ref(false)\n\n//Flash messages\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\n\n//Warning modal\nconst {\n  isValue: isShowingWarningModal,\n  setTrue: showWarningModal,\n  setFalse: hideWarningModal,\n} = useValueToggle()\n\n//Querying\nconst {\n  items: automations,\n  total: totalAutomations,\n  queryItems: queryAutomations,\n  loadItems: loadAutomations,\n  reloadItems: reloadAutomations,\n  loadItemsForPage: loadAutomationsForPage,\n  isLoadingItems: isLoadingAutomations,\n  sort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n} = useQuerying({\n  handler: (...args) => automationsApi.query(...args),\n  sort: `-createdAt`,\n  key: 'automationsOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryAutomations({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Update automation isEnabled\nconst confirmToggleAutomation = async () => {\n  isUpdatingAutomation.value = true\n  const isEnabled = !automationBeingEdited.value.isEnabled\n  try {\n    await automationsApi.updateById(automationBeingEdited.value.id, {isEnabled})\n    reloadAutomations()\n    hideWarningModal()\n    setFlashSuccess(`Automation ${isEnabled ? 'enabled' : 'disabled'}`)\n  }\n  catch {\n    setFlashFailure(`Failed to ${isEnabled ? 'enable' : 'disable'} automation`)\n  }\n  finally {\n    isUpdatingAutomation.value = false\n  }\n}\n\n//Show/hide toggle automation modal\nconst showToggleAutomationModal = automation => {\n  automationBeingEdited.value = automation\n  showWarningModal()\n}\nconst hideToggleAutomationModal = () => {\n  automationBeingEdited.value = null\n  hideWarningModal()\n}\n\n//Load automations\nloadAutomations()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"goToEditAutomation($event.result.id)\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton\n          @click=\"goToCreateAutomation()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalAutomations\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"automation\"\n              :count=\"totalAutomations\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"automations\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalAutomations\"\n        :is-loading=\"isLoadingAutomations\"\n        @load-page=\"loadAutomationsForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.status\"\n            is-sortable\n            sort-prop=\"isEnabled\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Status\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.name\"\n            is-sortable\n            sort-prop=\"name\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.enabled\"\n          />\n        </template>\n\n        <template #row=\"{item: automation, index}\">\n          <TableCell :class=\"$style.status\">\n            <AutomationStatus\n              :automation=\"automation\"\n            />\n          </TableCell>\n          <TableCell\n            :class=\"$style.name\"\n            :is-clickable=\"automation.isDisabled\"\n            @click=\"goToEditAutomation(automation.id)\"\n          >\n            <FlexColumn :with-gap=\"false\">\n              <FlexRow\n                :gap=\"0\"\n                :class=\"$style.help\"\n              >\n                <strong>{{ automation.name }}</strong> <Help\n                  v-if=\"automation.isEnabled\"\n                  position=\"top\"\n                  text=\"Please disable this automation to make edits\"\n                />\n              </FlexRow>\n              <small text-muted>{{ automation.description }}</small>\n            </FlexColumn>\n          </TableCell>\n          <TableCell :class=\"$style.enabled\">\n            <Toggle\n              :test-id=\"`automationStatusToggle-${index}`\"\n              :label=\"automation.isActive ? 'Active' : 'Disabled'\"\n              :is-checked=\"automation.isActive\"\n              :is-disabled=\"isUpdatingAutomation\"\n              @click=\"showToggleAutomationModal(automation)\"\n            />\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: automation, index}\">\n          <AutomationActionsMenu\n            :test-id=\"`automationActionsMenu${index + 1}`\"\n            :automation=\"automation\"\n          />\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <!-- Modals -->\n    <WarningModal\n      :is-open=\"isShowingWarningModal\"\n      can-confirm\n      :is-disabled-confirm=\"isUpdatingAutomation || isLoadingAutomations\"\n      @close=\"hideToggleAutomationModal()\"\n      @confirm=\"confirmToggleAutomation()\"\n    >\n      <template v-if=\"automationBeingEdited?.isDisabled\">\n        You are choosing to turn on {{ automationBeingEdited?.name }}. This will create automatic enrollments. Are you sure you want to continue?\n      </template>\n      <template v-else>\n        You are choosing to turn off {{ automationBeingEdited?.name }}. From now on, users will no longer be automatically enrolled. Are you sure you want to continue?\n      </template>\n    </WarningModal>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.status {\n  flex: 0 0 10rem;\n}\n.name {\n  flex: 3;\n}\n.enabled {\n  flex: 0 0 10rem;\n}\n.help {\n  gap: 0.25rem;\n}\n</style>\n","import {automationsApi} from '@/api/automations.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Automation creation composable\n */\nexport function useAutomationCreation() {\n\n  //Composables\n  const {setFlashFailure, setFlashSuccess} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Model\n  const model = ref(\n    {\n      name: '',\n      description: '',\n      source: '',\n      is_enabled: false,\n      trigger: '',\n      triggerConditions: {and: [{}]},\n      action: '',\n      actionConditions: {and: [{}]},\n      useExistingDataFirstEnable: false,\n      numDaysDelayBeforeAction: 0,\n    }\n  )\n\n  //Save automation on server\n  const isSavingAutomation = ref(false)\n  const saveAutomation = async () => {\n\n    //Toggle flag and commence update\n    isSavingAutomation.value = true\n\n    //Extract data for update\n    const data = model.value\n\n    //Update\n    try {\n      const automation = await automationsApi.create(data)\n      setFlashSuccess('Automation created')\n      return automation\n    }\n    catch (error) {\n      setFlashFailure('Failed to create automation')\n      processError(error)\n      throw error\n    }\n    finally {\n      isSavingAutomation.value = false\n    }\n  }\n\n  //Update model\n  const updateModel = data => {\n    Object.assign(model.value, data)\n  }\n\n  //Expose interface\n  return {\n    model,\n    updateModel,\n    saveAutomation,\n    isSavingAutomation,\n  }\n}\n","<script setup>\nimport AutomationsForm from '@/components/automations/AutomationsForm.vue'\nimport {useAutomationCreation} from '@/composables/use-automation-creation.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Create automation')\n\n//Course creation\nconst {\n  model,\n  updateModel,\n  saveAutomation,\n  isSavingAutomation,\n} = useAutomationCreation()\n\n//Navigation\nconst {goToAutomationsOverview} = useNavigation()\n\n//Save\nconst save = () => {\n  try {\n    saveAutomation()\n    goToAutomationsOverview()\n  }\n  catch {\n    //Handled by the useAutomationCreation composable\n  }\n}\n</script>\n\n<template>\n  <AutomationsForm\n    :model=\"model\"\n    :is-saving=\"isSavingAutomation\"\n    @update=\"updateModel($event.data)\"\n    @back=\"goToAutomationsOverview()\"\n    @save=\"save()\"\n  />\n</template>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  cohorts: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {cohorts} = toRefs(props)\nconst isSingle = computed(() => cohorts.value.length === 1)\nconst single = computed(() => cohorts.value[0])\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete cohort${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm')\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        the cohort \"<strong>{{ single.name }}</strong>\"?\n      </span>\n      <span v-else>\n        the {{ cohorts.length }} selected cohorts?\n      </span>\n      This action will remove the grouping, but all users will remain as individual learners in the system.\n    </p>\n  </ConfirmationModal>\n</template>\n","<script setup>\nimport CloseButton from '@/components/shared/buttons/CloseButton.vue'\nimport WidthLimiter from '@/components/shared/page/WidthLimiter.vue'\nimport {useEventListener} from '@vueuse/core'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n])\ndefineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  isCentered: {\n    type: Boolean,\n    default: false,\n  },\n  limitedWidth: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Listen for clicks on the overlay to close\nuseEventListener(document, 'click', (event) => {\n  if (event.target.classList.contains('sidepanel-overlay')) {\n    emit('close')\n  }\n})\n</script>\n\n<template>\n  <div :class=\"$style.panel\">\n    <header\n      v-if=\"$slots.header\"\n      :class=\"$style.header\"\n    >\n      <slot name=\"header\">\n        {{ header }}\n      </slot>\n    </header>\n\n    <CloseButton\n      :class=\"$style.close\"\n      @click=\"$emit('close')\"\n    />\n    <div\n      :class=\"{\n        [$style.content]: true,\n        [$style.centered]: isCentered,\n      }\"\n      :test-id=\"testId\"\n    >\n      <WidthLimiter :is-limited=\"limitedWidth\">\n        <slot />\n      </WidthLimiter>\n    </div>\n    <footer\n      v-if=\"$slots.footer\"\n      :class=\"$style.footer\"\n    >\n      <slot name=\"footer\" />\n    </footer>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.panel {\n  position: fixed;\n  display: flex;\n  flex-direction: column;\n  background: var(--bg-panels);\n  width: 70vw;\n  height: 100vh;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  box-shadow: var(--box-shadow-strong);\n  z-index: 2;\n  overflow: hidden;\n}\n.header {\n  margin-bottom: 1rem;\n  padding: 1rem;\n}\n.footer {\n  border-top: 1px solid var(--color-borders);\n  padding: 1rem;\n}\n.content {\n  flex: 1;\n  padding: 5rem 2rem;\n  overflow-x: hidden;\n  overflow-y: auto;\n  overscroll-behavior: contain;\n  &.centered {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n  }\n}\n.close {\n  position: fixed;\n  right: 2rem;\n  top: 2rem;\n}\n\n/* Transition */\n.from {\n  transition: all var(--transition-cubic);\n}\n.to {\n  transform: translateX(100%);\n}\n</style>\n","<script setup>\nimport FlowSteps from '@/components/shared/flow/FlowSteps.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport StepDivider from '@/components/shared/flow/StepDivider.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {toRefs, watch} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'prev-step',\n  'next-step',\n  'go-to-step',\n])\nconst props = defineProps({\n  steps: {\n    type: Array,\n    required: true,\n  },\n  activeStep: {\n    type: Object,\n    required: true,\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n  isGoingBack: {\n    type: Boolean,\n    default: false,\n  },\n  scrollPage: {\n    type: Boolean,\n    default: true,\n  },\n  centeredStepIndicator: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs and scroll helper\nconst {activeStep, scrollPage} = toRefs(props)\nconst {scrollToTop} = usePage()\n\n//Scroll page back to top on step changes\nwatch(activeStep, () => {\n  if (scrollPage.value) {\n    setTimeout(() => scrollToTop('auto'), 235)\n  }\n})\n</script>\n\n<template>\n  <div :class=\"$style.flow\">\n    <StepIndicators :is-centered=\"centeredStepIndicator || steps.length < 3\">\n      <template\n        v-for=\"(step, i) in steps\"\n        :key=\"step.key\"\n      >\n        <StepDivider\n          v-if=\"i !== 0\"\n          :key=\"`divider_${i}`\"\n          :is-small=\"steps.length > 3\"\n        />\n        <StepIndicator\n          :label=\"step.label\"\n          :icon=\"step.icon\"\n          :is-active=\"step === activeStep\"\n          :is-clickable=\"step.isClickable\"\n          :test-id=\"`stepIndicator_${step.key}`\"\n          @click=\"$emit('go-to-step', {step})\"\n        />\n      </template>\n    </StepIndicators>\n\n    <Spinner\n      v-if=\"isLoading\"\n      is-block\n    />\n\n    <FlowSteps\n      v-else\n      :is-going-back=\"isGoingBack\"\n    >\n      <slot />\n    </FlowSteps>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.flow {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Timezones API service\n */\nexport class TimezonesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/timezones'\n  itemsKey = 'timezones'\n}\n\n//Export singleton instance\nexport const timezonesApi = new TimezonesApi()\n","import {timezonesApi} from '@/api/timezones.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed} from 'vue'\n\n//Track timezones and loading flag\nconst timezones = ref([])\nconst isLoadingTimezones = ref(false)\nconst hasLoadedTimezones = computed(() => timezones.value.length > 0)\nconst loadingPromise = ref(null)\n\n/**\n * Timezones composable\n*/\nexport function useTimezones() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Load timezones\n  const loadTimezones = async () => {\n\n    //Already loaded\n    if (timezones.value.length > 0) {\n      return\n    }\n\n    //Already loading\n    if (loadingPromise.value) {\n      return loadingPromise.value\n    }\n\n    //Create promise\n    isLoadingTimezones.value = true\n    loadingPromise.value = timezonesApi.query()\n\n    //Load country codes\n    try {\n      const data = await loadingPromise.value\n      timezones.value = data.timezones\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingTimezones.value = false\n      loadingPromise.value = null\n    }\n  }\n\n  //Expose interface\n  return {\n    timezones,\n    isLoadingTimezones,\n    hasLoadedTimezones,\n    loadTimezones,\n  }\n}\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {useTimezones} from '@/composables/use-timezones.js'\nimport {onMounted} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n  'dirty',\n])\ndefineProps({\n  asIana: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get timezones\nconst {\n  timezones,\n  isLoadingTimezones,\n  loadTimezones,\n} = useTimezones()\n\n//Load timezones\nonMounted(loadTimezones)\n</script>\n\n<template>\n  <SelectInput\n    v-bind=\"$attrs\"\n    :has-spinner=\"isLoadingTimezones\"\n    :placeholder=\"isLoadingTimezones ? 'Loading timezones...' : 'Select or type timezone name'\"\n    :options=\"timezones\"\n    :label-prop=\"asIana ? 'ianaZone' : 'label'\"\n    @input=\"$emit('input', $event)\"\n    @dirty=\"$emit('dirty', $event)\"\n  />\n</template>\n","<script setup>\nimport InputList from './InputList.vue'\nimport RadioButton from './RadioButton.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  value: {\n    type: [String, Number, Boolean],\n    default: '',\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n})\n\n//Get refs\nconst {value, isDisabled} = toRefs(props)\n\n//Toggle value\nconst toggleValue = value => {\n  if (!isDisabled.value) {\n    emit('input', {value})\n  }\n}\n\n//Check if checked\nconst isChecked = optionValue => optionValue === value.value\n</script>\n\n<template>\n  <InputList v-bind=\"$attrs\">\n    <RadioButton\n      v-for=\"option in options\"\n      :key=\"option.value\"\n      :label=\"option.label\"\n      :is-disabled=\"isDisabled\"\n      :is-checked=\"isChecked(option.value)\"\n      :test-id=\"testId ? `radioButton_${testId}_${option.value}` : undefined\"\n      @click=\"toggleValue(option.value)\"\n    />\n  </InputList>\n</template>\n","\n//Cohort creation flow steps\nexport const cohortCreateFlowSteps = {\n  DETAILS: 'details',\n  LEARNERS: 'learners',\n}\n\n//Cohort add learners flow steps\nexport const cohortAddLearnersFlowSteps = {\n  INITIAL: 'initial',\n  PREVIEW: 'preview',\n  MAP_COLUMNS: 'mapColumns',\n  IMPORT: 'import',\n}\n\n//Cohort learner selection methods\nexport const cohortLearnerSelectionMethods = {\n  CSV: 'csv',\n  DYNAMIC: 'dynamic',\n  EXISTING: 'existing',\n}\n\n//Cohort log events\nexport const cohortLogEvents = {\n  CREATE: 'create',\n  UPDATE: 'update',\n  ADD_LEARNERS: 'add_learners',\n  REMOVE_LEARNERS: 'remove_learners',\n  UPDATE_LEARNERS: 'update_learners',\n  UPLOAD_LEARNERS: 'upload_learners',\n  ENROLL_IN_SCHEDULE: 'enroll_in_schedule',\n}\n\n//Cohort log event options\nexport const cohortLogEventOptions = [\n  {\n    value: cohortLogEvents.CREATE,\n    label: 'Created',\n    icon:  'add_circle',\n  },\n  {\n    value: cohortLogEvents.UPDATE,\n    label: 'Edited',\n    icon: 'edit',\n  },\n  {\n    value: cohortLogEvents.ADD_LEARNERS,\n    label: 'Learners added',\n    icon: 'group_add',\n  },\n  {\n    value: cohortLogEvents.REMOVE_LEARNERS,\n    label: 'Learners removed',\n    icon: 'group_remove',\n  },\n  {\n    value: cohortLogEvents.UPDATE_LEARNERS,\n    label: 'Learners updated',\n    icon: 'group',\n  },\n  {\n    value: cohortLogEvents.UPLOAD_LEARNERS,\n    label: 'Learners uploaded',\n    icon: 'file_upload',\n  },\n  {\n    value: cohortLogEvents.ENROLL_IN_SCHEDULE,\n    label: 'Enrolled in schedule',\n    icon: 'bookmark',\n  },\n]\n","import {BaseModel} from '@/models/base.model.js'\nimport {statuses} from '@/constants/statuses.js'\n\n/**\n * Cohort model\n */\nexport class Cohort extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'group'\n  }\n\n  /**\n   * Number of rules\n   */\n  get numRules() {\n    if (!Array.isArray(this.rulesets)) {\n      return 0\n    }\n    return this.rulesets.reduce((num, ruleset) => num + ruleset.rules.length, 0)\n  }\n\n  /**\n   * A cohort is active when it has at leat one active schedule assigned to it\n   */\n  get isActive() {\n    return this.numSchedules > 0\n  }\n\n  /**\n   * Status representation of active state\n   */\n  get status() {\n    return this.isActive ? statuses.SUCCESS : statuses.DANGER\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Cohort} from '@/models/cohort.model.js'\n\n/**\n * Cohorts API service\n */\nexport class CohortsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/cohorts'\n  itemKey = 'cohort'\n  itemsKey = 'cohorts'\n  ModelClass = Cohort\n\n  /**\n   * Process CSV chunk\n   */\n  processCsvChunk(cohortId, data) {\n    return this\n      .post(`/${cohortId}/process_csv_chunk`, data)\n  }\n\n  /**\n   * Get CSV processing status\n   */\n  getCsvProcessingStatus(cohortId, identifier) {\n    return this\n      .get(`/${cohortId}/csv_processing_status`, {identifier})\n  }\n}\n\n//Export singleton instance\nexport const cohortsApi = new CohortsApi()\n","import {cohortsApi} from '@/api/cohorts.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Cohort validation composable\n */\nexport function useCohortValidation(existingCohort) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingCohortExists = ref(false)\n\n  //Check if cohort exists by given properties\n  const checkCohortExists = async data => {\n    try {\n      isCheckingCohortExists.value = true\n      return await cohortsApi.checkExists({\n        ...data,\n        excludeId: existingCohort?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingCohortExists.value = false\n    }\n  }\n\n  //Debounced check for cohort existence\n  const checkCohortExistsDebounced = useDebounceFn(checkCohortExists, 500)\n\n  //Unique cohort name validator\n  const uniqueName = asyncValidator(\n    'A cohort with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      const exists = await checkCohortExistsDebounced({name})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkCohortExists,\n    checkCohortExistsDebounced,\n    isCheckingCohortExists,\n    uniqueName,\n  }\n}\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport TimezoneSelectInput from '@/components/shared/form/TimezoneSelectInput.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport {cohortLearnerSelectionMethods} from '@/constants/cohorts.js'\nimport {useCohortValidation} from '@/composables/use-cohort-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {ref, toRefs, nextTick} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'cancel',\n  'continue',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Selection method options\nconst methodOptions = [\n  {\n    label: 'Upload a CSV or Excel file with learners',\n    value: cohortLearnerSelectionMethods.CSV,\n  },\n  {\n    label: 'Select from existing learners',\n    value: cohortLearnerSelectionMethods.EXISTING,\n  },\n  {\n    label: 'Create dynamic rule-based group',\n    value: cohortLearnerSelectionMethods.DYNAMIC,\n  },\n]\n\n//Get refs\nconst {model} = toRefs(props)\nconst nameInput = ref(null)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Validation\nconst {uniqueName, isCheckingCohortExists} = useCohortValidation()\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Name'),\n    uniqueName,\n  },\n}, model, {$autoDirty: true})\n\n//Continue to next step\nconst continueToNextStep = () => {\n\n  //Ignore if invalid or pending validation\n  if ($v.value.$invalid || $v.value.$pending) {\n    return\n  }\n\n  //Check if name invalid and focus on it\n  if ($v.value.name.$invalid) {\n    nextTick(() => nameInput.value.focus())\n    return\n  }\n\n  //All good\n  emit('continue')\n}\n\n//Continue without adding learners\nconst continueWithoutLearners = () => {\n  updateModel({skipLearners: true})\n  continueToNextStep()\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock header=\"Create a new cohort\">\n      <FormField\n        label=\"Name\"\n        :errors=\"$v.name.$errors\"\n      >\n        <TextInput\n          ref=\"nameInput\"\n          name=\"name\"\n          test-id=\"name\"\n          required\n          focus-on-mount\n          :value=\"model.name\"\n          :maxlength=\"50\"\n          :minlength=\"2\"\n          :has-error=\"$v.name.$error && !$v.name.$pending\"\n          :has-spinner=\"isCheckingCohortExists\"\n          @input=\"updateModel({name: $event.value})\"\n        />\n      </FormField>\n      <FormField\n        label=\"Preferred timezone\"\n        sub-label=\"When you set a preferred timezone for this cohort, it will be used as the primary timezone for all learners within the cohort.\"\n        is-optional\n      >\n        <TimezoneSelectInput\n          :value=\"model.preferredTimezone\"\n          @input=\"updateModel({preferredTimezone: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"How would you like to add learners to the cohort?\">\n        <RadioButtonList\n          name=\"method\"\n          test-id=\"method\"\n          :value=\"model.method\"\n          :options=\"methodOptions\"\n          @input=\"updateModel({method: $event.value})\"\n        />\n      </FormField>\n\n      <ActionButton\n        type=\"text\"\n        label=\"Or continue without adding learners for now\"\n        @click=\"continueWithoutLearners()\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        label-confirm=\"Continue\"\n        :is-disabled-confirm=\"$v.$invalid || $v.$pending\"\n        @confirm=\"continueToNextStep()\"\n        @cancel=\"$emit('cancel')\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","const types = { \"application/prs.cww\": [\"cww\"], \"application/prs.xsf+xml\": [\"xsf\"], \"application/vnd.1000minds.decision-model+xml\": [\"1km\"], \"application/vnd.3gpp.pic-bw-large\": [\"plb\"], \"application/vnd.3gpp.pic-bw-small\": [\"psb\"], \"application/vnd.3gpp.pic-bw-var\": [\"pvb\"], \"application/vnd.3gpp2.tcap\": [\"tcap\"], \"application/vnd.3m.post-it-notes\": [\"pwn\"], \"application/vnd.accpac.simply.aso\": [\"aso\"], \"application/vnd.accpac.simply.imp\": [\"imp\"], \"application/vnd.acucobol\": [\"acu\"], \"application/vnd.acucorp\": [\"atc\", \"acutc\"], \"application/vnd.adobe.air-application-installer-package+zip\": [\"air\"], \"application/vnd.adobe.formscentral.fcdt\": [\"fcdt\"], \"application/vnd.adobe.fxp\": [\"fxp\", \"fxpl\"], \"application/vnd.adobe.xdp+xml\": [\"xdp\"], \"application/vnd.adobe.xfdf\": [\"*xfdf\"], \"application/vnd.age\": [\"age\"], \"application/vnd.ahead.space\": [\"ahead\"], \"application/vnd.airzip.filesecure.azf\": [\"azf\"], \"application/vnd.airzip.filesecure.azs\": [\"azs\"], \"application/vnd.amazon.ebook\": [\"azw\"], \"application/vnd.americandynamics.acc\": [\"acc\"], \"application/vnd.amiga.ami\": [\"ami\"], \"application/vnd.android.package-archive\": [\"apk\"], \"application/vnd.anser-web-certificate-issue-initiation\": [\"cii\"], \"application/vnd.anser-web-funds-transfer-initiation\": [\"fti\"], \"application/vnd.antix.game-component\": [\"atx\"], \"application/vnd.apple.installer+xml\": [\"mpkg\"], \"application/vnd.apple.keynote\": [\"key\"], \"application/vnd.apple.mpegurl\": [\"m3u8\"], \"application/vnd.apple.numbers\": [\"numbers\"], \"application/vnd.apple.pages\": [\"pages\"], \"application/vnd.apple.pkpass\": [\"pkpass\"], \"application/vnd.aristanetworks.swi\": [\"swi\"], \"application/vnd.astraea-software.iota\": [\"iota\"], \"application/vnd.audiograph\": [\"aep\"], \"application/vnd.balsamiq.bmml+xml\": [\"bmml\"], \"application/vnd.blueice.multipass\": [\"mpm\"], \"application/vnd.bmi\": [\"bmi\"], \"application/vnd.businessobjects\": [\"rep\"], \"application/vnd.chemdraw+xml\": [\"cdxml\"], \"application/vnd.chipnuts.karaoke-mmd\": [\"mmd\"], \"application/vnd.cinderella\": [\"cdy\"], \"application/vnd.citationstyles.style+xml\": [\"csl\"], \"application/vnd.claymore\": [\"cla\"], \"application/vnd.cloanto.rp9\": [\"rp9\"], \"application/vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"], \"application/vnd.cluetrust.cartomobile-config\": [\"c11amc\"], \"application/vnd.cluetrust.cartomobile-config-pkg\": [\"c11amz\"], \"application/vnd.commonspace\": [\"csp\"], \"application/vnd.contact.cmsg\": [\"cdbcmsg\"], \"application/vnd.cosmocaller\": [\"cmc\"], \"application/vnd.crick.clicker\": [\"clkx\"], \"application/vnd.crick.clicker.keyboard\": [\"clkk\"], \"application/vnd.crick.clicker.palette\": [\"clkp\"], \"application/vnd.crick.clicker.template\": [\"clkt\"], \"application/vnd.crick.clicker.wordbank\": [\"clkw\"], \"application/vnd.criticaltools.wbs+xml\": [\"wbs\"], \"application/vnd.ctc-posml\": [\"pml\"], \"application/vnd.cups-ppd\": [\"ppd\"], \"application/vnd.curl.car\": [\"car\"], \"application/vnd.curl.pcurl\": [\"pcurl\"], \"application/vnd.dart\": [\"dart\"], \"application/vnd.data-vision.rdz\": [\"rdz\"], \"application/vnd.dbf\": [\"dbf\"], \"application/vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"], \"application/vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"], \"application/vnd.dece.unspecified\": [\"uvx\", \"uvvx\"], \"application/vnd.dece.zip\": [\"uvz\", \"uvvz\"], \"application/vnd.denovo.fcselayout-link\": [\"fe_launch\"], \"application/vnd.dna\": [\"dna\"], \"application/vnd.dolby.mlp\": [\"mlp\"], \"application/vnd.dpgraph\": [\"dpg\"], \"application/vnd.dreamfactory\": [\"dfac\"], \"application/vnd.ds-keypoint\": [\"kpxx\"], \"application/vnd.dvb.ait\": [\"ait\"], \"application/vnd.dvb.service\": [\"svc\"], \"application/vnd.dynageo\": [\"geo\"], \"application/vnd.ecowin.chart\": [\"mag\"], \"application/vnd.enliven\": [\"nml\"], \"application/vnd.epson.esf\": [\"esf\"], \"application/vnd.epson.msf\": [\"msf\"], \"application/vnd.epson.quickanime\": [\"qam\"], \"application/vnd.epson.salt\": [\"slt\"], \"application/vnd.epson.ssf\": [\"ssf\"], \"application/vnd.eszigno3+xml\": [\"es3\", \"et3\"], \"application/vnd.ezpix-album\": [\"ez2\"], \"application/vnd.ezpix-package\": [\"ez3\"], \"application/vnd.fdf\": [\"*fdf\"], \"application/vnd.fdsn.mseed\": [\"mseed\"], \"application/vnd.fdsn.seed\": [\"seed\", \"dataless\"], \"application/vnd.flographit\": [\"gph\"], \"application/vnd.fluxtime.clip\": [\"ftc\"], \"application/vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"], \"application/vnd.frogans.fnc\": [\"fnc\"], \"application/vnd.frogans.ltf\": [\"ltf\"], \"application/vnd.fsc.weblaunch\": [\"fsc\"], \"application/vnd.fujitsu.oasys\": [\"oas\"], \"application/vnd.fujitsu.oasys2\": [\"oa2\"], \"application/vnd.fujitsu.oasys3\": [\"oa3\"], \"application/vnd.fujitsu.oasysgp\": [\"fg5\"], \"application/vnd.fujitsu.oasysprs\": [\"bh2\"], \"application/vnd.fujixerox.ddd\": [\"ddd\"], \"application/vnd.fujixerox.docuworks\": [\"xdw\"], \"application/vnd.fujixerox.docuworks.binder\": [\"xbd\"], \"application/vnd.fuzzysheet\": [\"fzs\"], \"application/vnd.genomatix.tuxedo\": [\"txd\"], \"application/vnd.geogebra.file\": [\"ggb\"], \"application/vnd.geogebra.tool\": [\"ggt\"], \"application/vnd.geometry-explorer\": [\"gex\", \"gre\"], \"application/vnd.geonext\": [\"gxt\"], \"application/vnd.geoplan\": [\"g2w\"], \"application/vnd.geospace\": [\"g3w\"], \"application/vnd.gmx\": [\"gmx\"], \"application/vnd.google-apps.document\": [\"gdoc\"], \"application/vnd.google-apps.presentation\": [\"gslides\"], \"application/vnd.google-apps.spreadsheet\": [\"gsheet\"], \"application/vnd.google-earth.kml+xml\": [\"kml\"], \"application/vnd.google-earth.kmz\": [\"kmz\"], \"application/vnd.grafeq\": [\"gqf\", \"gqs\"], \"application/vnd.groove-account\": [\"gac\"], \"application/vnd.groove-help\": [\"ghf\"], \"application/vnd.groove-identity-message\": [\"gim\"], \"application/vnd.groove-injector\": [\"grv\"], \"application/vnd.groove-tool-message\": [\"gtm\"], \"application/vnd.groove-tool-template\": [\"tpl\"], \"application/vnd.groove-vcard\": [\"vcg\"], \"application/vnd.hal+xml\": [\"hal\"], \"application/vnd.handheld-entertainment+xml\": [\"zmm\"], \"application/vnd.hbci\": [\"hbci\"], \"application/vnd.hhe.lesson-player\": [\"les\"], \"application/vnd.hp-hpgl\": [\"hpgl\"], \"application/vnd.hp-hpid\": [\"hpid\"], \"application/vnd.hp-hps\": [\"hps\"], \"application/vnd.hp-jlyt\": [\"jlt\"], \"application/vnd.hp-pcl\": [\"pcl\"], \"application/vnd.hp-pclxl\": [\"pclxl\"], \"application/vnd.hydrostatix.sof-data\": [\"sfd-hdstx\"], \"application/vnd.ibm.minipay\": [\"mpy\"], \"application/vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"], \"application/vnd.ibm.rights-management\": [\"irm\"], \"application/vnd.ibm.secure-container\": [\"sc\"], \"application/vnd.iccprofile\": [\"icc\", \"icm\"], \"application/vnd.igloader\": [\"igl\"], \"application/vnd.immervision-ivp\": [\"ivp\"], \"application/vnd.immervision-ivu\": [\"ivu\"], \"application/vnd.insors.igm\": [\"igm\"], \"application/vnd.intercon.formnet\": [\"xpw\", \"xpx\"], \"application/vnd.intergeo\": [\"i2g\"], \"application/vnd.intu.qbo\": [\"qbo\"], \"application/vnd.intu.qfx\": [\"qfx\"], \"application/vnd.ipunplugged.rcprofile\": [\"rcprofile\"], \"application/vnd.irepository.package+xml\": [\"irp\"], \"application/vnd.is-xpr\": [\"xpr\"], \"application/vnd.isac.fcs\": [\"fcs\"], \"application/vnd.jam\": [\"jam\"], \"application/vnd.jcp.javame.midlet-rms\": [\"rms\"], \"application/vnd.jisp\": [\"jisp\"], \"application/vnd.joost.joda-archive\": [\"joda\"], \"application/vnd.kahootz\": [\"ktz\", \"ktr\"], \"application/vnd.kde.karbon\": [\"karbon\"], \"application/vnd.kde.kchart\": [\"chrt\"], \"application/vnd.kde.kformula\": [\"kfo\"], \"application/vnd.kde.kivio\": [\"flw\"], \"application/vnd.kde.kontour\": [\"kon\"], \"application/vnd.kde.kpresenter\": [\"kpr\", \"kpt\"], \"application/vnd.kde.kspread\": [\"ksp\"], \"application/vnd.kde.kword\": [\"kwd\", \"kwt\"], \"application/vnd.kenameaapp\": [\"htke\"], \"application/vnd.kidspiration\": [\"kia\"], \"application/vnd.kinar\": [\"kne\", \"knp\"], \"application/vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"], \"application/vnd.kodak-descriptor\": [\"sse\"], \"application/vnd.las.las+xml\": [\"lasxml\"], \"application/vnd.llamagraphics.life-balance.desktop\": [\"lbd\"], \"application/vnd.llamagraphics.life-balance.exchange+xml\": [\"lbe\"], \"application/vnd.lotus-1-2-3\": [\"123\"], \"application/vnd.lotus-approach\": [\"apr\"], \"application/vnd.lotus-freelance\": [\"pre\"], \"application/vnd.lotus-notes\": [\"nsf\"], \"application/vnd.lotus-organizer\": [\"org\"], \"application/vnd.lotus-screencam\": [\"scm\"], \"application/vnd.lotus-wordpro\": [\"lwp\"], \"application/vnd.macports.portpkg\": [\"portpkg\"], \"application/vnd.mapbox-vector-tile\": [\"mvt\"], \"application/vnd.mcd\": [\"mcd\"], \"application/vnd.medcalcdata\": [\"mc1\"], \"application/vnd.mediastation.cdkey\": [\"cdkey\"], \"application/vnd.mfer\": [\"mwf\"], \"application/vnd.mfmp\": [\"mfm\"], \"application/vnd.micrografx.flo\": [\"flo\"], \"application/vnd.micrografx.igx\": [\"igx\"], \"application/vnd.mif\": [\"mif\"], \"application/vnd.mobius.daf\": [\"daf\"], \"application/vnd.mobius.dis\": [\"dis\"], \"application/vnd.mobius.mbk\": [\"mbk\"], \"application/vnd.mobius.mqy\": [\"mqy\"], \"application/vnd.mobius.msl\": [\"msl\"], \"application/vnd.mobius.plc\": [\"plc\"], \"application/vnd.mobius.txf\": [\"txf\"], \"application/vnd.mophun.application\": [\"mpn\"], \"application/vnd.mophun.certificate\": [\"mpc\"], \"application/vnd.mozilla.xul+xml\": [\"xul\"], \"application/vnd.ms-artgalry\": [\"cil\"], \"application/vnd.ms-cab-compressed\": [\"cab\"], \"application/vnd.ms-excel\": [\"xls\", \"xlm\", \"xla\", \"xlc\", \"xlt\", \"xlw\"], \"application/vnd.ms-excel.addin.macroenabled.12\": [\"xlam\"], \"application/vnd.ms-excel.sheet.binary.macroenabled.12\": [\"xlsb\"], \"application/vnd.ms-excel.sheet.macroenabled.12\": [\"xlsm\"], \"application/vnd.ms-excel.template.macroenabled.12\": [\"xltm\"], \"application/vnd.ms-fontobject\": [\"eot\"], \"application/vnd.ms-htmlhelp\": [\"chm\"], \"application/vnd.ms-ims\": [\"ims\"], \"application/vnd.ms-lrm\": [\"lrm\"], \"application/vnd.ms-officetheme\": [\"thmx\"], \"application/vnd.ms-outlook\": [\"msg\"], \"application/vnd.ms-pki.seccat\": [\"cat\"], \"application/vnd.ms-pki.stl\": [\"*stl\"], \"application/vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"], \"application/vnd.ms-powerpoint.addin.macroenabled.12\": [\"ppam\"], \"application/vnd.ms-powerpoint.presentation.macroenabled.12\": [\"pptm\"], \"application/vnd.ms-powerpoint.slide.macroenabled.12\": [\"sldm\"], \"application/vnd.ms-powerpoint.slideshow.macroenabled.12\": [\"ppsm\"], \"application/vnd.ms-powerpoint.template.macroenabled.12\": [\"potm\"], \"application/vnd.ms-project\": [\"*mpp\", \"mpt\"], \"application/vnd.ms-word.document.macroenabled.12\": [\"docm\"], \"application/vnd.ms-word.template.macroenabled.12\": [\"dotm\"], \"application/vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"], \"application/vnd.ms-wpl\": [\"wpl\"], \"application/vnd.ms-xpsdocument\": [\"xps\"], \"application/vnd.mseq\": [\"mseq\"], \"application/vnd.musician\": [\"mus\"], \"application/vnd.muvee.style\": [\"msty\"], \"application/vnd.mynfc\": [\"taglet\"], \"application/vnd.neurolanguage.nlu\": [\"nlu\"], \"application/vnd.nitf\": [\"ntf\", \"nitf\"], \"application/vnd.noblenet-directory\": [\"nnd\"], \"application/vnd.noblenet-sealer\": [\"nns\"], \"application/vnd.noblenet-web\": [\"nnw\"], \"application/vnd.nokia.n-gage.ac+xml\": [\"*ac\"], \"application/vnd.nokia.n-gage.data\": [\"ngdat\"], \"application/vnd.nokia.n-gage.symbian.install\": [\"n-gage\"], \"application/vnd.nokia.radio-preset\": [\"rpst\"], \"application/vnd.nokia.radio-presets\": [\"rpss\"], \"application/vnd.novadigm.edm\": [\"edm\"], \"application/vnd.novadigm.edx\": [\"edx\"], \"application/vnd.novadigm.ext\": [\"ext\"], \"application/vnd.oasis.opendocument.chart\": [\"odc\"], \"application/vnd.oasis.opendocument.chart-template\": [\"otc\"], \"application/vnd.oasis.opendocument.database\": [\"odb\"], \"application/vnd.oasis.opendocument.formula\": [\"odf\"], \"application/vnd.oasis.opendocument.formula-template\": [\"odft\"], \"application/vnd.oasis.opendocument.graphics\": [\"odg\"], \"application/vnd.oasis.opendocument.graphics-template\": [\"otg\"], \"application/vnd.oasis.opendocument.image\": [\"odi\"], \"application/vnd.oasis.opendocument.image-template\": [\"oti\"], \"application/vnd.oasis.opendocument.presentation\": [\"odp\"], \"application/vnd.oasis.opendocument.presentation-template\": [\"otp\"], \"application/vnd.oasis.opendocument.spreadsheet\": [\"ods\"], \"application/vnd.oasis.opendocument.spreadsheet-template\": [\"ots\"], \"application/vnd.oasis.opendocument.text\": [\"odt\"], \"application/vnd.oasis.opendocument.text-master\": [\"odm\"], \"application/vnd.oasis.opendocument.text-template\": [\"ott\"], \"application/vnd.oasis.opendocument.text-web\": [\"oth\"], \"application/vnd.olpc-sugar\": [\"xo\"], \"application/vnd.oma.dd2+xml\": [\"dd2\"], \"application/vnd.openblox.game+xml\": [\"obgx\"], \"application/vnd.openofficeorg.extension\": [\"oxt\"], \"application/vnd.openstreetmap.data+xml\": [\"osm\"], \"application/vnd.openxmlformats-officedocument.presentationml.presentation\": [\"pptx\"], \"application/vnd.openxmlformats-officedocument.presentationml.slide\": [\"sldx\"], \"application/vnd.openxmlformats-officedocument.presentationml.slideshow\": [\"ppsx\"], \"application/vnd.openxmlformats-officedocument.presentationml.template\": [\"potx\"], \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": [\"xlsx\"], \"application/vnd.openxmlformats-officedocument.spreadsheetml.template\": [\"xltx\"], \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": [\"docx\"], \"application/vnd.openxmlformats-officedocument.wordprocessingml.template\": [\"dotx\"], \"application/vnd.osgeo.mapguide.package\": [\"mgp\"], \"application/vnd.osgi.dp\": [\"dp\"], \"application/vnd.osgi.subsystem\": [\"esa\"], \"application/vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"], \"application/vnd.pawaafile\": [\"paw\"], \"application/vnd.pg.format\": [\"str\"], \"application/vnd.pg.osasli\": [\"ei6\"], \"application/vnd.picsel\": [\"efif\"], \"application/vnd.pmi.widget\": [\"wg\"], \"application/vnd.pocketlearn\": [\"plf\"], \"application/vnd.powerbuilder6\": [\"pbd\"], \"application/vnd.previewsystems.box\": [\"box\"], \"application/vnd.proteus.magazine\": [\"mgz\"], \"application/vnd.publishare-delta-tree\": [\"qps\"], \"application/vnd.pvi.ptid1\": [\"ptid\"], \"application/vnd.pwg-xhtml-print+xml\": [\"xhtm\"], \"application/vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"], \"application/vnd.rar\": [\"rar\"], \"application/vnd.realvnc.bed\": [\"bed\"], \"application/vnd.recordare.musicxml\": [\"mxl\"], \"application/vnd.recordare.musicxml+xml\": [\"musicxml\"], \"application/vnd.rig.cryptonote\": [\"cryptonote\"], \"application/vnd.rim.cod\": [\"cod\"], \"application/vnd.rn-realmedia\": [\"rm\"], \"application/vnd.rn-realmedia-vbr\": [\"rmvb\"], \"application/vnd.route66.link66+xml\": [\"link66\"], \"application/vnd.sailingtracker.track\": [\"st\"], \"application/vnd.seemail\": [\"see\"], \"application/vnd.sema\": [\"sema\"], \"application/vnd.semd\": [\"semd\"], \"application/vnd.semf\": [\"semf\"], \"application/vnd.shana.informed.formdata\": [\"ifm\"], \"application/vnd.shana.informed.formtemplate\": [\"itp\"], \"application/vnd.shana.informed.interchange\": [\"iif\"], \"application/vnd.shana.informed.package\": [\"ipk\"], \"application/vnd.simtech-mindmapper\": [\"twd\", \"twds\"], \"application/vnd.smaf\": [\"mmf\"], \"application/vnd.smart.teacher\": [\"teacher\"], \"application/vnd.software602.filler.form+xml\": [\"fo\"], \"application/vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"], \"application/vnd.spotfire.dxp\": [\"dxp\"], \"application/vnd.spotfire.sfs\": [\"sfs\"], \"application/vnd.stardivision.calc\": [\"sdc\"], \"application/vnd.stardivision.draw\": [\"sda\"], \"application/vnd.stardivision.impress\": [\"sdd\"], \"application/vnd.stardivision.math\": [\"smf\"], \"application/vnd.stardivision.writer\": [\"sdw\", \"vor\"], \"application/vnd.stardivision.writer-global\": [\"sgl\"], \"application/vnd.stepmania.package\": [\"smzip\"], \"application/vnd.stepmania.stepchart\": [\"sm\"], \"application/vnd.sun.wadl+xml\": [\"wadl\"], \"application/vnd.sun.xml.calc\": [\"sxc\"], \"application/vnd.sun.xml.calc.template\": [\"stc\"], \"application/vnd.sun.xml.draw\": [\"sxd\"], \"application/vnd.sun.xml.draw.template\": [\"std\"], \"application/vnd.sun.xml.impress\": [\"sxi\"], \"application/vnd.sun.xml.impress.template\": [\"sti\"], \"application/vnd.sun.xml.math\": [\"sxm\"], \"application/vnd.sun.xml.writer\": [\"sxw\"], \"application/vnd.sun.xml.writer.global\": [\"sxg\"], \"application/vnd.sun.xml.writer.template\": [\"stw\"], \"application/vnd.sus-calendar\": [\"sus\", \"susp\"], \"application/vnd.svd\": [\"svd\"], \"application/vnd.symbian.install\": [\"sis\", \"sisx\"], \"application/vnd.syncml+xml\": [\"xsm\"], \"application/vnd.syncml.dm+wbxml\": [\"bdm\"], \"application/vnd.syncml.dm+xml\": [\"xdm\"], \"application/vnd.syncml.dmddf+xml\": [\"ddf\"], \"application/vnd.tao.intent-module-archive\": [\"tao\"], \"application/vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"], \"application/vnd.tmobile-livetv\": [\"tmo\"], \"application/vnd.trid.tpt\": [\"tpt\"], \"application/vnd.triscape.mxs\": [\"mxs\"], \"application/vnd.trueapp\": [\"tra\"], \"application/vnd.ufdl\": [\"ufd\", \"ufdl\"], \"application/vnd.uiq.theme\": [\"utz\"], \"application/vnd.umajin\": [\"umj\"], \"application/vnd.unity\": [\"unityweb\"], \"application/vnd.uoml+xml\": [\"uoml\", \"uo\"], \"application/vnd.vcx\": [\"vcx\"], \"application/vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"], \"application/vnd.visionary\": [\"vis\"], \"application/vnd.vsf\": [\"vsf\"], \"application/vnd.wap.wbxml\": [\"wbxml\"], \"application/vnd.wap.wmlc\": [\"wmlc\"], \"application/vnd.wap.wmlscriptc\": [\"wmlsc\"], \"application/vnd.webturbo\": [\"wtb\"], \"application/vnd.wolfram.player\": [\"nbp\"], \"application/vnd.wordperfect\": [\"wpd\"], \"application/vnd.wqd\": [\"wqd\"], \"application/vnd.wt.stf\": [\"stf\"], \"application/vnd.xara\": [\"xar\"], \"application/vnd.xfdl\": [\"xfdl\"], \"application/vnd.yamaha.hv-dic\": [\"hvd\"], \"application/vnd.yamaha.hv-script\": [\"hvs\"], \"application/vnd.yamaha.hv-voice\": [\"hvp\"], \"application/vnd.yamaha.openscoreformat\": [\"osf\"], \"application/vnd.yamaha.openscoreformat.osfpvg+xml\": [\"osfpvg\"], \"application/vnd.yamaha.smaf-audio\": [\"saf\"], \"application/vnd.yamaha.smaf-phrase\": [\"spf\"], \"application/vnd.yellowriver-custom-menu\": [\"cmp\"], \"application/vnd.zul\": [\"zir\", \"zirz\"], \"application/vnd.zzazz.deck+xml\": [\"zaz\"], \"application/x-7z-compressed\": [\"7z\"], \"application/x-abiword\": [\"abw\"], \"application/x-ace-compressed\": [\"ace\"], \"application/x-apple-diskimage\": [\"*dmg\"], \"application/x-arj\": [\"arj\"], \"application/x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"], \"application/x-authorware-map\": [\"aam\"], \"application/x-authorware-seg\": [\"aas\"], \"application/x-bcpio\": [\"bcpio\"], \"application/x-bdoc\": [\"*bdoc\"], \"application/x-bittorrent\": [\"torrent\"], \"application/x-blorb\": [\"blb\", \"blorb\"], \"application/x-bzip\": [\"bz\"], \"application/x-bzip2\": [\"bz2\", \"boz\"], \"application/x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cbz\", \"cb7\"], \"application/x-cdlink\": [\"vcd\"], \"application/x-cfs-compressed\": [\"cfs\"], \"application/x-chat\": [\"chat\"], \"application/x-chess-pgn\": [\"pgn\"], \"application/x-chrome-extension\": [\"crx\"], \"application/x-cocoa\": [\"cco\"], \"application/x-conference\": [\"nsc\"], \"application/x-cpio\": [\"cpio\"], \"application/x-csh\": [\"csh\"], \"application/x-debian-package\": [\"*deb\", \"udeb\"], \"application/x-dgc-compressed\": [\"dgc\"], \"application/x-director\": [\"dir\", \"dcr\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"], \"application/x-doom\": [\"wad\"], \"application/x-dtbncx+xml\": [\"ncx\"], \"application/x-dtbook+xml\": [\"dtb\"], \"application/x-dtbresource+xml\": [\"res\"], \"application/x-dvi\": [\"dvi\"], \"application/x-envoy\": [\"evy\"], \"application/x-eva\": [\"eva\"], \"application/x-font-bdf\": [\"bdf\"], \"application/x-font-ghostscript\": [\"gsf\"], \"application/x-font-linux-psf\": [\"psf\"], \"application/x-font-pcf\": [\"pcf\"], \"application/x-font-snf\": [\"snf\"], \"application/x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"], \"application/x-freearc\": [\"arc\"], \"application/x-futuresplash\": [\"spl\"], \"application/x-gca-compressed\": [\"gca\"], \"application/x-glulx\": [\"ulx\"], \"application/x-gnumeric\": [\"gnumeric\"], \"application/x-gramps-xml\": [\"gramps\"], \"application/x-gtar\": [\"gtar\"], \"application/x-hdf\": [\"hdf\"], \"application/x-httpd-php\": [\"php\"], \"application/x-install-instructions\": [\"install\"], \"application/x-iso9660-image\": [\"*iso\"], \"application/x-iwork-keynote-sffkey\": [\"*key\"], \"application/x-iwork-numbers-sffnumbers\": [\"*numbers\"], \"application/x-iwork-pages-sffpages\": [\"*pages\"], \"application/x-java-archive-diff\": [\"jardiff\"], \"application/x-java-jnlp-file\": [\"jnlp\"], \"application/x-keepass2\": [\"kdbx\"], \"application/x-latex\": [\"latex\"], \"application/x-lua-bytecode\": [\"luac\"], \"application/x-lzh-compressed\": [\"lzh\", \"lha\"], \"application/x-makeself\": [\"run\"], \"application/x-mie\": [\"mie\"], \"application/x-mobipocket-ebook\": [\"*prc\", \"mobi\"], \"application/x-ms-application\": [\"application\"], \"application/x-ms-shortcut\": [\"lnk\"], \"application/x-ms-wmd\": [\"wmd\"], \"application/x-ms-wmz\": [\"wmz\"], \"application/x-ms-xbap\": [\"xbap\"], \"application/x-msaccess\": [\"mdb\"], \"application/x-msbinder\": [\"obd\"], \"application/x-mscardfile\": [\"crd\"], \"application/x-msclip\": [\"clp\"], \"application/x-msdos-program\": [\"*exe\"], \"application/x-msdownload\": [\"*exe\", \"*dll\", \"com\", \"bat\", \"*msi\"], \"application/x-msmediaview\": [\"mvb\", \"m13\", \"m14\"], \"application/x-msmetafile\": [\"*wmf\", \"*wmz\", \"*emf\", \"emz\"], \"application/x-msmoney\": [\"mny\"], \"application/x-mspublisher\": [\"pub\"], \"application/x-msschedule\": [\"scd\"], \"application/x-msterminal\": [\"trm\"], \"application/x-mswrite\": [\"wri\"], \"application/x-netcdf\": [\"nc\", \"cdf\"], \"application/x-ns-proxy-autoconfig\": [\"pac\"], \"application/x-nzb\": [\"nzb\"], \"application/x-perl\": [\"pl\", \"pm\"], \"application/x-pilot\": [\"*prc\", \"*pdb\"], \"application/x-pkcs12\": [\"p12\", \"pfx\"], \"application/x-pkcs7-certificates\": [\"p7b\", \"spc\"], \"application/x-pkcs7-certreqresp\": [\"p7r\"], \"application/x-rar-compressed\": [\"*rar\"], \"application/x-redhat-package-manager\": [\"rpm\"], \"application/x-research-info-systems\": [\"ris\"], \"application/x-sea\": [\"sea\"], \"application/x-sh\": [\"sh\"], \"application/x-shar\": [\"shar\"], \"application/x-shockwave-flash\": [\"swf\"], \"application/x-silverlight-app\": [\"xap\"], \"application/x-sql\": [\"*sql\"], \"application/x-stuffit\": [\"sit\"], \"application/x-stuffitx\": [\"sitx\"], \"application/x-subrip\": [\"srt\"], \"application/x-sv4cpio\": [\"sv4cpio\"], \"application/x-sv4crc\": [\"sv4crc\"], \"application/x-t3vm-image\": [\"t3\"], \"application/x-tads\": [\"gam\"], \"application/x-tar\": [\"tar\"], \"application/x-tcl\": [\"tcl\", \"tk\"], \"application/x-tex\": [\"tex\"], \"application/x-tex-tfm\": [\"tfm\"], \"application/x-texinfo\": [\"texinfo\", \"texi\"], \"application/x-tgif\": [\"*obj\"], \"application/x-ustar\": [\"ustar\"], \"application/x-virtualbox-hdd\": [\"hdd\"], \"application/x-virtualbox-ova\": [\"ova\"], \"application/x-virtualbox-ovf\": [\"ovf\"], \"application/x-virtualbox-vbox\": [\"vbox\"], \"application/x-virtualbox-vbox-extpack\": [\"vbox-extpack\"], \"application/x-virtualbox-vdi\": [\"vdi\"], \"application/x-virtualbox-vhd\": [\"vhd\"], \"application/x-virtualbox-vmdk\": [\"vmdk\"], \"application/x-wais-source\": [\"src\"], \"application/x-web-app-manifest+json\": [\"webapp\"], \"application/x-x509-ca-cert\": [\"der\", \"crt\", \"pem\"], \"application/x-xfig\": [\"fig\"], \"application/x-xliff+xml\": [\"*xlf\"], \"application/x-xpinstall\": [\"xpi\"], \"application/x-xz\": [\"xz\"], \"application/x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"], \"audio/vnd.dece.audio\": [\"uva\", \"uvva\"], \"audio/vnd.digital-winds\": [\"eol\"], \"audio/vnd.dra\": [\"dra\"], \"audio/vnd.dts\": [\"dts\"], \"audio/vnd.dts.hd\": [\"dtshd\"], \"audio/vnd.lucent.voice\": [\"lvp\"], \"audio/vnd.ms-playready.media.pya\": [\"pya\"], \"audio/vnd.nuera.ecelp4800\": [\"ecelp4800\"], \"audio/vnd.nuera.ecelp7470\": [\"ecelp7470\"], \"audio/vnd.nuera.ecelp9600\": [\"ecelp9600\"], \"audio/vnd.rip\": [\"rip\"], \"audio/x-aac\": [\"*aac\"], \"audio/x-aiff\": [\"aif\", \"aiff\", \"aifc\"], \"audio/x-caf\": [\"caf\"], \"audio/x-flac\": [\"flac\"], \"audio/x-m4a\": [\"*m4a\"], \"audio/x-matroska\": [\"mka\"], \"audio/x-mpegurl\": [\"m3u\"], \"audio/x-ms-wax\": [\"wax\"], \"audio/x-ms-wma\": [\"wma\"], \"audio/x-pn-realaudio\": [\"ram\", \"ra\"], \"audio/x-pn-realaudio-plugin\": [\"rmp\"], \"audio/x-realaudio\": [\"*ra\"], \"audio/x-wav\": [\"*wav\"], \"chemical/x-cdx\": [\"cdx\"], \"chemical/x-cif\": [\"cif\"], \"chemical/x-cmdf\": [\"cmdf\"], \"chemical/x-cml\": [\"cml\"], \"chemical/x-csml\": [\"csml\"], \"chemical/x-xyz\": [\"xyz\"], \"image/prs.btif\": [\"btif\", \"btf\"], \"image/prs.pti\": [\"pti\"], \"image/vnd.adobe.photoshop\": [\"psd\"], \"image/vnd.airzip.accelerator.azv\": [\"azv\"], \"image/vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"], \"image/vnd.djvu\": [\"djvu\", \"djv\"], \"image/vnd.dvb.subtitle\": [\"*sub\"], \"image/vnd.dwg\": [\"dwg\"], \"image/vnd.dxf\": [\"dxf\"], \"image/vnd.fastbidsheet\": [\"fbs\"], \"image/vnd.fpx\": [\"fpx\"], \"image/vnd.fst\": [\"fst\"], \"image/vnd.fujixerox.edmics-mmr\": [\"mmr\"], \"image/vnd.fujixerox.edmics-rlc\": [\"rlc\"], \"image/vnd.microsoft.icon\": [\"ico\"], \"image/vnd.ms-dds\": [\"dds\"], \"image/vnd.ms-modi\": [\"mdi\"], \"image/vnd.ms-photo\": [\"wdp\"], \"image/vnd.net-fpx\": [\"npx\"], \"image/vnd.pco.b16\": [\"b16\"], \"image/vnd.tencent.tap\": [\"tap\"], \"image/vnd.valve.source.texture\": [\"vtf\"], \"image/vnd.wap.wbmp\": [\"wbmp\"], \"image/vnd.xiff\": [\"xif\"], \"image/vnd.zbrush.pcx\": [\"pcx\"], \"image/x-3ds\": [\"3ds\"], \"image/x-cmu-raster\": [\"ras\"], \"image/x-cmx\": [\"cmx\"], \"image/x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"], \"image/x-icon\": [\"*ico\"], \"image/x-jng\": [\"jng\"], \"image/x-mrsid-image\": [\"sid\"], \"image/x-ms-bmp\": [\"*bmp\"], \"image/x-pcx\": [\"*pcx\"], \"image/x-pict\": [\"pic\", \"pct\"], \"image/x-portable-anymap\": [\"pnm\"], \"image/x-portable-bitmap\": [\"pbm\"], \"image/x-portable-graymap\": [\"pgm\"], \"image/x-portable-pixmap\": [\"ppm\"], \"image/x-rgb\": [\"rgb\"], \"image/x-tga\": [\"tga\"], \"image/x-xbitmap\": [\"xbm\"], \"image/x-xpixmap\": [\"xpm\"], \"image/x-xwindowdump\": [\"xwd\"], \"message/vnd.wfa.wsc\": [\"wsc\"], \"model/vnd.cld\": [\"cld\"], \"model/vnd.collada+xml\": [\"dae\"], \"model/vnd.dwf\": [\"dwf\"], \"model/vnd.gdl\": [\"gdl\"], \"model/vnd.gtw\": [\"gtw\"], \"model/vnd.mts\": [\"mts\"], \"model/vnd.opengex\": [\"ogex\"], \"model/vnd.parasolid.transmit.binary\": [\"x_b\"], \"model/vnd.parasolid.transmit.text\": [\"x_t\"], \"model/vnd.pytha.pyox\": [\"pyo\", \"pyox\"], \"model/vnd.sap.vds\": [\"vds\"], \"model/vnd.usda\": [\"usda\"], \"model/vnd.usdz+zip\": [\"usdz\"], \"model/vnd.valve.source.compiled-map\": [\"bsp\"], \"model/vnd.vtu\": [\"vtu\"], \"text/prs.lines.tag\": [\"dsc\"], \"text/vnd.curl\": [\"curl\"], \"text/vnd.curl.dcurl\": [\"dcurl\"], \"text/vnd.curl.mcurl\": [\"mcurl\"], \"text/vnd.curl.scurl\": [\"scurl\"], \"text/vnd.dvb.subtitle\": [\"sub\"], \"text/vnd.familysearch.gedcom\": [\"ged\"], \"text/vnd.fly\": [\"fly\"], \"text/vnd.fmi.flexstor\": [\"flx\"], \"text/vnd.graphviz\": [\"gv\"], \"text/vnd.in3d.3dml\": [\"3dml\"], \"text/vnd.in3d.spot\": [\"spot\"], \"text/vnd.sun.j2me.app-descriptor\": [\"jad\"], \"text/vnd.wap.wml\": [\"wml\"], \"text/vnd.wap.wmlscript\": [\"wmls\"], \"text/x-asm\": [\"s\", \"asm\"], \"text/x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"], \"text/x-component\": [\"htc\"], \"text/x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"], \"text/x-handlebars-template\": [\"hbs\"], \"text/x-java-source\": [\"java\"], \"text/x-lua\": [\"lua\"], \"text/x-markdown\": [\"mkd\"], \"text/x-nfo\": [\"nfo\"], \"text/x-opml\": [\"opml\"], \"text/x-org\": [\"*org\"], \"text/x-pascal\": [\"p\", \"pas\"], \"text/x-processing\": [\"pde\"], \"text/x-sass\": [\"sass\"], \"text/x-scss\": [\"scss\"], \"text/x-setext\": [\"etx\"], \"text/x-sfv\": [\"sfv\"], \"text/x-suse-ymp\": [\"ymp\"], \"text/x-uuencode\": [\"uu\"], \"text/x-vcalendar\": [\"vcs\"], \"text/x-vcard\": [\"vcf\"], \"video/vnd.dece.hd\": [\"uvh\", \"uvvh\"], \"video/vnd.dece.mobile\": [\"uvm\", \"uvvm\"], \"video/vnd.dece.pd\": [\"uvp\", \"uvvp\"], \"video/vnd.dece.sd\": [\"uvs\", \"uvvs\"], \"video/vnd.dece.video\": [\"uvv\", \"uvvv\"], \"video/vnd.dvb.file\": [\"dvb\"], \"video/vnd.fvt\": [\"fvt\"], \"video/vnd.mpegurl\": [\"mxu\", \"m4u\"], \"video/vnd.ms-playready.media.pyv\": [\"pyv\"], \"video/vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"], \"video/vnd.vivo\": [\"viv\"], \"video/x-f4v\": [\"f4v\"], \"video/x-fli\": [\"fli\"], \"video/x-flv\": [\"flv\"], \"video/x-m4v\": [\"m4v\"], \"video/x-matroska\": [\"mkv\", \"mk3d\", \"mks\"], \"video/x-mng\": [\"mng\"], \"video/x-ms-asf\": [\"asf\", \"asx\"], \"video/x-ms-vob\": [\"vob\"], \"video/x-ms-wm\": [\"wm\"], \"video/x-ms-wmv\": [\"wmv\"], \"video/x-ms-wmx\": [\"wmx\"], \"video/x-ms-wvx\": [\"wvx\"], \"video/x-msvideo\": [\"avi\"], \"video/x-sgi-movie\": [\"movie\"], \"video/x-smv\": [\"smv\"], \"x-conference/x-cooltalk\": [\"ice\"] };\nObject.freeze(types);\nexport default types;\n//# sourceMappingURL=other.js.map","const types = { \"application/andrew-inset\": [\"ez\"], \"application/appinstaller\": [\"appinstaller\"], \"application/applixware\": [\"aw\"], \"application/appx\": [\"appx\"], \"application/appxbundle\": [\"appxbundle\"], \"application/atom+xml\": [\"atom\"], \"application/atomcat+xml\": [\"atomcat\"], \"application/atomdeleted+xml\": [\"atomdeleted\"], \"application/atomsvc+xml\": [\"atomsvc\"], \"application/atsc-dwd+xml\": [\"dwd\"], \"application/atsc-held+xml\": [\"held\"], \"application/atsc-rsat+xml\": [\"rsat\"], \"application/automationml-aml+xml\": [\"aml\"], \"application/automationml-amlx+zip\": [\"amlx\"], \"application/bdoc\": [\"bdoc\"], \"application/calendar+xml\": [\"xcs\"], \"application/ccxml+xml\": [\"ccxml\"], \"application/cdfx+xml\": [\"cdfx\"], \"application/cdmi-capability\": [\"cdmia\"], \"application/cdmi-container\": [\"cdmic\"], \"application/cdmi-domain\": [\"cdmid\"], \"application/cdmi-object\": [\"cdmio\"], \"application/cdmi-queue\": [\"cdmiq\"], \"application/cpl+xml\": [\"cpl\"], \"application/cu-seeme\": [\"cu\"], \"application/cwl\": [\"cwl\"], \"application/dash+xml\": [\"mpd\"], \"application/dash-patch+xml\": [\"mpp\"], \"application/davmount+xml\": [\"davmount\"], \"application/docbook+xml\": [\"dbk\"], \"application/dssc+der\": [\"dssc\"], \"application/dssc+xml\": [\"xdssc\"], \"application/ecmascript\": [\"ecma\"], \"application/emma+xml\": [\"emma\"], \"application/emotionml+xml\": [\"emotionml\"], \"application/epub+zip\": [\"epub\"], \"application/exi\": [\"exi\"], \"application/express\": [\"exp\"], \"application/fdf\": [\"fdf\"], \"application/fdt+xml\": [\"fdt\"], \"application/font-tdpfr\": [\"pfr\"], \"application/geo+json\": [\"geojson\"], \"application/gml+xml\": [\"gml\"], \"application/gpx+xml\": [\"gpx\"], \"application/gxf\": [\"gxf\"], \"application/gzip\": [\"gz\"], \"application/hjson\": [\"hjson\"], \"application/hyperstudio\": [\"stk\"], \"application/inkml+xml\": [\"ink\", \"inkml\"], \"application/ipfix\": [\"ipfix\"], \"application/its+xml\": [\"its\"], \"application/java-archive\": [\"jar\", \"war\", \"ear\"], \"application/java-serialized-object\": [\"ser\"], \"application/java-vm\": [\"class\"], \"application/javascript\": [\"*js\"], \"application/json\": [\"json\", \"map\"], \"application/json5\": [\"json5\"], \"application/jsonml+json\": [\"jsonml\"], \"application/ld+json\": [\"jsonld\"], \"application/lgr+xml\": [\"lgr\"], \"application/lost+xml\": [\"lostxml\"], \"application/mac-binhex40\": [\"hqx\"], \"application/mac-compactpro\": [\"cpt\"], \"application/mads+xml\": [\"mads\"], \"application/manifest+json\": [\"webmanifest\"], \"application/marc\": [\"mrc\"], \"application/marcxml+xml\": [\"mrcx\"], \"application/mathematica\": [\"ma\", \"nb\", \"mb\"], \"application/mathml+xml\": [\"mathml\"], \"application/mbox\": [\"mbox\"], \"application/media-policy-dataset+xml\": [\"mpf\"], \"application/mediaservercontrol+xml\": [\"mscml\"], \"application/metalink+xml\": [\"metalink\"], \"application/metalink4+xml\": [\"meta4\"], \"application/mets+xml\": [\"mets\"], \"application/mmt-aei+xml\": [\"maei\"], \"application/mmt-usd+xml\": [\"musd\"], \"application/mods+xml\": [\"mods\"], \"application/mp21\": [\"m21\", \"mp21\"], \"application/mp4\": [\"*mp4\", \"*mpg4\", \"mp4s\", \"m4p\"], \"application/msix\": [\"msix\"], \"application/msixbundle\": [\"msixbundle\"], \"application/msword\": [\"doc\", \"dot\"], \"application/mxf\": [\"mxf\"], \"application/n-quads\": [\"nq\"], \"application/n-triples\": [\"nt\"], \"application/node\": [\"cjs\"], \"application/octet-stream\": [\"bin\", \"dms\", \"lrf\", \"mar\", \"so\", \"dist\", \"distz\", \"pkg\", \"bpk\", \"dump\", \"elc\", \"deploy\", \"exe\", \"dll\", \"deb\", \"dmg\", \"iso\", \"img\", \"msi\", \"msp\", \"msm\", \"buffer\"], \"application/oda\": [\"oda\"], \"application/oebps-package+xml\": [\"opf\"], \"application/ogg\": [\"ogx\"], \"application/omdoc+xml\": [\"omdoc\"], \"application/onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"], \"application/oxps\": [\"oxps\"], \"application/p2p-overlay+xml\": [\"relo\"], \"application/patch-ops-error+xml\": [\"xer\"], \"application/pdf\": [\"pdf\"], \"application/pgp-encrypted\": [\"pgp\"], \"application/pgp-keys\": [\"asc\"], \"application/pgp-signature\": [\"sig\", \"*asc\"], \"application/pics-rules\": [\"prf\"], \"application/pkcs10\": [\"p10\"], \"application/pkcs7-mime\": [\"p7m\", \"p7c\"], \"application/pkcs7-signature\": [\"p7s\"], \"application/pkcs8\": [\"p8\"], \"application/pkix-attr-cert\": [\"ac\"], \"application/pkix-cert\": [\"cer\"], \"application/pkix-crl\": [\"crl\"], \"application/pkix-pkipath\": [\"pkipath\"], \"application/pkixcmp\": [\"pki\"], \"application/pls+xml\": [\"pls\"], \"application/postscript\": [\"ai\", \"eps\", \"ps\"], \"application/provenance+xml\": [\"provx\"], \"application/pskc+xml\": [\"pskcxml\"], \"application/raml+yaml\": [\"raml\"], \"application/rdf+xml\": [\"rdf\", \"owl\"], \"application/reginfo+xml\": [\"rif\"], \"application/relax-ng-compact-syntax\": [\"rnc\"], \"application/resource-lists+xml\": [\"rl\"], \"application/resource-lists-diff+xml\": [\"rld\"], \"application/rls-services+xml\": [\"rs\"], \"application/route-apd+xml\": [\"rapd\"], \"application/route-s-tsid+xml\": [\"sls\"], \"application/route-usd+xml\": [\"rusd\"], \"application/rpki-ghostbusters\": [\"gbr\"], \"application/rpki-manifest\": [\"mft\"], \"application/rpki-roa\": [\"roa\"], \"application/rsd+xml\": [\"rsd\"], \"application/rss+xml\": [\"rss\"], \"application/rtf\": [\"rtf\"], \"application/sbml+xml\": [\"sbml\"], \"application/scvp-cv-request\": [\"scq\"], \"application/scvp-cv-response\": [\"scs\"], \"application/scvp-vp-request\": [\"spq\"], \"application/scvp-vp-response\": [\"spp\"], \"application/sdp\": [\"sdp\"], \"application/senml+xml\": [\"senmlx\"], \"application/sensml+xml\": [\"sensmlx\"], \"application/set-payment-initiation\": [\"setpay\"], \"application/set-registration-initiation\": [\"setreg\"], \"application/shf+xml\": [\"shf\"], \"application/sieve\": [\"siv\", \"sieve\"], \"application/smil+xml\": [\"smi\", \"smil\"], \"application/sparql-query\": [\"rq\"], \"application/sparql-results+xml\": [\"srx\"], \"application/sql\": [\"sql\"], \"application/srgs\": [\"gram\"], \"application/srgs+xml\": [\"grxml\"], \"application/sru+xml\": [\"sru\"], \"application/ssdl+xml\": [\"ssdl\"], \"application/ssml+xml\": [\"ssml\"], \"application/swid+xml\": [\"swidtag\"], \"application/tei+xml\": [\"tei\", \"teicorpus\"], \"application/thraud+xml\": [\"tfi\"], \"application/timestamped-data\": [\"tsd\"], \"application/toml\": [\"toml\"], \"application/trig\": [\"trig\"], \"application/ttml+xml\": [\"ttml\"], \"application/ubjson\": [\"ubj\"], \"application/urc-ressheet+xml\": [\"rsheet\"], \"application/urc-targetdesc+xml\": [\"td\"], \"application/voicexml+xml\": [\"vxml\"], \"application/wasm\": [\"wasm\"], \"application/watcherinfo+xml\": [\"wif\"], \"application/widget\": [\"wgt\"], \"application/winhlp\": [\"hlp\"], \"application/wsdl+xml\": [\"wsdl\"], \"application/wspolicy+xml\": [\"wspolicy\"], \"application/xaml+xml\": [\"xaml\"], \"application/xcap-att+xml\": [\"xav\"], \"application/xcap-caps+xml\": [\"xca\"], \"application/xcap-diff+xml\": [\"xdf\"], \"application/xcap-el+xml\": [\"xel\"], \"application/xcap-ns+xml\": [\"xns\"], \"application/xenc+xml\": [\"xenc\"], \"application/xfdf\": [\"xfdf\"], \"application/xhtml+xml\": [\"xhtml\", \"xht\"], \"application/xliff+xml\": [\"xlf\"], \"application/xml\": [\"xml\", \"xsl\", \"xsd\", \"rng\"], \"application/xml-dtd\": [\"dtd\"], \"application/xop+xml\": [\"xop\"], \"application/xproc+xml\": [\"xpl\"], \"application/xslt+xml\": [\"*xsl\", \"xslt\"], \"application/xspf+xml\": [\"xspf\"], \"application/xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"], \"application/yang\": [\"yang\"], \"application/yin+xml\": [\"yin\"], \"application/zip\": [\"zip\"], \"audio/3gpp\": [\"*3gpp\"], \"audio/aac\": [\"adts\", \"aac\"], \"audio/adpcm\": [\"adp\"], \"audio/amr\": [\"amr\"], \"audio/basic\": [\"au\", \"snd\"], \"audio/midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"], \"audio/mobile-xmf\": [\"mxmf\"], \"audio/mp3\": [\"*mp3\"], \"audio/mp4\": [\"m4a\", \"mp4a\"], \"audio/mpeg\": [\"mpga\", \"mp2\", \"mp2a\", \"mp3\", \"m2a\", \"m3a\"], \"audio/ogg\": [\"oga\", \"ogg\", \"spx\", \"opus\"], \"audio/s3m\": [\"s3m\"], \"audio/silk\": [\"sil\"], \"audio/wav\": [\"wav\"], \"audio/wave\": [\"*wav\"], \"audio/webm\": [\"weba\"], \"audio/xm\": [\"xm\"], \"font/collection\": [\"ttc\"], \"font/otf\": [\"otf\"], \"font/ttf\": [\"ttf\"], \"font/woff\": [\"woff\"], \"font/woff2\": [\"woff2\"], \"image/aces\": [\"exr\"], \"image/apng\": [\"apng\"], \"image/avci\": [\"avci\"], \"image/avcs\": [\"avcs\"], \"image/avif\": [\"avif\"], \"image/bmp\": [\"bmp\", \"dib\"], \"image/cgm\": [\"cgm\"], \"image/dicom-rle\": [\"drle\"], \"image/dpx\": [\"dpx\"], \"image/emf\": [\"emf\"], \"image/fits\": [\"fits\"], \"image/g3fax\": [\"g3\"], \"image/gif\": [\"gif\"], \"image/heic\": [\"heic\"], \"image/heic-sequence\": [\"heics\"], \"image/heif\": [\"heif\"], \"image/heif-sequence\": [\"heifs\"], \"image/hej2k\": [\"hej2\"], \"image/hsj2\": [\"hsj2\"], \"image/ief\": [\"ief\"], \"image/jls\": [\"jls\"], \"image/jp2\": [\"jp2\", \"jpg2\"], \"image/jpeg\": [\"jpeg\", \"jpg\", \"jpe\"], \"image/jph\": [\"jph\"], \"image/jphc\": [\"jhc\"], \"image/jpm\": [\"jpm\", \"jpgm\"], \"image/jpx\": [\"jpx\", \"jpf\"], \"image/jxr\": [\"jxr\"], \"image/jxra\": [\"jxra\"], \"image/jxrs\": [\"jxrs\"], \"image/jxs\": [\"jxs\"], \"image/jxsc\": [\"jxsc\"], \"image/jxsi\": [\"jxsi\"], \"image/jxss\": [\"jxss\"], \"image/ktx\": [\"ktx\"], \"image/ktx2\": [\"ktx2\"], \"image/png\": [\"png\"], \"image/sgi\": [\"sgi\"], \"image/svg+xml\": [\"svg\", \"svgz\"], \"image/t38\": [\"t38\"], \"image/tiff\": [\"tif\", \"tiff\"], \"image/tiff-fx\": [\"tfx\"], \"image/webp\": [\"webp\"], \"image/wmf\": [\"wmf\"], \"message/disposition-notification\": [\"disposition-notification\"], \"message/global\": [\"u8msg\"], \"message/global-delivery-status\": [\"u8dsn\"], \"message/global-disposition-notification\": [\"u8mdn\"], \"message/global-headers\": [\"u8hdr\"], \"message/rfc822\": [\"eml\", \"mime\"], \"model/3mf\": [\"3mf\"], \"model/gltf+json\": [\"gltf\"], \"model/gltf-binary\": [\"glb\"], \"model/iges\": [\"igs\", \"iges\"], \"model/jt\": [\"jt\"], \"model/mesh\": [\"msh\", \"mesh\", \"silo\"], \"model/mtl\": [\"mtl\"], \"model/obj\": [\"obj\"], \"model/prc\": [\"prc\"], \"model/step+xml\": [\"stpx\"], \"model/step+zip\": [\"stpz\"], \"model/step-xml+zip\": [\"stpxz\"], \"model/stl\": [\"stl\"], \"model/u3d\": [\"u3d\"], \"model/vrml\": [\"wrl\", \"vrml\"], \"model/x3d+binary\": [\"*x3db\", \"x3dbz\"], \"model/x3d+fastinfoset\": [\"x3db\"], \"model/x3d+vrml\": [\"*x3dv\", \"x3dvz\"], \"model/x3d+xml\": [\"x3d\", \"x3dz\"], \"model/x3d-vrml\": [\"x3dv\"], \"text/cache-manifest\": [\"appcache\", \"manifest\"], \"text/calendar\": [\"ics\", \"ifb\"], \"text/coffeescript\": [\"coffee\", \"litcoffee\"], \"text/css\": [\"css\"], \"text/csv\": [\"csv\"], \"text/html\": [\"html\", \"htm\", \"shtml\"], \"text/jade\": [\"jade\"], \"text/javascript\": [\"js\", \"mjs\"], \"text/jsx\": [\"jsx\"], \"text/less\": [\"less\"], \"text/markdown\": [\"md\", \"markdown\"], \"text/mathml\": [\"mml\"], \"text/mdx\": [\"mdx\"], \"text/n3\": [\"n3\"], \"text/plain\": [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"ini\"], \"text/richtext\": [\"rtx\"], \"text/rtf\": [\"*rtf\"], \"text/sgml\": [\"sgml\", \"sgm\"], \"text/shex\": [\"shex\"], \"text/slim\": [\"slim\", \"slm\"], \"text/spdx\": [\"spdx\"], \"text/stylus\": [\"stylus\", \"styl\"], \"text/tab-separated-values\": [\"tsv\"], \"text/troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"], \"text/turtle\": [\"ttl\"], \"text/uri-list\": [\"uri\", \"uris\", \"urls\"], \"text/vcard\": [\"vcard\"], \"text/vtt\": [\"vtt\"], \"text/wgsl\": [\"wgsl\"], \"text/xml\": [\"*xml\"], \"text/yaml\": [\"yaml\", \"yml\"], \"video/3gpp\": [\"3gp\", \"3gpp\"], \"video/3gpp2\": [\"3g2\"], \"video/h261\": [\"h261\"], \"video/h263\": [\"h263\"], \"video/h264\": [\"h264\"], \"video/iso.segment\": [\"m4s\"], \"video/jpeg\": [\"jpgv\"], \"video/jpm\": [\"*jpm\", \"*jpgm\"], \"video/mj2\": [\"mj2\", \"mjp2\"], \"video/mp2t\": [\"ts\"], \"video/mp4\": [\"mp4\", \"mp4v\", \"mpg4\"], \"video/mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\"], \"video/ogg\": [\"ogv\"], \"video/quicktime\": [\"qt\", \"mov\"], \"video/webm\": [\"webm\"] };\nObject.freeze(types);\nexport default types;\n//# sourceMappingURL=standard.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _Mime_extensionToType, _Mime_typeToExtension, _Mime_typeToExtensions;\nclass Mime {\n    constructor(...args) {\n        _Mime_extensionToType.set(this, new Map());\n        _Mime_typeToExtension.set(this, new Map());\n        _Mime_typeToExtensions.set(this, new Map());\n        for (const arg of args) {\n            this.define(arg);\n        }\n    }\n    define(typeMap, force = false) {\n        for (let [type, extensions] of Object.entries(typeMap)) {\n            type = type.toLowerCase();\n            extensions = extensions.map((ext) => ext.toLowerCase());\n            if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").has(type)) {\n                __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").set(type, new Set());\n            }\n            const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").get(type);\n            let first = true;\n            for (let extension of extensions) {\n                const starred = extension.startsWith('*');\n                extension = starred ? extension.slice(1) : extension;\n                allExtensions?.add(extension);\n                if (first) {\n                    __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\").set(type, extension);\n                }\n                first = false;\n                if (starred)\n                    continue;\n                const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").get(extension);\n                if (currentType && currentType != type && !force) {\n                    throw new Error(`\"${type} -> ${extension}\" conflicts with \"${currentType} -> ${extension}\". Pass \\`force=true\\` to override this definition.`);\n                }\n                __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").set(extension, type);\n            }\n        }\n        return this;\n    }\n    getType(path) {\n        if (typeof path !== 'string')\n            return null;\n        const last = path.replace(/^.*[/\\\\]/, '').toLowerCase();\n        const ext = last.replace(/^.*\\./, '').toLowerCase();\n        const hasPath = last.length < path.length;\n        const hasDot = ext.length < last.length - 1;\n        if (!hasDot && hasPath)\n            return null;\n        return __classPrivateFieldGet(this, _Mime_extensionToType, \"f\").get(ext) ?? null;\n    }\n    getExtension(type) {\n        if (typeof type !== 'string')\n            return null;\n        type = type?.split?.(';')[0];\n        return ((type && __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\").get(type.trim().toLowerCase())) ?? null);\n    }\n    getAllExtensions(type) {\n        if (typeof type !== 'string')\n            return null;\n        return __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").get(type.toLowerCase()) ?? null;\n    }\n    _freeze() {\n        this.define = () => {\n            throw new Error('define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances');\n        };\n        Object.freeze(this);\n        for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, \"f\").values()) {\n            Object.freeze(extensions);\n        }\n        return this;\n    }\n    _getTestState() {\n        return {\n            types: __classPrivateFieldGet(this, _Mime_extensionToType, \"f\"),\n            extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, \"f\"),\n        };\n    }\n}\n_Mime_extensionToType = new WeakMap(), _Mime_typeToExtension = new WeakMap(), _Mime_typeToExtensions = new WeakMap();\nexport default Mime;\n//# sourceMappingURL=Mime.js.map","import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n//# sourceMappingURL=index.js.map","\n//Common file type definitions\nexport const fileTypes = {\n  JPG: 'image/jpeg',\n  PNG: 'image/png',\n  GIF: 'image/gif',\n  SVG: 'image/svg+xml',\n  MP4: 'video/mp4',\n  AVI: 'video/avi',\n  TXT: 'text/plain',\n  CSV: 'text/csv',\n  PDF: 'application/pdf',\n  DOC: 'application/msword',\n  DOCX: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n  XLS: 'application/vnd.ms-excel',\n  XLSX: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  PPT: 'application/vnd.ms-powerpoint',\n  PPTX: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n  ZIP: 'application/zip',\n  MOV: 'video/quicktime',\n  WMV: 'video/x-ms-wmv',\n  XMSVIDEO: 'video/x-msvideo', //Some AVI files are detected as this type\n}\n\n//Supported image file types\nexport const imageFileTypes = [\n  fileTypes.JPG,\n  fileTypes.PNG,\n  fileTypes.GIF,\n]\n\nexport const videoFileTypes = [\n  fileTypes.MP4,\n  fileTypes.MOV,\n  fileTypes.AVI,\n  fileTypes.WMV,\n  fileTypes.XMSVIDEO,\n]\n\n//Supported source material file types\nexport const sourceMaterialFileTypes = [\n  fileTypes.TXT,\n  fileTypes.PDF,\n  fileTypes.DOCX,\n  fileTypes.PPTX,\n  fileTypes.JPG,\n  fileTypes.PNG,\n  fileTypes.ZIP,\n]\n\n//Supported user data import file types\nexport const importFileTypes = [\n  fileTypes.CSV,\n  fileTypes.XLSX,\n]\n\n//File extensions conversion map\nexport const fileExtensionConversions = [\n  {\n    from: 'jpeg',\n    to: 'jpg',\n  },\n  {\n    from: 'qt',\n    to: 'mov',\n  },\n]\n","import mime from 'mime'\nimport {fileExtensionConversions} from '@/constants/file-types.js'\nimport {videoFileTypes} from '@/constants/file-types.js'\n\n//File sizing multipliers\nexport const multipliers = {\n  b: 1,\n  k: 1024,\n  m: Math.pow(1024, 2),\n  g: Math.pow(1024, 3),\n  t: Math.pow(1024, 4),\n  p: Math.pow(1024, 5),\n}\n\n//Helper to load video metadata\nexport async function loadVideoMetadata(src) {\n  return new Promise((resolve) => {\n    const video = document.createElement('video')\n    video.src = src\n    video.onloadedmetadata = () => resolve(video)\n    video.onerror = () => {\n      console.error('Unable to validate video', src, video)\n      resolve(video)\n    }\n  })\n}\n\n//Convert filetype to extension\nexport function fileTypeToExtension(fileType) {\n  const ext = mime.getExtension(fileType)\n  if (!ext) {\n    return ''\n  }\n  return fileExtensionConversions\n    .reduce((ext, convert) => ext\n      .replace(convert.from, convert.to), ext)\n}\n\n//Lookup mime type by filename or extension\nexport function lookupMimeType(filename) {\n  return mime.getType(filename) || null\n}\n\n//Format file size in bytes to human readable string\nexport function formatFileSize(bytes) {\n\n  //Parse first to ensure sane input\n  bytes = parseFileSize(bytes)\n  if (!bytes) {\n    return ''\n  }\n\n  //Convert\n  for (const u of Object.keys(multipliers)) {\n    const multiplier = multipliers[u]\n    if (bytes < multiplier * 1024) {\n      return `${(bytes / multiplier).toFixed(0)} ${u.toUpperCase()}${u === 'b' ? '' : 'B'}`\n    }\n  }\n\n  //Could not convert, return as is\n  return bytes\n}\n\n//Parse file size string into bytes\nexport function parseFileSize(text) {\n\n  //No text\n  if (!text) {\n    return 0\n  }\n\n  //Parse\n  const [, amount, unit] = text\n    .toString()\n    .match(/^([0-9.]+)(?:\\s*)?([a-z]*)$/i)\n\n  //Validate amount\n  if (isNaN(parseFloat(amount)) || !isFinite(amount)) {\n    throw new Error(`Invalid amount: ${text}`)\n  }\n\n  //No unit\n  if (unit === '') {\n    return Math.round(Number(amount))\n  }\n\n  //Find multiplier\n  const u = unit[0].toLowerCase()\n  const multiplier = multipliers[u]\n\n  //Invalid multiplier\n  if (!multiplier) {\n    throw new Error(`Invalid unit: ${unit}`)\n  }\n\n  //Found multipier\n  return Math.round(amount * multiplier)\n}\n\nexport async function validateVideoFileDurations(files, maxDuration) {\n  if (!Array.isArray(files)) {\n    files = files ? [files] : []\n  }\n\n  if (maxDuration) {\n    const videoFiles = files.filter(file =>   videoFileTypes.includes(file.type))\n\n    for (const file of videoFiles) {\n      const response = await loadVideoMetadata(URL.createObjectURL(file))\n      if (response.duration > maxDuration) {\n        throw new Error(`The video duration of ${file.name} exceeds the limit of ${maxDuration / 60} minutes. Please select a shorter video.`)\n      }\n    }\n  }\n}\n\n//Ensure an array of files is under the file size limit\nexport function validateFileSizes(files, maxFileSize, maxTotalSize = 0) {\n\n  //Ensure array\n  if (!Array.isArray(files)) {\n    files = files ? [files] : []\n  }\n\n  //Parse sizes\n  maxTotalSize = parseFileSize(maxTotalSize)\n  maxFileSize = parseFileSize(maxFileSize)\n\n  //Ensure input is sane\n  if (maxFileSize && maxTotalSize && maxFileSize > maxTotalSize) {\n    throw new Error('`maxFileSize` must be less or equal to `maxTotalSize`')\n  }\n\n  //Validate total size\n  if (maxTotalSize) {\n    const totalSize = files.reduce((sum, file) => sum + file.size, 0)\n    if (totalSize > maxTotalSize) {\n      throw new Error(`The total file size exceeds the limit of ${formatFileSize(maxTotalSize)}. Please select fewer or smaller files.`)\n    }\n  }\n\n  //Validate individual files\n  if (maxFileSize) {\n    files.forEach(file => {\n      if (file.size > maxFileSize) {\n        throw new Error(`The file size of ${file.name} exceeds the limit of ${formatFileSize(maxFileSize)}. Please select a smaller file.`)\n      }\n    })\n  }\n}\n\n//Check if two files are (likely) the same\nexport function isSameFile(a, b) {\n  return (a.name === b.name && a.size === b.size && a.type === b.type)\n}\n\n//File size validator by type\nexport function validateFileSizeByType(file, maxFileSize, types) {\n  if (types.includes(file.type)) {\n    validateFileSizes([file], maxFileSize)\n  }\n}\n\n//File duration validator\nexport async function validateVideoFileDuration(file, maxDuration) {\n  if (videoFileTypes.includes(file.type)) {\n    await validateVideoFileDurations([file], maxDuration)\n  }\n}\n","import {formatFileSize} from '@/helpers/file.js'\nimport {computed} from 'vue'\n\n/**\n * File size composable\n */\nexport function useFileSize(size) {\n\n  //Formatted file size\n  const formattedFileSize = computed(() => formatFileSize(size.value))\n\n  //Expose interface\n  return {\n    formattedFileSize,\n  }\n}\n","<script setup>\nimport {useFileSize} from '@/composables/use-file-size.js'\nimport {toRefs} from 'vue'\n\n//Props\nconst props = defineProps({\n  size: {\n    type: [String, Number],\n    default: '',\n  },\n  emptyLabel: {\n    type: String,\n    default: '',\n  },\n})\n\n//Composables\nconst {size} = toRefs(props)\nconst {formattedFileSize} = useFileSize(size)\n</script>\n\n<template>\n  <span>{{ formattedFileSize || emptyLabel }}</span>\n</template>\n","import {BaseApi} from '@/api/base.api.js'\nimport {createFormData} from '@/helpers/object.js'\nimport {replaceUnicode} from '@/helpers/string.js'\n\n/**\n * Image API service\n */\nexport class ImageApi extends BaseApi {\n\n  //Props\n  basePath = '/'\n\n  /**\n   * Prepare for image upload\n   */\n  prepareUpload(imageKey) {\n    return this.post('/vue_image_upload', {\n      destKey: imageKey,\n    })\n  }\n\n  /**\n   * Upload image\n   */\n  uploadImage(file, config, controller) {\n\n    //Extract config\n    const {filename, fields, url} = config\n\n    //Create new form data based on fields and append file with correct name\n    const formData = createFormData(fields)\n    formData.append('file', file, filename)\n\n    //Upload\n    return this.upload(url, formData, {\n      signal: controller?.signal,\n    })\n  }\n\n  /**\n   * Generate signed URL for existing image key\n   */\n  async generateSignedUrl(imageKey) {\n\n    //Get data\n    const data = await this.post('/generate_presigned_url_for_vue_image_url', {\n      image_key: imageKey,\n    })\n\n    //Return URL (the JSON parse converts unicode characters)\n    return replaceUnicode(data.presigned_url)\n  }\n\n  /**\n   * Generate signed URL for image upload\n   */\n  async generateSignedUrlForUpload(tempBucketFilename, imageKey) {\n\n    //Get data\n    const data = await this.post('/generate_presigned_url_for_image_upload', {\n      file_name: tempBucketFilename,\n      dest_key: imageKey,\n    })\n\n    //Return URL (the JSON parse converts unicode characters)\n    return replaceUnicode(data.presigned_url)\n  }\n\n  /**\n   * Process image\n   */\n  async processImage(tempBucketFilename) {\n    const data = this.post('/process_image', {key: tempBucketFilename})\n    if (data.status === 'error') {\n      throw new Error(data.message)\n    }\n    return data\n  }\n\n  /**\n   * Get image processing status\n   */\n  async getImageProcessingStatus(imageKey) {\n    const data = this.get(`/image_status/${imageKey}`)\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Image processing failed')\n    }\n    return data\n  }\n\n  /**\n   * Get image from URL\n   */\n  async getImageFromUrl(url) {\n    return this.get(url)\n  }\n\n  //Santize file name\n  sanitizeFileName(name, maxlength = 24) {\n\n    //Clean up and split into parts\n    const parts = name\n      .replace(/[^a-z0-9.]/gi, '_')\n      .toLowerCase()\n      .split('.')\n\n    //Get extension and shorten base if needed, removing any extra dots\n    const ext = parts.pop()\n    const base = parts.join('_').substring(0, maxlength - ext.length - 1)\n\n    //Combine with extension again\n    return `${base}.${ext}`\n  }\n}\n\n//Export singleton instance\nexport const imageApi = new ImageApi()\n","import {imageApi} from '@/api/image.api.js'\nimport {computed, onUnmounted, unref} from 'vue'\nimport {computedAsync} from '@vueuse/core'\n\n/**\n * Image source composable\n */\nexport function useImageSource(src, isImageKey) {\n\n  //Check what type of data we have gotten\n  isImageKey = unref(isImageKey)\n  const isFile = computed(() => src.value instanceof File)\n\n  //Image preview computed ref\n  const imageSrc = computedAsync(async () => {\n    if (!src.value) {\n      return null\n    }\n    if (isFile.value) {\n      return URL.createObjectURL(src.value)\n    }\n    if (isImageKey) {\n      return await imageApi.generateSignedUrl(src.value)\n    }\n    return src.value\n  }, null)\n\n  //Revoke object URL on unmount\n  onUnmounted(() => {\n    if (isFile.value) {\n      URL.revokeObjectURL(imageSrc.value)\n    }\n  })\n\n  //Expose interface\n  return {\n    imageSrc,\n  }\n}\n","import {useImageSource} from '@/composables/use-image-source.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed, watchEffect} from 'vue'\n\n//Helper to load image\nasync function loadImage(src) {\n  return new Promise((resolve, reject) => {\n    const img = new Image()\n    img.src = src\n    img.onload = () => resolve(img)\n    img.onerror = error => reject(new Error(`Error loading image: ${error?.message || 'Unknown error'}`))\n  })\n}\n\n/**\n * Image composable\n */\nexport function useImage(src, isImageKey) {\n\n  //Image refs\n  const image = ref(null)\n  const isLoading = ref(true)\n  const imageWidth = computed(() => image.value?.width)\n  const imageHeight = computed(() => image.value?.height)\n  const imageRatio = computed(() => {\n    if (image.value) {\n      return imageHeight.value / imageWidth.value\n    }\n    return 0\n  })\n\n  //Determine image source (input could be a File, image key, or URL)\n  const {imageSrc} = useImageSource(src, isImageKey)\n  const {processError} = useErrorHandling()\n\n  //Load image from source\n  watchEffect(async () => {\n    if (imageSrc.value) {\n      try {\n        image.value = await loadImage(imageSrc.value)\n      }\n      catch (error) {\n        processError(error)\n      }\n      finally {\n        isLoading.value = false\n      }\n    }\n  })\n\n  //Expose interface\n  return {\n    image,\n    isLoading,\n    imageWidth,\n    imageHeight,\n    imageRatio,\n  }\n}\n","<script setup>\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport {useImage} from '@/composables/use-image.js'\nimport {ref, computed, toRefs, onUpdated, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'is-loading',\n])\nconst props = defineProps({\n  src: {\n    type: [String, File],\n    required: true,\n  },\n  isAnimated: {\n    type: Boolean,\n    default: true,\n  },\n  isImageKey: {\n    type: Boolean,\n    default: false,\n  },\n  maxHeight: {\n    type: Number,\n    default: 0,\n  },\n  isRounded: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Image handling\nconst {src, isImageKey, maxHeight} = toRefs(props)\nconst {isLoading, image, imageWidth, imageRatio} = useImage(src, isImageKey)\n\n//Card ref\nconst card = ref(null)\nconst cardWidth = ref(0)\nconst cardHeight = computed(() => Math.min(\n  cardWidth.value * imageRatio.value,\n  maxHeight.value ? maxHeight.value : Infinity\n))\n\n//Monitor card width\nonUpdated(() => cardWidth.value = card.value?.clientWidth || 0)\n\n//Emit loading state\nwatchEffect(() => emit('is-loading', {isLoading: isLoading.value}))\n</script>\n\n<template>\n  <div\n    v-if=\"src\"\n    ref=\"card\"\n    :class=\"{\n      [$style.card]: true,\n      [$style.animated]: isAnimated,\n    }\"\n    :style=\"{\n      height: `${cardHeight}px`,\n      maxWidth: `${imageWidth}px`,\n    }\"\n  >\n    <Spinner v-if=\"!image || isLoading\" />\n    <TransitionFadeIn>\n      <img\n        v-if=\"image\"\n        :src=\"image.src\"\n        :class=\"{\n          [$style.image]: true,\n          [$style.rounded]: isRounded,\n          [$style.restricted]: maxHeight > 0,\n        }\"\n        :style=\"{\n          maxWidth: `${imageWidth}px`,\n          maxHeight: maxHeight ? `${maxHeight}px` : 'none',\n        }\"\n      >\n    </TransitionFadeIn>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.card {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  width: 100%;\n  margin: 0 auto;\n  min-height: 24px;\n  overflow: hidden;\n  &.animated {\n    transition: height var(--transition-cubic-slow);\n  }\n}\n.image {\n  display: block;\n  width: 100%;\n  &.restricted {\n    width: auto;\n  }\n  &.rounded {\n    border-radius: var(--border-radius-m);\n  }\n}\n</style>\n","import {DateTime} from 'luxon'\nimport {reactive} from 'vue'\n\n//Global map of file upload states\nconst uploadStates = new Map()\n\n//State getter, creates reactive state or use existing state if present\nconst getState = file => uploadStates.get(file) || reactive({\n  file,\n  isUploading: false,\n  isUploadFinished: false,\n  uploadStartTime: DateTime.now(),\n  uploadProgress: 0,\n  uploadMessage: '',\n  uploadStatus: '',\n  uploadSuccess: false,\n  uploadError: null,\n})\n\n//State manipulation\nconst setState = (file, state) => uploadStates.set(file, state)\nconst deleteState = file => uploadStates.delete(file)\nconst hasState = file => uploadStates.has(file)\n\n/**\n * File upload state management composable\n * Globally manages file upload state for any files being uploaded\n */\nexport function useFileUploadState(file) {\n\n  //Must initialize with file\n  if (!(file instanceof File)) {\n    throw new Error(`Please provide a File object`)\n  }\n\n  //Get state\n  const fileUploadState = getState(file)\n\n  //Store initial state if not set yet\n  if (!hasState(file)) {\n    setState(file, fileUploadState)\n  }\n\n  //Public interface\n  const updateFileUploadState = data => Object.assign(fileUploadState, data)\n  const clearFileUploadState = () => deleteState(file)\n\n  //Expose interface\n  return {\n    fileUploadState,\n    updateFileUploadState,\n    clearFileUploadState,\n  }\n}\n","<script setup>\nimport FileSize from '@/components/shared/transform/FileSize.vue'\nimport SuccessIcon from '@/components/shared/icons/SuccessIcon.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport ErrorMessage from '@/components/shared/transform/ErrorMessage.vue'\nimport ImageCard from '@/components/shared/image/ImageCard.vue'\nimport {DateTime} from 'luxon'\nimport {fileTypes, imageFileTypes, videoFileTypes} from '@/constants/file-types.js'\nimport {useFileUploadState} from '@/composables/use-file-upload-state.js'\nimport {toRefs, ref, computed, watchEffect} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'remove',\n])\nconst props = defineProps({\n  file: {\n    type: File,\n    required: true,\n  },\n  showIcon: {\n    type: Boolean,\n    default: true,\n  },\n  staticIcon: {\n    type: String,\n    default: '',\n  },\n  showImageCard: {\n    type: Boolean,\n    required: false,\n  },\n  showUploadStatus: {\n    type: Boolean,\n    default: true,\n  },\n  canRemove: {\n    type: Boolean,\n    default: true,\n  },\n  withBorder: {\n    type: Boolean,\n    default: false,\n  },\n  removeTooltip: {\n    type: String,\n    default: 'Remove',\n  },\n})\n\n//Get refs\nconst {file, showIcon, staticIcon} = toRefs(props)\nconst isImage = computed(() => imageFileTypes.includes(file.value.type))\nconst isVideo = computed(() => videoFileTypes.includes(file.value.type))\nconst state = ref({})\nconst shouldShowProcessingAlert = computed(() => {\n\n  //Don't show for non-video or non-image files, or if upload is complete\n  if (!isVideo.value && !isImage.value) {\n    return false\n  }\n  if (state.value.uploadProgress === 1) {\n    return false\n  }\n\n  //No upload start time, or request failed/succeeded\n  if (!state.value.uploadStartTime || state.value.uploadError || state.value.uploadSuccess) {\n    return false\n  }\n\n  //Show alert if upload started more than 2 minutes ago\n  return (DateTime.now() - state.value.uploadStartTime > 120 * 1000)\n})\n\n//Icon\nconst icon = computed(() => {\n\n  //No icon\n  if (!showIcon.value) {\n    return null\n  }\n\n  //Static icon\n  if (staticIcon.value) {\n    return staticIcon.value\n  }\n\n  //Dynamic icon\n  switch (file.value.type) {\n    case fileTypes.JPG:\n    case fileTypes.PNG:\n    case fileTypes.GIF:\n    case fileTypes.SVG:\n      return 'image'\n    case fileTypes.CSV:\n    case fileTypes.XLS:\n    case fileTypes.XLSX:\n      return 'table'\n    case fileTypes.PPT:\n    case fileTypes.PPTX:\n      return 'file_present'\n    case fileTypes.AVI:\n    case fileTypes.MP4:\n      return 'slideshow'\n    case fileTypes.ZIP:\n      return 'archive'\n    case fileTypes.DOC:\n    case fileTypes.DOCX:\n    case fileTypes.PDF:\n      return 'description'\n    default:\n      return 'draft'\n  }\n})\n\n//Watch file for changes and get fresh state\nwatchEffect(() => {\n  const {fileUploadState} = useFileUploadState(file.value)\n  state.value = fileUploadState\n})\n</script>\n\n<template>\n  <div :class=\"$style.wrapper\">\n    <ImageCard\n      v-if=\"isImage && showImageCard\"\n      :src=\"file\"\n      :class=\"$style.image\"\n      :is-animated=\"false\"\n    />\n    <div\n      :class=\"{\n        [$style.file]: true,\n        [$style.border]: withBorder,\n      }\"\n    >\n      <div :class=\"$style.fileData\">\n        <Icon\n          v-if=\"icon\"\n          :icon=\"icon\"\n          is-outlined\n          color=\"primaryMuted\"\n          size=\"xs\"\n        />\n        <span :class=\"$style.fileName\">{{ file.name }}</span>\n        <span :class=\"$style.fileSize\">\n          <FileSize :size=\"file.size\" />\n        </span>\n        <div\n          :class=\"$style.action\"\n          hide-empty\n        >\n          <Tooltip\n            v-if=\"canRemove && !state.uploadSuccess\"\n            :text=\"removeTooltip\"\n            :is-disabled=\"!removeTooltip\"\n            :show-delay=\"500\"\n          >\n            <RemoveButton\n              icon=\"close\"\n              is-compact\n              @click=\"$emit('remove')\"\n            />\n          </Tooltip>\n          <Tooltip\n            v-else-if=\"state.uploadSuccess\"\n            text=\"File uploaded successfully\"\n            :show-delay=\"500\"\n          >\n            <SuccessIcon />\n          </Tooltip>\n        </div>\n      </div>\n      <div :class=\"$style.state\">\n        <ProgressBar\n          v-if=\"state.isUploading\"\n          :class=\"$style.progressBar\"\n          :progress=\"state.uploadProgress\"\n          show-label\n          is-compact\n        />\n        <Alert\n          v-else-if=\"state.uploadError\"\n          :class=\"$style.alert\"\n          type=\"danger\"\n        >\n          <ErrorMessage :error=\"state.uploadError\" />\n        </Alert>\n        <small\n          v-if=\"showUploadStatus && state.isUploading && state.uploadMessage\"\n          :class=\"$style.status\"\n          text-muted\n        >{{ state.uploadMessage }}</small>\n        <Alert\n          v-if=\"shouldShowProcessingAlert\"\n          type=\"info\"\n        >\n          Your {{ isVideo ? 'video' : 'image' }} is still processing, please stay on this page until it's finished.\n        </Alert>\n      </div>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  width: 100%;\n  &:not(:last-child) {\n    border-bottom: 1px solid var(--color-borders);\n  }\n}\n.file {\n  display: flex;\n  flex-direction: column;\n  padding: 0.5rem;\n  width: 100%;\n  font-size: 14px;\n  border-radius: var(--border-radius-m);\n  &.border {\n    border: 1px solid var(--color-borders-light);\n  }\n  &:hover {\n    cursor: default;\n  }\n}\n.fileData {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  padding: 0 0.5rem;\n}\n.fileName {\n  flex: 1;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.fileSize {\n  flex: 0 0 3.5rem;\n  text-align: right;\n}\n.action {\n  flex: 0 0 2rem;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  margin-right: -5px;\n}\n.state {\n  max-height: 200px; /* To enable transition for height, just needs a large value */\n  transition: all var(--transition-cubic-fast);\n  &:empty {\n    max-height: 0;\n    padding: 0;\n  }\n}\n.progressBar {\n  margin-top: 0.25rem;\n}\n.alert {\n  margin: 0.5rem 0;\n}\n.image {\n  margin-top: 0.5rem;\n}\n.status {\n  display: block;\n  margin-top: 0.25rem;\n}\n</style>\n","import {useDropZone, useFileDialog} from '@vueuse/core'\nimport {fileTypeToExtension, validateFileSizes, validateVideoFileDurations} from '@/helpers/file.js'\nimport {ref, unref, computed} from 'vue'\n\n/**\n * File selection composable\n */\nexport function useFileSelection(options) {\n\n  //Exception ref\n  const exception = ref('')\n\n  //Extract options\n  const {\n    dropzone = ref(null),\n    allowMultiple = ref(false),\n    allowedFileTypes = ref(null),\n    maxFileSize = ref(0),\n    maxDuration = ref(0),\n    maxTotalSize = ref(0),\n    customFileValidator = ref(null),\n    onFiles = () => {},\n  } = options\n\n  //Data types computed ref\n  const dataTypes = computed(() => {\n    if (allowedFileTypes.value) {\n      if (!Array.isArray(allowedFileTypes.value)) {\n        return [allowedFileTypes.value]\n      }\n      return allowedFileTypes.value\n    }\n    return null\n  })\n\n  //Accept string computed ref\n  const accept = computed(() => {\n    if (Array.isArray(dataTypes.value)) {\n      return dataTypes.value.join(',')\n    }\n    return '*'\n  })\n\n  //Extensions string\n  const extensions = computed(() => {\n    if (Array.isArray(dataTypes.value)) {\n      return dataTypes.value\n        .map(type => fileTypeToExtension(type))\n        .filter(Boolean)\n        .join(', ')\n    }\n    return ''\n  })\n\n  //Handling of files drop\n  const onDrop = async files => {\n\n    //If no files were selected, ignore, and don't clear the exception, as this\n    //handler is also called when we call reset() on the file dialog. So it would\n    //immediately clear the exception, which we don't want to happen until a user\n    //actually selects other files.\n    if (!files || files.length === 0) {\n      return\n    }\n\n    //Reset the exception now\n    exception.value = null\n\n    //Convert to array if needed\n    if (files instanceof FileList) {\n      files = Array.from(files)\n    }\n\n    //Grab the filrst file if we don't allow multiple files\n    if (files.length > 1 && !allowMultiple.value) {\n      files = [files[0]]\n    }\n\n    //Validate\n    try {\n      validateFileSizes(files, unref(maxFileSize), unref(maxTotalSize))\n      if (typeof customFileValidator.value === 'function') {\n        for (const file of files) {\n          await customFileValidator.value(file)\n        }\n      }\n      await validateVideoFileDurations(files, unref(maxDuration))\n      onFiles(files)\n    }\n    catch (error) {\n      exception.value = error.message\n    }\n    finally {\n\n      //We need to reset the file dialog, or it won't allow us to select the\n      //same file again. We already guard against this elsewhere, and when a\n      //file upload fails and is removed, we need to be able to re-upload it.\n      reset()\n    }\n  }\n\n  //Setup dropzone and file dialog composables\n  const {isOverDropZone} = useDropZone(dropzone, {dataTypes, onDrop})\n  const {onChange, open, reset} = useFileDialog({\n    accept: accept.value,\n    multiple: allowMultiple.value,\n  })\n\n  //Use onChange handler\n  onChange(fileList => onDrop(fileList))\n\n  //Expose interface\n  return {\n    extensions,\n    exception,\n    isOverDropZone,\n    chooseFiles: open,\n  }\n}\n","<script setup>\nimport IconCircle from '@/components/shared/icons/IconCircle.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport ErrorMessage from '@/components/shared/transform/ErrorMessage.vue'\nimport Dropzone from '@/components/shared/core/Dropzone.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport FileSize from '@/components/shared/transform/FileSize.vue'\nimport FilesPreview from '@/components/shared/file/FilesPreview.vue'\nimport {useFileSelection} from '@/composables/use-file-selection.js'\nimport {isSameFile} from '@/helpers/file.js'\nimport {ref, computed, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'file', //Listen to this if you're not using multiple files'\n  'files', //Listen to this if you want to get the entire files array\n  'appended-files', //Listen to this to get appended files only\n  'removed-file', //Emitted when a file was removed\n])\nconst props = defineProps({\n  allowedFileTypes: {\n    type: [Array, String, Function],\n    default: '',\n  },\n  maxFileSize: {\n    type: [String, Number],\n    default: '',\n  },\n  maxTotalSize: {\n    type: [String, Number],\n    default: '',\n  },\n  maxNumFiles: {\n    type: Number,\n    default: 0,\n  },\n  allowMultiple: {\n    type: Boolean,\n    default: false,\n  },\n  reset: {\n    type: Boolean,\n    default: false,\n  },\n  preventDuplicates: {\n    type: Boolean,\n    default: true,\n  },\n  showPreview: {\n    type: Boolean,\n    default: true,\n  },\n  showImageCard: {\n    type: Boolean,\n    default: false,\n  },\n  noun: {\n    type: String,\n    default: 'file',\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  customFileValidator: {\n    type: Function,\n    default: () => {},\n  },\n  customDetailsText: {\n    type: String,\n    default: '',\n  },\n})\n\n//Get props\nconst {\n  allowedFileTypes,\n  allowMultiple,\n  maxFileSize,\n  maxTotalSize,\n  customFileValidator,\n  maxNumFiles,\n  reset,\n  preventDuplicates,\n} = toRefs(props)\n\n//Dropzone ref and selected files ref\nconst dropzone = ref(null)\nconst selectedFiles = ref([])\nconst numSelectedFiles = computed(() => selectedFiles.value.length)\nconst hasSelectedFiles = computed(() => numSelectedFiles.value > 0)\n\n//On files handler\nconst onFiles = files => {\n  if (preventDuplicates.value) {\n    files = files.filter(file => !selectedFiles.value.some(f => isSameFile(f, file)))\n  }\n  if (maxNumFiles.value > 0 && (numSelectedFiles.value + files.length) > maxNumFiles.value) {\n    files = files.slice(0, maxNumFiles.value - numSelectedFiles.value)\n  }\n  if (files.length === 0) {\n    return\n  }\n  if (allowMultiple.value && !reset.value) {\n    appendFiles(files)\n  }\n  else {\n    setFiles(files)\n  }\n}\n\n//Append files\nconst appendFiles = files => {\n  setFiles([...selectedFiles.value, ...files])\n  emit('appended-files', {files})\n}\n\n//Set files\nconst setFiles = files => {\n  selectedFiles.value = files\n  emit('files', {files})\n  if (!allowMultiple.value) {\n    emit('file', {file: files[0] || null})\n  }\n}\n\n//Remove a file\nconst removeFile = file => {\n  const files = selectedFiles.value.filter(f => f !== file)\n  setFiles(files)\n  emit('removed-file', {file})\n}\n\n//Use file selection composable\nconst {\n  extensions,\n  exception,\n  isOverDropZone,\n  chooseFiles,\n} = useFileSelection({\n  dropzone,\n  allowedFileTypes,\n  allowMultiple,\n  maxFileSize,\n  maxTotalSize,\n  customFileValidator,\n  onFiles,\n})\n\n//Expose ability to remove a file\ndefineExpose({\n  removeFile,\n})\n</script>\n\n<template>\n  <Dropzone\n    ref=\"dropzone\"\n    :is-active=\"isOverDropZone\"\n    :is-disabled=\"isDisabled\"\n    is-primary\n    is-large\n  >\n    <div\n      v-if=\"!hasSelectedFiles || allowMultiple\"\n      :class=\"{\n        [$style.main]: true,\n        [$style.active]: isOverDropZone,\n      }\"\n      @click=\"chooseFiles()\"\n    >\n      <IconCircle\n        :class=\"$style.icon\"\n        type=\"primary\"\n        icon=\"upload\"\n        size=\"l\"\n      />\n      <h3 :class=\"$style.header\">\n        Select\n        <Inflect\n          :text=\"noun\"\n          :count=\"allowMultiple ? 2 : 1\"\n        />\n        to upload\n      </h3>\n      <h6 :class=\"$style.subheader\">\n        or drag and drop your\n        <Inflect\n          :text=\"noun\"\n          :count=\"allowMultiple ? 2 : 1\"\n        />\n        here\n      </h6>\n    </div>\n\n    <div\n      v-if=\"showPreview && hasSelectedFiles\"\n      :class=\"$style.preview\"\n    >\n      <slot\n        name=\"preview\"\n        :selected-files=\"selectedFiles\"\n        :remove-file=\"removeFile\"\n      >\n        <FilesPreview\n          v-if=\"showPreview && hasSelectedFiles\"\n          :files=\"selectedFiles\"\n          :show-image-card=\"showImageCard\"\n          @remove-file=\"removeFile($event.file)\"\n        />\n      </slot>\n    </div>\n\n    <small\n      v-else\n      :class=\"$style.details\"\n      hide-empty\n    >\n      <span v-if=\"extensions\">\n        Allowed {{ noun }}\n        <span v-if=\"allowedFileTypes.length > 1\">types are</span>\n        <span v-if=\"allowedFileTypes.length === 1\">type is</span>\n        {{ extensions }}\n      </span>\n      <span v-if=\"maxFileSize || maxTotalSize\">\n        Max {{ noun }} size is\n        <span v-if=\"maxFileSize\">\n          <FileSize :size=\"maxFileSize\" />\n          <span v-if=\"allowMultiple\">per {{ noun }}</span>\n        </span>\n        <span v-if=\"maxTotalSize && allowMultiple\">\n          <span v-if=\"maxFileSize\"> and </span>\n          <FileSize :size=\"maxTotalSize\" /> in total\n        </span>\n      </span>\n      <span v-if=\"maxNumFiles\">\n        Max total of {{ maxNumFiles }}\n        <Inflect\n          :text=\"noun\"\n          :count=\"maxNumFiles\"\n        />\n      </span>\n      <div\n        :class=\"$style.extra\"\n        hide-empty\n      >\n        <slot name=\"extra\" />\n      </div>\n      <span v-if=\"customDetailsText\">\n        {{ customDetailsText }}\n      </span>\n      <Alert\n        v-if=\"exception\"\n        type=\"danger\"\n        :class=\"$style.exception\"\n      >\n        <ErrorMessage :error=\"exception\" />\n      </Alert>\n    </small>\n  </Dropzone>\n</template>\n\n<style module lang=\"scss\">\n.dropzone {\n  flex: 1;\n  min-height: 18rem;\n  padding: 1rem;\n  border: 2px dashed var(--color-primary-muted);\n  border-radius: var(--border-radius-m);\n  background: var(--bg-highlight);\n  transition: all var(--transition-cubic-fast);\n  @media (min-width: 768px) {\n    padding: 3rem;\n  }\n  &.active {\n    background: var(--bg-highlight-hover);\n    border-color: var(--color-borders-active);\n  }\n  &.disabled {\n    opacity: 0.5;\n    pointer-events: none;\n  }\n}\n.dropzone, .main, .preview, .details, .extra {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n}\n.extra {\n  margin-top: 1rem;\n  font-size: var(--font-size-text-normal);\n}\n.main {\n  width: max-content;\n  cursor: pointer;\n  &:hover, &.active {\n    .icon {\n      transform: scale(1.15);\n      opacity: 1;\n    }\n  }\n}\n.icon {\n  opacity: 0.75;\n  color: var(--color-elements-active);\n  transition: all var(--transition-cubic-fast);\n}\n.header {\n  color: var(--color-text-link);\n  margin-top: 1rem;\n  margin-bottom: 0;\n}\n.subheader {\n  color: var(--color-text-muted);\n  margin: 0;\n}\n.details {\n  margin-top: 1rem;\n  font-size: 12px;\n  color: var(--color-text-muted);\n}\n.exception {\n  margin-top: 1rem;\n}\n.preview {\n  margin-top: 2rem;\n  display: flex;\n  gap: 1rem;\n  flex-wrap: wrap;\n  width: 100%;\n}\n</style>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport FileSelect from '@/components/shared/file/FileSelect.vue'\nimport FileDetails from '@/components/shared/file/FileDetails.vue'\nimport DownloadLink from '@/components/shared/links/DownloadLink.vue'\nimport {useEnv} from '@/composables/use-env.js'\nimport {importFileTypes} from '@/constants/file-types.js'\n\n//Emits and props\ndefineEmits([\n  'update',\n])\ndefineProps({\n  csvFile: {\n    type: File,\n    default: null,\n  },\n})\n\n//Get base url for sample CSV file\nconst {apiBaseUrl} = useEnv()\n</script>\n\n<template>\n  <FormField v-bind=\"$attrs\">\n    <FileDetails\n      v-if=\"csvFile\"\n      :file=\"csvFile\"\n      with-border\n      @remove=\"$emit('update', {csvFile: null})\"\n    />\n\n    <FileSelect\n      v-else\n      :allowed-file-types=\"importFileTypes\"\n      max-file-size=\"50MB\"\n      @file=\"$emit('update', {csvFile: $event.file})\"\n    >\n      <template #extra>\n        <DownloadLink\n          :url=\"`${apiBaseUrl}/assets/example-csv-import.csv`\"\n          text=\"Download a template CSV file\"\n        />\n      </template>\n    </FileSelect>\n  </FormField>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport CohortCsvUploadFormField from '@/components/cohorts/CohortCsvUploadFormField.vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'back',\n  'cancel',\n  'update',\n  'continue',\n  'confirm',\n])\ndefineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isCreatingCohort: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock header=\"Upload a CSV or Excel file with learners\">\n      <CohortCsvUploadFormField\n        :csv-file=\"model.csvFile\"\n        @update=\"updateModel($event)\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-go-back=\"true\"\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        label-confirm=\"Continue\"\n        :is-disabled-confirm=\"!model.csvFile\"\n        :has-spinner-confirm=\"isCreatingCohort\"\n        @back=\"$emit('back')\"\n        @cancel=\"$emit('cancel')\"\n        @confirm=\"$emit('confirm')\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","import {BaseModel} from '@/models/base.model.js'\nimport {addressTypes} from '@/constants/address-types.js'\n\n/**\n * Address model\n */\nexport class Address extends BaseModel {\n\n  //Address type flag\n  get isEmail() {\n    return this.addressType === addressTypes.EMAIL\n  }\n  get isSms() {\n    return this.addressType === addressTypes.SMS\n  }\n  get isWhatsApp() {\n    return this.addressType === addressTypes.WHATSAPP\n  }\n  get isSlack() {\n    return this.addressType === addressTypes.SLACK\n  }\n  get isTeams() {\n    return this.addressType === addressTypes.TEAMS\n  }\n  get isPhone() {\n    return this.isSms || this.isWhatsApp\n  }\n  get isIntegration() {\n    return this.isTeams || this.isSlack\n  }\n}\n","\n//Field rule conditions\nexport const fieldRuleConditions = {\n\n  //Text/number field conditions\n  EQUALS: 'equals',\n  NOT_EQUALS: 'not_equals',\n  CONTAINS: 'contains',\n  NOT_CONTAINS: 'not_contains',\n  STARTS_WITH: 'starts_with',\n  ENDS_WITH: 'ends_with',\n  LESS_THAN: 'less_than',\n  MORE_THAN: 'more_than',\n\n  //Date conditions\n  IS_ON_DATE: 'is_on_date',\n  IS_NOT_ON_DATE: 'is_not_on_date',\n  IS_BEFORE_DATE: 'is_before_date',\n  IS_AFTER_DATE: 'is_after_date',\n  LESS_THAN_RELATIVE_DATE: 'less_than_relative_date',\n  MORE_THAN_RELATIVE_DATE: 'more_than_relative_date',\n\n  //Boolean conditions\n  IS_TRUE: 'is_true',\n  IS_FALSE: 'is_false',\n\n  //Generic conditions\n  HAS_ANY_VALUE: 'has_any_value',\n  HAS_NO_VALUE: 'has_no_value',\n}\n\n//Field sources\nexport const fieldSources = {\n  USER: 'user',\n  METADATA: 'metadata',\n}\n\n//Field types\nexport const fieldTypes = {\n  TEXT: 'text',\n  NUMBER: 'number',\n  DATE: 'date',\n  BOOLEAN: 'boolean',\n}\n\n//Field rule condition options\nexport const fieldRuleConditionOptions = [\n\n  //Text/number field conditions\n  {\n    value: fieldRuleConditions.EQUALS,\n    label: 'is',\n    fieldTypes: [\n      fieldTypes.TEXT,\n      fieldTypes.NUMBER,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.NOT_EQUALS,\n    label: 'is not',\n    fieldTypes: [\n      fieldTypes.TEXT,\n      fieldTypes.NUMBER,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.CONTAINS,\n    label: 'contains',\n    fieldTypes: [\n      fieldTypes.TEXT,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.NOT_CONTAINS,\n    label: 'does not contain',\n    fieldTypes: [\n      fieldTypes.TEXT,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.STARTS_WITH,\n    label: 'starts with',\n    fieldTypes: [\n      fieldTypes.TEXT,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.ENDS_WITH,\n    label: 'ends with',\n    fieldTypes: [\n      fieldTypes.TEXT,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.LESS_THAN,\n    label: 'is less than',\n    fieldTypes: [\n      fieldTypes.NUMBER,\n    ],\n    hasTextInput: true,\n  },\n  {\n    value: fieldRuleConditions.MORE_THAN,\n    label: 'is more than',\n    fieldTypes: [\n      fieldTypes.NUMBER,\n    ],\n    hasTextInput: true,\n  },\n\n  //Date field conditions\n  {\n    value: fieldRuleConditions.IS_ON_DATE,\n    label: 'is on',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasDateInput: true,\n  },\n  {\n    value: fieldRuleConditions.IS_NOT_ON_DATE,\n    label: 'is not on',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasDateInput: true,\n  },\n  {\n    value: fieldRuleConditions.IS_BEFORE_DATE,\n    label: 'is before',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasDateInput: true,\n  },\n  {\n    value: fieldRuleConditions.IS_AFTER_DATE,\n    label: 'is after',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasDateInput: true,\n  },\n  {\n    value: fieldRuleConditions.LESS_THAN_RELATIVE_DATE,\n    label: 'is less than',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasRelativeDateInput: true,\n  },\n  {\n    value: fieldRuleConditions.MORE_THAN_RELATIVE_DATE,\n    label: 'is more than',\n    fieldTypes: [\n      fieldTypes.DATE,\n    ],\n    hasRelativeDateInput: true,\n  },\n\n  //Boolean field conditions\n  {\n    value: fieldRuleConditions.IS_TRUE,\n    label: 'is true',\n    fieldTypes: [\n      fieldTypes.BOOLEAN,\n    ],\n    fieldValue: true,\n  },\n  {\n    value: fieldRuleConditions.IS_FALSE,\n    label: 'is false',\n    fieldTypes: [\n      fieldTypes.BOOLEAN,\n    ],\n    fieldValue: false,\n  },\n\n  //General conditions\n  {\n    value: fieldRuleConditions.HAS_ANY_VALUE,\n    label: 'has any value',\n    fieldTypes: [\n      fieldTypes.TEXT,\n      fieldTypes.NUMBER,\n      fieldTypes.DATE,\n    ],\n    fieldValue: null,\n  },\n  {\n    value: fieldRuleConditions.HAS_NO_VALUE,\n    label: 'has no value',\n    fieldTypes: [\n      fieldTypes.TEXT,\n      fieldTypes.NUMBER,\n      fieldTypes.DATE,\n    ],\n    fieldValue: null,\n  },\n]\n\n//Field rule date value options\nexport const fieldRuleDateValueOptions = [\n  {\n    value: 'today',\n    label: 'Today',\n  },\n  {\n    value: 'yesterday',\n    label: 'Yesterday',\n  },\n  {\n    value: 'tomorrow',\n    label: 'Tomorrow',\n  },\n  {\n    value: 'minus_one_week',\n    label: 'A week ago',\n  },\n  {\n    value: 'plus_one_week',\n    label: 'A week from now',\n  },\n  {\n    value: 'minus_one_month',\n    label: 'A month ago',\n  },\n  {\n    value: 'plus_one_month',\n    label: 'A month from now',\n  },\n  {\n    value: 'minus_one_year',\n    label: 'A year ago',\n  },\n  {\n    value: 'plus_one_year',\n    label: 'A year from now',\n  },\n  {\n    value: 'specific',\n    label: 'Specific date',\n  },\n]\n","\n//Metadata field types (different from field types)\nexport const metadataFieldTypes = {\n  NUMBER: 'number',\n  BOOLEAN: 'boolean',\n  DATETIME: 'datetime',\n  STRING: 'string',\n}\n\n//Supported metadata field type options\nexport const metadataFieldTypeOptions = [\n  {\n    value: metadataFieldTypes.STRING,\n    label: 'Text',\n  },\n  // {\n  //   value: metadataFieldTypes.NUMBER,\n  //   label: 'Number',\n  // },\n  {\n    value: metadataFieldTypes.DATETIME,\n    label: 'Date',\n  },\n  {\n    value: metadataFieldTypes.BOOLEAN,\n    label: 'Boolean',\n  },\n]\n","import {BaseModel} from '@/models/base.model.js'\nimport {fieldTypes} from '@/constants/fields.js'\nimport {metadataFieldTypes} from '@/constants/metadata.js'\nimport {toUpperCaseFirst} from '@/helpers/string.js'\n\n/**\n * Metadata field model\n */\nexport class MetadataField extends BaseModel {\n\n  //JSON parsers\n  static jsonParsers = {\n    type: value => MetadataField.getFieldType(value),\n    name: value => toUpperCaseFirst(value),\n  }\n\n  //Field type checks\n  get isNumber() {\n    return this.type === fieldTypes.NUMBER\n  }\n  get isBoolean() {\n    return this.type === fieldTypes.BOOLEAN\n  }\n  get isDate() {\n    return this.type === fieldTypes.DATE\n  }\n  get isText() {\n    return this.type === fieldTypes.TEXT\n  }\n\n  /**\n   * Helper to get field type based on JSON value\n   */\n  static getFieldType(value) {\n    switch (value) {\n      case metadataFieldTypes.NUMBER:\n        return fieldTypes.NUMBER\n      case metadataFieldTypes.BOOLEAN:\n        return fieldTypes.BOOLEAN\n      case metadataFieldTypes.DATETIME:\n        return fieldTypes.DATE\n      case metadataFieldTypes.STRING:\n      default:\n        return fieldTypes.TEXT\n    }\n  }\n}\n","import {User} from '@/models/user.model.js'\nimport {Address} from '@/models/address.model.js'\nimport {MetadataField} from '@/models/metadata-field.model.js'\nimport {addressTypes} from '@/constants/address-types.js'\n\n/**\n * Learner model\n */\nexport class Learner extends User {\n\n  //Submodels\n  static subModels = {\n    addresses: [Address],\n    metadata: [MetadataField],\n  }\n\n  //Has cohorts check\n  get hasCohorts() {\n    return this.cohorts?.length > 0\n  }\n\n  //Has delivery addresses check\n  get hasDeliveryAddresses() {\n    return this.addresses?.length > 0\n  }\n\n  //Delivery addresses map by type\n  get deliveryAddressesMap() {\n    return Object.values(addressTypes).reduce((map, type) => {\n      map[type] = this.addresses?.filter(address => address.addressType === type) || []\n      return map\n    }, {})\n  }\n\n  //Delivery emails\n  get deliveryEmails() {\n    return this.addresses?.filter(address => address.addressType === addressTypes.EMAIL) || []\n  }\n\n  //Delivery phones\n  get deliveryPhones() {\n    return this.addresses?.filter(address => address.addressType === addressTypes.SMS) || []\n  }\n\n  //Delivery whatsapps\n  get deliveryWhatsapps() {\n    return this.addresses?.filter(address => address.addressType === addressTypes.WHATSAPP) || []\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Learner} from '@/models/learner.model.js'\n\n/**\n * Learners API service\n */\nexport class LearnersApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/learners'\n  itemKey = 'learner'\n  itemsKey = 'learners'\n  ModelClass = Learner\n\n  /**\n   * Request CSV export\n   */\n  requestCsvExport(params) {\n    return this\n      .get('/request_csv', params)\n  }\n}\n\n//Export singleton instance\nexport const learnersApi = new LearnersApi()\n","<script setup>\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport ListItemsContainer from '@/components/shared/search/ListItemsContainer.vue'\nimport ListItemCheckBox from '@/components/shared/search/ListItemCheckBox.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {learnersApi} from '@/api/learners.api.js'\nimport {watchArray} from '@vueuse/core'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  selectedLearners: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Learners to choose from and selected learners\nconst learners = ref([])\nconst {selectedLearners} = toRefs(props)\n\n//Learner selection\nconst localSelection = ref([...selectedLearners.value])\nconst {\n  hasSelectedItems: hasSelectedLearners,\n  numSelectedItems: numSelectedLearners,\n  isItemSelected: isLearnerSelected,\n  toggleItem: toggleLearner,\n  unselectAllItems: unselectAllLearners,\n} = useItemSelection(learners, localSelection)\n\n//Propagate selected learners on changes\nwatchArray(localSelection, () => emit('input', {value: localSelection.value}))\n\n//Search for learners\nconst isSearching = ref(false)\nconst queryLearners = async search => {\n  isSearching.value = true\n  const data = await learnersApi.query({search})\n  isSearching.value = false\n  learners.value = data.learners\n}\n\n//Clear learners\nconst clearLearners = () => learners.value = []\n</script>\n\n<template>\n  <FlexColumn>\n    <SearchInput\n      v-bind=\"$attrs\"\n      :has-spinner=\"isSearching\"\n      test-id=\"learnerPickerSearchInput\"\n      @search=\"queryLearners($event.searchTerm)\"\n      @clear-search=\"clearLearners()\"\n    />\n\n    <ListItemsContainer\n      v-if=\"learners.length\"\n      :class=\"$style.container\"\n      test-id=\"learnerPickerResults\"\n      is-scrollable\n    >\n      <ListItemCheckBox\n        v-for=\"(learner, i) in learners\"\n        :key=\"learner.id\"\n        :test-id=\"`learnerPickerResult-${i}`\"\n        :label=\"learner.displayName\"\n        :is-checked=\"isLearnerSelected(learner)\"\n        @click=\"toggleLearner(learner)\"\n      />\n    </ListItemsContainer>\n\n    <ButtonBar v-if=\"hasSelectedLearners\">\n      <ActionButton\n        type=\"link\"\n        test-id=\"learnerPickerClearAllButton\"\n        :label=\"`Clear all (${numSelectedLearners})`\"\n        @click=\"unselectAllLearners()\"\n      />\n    </ButtonBar>\n  </FlexColumn>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  margin-top: 0.75rem;\n  max-height: 350px !important; /* Fits 7 results */\n}\n</style>\n","import {dateUnits, dateSigns} from '@/constants/date-and-time.js'\nimport {computed} from 'vue'\n\n/**\n * Use relative dates composable\n */\nexport function useRelativeDates(str, separator = '_') {\n\n  //Parts\n  const parts = computed(() => str.value ? str.value.split(separator) : [])\n  const sign = computed(() => parts.value[0] || dateSigns.PAST)\n  const amount = computed(() => parts.value[1] || '')\n  const unit = computed(() => parts.value[2] || dateUnits.DAYS)\n\n  //Helper to construct a new relative date string\n  const constructString = (amount, unit = dateUnits.DAYS, sign = dateSigns.PAST) => {\n    return `${sign}${separator}${amount}${separator}${unit}`\n  }\n\n  //Return interface\n  return {\n    amount,\n    unit,\n    sign,\n    constructString,\n  }\n}\n","<script setup>\nimport InputWrapper from '@/components/shared/form/InputWrapper.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {useRelativeDates} from '@/composables/use-relative-dates.js'\nimport {dateUnits, dateSigns} from '@/constants/date-and-time.js'\nimport {toRefs, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  value: {\n    type: String,\n    default: '',\n  },\n  required: {\n    type: Boolean,\n    default: false,\n  },\n  disabled: {\n    type: Boolean,\n    default: false,\n  },\n  isSlim: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Extract props\nconst {value} = toRefs(props)\n\n//Relative dates handling\nconst {\n  amount,\n  unit,\n  sign,\n  constructString,\n} = useRelativeDates(value)\n\n//Updaters\nconst updateValue = (amount, unit, sign) => {\n  const value = constructString(amount, unit, sign)\n  emit('input', {value})\n}\nconst updateAmount = amount => updateValue(amount, unit.value, sign.value)\nconst updateUnit = unit => updateValue(amount.value, unit, sign.value)\nconst updateSign = sign => updateValue(amount.value, unit.value, sign)\n\n//Options\nconst unitOptions = [\n  {\n    label: 'days',\n    value: dateUnits.DAYS,\n  },\n  {\n    label: 'weeks',\n    value: dateUnits.WEEKS,\n  },\n  {\n    label: 'months',\n    value: dateUnits.MONTHS,\n  },\n  {\n    label: 'years',\n    value: dateUnits.YEARS,\n  },\n]\n\n//Relative date sign options\nconst signOptions = [\n  {\n    label: 'ago',\n    value: dateSigns.PAST,\n  },\n  {\n    label: 'from now',\n    value: dateSigns.FUTURE,\n  },\n]\n\n//Ensure value selected for unit/sign\nwatch(amount, () => {\n  if (!unit.value || !sign.value) {\n    updateValue(\n      amount.value,\n      unit.value || dateUnits.DAYS,\n      sign.value || dateSigns.PAST\n    )\n  }\n})\n</script>\n\n<template>\n  <InputWrapper with-reduced-gap>\n    <TextInput\n      :class=\"$style.amount\"\n      :required=\"required\"\n      :value=\"amount\"\n      :is-slim=\"isSlim\"\n      @input=\"updateAmount($event.value)\"\n    />\n    <SelectInput\n      :class=\"$style.unit\"\n      :value=\"unit\"\n      required\n      :options=\"unitOptions\"\n      :is-searchable=\"false\"\n      :is-slim=\"isSlim\"\n      @input=\"updateUnit($event.value)\"\n    />\n    <SelectInput\n      :class=\"$style.sign\"\n      :value=\"sign\"\n      required\n      :options=\"signOptions\"\n      :is-searchable=\"false\"\n      :is-slim=\"isSlim\"\n      @input=\"updateSign($event.value)\"\n    />\n  </InputWrapper>\n</template>\n\n<style module lang=\"scss\">\n.amount {\n  flex: 1;\n}\n.unit {\n  flex: 0 0 100px;\n}\n.sign {\n  flex: 0 0 120px;\n}\n</style>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport RelativeDateInput from '@/components/shared/form/RelativeDateInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {fieldTypes, fieldSources, fieldRuleConditionOptions} from '@/constants/fields.js'\nimport {toRefs, computed, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update-rule',\n  'remove-rule',\n])\nconst props = defineProps({\n  userField: {\n    type: String,\n    default: '',\n  },\n  metadataFieldId: {\n    type: String,\n    default: '',\n  },\n  condition: {\n    type: String,\n    required: true,\n  },\n  value: {\n    type: [String, Number, Boolean, null],\n    default: null,\n  },\n  fieldOptions: {\n    type: Array,\n    default: () => [],\n  },\n  conditionOptions: {\n    type: Array,\n    default: () => [...fieldRuleConditionOptions],\n  },\n  canRemoveRule: {\n    type: Boolean,\n    default: false,\n  },\n  showLabels: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Selected field and condition objects\nconst {userField, metadataFieldId, fieldOptions, condition, conditionOptions, value} = toRefs(props)\nconst fieldValue = computed(() => userField.value || metadataFieldId.value)\nconst selectedField = computed(() => fieldOptions.value.find(option => option.value === fieldValue.value))\nconst selectedCondition = computed(() => conditionOptions.value.find(option => option.value === condition.value))\n\n//Filter condition options based on selected field type\nconst filteredConditionOptions = computed(() => {\n  if (selectedField.value === undefined) {\n    return conditionOptions.value\n  }\n  return conditionOptions.value\n    .filter(option => option.fieldTypes.includes(selectedField.value.type))\n})\n\n//Value input component\nconst ValueInputComponent = computed(() => {\n  if (selectedCondition.value?.hasTextInput) {\n    return TextInput\n  }\n  if (selectedCondition.value?.hasDateInput) {\n    return DateInput\n  }\n  if (selectedCondition.value?.hasRelativeDateInput) {\n    return RelativeDateInput\n  }\n  return null\n})\n\n//Updater\nconst updateRule = (key, value) => emit('update-rule', {data: {[key]: value}})\n\n//Helper to update rule field\nconst updateRuleField = option => {\n  if (option.source === fieldSources.METADATA) {\n    emit('update-rule', {data: {\n      userField: null,\n      metadataFieldId: option.value,\n    }})\n  }\n  else {\n    emit('update-rule', {data: {\n      userField: option.value,\n      metadataFieldId: null,\n    }})\n  }\n}\n\n//Watch selected field for changes\nwatch(selectedField, () => {\n  const hasValidValue = condition.value && filteredConditionOptions.value\n    .some(option => option.value === condition.value)\n\n  //Ensure that condition is sane\n  if (!hasValidValue) {\n    updateRule('condition', filteredConditionOptions.value[0]?.value || '')\n  }\n\n  //Ensure that boolean value is not populated into the input field\n  if (selectedField.value && selectedField.value.type !== fieldTypes.BOOLEAN) {\n    if (value.value === true || value.value === false) {\n      updateRule('value', '')\n    }\n  }\n})\n\n//Set value if condition updates\nwatch(selectedCondition, () => {\n  if (selectedCondition.value?.fieldValue !== undefined) {\n    updateRule('value', selectedCondition.value.fieldValue)\n  }\n})\n</script>\n\n<template>\n  <div :class=\"$style.rule\">\n    <FormField\n      :label=\"showLabels ? 'Field' : ''\"\n      is-inline\n      :class=\"[$style.column, $style.field]\"\n    >\n      <SelectInput\n        :value=\"fieldValue\"\n        :options=\"fieldOptions\"\n        test-id=\"ruleField\"\n        is-slim\n        is-flexible\n        @input=\"updateRuleField($event.option)\"\n      />\n    </FormField>\n    <FormField\n      :label=\"showLabels ? 'Condition' : ''\"\n      is-inline\n      :class=\"[$style.column, $style.condition]\"\n    >\n      <SelectInput\n        :value=\"condition\"\n        :options=\"filteredConditionOptions\"\n        :is-searchable=\"false\"\n        test-id=\"ruleCondition\"\n        is-slim\n        is-flexible\n        @input=\"updateRule('condition', $event.value)\"\n      />\n    </FormField>\n    <FormField\n      :label=\"showLabels ? 'Value' : ''\"\n      is-inline\n      :class=\"[$style.column, $style.value]\"\n    >\n      <component\n        :is=\"ValueInputComponent\"\n        :value=\"value\"\n        test-id=\"ruleValue\"\n        required\n        is-slim\n        @input=\"updateRule('value', $event.value)\"\n      />\n      <div\n        v-if=\"!ValueInputComponent\"\n        :class=\"$style.fauxInput\"\n      />\n    </FormField>\n    <FormField\n      :label=\"showLabels ? '\\xa0' : ''\"\n      is-inline\n      :class=\"$style.options\"\n    >\n      <ActionButton\n        v-if=\"canRemoveRule\"\n        icon=\"close\"\n        type=\"text\"\n        is-danger\n        @click=\"$emit('remove-rule')\"\n      />\n    </FormField>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.rule {\n  display: flex;\n  gap: 0.5rem;\n  align-items: center;\n}\n.options {\n  flex: 0 0 36px; /* To fit the button */\n  margin-left: -0.5rem;\n  margin-right: -0.5rem;\n}\n.column {\n  flex: 1;\n}\n.field, .condition {\n  max-width: 24%;\n}\n.value {\n  max-width: calc(52% - 36px);\n}\n.fauxInput {\n  height: var(--input-height);\n}\n</style>\n","import {fieldTypes, fieldSources} from './fields.js'\n\n//User field options\nexport const userFieldOptions = [\n  {\n    value: 'first_name',\n    label: 'First name',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'last_name',\n    label: 'Last name',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'full_name',\n    label: 'Full name',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'email',\n    label: 'Email',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'external_user_id',\n    label: 'External user ID',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'external_manager_id',\n    label: 'External manager ID',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'address_type',\n    label: 'Address type',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'address_value',\n    label: 'Address value',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n  {\n    value: 'timezone',\n    label: 'Timezone',\n    type: fieldTypes.TEXT,\n    source: fieldSources.USER,\n  },\n]\n\n//User field options for cohort rules\nexport const userFieldOptionsForCohortRules = userFieldOptions.filter(option => [\n  'first_name',\n  'last_name',\n  'full_name',\n  'email',\n].includes(option.value))\n\n//User field options for CSV import\nexport const userFieldOptionsForCsv = userFieldOptions.filter(option => [\n  'first_name',\n  'last_name',\n  'full_name',\n  'email',\n  'external_user_id',\n  'external_manager_id',\n  'address_type',\n  'address_value',\n  'timezone',\n].includes(option.value))\n\n//User CSV upload header detection regex\nexport const userHeaderRegex = /first.*name|last.*name|full.*name|email/i\n","import {ModelApi} from '@/api/model.api.js'\nimport {MetadataField} from '@/models/metadata-field.model.js'\n\n/**\n * Meta data fields API service\n */\nexport class MetadataFieldsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/metadata_fields'\n  itemKey = 'metadataField'\n  itemsKey = 'metadataFields'\n  ModelClass = MetadataField\n}\n\n//Export singleton instance\nexport const metadataFieldsApi = new MetadataFieldsApi()\n","import {metadataFieldsApi} from '@/api/metadata-fields.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Metadata fields composable\n */\nexport function useMetadataFields() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Fields\n  const metadataFields = ref([])\n\n  //Load metadata fields\n  const loadMetadataFields = async filter => {\n    try {\n      const data = await metadataFieldsApi.query(filter)\n      metadataFields.value = data.metadataFields\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n  }\n\n  //Dynamically add a metadata field to the local ref\n  const addMetadataField = metadataField => metadataFields.value.push(metadataField)\n\n  //Export interface\n  return {\n    metadataFields,\n    loadMetadataFields,\n    addMetadataField,\n  }\n}\n","import {useMetadataFields} from '@/composables/use-metadata-fields.js'\nimport {fieldSources} from '@/constants/fields.js'\nimport {computed} from 'vue'\n\n/**\n * Metadata field options composable\n */\nexport function useMetadataFieldOptions(initialOptions = []) {\n\n  //Get metadata field composable\n  const {\n    metadataFields,\n    loadMetadataFields,\n    addMetadataField,\n  } = useMetadataFields()\n\n  //Fields\n  const fieldOptions = computed(() => [\n    ...initialOptions,\n    ...metadataFields.value.map(field => ({\n      value: field.id,\n      label: field.name,\n      type: field.type,\n      source: fieldSources.METADATA,\n    })),\n  ])\n\n  //Load meta data fields now\n  loadMetadataFields()\n\n  //Export interface\n  return {\n    fieldOptions,\n    addMetadataField,\n  }\n}\n","\n/**\n * Cohort rule management composable\n */\nexport function useCohortRuleManagement() {\n\n  //Helper to create an empty rule\n  const createRule = () => ({\n    userField: '',\n    metadataFieldId: '',\n    condition: '',\n    value: '',\n  })\n\n  //Helper to create an empty rules set\n  const createRuleset = () => ({\n    rules: [\n      createRule(),\n    ],\n  })\n\n  //Helper to validate rulesets\n  const validateRulesets = rulesets => {\n\n    //Ensure that at least one ruleset exists, and that each ruleset has\n    //at least one rule, and that each rule has a field, condition and value\n    const hasRulesets = rulesets.length > 0\n    const hasRules = rulesets.every(set => set.rules.length > 0)\n    const hasValues = rulesets\n      .every(set => set.rules\n        .every(rule =>\n          (rule.userField || rule.metadataFieldId) &&\n          (rule.condition && rule.value !== '')\n        ))\n\n    //Invalid\n    if (!hasRulesets || !hasRules || !hasValues) {\n      return false\n    }\n\n    //All good\n    return true\n  }\n\n  //Expose interface\n  return {\n    createRuleset,\n    createRule,\n    validateRulesets,\n  }\n}\n","<script setup>\nimport FieldRule from '@/components/shared/rules/FieldRule.vue'\nimport FieldRuleset from '@/components/shared/rules/FieldRuleset.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport {userFieldOptionsForCohortRules} from '@/constants/user.js'\nimport {fieldRuleConditionOptions} from '@/constants/fields.js'\nimport {useMetadataFieldOptions} from '@/composables/use-metadata-field-options.js'\nimport {useCohortRuleManagement} from '@/composables/use-cohort-rule-management.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n])\nconst props = defineProps({\n  rulesets: {\n    type: Array,\n    required: true,\n  },\n})\n\n//Model\nconst {rulesets} = toRefs(props)\n\n//Field options and condition options\nconst {fieldOptions} = useMetadataFieldOptions(userFieldOptionsForCohortRules)\nconst conditionOptions = computed(() => [...fieldRuleConditionOptions])\n\n//Cohort creation\nconst {\n  createRule,\n  createRuleset,\n} = useCohortRuleManagement()\n\n//Model updater\nconst updateRulesets = rulesets => emit('update', {rulesets})\n\n//Updater helpers\nconst cloneRulesets = () => rulesets.value.map(set => ({...set}))\nconst addRuleset = () => {\n  const rulesets = cloneRulesets()\n  const ruleset = createRuleset()\n  rulesets.push(ruleset)\n  updateRulesets(rulesets)\n}\nconst removeRuleset = (rulesetIndex) => {\n  const rulesets = cloneRulesets()\n  rulesets.splice(rulesetIndex, 1)\n  updateRulesets(rulesets)\n}\nconst addRule = (rulesetIndex) => {\n  const rulesets = cloneRulesets()\n  const rule = createRule()\n  rulesets[rulesetIndex].rules.push(rule)\n  updateRulesets(rulesets)\n}\nconst updateRule = (rulesetIndex, ruleIndex, data) => {\n  const rulesets = cloneRulesets()\n  const rule = rulesets[rulesetIndex].rules[ruleIndex]\n  rulesets[rulesetIndex].rules[ruleIndex] = {...rule, ...data}\n  updateRulesets(rulesets)\n}\nconst removeRule = (rulesetIndex, ruleIndex) => {\n  const rulesets = cloneRulesets()\n  rulesets[rulesetIndex].rules.splice(ruleIndex, 1)\n  updateRulesets(rulesets)\n}\n</script>\n\n<template>\n  <div>\n    <TransitionGroup\n      :enter-active-class=\"$style.from\"\n      :leave-active-class=\"$style.from\"\n      :enter-from-class=\"$style.to\"\n      :leave-to-class=\"$style.to\"\n    >\n      <FieldRuleset\n        v-for=\"(ruleset, rulesetIndex) in rulesets\"\n        :key=\"rulesetIndex\"\n        :can-add-rule=\"true\"\n        :can-remove-ruleset=\"rulesets.length > 1\"\n        :is-first-ruleset=\"rulesetIndex === 0\"\n        @add-rule=\"addRule(rulesetIndex)\"\n        @remove-ruleset=\"removeRuleset(rulesetIndex)\"\n      >\n        <FieldRule\n          v-for=\"(rule, ruleIndex) in ruleset.rules\"\n          :key=\"ruleIndex\"\n          :user-field=\"rule.userField\"\n          :metadata-field-id=\"rule.metadataFieldId\"\n          :field-options=\"fieldOptions\"\n          :condition=\"rule.condition\"\n          :condition-options=\"conditionOptions\"\n          :value=\"rule.value\"\n          :can-remove-rule=\"ruleset.rules.length > 1\"\n          :show-labels=\"ruleIndex === 0\"\n          @update-rule=\"updateRule(rulesetIndex, ruleIndex, $event.data)\"\n          @remove-rule=\"removeRule(rulesetIndex, ruleIndex)\"\n        />\n      </FieldRuleset>\n    </TransitionGroup>\n\n    <CreateButton\n      type=\"link\"\n      label=\"Add OR condition\"\n      is-block\n      @click=\"addRuleset()\"\n    />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: all var(--transition-cubic);\n}\n.to {\n  transform: scale(0.75);\n  opacity: 0;\n}\n</style>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport CohortRulesManagement from './CohortRulesManagement.vue'\nimport {useCohortRuleManagement} from '@/composables/use-cohort-rule-management.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'back',\n  'cancel',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isCreatingCohort: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Model and updater\nconst {model} = toRefs(props)\nconst updateModel = data => emit('update', {data})\n\n//Rule validation\nconst {\n  validateRulesets,\n} = useCohortRuleManagement()\n\n//Validation\nconst confirm = () => {\n\n  //Validate rulesets\n  //TODO: Will need to implement form validation to surface any issues to the user\n  if (!validateRulesets(model.value.rulesets)) {\n    return\n  }\n\n  //Confirm\n  emit('confirm')\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock header=\"Create a dynamic cohort\">\n      <h6>Choose rules</h6>\n\n      <CohortRulesManagement\n        :rulesets=\"model.rulesets\"\n        @update=\"updateModel($event)\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-go-back=\"true\"\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        :is-disabled-confirm=\"false\"\n        :has-spinner-confirm=\"isCreatingCohort\"\n        @back=\"$emit('back')\"\n        @cancel=\"$emit('cancel')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </FlowStep>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: all var(--transition-cubic);\n}\n.to {\n  transform: scale(0.75);\n  opacity: 0;\n}\n</style>\n","import {ref, watch} from 'vue'\n\n//Map of cohort ids to CSV files\nconst fileMap = new Map()\n\n/**\n * Cohort CSV file composable\n */\nexport function useCohortCsvFile(cohort) {\n\n  //CSV file ref\n  const csvFile = ref(null)\n\n  //Set or clear CSV file for cohort\n  const setCsvFile = file => fileMap.set(cohort.value.id, file)\n  const clearCsvFile = () => fileMap.delete(cohort.value.id)\n\n  //Watch cohort ref and check for file\n  watch(cohort, () => {\n    if (cohort.value && !cohort.value.isDynamic && fileMap.has(cohort.value.id)) {\n      csvFile.value = fileMap.get(cohort.value.id)\n    }\n    else {\n      csvFile.value = null\n    }\n  })\n\n  //Expose inteface\n  return {\n    csvFile,\n    setCsvFile,\n    clearCsvFile,\n  }\n}\n","import {cohortLearnerSelectionMethods} from '@/constants/cohorts.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {useCohortRuleManagement} from '@/composables/use-cohort-rule-management.js'\nimport {useCohortCsvFile} from '@/composables/use-cohort-csv-file.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed} from 'vue'\n\n/**\n * Cohort creation composable\n */\nexport function useCohortCreation() {\n\n  //Created cohort ref (needed for useCohortCsvFile)\n  const cohort = ref(null)\n\n  //Composables\n  const {setCsvFile} = useCohortCsvFile(cohort)\n  const {createRuleset} = useCohortRuleManagement()\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Model for creation\n  const model = ref({\n    name: '',\n    method: cohortLearnerSelectionMethods.CSV,\n    skipLearners: false,\n    learnerIds: [],\n    rulesets: [],\n    csvFile: null,\n    preferredTimezone: null,\n  })\n\n  //Computed flags\n  const isDynamic = computed(() => model.value.method === cohortLearnerSelectionMethods.DYNAMIC)\n  const isAddingExisting = computed(() => model.value.method === cohortLearnerSelectionMethods.EXISTING)\n\n  //Update model\n  const updateModel = data => {\n\n    //Assign data to model\n    Object.assign(model.value, data)\n\n    //Ensure rulesets present\n    if (isDynamic.value) {\n      if (model.value.rulesets.length === 0) {\n        const ruleset = createRuleset()\n        model.value.rulesets.push(ruleset)\n      }\n    }\n\n    //Clear rulesets for non-dynamic cohorts\n    else {\n      model.value.rulesets = []\n    }\n\n    //Clear existing learners\n    if (!isAddingExisting.value) {\n      model.value.learnerIds = []\n    }\n  }\n\n  //Cohort creation\n  const isCreatingCohort = ref(false)\n  const createCohort = async () => {\n\n    //Base data\n    const data = {\n      name: model.value.name,\n      isDynamic: isDynamic.value,\n      preferredTimezone: model.value.preferredTimezone,\n    }\n\n    //Append data depending on method\n    if (isDynamic.value) {\n      data.rulesets = model.value.rulesets\n    }\n    else if (isAddingExisting.value) {\n      data.learnerIds = model.value.learnerIds\n    }\n\n    //Toggle flag\n    isCreatingCohort.value = true\n\n    //Create\n    try {\n      cohort.value = await cohortsApi.create(data)\n      if (model.value.csvFile) {\n        setCsvFile(model.value.csvFile)\n      }\n      setFlashSuccess('Cohort created')\n      return cohort.value\n    }\n    catch (error) {\n      setFlashFailure('Failed to create cohort')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingCohort.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingCohort,\n    updateModel,\n    createCohort,\n  }\n}\n","import {useRouting} from '@/composables/use-routing.js'\nimport {ref, unref, isRef, computed, watch, nextTick} from 'vue'\n\n/**\n * Steps composable\n */\nexport function useSteps(initialSteps) {\n\n  //Routing\n  const {\n    route,\n    queryParams,\n    replaceRoute,\n    pushRoute,\n    withQuery,\n    checkRouteActive,\n  } = useRouting()\n\n  //Steps ref\n  const steps = ref([])\n\n  //Steps setter\n  const setSteps = newSteps => {\n    newSteps = unref(newSteps)\n    if (!Array.isArray(newSteps) || newSteps.length === 0) {\n      throw new Error(`Must provide at least one step`)\n    }\n    steps.value = newSteps\n  }\n\n  //Set initial steps\n  setSteps(initialSteps)\n\n  //Watch if needed\n  if (isRef(initialSteps)) {\n    watch(initialSteps, setSteps)\n  }\n\n  //Determine initial step index based on the current route\n  const initialIndex = steps.value\n    .findIndex(step => step.route?.allowEntry && step.route?.name === route.name)\n\n  //Active step refs\n  const activeStepIndex = ref(initialIndex !== -1 ? initialIndex : 0)\n  const activeStep = computed(() => steps.value[activeStepIndex.value])\n  const activeStepRoute = computed(() => activeStep.value?.route)\n  const hasActiveStepRoute = computed(() => activeStep.value?.route)\n  const isOnActiveStepRoute = computed(() => activeStep.value?.route && checkRouteActive(activeStep.value.route.name))\n\n  //Navigation guards\n  const numSteps = computed(() => steps.value.length)\n  const canGoToPrevStep = computed(() => activeStepIndex.value > 0)\n  const canGoToNextStep = computed(() => activeStepIndex.value < numSteps.value - 1)\n\n  //The step for the current route\n  const routeStep = computed(() => steps.value.find(step => step.route && step.route.name === route.name))\n\n  //Check if step is active\n  const checkStepActive = step => {\n    if (typeof step === 'string') {\n      return activeStep.value?.key === step\n    }\n    return activeStep.value?.key === step?.key\n  }\n\n  //Helper state for transitions, to know if we are going back\n  const isGoingBack = ref(false)\n  const clearGoingBack = () => isGoingBack.value = false\n  const setGoingBack = () => {\n    isGoingBack.value = true\n    setTimeout(clearGoingBack, 500) //At least the transition duration\n  }\n\n  //Navigation\n  const goToStep = step => {\n    if (!step) {\n      throw new Error(`No step provided`)\n    }\n    if (typeof step === 'object') {\n      step = step.key\n    }\n    const stepIndex = steps.value.findIndex(s => s.key === step)\n    if (stepIndex !== -1) {\n      if (stepIndex < activeStepIndex.value) {\n        setGoingBack()\n      }\n      activeStepIndex.value = stepIndex\n    }\n  }\n  const goToFirstStep = () => {\n    if (activeStepIndex.value !== 0) {\n      setGoingBack()\n      activeStepIndex.value = 0\n    }\n  }\n  const goToLastStep = () => {\n    if (activeStepIndex.value !== numSteps.value - 1) {\n      activeStepIndex.value = numSteps.value - 1\n    }\n  }\n  const goToNextStep = () => {\n    if (canGoToNextStep.value) {\n      clearGoingBack()\n      activeStepIndex.value++\n    }\n  }\n  const goToPrevStep = () => {\n    if (canGoToPrevStep.value) {\n      setGoingBack()\n      activeStepIndex.value--\n    }\n  }\n\n  //Watch for step changes to update the route\n  watch(activeStep, () => {\n    if (hasActiveStepRoute.value && !isOnActiveStepRoute.value) {\n      pushRoute(withQuery(activeStepRoute.value, queryParams.value))\n    }\n  })\n\n  //Watch for route changes to update the active step\n  watch(route, () => {\n    nextTick(() => {\n\n      //Already there or no matching step found?\n      if (isOnActiveStepRoute.value || !routeStep.value) {\n        return\n      }\n\n      //Go there if step isn't active\n      if (!checkStepActive(routeStep.value)) {\n        goToStep(routeStep.value)\n      }\n    })\n  })\n\n  //Initial step, replace route if needed\n  if (activeStep.value?.route && !checkRouteActive(activeStep.value.route.name)) {\n    replaceRoute(withQuery(activeStep.value.route, queryParams.value))\n  }\n\n  //Expose interface\n  return {\n    steps,\n    numSteps,\n    activeStep,\n    activeStepIndex,\n    canGoToPrevStep,\n    canGoToNextStep,\n    isGoingBack,\n    checkStepActive,\n    setSteps,\n    goToStep,\n    goToFirstStep,\n    goToLastStep,\n    goToNextStep,\n    goToPrevStep,\n  }\n}\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CohortCreateFlowDetailsStep from './CohortCreateFlowDetailsStep.vue'\nimport CohortCreateFlowLearnersStepCsv from './CohortCreateFlowLearnersStepCsv.vue'\nimport CohortCreateFlowLearnersStepExisting from './CohortCreateFlowLearnersStepExisting.vue'\nimport CohortCreateFlowLearnersStepDynamic from './CohortCreateFlowLearnersStepDynamic.vue'\nimport {\n  cohortCreateFlowSteps,\n  cohortLearnerSelectionMethods\n} from '@/constants/cohorts.js'\nimport {useCohortCreation} from '@/composables/use-cohort-creation.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {ref, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'created',\n])\n\n//Step management\nconst {\n  steps,\n  activeStep,\n  checkStepActive,\n  goToNextStep,\n  goToPrevStep,\n  canGoToNextStep,\n  canGoToPrevStep,\n  isGoingBack,\n} = useSteps([\n  {\n    key: cohortCreateFlowSteps.DETAILS,\n    label: 'Cohort details',\n    icon: 'description',\n  },\n  {\n    key: cohortCreateFlowSteps.LEARNERS,\n    label: 'Add learners',\n    icon: 'group_add',\n  },\n])\n\n//Learners step component depends on the selected method\nconst learnersStepComponent = computed(() => {\n  if (model.value.method == cohortLearnerSelectionMethods.DYNAMIC) {\n    return CohortCreateFlowLearnersStepDynamic\n  }\n  if (model.value.method == cohortLearnerSelectionMethods.EXISTING) {\n    return CohortCreateFlowLearnersStepExisting\n  }\n  if (model.value.method == cohortLearnerSelectionMethods.CSV) {\n    return CohortCreateFlowLearnersStepCsv\n  }\n  return null\n})\n\n//Cohort creation\nconst {\n  model,\n  isCreatingCohort,\n  updateModel,\n  createCohort,\n} = useCohortCreation()\n\n//Selected learners tracking array\nconst selectedLearners = ref([])\nconst updateSelectedLearners = learners => {\n  selectedLearners.value = learners\n  updateModel({learnerIds: learners.map(learner => learner.id)})\n}\n\n//Cancel and confirm\nconst cancel = () => emit('close')\nconst confirm = async () => {\n  try {\n    const cohort = await createCohort()\n    emit('created', {cohort})\n  }\n  catch {\n    //Handled by useCohortCreation\n  }\n}\n\n//Continue from details step\nconst continueFromDetailsStep = async () => {\n  if (model.value.skipLearners) {\n    return confirm()\n  }\n  goToNextStep()\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    :can-go-back=\"canGoToPrevStep\"\n    :can-go-forward=\"canGoToNextStep\"\n    @close=\"cancel()\"\n  >\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-going-back=\"isGoingBack\"\n      :scroll-page=\"false\"\n    >\n      <CohortCreateFlowDetailsStep\n        v-if=\"checkStepActive(cohortCreateFlowSteps.DETAILS)\"\n        :model=\"model\"\n        @update=\"updateModel($event.data)\"\n        @cancel=\"cancel()\"\n        @continue=\"continueFromDetailsStep()\"\n      />\n      <component\n        :is=\"learnersStepComponent\"\n        v-else-if=\"checkStepActive(cohortCreateFlowSteps.LEARNERS)\"\n        ref=\"learnersStep\"\n        :model=\"model\"\n        :selected-learners=\"selectedLearners\"\n        :is-creating-cohort=\"isCreatingCohort\"\n        @update-selected-learners=\"updateSelectedLearners($event.learners)\"\n        @update=\"updateModel($event.data)\"\n        @cancel=\"cancel()\"\n        @back=\"goToPrevStep()\"\n        @confirm=\"confirm()\"\n      />\n    </Flow>\n  </SidePanel>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {User} from '@/models/user.model.js'\n\n/**\n * Cohort creators API service\n */\nexport class CohortCreatorsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/cohort_creators'\n  itemsKey = 'creators'\n  ModelClass = User\n}\n\n//Export singleton instance\nexport const cohortCreatorsApi = new CohortCreatorsApi()\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {cohortCreatorsApi} from '@/api/cohort-creators.api.js'\nimport {onMounted, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Options\nconst isDynamicOptions = [\n  {label: 'Dynamic', value: true},\n  {label: 'Static', value: false},\n]\n\n//Creators handling\nconst creators = ref([])\nconst loadCreators = async () => {\n  const data = await cohortCreatorsApi.query()\n  creators.value = data.creators\n}\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n\n//Load creators\nonMounted(loadCreators)\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    test-id=\"cohortFiltersDropdown\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Type\">\n      <PillButtonList\n        :value=\"activeFilter.isDynamic\"\n        :options=\"isDynamicOptions\"\n        can-reset\n        @input=\"changeFilter('isDynamic', $event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"creators.length > 0\"\n      label=\"Created by\"\n    >\n      <SelectInput\n        :value=\"activeFilter.createdBy\"\n        :options=\"creators\"\n        label-prop=\"displayName\"\n        value-prop=\"id\"\n        is-clearable\n        test-id=\"cohortCreatorFilter\"\n        @input=\"changeFilter('createdBy', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Last activity\">\n      <DateInput\n        :value=\"activeFilter.updatedAt\"\n        is-range\n        @input=\"changeFilter('updatedAt', $event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","import {idOnly} from '@/helpers/object.js'\nimport {inflect} from '@/helpers/string.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, unref, computed} from 'vue'\n\n/**\n * Item removal composable\n */\nexport function useItemRemoval(options) {\n\n  //Flash messages composable\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const noun = ref(unref(options.noun) || 'item')\n  const successMessage = ref(unref(options.successMessage) || 'Deleted %%')\n  const failureMessage = ref(unref(options.failureMessage) || 'Failed to delete %%')\n  const itemsToRemove = ref([])\n  const idsToRemove = computed(() => itemsToRemove.value.map(idOnly))\n  const numItemsToRemove = computed(() => itemsToRemove.value.length)\n  const hasItemsToRemove = computed(() => numItemsToRemove.value > 0)\n  const isRemovingItems = ref(false)\n\n  //Set items to remove\n  const setItemsToRemove = items => {\n\n    //Unref items\n    items = unref(items)\n\n    //Not an array\n    if (items && !Array.isArray(items)) {\n      items = [items]\n    }\n\n    //No items\n    if (!Array.isArray(items) || items.length === 0) {\n      throw new Error(`No items provided`)\n    }\n\n    //Set\n    itemsToRemove.value = items\n  }\n\n  //Clear items to remove\n  const clearItemsToRemove = () => itemsToRemove.value = []\n\n  //Remove items\n  const removeItems = async () => {\n\n    //No items to remove\n    if (!hasItemsToRemove.value) {\n      throw new Error(`No items to remove`)\n    }\n\n    //Toggle flag\n    isRemovingItems.value = true\n\n    //Determine inflected noun\n    const inflected = inflect(noun.value, numItemsToRemove.value, numItemsToRemove.value > 1)\n\n    //Delete\n    try {\n      if (numItemsToRemove.value === 1 && typeof options.removeById === 'function') {\n        await options.removeById(idsToRemove.value[0])\n      }\n      else if (typeof options.removeManyById === 'function') {\n        await options.removeManyById(idsToRemove.value)\n      }\n      else {\n        throw new Error(`Must provide a removeById and/or removeManyById handler function`)\n      }\n      setFlashSuccess(successMessage.value.replace(/%%/, inflected))\n      clearItemsToRemove()\n    }\n    catch (error) {\n      setFlashFailure(failureMessage.value.replace(/%%/, inflected))\n      processError(error)\n      throw error\n    }\n    finally {\n      isRemovingItems.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    itemsToRemove,\n    numItemsToRemove,\n    hasItemsToRemove,\n    isRemovingItems,\n    setItemsToRemove,\n    clearItemsToRemove,\n    removeItems,\n  }\n}\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\n\n/**\n * Cohort removal wrapper composable\n */\nexport function useCohortRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: cohortsToRemove,\n    numItemsToRemove: numCohortsToRemove,\n    hasItemsToRemove: hasCohortsToRemove,\n    isRemovingItems: isRemovingCohorts,\n    setItemsToRemove: setCohortsToRemove,\n    clearItemsToRemove: clearCohortsToRemove,\n    removeItems: removeCohorts,\n  } = useItemRemoval({\n    noun: 'cohort',\n    removeById: id => cohortsApi.removeById(id),\n    removeManyById: ids => cohortsApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    cohortsToRemove,\n    numCohortsToRemove,\n    hasCohortsToRemove,\n    isRemovingCohorts,\n    setCohortsToRemove,\n    clearCohortsToRemove,\n    removeCohorts,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport ConfirmCohortRemovalModal from '@/components/cohorts/ConfirmCohortRemovalModal.vue'\nimport CohortCreateFlow from '@/components/cohorts/CohortCreateFlow.vue'\nimport CohortActionsMenu from '@/components/cohorts/CohortActionsMenu.vue'\nimport CohortsFilter from '@/components/cohorts/CohortsFilter.vue'\nimport CohortIcon from '@/components/cohorts/CohortIcon.vue'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useCohortRemoval} from '@/composables/use-cohort-removal.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {onMounted, ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Cohorts')\n\n//Querying\nconst {\n  items: cohorts,\n  total: totalCohorts,\n  queryItems: queryCohorts,\n  loadItems: loadCohorts,\n  loadItemsForPage: loadCohortsForPage,\n  reloadItems: reloadCohorts,\n  isLoadingItems: isLoadingCohorts,\n  sort,\n  filter,\n  numActiveFilters,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => cohortsApi.query(...args),\n  filter: {\n    isDynamic: null,\n    createdBy: null,\n    updatedAt: null,\n  },\n  sort: '-updatedAt',\n  key: 'cohortsOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryCohorts({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Item selection\nconst selectedCohorts = ref([])\nconst {\n  toggleAllItems: toggleAllCohorts,\n  toggleItem: toggleCohort,\n  numSelectedItems: numSelectedCohorts,\n  hasSelectedItems: hasSelectedCohorts,\n  unselectAllItems: unselectAllCohorts,\n} = useItemSelection(cohorts, selectedCohorts)\n\n//Cohort creation\nconst isShowingCreateFlow = ref(false)\nconst showCreateFlow = () => isShowingCreateFlow.value = true\nconst hideCreateFlow = () => isShowingCreateFlow.value = false\nconst confirmCohortCreation = cohort => {\n  hideCreateFlow()\n  goToManageCohort(cohort.id)\n}\n\n//Cohort removal\nconst {\n  cohortsToRemove,\n  hasCohortsToRemove,\n  isRemovingCohorts,\n  setCohortsToRemove,\n  clearCohortsToRemove,\n  removeCohorts,\n} = useCohortRemoval()\n\n//Cohort removal handling\nconst cancelCohortRemoval = () => {\n  clearCohortsToRemove()\n}\nconst confirmCohortRemoval = async () => {\n  try {\n    await removeCohorts()\n    reloadCohorts()\n    unselectAllCohorts()\n    cancelCohortRemoval()\n  }\n  catch {\n    //Handled by useCohortRemoval\n  }\n}\n\n//Navigation\nconst {goToManageCohort, goToAnalyzeCohort} = useNavigation()\n\n//Load cohorts\nonMounted(loadCohorts)\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"goToManageCohort($event.result.id)\"\n        />\n      </template>\n      <template #filters>\n        <CohortsFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"resetFilter()\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton @click=\"showCreateFlow()\" />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalCohorts\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"cohort\"\n              :count=\"totalCohorts\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"cohorts\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalCohorts\"\n        :selected-items=\"selectedCohorts\"\n        :is-loading=\"isLoadingCohorts\"\n        can-select-items\n        @load-page=\"loadCohortsForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n        @toggle-item=\"toggleCohort($event.item)\"\n        @toggle-all-items=\"toggleAllCohorts()\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.name\"\n            is-sortable\n            sort-prop=\"name\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.numLearners\"\n            is-sortable\n            sort-prop=\"numLearners\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            # of learners\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.numSchedules\"\n            is-sortable\n            sort-prop=\"numSchedules\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            # of schedules\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.createdBy\"\n          >\n            Creator\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.lastEdited\"\n            is-sortable\n            sort-prop=\"updatedAt\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Last edited\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: cohort}\">\n          <TableCell\n            :class=\"$style.name\"\n            is-clickable\n            @click=\"goToManageCohort(cohort.id)\"\n          >\n            <!-- <StatusDot\n              :status=\"cohort.status\"\n              size=\"s\"\n            /> -->\n            <strong>{{ cohort.name }}</strong>\n            <template #icons>\n              <CohortIcon :cohort=\"cohort\" />\n            </template>\n          </TableCell>\n          <TableCell :class=\"$style.numLearners\">\n            {{ cohort.numLearners }}\n          </TableCell>\n          <TableCell :class=\"$style.numSchedules\">\n            {{ cohort.numSchedules }}\n          </TableCell>\n          <TableCell :class=\"$style.createdBy\">\n            <UserName :user=\"cohort.createdBy\" />\n          </TableCell>\n          <TableCell :class=\"$style.lastEdited\">\n            <DateTime\n              :date=\"cohort.updatedAt\"\n              :format=\"dateFormats.DATE_AND_TIME\"\n            />\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: cohort, index}\">\n          <CohortActionsMenu\n            :test-id=\"`cohortActionsMenu${index + 1}`\"\n            @manage=\"goToManageCohort(cohort.id)\"\n            @analyze=\"goToAnalyzeCohort(cohort.id)\"\n            @remove=\"setCohortsToRemove(cohort)\"\n          />\n        </template>\n\n        <template #bulkActions>\n          <BulkActionsBar\n            v-if=\"hasSelectedCohorts\"\n            item-type=\"cohort\"\n            :num-selected=\"numSelectedCohorts\"\n            @clear-selection=\"unselectAllCohorts()\"\n          >\n            <BulkAction\n              label=\"Delete\"\n              icon=\"delete\"\n              is-icon-outlined\n              @click=\"setCohortsToRemove(selectedCohorts)\"\n            />\n          </BulkActionsBar>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <template #sidePanels>\n      <CohortCreateFlow\n        v-if=\"isShowingCreateFlow\"\n        @close=\"hideCreateFlow()\"\n        @created=\"confirmCohortCreation($event.cohort)\"\n      />\n    </template>\n\n    <ConfirmCohortRemovalModal\n      :cohorts=\"cohortsToRemove\"\n      :is-open=\"hasCohortsToRemove\"\n      :is-removing=\"isRemovingCohorts\"\n      @close=\"cancelCohortRemoval()\"\n      @confirm=\"confirmCohortRemoval()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 3;\n}\n.numLearners, .numSchedules {\n  flex: 0 0 10rem;\n}\n.createdBy {\n  flex: 1\n}\n.lastEdited {\n  flex: 1;\n  min-width: 12rem;\n}\n</style>\n","<script setup>\nimport {useTimezones} from '@/composables/use-timezones.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {computed, toRefs, onMounted} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  timezone: {\n    type: String,\n    default: null,\n  },\n  emptyLabel: {\n    type: String,\n    default: '',\n  },\n  asIana: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Timezones and error handling\nconst {timezones, loadTimezones, hasLoadedTimezones} = useTimezones()\nconst {captureMessage} = useErrorHandling()\n\n//Refs\nconst {timezone, asIana} = toRefs(props)\nconst isEmpty = computed(() => timezone.value === null || timezone.value === undefined || timezone.value === '')\nconst timezoneLabel = computed(() => {\n  if (!hasLoadedTimezones.value) {\n    return 'Loading...'\n  }\n  if (!timezone.value) {\n    return ''\n  }\n  const tz = timezones.value.find(tz =>\n    tz.value?.toLowerCase() === timezone.value.toLowerCase() ||\n    tz.label?.toLowerCase() === timezone.value.toLowerCase() ||\n    tz.ianaZone?.toLowerCase() === timezone.value.toLowerCase()\n  )\n  if (!tz) {\n    captureMessage(`Unrecognised timezone: ${timezone.value}`)\n    return timezone.value\n  }\n  return asIana.value ? tz.ianaZone : tz.label\n})\n\n//Load timezones on mount if needed\nonMounted(loadTimezones)\n</script>\n\n<template>\n  <span v-bind=\"$attrs\">{{ isEmpty ? emptyLabel : timezoneLabel }}</span>\n</template>\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport CohortRulesManagement from './CohortRulesManagement.vue'\nimport {useCohortRuleManagement} from '@/composables/use-cohort-rule-management.js'\nimport {copyValue} from '@/helpers/object.js'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'confirm',\n])\nconst props = defineProps({\n  cohort: {\n    type: Object,\n    required: true,\n  },\n  isUpdating: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {cohort} = toRefs(props)\n\n//Model\nconst model = ref({rulesets: copyValue(cohort.value.rulesets)})\nconst updateRulesets = rulesets => model.value.rulesets = rulesets\n\n//Rule validation\nconst {\n  validateRulesets,\n} = useCohortRuleManagement()\n\n//Reset or cancel editing\nconst cancel = () => emit('cancel')\nconst confirm = async () => {\n\n  //TODO: Will need to implement form validation to surface any issues to the user\n  if (!validateRulesets(model.value.rulesets)) {\n    return\n  }\n\n  //Confirm\n  emit('confirm', model.value)\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    @close=\"cancel()\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Rules\"\n        icon=\"bolt\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n\n    <PageBlock header=\"Edit dynamic cohort rules\">\n      <CohortRulesManagement\n        :rulesets=\"model.rulesets\"\n        @update=\"updateRulesets($event.rulesets)\"\n      />\n    </PageBlock>\n\n    <CancelConfirmBar\n      :has-spinner-confirm=\"isUpdating\"\n      @cancel=\"cancel()\"\n      @confirm=\"confirm()\"\n    />\n  </SidePanel>\n</template>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport CSVPreview from '@/components/shared/csv/CSVPreview.vue'\nimport {integrationAddressTypes} from '@/constants/address-types.js'\nimport {userHeaderRegex} from '@/constants/user.js'\nimport {toRefs, ref, computed, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update-has-header',\n  'update-csv-file',\n  'continue',\n  'cancel',\n  'back',\n])\nconst props = defineProps({\n  hasHeader: {\n    type: Boolean,\n    default: false,\n  },\n  previewRows: {\n    type: Array,\n    required: true,\n  },\n  previewColumns: {\n    type: Array,\n    required: true,\n  },\n  previewError: {\n    type: Error,\n    default: null,\n  },\n  isLoadingPreview: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {previewRows, hasHeader} = toRefs(props)\n\n//Update header flag\nconst setHasHeader = hasHeader => emit('update-has-header', {hasHeader})\n\n//Check if we think the first row has a header\n//NOTE: only do this once or we get stuck in an infinite loop\nconst hasCheckedRows = ref(false)\nwatch(previewRows, () => {\n  if (previewRows.value.length > 0 && !hasCheckedRows.value) {\n    const header = previewRows.value[0].join(',')\n    setHasHeader(!!userHeaderRegex.test(header))\n    hasCheckedRows.value = true\n  }\n}, {immediate: true})\n\n//Check if we should show Slack/Teams warning\nconst showIntegrationWarning = computed(() => {\n  return previewRows.value\n    .some(row => row\n      .some(value => integrationAddressTypes.includes(value)))\n})\n\n//Back handler\nconst clearFileAndGoBack = () => {\n  emit('update-csv-file', {csvFile: null})\n  emit('back')\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock\n      header=\"Preview your data\"\n      subheader=\"Please ensure your data looks in order or go back and select another file\"\n    >\n      <Spinner v-if=\"isLoadingPreview\" />\n      <Alert\n        v-if=\"previewError\"\n        type=\"warning\"\n      >\n        We had some trouble parsing your CSV file. Please double check the file and <a\n          is-clickable\n          @click=\"clearFileAndGoBack()\"\n        >try again</a>.\n      </Alert>\n      <Alert\n        v-else-if=\"!isLoadingPreview && previewRows.length === 0\"\n        type=\"warning\"\n      >\n        Your file does not seem to contain any data. Please double check the file and <a\n          is-clickable\n          @click=\"clearFileAndGoBack()\"\n        >try again</a>.\n      </Alert>\n      <Alert\n        v-if=\"showIntegrationWarning\"\n        type=\"warning\"\n      >\n        <strong>Important:</strong> To send learning via Slack or Teams, user addresses must be created through our integrations. Attempt to manually upload Slack or Teams addresses will be flagged as errors and cannot be processed.\n      </Alert>\n\n      <template v-if=\"previewRows.length > 0\">\n        <FormField>\n          <Toggle\n            label=\"First row contains column names\"\n            :is-checked=\"hasHeader\"\n            @click=\"setHasHeader(!hasHeader)\"\n          />\n        </FormField>\n\n        <CSVPreview\n          :preview-rows=\"previewRows\"\n          :preview-columns=\"previewColumns\"\n        />\n      </template>\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        :can-go-back=\"true\"\n        label-confirm=\"Continue\"\n        @confirm=\"$emit('continue')\"\n        @cancel=\"$emit('cancel')\"\n        @back=\"clearFileAndGoBack()\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'create',\n  'input',\n])\ndefineProps({\n  value: {\n    type: String,\n    default: '',\n  },\n  suggestedOption: {\n    type: Object,\n    default: null,\n  },\n  canCreateNewField: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Select input ref to allow us to blur it\nconst selectInput = ref(null)\nconst setValue = value => {\n  emit('input', {value})\n  selectInput.value.closeDropdown()\n}\n</script>\n\n<template>\n  <SelectInput\n    ref=\"selectInput\"\n    v-bind=\"$attrs\"\n    :value=\"value\"\n    @input=\"setValue($event.value)\"\n  >\n    <template #listHeader>\n      <div\n        v-if=\"suggestedOption\"\n        :class=\"$style.listLabel\"\n      >\n        Suggested field\n      </div>\n      <div\n        v-if=\"suggestedOption\"\n        :class=\"{\n          [$style.listOption]: true,\n          [$style.selected]: suggestedOption.value === value,\n        }\"\n        is-clickable\n        @click=\"setValue(suggestedOption.value)\"\n      >\n        {{ suggestedOption.label }}\n      </div>\n      <div :class=\"$style.listLabel\">\n        Matched fields\n      </div>\n    </template>\n\n    <template\n      v-if=\"canCreateNewField\"\n      #listFooter\n    >\n      <div :class=\"$style.listLabel\">\n        Create field\n      </div>\n      <div\n        :class=\"$style.listOption\"\n        is-clickable\n        @click=\"$emit('create')\"\n      >\n        Create a new field\n      </div>\n    </template>\n  </SelectInput>\n</template>\n\n<style module lang=\"scss\">\n.listLabel {\n  padding: 0.5rem 1rem;\n  padding-bottom: 0.25rem;\n  font-size: var(--font-size-s);\n  color: var(--color-text-muted);\n}\n.listOption {\n  padding: 0.5rem 1rem;\n  &:hover, &.selected {\n    background: var(--bg-highlight);\n    color: var(--color-text-primary);\n  }\n}\n</style>\n","<script setup>\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  values: {\n    type: Array,\n    required: true,\n  },\n  limit: {\n    type: Number,\n    default: 10,\n  },\n})\n\n//Filter out empty values and limit\nconst {values, limit} = toRefs(props)\nconst filteredValues = computed(() => values.value.filter(Boolean).slice(0, limit.value))\n</script>\n\n<template>\n  <FlexColumn :class=\"$style.container\">\n    <div\n      v-for=\"(value, index) in filteredValues\"\n      :key=\"index\"\n      :class=\"$style.row\"\n    >\n      <div :class=\"$style.number\">\n        {{ index + 1 }}\n      </div>\n      <div :class=\"$style.value\">\n        {{ value }}\n      </div>\n    </div>\n  </FlexColumn>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  gap: 0.5rem;\n  margin-top: 1rem;\n}\n.row {\n  display: flex;\n  &:not(:last-child) {\n    padding-bottom: 0.5rem;\n    border-bottom: 1px solid var(--color-borders);\n  }\n}\n.number{\n  flex: 0 0 50px;\n}\n.value {\n  flex: 1;\n}\n</style>\n","<script setup>\nimport CSVColumnMapperRow from '@/components/shared/csv/CSVColumnMapperRow.vue'\nimport CSVSampleDataPreview from '@/components/shared/csv/CSVSampleDataPreview.vue'\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport {ref, toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'update',\n  'create',\n])\nconst props = defineProps({\n  rows: {\n    type: Array,\n    required: true,\n  },\n  columns: {\n    type: Array,\n    required: true,\n  },\n  fieldOptions: {\n    type: Array,\n    default: () => [],\n  },\n  mappedOptions: {\n    type: Array,\n    default: () => [],\n  },\n  suggestedOptions: {\n    type: Array,\n    default: () => [],\n  },\n  requiredColumns: {\n    type: Array,\n    default: () => [],\n  },\n  headerRegex: {\n    type: RegExp,\n    default: null,\n  },\n})\n\n//Preview data\nconst {rows, columns} = toRefs(props)\nconst previewColumn = ref(null)\nconst previewValues = ref([])\n\n//Show preview\nconst showPreview = index => {\n  previewValues.value = rows.value.map(row => row[index])\n  previewColumn.value = columns.value[index]\n}\n\n//Hide preview\nconst hidePreview = () => {\n  previewValues.value = []\n  previewColumn.value = null\n}\n</script>\n\n<template>\n  <div>\n    <CSVColumnMapperRow\n      v-for=\"(column, index) in columns\"\n      :key=\"index\"\n      :column=\"column\"\n      :mapped-option=\"mappedOptions[index]\"\n      :suggested-option=\"suggestedOptions[index]\"\n      :field-options=\"fieldOptions\"\n      @update=\"$emit('update', {index, ...$event})\"\n      @remove=\"$emit('update', {index, value: null})\"\n      @create=\"$emit('create', {index})\"\n      @preview=\"showPreview(index)\"\n    />\n\n    <Modal\n      :header=\"`Data preview for ${previewColumn}`\"\n      :is-open=\"!!previewColumn\"\n      close-on-key\n      close-on-click-outside\n      @close=\"hidePreview()\"\n    >\n      <CSVSampleDataPreview\n        :values=\"previewValues\"\n        :column=\"previewColumn\"\n      />\n    </Modal>\n  </div>\n</template>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Join from '@/components/shared/transform/Join.vue'\nimport CSVColumnMapper from '@/components/shared/csv/CSVColumnMapper.vue'\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'create-metadata-field',\n  'update-mapped-option',\n  'continue',\n  'cancel',\n  'back',\n])\nconst props = defineProps({\n  hasHeader: {\n    type: Boolean,\n    default: false,\n  },\n  rows: {\n    type: Array,\n    required: true,\n  },\n  mappedOptions: {\n    type: Array,\n    default: () => [],\n  },\n  suggestedOptions: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Refs\nconst {hasHeader, rows, mappedOptions, suggestedOptions} = toRefs(props)\nconst hasSuggestions = computed(() => suggestedOptions.value.some(Boolean))\nconst useSuggested = ref(false)\nconst usePrevious = ref(false)\n\n//Check if we have previous settings\nconst {getFromLocalStorage} = useLocalStorage()\nconst previousMappings = getFromLocalStorage('csvLearnerMappings')\nconst hasPreviousMappings = ref(!!previousMappings)\n\n//Toggle suggested fields\nconst toggleUseSuggested = use => {\n  usePrevious.value = false\n  useSuggested.value = use\n  suggestedOptions.value.forEach((option, index) => {\n    const value = (use && option) ? option.value : null\n    emit('update-mapped-option', {index, value})\n  })\n}\n\n//Toggle previous settings\nconst toggleUsePrevious = use => {\n  useSuggested.value = false\n  usePrevious.value = use\n  previousMappings.forEach((value, index) => {\n    emit('update-mapped-option', {index, value})\n  })\n}\n\n//Set to true if we have a header\nif (hasHeader.value) {\n  toggleUseSuggested(true)\n}\n\n//Validation refs\nconst {isEmailRequiredInCsv} = useCurrentOrganization()\nconst requiredColumns = computed(() => {\n  const required = ['address_type', 'address_value']\n  if (isEmailRequiredInCsv.value) {\n    required.push('email')\n  }\n  return required\n})\nconst isMissingAddressTypeMapping = computed(() => !mappedOptions.value.some(option => option?.value === 'address_type'))\nconst isMissingAddressValueMapping = computed(() => !mappedOptions.value.some(option => option?.value === 'address_value'))\nconst isMissingEmailMapping = computed(() => isEmailRequiredInCsv.value && !mappedOptions.value.some(option => option?.value === 'email'))\nconst missingMappings = computed(() => {\n  const missing = []\n  if (isMissingAddressTypeMapping.value) {\n    missing.push('address type')\n  }\n  if (isMissingAddressValueMapping.value) {\n    missing.push('address value')\n  }\n  if (isMissingEmailMapping.value) {\n    missing.push('email')\n  }\n  return missing\n})\nconst hasMappingErrors = computed(() => missingMappings.value.length > 0)\nconst showMappingErrors = ref(false)\n\n//Validate and continue\nconst validateAndContinue = () => {\n\n  //Show errors\n  if (hasMappingErrors.value) {\n    showMappingErrors.value = true\n    return\n  }\n\n  //Only continue if we don't have any mapping errors\n  emit('continue')\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock\n      header=\"Map columns\"\n      subheader=\"Map the columns from your file against your learner fields\"\n    >\n      <FormField\n        v-if=\"hasSuggestions || hasPreviousMappings\"\n        is-list\n      >\n        <Toggle\n          v-if=\"hasSuggestions\"\n          label=\"Use suggested fields\"\n          :is-checked=\"useSuggested\"\n          @click=\"toggleUseSuggested(!useSuggested)\"\n        />\n        <Toggle\n          v-if=\"hasPreviousMappings\"\n          label=\"Use settings from previous import\"\n          :is-checked=\"usePrevious\"\n          @click=\"toggleUsePrevious(!usePrevious)\"\n        />\n      </FormField>\n\n      <CSVColumnMapper\n        v-bind=\"$attrs\"\n        :rows=\"rows\"\n        :mapped-options=\"mappedOptions\"\n        :suggested-options=\"suggestedOptions\"\n        :required-columns=\"requiredColumns\"\n        @update=\"$emit('update-mapped-option', $event)\"\n        @create=\"$emit('create-metadata-field', $event)\"\n      />\n\n      <Alert\n        v-if=\"showMappingErrors && hasMappingErrors\"\n        type=\"danger\"\n      >\n        The\n        <Join :array=\"missingMappings\" />\n        <span v-if=\"missingMappings.length > 1\"> columns are</span>\n        <span v-else> column is</span>\n        required and must be mapped.\n      </Alert>\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        :can-go-back=\"true\"\n        label-confirm=\"Continue\"\n        @confirm=\"validateAndContinue()\"\n        @cancel=\"$emit('cancel')\"\n        @back=\"$emit('back')\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","<script setup>\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  errors: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Sorts the errors by row number\nconst {errors} = toRefs(props)\nconst sortedErrors = computed(() => errors.value\n  .map(e => e)\n  .sort((a, b) => a.rowNo - b.rowNo))\n</script>\n\n<template>\n  <FlexColumn with-small-gap>\n    <div\n      v-for=\"(error, i) in sortedErrors\"\n      :key=\"i\"\n      :class=\"{\n        [$style.wrapper]: true,\n        [$style.divider]: error.rowNo !== errors[i - 1]?.rowNo\n      }\"\n    >\n      <div :class=\"$style.rowNo\">\n        <span v-if=\"error.rowNo !== errors[i - 1]?.rowNo\">Row {{ error.rowNo }}</span>\n      </div>\n      <div :class=\"$style.error\">\n        {{ error.error }}\n      </div>\n    </div>\n  </FlexColumn>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  display: flex;\n  flex-direction: row;\n  &.divider:not(:first-child) {\n    padding-top: 0.5rem;\n    border-top: 1px solid var(--color-borders);\n  }\n}\n.rowNo {\n  flex: 0 0 7rem;\n}\n.error {\n  flex: 1;\n}\n</style>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Bulk upload error model\n */\nexport class BulkUploadError extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {BulkUploadError} from '@/models/bulk-upload-error.model.js'\n\n/**\n * Bulk upload errors API service\n */\nexport class BulkUploadErrorsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/bulk_upload_errors'\n  itemsKey = 'bulkUploadErrors'\n  ModelClass = BulkUploadError\n\n  /**\n   * Summary\n   */\n  summary(params) {\n    return this.get('/summary', params)\n  }\n}\n\n//Export singleton instance\nexport const bulkUploadErrorsApi = new BulkUploadErrorsApi()\n","<script setup>\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Pagination from '@/components/shared/table/Pagination.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CSVImportErrorsList from '@/components/shared/csv/CSVImportErrorsList.vue'\nimport CSVImportErrorsSummary from '@/components/shared/csv/CSVImportErrorsSummary.vue'\nimport {Cohort} from '@/models/cohort.model.js'\nimport {bulkUploadErrorsApi} from '@/api/bulk-upload-errors.api.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {toRefs, ref, watch, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'total-errors',\n  'close',\n])\nconst props = defineProps({\n  cohort: {\n    type: Cohort,\n    required: true,\n  },\n  showIntro: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Get refs\nconst {cohort} = toRefs(props)\n\n//Bulk upload errors querying\nconst {\n  items: errors,\n  loadItems: loadErrors,\n  loadItemsForPage: loadPage,\n  isLoadingItems: isLoadingErrors,\n  itemsPerPage,\n  currentPage,\n} = useQuerying({\n  handler: (...args) => bulkUploadErrorsApi.query(...args),\n  key: 'cohortBulkUploadErrors',\n  defaultItemsPerPage: 100,\n  filter: {\n    cohortId: cohort.value.id,\n  },\n})\n\n//Load summary\nconst isLoadingSummary = ref(true)\nconst summary = ref([])\nconst total = ref(0)\nconst loadSummary = async () => {\n  isLoadingSummary.value = true\n  try {\n    const data = await bulkUploadErrorsApi.summary({cohortId: cohort.value.id})\n    summary.value = data.summary\n    total.value = data.meta.total\n  }\n  finally {\n    isLoadingSummary.value = false\n  }\n}\n\n//Load when mounted\nonMounted(loadSummary)\n\n//Watch total for changes and emit up\nwatch(total, total => emit('total-errors', {total}))\n</script>\n\n<template>\n  <Spinner\n    v-if=\"isLoadingSummary\"\n    is-block\n  />\n  <div\n    v-else\n    :class=\"$style.wrapper\"\n  >\n    <p v-if=\"showIntro\">\n      <Inflect\n        text=\"error\"\n        :count=\"total\"\n        include-count\n      />\n      encountered during the last learners import into this cohort:\n    </p>\n    <template v-if=\"!errors.length\">\n      <CSVImportErrorsSummary :summary=\"summary\" />\n      <br>\n      <ActionButton\n        type=\"link\"\n        label=\"Show list of all individual errors\"\n        @click=\"loadErrors()\"\n      />\n    </template>\n    <template v-else>\n      <CSVImportErrorsList :errors=\"errors\" />\n      <Pagination\n        :current-page=\"currentPage\"\n        :items-per-page=\"itemsPerPage\"\n        :total-items=\"total\"\n        :is-loading=\"isLoadingErrors\"\n        @view-page=\"loadPage($event.page)\"\n      />\n    </template>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  margin-top: 2rem;\n}\n</style>\n","\n//Test image upload key\nexport const testIds = {\n  imageUpload: '2e9d07ab-b49e-4dde-9c3f-384e0d910812',\n}\n","import {testIds} from '@/constants/test.js'\nimport {v4 as generateUuid} from 'uuid'\nimport {ref, unref} from 'vue'\n\n/**\n * Composable to expose UUID helper\n */\nexport function useUuid() {\n\n  //Generate a UUID if we just need a random new one\n  const uuid = ref(generateUuid())\n\n  //Get test ID helper\n  const getTestUuid = type => testIds[type]\n\n  //Check if a value is a UUID\n  const isUuid = value => {\n    value = unref(value)\n    return (\n      typeof value === 'string' &&\n      value.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i)\n    )\n  }\n\n  //Expose interface\n  return {\n    uuid,\n    isUuid,\n    generateUuid,\n    getTestUuid,\n  }\n}\n","\n//Characters that can be used for random string generation\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n\n/**\n * Random integer\n */\nexport function randomInt(min, max) {\n  return Math.floor(Math.random() * (max - min + 1) + min)\n}\n\n/**\n * Random float\n*/\nexport function randomFloat(min, max, precision = 2) {\n  return parseFloat((Math.random() * (max - min) + min).toFixed(precision))\n}\n\n/**\n * Random boolean\n */\nexport function randomBool() {\n  return Math.floor(Math.random() * 2) === 1\n}\n\n/**\n * Random string\n */\nexport function randomString(length, chars = CHARS) {\n  let str = ''\n  for (let i = 0; i < length; i++) {\n    str += chars.charAt(Math.floor(Math.random() * chars.length))\n  }\n  return str\n}\n\n/**\n * Pick random item from array\n */\nexport function pickRandom(array) {\n\n  //No items\n  if (array.length === 0) {\n    return null\n  }\n\n  //Pick a random item\n  const i = Math.floor(Math.random() * array.length)\n  return array[i]\n}\n","import {randomFloat, randomInt} from '@/helpers/random.js'\nimport {ref, computed, watch, watchEffect, isReactive} from 'vue'\n\n/**\n * Fake progress composable\n */\nexport function useFakeProgress(options = {}) {\n\n  //Settings\n  const min = ref(0)\n  const max = ref(1)\n  const frequency = ref(1000)\n  const frequencyJitter = ref(0.2)\n  const targetDuration = ref(5000)\n  const incrementJitter = ref(0.2)\n  const autoStart = ref(false)\n\n  //Helper to extract options values\n  const extractOptions = options => {\n    if (typeof options.min !== 'undefined') {\n      min.value = options.min\n    }\n    if (typeof options.max !== 'undefined') {\n      max.value = options.max\n    }\n    if (typeof options.frequency !== 'undefined') {\n      frequency.value = options.frequency\n    }\n    if (typeof options.frequencyJitter !== 'undefined') {\n      frequencyJitter.value = options.frequencyJitter\n    }\n    if (typeof options.targetDuration !== 'undefined' && !isNaN(options.targetDuration)) {\n      targetDuration.value = options.targetDuration\n    }\n    if (typeof options.incrementJitter !== 'undefined') {\n      incrementJitter.value = options.incrementJitter\n    }\n    if (typeof options.autoStart !== 'undefined') {\n      autoStart.value = options.autoStart\n    }\n  }\n\n  //Watch options for changes\n  if (options) {\n    if (isReactive(options)) {\n      watch(options, () => extractOptions(options), {immediate: true})\n    }\n    else {\n      extractOptions(options)\n    }\n  }\n\n  //Update target duration manually\n  const setTargetDuration = value => targetDuration.value = value\n\n  //Number of increments\n  const numIncrements = computed(() => targetDuration.value / frequency.value)\n  const targetIncrement = computed(() => (max.value - min.value) / numIncrements.value)\n\n  //Refs\n  const progress = ref(min.value || 0)\n  const timeout = ref(null)\n\n  //Watch minimum value\n  watchEffect(() => {\n    if (progress.value < min.value) {\n      setProgress(min.value)\n    }\n  })\n\n  //Increment the progress within the specified parameters\n  const incrementProgress = () => {\n    if (progress.value >= max.value || progress.value === 1) {\n      return\n    }\n    const increment = getIncrement()\n    progress.value = Math.min(progress.value + increment, max.value)\n  }\n\n  //Get increment\n  const getIncrement = () => {\n    return randomFloat(\n      targetIncrement.value * (1 - incrementJitter.value),\n      targetIncrement.value * (1 + incrementJitter.value),\n      5\n    )\n  }\n\n  //Get tick timeout\n  const getTickTimeout = () => {\n    return randomInt(\n      frequency.value * (1 - frequencyJitter.value),\n      frequency.value * (1 + frequencyJitter.value)\n    )\n  }\n\n  //Tick\n  const tick = () => {\n    if (progress.value >= max.value) {\n      return\n    }\n    const delay = getTickTimeout()\n    timeout.value = setTimeout(() => {\n      incrementProgress()\n      tick()\n    }, delay)\n  }\n\n  //Cancel next tick\n  const cancelTick = () => clearTimeout(timeout.value)\n\n  //Progress manipulation\n  const startProgress = () => tick()\n  const stopProgress = () => cancelTick()\n  const setProgress = (value, onlyIfHigher = true) => {\n    if (onlyIfHigher && value < progress.value) {\n      return\n    }\n    cancelTick()\n    progress.value = value\n    if (value < max.value) {\n      tick()\n    }\n  }\n  const resetProgress = () => setProgress(min.value, false)\n\n  //Auto start\n  if (autoStart.value) {\n    startProgress()\n  }\n\n  //Expose interface\n  return {\n    progress,\n    startProgress,\n    stopProgress,\n    setProgress,\n    resetProgress,\n    setTargetDuration,\n  }\n}\n","import {fieldSources} from '@/constants/fields.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {useUuid} from '@/composables/use-uuid.js'\nimport {useFakeProgress} from '@/composables/use-fake-progress.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed} from 'vue'\n\n/**\n * Cohort CSV processing composable\n */\nexport function useCohortCsvProcessing(cohort, hasHeader, mappedOptions) {\n\n  //Get a random UUID to identify and group upload chunks with\n  const {uuid: identifier} = useUuid()\n  const {processError} = useErrorHandling()\n\n  //Track whether we've stripped the header row off already\n  const hasStrippedOffHeader = ref(false)\n\n  //Track errors and rows processed\n  const numRowsProcessed = ref(0)\n  const numRowsSucceeded = ref(0)\n\n  //Processing status refs\n  const hasErrors = ref(false)\n  const isProcessingComplete = ref(false)\n  const isProcessingChunk = ref(false)\n  const isProcessing = ref(false)\n  const pollingInterval = ref(null)\n\n  //Map the mapped field options onto fields for the backend\n  //Any unmapped fields are filtered out\n  const mappedFields = computed(() => mappedOptions.value\n    .map(option => {\n      if (option?.source === fieldSources.USER) {\n        return {userField: option.value, metadataFieldId: null}\n      }\n      else if (option?.source === fieldSources.METADATA) {\n        return {userField: null, metadataFieldId: option.value}\n      }\n      return null\n    })\n    .filter(field => field !== null)\n  )\n\n  //Process chunk\n  const processChunk = async (chunk, isDryRun = false) => {\n\n    //Mark as processing\n    isProcessingChunk.value = true\n\n    //Strip off header row\n    if (hasHeader.value && !hasStrippedOffHeader.value) {\n      hasStrippedOffHeader.value = true\n      chunk.shift()\n    }\n\n    //Prepare data\n    const rowIncrement = hasHeader.value ? 1 : 0\n    const fields = mappedFields.value\n\n    //Map chunk onto valid rows\n    const rows = chunk\n      .map(data => {\n\n        //Only include mapped fields in data\n        data = data.filter((value, i) => mappedOptions.value[i])\n\n        //Increment rows processed\n        numRowsProcessed.value++\n\n        //Determine row number\n        const no = numRowsProcessed.value + rowIncrement\n        return {no, data}\n      })\n      .filter(row => row !== null)\n\n    //Wrap in try block\n    try {\n\n      //NOTE: Rails had a really hard time parsing the params once they were\n      //fed to the delayed Sidekiq job. So as a workaround we'll just send as\n      //a string and parse as JSON on the server.\n      await cohortsApi.processCsvChunk(cohort.value.id, {\n        isDryRun,\n        identifier: identifier.value,\n        fields: JSON.stringify(fields),\n        rows: JSON.stringify(rows),\n      })\n\n      //Only count successful rows when they have been processed\n      numRowsSucceeded.value += rows.length\n    }\n    catch (error) {\n      processError(error)\n    }\n    finally {\n      isProcessingChunk.value = false\n    }\n  }\n\n  //Check processing status\n  const checkCsvProcessingStatus = async () => {\n    try {\n\n      //Check status\n      const data = await cohortsApi.getCsvProcessingStatus(cohort.value.id, identifier.value)\n\n      //Check if processing is finished\n      if (data.isProcessed) {\n\n        //Clear interval and wrap up progress\n        clearInterval(pollingInterval.value)\n        setProgress(1)\n\n        //Brief timeout to allow progress bar to visually reach 100%\n        setTimeout(() => {\n          isProcessing.value = false\n          isProcessingComplete.value = true\n          hasErrors.value = data.hasErrors\n        }, 750)\n      }\n    }\n    catch (error) {\n      processError(error)\n    }\n  }\n\n  //Fake progress for status polling\n  const {\n    progress: processingProgress,\n    startProgress,\n    setProgress,\n    setTargetDuration,\n  } = useFakeProgress({\n    min: 0,\n    max: 1,\n  })\n\n  //Poll for processing status until it's finished\n  const pollProcessingStatus = async () => {\n\n    //Mark as processing\n    isProcessing.value = true\n\n    //Start progress\n    setTargetDuration(Math.max(numRowsSucceeded.value * 10, 5000))\n    startProgress()\n\n    //Start polling\n    pollingInterval.value = setInterval(checkCsvProcessingStatus, 2000)\n  }\n\n  //Expose interface\n  return {\n    processChunk,\n    isProcessing,\n    isProcessingChunk,\n    isProcessingComplete,\n    pollProcessingStatus,\n    processingProgress,\n    numRowsProcessed,\n    numRowsSucceeded,\n    hasErrors,\n    identifier,\n  }\n}\n","/* @license\nPapa Parse\nv5.4.1\nhttps://github.com/mholt/PapaParse\nLicense: MIT\n*/\n!function(e,t){\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof module&&\"undefined\"!=typeof exports?module.exports=t():e.Papa=t()}(this,function s(){\"use strict\";var f=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=f.IS_PAPA_WORKER||!1,a={},u=0,b={parse:function(e,t){var r=(t=t||{}).dynamicTyping||!1;J(r)&&(t.dynamicTypingFunction=r,r={});if(t.dynamicTyping=r,t.transform=!!J(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var i=function(){if(!b.WORKERS_SUPPORTED)return!1;var e=(r=f.URL||f.webkitURL||null,i=s.toString(),b.BLOB_URL||(b.BLOB_URL=r.createObjectURL(new Blob([\"var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; \",\"(\",i,\")();\"],{type:\"text/javascript\"})))),t=new f.Worker(e);var r,i;return t.onmessage=_,t.id=u++,a[t.id]=t}();return i.userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=J(t.step),t.chunk=J(t.chunk),t.complete=J(t.complete),t.error=J(t.error),delete t.worker,void i.postMessage({input:e,config:t,workerId:i.id})}var n=null;b.NODE_STREAM_INPUT,\"string\"==typeof e?(e=function(e){if(65279===e.charCodeAt(0))return e.slice(1);return e}(e),n=t.download?new l(t):new p(t)):!0===e.readable&&J(e.read)&&J(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=\",\",y=\"\\r\\n\",s='\"',a=s+s,r=!1,i=null,o=!1;!function(){if(\"object\"!=typeof t)return;\"string\"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);(\"boolean\"==typeof t.quotes||\"function\"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);\"boolean\"!=typeof t.skipEmptyLines&&\"string\"!=typeof t.skipEmptyLines||(r=t.skipEmptyLines);\"string\"==typeof t.newline&&(y=t.newline);\"string\"==typeof t.quoteChar&&(s=t.quoteChar);\"boolean\"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error(\"Option columns is empty\");i=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+s);(\"boolean\"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(o=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\\-@\\t\\r].*$/)}();var u=new RegExp(Q(s),\"g\");\"string\"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,r);if(\"object\"==typeof e[0])return h(i||Object.keys(e[0]),e,r)}else if(\"object\"==typeof e)return\"string\"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||i),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:\"object\"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||\"object\"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],r);throw new Error(\"Unable to serialize unrecognized input\");function h(e,t,r){var i=\"\";\"string\"==typeof e&&(e=JSON.parse(e)),\"string\"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(i+=m),i+=v(e[a],a);0<t.length&&(i+=y)}for(var o=0;o<t.length;o++){var u=n?e.length:t[o].length,h=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(r&&!n&&(h=\"greedy\"===r?\"\"===t[o].join(\"\").trim():1===t[o].length&&0===t[o][0].length),\"greedy\"===r&&n){for(var d=[],l=0;l<u;l++){var c=s?e[l]:l;d.push(t[o][c])}h=\"\"===d.join(\"\").trim()}if(!h){for(var p=0;p<u;p++){0<p&&!f&&(i+=m);var g=n&&s?e[p]:p;i+=v(t[o][g],p)}o<t.length-1&&(!r||0<u&&!f)&&(i+=y)}}return i}function v(e,t){if(null==e)return\"\";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;o&&\"string\"==typeof e&&o.test(e)&&(e=\"'\"+e,r=!0);var i=e.toString().replace(u,a);return(r=r||!0===n||\"function\"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}(i,b.BAD_DELIMITERS)||-1<i.indexOf(m)||\" \"===i.charAt(0)||\" \"===i.charAt(i.length-1))?s+i+s:i}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK=\"\\ufeff\",b.BAD_DELIMITERS=[\"\\r\",\"\\n\",'\"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=\",\",b.Parser=E,b.ParserHandle=r,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var r=o.config||{},u=[];return this.each(function(e){if(!(\"INPUT\"===d(this).prop(\"tagName\").toUpperCase()&&\"file\"===d(this).attr(\"type\").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return!0;for(var t=0;t<this.files.length;t++)u.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},r)})}),e(),this;function e(){if(0!==u.length){var e,t,r,i,n=u[0];if(J(o.before)){var s=o.before(n.file,n.inputElem);if(\"object\"==typeof s){if(\"abort\"===s.action)return e=\"AbortError\",t=n.file,r=n.inputElem,i=s.reason,void(J(o.error)&&o.error({name:e},t,r,i));if(\"skip\"===s.action)return void h();\"object\"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config))}else if(\"skip\"===s)return void h()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){J(a)&&a(e,n.file,n.inputElem),h()},b.parse(n.file,n.instanceConfig)}else J(o.complete)&&o.complete()}function h(){u.splice(0,1),e()}}}function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine=\"\",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new r(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&J(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+e;this._partialLine=\"\";var n=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=i.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(J(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!J(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0},this._sendError=function(e){J(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1})}}function l(e){var i;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),h.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(i=new XMLHttpRequest,this._config.withCredentials&&(i.withCredentials=this._config.withCredentials),n||(i.onload=v(this._chunkLoaded,this),i.onerror=v(this._chunkError,this)),i.open(this._config.downloadRequestBody?\"POST\":\"GET\",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)i.setRequestHeader(t,e[t])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;i.setRequestHeader(\"Range\",\"bytes=\"+this._start+\"-\"+r)}try{i.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===i.status&&this._chunkError()}},this._chunkLoaded=function(){4===i.readyState&&(i.status<200||400<=i.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:i.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader(\"Content-Range\");if(null===t)return-1;return parseInt(t.substring(t.lastIndexOf(\"/\")+1))}(i),this.parseChunk(i.responseText)))},this._chunkError=function(e){var t=i.statusText||e;this._sendError(new Error(t))}}function c(e){var i,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),h.call(this,e);var s=\"undefined\"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((i=new FileReader).onload=v(this._chunkLoaded,this),i.onerror=v(this._chunkError,this)):i=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t)}var r=i.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:r}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(i.error)}}function p(e){var r;h.call(this,e=e||{}),this.stream=function(e){return r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=r.substring(0,t),r=r.substring(t)):(e=r,r=\"\"),this._finished=!r,this.parseChunk(e)}}}function g(e){h.call(this,e=e||{});var t=[],r=!0,i=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(\"data\",this._streamData),this._input.on(\"end\",this._streamEnd),this._input.on(\"error\",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push(\"string\"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),i=!0,this._streamData(\"\")},this),this._streamCleanUp=v(function(){this._input.removeListener(\"data\",this._streamData),this._input.removeListener(\"end\",this._streamEnd),this._input.removeListener(\"error\",this._streamError)},this)}function r(m){var a,o,u,i=Math.pow(2,53),n=-i,s=/^\\s*-?(\\d+\\.?|\\.\\d+|\\d+\\.\\d+)([eE][-+]?\\d+)?\\s*$/,h=/^((\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)))$/,t=this,r=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(J(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else{if(g(),0===c.data.length)return;r+=e.data.length,m.preview&&r>m.preview?o.abort():(c.data=c.data[0],p(c,t))}}}function y(e){return\"greedy\"===m.skipEmptyLines?\"\"===e.join(\"\").trim():1===e.length&&0===e[0].length}function g(){return c&&u&&(k(\"Delimiter\",\"UndetectableDelimiter\",\"Unable to auto-detect delimiting character; defaulted to '\"+b.DefaultDelimiter+\"'\"),u=!1),m.skipEmptyLines&&(c.data=c.data.filter(function(e){return!y(e)})),_()&&function(){if(!c)return;function e(e,t){J(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e)}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1)}else c.data.forEach(e)}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var r,i=m.header?{}:[];for(r=0;r<e.length;r++){var n=r,s=e[r];m.header&&(n=r>=l.length?\"__parsed_extra\":l[r]),m.transform&&(s=m.transform(s,n)),s=v(n,s),\"__parsed_extra\"===n?(i[n]=i[n]||[],i[n].push(s)):i[n]=s}return m.header&&(r>l.length?k(\"FieldMismatch\",\"TooManyFields\",\"Too many fields: expected \"+l.length+\" fields but parsed \"+r,f+t):r<l.length&&k(\"FieldMismatch\",\"TooFewFields\",\"Too few fields: expected \"+l.length+\" fields but parsed \"+r,f+t)),i}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return r=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[r]&&(m.dynamicTyping[r]=m.dynamicTypingFunction(r)),!0===(m.dynamicTyping[r]||m.dynamicTyping)?\"true\"===t||\"TRUE\"===t||\"false\"!==t&&\"FALSE\"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<i)return!0}return!1}(t)?parseFloat(t):h.test(t)?new Date(t):\"\"===t?null:t):t;var r}function k(e,t,r,i){var n={type:e,code:t,message:r};void 0!==i&&(n.row=i),c.errors.push(n)}this.parse=function(e,t,r){var i=m.quoteChar||'\"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var r=new RegExp(Q(t)+\"([^]*?)\"+Q(t),\"gm\"),i=(e=e.replace(r,\"\")).split(\"\\r\"),n=e.split(\"\\n\"),s=1<n.length&&n[0].length<i[0].length;if(1===i.length||s)return\"\\n\";for(var a=0,o=0;o<i.length;o++)\"\\n\"===i[o][0]&&a++;return a>=i.length/2?\"\\r\\n\":\"\\r\"}(e,i)),u=!1,m.delimiter)J(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else{var n=function(e,t,r,i,n){var s,a,o,u;n=n||[\",\",\"\\t\",\"|\",\";\",b.RECORD_SEP,b.UNIT_SEP];for(var h=0;h<n.length;h++){var f=n[h],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:i,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(r&&y(p.data[g]))c++;else{var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===u||u<l)&&1.99<l&&(a=d,s=f,u=l)}return{successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(u=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,r),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=J(m.chunk)?\"\":a.substring(o.getCharIndex())},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3)},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,J(m.complete)&&m.complete(c),a=\"\"}}function Q(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function E(j){var z,M=(j=j||{}).delimiter,P=j.newline,U=j.comments,q=j.step,N=j.preview,B=j.fastMode,K=z=void 0===j.quoteChar||null===j.quoteChar?'\"':j.quoteChar;if(void 0!==j.escapeChar&&(K=j.escapeChar),(\"string\"!=typeof M||-1<b.BAD_DELIMITERS.indexOf(M))&&(M=\",\"),U===M)throw new Error(\"Comment character same as delimiter\");!0===U?U=\"#\":(\"string\"!=typeof U||-1<b.BAD_DELIMITERS.indexOf(U))&&(U=!1),\"\\n\"!==P&&\"\\r\"!==P&&\"\\r\\n\"!==P&&(P=\"\\n\");var W=0,H=!1;this.parse=function(i,t,r){if(\"string\"!=typeof i)throw new Error(\"Input must be a string\");var n=i.length,e=M.length,s=P.length,a=U.length,o=J(q),u=[],h=[],f=[],d=W=0;if(!i)return L();if(j.header&&!t){var l=i.split(P)[0].split(M),c=[],p={},g=!1;for(var _ in l){var m=l[_];J(j.transformHeader)&&(m=j.transformHeader(m,_));var y=m,v=p[m]||0;for(0<v&&(g=!0,y=m+\"_\"+v),p[m]=v+1;c.includes(y);)y=y+\"_\"+v;c.push(y)}if(g){var k=i.split(P);k[0]=c.join(M),i=k.join(P)}}if(B||!1!==B&&-1===i.indexOf(z)){for(var b=i.split(P),E=0;E<b.length;E++){if(f=b[E],W+=f.length,E!==b.length-1)W+=P.length;else if(r)return L();if(!U||f.substring(0,a)!==U){if(o){if(u=[],I(f.split(M)),F(),H)return L()}else I(f.split(M));if(N&&N<=E)return u=u.slice(0,N),L(!0)}}return L()}for(var w=i.indexOf(M,W),R=i.indexOf(P,W),C=new RegExp(Q(K)+Q(z),\"g\"),S=i.indexOf(z,W);;)if(i[W]!==z)if(U&&0===f.length&&i.substring(W,W+a)===U){if(-1===R)return L();W=R+s,R=i.indexOf(P,W),w=i.indexOf(M,W)}else if(-1!==w&&(w<R||-1===R))f.push(i.substring(W,w)),W=w+e,w=i.indexOf(M,W);else{if(-1===R)break;if(f.push(i.substring(W,R)),D(R+s),o&&(F(),H))return L();if(N&&u.length>=N)return L(!0)}else for(S=W,W++;;){if(-1===(S=i.indexOf(z,S+1)))return r||h.push({type:\"Quotes\",code:\"MissingQuotes\",message:\"Quoted field unterminated\",row:u.length,index:W}),T();if(S===n-1)return T(i.substring(W,S).replace(C,z));if(z!==K||i[S+1]!==K){if(z===K||0===S||i[S-1]!==K){-1!==w&&w<S+1&&(w=i.indexOf(M,S+1)),-1!==R&&R<S+1&&(R=i.indexOf(P,S+1));var O=A(-1===R?w:Math.min(w,R));if(i.substr(S+1+O,e)===M){f.push(i.substring(W,S).replace(C,z)),i[W=S+1+O+e]!==z&&(S=i.indexOf(z,W)),w=i.indexOf(M,W),R=i.indexOf(P,W);break}var x=A(R);if(i.substring(S+1+x,S+1+x+s)===P){if(f.push(i.substring(W,S).replace(C,z)),D(S+1+x+s),w=i.indexOf(M,W),S=i.indexOf(z,W),o&&(F(),H))return L();if(N&&u.length>=N)return L(!0);break}h.push({type:\"Quotes\",code:\"InvalidQuotes\",message:\"Trailing quote on quoted field is malformed\",row:u.length,index:W}),S++}}else S++}return T();function I(e){u.push(e),d=W}function A(e){var t=0;if(-1!==e){var r=i.substring(S+1,e);r&&\"\"===r.trim()&&(t=r.length)}return t}function T(e){return r||(void 0===e&&(e=i.substring(W)),f.push(e),W=n,I(f),o&&F()),L()}function D(e){W=e,I(f),f=[],R=i.indexOf(P,W)}function L(e){return{data:u,errors:h,meta:{delimiter:M,linebreak:P,aborted:H,truncated:!!e,cursor:d+(t||0)}}}function F(){q(L()),u=[],h=[]}},this.abort=function(){H=!0},this.getCharIndex=function(){return W}}function _(e){var t=e.data,r=a[t.workerId],i=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){i=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(J(r.userStep)){for(var s=0;s<t.results.data.length&&(r.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!i);s++);delete t.results}else J(r.userChunk)&&(r.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!i&&m(t.workerId,t.results)}function m(e,t){var r=a[e];J(r.userComplete)&&r.userComplete(t),r.terminate(),delete a[e]}function y(){throw new Error(\"Not implemented.\")}function w(e){if(\"object\"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=w(e[r]);return t}function v(e,t){return function(){e.apply(t,arguments)}}function J(e){return\"function\"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if(\"string\"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var r=b.parse(t.input,t.config);r&&f.postMessage({workerId:b.WORKER_ID,results:r,finished:!0})}}),(l.prototype=Object.create(h.prototype)).constructor=l,(c.prototype=Object.create(h.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(h.prototype)).constructor=g,b});","import Papa from 'papaparse'\nimport {ref, computed, watch} from 'vue'\n\n/**\n * CSV parsing composable\n * SEE: https://www.papaparse.com/docs\n */\nexport function useCsvParsing(csvData, options = {}) {\n\n  //Extract options\n  const {\n    chunkCallback = () => {},\n    completeCallback = () => {},\n    autoStart = true,\n  } = options\n\n  //Refs for parsing\n  const parser = ref(null)\n  const cursor = ref(0)\n  const csvDataSize = computed(() => csvData.value?.size || csvData.value?.length || 0)\n  const parsingProgress = computed(() => Math.min(cursor.value / csvDataSize.value, 1))\n  const parsingError = ref(null)\n  const isParsing = ref(false)\n  const isParsingComplete = ref(false)\n\n  //Parse CSV file\n  const parseCsvData = async () => {\n\n    //Reset refs\n    cursor.value = 0\n    isParsingComplete.value = false\n    parsingError.value = null\n\n    //No data\n    if (!csvData.value) {\n      return\n    }\n\n    //Invalid data\n    if (typeof csvData.value !== 'string' && !(csvData.value instanceof File)) {\n      throw new Error('Unexpected format for CSV data')\n    }\n\n    //Mark as parsing\n    isParsing.value = true\n\n    //Parse CSV file\n    parser.value = Papa.parse(csvData.value, {\n      // worker: true,\n      skipEmptyLines: 'greedy',\n\n      //We need to try and limit the number of rows per chunk to a sensible number\n      //for Rails to handle. Let's try 50kb per chunk to start with.\n      chunkSize: 1024 * 50,\n\n      //NOTE: Changed implementation from using worker to just running in the main\n      //thread. The setTimeout between parser pause and resume should prevent the\n      //browser from thinking that the page is unresponsive. This had to be done\n      //to allow us to pause the parser, which is not supported with workers.\n      //This allows us to track upload progress much better, prevents memory issues\n      //for very large files, and prevents multiple requests from being fired at\n      //the server simultaneously.\n      chunk: async (results, parser) => {\n        parser.pause()\n        cursor.value = results.meta.cursor\n        await chunkCallback(results, parser)\n        setTimeout(() => parser.resume(), 100)\n      },\n      complete: () => {\n        isParsing.value = false\n        isParsingComplete.value = true\n        completeCallback()\n      },\n      error: error => {\n        parsingError.value = error\n      },\n    })\n  }\n\n  //Abort parsing\n  const abortParsing = () => {\n    if (parser.value) {\n      parser.value.abort()\n      isParsing.value = false\n    }\n  }\n\n  //Auto parse CSV data\n  if (autoStart) {\n    watch(csvData, parseCsvData, {immediate: true})\n  }\n\n  /**\n   * Expose interface\n   */\n  return {\n    parseCsvData,\n    csvDataSize,\n    isParsing,\n    isParsingComplete,\n    parsingProgress,\n    parsingError,\n    abortParsing,\n  }\n}\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport CohortImportErrors from '@/components/cohorts/CohortImportErrors.vue'\nimport {Cohort} from '@/models/cohort.model.js'\nimport {useCohortCsvProcessing} from '@/composables/use-cohort-csv-processing.js'\nimport {useCsvParsing} from '@/composables/use-csv-parsing.js'\nimport {toRefs, ref, computed, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'confirm',\n  'reset',\n])\nconst props = defineProps({\n  cohort: {\n    type: Cohort,\n    required: true,\n  },\n  csvData: {\n    type: [File, String],\n    required: true,\n  },\n  hasHeader: {\n    type: Boolean,\n    required: true,\n  },\n  mappedOptions: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Get props\nconst {cohort, csvData, hasHeader, mappedOptions} = toRefs(props)\n\n/*\n * This component orchestrates the 4 steps of the CSV import process and\n * tracks overal progress across the steps:\n *\n *   1. Dry run import to verify the data\n *   2. Await server side verification, surface errors if any were present\n *   3. Live import of the data\n *   4. Await server side processing of the data\n */\n\n//CSV processing (dry run)\nconst {\n  processChunk: processChunkDryRun,\n  pollProcessingStatus: pollProcessingStatusDryRun,\n  isProcessing: isProcessingDryRun,\n  isProcessingComplete: isProcessingDryRunComplete,\n  processingProgress: processingProgressDryRun,\n  hasErrors: hasErrorsDryRun,\n} = useCohortCsvProcessing(cohort, hasHeader, mappedOptions)\n\n//CSV parsing (dry run)\nconst {\n  isParsing: isParsingDryRun,\n  isParsingComplete: isParsingDryRunComplete,\n  parsingProgress: parsingProgressDryRun,\n  parsingError: parsingErrorDryRun,\n  abortParsing: abortParsingDryRun,\n} = useCsvParsing(csvData, {\n  chunkCallback: async results => {\n    if (!results.errors?.length) {\n      await processChunkDryRun(results.data, true)\n    }\n  },\n})\n\n//CSV processing (live run)\nconst {\n  processChunk: processChunkLiveRun,\n  pollProcessingStatus: pollProcessingStatusLiveRun,\n  isProcessing: isProcessingLiveRun,\n  isProcessingComplete: isProcessingLiveRunComplete,\n  processingProgress: processingProgressLiveRun,\n  hasErrors: hasErrorsLiveRun,\n  numRowsSucceeded: numRowsSucceededLiveRun,\n} = useCohortCsvProcessing(cohort, hasHeader, mappedOptions)\n\n//CSV parsing (live run)\nconst {\n  parseCsvData: parseCsvDataLiveRun,\n  isParsing: isParsingLiveRun,\n  isParsingComplete: isParsingLiveRunComplete,\n  parsingProgress: parsingProgressLiveRun,\n  parsingError: parsingErrorLiveRun,\n  abortParsing: abortParsingLiveRun,\n} = useCsvParsing(csvData, {\n  autoStart: false,\n  chunkCallback: async results => {\n    if (!results.errors?.length) {\n      await processChunkLiveRun(results.data)\n    }\n  },\n})\n\n//Aggregate progress\nconst progress = computed(() => {\n  if (hasErrors.value) {\n    return 1\n  }\n  if (isParsingDryRun.value) {\n    return parsingProgressDryRun.value * 0.15\n  }\n  else if (isProcessingDryRun.value) {\n    return 0.15 + processingProgressDryRun.value * 0.35\n  }\n  else if (isParsingLiveRun.value) {\n    return 0.5 + parsingProgressLiveRun.value * 0.15\n  }\n  else if (isProcessingLiveRun.value) {\n    return 0.65 + processingProgressLiveRun.value * 0.35\n  }\n  else if (isProcessingLiveRunComplete.value) {\n    return 1\n  }\n  return 0\n})\n\n//Status text\nconst statusText = computed(() => {\n  if (hasErrors.value) {\n    return 'Learners import encountered errors'\n  }\n  else if (isParsingDryRun.value) {\n    return 'Processing your file...'\n  }\n  else if (isProcessingDryRun.value) {\n    return 'Verifying learner data...'\n  }\n  else if (isParsingLiveRun.value) {\n    return 'Importing learners...'\n  }\n  else if (isProcessingLiveRun.value) {\n    return 'Adding learners to cohort...'\n  }\n  return 'Learners import complete'\n})\n\n//Aggregate flags\nconst parsingError = computed(() => parsingErrorDryRun.value || parsingErrorLiveRun.value)\nconst hasErrors = computed(() => hasErrorsDryRun.value || hasErrorsLiveRun.value)\nconst isBusy = computed(() => isParsingDryRun.value || isProcessingDryRun.value || isParsingLiveRun.value || isProcessingLiveRun.value)\nconst isDone = computed(() => isProcessingLiveRunComplete.value)\n\n//Number of errors (obtained from CohortImportErrors)\nconst numErrors = ref(0)\nconst setNumErrors = total => numErrors.value = total\n\n//When dry run parsing is complete, start dry run status poll\nwatch(isParsingDryRunComplete, () => {\n  if (isParsingDryRunComplete.value) {\n    pollProcessingStatusDryRun()\n  }\n})\n\n//When dry run processing is complete, start live run parsing, unless there were errors\nwatch(isProcessingDryRunComplete, () => {\n  if (isProcessingDryRunComplete.value && !hasErrorsDryRun.value) {\n    parseCsvDataLiveRun()\n  }\n})\n\n//When live run parsing is complete, start live run status poll\nwatch(isParsingLiveRunComplete, () => {\n  if (isParsingLiveRunComplete.value) {\n    pollProcessingStatusLiveRun()\n  }\n})\n\n//Cancel handler\nconst cancel = () => {\n\n  //Abort parsing\n  if (isParsingDryRun.value) {\n    abortParsingDryRun()\n  }\n  else if (isParsingLiveRun.value) {\n    abortParsingLiveRun()\n  }\n\n  //Emit cancel event\n  emit('cancel')\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageBlock\n      header=\"Import\"\n      :subheader=\"statusText\"\n    >\n      <ProgressBar\n        v-if=\"isBusy\"\n        :progress=\"progress\"\n        show-label\n      />\n\n      <Alert\n        v-else-if=\"parsingError\"\n        type=\"danger\"\n      >\n        We ran into a problem parsing your import file. Please check the file and <a\n          is-clickable\n          @click=\"$emit('reset')\"\n        >upload it again or use a different file</a>.\n      </Alert>\n\n      <Alert\n        v-else-if=\"hasErrorsDryRun\"\n        type=\"danger\"\n      >\n        <Inflect\n          text=\"validation error\"\n          :count=\"numErrors\"\n          include-count\n        /> were encountered in your import file. Please correct these errors and <a\n          is-clickable\n          @click=\"$emit('reset')\"\n        >upload the file again</a>.\n      </Alert>\n\n      <Alert\n        v-else-if=\"hasErrorsLiveRun\"\n        type=\"warning\"\n      >\n        <Inflect\n          text=\"learner record\"\n          :count=\"numRowsSucceededLiveRun\"\n          include-count\n        />\n        {{ numRowsSucceededLiveRun === 1 ? 'was' : 'were' }} processed, but\n        <Inflect\n          text=\"validation error\"\n          :count=\"numErrors\"\n          include-count\n        /> {{ numErrors === 1 ? 'was' : 'were' }} encountered in some of the records. Correct these errors if possible and <a\n          is-clickable\n          @click=\"$emit('reset')\"\n        >upload the file again</a>.\n      </Alert>\n\n      <Alert\n        v-else-if=\"isDone\"\n        type=\"success\"\n      >\n        <Inflect\n          text=\"learner record\"\n          :count=\"numRowsSucceededLiveRun\"\n          include-count\n        />\n        {{ numRowsSucceededLiveRun === 1 ? 'was' : 'were' }} imported successfully.\n      </Alert>\n\n      <CohortImportErrors\n        v-if=\"!isBusy && hasErrors\"\n        :cohort=\"cohort\"\n        :show-intro=\"false\"\n        @total-errors=\"setNumErrors($event.total)\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"!isDone\"\n        :can-go-back=\"hasErrors\"\n        :is-disabled-confirm=\"!isDone\"\n        :has-spinner-confirm=\"isBusy\"\n        label-confirm=\"Finish\"\n        label-back=\"Retry\"\n        @back=\"$emit('reset')\"\n        @confirm=\"$emit('confirm')\"\n        @cancel=\"cancel()\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","import {metadataFieldsApi} from '@/api/metadata-fields.api.js'\nimport {metadataFieldTypes} from '@/constants/metadata.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Metadata field creation composable\n */\nexport function useMetadataFieldCreation() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const metadataField = ref(null)\n  const isCreatingMetadataField = ref(false)\n\n  //Model\n  const model = ref({\n    type: metadataFieldTypes.STRING,\n    name: '',\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Metadata field creation\n  const createMetadataField = async () => {\n\n    //Base data\n    const data = {\n      name: model.value.name,\n      type: model.value.type,\n    }\n\n    //Toggle flag\n    isCreatingMetadataField.value = true\n\n    //Create\n    try {\n      metadataField.value = await metadataFieldsApi.create(data)\n      setFlashSuccess('Field created')\n      return metadataField.value\n    }\n    catch (error) {\n      setFlashFailure('Failed to create field')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingMetadataField.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    updateModel,\n    metadataField,\n    isCreatingMetadataField,\n    createMetadataField,\n  }\n}\n","import {metadataFieldsApi} from '@/api/metadata-fields.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Metadata field validation composable\n */\nexport function useMetadataFieldValidation(existingMetadataField) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n  const {processError} = useErrorHandling()\n\n  //Flag\n  const isCheckingMetadataFieldExists = ref(false)\n\n  //Check if metadataField exists by given properties\n  const checkMetadataFieldExists = data => {\n    try {\n      isCheckingMetadataFieldExists.value = true\n      return metadataFieldsApi.checkExists({\n        ...data,\n        excludeId: existingMetadataField?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingMetadataFieldExists.value = false\n    }\n  }\n\n  //Debounced check for cohort existence\n  const checkMetadataFieldExistsDebounced = useDebounceFn(checkMetadataFieldExists, 500)\n\n  //Unique metadataField name validator\n  const uniqueName = asyncValidator(\n    'A field with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      try {\n        const exists = await checkMetadataFieldExists({name})\n        return !exists\n      }\n      catch (error) {\n        processError(error)\n        throw error\n      }\n    }\n  )\n\n  //Expose interface\n  return {\n    checkMetadataFieldExists,\n    checkMetadataFieldExistsDebounced,\n    isCheckingMetadataFieldExists,\n    uniqueName,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport {metadataFieldTypeOptions} from '@/constants/metadata.js'\nimport {useMetadataFieldCreation} from '@/composables/use-metadata-field-creation.js'\nimport {useMetadataFieldValidation} from '@/composables/use-metadata-field-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'created',\n])\n\n//Metadata field creation\nconst {\n  model,\n  updateModel,\n  createMetadataField,\n  isCreatingMetadataField,\n} = useMetadataFieldCreation()\n\n//Validation\nconst {uniqueName, isCheckingMetadataFieldExists} = useMetadataFieldValidation()\nconst {required, minLength, maxLength} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Field name'),\n    minLength: minLength(2),\n    maxLength: maxLength(30),\n    uniqueName,\n  },\n}, model, {$autoDirty: true})\n\n//Confirm\nconst confirm = async () => {\n  if ($v.value.$invalid) {\n    return\n  }\n  const metadataField = await createMetadataField()\n  emit('created', {metadataField})\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Create new field\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <FormField label=\"Type\">\n      <RadioButtonList\n        :value=\"model.type\"\n        :options=\"metadataFieldTypeOptions\"\n        is-inline\n        @input=\"updateModel({type: $event.value})\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"Field name\"\n      :errors=\"$v.name.$errors\"\n    >\n      <TextInput\n        ref=\"nameInput\"\n        :value=\"model.name\"\n        maxlength=\"30\"\n        minlength=\"2\"\n        name=\"name\"\n        type=\"text\"\n        focus-on-mount\n        :has-error=\"$v.name.$error && !$v.name.$pending\"\n        :has-spinner=\"isCheckingMetadataFieldExists\"\n        @input=\"updateModel({name: $event.value})\"\n        @focus=\"$event.target.select()\"\n        @keydown.enter=\"confirm()\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isCreatingMetadataField || $v.$invalid\"\n        :has-spinner-confirm=\"isCreatingMetadataField\"\n        label-confirm=\"Create field\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported XLSX */\n/*global process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */\nvar XLSX = {};\nXLSX.version = '0.18.5';\nvar current_codepage = 1200, current_ansi = 1252;\n\nvar VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000 ];\n/* ECMA-376 Part I 18.4.1 charset to codepage mapping */\nvar CS2CP = ({\n\t/*::[*/0/*::]*/:    1252, /* ANSI */\n\t/*::[*/1/*::]*/:   65001, /* DEFAULT */\n\t/*::[*/2/*::]*/:   65001, /* SYMBOL */\n\t/*::[*/77/*::]*/:  10000, /* MAC */\n\t/*::[*/128/*::]*/:   932, /* SHIFTJIS */\n\t/*::[*/129/*::]*/:   949, /* HANGUL */\n\t/*::[*/130/*::]*/:  1361, /* JOHAB */\n\t/*::[*/134/*::]*/:   936, /* GB2312 */\n\t/*::[*/136/*::]*/:   950, /* CHINESEBIG5 */\n\t/*::[*/161/*::]*/:  1253, /* GREEK */\n\t/*::[*/162/*::]*/:  1254, /* TURKISH */\n\t/*::[*/163/*::]*/:  1258, /* VIETNAMESE */\n\t/*::[*/177/*::]*/:  1255, /* HEBREW */\n\t/*::[*/178/*::]*/:  1256, /* ARABIC */\n\t/*::[*/186/*::]*/:  1257, /* BALTIC */\n\t/*::[*/204/*::]*/:  1251, /* RUSSIAN */\n\t/*::[*/222/*::]*/:   874, /* THAI */\n\t/*::[*/238/*::]*/:  1250, /* EASTEUROPE */\n\t/*::[*/255/*::]*/:  1252, /* OEM */\n\t/*::[*/69/*::]*/:   6969  /* MISC */\n}/*:any*/);\n\nvar set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; };\nfunction reset_ansi() { set_ansi(1252); }\n\nvar set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };\nfunction reset_cp() { set_cp(1200); reset_ansi(); }\n\nfunction char_codes(data/*:string*/)/*:Array<number>*/ { var o/*:Array<number>*/ = []; for(var i = 0, len = data.length; i < len; ++i) o[i] = data.charCodeAt(i); return o; }\n\nfunction utf16leread(data/*:string*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i) + (data.charCodeAt(2*i+1)<<8));\n\treturn o.join(\"\");\n}\nfunction utf16beread(data/*:string*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i+1) + (data.charCodeAt(2*i)<<8));\n\treturn o.join(\"\");\n}\n\nvar debom = function(data/*:string*/)/*:string*/ {\n\tvar c1 = data.charCodeAt(0), c2 = data.charCodeAt(1);\n\tif(c1 == 0xFF && c2 == 0xFE) return utf16leread(data.slice(2));\n\tif(c1 == 0xFE && c2 == 0xFF) return utf16beread(data.slice(2));\n\tif(c1 == 0xFEFF) return data.slice(1);\n\treturn data;\n};\n\nvar _getchar = function _gc1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };\nvar _getansi = function _ga1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };\n\nvar $cptable;\nfunction set_cptable(cptable) {\n\t$cptable = cptable;\n\tset_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };\n\tdebom = function(data/*:string*/) {\n\t\tif(data.charCodeAt(0) === 0xFF && data.charCodeAt(1) === 0xFE) { return $cptable.utils.decode(1200, char_codes(data.slice(2))); }\n\t\treturn data;\n\t};\n\t_getchar = function _gc2(x/*:number*/)/*:string*/ {\n\t\tif(current_codepage === 1200) return String.fromCharCode(x);\n\t\treturn $cptable.utils.decode(current_codepage, [x&255,x>>8])[0];\n\t};\n\t_getansi = function _ga2(x/*:number*/)/*:string*/ {\n\t\treturn $cptable.utils.decode(current_ansi, [x])[0];\n\t};\n\tcpdoit();\n}\nexport { set_cptable };\nvar DENSE = null;\nvar DIF_XL = true;\nvar Base64_map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nfunction Base64_encode(input) {\n  var o = \"\";\n  var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;\n  for (var i = 0; i < input.length; ) {\n    c1 = input.charCodeAt(i++);\n    e1 = c1 >> 2;\n    c2 = input.charCodeAt(i++);\n    e2 = (c1 & 3) << 4 | c2 >> 4;\n    c3 = input.charCodeAt(i++);\n    e3 = (c2 & 15) << 2 | c3 >> 6;\n    e4 = c3 & 63;\n    if (isNaN(c2)) {\n      e3 = e4 = 64;\n    } else if (isNaN(c3)) {\n      e4 = 64;\n    }\n    o += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4);\n  }\n  return o;\n}\nfunction Base64_decode(input) {\n  var o = \"\";\n  var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;\n  input = input.replace(/[^\\w\\+\\/\\=]/g, \"\");\n  for (var i = 0; i < input.length; ) {\n    e1 = Base64_map.indexOf(input.charAt(i++));\n    e2 = Base64_map.indexOf(input.charAt(i++));\n    c1 = e1 << 2 | e2 >> 4;\n    o += String.fromCharCode(c1);\n    e3 = Base64_map.indexOf(input.charAt(i++));\n    c2 = (e2 & 15) << 4 | e3 >> 2;\n    if (e3 !== 64) {\n      o += String.fromCharCode(c2);\n    }\n    e4 = Base64_map.indexOf(input.charAt(i++));\n    c3 = (e3 & 3) << 6 | e4;\n    if (e4 !== 64) {\n      o += String.fromCharCode(c3);\n    }\n  }\n  return o;\n}\nvar has_buf = /*#__PURE__*/(function() { return typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && !!process.versions.node; })();\n\nvar Buffer_from = /*#__PURE__*/(function() {\n\tif(typeof Buffer !== 'undefined') {\n\t\tvar nbfs = !Buffer.from;\n\t\tif(!nbfs) try { Buffer.from(\"foo\", \"utf8\"); } catch(e) { nbfs = true; }\n\t\treturn nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);\n\t}\n\treturn function() {};\n})();\n\n\nfunction new_raw_buf(len/*:number*/) {\n\t/* jshint -W056 */\n\tif(has_buf) return Buffer.alloc ? Buffer.alloc(len) : new Buffer(len);\n\treturn typeof Uint8Array != \"undefined\" ? new Uint8Array(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nfunction new_unsafe_buf(len/*:number*/) {\n\t/* jshint -W056 */\n\tif(has_buf) return Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : new Buffer(len);\n\treturn typeof Uint8Array != \"undefined\" ? new Uint8Array(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nvar s2a = function s2a(s/*:string*/)/*:any*/ {\n\tif(has_buf) return Buffer_from(s, \"binary\");\n\treturn s.split(\"\").map(function(x/*:string*/)/*:number*/{ return x.charCodeAt(0) & 0xff; });\n};\n\nfunction s2ab(s/*:string*/)/*:any*/ {\n\tif(typeof ArrayBuffer === 'undefined') return s2a(s);\n\tvar buf = new ArrayBuffer(s.length), view = new Uint8Array(buf);\n\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\n\treturn buf;\n}\n\nfunction a2s(data/*:any*/)/*:string*/ {\n\tif(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join(\"\");\n\tvar o/*:Array<string>*/ = []; for(var i = 0; i < data.length; ++i) o[i] = String.fromCharCode(data[i]); return o.join(\"\");\n}\n\nfunction a2u(data/*:Array<number>*/)/*:Uint8Array*/ {\n\tif(typeof Uint8Array === 'undefined') throw new Error(\"Unsupported\");\n\treturn new Uint8Array(data);\n}\n\nfunction ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array<number>*/ {\n\tif(typeof ArrayBuffer == 'undefined') throw new Error(\"Unsupported\");\n\tif(data instanceof ArrayBuffer) return ab2a(new Uint8Array(data));\n\t/*:: if(data instanceof ArrayBuffer) throw new Error(\"unreachable\"); */\n\tvar o = new Array(data.length);\n\tfor(var i = 0; i < data.length; ++i) o[i] = data[i];\n\treturn o;\n}\n\nvar bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf) ? buf : Buffer_from(buf); })); } : function(bufs) {\n\tif(typeof Uint8Array !== \"undefined\") {\n\t\tvar i = 0, maxlen = 0;\n\t\tfor(i = 0; i < bufs.length; ++i) maxlen += bufs[i].length;\n\t\tvar o = new Uint8Array(maxlen);\n\t\tvar len = 0;\n\t\tfor(i = 0, maxlen = 0; i < bufs.length; maxlen += len, ++i) {\n\t\t\tlen = bufs[i].length;\n\t\t\tif(bufs[i] instanceof Uint8Array) o.set(bufs[i], maxlen);\n\t\t\telse if(typeof bufs[i] == \"string\") { throw \"wtf\"; }\n\t\t\telse o.set(new Uint8Array(bufs[i]), maxlen);\n\t\t}\n\t\treturn o;\n\t}\n\treturn [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.call(buf); }));\n};\n\nfunction utf8decode(content/*:string*/) {\n\tvar out = [], widx = 0, L = content.length + 250;\n\tvar o = new_raw_buf(content.length + 255);\n\tfor(var ridx = 0; ridx < content.length; ++ridx) {\n\t\tvar c = content.charCodeAt(ridx);\n\t\tif(c < 0x80) o[widx++] = c;\n\t\telse if(c < 0x800) {\n\t\t\to[widx++] = (192|((c>>6)&31));\n\t\t\to[widx++] = (128|(c&63));\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64;\n\t\t\tvar d = content.charCodeAt(++ridx)&1023;\n\t\t\to[widx++] = (240|((c>>8)&7));\n\t\t\to[widx++] = (128|((c>>2)&63));\n\t\t\to[widx++] = (128|((d>>6)&15)|((c&3)<<4));\n\t\t\to[widx++] = (128|(d&63));\n\t\t} else {\n\t\t\to[widx++] = (224|((c>>12)&15));\n\t\t\to[widx++] = (128|((c>>6)&63));\n\t\t\to[widx++] = (128|(c&63));\n\t\t}\n\t\tif(widx > L) {\n\t\t\tout.push(o.slice(0, widx));\n\t\t\twidx = 0;\n\t\t\to = new_raw_buf(65535);\n\t\t\tL = 65530;\n\t\t}\n\t}\n\tout.push(o.slice(0, widx));\n\treturn bconcat(out);\n}\n\nvar chr0 = /\\u0000/g, chr1 = /[\\u0001-\\u0006]/g;\n/*::\ndeclare type Block = any;\ndeclare type BufArray = {\n\tnewblk(sz:number):Block;\n\tnext(sz:number):Block;\n\tend():any;\n\tpush(buf:Block):void;\n};\n\ntype RecordHopperCB = {(d:any, Rn:string, RT:number):?boolean;};\n\ntype EvertType = {[string]:string};\ntype EvertNumType = {[string]:number};\ntype EvertArrType = {[string]:Array<string>};\n\ntype StringConv = {(string):string};\n\n*/\n/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/*jshint -W041 */\nfunction _strrev(x/*:string*/)/*:string*/ { var o = \"\", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; }\nfunction pad0(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad_(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v;return t.length>=d?t:fill(' ',d-t.length)+t;}\nfunction rpad_(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:t+fill(' ',d-t.length);}\nfunction pad0r1(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad0r2(v/*:any*/,d/*:number*/)/*:string*/{var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nvar p2_32 = /*#__PURE__*/Math.pow(2,32);\nfunction pad0r(v/*:any*/,d/*:number*/)/*:string*/{if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(i,d); }\n/* yes, in 2022 this is still faster than string compare */\nfunction SSF_isgeneral(s/*:string*/, i/*:?number*/)/*:boolean*/ { i = i || 0; return s.length >= 7 + i && (s.charCodeAt(i)|32) === 103 && (s.charCodeAt(i+1)|32) === 101 && (s.charCodeAt(i+2)|32) === 110 && (s.charCodeAt(i+3)|32) === 101 && (s.charCodeAt(i+4)|32) === 114 && (s.charCodeAt(i+5)|32) === 97 && (s.charCodeAt(i+6)|32) === 108; }\nvar days/*:Array<Array<string> >*/ = [\n\t['Sun', 'Sunday'],\n\t['Mon', 'Monday'],\n\t['Tue', 'Tuesday'],\n\t['Wed', 'Wednesday'],\n\t['Thu', 'Thursday'],\n\t['Fri', 'Friday'],\n\t['Sat', 'Saturday']\n];\nvar months/*:Array<Array<string> >*/ = [\n\t['J', 'Jan', 'January'],\n\t['F', 'Feb', 'February'],\n\t['M', 'Mar', 'March'],\n\t['A', 'Apr', 'April'],\n\t['M', 'May', 'May'],\n\t['J', 'Jun', 'June'],\n\t['J', 'Jul', 'July'],\n\t['A', 'Aug', 'August'],\n\t['S', 'Sep', 'September'],\n\t['O', 'Oct', 'October'],\n\t['N', 'Nov', 'November'],\n\t['D', 'Dec', 'December']\n];\nfunction SSF_init_table(t/*:any*/) {\n\tif(!t) t = {};\n\tt[0]=  'General';\n\tt[1]=  '0';\n\tt[2]=  '0.00';\n\tt[3]=  '#,##0';\n\tt[4]=  '#,##0.00';\n\tt[9]=  '0%';\n\tt[10]= '0.00%';\n\tt[11]= '0.00E+00';\n\tt[12]= '# ?/?';\n\tt[13]= '# ??/??';\n\tt[14]= 'm/d/yy';\n\tt[15]= 'd-mmm-yy';\n\tt[16]= 'd-mmm';\n\tt[17]= 'mmm-yy';\n\tt[18]= 'h:mm AM/PM';\n\tt[19]= 'h:mm:ss AM/PM';\n\tt[20]= 'h:mm';\n\tt[21]= 'h:mm:ss';\n\tt[22]= 'm/d/yy h:mm';\n\tt[37]= '#,##0 ;(#,##0)';\n\tt[38]= '#,##0 ;[Red](#,##0)';\n\tt[39]= '#,##0.00;(#,##0.00)';\n\tt[40]= '#,##0.00;[Red](#,##0.00)';\n\tt[45]= 'mm:ss';\n\tt[46]= '[h]:mm:ss';\n\tt[47]= 'mmss.0';\n\tt[48]= '##0.0E+0';\n\tt[49]= '@';\n\tt[56]= '\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"';\n\treturn t;\n}\n/* repeated to satiate webpack */\nvar table_fmt = {\n\t0:  'General',\n\t1:  '0',\n\t2:  '0.00',\n\t3:  '#,##0',\n\t4:  '#,##0.00',\n\t9:  '0%',\n\t10: '0.00%',\n\t11: '0.00E+00',\n\t12: '# ?/?',\n\t13: '# ??/??',\n\t14: 'm/d/yy',\n\t15: 'd-mmm-yy',\n\t16: 'd-mmm',\n\t17: 'mmm-yy',\n\t18: 'h:mm AM/PM',\n\t19: 'h:mm:ss AM/PM',\n\t20: 'h:mm',\n\t21: 'h:mm:ss',\n\t22: 'm/d/yy h:mm',\n\t37: '#,##0 ;(#,##0)',\n\t38: '#,##0 ;[Red](#,##0)',\n\t39: '#,##0.00;(#,##0.00)',\n\t40: '#,##0.00;[Red](#,##0.00)',\n\t45: 'mm:ss',\n\t46: '[h]:mm:ss',\n\t47: 'mmss.0',\n\t48: '##0.0E+0',\n\t49: '@',\n\t56: '\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"'\n};\n\n/* Defaults determined by systematically testing in Excel 2019 */\n\n/* These formats appear to default to other formats in the table */\nvar SSF_default_map = {\n\t5:  37, 6:  38, 7:  39, 8:  40,         //  5 -> 37 ...  8 -> 40\n\n\t23:  0, 24:  0, 25:  0, 26:  0,         // 23 ->  0 ... 26 ->  0\n\n\t27: 14, 28: 14, 29: 14, 30: 14, 31: 14, // 27 -> 14 ... 31 -> 14\n\n\t50: 14, 51: 14, 52: 14, 53: 14, 54: 14, // 50 -> 14 ... 58 -> 14\n\t55: 14, 56: 14, 57: 14, 58: 14,\n\t59:  1, 60:  2, 61:  3, 62:  4,         // 59 ->  1 ... 62 ->  4\n\n\t67:  9, 68: 10,                         // 67 ->  9 ... 68 -> 10\n\t69: 12, 70: 13, 71: 14,                 // 69 -> 12 ... 71 -> 14\n\t72: 14, 73: 15, 74: 16, 75: 17,         // 72 -> 14 ... 75 -> 17\n\t76: 20, 77: 21, 78: 22,                 // 76 -> 20 ... 78 -> 22\n\t79: 45, 80: 46, 81: 47,                 // 79 -> 45 ... 81 -> 47\n\t82: 0                                   // 82 ->  0 ... 65536 -> 0 (omitted)\n};\n\n\n/* These formats technically refer to Accounting formats with no equivalent */\nvar SSF_default_str = {\n\t//  5 -- Currency,   0 decimal, black negative\n\t5:  '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t63: '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\n\t//  6 -- Currency,   0 decimal, red   negative\n\t6:  '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t64: '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\n\t//  7 -- Currency,   2 decimal, black negative\n\t7:  '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t65: '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\n\t//  8 -- Currency,   2 decimal, red   negative\n\t8:  '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t66: '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\n\t// 41 -- Accounting, 0 decimal, No Symbol\n\t41: '_(* #,##0_);_(* \\\\(#,##0\\\\);_(* \"-\"_);_(@_)',\n\n\t// 42 -- Accounting, 0 decimal, $  Symbol\n\t42: '_(\"$\"* #,##0_);_(\"$\"* \\\\(#,##0\\\\);_(\"$\"* \"-\"_);_(@_)',\n\n\t// 43 -- Accounting, 2 decimal, No Symbol\n\t43: '_(* #,##0.00_);_(* \\\\(#,##0.00\\\\);_(* \"-\"??_);_(@_)',\n\n\t// 44 -- Accounting, 2 decimal, $  Symbol\n\t44: '_(\"$\"* #,##0.00_);_(\"$\"* \\\\(#,##0.00\\\\);_(\"$\"* \"-\"??_);_(@_)'\n};\n\nfunction SSF_frac(x/*:number*/, D/*:number*/, mixed/*:?boolean*/)/*:Array<number>*/ {\n\tvar sgn = x < 0 ? -1 : 1;\n\tvar B = x * sgn;\n\tvar P_2 = 0, P_1 = 1, P = 0;\n\tvar Q_2 = 1, Q_1 = 0, Q = 0;\n\tvar A = Math.floor(B);\n\twhile(Q_1 < D) {\n\t\tA = Math.floor(B);\n\t\tP = A * P_1 + P_2;\n\t\tQ = A * Q_1 + Q_2;\n\t\tif((B - A) < 0.00000005) break;\n\t\tB = 1 / (B - A);\n\t\tP_2 = P_1; P_1 = P;\n\t\tQ_2 = Q_1; Q_1 = Q;\n\t}\n\tif(Q > D) { if(Q_1 > D) { Q = Q_2; P = P_2; } else { Q = Q_1; P = P_1; } }\n\tif(!mixed) return [0, sgn * P, Q];\n\tvar q = Math.floor(sgn * P/Q);\n\treturn [q, sgn*P - q*Q, Q];\n}\nfunction SSF_parse_date_code(v/*:number*/,opts/*:?any*/,b2/*:?boolean*/) {\n\tif(v > 2958465 || v < 0) return null;\n\tvar date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;\n\tvar dout=[];\n\tvar out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};\n\tif(Math.abs(out.u) < 1e-6) out.u = 0;\n\tif(opts && opts.date1904) date += 1462;\n\tif(out.u > 0.9999) {\n\t\tout.u = 0;\n\t\tif(++time == 86400) { out.T = time = 0; ++date; ++out.D; }\n\t}\n\tif(date === 60) {dout = b2 ? [1317,10,29] : [1900,2,29]; dow=3;}\n\telse if(date === 0) {dout = b2 ? [1317,8,29] : [1900,1,0]; dow=6;}\n\telse {\n\t\tif(date > 60) --date;\n\t\t/* 1 = Jan 1 1900 in Gregorian */\n\t\tvar d = new Date(1900, 0, 1);\n\t\td.setDate(d.getDate() + date - 1);\n\t\tdout = [d.getFullYear(), d.getMonth()+1,d.getDate()];\n\t\tdow = d.getDay();\n\t\tif(date < 60) dow = (dow + 6) % 7;\n\t\tif(b2) dow = SSF_fix_hijri(d, dout);\n\t}\n\tout.y = dout[0]; out.m = dout[1]; out.d = dout[2];\n\tout.S = time % 60; time = Math.floor(time / 60);\n\tout.M = time % 60; time = Math.floor(time / 60);\n\tout.H = time;\n\tout.q = dow;\n\treturn out;\n}\nvar SSFbasedate = /*#__PURE__*/new Date(1899, 11, 31, 0, 0, 0);\nvar SSFdnthresh = /*#__PURE__*/SSFbasedate.getTime();\nvar SSFbase1904 = /*#__PURE__*/new Date(1900, 2, 1, 0, 0, 0);\nfunction datenum_local(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {\n\tvar epoch = /*#__PURE__*/v.getTime();\n\tif(date1904) epoch -= 1461*24*60*60*1000;\n\telse if(v >= SSFbase1904) epoch += 24*60*60*1000;\n\treturn (epoch - (SSFdnthresh + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/SSFbasedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000);\n}\n/* ECMA-376 18.8.30 numFmt*/\n/* Note: `toPrecision` uses standard form when prec > E and E >= -6 */\n/* exponent >= -9 and <= 9 */\nfunction SSF_strip_decimal(o/*:string*/)/*:string*/ {\n\treturn (o.indexOf(\".\") == -1) ? o : o.replace(/(?:\\.0*|(\\.\\d*[1-9])0+)$/, \"$1\");\n}\n\n/* General Exponential always shows 2 digits exp and trims the mantissa */\nfunction SSF_normalize_exp(o/*:string*/)/*:string*/ {\n\tif(o.indexOf(\"E\") == -1) return o;\n\treturn o.replace(/(?:\\.0*|(\\.\\d*[1-9])0+)[Ee]/,\"$1E\").replace(/(E[+-])(\\d)$/,\"$10$2\");\n}\n\n/* exponent >= -9 and <= 9 */\nfunction SSF_small_exp(v/*:number*/)/*:string*/ {\n\tvar w = (v<0?12:11);\n\tvar o = SSF_strip_decimal(v.toFixed(12)); if(o.length <= w) return o;\n\to = v.toPrecision(10); if(o.length <= w) return o;\n\treturn v.toExponential(5);\n}\n\n/* exponent >= 11 or <= -10 likely exponential */\nfunction SSF_large_exp(v/*:number*/)/*:string*/ {\n\tvar o = SSF_strip_decimal(v.toFixed(11));\n\treturn (o.length > (v<0?12:11) || o === \"0\" || o === \"-0\") ? v.toPrecision(6) : o;\n}\n\nfunction SSF_general_num(v/*:number*/)/*:string*/ {\n\tvar V = Math.floor(Math.log(Math.abs(v))*Math.LOG10E), o;\n\n\tif(V >= -4 && V <= -1) o = v.toPrecision(10+V);\n\telse if(Math.abs(V) <= 9) o = SSF_small_exp(v);\n\telse if(V === 10) o = v.toFixed(10).substr(0,12);\n\telse o = SSF_large_exp(v);\n\n\treturn SSF_strip_decimal(SSF_normalize_exp(o.toUpperCase()));\n}\n\n\n/*\n\t\"General\" rules:\n\t- text is passed through (\"@\")\n\t- booleans are rendered as TRUE/FALSE\n\t- \"up to 11 characters\" displayed for numbers\n\t- Default date format (code 14) used for Dates\n\n\tThe longest 32-bit integer text is \"-2147483648\", exactly 11 chars\n\tTODO: technically the display depends on the width of the cell\n*/\nfunction SSF_general(v/*:any*/, opts/*:any*/) {\n\tswitch(typeof v) {\n\t\tcase 'string': return v;\n\t\tcase 'boolean': return v ? \"TRUE\" : \"FALSE\";\n\t\tcase 'number': return (v|0) === v ? v.toString(10) : SSF_general_num(v);\n\t\tcase 'undefined': return \"\";\n\t\tcase 'object':\n\t\t\tif(v == null) return \"\";\n\t\t\tif(v instanceof Date) return SSF_format(14, datenum_local(v, opts && opts.date1904), opts);\n\t}\n\tthrow new Error(\"unsupported value in General format: \" + v);\n}\n\nfunction SSF_fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) {\n  /* TODO: properly adjust y/m/d and  */\n  o[0] -= 581;\n  var dow = date.getDay();\n  if(date < 60) dow = (dow + 6) % 7;\n  return dow;\n}\n//var THAI_DIGITS = \"\\u0E50\\u0E51\\u0E52\\u0E53\\u0E54\\u0E55\\u0E56\\u0E57\\u0E58\\u0E59\".split(\"\");\nfunction SSF_write_date(type/*:number*/, fmt/*:string*/, val, ss0/*:?number*/)/*:string*/ {\n\tvar o=\"\", ss=0, tt=0, y = val.y, out, outl = 0;\n\tswitch(type) {\n\t\tcase 98: /* 'b' buddhist year */\n\t\t\ty = val.y + 543;\n\t\t\t/* falls through */\n\t\tcase 121: /* 'y' year */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = y % 100; outl = 2; break;\n\t\t\tdefault: out = y % 10000; outl = 4; break;\n\t\t} break;\n\t\tcase 109: /* 'm' month */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.m; outl = fmt.length; break;\n\t\t\tcase 3: return months[val.m-1][1];\n\t\t\tcase 5: return months[val.m-1][0];\n\t\t\tdefault: return months[val.m-1][2];\n\t\t} break;\n\t\tcase 100: /* 'd' day */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.d; outl = fmt.length; break;\n\t\t\tcase 3: return days[val.q][0];\n\t\t\tdefault: return days[val.q][1];\n\t\t} break;\n\t\tcase 104: /* 'h' 12-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = 1+(val.H+11)%12; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 72: /* 'H' 24-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.H; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 77: /* 'M' minutes */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.M; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad minute format: ' + fmt;\n\t\t} break;\n\t\tcase 115: /* 's' seconds */\n\t\t\tif(fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt;\n\t\t\tif(val.u === 0 && (fmt == \"s\" || fmt == \"ss\")) return pad0(val.S, fmt.length);\n\t\t\t/*::if(!ss0) ss0 = 0; */\n\t\t\tif(ss0 >= 2) tt = ss0 === 3 ? 1000 : 100;\n\t\t\telse tt = ss0 === 1 ? 10 : 1;\n\t\t\tss = Math.round((tt)*(val.S + val.u));\n\t\t\tif(ss >= 60*tt) ss = 0;\n\t\t\tif(fmt === 's') return ss === 0 ? \"0\" : \"\"+ss/tt;\n\t\t\to = pad0(ss,2 + ss0);\n\t\t\tif(fmt === 'ss') return o.substr(0,2);\n\t\t\treturn \".\" + o.substr(2,fmt.length-1);\n\t\tcase 90: /* 'Z' absolute time */\n\t\tswitch(fmt) {\n\t\t\tcase '[h]': case '[hh]': out = val.D*24+val.H; break;\n\t\t\tcase '[m]': case '[mm]': out = (val.D*24+val.H)*60+val.M; break;\n\t\t\tcase '[s]': case '[ss]': out = ((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u); break;\n\t\t\tdefault: throw 'bad abstime format: ' + fmt;\n\t\t} outl = fmt.length === 3 ? 1 : 2; break;\n\t\tcase 101: /* 'e' era */\n\t\t\tout = y; outl = 1; break;\n\t}\n\tvar outstr = outl > 0 ? pad0(out, outl) : \"\";\n\treturn outstr;\n}\n\n\n/*jshint -W086 */\n/*jshint +W086 */\nfunction commaify(s/*:string*/)/*:string*/ {\n\tvar w = 3;\n\tif(s.length <= w) return s;\n\tvar j = (s.length % w), o = s.substr(0,j);\n\tfor(; j!=s.length; j+=w) o+=(o.length > 0 ? \",\" : \"\") + s.substr(j,w);\n\treturn o;\n}\nvar pct1 = /%/g;\nfunction write_num_pct(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar sfmt = fmt.replace(pct1,\"\"), mul = fmt.length - sfmt.length;\n\treturn write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill(\"%\",mul);\n}\n\nfunction write_num_cm(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar idx = fmt.length - 1;\n\twhile(fmt.charCodeAt(idx-1) === 44) --idx;\n\treturn write_num(type, fmt.substr(0,idx), val / Math.pow(10,3*(fmt.length-idx)));\n}\n\nfunction write_num_exp(fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar o/*:string*/;\n\tvar idx = fmt.indexOf(\"E\") - fmt.indexOf(\".\") - 1;\n\tif(fmt.match(/^#+0.0E\\+0$/)) {\n\t\tif(val == 0) return \"0.0E+0\";\n\t\telse if(val < 0) return \"-\" + write_num_exp(fmt, -val);\n\t\tvar period = fmt.indexOf(\".\"); if(period === -1) period=fmt.indexOf('E');\n\t\tvar ee = Math.floor(Math.log(val)*Math.LOG10E)%period;\n\t\tif(ee < 0) ee += period;\n\t\to = (val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);\n\t\tif(o.indexOf(\"e\") === -1) {\n\t\t\tvar fakee = Math.floor(Math.log(val)*Math.LOG10E);\n\t\t\tif(o.indexOf(\".\") === -1) o = o.charAt(0) + \".\" + o.substr(1) + \"E+\" + (fakee - o.length+ee);\n\t\t\telse o += \"E+\" + (fakee - ee);\n\t\t\twhile(o.substr(0,2) === \"0.\") {\n\t\t\t\to = o.charAt(0) + o.substr(2,period) + \".\" + o.substr(2+period);\n\t\t\t\to = o.replace(/^0+([1-9])/,\"$1\").replace(/^0+\\./,\"0.\");\n\t\t\t}\n\t\t\to = o.replace(/\\+-/,\"-\");\n\t\t}\n\t\to = o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(period+ee)%period) + \".\" + $3.substr(ee) + \"E\"; });\n\t} else o = val.toExponential(idx);\n\tif(fmt.match(/E\\+00$/) && o.match(/e[+-]\\d$/)) o = o.substr(0,o.length-1) + \"0\" + o.charAt(o.length-1);\n\tif(fmt.match(/E\\-/) && o.match(/e\\+/)) o = o.replace(/e\\+/,\"e\");\n\treturn o.replace(\"e\",\"E\");\n}\nvar frac1 = /# (\\?+)( ?)\\/( ?)(\\d+)/;\nfunction write_num_f1(r/*:Array<string>*/, aval/*:number*/, sign/*:string*/)/*:string*/ {\n\tvar den = parseInt(r[4],10), rr = Math.round(aval * den), base = Math.floor(rr/den);\n\tvar myn = (rr - base*den), myd = den;\n\treturn sign + (base === 0 ? \"\" : \"\"+base) + \" \" + (myn === 0 ? fill(\" \", r[1].length + 1 + r[4].length) : pad_(myn,r[1].length) + r[2] + \"/\" + r[3] + pad0(myd,r[4].length));\n}\nfunction write_num_f2(r/*:Array<string>*/, aval/*:number*/, sign/*:string*/)/*:string*/ {\n\treturn sign + (aval === 0 ? \"\" : \"\"+aval) + fill(\" \", r[1].length + 2 + r[4].length);\n}\nvar dec1 = /^#*0*\\.([0#]+)/;\nvar closeparen = /\\).*[0#]/;\nvar phone = /\\(###\\) ###\\\\?-####/;\nfunction hashq(str/*:string*/)/*:string*/ {\n\tvar o = \"\", cc;\n\tfor(var i = 0; i != str.length; ++i) switch((cc=str.charCodeAt(i))) {\n\t\tcase 35: break;\n\t\tcase 63: o+= \" \"; break;\n\t\tcase 48: o+= \"0\"; break;\n\t\tdefault: o+= String.fromCharCode(cc);\n\t}\n\treturn o;\n}\nfunction rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return \"\"+(Math.round(val * dd)/dd); }\nfunction dec(val/*:number*/, d/*:number*/)/*:number*/ {\n\tvar _frac = val - Math.floor(val), dd = Math.pow(10,d);\n\tif (d < ('' + Math.round(_frac * dd)).length) return 0;\n\treturn Math.round(_frac * dd);\n}\nfunction carry(val/*:number*/, d/*:number*/)/*:number*/ {\n\tif (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\nfunction flr(val/*:number*/)/*:string*/ {\n\tif(val < 2147483647 && val > -2147483648) return \"\"+(val >= 0 ? (val|0) : (val-1|0));\n\treturn \"\"+Math.floor(val);\n}\nfunction write_num_flt(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {\n\tif(type.charCodeAt(0) === 40 && !fmt.match(closeparen)) {\n\t\tvar ffmt = fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");\n\t\tif(val >= 0) return write_num_flt('n', ffmt, val);\n\t\treturn '(' + write_num_flt('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_flt(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r/*:?Array<string>*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0r(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = pad0r(val,0); if(o === \"0\") o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f1(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0r(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\n\t\to = rnd(val, r[1].length).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1])).replace(/\\.(\\d*)$/,function($$, $1) { return \".\" + $1 + fill(\"0\", hashq(/*::(*/r/*::||[\"\"])*/[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + rnd(aval, r[2].length).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify(pad0r(aval,0));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_flt(type, fmt, -val) : commaify(\"\"+(Math.floor(val) + carry(val, r[1].length))) + \".\" + pad0(dec(val, r[1].length),r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_flt(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri<o.length?o.charAt(ri++):x==='0'?'0':\"\";}));\n\t}\n\tif(fmt.match(phone)) {\n\t\to = write_num_flt(type, \"##########\", val);\n\t\treturn \"(\" + o.substr(0,3) + \") \" + o.substr(3, 3) + \"-\" + o.substr(6);\n\t}\n\tvar oa = \"\";\n\tif((r = fmt.match(/^([#0?]+)( ?)\\/( ?)([#0?]+)/))) {\n\t\tri = Math.min(/*::String(*/r[4]/*::)*/.length,7);\n\t\tff = SSF_frac(aval, Math.pow(10,ri)-1, false);\n\t\to = \"\" + sign;\n\t\toa = write_num(\"n\", /*::String(*/r[1]/*::)*/, ff[1]);\n\t\tif(oa.charAt(oa.length-1) == \" \") oa = oa.substr(0,oa.length-1) + \"0\";\n\t\to += oa + /*::String(*/r[2]/*::)*/ + \"/\" + /*::String(*/r[3]/*::)*/;\n\t\toa = rpad_(ff[2],ri);\n\t\tif(oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length-oa.length)) + oa;\n\t\to += oa;\n\t\treturn o;\n\t}\n\tif((r = fmt.match(/^# ([#0?]+)( ?)\\/( ?)([#0?]+)/))) {\n\t\tri = Math.min(Math.max(r[1].length, r[4].length),7);\n\t\tff = SSF_frac(aval, Math.pow(10,ri)-1, true);\n\t\treturn sign + (ff[0]||(ff[1] ? \"\" : \"0\")) + \" \" + (ff[1] ? pad_(ff[1],ri) + r[2] + \"/\" + r[3] + rpad_(ff[2],ri): fill(\" \", 2*ri+1 + r[2].length + r[3].length));\n\t}\n\tif((r = fmt.match(/^[#0?]+$/))) {\n\t\to = pad0r(val, 0);\n\t\tif(fmt.length <= o.length) return o;\n\t\treturn hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(/^([#0?]+)\\.([#0]+)$/))) {\n\t\to = \"\" + val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,\"$1\");\n\t\tri = o.indexOf(\".\");\n\t\tvar lres = fmt.indexOf(\".\") - ri, rres = fmt.length - o.length - lres;\n\t\treturn hashq(fmt.substr(0,lres) + o + fmt.substr(fmt.length-rres));\n\t}\n\tif((r = fmt.match(/^00,000\\.([#0]*0)$/))) {\n\t\tri = dec(val, r[1].length);\n\t\treturn val < 0 ? \"-\" + write_num_flt(type, fmt, -val) : commaify(flr(val)).replace(/^\\d,\\d{3}$/,\"0$&\").replace(/^\\d*$/,function($$) { return \"00,\" + ($$.length < 3 ? pad0(0,3-$$.length) : \"\") + $$; }) + \".\" + pad0(ri,r[1].length);\n\t}\n\tswitch(fmt) {\n\t\tcase \"###,##0.00\": return write_num_flt(type, \"#,##0.00\", val);\n\t\tcase \"###,###\":\n\t\tcase \"##,###\":\n\t\tcase \"#,###\": var x = commaify(pad0r(aval,0)); return x !== \"0\" ? sign + x : \"\";\n\t\tcase \"###,###.00\": return write_num_flt(type, \"###,##0.00\",val).replace(/^0\\./,\".\");\n\t\tcase \"#,###.00\": return write_num_flt(type, \"#,##0.00\",val).replace(/^0\\./,\".\");\n\t\tdefault:\n\t}\n\tthrow new Error(\"unsupported format |\" + fmt + \"|\");\n}\nfunction write_num_cm2(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar idx = fmt.length - 1;\n\twhile(fmt.charCodeAt(idx-1) === 44) --idx;\n\treturn write_num(type, fmt.substr(0,idx), val / Math.pow(10,3*(fmt.length-idx)));\n}\nfunction write_num_pct2(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar sfmt = fmt.replace(pct1,\"\"), mul = fmt.length - sfmt.length;\n\treturn write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill(\"%\",mul);\n}\nfunction write_num_exp2(fmt/*:string*/, val/*:number*/)/*:string*/{\n\tvar o/*:string*/;\n\tvar idx = fmt.indexOf(\"E\") - fmt.indexOf(\".\") - 1;\n\tif(fmt.match(/^#+0.0E\\+0$/)) {\n\t\tif(val == 0) return \"0.0E+0\";\n\t\telse if(val < 0) return \"-\" + write_num_exp2(fmt, -val);\n\t\tvar period = fmt.indexOf(\".\"); if(period === -1) period=fmt.indexOf('E');\n\t\tvar ee = Math.floor(Math.log(val)*Math.LOG10E)%period;\n\t\tif(ee < 0) ee += period;\n\t\to = (val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);\n\t\tif(!o.match(/[Ee]/)) {\n\t\t\tvar fakee = Math.floor(Math.log(val)*Math.LOG10E);\n\t\t\tif(o.indexOf(\".\") === -1) o = o.charAt(0) + \".\" + o.substr(1) + \"E+\" + (fakee - o.length+ee);\n\t\t\telse o += \"E+\" + (fakee - ee);\n\t\t\to = o.replace(/\\+-/,\"-\");\n\t\t}\n\t\to = o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(period+ee)%period) + \".\" + $3.substr(ee) + \"E\"; });\n\t} else o = val.toExponential(idx);\n\tif(fmt.match(/E\\+00$/) && o.match(/e[+-]\\d$/)) o = o.substr(0,o.length-1) + \"0\" + o.charAt(o.length-1);\n\tif(fmt.match(/E\\-/) && o.match(/e\\+/)) o = o.replace(/e\\+/,\"e\");\n\treturn o.replace(\"e\",\"E\");\n}\nfunction write_num_int(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {\n\tif(type.charCodeAt(0) === 40 && !fmt.match(closeparen)) {\n\t\tvar ffmt = fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");\n\t\tif(val >= 0) return write_num_int('n', ffmt, val);\n\t\treturn '(' + write_num_int('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_int(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r/*:?Array<string>*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = (\"\"+val); if(val === 0) o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f2(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\n\t\t/*:: if(!Array.isArray(r)) throw new Error(\"unreachable\"); */\n\t\to = (\"\"+val).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1]));\n\t\to = o.replace(/\\.(\\d*)$/,function($$, $1) {\n\t\t/*:: if(!Array.isArray(r)) throw new Error(\"unreachable\"); */\n\t\t\treturn \".\" + $1 + fill(\"0\", hashq(r[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + (\"\"+aval).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify((\"\"+aval));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_int(type, fmt, -val) : commaify((\"\"+val)) + \".\" + fill('0',r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_int(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_int(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri<o.length?o.charAt(ri++):x==='0'?'0':\"\";}));\n\t}\n\tif(fmt.match(phone)) {\n\t\to = write_num_int(type, \"##########\", val);\n\t\treturn \"(\" + o.substr(0,3) + \") \" + o.substr(3, 3) + \"-\" + o.substr(6);\n\t}\n\tvar oa = \"\";\n\tif((r = fmt.match(/^([#0?]+)( ?)\\/( ?)([#0?]+)/))) {\n\t\tri = Math.min(/*::String(*/r[4]/*::)*/.length,7);\n\t\tff = SSF_frac(aval, Math.pow(10,ri)-1, false);\n\t\to = \"\" + sign;\n\t\toa = write_num(\"n\", /*::String(*/r[1]/*::)*/, ff[1]);\n\t\tif(oa.charAt(oa.length-1) == \" \") oa = oa.substr(0,oa.length-1) + \"0\";\n\t\to += oa + /*::String(*/r[2]/*::)*/ + \"/\" + /*::String(*/r[3]/*::)*/;\n\t\toa = rpad_(ff[2],ri);\n\t\tif(oa.length < r[4].length) oa = hashq(r[4].substr(r[4].length-oa.length)) + oa;\n\t\to += oa;\n\t\treturn o;\n\t}\n\tif((r = fmt.match(/^# ([#0?]+)( ?)\\/( ?)([#0?]+)/))) {\n\t\tri = Math.min(Math.max(r[1].length, r[4].length),7);\n\t\tff = SSF_frac(aval, Math.pow(10,ri)-1, true);\n\t\treturn sign + (ff[0]||(ff[1] ? \"\" : \"0\")) + \" \" + (ff[1] ? pad_(ff[1],ri) + r[2] + \"/\" + r[3] + rpad_(ff[2],ri): fill(\" \", 2*ri+1 + r[2].length + r[3].length));\n\t}\n\tif((r = fmt.match(/^[#0?]+$/))) {\n\t\to = \"\" + val;\n\t\tif(fmt.length <= o.length) return o;\n\t\treturn hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(/^([#0]+)\\.([#0]+)$/))) {\n\t\to = \"\" + val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,\"$1\");\n\t\tri = o.indexOf(\".\");\n\t\tvar lres = fmt.indexOf(\".\") - ri, rres = fmt.length - o.length - lres;\n\t\treturn hashq(fmt.substr(0,lres) + o + fmt.substr(fmt.length-rres));\n\t}\n\tif((r = fmt.match(/^00,000\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_int(type, fmt, -val) : commaify(\"\"+val).replace(/^\\d,\\d{3}$/,\"0$&\").replace(/^\\d*$/,function($$) { return \"00,\" + ($$.length < 3 ? pad0(0,3-$$.length) : \"\") + $$; }) + \".\" + pad0(0,r[1].length);\n\t}\n\tswitch(fmt) {\n\t\tcase \"###,###\":\n\t\tcase \"##,###\":\n\t\tcase \"#,###\": var x = commaify(\"\"+aval); return x !== \"0\" ? sign + x : \"\";\n\t\tdefault:\n\t\t\tif(fmt.match(/\\.[0#?]*$/)) return write_num_int(type, fmt.slice(0,fmt.lastIndexOf(\".\")), val) + hashq(fmt.slice(fmt.lastIndexOf(\".\")));\n\t}\n\tthrow new Error(\"unsupported format |\" + fmt + \"|\");\n}\nfunction write_num(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {\n\treturn (val|0) === val ? write_num_int(type, fmt, val) : write_num_flt(type, fmt, val);\n}\nfunction SSF_split_fmt(fmt/*:string*/)/*:Array<string>*/ {\n\tvar out/*:Array<string>*/ = [];\n\tvar in_str = false/*, cc*/;\n\tfor(var i = 0, j = 0; i < fmt.length; ++i) switch((/*cc=*/fmt.charCodeAt(i))) {\n\t\tcase 34: /* '\"' */\n\t\t\tin_str = !in_str; break;\n\t\tcase 95: case 42: case 92: /* '_' '*' '\\\\' */\n\t\t\t++i; break;\n\t\tcase 59: /* ';' */\n\t\t\tout[out.length] = fmt.substr(j,i-j);\n\t\t\tj = i+1;\n\t}\n\tout[out.length] = fmt.substr(j);\n\tif(in_str === true) throw new Error(\"Format |\" + fmt + \"| unterminated string \");\n\treturn out;\n}\n\nvar SSF_abstime = /\\[[HhMmSs\\u0E0A\\u0E19\\u0E17]*\\]/;\nfunction fmt_is_date(fmt/*:string*/)/*:boolean*/ {\n\tvar i = 0, /*cc = 0,*/ c = \"\", o = \"\";\n\twhile(i < fmt.length) {\n\t\tswitch((c = fmt.charAt(i))) {\n\t\t\tcase 'G': if(SSF_isgeneral(fmt, i)) i+= 6; i++; break;\n\t\t\tcase '\"': for(;(/*cc=*/fmt.charCodeAt(++i)) !== 34 && i < fmt.length;){/*empty*/} ++i; break;\n\t\t\tcase '\\\\': i+=2; break;\n\t\t\tcase '_': i+=2; break;\n\t\t\tcase '@': ++i; break;\n\t\t\tcase 'B': case 'b':\n\t\t\t\tif(fmt.charAt(i+1) === \"1\" || fmt.charAt(i+1) === \"2\") return true;\n\t\t\t\t/* falls through */\n\t\t\tcase 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':\n\t\t\t\t/* falls through */\n\t\t\tcase 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g': return true;\n\t\t\tcase 'A': case 'a': case '上':\n\t\t\t\tif(fmt.substr(i, 3).toUpperCase() === \"A/P\") return true;\n\t\t\t\tif(fmt.substr(i, 5).toUpperCase() === \"AM/PM\") return true;\n\t\t\t\tif(fmt.substr(i, 5).toUpperCase() === \"上午/下午\") return true;\n\t\t\t\t++i; break;\n\t\t\tcase '[':\n\t\t\t\to = c;\n\t\t\t\twhile(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);\n\t\t\t\tif(o.match(SSF_abstime)) return true;\n\t\t\t\tbreak;\n\t\t\tcase '.':\n\t\t\t\t/* falls through */\n\t\t\tcase '0': case '#':\n\t\t\t\twhile(i < fmt.length && (\"0#?.,E+-%\".indexOf(c=fmt.charAt(++i)) > -1 || (c=='\\\\' && fmt.charAt(i+1) == \"-\" && \"0#\".indexOf(fmt.charAt(i+2))>-1))){/* empty */}\n\t\t\t\tbreak;\n\t\t\tcase '?': while(fmt.charAt(++i) === c){/* empty */} break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break;\n\t\t\tcase '(': case ')': ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\twhile(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1){/* empty */} break;\n\t\t\tcase ' ': ++i; break;\n\t\t\tdefault: ++i; break;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction eval_fmt(fmt/*:string*/, v/*:any*/, opts/*:any*/, flen/*:number*/) {\n\tvar out = [], o = \"\", i = 0, c = \"\", lst='t', dt, j, cc;\n\tvar hr='H';\n\t/* Tokenize */\n\twhile(i < fmt.length) {\n\t\tswitch((c = fmt.charAt(i))) {\n\t\t\tcase 'G': /* General */\n\t\t\t\tif(!SSF_isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' +fmt);\n\t\t\t\tout[out.length] = {t:'G', v:'General'}; i+=7; break;\n\t\t\tcase '\"': /* Literal text */\n\t\t\t\tfor(o=\"\";(cc=fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc);\n\t\t\t\tout[out.length] = {t:'t', v:o}; ++i; break;\n\t\t\tcase '\\\\': var w = fmt.charAt(++i), t = (w === \"(\" || w === \")\") ? w : 't';\n\t\t\t\tout[out.length] = {t:t, v:w}; ++i; break;\n\t\t\tcase '_': out[out.length] = {t:'t', v:\" \"}; i+=2; break;\n\t\t\tcase '@': /* Text Placeholder */\n\t\t\t\tout[out.length] = {t:'T', v:v}; ++i; break;\n\t\t\tcase 'B': case 'b':\n\t\t\t\tif(fmt.charAt(i+1) === \"1\" || fmt.charAt(i+1) === \"2\") {\n\t\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts, fmt.charAt(i+1) === \"2\"); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':\n\t\t\t\tc = c.toLowerCase();\n\t\t\t\t/* falls through */\n\t\t\tcase 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g':\n\t\t\t\tif(v < 0) return \"\";\n\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\to = c; while(++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o+=c;\n\t\t\t\tif(c === 'm' && lst.toLowerCase() === 'h') c = 'M';\n\t\t\t\tif(c === 'h') c = hr;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase 'A': case 'a': case '上':\n\t\t\t\tvar q={t:c, v:c};\n\t\t\t\tif(dt==null) dt=SSF_parse_date_code(v, opts);\n\t\t\t\tif(fmt.substr(i, 3).toUpperCase() === \"A/P\") { if(dt!=null) q.v = dt.H >= 12 ? \"P\" : \"A\"; q.t = 'T'; hr='h';i+=3;}\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"AM/PM\") { if(dt!=null) q.v = dt.H >= 12 ? \"PM\" : \"AM\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"上午/下午\") { if(dt!=null) q.v = dt.H >= 12 ? \"下午\" : \"上午\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse { q.t = \"t\"; ++i; }\n\t\t\t\tif(dt==null && q.t === 'T') return \"\";\n\t\t\t\tout[out.length] = q; lst = c; break;\n\t\t\tcase '[':\n\t\t\t\to = c;\n\t\t\t\twhile(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);\n\t\t\t\tif(o.slice(-1) !== ']') throw 'unterminated \"[\" block: |' + o + '|';\n\t\t\t\tif(o.match(SSF_abstime)) {\n\t\t\t\t\tif(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'Z', v:o.toLowerCase()};\n\t\t\t\t\tlst = o.charAt(1);\n\t\t\t\t} else if(o.indexOf(\"$\") > -1) {\n\t\t\t\t\to = (o.match(/\\$([^-\\[\\]]*)/)||[])[1]||\"$\";\n\t\t\t\t\tif(!fmt_is_date(fmt)) out[out.length] = {t:'t',v:o};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t/* Numbers */\n\t\t\tcase '.':\n\t\t\t\tif(dt != null) {\n\t\t\t\t\to = c; while(++i < fmt.length && (c=fmt.charAt(i)) === \"0\") o += c;\n\t\t\t\t\tout[out.length] = {t:'s', v:o}; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase '0': case '#':\n\t\t\t\to = c; while(++i < fmt.length && \"0#?.,E+-%\".indexOf(c=fmt.charAt(i)) > -1) o += c;\n\t\t\t\tout[out.length] = {t:'n', v:o}; break;\n\t\t\tcase '?':\n\t\t\t\to = c; while(fmt.charAt(++i) === c) o+=c;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break; // **\n\t\t\tcase '(': case ')': out[out.length] = {t:(flen===1?'t':c), v:c}; ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\to = c; while(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1) o+=fmt.charAt(i);\n\t\t\t\tout[out.length] = {t:'D', v:o}; break;\n\t\t\tcase ' ': out[out.length] = {t:c, v:c}; ++i; break;\n\t\t\tcase '$': out[out.length] = {t:'t', v:'$'}; ++i; break;\n\t\t\tdefault:\n\t\t\t\tif(\",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP\".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt);\n\t\t\t\tout[out.length] = {t:'t', v:c}; ++i; break;\n\t\t}\n\t}\n\n\t/* Scan for date/time parts */\n\tvar bt = 0, ss0 = 0, ssm;\n\tfor(i=out.length-1, lst='t'; i >= 0; --i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 'h': case 'H': out[i].t = hr; lst='h'; if(bt < 1) bt = 1; break;\n\t\t\tcase 's':\n\t\t\t\tif((ssm=out[i].v.match(/\\.0+$/))) ss0=Math.max(ss0,ssm[0].length-1);\n\t\t\t\tif(bt < 3) bt = 3;\n\t\t\t/* falls through */\n\t\t\tcase 'd': case 'y': case 'M': case 'e': lst=out[i].t; break;\n\t\t\tcase 'm': if(lst === 's') { out[i].t = 'M'; if(bt < 2) bt = 2; } break;\n\t\t\tcase 'X': /*if(out[i].v === \"B2\");*/\n\t\t\t\tbreak;\n\t\t\tcase 'Z':\n\t\t\t\tif(bt < 1 && out[i].v.match(/[Hh]/)) bt = 1;\n\t\t\t\tif(bt < 2 && out[i].v.match(/[Mm]/)) bt = 2;\n\t\t\t\tif(bt < 3 && out[i].v.match(/[Ss]/)) bt = 3;\n\t\t}\n\t}\n\t/* time rounding depends on presence of minute / second / usec fields */\n\tswitch(bt) {\n\t\tcase 0: break;\n\t\tcase 1:\n\t\t\t/*::if(!dt) break;*/\n\t\t\tif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >=  60) { dt.S = 0; ++dt.M; }\n\t\t\tif(dt.M >=  60) { dt.M = 0; ++dt.H; }\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/*::if(!dt) break;*/\n\t\t\tif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >=  60) { dt.S = 0; ++dt.M; }\n\t\t\tbreak;\n\t}\n\n\t/* replace fields */\n\tvar nstr = \"\", jj;\n\tfor(i=0; i < out.length; ++i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 't': case 'T': case ' ': case 'D': break;\n\t\t\tcase 'X': out[i].v = \"\"; out[i].t = \";\"; break;\n\t\t\tcase 'd': case 'm': case 'y': case 'h': case 'H': case 'M': case 's': case 'e': case 'b': case 'Z':\n\t\t\t\t/*::if(!dt) throw \"unreachable\"; */\n\t\t\t\tout[i].v = SSF_write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0);\n\t\t\t\tout[i].t = 't'; break;\n\t\t\tcase 'n': case '?':\n\t\t\t\tjj = i+1;\n\t\t\t\twhile(out[jj] != null && (\n\t\t\t\t\t(c=out[jj].t) === \"?\" || c === \"D\" ||\n\t\t\t\t\t((c === \" \" || c === \"t\") && out[jj+1] != null && (out[jj+1].t === '?' || out[jj+1].t === \"t\" && out[jj+1].v === '/')) ||\n\t\t\t\t\t(out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) ||\n\t\t\t\t\t(c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj+1] != null && out[jj+1].t == '?'))\n\t\t\t\t)) {\n\t\t\t\t\tout[i].v += out[jj].v;\n\t\t\t\t\tout[jj] = {v:\"\", t:\";\"}; ++jj;\n\t\t\t\t}\n\t\t\t\tnstr += out[i].v;\n\t\t\t\ti = jj-1; break;\n\t\t\tcase 'G': out[i].t = 't'; out[i].v = SSF_general(v,opts); break;\n\t\t}\n\t}\n\tvar vv = \"\", myv, ostr;\n\tif(nstr.length > 0) {\n\t\tif(nstr.charCodeAt(0) == 40) /* '(' */ {\n\t\t\tmyv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t} else {\n\t\t\tmyv = (v<0 && flen > 1 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t\tif(myv < 0 && out[0] && out[0].t == 't') {\n\t\t\t\tostr = ostr.substr(1);\n\t\t\t\tout[0].v = \"-\" + out[0].v;\n\t\t\t}\n\t\t}\n\t\tjj=ostr.length-1;\n\t\tvar decpt = out.length;\n\t\tfor(i=0; i < out.length; ++i) if(out[i] != null && out[i].t != 't' && out[i].v.indexOf(\".\") > -1) { decpt = i; break; }\n\t\tvar lasti=out.length;\n\t\tif(decpt === out.length && ostr.indexOf(\"E\") === -1) {\n\t\t\tfor(i=out.length-1; i>= 0;--i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tif(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); }\n\t\t\t\telse if(jj < 0) out[i].v = \"\";\n\t\t\t\telse { out[i].v = ostr.substr(0, jj+1); jj = -1; }\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti<out.length) out[lasti].v = ostr.substr(0,jj+1) + out[lasti].v;\n\t\t}\n\t\telse if(decpt !== out.length && ostr.indexOf(\"E\") === -1) {\n\t\t\tjj = ostr.indexOf(\".\")-1;\n\t\t\tfor(i=decpt; i>= 0; --i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tj=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")-1:out[i].v.length-1;\n\t\t\t\tvv = out[i].v.substr(j+1);\n\t\t\t\tfor(; j>=0; --j) {\n\t\t\t\t\tif(jj>=0 && (out[i].v.charAt(j) === \"0\" || out[i].v.charAt(j) === \"#\")) vv = ostr.charAt(jj--) + vv;\n\t\t\t\t}\n\t\t\t\tout[i].v = vv;\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti<out.length) out[lasti].v = ostr.substr(0,jj+1) + out[lasti].v;\n\t\t\tjj = ostr.indexOf(\".\")+1;\n\t\t\tfor(i=decpt; i<out.length; ++i) {\n\t\t\t\tif(out[i] == null || ('n?('.indexOf(out[i].t) === -1 && i !== decpt)) continue;\n\t\t\t\tj=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")+1:0;\n\t\t\t\tvv = out[i].v.substr(0,j);\n\t\t\t\tfor(; j<out[i].v.length; ++j) {\n\t\t\t\t\tif(jj<ostr.length) vv += ostr.charAt(jj++);\n\t\t\t\t}\n\t\t\t\tout[i].v = vv;\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0; i<out.length; ++i) if(out[i] != null && 'n?'.indexOf(out[i].t)>-1) {\n\t\tmyv = (flen >1 && v < 0 && i>0 && out[i-1].v === \"-\" ? -v:v);\n\t\tout[i].v = write_num(out[i].t, out[i].v, myv);\n\t\tout[i].t = 't';\n\t}\n\tvar retval = \"\";\n\tfor(i=0; i !== out.length; ++i) if(out[i] != null) retval += out[i].v;\n\treturn retval;\n}\n\nvar cfregex2 = /\\[(=|>[=]?|<[>=]?)(-?\\d+(?:\\.\\d*)?)\\]/;\nfunction chkcond(v, rr) {\n\tif(rr == null) return false;\n\tvar thresh = parseFloat(rr[2]);\n\tswitch(rr[1]) {\n\t\tcase \"=\":  if(v == thresh) return true; break;\n\t\tcase \">\":  if(v >  thresh) return true; break;\n\t\tcase \"<\":  if(v <  thresh) return true; break;\n\t\tcase \"<>\": if(v != thresh) return true; break;\n\t\tcase \">=\": if(v >= thresh) return true; break;\n\t\tcase \"<=\": if(v <= thresh) return true; break;\n\t}\n\treturn false;\n}\nfunction choose_fmt(f/*:string*/, v/*:any*/) {\n\tvar fmt = SSF_split_fmt(f);\n\tvar l = fmt.length, lat = fmt[l-1].indexOf(\"@\");\n\tif(l<4 && lat>-1) --l;\n\tif(fmt.length > 4) throw new Error(\"cannot find right format for |\" + fmt.join(\"|\") + \"|\");\n\tif(typeof v !== \"number\") return [4, fmt.length === 4 || lat>-1?fmt[fmt.length-1]:\"@\"];\n\tswitch(fmt.length) {\n\t\tcase 1: fmt = lat>-1 ? [\"General\", \"General\", \"General\", fmt[0]] : [fmt[0], fmt[0], fmt[0], \"@\"]; break;\n\t\tcase 2: fmt = lat>-1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], \"@\"]; break;\n\t\tcase 3: fmt = lat>-1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], \"@\"]; break;\n\t\tcase 4: break;\n\t}\n\tvar ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2];\n\tif(fmt[0].indexOf(\"[\") === -1 && fmt[1].indexOf(\"[\") === -1) return [l, ff];\n\tif(fmt[0].match(/\\[[=<>]/) != null || fmt[1].match(/\\[[=<>]/) != null) {\n\t\tvar m1 = fmt[0].match(cfregex2);\n\t\tvar m2 = fmt[1].match(cfregex2);\n\t\treturn chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]];\n\t}\n\treturn [l, ff];\n}\nfunction SSF_format(fmt/*:string|number*/,v/*:any*/,o/*:?any*/) {\n\tif(o == null) o = {};\n\tvar sfmt = \"\";\n\tswitch(typeof fmt) {\n\t\tcase \"string\":\n\t\t\tif(fmt == \"m/d/yy\" && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = fmt;\n\t\t\tbreak;\n\t\tcase \"number\":\n\t\t\tif(fmt == 14 && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = (o.table != null ? (o.table/*:any*/) : table_fmt)[fmt];\n\t\t\tif(sfmt == null) sfmt = (o.table && o.table[SSF_default_map[fmt]]) || table_fmt[SSF_default_map[fmt]];\n\t\t\tif(sfmt == null) sfmt = SSF_default_str[fmt] || \"General\";\n\t\t\tbreak;\n\t}\n\tif(SSF_isgeneral(sfmt,0)) return SSF_general(v, o);\n\tif(v instanceof Date) v = datenum_local(v, o.date1904);\n\tvar f = choose_fmt(sfmt, v);\n\tif(SSF_isgeneral(f[1])) return SSF_general(v, o);\n\tif(v === true) v = \"TRUE\"; else if(v === false) v = \"FALSE\";\n\telse if(v === \"\" || v == null) return \"\";\n\treturn eval_fmt(f[1], v, o, f[0]);\n}\nfunction SSF_load(fmt/*:string*/, idx/*:?number*/)/*:number*/ {\n\tif(typeof idx != 'number') {\n\t\tidx = +idx || -1;\n/*::if(typeof idx != 'number') return 0x188; */\n\t\tfor(var i = 0; i < 0x0188; ++i) {\n/*::if(typeof idx != 'number') return 0x188; */\n\t\t\tif(table_fmt[i] == undefined) { if(idx < 0) idx = i; continue; }\n\t\t\tif(table_fmt[i] == fmt) { idx = i; break; }\n\t\t}\n/*::if(typeof idx != 'number') return 0x188; */\n\t\tif(idx < 0) idx = 0x187;\n\t}\n/*::if(typeof idx != 'number') return 0x188; */\n\ttable_fmt[idx] = fmt;\n\treturn idx;\n}\nfunction SSF_load_table(tbl/*:SSFTable*/)/*:void*/ {\n\tfor(var i=0; i!=0x0188; ++i)\n\t\tif(tbl[i] !== undefined) SSF_load(tbl[i], i);\n}\n\nfunction make_ssf() {\n\ttable_fmt = SSF_init_table();\n}\n\nvar SSF = {\n\tformat: SSF_format,\n\tload: SSF_load,\n\t_table: table_fmt,\n\tload_table: SSF_load_table,\n\tparse_date_code: SSF_parse_date_code,\n\tis_date: fmt_is_date,\n\tget_table: function get_table() { return SSF._table = table_fmt; }\n};\n\nvar SSFImplicit/*{[number]:string}*/ = ({\n\t\"5\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"6\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"7\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"8\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"23\": 'General', \"24\": 'General', \"25\": 'General', \"26\": 'General',\n\t\"27\": 'm/d/yy', \"28\": 'm/d/yy', \"29\": 'm/d/yy', \"30\": 'm/d/yy', \"31\": 'm/d/yy',\n\t\"32\": 'h:mm:ss', \"33\": 'h:mm:ss', \"34\": 'h:mm:ss', \"35\": 'h:mm:ss',\n\t\"36\": 'm/d/yy',\n\t\"41\": '_(* #,##0_);_(* \\(#,##0\\);_(* \"-\"_);_(@_)',\n\t\"42\": '_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"_);_(@_)',\n\t\"43\": '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)',\n\t\"44\": '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)',\n\t\"50\": 'm/d/yy', \"51\": 'm/d/yy', \"52\": 'm/d/yy', \"53\": 'm/d/yy', \"54\": 'm/d/yy',\n\t\"55\": 'm/d/yy', \"56\": 'm/d/yy', \"57\": 'm/d/yy', \"58\": 'm/d/yy',\n\t\"59\": '0',\n\t\"60\": '0.00',\n\t\"61\": '#,##0',\n\t\"62\": '#,##0.00',\n\t\"63\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"64\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"65\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"66\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"67\": '0%',\n\t\"68\": '0.00%',\n\t\"69\": '# ?/?',\n\t\"70\": '# ??/??',\n\t\"71\": 'm/d/yy',\n\t\"72\": 'm/d/yy',\n\t\"73\": 'd-mmm-yy',\n\t\"74\": 'd-mmm',\n\t\"75\": 'mmm-yy',\n\t\"76\": 'h:mm',\n\t\"77\": 'h:mm:ss',\n\t\"78\": 'm/d/yy h:mm',\n\t\"79\": 'mm:ss',\n\t\"80\": '[h]:mm:ss',\n\t\"81\": 'mmss.0'\n}/*:any*/);\n\n/* dateNF parse TODO: move to SSF */\nvar dateNFregex = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;\nfunction dateNF_regex(dateNF/*:string|number*/)/*:RegExp*/ {\n\tvar fmt = typeof dateNF == \"number\" ? table_fmt[dateNF] : dateNF;\n\tfmt = fmt.replace(dateNFregex, \"(\\\\d+)\");\n\treturn new RegExp(\"^\" + fmt + \"$\");\n}\nfunction dateNF_fix(str/*:string*/, dateNF/*:string*/, match/*:Array<string>*/)/*:string*/ {\n\tvar Y = -1, m = -1, d = -1, H = -1, M = -1, S = -1;\n\t(dateNF.match(dateNFregex)||[]).forEach(function(n, i) {\n\t\tvar v = parseInt(match[i+1], 10);\n\t\tswitch(n.toLowerCase().charAt(0)) {\n\t\t\tcase 'y': Y = v; break; case 'd': d = v; break;\n\t\t\tcase 'h': H = v; break; case 's': S = v; break;\n\t\t\tcase 'm': if(H >= 0) M = v; else m = v; break;\n\t\t}\n\t});\n\tif(S >= 0 && M == -1 && m >= 0) { M = m; m = -1; }\n\tvar datestr = ((\"\" + (Y>=0?Y: new Date().getFullYear())).slice(-4) + \"-\" + (\"00\" + (m>=1?m:1)).slice(-2) + \"-\" + (\"00\" + (d>=1?d:1)).slice(-2));\n\tif(datestr.length == 7) datestr = \"0\" + datestr;\n\tif(datestr.length == 8) datestr = \"20\" + datestr;\n\tvar timestr = ((\"00\" + (H>=0?H:0)).slice(-2) + \":\" + (\"00\" + (M>=0?M:0)).slice(-2) + \":\" + (\"00\" + (S>=0?S:0)).slice(-2));\n\tif(H == -1 && M == -1 && S == -1) return datestr;\n\tif(Y == -1 && m == -1 && d == -1) return timestr;\n\treturn datestr + \"T\" + timestr;\n}\n\n/*::\ndeclare var ReadShift:any;\ndeclare var CheckField:any;\ndeclare var prep_blob:any;\ndeclare var __readUInt32LE:any;\ndeclare var __readInt32LE:any;\ndeclare var __toBuffer:any;\ndeclare var __utf16le:any;\ndeclare var bconcat:any;\ndeclare var s2a:any;\ndeclare var chr0:any;\ndeclare var chr1:any;\ndeclare var has_buf:boolean;\ndeclare var new_buf:any;\ndeclare var new_raw_buf:any;\ndeclare var new_unsafe_buf:any;\ndeclare var Buffer_from:any;\n*/\n/* cfb.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*jshint eqnull:true */\n/*exported CFB */\n/*global Uint8Array:false, Uint16Array:false */\n\n/*::\ntype SectorEntry = {\n\tname?:string;\n\tnodes?:Array<number>;\n\tdata:RawBytes;\n};\ntype SectorList = {\n\t[k:string|number]:SectorEntry;\n\tname:?string;\n\tfat_addrs:Array<number>;\n\tssz:number;\n}\ntype CFBFiles = {[n:string]:CFBEntry};\n*/\n/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32 = /*#__PURE__*/(function() {\nvar CRC32 = {};\nCRC32.version = '1.2.0';\n/* see perf/crc32table.js */\n/*global Int32Array */\nfunction signed_crc_table()/*:any*/ {\n\tvar c = 0, table/*:Array<number>*/ = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T0 = signed_crc_table();\nfunction slice_by_16_tables(T) {\n\tvar c = 0, v = 0, n = 0, table/*:Array<number>*/ = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;\n\n\tfor(n = 0; n != 256; ++n) table[n] = T[n];\n\tfor(n = 0; n != 256; ++n) {\n\t\tv = T[n];\n\t\tfor(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];\n\t}\n\tvar out = [];\n\tfor(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);\n\treturn out;\n}\nvar TT = slice_by_16_tables(T0);\nvar T1 = TT[0],  T2 = TT[1],  T3 = TT[2],  T4 = TT[3],  T5 = TT[4];\nvar T6 = TT[5],  T7 = TT[6],  T8 = TT[7],  T9 = TT[8],  Ta = TT[9];\nvar Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];\nfunction crc32_bstr(bstr/*:string*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed/*:: ? 0 : 0 */ ^ -1;\n\tfor(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_buf(B/*:Uint8Array|Array<number>*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed/*:: ? 0 : 0 */ ^ -1, L = B.length - 15, i = 0;\n\tfor(; i < L;) C =\n\t\tTf[B[i++] ^ (C & 255)] ^\n\t\tTe[B[i++] ^ ((C >> 8) & 255)] ^\n\t\tTd[B[i++] ^ ((C >> 16) & 255)] ^\n\t\tTc[B[i++] ^ (C >>> 24)] ^\n\t\tTb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^\n\t\tT7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^\n\t\tT3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];\n\tL += 15;\n\twhile(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];\n\treturn ~C;\n}\n\nfunction crc32_str(str/*:string*/, seed/*:number*/)/*:number*/ {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L = str.length, c = 0, d = 0; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T0[(C^c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn ~C;\n}\nCRC32.table = T0;\nCRC32.bstr = crc32_bstr;\nCRC32.buf = crc32_buf;\nCRC32.str = crc32_str;\nreturn CRC32;\n})();\n/* [MS-CFB] v20171201 */\nvar CFB = /*#__PURE__*/(function _CFB(){\nvar exports = {};\nexports.version = '1.2.1';\n/* [MS-CFB] 2.6.4 */\nfunction namecmp(l/*:string*/, r/*:string*/)/*:number*/ {\n\tvar L = l.split(\"/\"), R = r.split(\"/\");\n\tfor(var i = 0, c = 0, Z = Math.min(L.length, R.length); i < Z; ++i) {\n\t\tif((c = L[i].length - R[i].length)) return c;\n\t\tif(L[i] != R[i]) return L[i] < R[i] ? -1 : 1;\n\t}\n\treturn L.length - R.length;\n}\nfunction dirname(p/*:string*/)/*:string*/ {\n\tif(p.charAt(p.length - 1) == \"/\") return (p.slice(0,-1).indexOf(\"/\") === -1) ? p : dirname(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(0, c+1);\n}\n\nfunction filename(p/*:string*/)/*:string*/ {\n\tif(p.charAt(p.length - 1) == \"/\") return filename(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(c+1);\n}\n/* -------------------------------------------------------------------------- */\n/* DOS Date format:\n   high|YYYYYYYm.mmmddddd.HHHHHMMM.MMMSSSSS|low\n   add 1980 to stored year\n   stored second should be doubled\n*/\n\n/* write JS date to buf as a DOS date */\nfunction write_dos_date(buf/*:CFBlob*/, date/*:Date|string*/) {\n\tif(typeof date === \"string\") date = new Date(date);\n\tvar hms/*:number*/ = date.getHours();\n\thms = hms << 6 | date.getMinutes();\n\thms = hms << 5 | (date.getSeconds()>>>1);\n\tbuf.write_shift(2, hms);\n\tvar ymd/*:number*/ = (date.getFullYear() - 1980);\n\tymd = ymd << 4 | (date.getMonth()+1);\n\tymd = ymd << 5 | date.getDate();\n\tbuf.write_shift(2, ymd);\n}\n\n/* read four bytes from buf and interpret as a DOS date */\nfunction parse_dos_date(buf/*:CFBlob*/)/*:Date*/ {\n\tvar hms = buf.read_shift(2) & 0xFFFF;\n\tvar ymd = buf.read_shift(2) & 0xFFFF;\n\tvar val = new Date();\n\tvar d = ymd & 0x1F; ymd >>>= 5;\n\tvar m = ymd & 0x0F; ymd >>>= 4;\n\tval.setMilliseconds(0);\n\tval.setFullYear(ymd + 1980);\n\tval.setMonth(m-1);\n\tval.setDate(d);\n\tvar S = hms & 0x1F; hms >>>= 5;\n\tvar M = hms & 0x3F; hms >>>= 6;\n\tval.setHours(hms);\n\tval.setMinutes(M);\n\tval.setSeconds(S<<1);\n\treturn val;\n}\nfunction parse_extra_field(blob/*:CFBlob*/)/*:any*/ {\n\tprep_blob(blob, 0);\n\tvar o = /*::(*/{}/*:: :any)*/;\n\tvar flags = 0;\n\twhile(blob.l <= blob.length - 4) {\n\t\tvar type = blob.read_shift(2);\n\t\tvar sz = blob.read_shift(2), tgt = blob.l + sz;\n\t\tvar p = {};\n\t\tswitch(type) {\n\t\t\t/* UNIX-style Timestamps */\n\t\t\tcase 0x5455: {\n\t\t\t\tflags = blob.read_shift(1);\n\t\t\t\tif(flags & 1) p.mtime = blob.read_shift(4);\n\t\t\t\t/* for some reason, CD flag corresponds to LFH */\n\t\t\t\tif(sz > 5) {\n\t\t\t\t\tif(flags & 2) p.atime = blob.read_shift(4);\n\t\t\t\t\tif(flags & 4) p.ctime = blob.read_shift(4);\n\t\t\t\t}\n\t\t\t\tif(p.mtime) p.mt = new Date(p.mtime*1000);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tblob.l = tgt;\n\t\to[type] = p;\n\t}\n\treturn o;\n}\nvar fs/*:: = require('fs'); */;\nfunction get_fs() { return fs || (fs = {}); }\nfunction parse(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\nif(file[0] == 0x50 && file[1] == 0x4b) return parse_zip(file, options);\nif((file[0] | 0x20) == 0x6d && (file[1]|0x20) == 0x69) return parse_mad(file, options);\nif(file.length < 512) throw new Error(\"CFB file size \" + file.length + \" < 512\");\nvar mver = 3;\nvar ssz = 512;\nvar nmfs = 0; // number of mini FAT sectors\nvar difat_sec_cnt = 0;\nvar dir_start = 0;\nvar minifat_start = 0;\nvar difat_start = 0;\n\nvar fat_addrs/*:Array<number>*/ = []; // locations of FAT sectors\n\n/* [MS-CFB] 2.2 Compound File Header */\nvar blob/*:CFBlob*/ = /*::(*/file.slice(0,512)/*:: :any)*/;\nprep_blob(blob, 0);\n\n/* major version */\nvar mv = check_get_mver(blob);\nmver = mv[0];\nswitch(mver) {\n\tcase 3: ssz = 512; break; case 4: ssz = 4096; break;\n\tcase 0: if(mv[1] == 0) return parse_zip(file, options);\n\t/* falls through */\n\tdefault: throw new Error(\"Major Version: Expected 3 or 4 saw \" + mver);\n}\n\n/* reprocess header */\nif(ssz !== 512) { blob = /*::(*/file.slice(0,ssz)/*:: :any)*/; prep_blob(blob, 28 /* blob.l */); }\n/* Save header for final object */\nvar header/*:RawBytes*/ = file.slice(0,ssz);\n\ncheck_shifts(blob, mver);\n\n// Number of Directory Sectors\nvar dir_cnt/*:number*/ = blob.read_shift(4, 'i');\nif(mver === 3 && dir_cnt !== 0) throw new Error('# Directory Sectors: Expected 0 saw ' + dir_cnt);\n\n// Number of FAT Sectors\nblob.l += 4;\n\n// First Directory Sector Location\ndir_start = blob.read_shift(4, 'i');\n\n// Transaction Signature\nblob.l += 4;\n\n// Mini Stream Cutoff Size\nblob.chk('00100000', 'Mini Stream Cutoff Size: ');\n\n// First Mini FAT Sector Location\nminifat_start = blob.read_shift(4, 'i');\n\n// Number of Mini FAT Sectors\nnmfs = blob.read_shift(4, 'i');\n\n// First DIFAT sector location\ndifat_start = blob.read_shift(4, 'i');\n\n// Number of DIFAT Sectors\ndifat_sec_cnt = blob.read_shift(4, 'i');\n\n// Grab FAT Sector Locations\nfor(var q = -1, j = 0; j < 109; ++j) { /* 109 = (512 - blob.l)>>>2; */\n\tq = blob.read_shift(4, 'i');\n\tif(q<0) break;\n\tfat_addrs[j] = q;\n}\n\n/** Break the file up into sectors */\nvar sectors/*:Array<RawBytes>*/ = sectorify(file, ssz);\n\nsleuth_fat(difat_start, difat_sec_cnt, sectors, ssz, fat_addrs);\n\n/** Chains */\nvar sector_list/*:SectorList*/ = make_sector_list(sectors, dir_start, fat_addrs, ssz);\n\nsector_list[dir_start].name = \"!Directory\";\nif(nmfs > 0 && minifat_start !== ENDOFCHAIN) sector_list[minifat_start].name = \"!MiniFAT\";\nsector_list[fat_addrs[0]].name = \"!FAT\";\nsector_list.fat_addrs = fat_addrs;\nsector_list.ssz = ssz;\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nvar files/*:CFBFiles*/ = {}, Paths/*:Array<string>*/ = [], FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array<string>*/ = [];\nread_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, minifat_start);\n\nbuild_full_paths(FileIndex, FullPaths, Paths);\nPaths.shift();\n\nvar o = {\n\tFileIndex: FileIndex,\n\tFullPaths: FullPaths\n};\n\n// $FlowIgnore\nif(options && options.raw) o.raw = {header: header, sectors: sectors};\nreturn o;\n} // parse\n\n/* [MS-CFB] 2.2 Compound File Header -- read up to major version */\nfunction check_get_mver(blob/*:CFBlob*/)/*:[number, number]*/ {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver/*:number*/ = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}\nfunction check_shifts(blob/*:CFBlob*/, mver/*:number*/)/*:void*/ {\n\tvar shift = 0x09;\n\n\t// Byte Order\n\t//blob.chk('feff', 'Byte Order: '); // note: some writers put 0xffff\n\tblob.l += 2;\n\n\t// Sector Shift\n\tswitch((shift = blob.read_shift(2))) {\n\t\tcase 0x09: if(mver != 3) throw new Error('Sector Shift: Expected 9 saw ' + shift); break;\n\t\tcase 0x0c: if(mver != 4) throw new Error('Sector Shift: Expected 12 saw ' + shift); break;\n\t\tdefault: throw new Error('Sector Shift: Expected 9 or 12 saw ' + shift);\n\t}\n\n\t// Mini Sector Shift\n\tblob.chk('0600', 'Mini Sector Shift: ');\n\n\t// Reserved\n\tblob.chk('000000000000', 'Reserved: ');\n}\n\n/** Break the file up into sectors */\nfunction sectorify(file/*:RawBytes*/, ssz/*:number*/)/*:Array<RawBytes>*/ {\n\tvar nsectors = Math.ceil(file.length/ssz)-1;\n\tvar sectors/*:Array<RawBytes>*/ = [];\n\tfor(var i=1; i < nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);\n\tsectors[nsectors-1] = file.slice(nsectors*ssz);\n\treturn sectors;\n}\n\n/* [MS-CFB] 2.6.4 Red-Black Tree */\nfunction build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array<string>*/, Paths/*:Array<string>*/)/*:void*/ {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad/*:Array<number>*/ = [], q/*:Array<number>*/ = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}\n\nfunction get_mfat_entry(entry/*:CFBEntry*/, payload/*:RawBytes*/, mini/*:?RawBytes*/)/*:CFBlob*/ {\n\tvar start = entry.start, size = entry.size;\n\t//return (payload.slice(start*MSSZ, start*MSSZ + size)/*:any*/);\n\tvar o = [];\n\tvar idx = start;\n\twhile(mini && size > 0 && idx >= 0) {\n\t\to.push(payload.slice(idx * MSSZ, idx * MSSZ + MSSZ));\n\t\tsize -= MSSZ;\n\t\tidx = __readInt32LE(mini, idx * 4);\n\t}\n\tif(o.length === 0) return (new_buf(0)/*:any*/);\n\treturn (bconcat(o).slice(0, entry.size)/*:any*/);\n}\n\n/** Chase down the rest of the DIFAT chain to build a comprehensive list\n    DIFAT chains by storing the next sector number as the last 32 bits */\nfunction sleuth_fat(idx/*:number*/, cnt/*:number*/, sectors/*:Array<RawBytes>*/, ssz/*:number*/, fat_addrs)/*:void*/ {\n\tvar q/*:number*/ = ENDOFCHAIN;\n\tif(idx === ENDOFCHAIN) {\n\t\tif(cnt !== 0) throw new Error(\"DIFAT chain shorter than expected\");\n\t} else if(idx !== -1 /*FREESECT*/) {\n\t\tvar sector = sectors[idx], m = (ssz>>>2)-1;\n\t\tif(!sector) return;\n\t\tfor(var i = 0; i < m; ++i) {\n\t\t\tif((q = __readInt32LE(sector,i*4)) === ENDOFCHAIN) break;\n\t\t\tfat_addrs.push(q);\n\t\t}\n\t\tsleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);\n\t}\n}\n\n/** Follow the linked list of sectors for a given starting point */\nfunction get_sector_list(sectors/*:Array<RawBytes>*/, start/*:number*/, fat_addrs/*:Array<number>*/, ssz/*:number*/, chkd/*:?Array<boolean>*/)/*:SectorEntry*/ {\n\tvar buf/*:Array<number>*/ = [], buf_chain/*:Array<any>*/ = [];\n\tif(!chkd) chkd = [];\n\tvar modulus = ssz - 1, j = 0, jj = 0;\n\tfor(j=start; j>=0;) {\n\t\tchkd[j] = true;\n\t\tbuf[buf.length] = j;\n\t\tbuf_chain.push(sectors[j]);\n\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\tjj = ((j*4) & modulus);\n\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\tif(!sectors[addr]) break;\n\t\tj = __readInt32LE(sectors[addr], jj);\n\t}\n\treturn {nodes: buf, data:__toBuffer([buf_chain])};\n}\n\n/** Chase down the sector linked lists */\nfunction make_sector_list(sectors/*:Array<RawBytes>*/, dir_start/*:number*/, fat_addrs/*:Array<number>*/, ssz/*:number*/)/*:SectorList*/ {\n\tvar sl = sectors.length, sector_list/*:SectorList*/ = ([]/*:any*/);\n\tvar chkd/*:Array<boolean>*/ = [], buf/*:Array<number>*/ = [], buf_chain/*:Array<RawBytes>*/ = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]/*:Array<number>*/);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr/*:number*/ = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])}/*:SectorEntry*/);\n\t}\n\treturn sector_list;\n}\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nfunction read_directory(dir_start/*:number*/, sector_list/*:SectorList*/, sectors/*:Array<RawBytes>*/, Paths/*:Array<string>*/, nmfs, files, FileIndex, mini) {\n\tvar minifat_store = 0, pl = (Paths.length?2:0);\n\tvar sector = sector_list[dir_start].data;\n\tvar i = 0, namelen = 0, name;\n\tfor(; i < sector.length; i+= 128) {\n\t\tvar blob/*:CFBlob*/ = /*::(*/sector.slice(i, i+128)/*:: :any)*/;\n\t\tprep_blob(blob, 64);\n\t\tnamelen = blob.read_shift(2);\n\t\tname = __utf16le(blob,0,namelen-pl);\n\t\tPaths.push(name);\n\t\tvar o/*:CFBEntry*/ = ({\n\t\t\tname:  name,\n\t\t\ttype:  blob.read_shift(1),\n\t\t\tcolor: blob.read_shift(1),\n\t\t\tL:     blob.read_shift(4, 'i'),\n\t\t\tR:     blob.read_shift(4, 'i'),\n\t\t\tC:     blob.read_shift(4, 'i'),\n\t\t\tclsid: blob.read_shift(16),\n\t\t\tstate: blob.read_shift(4, 'i'),\n\t\t\tstart: 0,\n\t\t\tsize: 0\n\t\t});\n\t\tvar ctime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(ctime !== 0) o.ct = read_date(blob, blob.l-8);\n\t\tvar mtime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(mtime !== 0) o.mt = read_date(blob, blob.l-8);\n\t\to.start = blob.read_shift(4, 'i');\n\t\to.size = blob.read_shift(4, 'i');\n\t\tif(o.size < 0 && o.start < 0) { o.size = o.type = 0; o.start = ENDOFCHAIN; o.name = \"\"; }\n\t\tif(o.type === 5) { /* root */\n\t\t\tminifat_store = o.start;\n\t\t\tif(nmfs > 0 && minifat_store !== ENDOFCHAIN) sector_list[minifat_store].name = \"!StreamData\";\n\t\t\t/*minifat_size = o.size;*/\n\t\t} else if(o.size >= 4096 /* MSCSZ */) {\n\t\t\to.storage = 'fat';\n\t\t\tif(sector_list[o.start] === undefined) sector_list[o.start] = get_sector_list(sectors, o.start, sector_list.fat_addrs, sector_list.ssz);\n\t\t\tsector_list[o.start].name = o.name;\n\t\t\to.content = (sector_list[o.start].data.slice(0,o.size)/*:any*/);\n\t\t} else {\n\t\t\to.storage = 'minifat';\n\t\t\tif(o.size < 0) o.size = 0;\n\t\t\telse if(minifat_store !== ENDOFCHAIN && o.start !== ENDOFCHAIN && sector_list[minifat_store]) {\n\t\t\t\to.content = get_mfat_entry(o, sector_list[minifat_store].data, (sector_list[mini]||{}).data);\n\t\t\t}\n\t\t}\n\t\tif(o.content) prep_blob(o.content, 0);\n\t\tfiles[name] = o;\n\t\tFileIndex.push(o);\n\t}\n}\n\nfunction read_date(blob/*:RawBytes|CFBlob*/, offset/*:number*/)/*:Date*/ {\n\treturn new Date(( ( (__readUInt32LE(blob,offset+4)/1e7)*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7 ) - 11644473600)*1000);\n}\n\nfunction read_file(filename/*:string*/, options/*:CFBReadOpts*/) {\n\tget_fs();\n\treturn parse(fs.readFileSync(filename), options);\n}\n\nfunction read(blob/*:RawBytes|string*/, options/*:CFBReadOpts*/) {\n\tvar type = options && options.type;\n\tif(!type) {\n\t\tif(has_buf && Buffer.isBuffer(blob)) type = \"buffer\";\n\t}\n\tswitch(type || \"base64\") {\n\t\tcase \"file\": /*:: if(typeof blob !== 'string') throw \"Must pass a filename when type='file'\"; */return read_file(blob, options);\n\t\tcase \"base64\": /*:: if(typeof blob !== 'string') throw \"Must pass a base64-encoded binary string when type='file'\"; */return parse(s2a(Base64_decode(blob)), options);\n\t\tcase \"binary\": /*:: if(typeof blob !== 'string') throw \"Must pass a binary string when type='file'\"; */return parse(s2a(blob), options);\n\t}\n\treturn parse(/*::typeof blob == 'string' ? new Buffer(blob, 'utf-8') : */blob, options);\n}\n\nfunction init_cfb(cfb/*:CFBContainer*/, opts/*:?any*/)/*:void*/ {\n\tvar o = opts || {}, root = o.root || \"Root Entry\";\n\tif(!cfb.FullPaths) cfb.FullPaths = [];\n\tif(!cfb.FileIndex) cfb.FileIndex = [];\n\tif(cfb.FullPaths.length !== cfb.FileIndex.length) throw new Error(\"inconsistent CFB structure\");\n\tif(cfb.FullPaths.length === 0) {\n\t\tcfb.FullPaths[0] = root + \"/\";\n\t\tcfb.FileIndex[0] = ({ name: root, type: 5 }/*:any*/);\n\t}\n\tif(o.CLSID) cfb.FileIndex[0].clsid = o.CLSID;\n\tseed_cfb(cfb);\n}\nfunction seed_cfb(cfb/*:CFBContainer*/)/*:void*/ {\n\tvar nm = \"\\u0001Sh33tJ5\";\n\tif(CFB.find(cfb, \"/\" + nm)) return;\n\tvar p = new_buf(4); p[0] = 55; p[1] = p[3] = 50; p[2] = 54;\n\tcfb.FileIndex.push(({ name: nm, type: 2, content:p, size:4, L:69, R:69, C:69 }/*:any*/));\n\tcfb.FullPaths.push(cfb.FullPaths[0] + nm);\n\trebuild_cfb(cfb);\n}\nfunction rebuild_cfb(cfb/*:CFBContainer*/, f/*:?boolean*/)/*:void*/ {\n\tinit_cfb(cfb);\n\tvar gc = false, s = false;\n\tfor(var i = cfb.FullPaths.length - 1; i >= 0; --i) {\n\t\tvar _file = cfb.FileIndex[i];\n\t\tswitch(_file.type) {\n\t\t\tcase 0:\n\t\t\t\tif(s) gc = true;\n\t\t\t\telse { cfb.FileIndex.pop(); cfb.FullPaths.pop(); }\n\t\t\t\tbreak;\n\t\t\tcase 1: case 2: case 5:\n\t\t\t\ts = true;\n\t\t\t\tif(isNaN(_file.R * _file.L * _file.C)) gc = true;\n\t\t\t\tif(_file.R > -1 && _file.L > -1 && _file.R == _file.L) gc = true;\n\t\t\t\tbreak;\n\t\t\tdefault: gc = true; break;\n\t\t}\n\t}\n\tif(!gc && !f) return;\n\n\tvar now = new Date(1987, 1, 19), j = 0;\n\t// Track which names exist\n\tvar fullPaths = Object.create ? Object.create(null) : {};\n\tvar data/*:Array<[string, CFBEntry]>*/ = [];\n\tfor(i = 0; i < cfb.FullPaths.length; ++i) {\n\t\tfullPaths[cfb.FullPaths[i]] = true;\n\t\tif(cfb.FileIndex[i].type === 0) continue;\n\t\tdata.push([cfb.FullPaths[i], cfb.FileIndex[i]]);\n\t}\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar dad = dirname(data[i][0]);\n\t\ts = fullPaths[dad];\n\t\tif(!s) {\n\t\t\tdata.push([dad, ({\n\t\t\t\tname: filename(dad).replace(\"/\",\"\"),\n\t\t\t\ttype: 1,\n\t\t\t\tclsid: HEADER_CLSID,\n\t\t\t\tct: now, mt: now,\n\t\t\t\tcontent: null\n\t\t\t}/*:any*/)]);\n\t\t\t// Add name to set\n\t\t\tfullPaths[dad] = true;\n\t\t}\n\t}\n\n\tdata.sort(function(x,y) { return namecmp(x[0], y[0]); });\n\tcfb.FullPaths = []; cfb.FileIndex = [];\n\tfor(i = 0; i < data.length; ++i) { cfb.FullPaths[i] = data[i][0]; cfb.FileIndex[i] = data[i][1]; }\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar elt = cfb.FileIndex[i];\n\t\tvar nm = cfb.FullPaths[i];\n\n\t\telt.name =  filename(nm).replace(\"/\",\"\");\n\t\telt.L = elt.R = elt.C = -(elt.color = 1);\n\t\telt.size = elt.content ? elt.content.length : 0;\n\t\telt.start = 0;\n\t\telt.clsid = (elt.clsid || HEADER_CLSID);\n\t\tif(i === 0) {\n\t\t\telt.C = data.length > 1 ? 1 : -1;\n\t\t\telt.size = 0;\n\t\t\telt.type = 5;\n\t\t} else if(nm.slice(-1) == \"/\") {\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==nm) break;\n\t\t\telt.C = j >= data.length ? -1 : j;\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==dirname(nm)) break;\n\t\t\telt.R = j >= data.length ? -1 : j;\n\t\t\telt.type = 1;\n\t\t} else {\n\t\t\tif(dirname(cfb.FullPaths[i+1]||\"\") == dirname(nm)) elt.R = i + 1;\n\t\t\telt.type = 2;\n\t\t}\n\t}\n\n}\n\nfunction _write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {\n\tvar _opts = options || {};\n\t/* MAD is order-sensitive, skip rebuild and sort */\n\tif(_opts.fileType == 'mad') return write_mad(cfb, _opts);\n\trebuild_cfb(cfb);\n\tswitch(_opts.fileType) {\n\t\tcase 'zip': return write_zip(cfb, _opts);\n\t\t//case 'mad': return write_mad(cfb, _opts);\n\t}\n\tvar L = (function(cfb/*:CFBContainer*/)/*:Array<number>*/{\n\t\tvar mini_size = 0, fat_size = 0;\n\t\tfor(var i = 0; i < cfb.FileIndex.length; ++i) {\n\t\t\tvar file = cfb.FileIndex[i];\n\t\t\tif(!file.content) continue;\n\t\t\t/*:: if(file.content == null) throw new Error(\"unreachable\"); */\n\t\t\tvar flen = file.content.length;\n\t\t\tif(flen > 0){\n\t\t\t\tif(flen < 0x1000) mini_size += (flen + 0x3F) >> 6;\n\t\t\t\telse fat_size += (flen + 0x01FF) >> 9;\n\t\t\t}\n\t\t}\n\t\tvar dir_cnt = (cfb.FullPaths.length +3) >> 2;\n\t\tvar mini_cnt = (mini_size + 7) >> 3;\n\t\tvar mfat_cnt = (mini_size + 0x7F) >> 7;\n\t\tvar fat_base = mini_cnt + fat_size + dir_cnt + mfat_cnt;\n\t\tvar fat_cnt = (fat_base + 0x7F) >> 7;\n\t\tvar difat_cnt = fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\twhile(((fat_base + fat_cnt + difat_cnt + 0x7F) >> 7) > fat_cnt) difat_cnt = ++fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\tvar L =  [1, difat_cnt, fat_cnt, mfat_cnt, dir_cnt, fat_size, mini_size, 0];\n\t\tcfb.FileIndex[0].size = mini_size << 6;\n\t\tL[7] = (cfb.FileIndex[0].start=L[0]+L[1]+L[2]+L[3]+L[4]+L[5])+((L[6]+7) >> 3);\n\t\treturn L;\n\t})(cfb);\n\tvar o = new_buf(L[7] << 9);\n\tvar i = 0, T = 0;\n\t{\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(1, HEADER_SIG[i]);\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(2, 0);\n\t\to.write_shift(2, 0x003E);\n\t\to.write_shift(2, 0x0003);\n\t\to.write_shift(2, 0xFFFE);\n\t\to.write_shift(2, 0x0009);\n\t\to.write_shift(2, 0x0006);\n\t\tfor(i = 0; i < 3; ++i) o.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, L[2]);\n\t\to.write_shift(4, L[0] + L[1] + L[2] + L[3] - 1);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, 1<<12);\n\t\to.write_shift(4, L[3] ? L[0] + L[1] + L[2] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[3]);\n\t\to.write_shift(-4, L[1] ? L[0] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[1]);\n\t\tfor(i = 0; i < 109; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t}\n\tif(L[1]) {\n\t\tfor(T = 0; T < L[1]; ++T) {\n\t\t\tfor(; i < 236 + T * 127; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t\t\to.write_shift(-4, T === L[1] - 1 ? ENDOFCHAIN : T + 1);\n\t\t}\n\t}\n\tvar chainit = function(w/*:number*/)/*:void*/ {\n\t\tfor(T += w; i<T-1; ++i) o.write_shift(-4, i+1);\n\t\tif(w) { ++i; o.write_shift(-4, ENDOFCHAIN); }\n\t};\n\tT = i = 0;\n\tfor(T+=L[1]; i<T; ++i) o.write_shift(-4, consts.DIFSECT);\n\tfor(T+=L[2]; i<T; ++i) o.write_shift(-4, consts.FATSECT);\n\tchainit(L[3]);\n\tchainit(L[4]);\n\tvar j/*:number*/ = 0, flen/*:number*/ = 0;\n\tvar file/*:CFBEntry*/ = cfb.FileIndex[0];\n\tfor(; j < cfb.FileIndex.length; ++j) {\n\t\tfile = cfb.FileIndex[j];\n\t\tif(!file.content) continue;\n\t\t/*:: if(file.content == null) throw new Error(\"unreachable\"); */\n\t\tflen = file.content.length;\n\t\tif(flen < 0x1000) continue;\n\t\tfile.start = T;\n\t\tchainit((flen + 0x01FF) >> 9);\n\t}\n\tchainit((L[6] + 7) >> 3);\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tT = i = 0;\n\tfor(j = 0; j < cfb.FileIndex.length; ++j) {\n\t\tfile = cfb.FileIndex[j];\n\t\tif(!file.content) continue;\n\t\t/*:: if(file.content == null) throw new Error(\"unreachable\"); */\n\t\tflen = file.content.length;\n\t\tif(!flen || flen >= 0x1000) continue;\n\t\tfile.start = T;\n\t\tchainit((flen + 0x3F) >> 6);\n\t}\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tfor(i = 0; i < L[4]<<2; ++i) {\n\t\tvar nm = cfb.FullPaths[i];\n\t\tif(!nm || nm.length === 0) {\n\t\t\tfor(j = 0; j < 17; ++j) o.write_shift(4, 0);\n\t\t\tfor(j = 0; j < 3; ++j) o.write_shift(4, -1);\n\t\t\tfor(j = 0; j < 12; ++j) o.write_shift(4, 0);\n\t\t\tcontinue;\n\t\t}\n\t\tfile = cfb.FileIndex[i];\n\t\tif(i === 0) file.start = file.size ? file.start - 1 : ENDOFCHAIN;\n\t\tvar _nm/*:string*/ = (i === 0 && _opts.root) || file.name;\n\t\tflen = 2*(_nm.length+1);\n\t\to.write_shift(64, _nm, \"utf16le\");\n\t\to.write_shift(2, flen);\n\t\to.write_shift(1, file.type);\n\t\to.write_shift(1, file.color);\n\t\to.write_shift(-4, file.L);\n\t\to.write_shift(-4, file.R);\n\t\to.write_shift(-4, file.C);\n\t\tif(!file.clsid) for(j = 0; j < 4; ++j) o.write_shift(4, 0);\n\t\telse o.write_shift(16, file.clsid, \"hex\");\n\t\to.write_shift(4, file.state || 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, file.start);\n\t\to.write_shift(4, file.size); o.write_shift(4, 0);\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\n\t\t/*:: if(!file.content) throw new Error(\"unreachable\"); */\n\t\tif(file.size >= 0x1000) {\n\t\t\to.l = (file.start+1) << 9;\n\t\t\tif (has_buf && Buffer.isBuffer(file.content)) {\n\t\t\t\tfile.content.copy(o, o.l, 0, file.size);\n\t\t\t\t// o is a 0-filled Buffer so just set next offset\n\t\t\t\to.l += (file.size + 511) & -512;\n\t\t\t} else {\n\t\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\t\tfor(; j & 0x1FF; ++j) o.write_shift(1, 0);\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\n\t\t/*:: if(!file.content) throw new Error(\"unreachable\"); */\n\t\tif(file.size > 0 && file.size < 0x1000) {\n\t\t\tif (has_buf && Buffer.isBuffer(file.content)) {\n\t\t\t\tfile.content.copy(o, o.l, 0, file.size);\n\t\t\t\t// o is a 0-filled Buffer so just set next offset\n\t\t\t\to.l += (file.size + 63) & -64;\n\t\t\t} else {\n\t\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\t\tfor(; j & 0x3F; ++j) o.write_shift(1, 0);\n\t\t\t}\n\t\t}\n\t}\n\tif (has_buf) {\n\t\to.l = o.length;\n\t} else {\n\t\t// When using Buffer, already 0-filled\n\t\twhile(o.l < o.length) o.write_shift(1, 0);\n\t}\n\treturn o;\n}\n/* [MS-CFB] 2.6.4 (Unicode 3.0.1 case conversion) */\nfunction find(cfb/*:CFBContainer*/, path/*:string*/)/*:?CFBEntry*/ {\n\tvar UCFullPaths/*:Array<string>*/ = cfb.FullPaths.map(function(x) { return x.toUpperCase(); });\n\tvar UCPaths/*:Array<string>*/ = UCFullPaths.map(function(x) { var y = x.split(\"/\"); return y[y.length - (x.slice(-1) == \"/\" ? 2 : 1)]; });\n\tvar k/*:boolean*/ = false;\n\tif(path.charCodeAt(0) === 47 /* \"/\" */) { k = true; path = UCFullPaths[0].slice(0, -1) + path; }\n\telse k = path.indexOf(\"/\") !== -1;\n\tvar UCPath/*:string*/ = path.toUpperCase();\n\tvar w/*:number*/ = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);\n\tif(w !== -1) return cfb.FileIndex[w];\n\n\tvar m = !UCPath.match(chr1);\n\tUCPath = UCPath.replace(chr0,'');\n\tif(m) UCPath = UCPath.replace(chr1,'!');\n\tfor(w = 0; w < UCFullPaths.length; ++w) {\n\t\tif((m ? UCFullPaths[w].replace(chr1,'!') : UCFullPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t\tif((m ? UCPaths[w].replace(chr1,'!') : UCPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t}\n\treturn null;\n}\n/** CFB Constants */\nvar MSSZ = 64; /* Mini Sector Size = 1<<6 */\n//var MSCSZ = 4096; /* Mini Stream Cutoff Size */\n/* 2.1 Compound File Sector Numbers and Types */\nvar ENDOFCHAIN = -2;\n/* 2.2 Compound File Header */\nvar HEADER_SIGNATURE = 'd0cf11e0a1b11ae1';\nvar HEADER_SIG = [0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1];\nvar HEADER_CLSID = '00000000000000000000000000000000';\nvar consts = {\n\t/* 2.1 Compund File Sector Numbers and Types */\n\tMAXREGSECT: -6,\n\tDIFSECT: -4,\n\tFATSECT: -3,\n\tENDOFCHAIN: ENDOFCHAIN,\n\tFREESECT: -1,\n\t/* 2.2 Compound File Header */\n\tHEADER_SIGNATURE: HEADER_SIGNATURE,\n\tHEADER_MINOR_VERSION: '3e00',\n\tMAXREGSID: -6,\n\tNOSTREAM: -1,\n\tHEADER_CLSID: HEADER_CLSID,\n\t/* 2.6.1 Compound File Directory Entry */\n\tEntryTypes: ['unknown','storage','stream','lockbytes','property','root']\n};\n\nfunction write_file(cfb/*:CFBContainer*/, filename/*:string*/, options/*:CFBWriteOpts*/)/*:void*/ {\n\tget_fs();\n\tvar o = _write(cfb, options);\n\t/*:: if(typeof Buffer == 'undefined' || !Buffer.isBuffer(o) || !(o instanceof Buffer)) throw new Error(\"unreachable\"); */\n\tfs.writeFileSync(filename, o);\n}\n\nfunction a2s(o/*:RawBytes*/)/*:string*/ {\n\tvar out = new Array(o.length);\n\tfor(var i = 0; i < o.length; ++i) out[i] = String.fromCharCode(o[i]);\n\treturn out.join(\"\");\n}\n\nfunction write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {\n\tvar o = _write(cfb, options);\n\tswitch(options && options.type || \"buffer\") {\n\t\tcase \"file\": get_fs(); fs.writeFileSync(options.filename, (o/*:any*/)); return o;\n\t\tcase \"binary\": return typeof o == \"string\" ? o : a2s(o);\n\t\tcase \"base64\": return Base64_encode(typeof o == \"string\" ? o : a2s(o));\n\t\tcase \"buffer\": if(has_buf) return Buffer.isBuffer(o) ? o : Buffer_from(o);\n\t\t\t/* falls through */\n\t\tcase \"array\": return typeof o == \"string\" ? s2a(o) : o;\n\t}\n\treturn o;\n}\n/* node < 8.1 zlib does not expose bytesRead, so default to pure JS */\nvar _zlib;\nfunction use_zlib(zlib) { try {\n\tvar InflateRaw = zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tInflRaw._processChunk(new Uint8Array([3, 0]), InflRaw._finishFlushFlag);\n\tif(InflRaw.bytesRead) _zlib = zlib;\n\telse throw new Error(\"zlib does not expose bytesRead\");\n} catch(e) {console.error(\"cannot use native zlib: \" + (e.message || e)); } }\n\nfunction _inflateRawSync(payload, usz) {\n\tif(!_zlib) return _inflate(payload, usz);\n\tvar InflateRaw = _zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tvar out = InflRaw._processChunk(payload.slice(payload.l), InflRaw._finishFlushFlag);\n\tpayload.l += InflRaw.bytesRead;\n\treturn out;\n}\n\nfunction _deflateRawSync(payload) {\n\treturn _zlib ? _zlib.deflateRawSync(payload) : _deflate(payload);\n}\nvar CLEN_ORDER = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n/*  LEN_ID = [ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285 ]; */\nvar LEN_LN = [   3,   4,   5,   6,   7,   8,   9,  10,  11,  13 , 15,  17,  19,  23,  27,  31,  35,  43,  51,  59,  67,  83,  99, 115, 131, 163, 195, 227, 258 ];\n\n/*  DST_ID = [  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,   26,    27,    28,    29 ]; */\nvar DST_LN = [  1,  2,  3,  4,  5,  7,  9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ];\n\nfunction bit_swap_8(n) { var t = (((((n<<1)|(n<<11)) & 0x22110) | (((n<<5)|(n<<15)) & 0x88440))); return ((t>>16) | (t>>8) |t)&0xFF; }\n\nvar use_typed_arrays = typeof Uint8Array !== 'undefined';\n\nvar bitswap8 = use_typed_arrays ? new Uint8Array(1<<8) : [];\nfor(var q = 0; q < (1<<8); ++q) bitswap8[q] = bit_swap_8(q);\n\nfunction bit_swap_n(n, b) {\n\tvar rev = bitswap8[n & 0xFF];\n\tif(b <= 8) return rev >>> (8-b);\n\trev = (rev << 8) | bitswap8[(n>>8)&0xFF];\n\tif(b <= 16) return rev >>> (16-b);\n\trev = (rev << 8) | bitswap8[(n>>16)&0xFF];\n\treturn rev >>> (24-b);\n}\n\n/* helpers for unaligned bit reads */\nfunction read_bits_2(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 6 ? 0 : buf[h+1]<<8))>>>w)& 0x03; }\nfunction read_bits_3(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 5 ? 0 : buf[h+1]<<8))>>>w)& 0x07; }\nfunction read_bits_4(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 4 ? 0 : buf[h+1]<<8))>>>w)& 0x0F; }\nfunction read_bits_5(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 3 ? 0 : buf[h+1]<<8))>>>w)& 0x1F; }\nfunction read_bits_7(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 1 ? 0 : buf[h+1]<<8))>>>w)& 0x7F; }\n\n/* works up to n = 3 * 8 + 1 = 25 */\nfunction read_bits_n(buf, bl, n) {\n\tvar w = (bl&7), h = (bl>>>3), f = ((1<<n)-1);\n\tvar v = buf[h] >>> w;\n\tif(n < 8 - w) return v & f;\n\tv |= buf[h+1]<<(8-w);\n\tif(n < 16 - w) return v & f;\n\tv |= buf[h+2]<<(16-w);\n\tif(n < 24 - w) return v & f;\n\tv |= buf[h+3]<<(24-w);\n\treturn v & f;\n}\n\n/* helpers for unaligned bit writes */\nfunction write_bits_3(buf, bl, v) { var w = bl & 7, h = bl >>> 3;\n\tif(w <= 5) buf[h] |= (v & 7) << w;\n\telse {\n\t\tbuf[h] |= (v << w) & 0xFF;\n\t\tbuf[h+1] = (v&7) >> (8-w);\n\t}\n\treturn bl + 3;\n}\n\nfunction write_bits_1(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv = (v&1) << w;\n\tbuf[h] |= v;\n\treturn bl + 1;\n}\nfunction write_bits_8(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv <<= w;\n\tbuf[h] |=  v & 0xFF; v >>>= 8;\n\tbuf[h+1] = v;\n\treturn bl + 8;\n}\nfunction write_bits_16(buf, bl, v) {\n\tvar w = bl & 7, h = bl >>> 3;\n\tv <<= w;\n\tbuf[h] |=  v & 0xFF; v >>>= 8;\n\tbuf[h+1] = v & 0xFF;\n\tbuf[h+2] = v >>> 8;\n\treturn bl + 16;\n}\n\n/* until ArrayBuffer#realloc is a thing, fake a realloc */\nfunction realloc(b, sz/*:number*/) {\n\tvar L = b.length, M = 2*L > sz ? 2*L : sz + 5, i = 0;\n\tif(L >= sz) return b;\n\tif(has_buf) {\n\t\tvar o = new_unsafe_buf(M);\n\t\t// $FlowIgnore\n\t\tif(b.copy) b.copy(o);\n\t\telse for(; i < b.length; ++i) o[i] = b[i];\n\t\treturn o;\n\t} else if(use_typed_arrays) {\n\t\tvar a = new Uint8Array(M);\n\t\tif(a.set) a.set(b);\n\t\telse for(; i < L; ++i) a[i] = b[i];\n\t\treturn a;\n\t}\n\tb.length = M;\n\treturn b;\n}\n\n/* zero-filled arrays for older browsers */\nfunction zero_fill_array(n) {\n\tvar o = new Array(n);\n\tfor(var i = 0; i < n; ++i) o[i] = 0;\n\treturn o;\n}\n\n/* build tree (used for literals and lengths) */\nfunction build_tree(clens, cmap, MAX/*:number*/)/*:number*/ {\n\tvar maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length;\n\n\tvar bl_count  = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32);\n\tfor(i = 0; i < 32; ++i) bl_count[i] = 0;\n\n\tfor(i = L; i < MAX; ++i) clens[i] = 0;\n\tL = clens.length;\n\n\tvar ctree = use_typed_arrays ? new Uint16Array(L) : zero_fill_array(L); // []\n\n\t/* build code tree */\n\tfor(i = 0; i < L; ++i) {\n\t\tbl_count[(w = clens[i])]++;\n\t\tif(maxlen < w) maxlen = w;\n\t\tctree[i] = 0;\n\t}\n\tbl_count[0] = 0;\n\tfor(i = 1; i <= maxlen; ++i) bl_count[i+16] = (ccode = (ccode + bl_count[i-1])<<1);\n\tfor(i = 0; i < L; ++i) {\n\t\tccode = clens[i];\n\t\tif(ccode != 0) ctree[i] = bl_count[ccode+16]++;\n\t}\n\n\t/* cmap[maxlen + 4 bits] = (off&15) + (lit<<4) reverse mapping */\n\tvar cleni = 0;\n\tfor(i = 0; i < L; ++i) {\n\t\tcleni = clens[i];\n\t\tif(cleni != 0) {\n\t\t\tccode = bit_swap_n(ctree[i], maxlen)>>(maxlen-cleni);\n\t\t\tfor(j = (1<<(maxlen + 4 - cleni)) - 1; j>=0; --j)\n\t\t\t\tcmap[ccode|(j<<cleni)] = (cleni&15) | (i<<4);\n\t\t}\n\t}\n\treturn maxlen;\n}\n\n/* Fixed Huffman */\nvar fix_lmap = use_typed_arrays ? new Uint16Array(512) : zero_fill_array(512);\nvar fix_dmap = use_typed_arrays ? new Uint16Array(32)  : zero_fill_array(32);\nif(!use_typed_arrays) {\n\tfor(var i = 0; i < 512; ++i) fix_lmap[i] = 0;\n\tfor(i = 0; i < 32; ++i) fix_dmap[i] = 0;\n}\n(function() {\n\tvar dlens/*:Array<number>*/ = [];\n\tvar i = 0;\n\tfor(;i<32; i++) dlens.push(5);\n\tbuild_tree(dlens, fix_dmap, 32);\n\n\tvar clens/*:Array<number>*/ = [];\n\ti = 0;\n\tfor(; i<=143; i++) clens.push(8);\n\tfor(; i<=255; i++) clens.push(9);\n\tfor(; i<=279; i++) clens.push(7);\n\tfor(; i<=287; i++) clens.push(8);\n\tbuild_tree(clens, fix_lmap, 288);\n})();var _deflateRaw = /*#__PURE__*/(function _deflateRawIIFE() {\n\tvar DST_LN_RE = use_typed_arrays ? new Uint8Array(0x8000) : [];\n\tvar j = 0, k = 0;\n\tfor(; j < DST_LN.length - 1; ++j) {\n\t\tfor(; k < DST_LN[j+1]; ++k) DST_LN_RE[k] = j;\n\t}\n\tfor(;k < 32768; ++k) DST_LN_RE[k] = 29;\n\n\tvar LEN_LN_RE = use_typed_arrays ? new Uint8Array(0x103) : [];\n\tfor(j = 0, k = 0; j < LEN_LN.length - 1; ++j) {\n\t\tfor(; k < LEN_LN[j+1]; ++k) LEN_LN_RE[k] = j;\n\t}\n\n\tfunction write_stored(data, out) {\n\t\tvar boff = 0;\n\t\twhile(boff < data.length) {\n\t\t\tvar L = Math.min(0xFFFF, data.length - boff);\n\t\t\tvar h = boff + L == data.length;\n\t\t\tout.write_shift(1, +h);\n\t\t\tout.write_shift(2, L);\n\t\t\tout.write_shift(2, (~L) & 0xFFFF);\n\t\t\twhile(L-- > 0) out[out.l++] = data[boff++];\n\t\t}\n\t\treturn out.l;\n\t}\n\n\t/* Fixed Huffman */\n\tfunction write_huff_fixed(data, out) {\n\t\tvar bl = 0;\n\t\tvar boff = 0;\n\t\tvar addrs = use_typed_arrays ? new Uint16Array(0x8000) : [];\n\t\twhile(boff < data.length) {\n\t\t\tvar L = /* data.length - boff; */ Math.min(0xFFFF, data.length - boff);\n\n\t\t\t/* write a stored block for short data */\n\t\t\tif(L < 10) {\n\t\t\t\tbl = write_bits_3(out, bl, +!!(boff + L == data.length)); // jshint ignore:line\n\t\t\t\tif(bl & 7) bl += 8 - (bl & 7);\n\t\t\t\tout.l = (bl / 8) | 0;\n\t\t\t\tout.write_shift(2, L);\n\t\t\t\tout.write_shift(2, (~L) & 0xFFFF);\n\t\t\t\twhile(L-- > 0) out[out.l++] = data[boff++];\n\t\t\t\tbl = out.l * 8;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tbl = write_bits_3(out, bl, +!!(boff + L == data.length) + 2); // jshint ignore:line\n\t\t\tvar hash = 0;\n\t\t\twhile(L-- > 0) {\n\t\t\t\tvar d = data[boff];\n\t\t\t\thash = ((hash << 5) ^ d) & 0x7FFF;\n\n\t\t\t\tvar match = -1, mlen = 0;\n\n\t\t\t\tif((match = addrs[hash])) {\n\t\t\t\t\tmatch |= boff & ~0x7FFF;\n\t\t\t\t\tif(match > boff) match -= 0x8000;\n\t\t\t\t\tif(match < boff) while(data[match + mlen] == data[boff + mlen] && mlen < 250) ++mlen;\n\t\t\t\t}\n\n\t\t\t\tif(mlen > 2) {\n\t\t\t\t\t/* Copy Token  */\n\t\t\t\t\td = LEN_LN_RE[mlen];\n\t\t\t\t\tif(d <= 22) bl = write_bits_8(out, bl, bitswap8[d+1]>>1) - 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\twrite_bits_8(out, bl, 3);\n\t\t\t\t\t\tbl += 5;\n\t\t\t\t\t\twrite_bits_8(out, bl, bitswap8[d-23]>>5);\n\t\t\t\t\t\tbl += 3;\n\t\t\t\t\t}\n\t\t\t\t\tvar len_eb = (d < 8) ? 0 : ((d - 4)>>2);\n\t\t\t\t\tif(len_eb > 0) {\n\t\t\t\t\t\twrite_bits_16(out, bl, mlen - LEN_LN[d]);\n\t\t\t\t\t\tbl += len_eb;\n\t\t\t\t\t}\n\n\t\t\t\t\td = DST_LN_RE[boff - match];\n\t\t\t\t\tbl = write_bits_8(out, bl, bitswap8[d]>>3);\n\t\t\t\t\tbl -= 3;\n\n\t\t\t\t\tvar dst_eb = d < 4 ? 0 : (d-2)>>1;\n\t\t\t\t\tif(dst_eb > 0) {\n\t\t\t\t\t\twrite_bits_16(out, bl, boff - match - DST_LN[d]);\n\t\t\t\t\t\tbl += dst_eb;\n\t\t\t\t\t}\n\t\t\t\t\tfor(var q = 0; q < mlen; ++q) {\n\t\t\t\t\t\taddrs[hash] = boff & 0x7FFF;\n\t\t\t\t\t\thash = ((hash << 5) ^ data[boff]) & 0x7FFF;\n\t\t\t\t\t\t++boff;\n\t\t\t\t\t}\n\t\t\t\t\tL-= mlen - 1;\n\t\t\t\t} else {\n\t\t\t\t\t/* Literal Token */\n\t\t\t\t\tif(d <= 143) d = d + 48;\n\t\t\t\t\telse bl = write_bits_1(out, bl, 1);\n\t\t\t\t\tbl = write_bits_8(out, bl, bitswap8[d]);\n\t\t\t\t\taddrs[hash] = boff & 0x7FFF;\n\t\t\t\t\t++boff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbl = write_bits_8(out, bl, 0) - 1;\n\t\t}\n\t\tout.l = ((bl + 7)/8)|0;\n\t\treturn out.l;\n\t}\n\treturn function _deflateRaw(data, out) {\n\t\tif(data.length < 8) return write_stored(data, out);\n\t\treturn write_huff_fixed(data, out);\n\t};\n})();\n\nfunction _deflate(data) {\n\tvar buf = new_buf(50+Math.floor(data.length*1.1));\n\tvar off = _deflateRaw(data, buf);\n\treturn buf.slice(0, off);\n}\n/* modified inflate function also moves original read head */\n\nvar dyn_lmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);\nvar dyn_dmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);\nvar dyn_cmap = use_typed_arrays ? new Uint16Array(128)   : zero_fill_array(128);\nvar dyn_len_1 = 1, dyn_len_2 = 1;\n\n/* 5.5.3 Expanding Huffman Codes */\nfunction dyn(data, boff/*:number*/) {\n\t/* nomenclature from RFC1951 refers to bit values; these are offset by the implicit constant */\n\tvar _HLIT = read_bits_5(data, boff) + 257; boff += 5;\n\tvar _HDIST = read_bits_5(data, boff) + 1; boff += 5;\n\tvar _HCLEN = read_bits_4(data, boff) + 4; boff += 4;\n\tvar w = 0;\n\n\t/* grab and store code lengths */\n\tvar clens = use_typed_arrays ? new Uint8Array(19) : zero_fill_array(19);\n\tvar ctree = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n\tvar maxlen = 1;\n\tvar bl_count =  use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);\n\tvar next_code = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);\n\tvar L = clens.length; /* 19 */\n\tfor(var i = 0; i < _HCLEN; ++i) {\n\t\tclens[CLEN_ORDER[i]] = w = read_bits_3(data, boff);\n\t\tif(maxlen < w) maxlen = w;\n\t\tbl_count[w]++;\n\t\tboff += 3;\n\t}\n\n\t/* build code tree */\n\tvar ccode = 0;\n\tbl_count[0] = 0;\n\tfor(i = 1; i <= maxlen; ++i) next_code[i] = ccode = (ccode + bl_count[i-1])<<1;\n\tfor(i = 0; i < L; ++i) if((ccode = clens[i]) != 0) ctree[i] = next_code[ccode]++;\n\t/* cmap[7 bits from stream] = (off&7) + (lit<<3) */\n\tvar cleni = 0;\n\tfor(i = 0; i < L; ++i) {\n\t\tcleni = clens[i];\n\t\tif(cleni != 0) {\n\t\t\tccode = bitswap8[ctree[i]]>>(8-cleni);\n\t\t\tfor(var j = (1<<(7-cleni))-1; j>=0; --j) dyn_cmap[ccode|(j<<cleni)] = (cleni&7) | (i<<3);\n\t\t}\n\t}\n\n\t/* read literal and dist codes at once */\n\tvar hcodes/*:Array<number>*/ = [];\n\tmaxlen = 1;\n\tfor(; hcodes.length < _HLIT + _HDIST;) {\n\t\tccode = dyn_cmap[read_bits_7(data, boff)];\n\t\tboff += ccode & 7;\n\t\tswitch((ccode >>>= 3)) {\n\t\t\tcase 16:\n\t\t\t\tw = 3 + read_bits_2(data, boff); boff += 2;\n\t\t\t\tccode = hcodes[hcodes.length - 1];\n\t\t\t\twhile(w-- > 0) hcodes.push(ccode);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\tw = 3 + read_bits_3(data, boff); boff += 3;\n\t\t\t\twhile(w-- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tw = 11 + read_bits_7(data, boff); boff += 7;\n\t\t\t\twhile(w -- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\thcodes.push(ccode);\n\t\t\t\tif(maxlen < ccode) maxlen = ccode;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/* build literal / length trees */\n\tvar h1 = hcodes.slice(0, _HLIT), h2 = hcodes.slice(_HLIT);\n\tfor(i = _HLIT; i < 286; ++i) h1[i] = 0;\n\tfor(i = _HDIST; i < 30; ++i) h2[i] = 0;\n\tdyn_len_1 = build_tree(h1, dyn_lmap, 286);\n\tdyn_len_2 = build_tree(h2, dyn_dmap, 30);\n\treturn boff;\n}\n\n/* return [ data, bytesRead ] */\nfunction inflate(data, usz/*:number*/) {\n\t/* shortcircuit for empty buffer [0x03, 0x00] */\n\tif(data[0] == 3 && !(data[1] & 0x3)) { return [new_raw_buf(usz), 2]; }\n\n\t/* bit offset */\n\tvar boff = 0;\n\n\t/* header includes final bit and type bits */\n\tvar header = 0;\n\n\tvar outbuf = new_unsafe_buf(usz ? usz : (1<<18));\n\tvar woff = 0;\n\tvar OL = outbuf.length>>>0;\n\tvar max_len_1 = 0, max_len_2 = 0;\n\n\twhile((header&1) == 0) {\n\t\theader = read_bits_3(data, boff); boff += 3;\n\t\tif((header >>> 1) == 0) {\n\t\t\t/* Stored block */\n\t\t\tif(boff & 7) boff += 8 - (boff&7);\n\t\t\t/* 2 bytes sz, 2 bytes bit inverse */\n\t\t\tvar sz = data[boff>>>3] | data[(boff>>>3)+1]<<8;\n\t\t\tboff += 32;\n\t\t\t/* push sz bytes */\n\t\t\tif(sz > 0) {\n\t\t\t\tif(!usz && OL < woff + sz) { outbuf = realloc(outbuf, woff + sz); OL = outbuf.length; }\n\t\t\t\twhile(sz-- > 0) { outbuf[woff++] = data[boff>>>3]; boff += 8; }\n\t\t\t}\n\t\t\tcontinue;\n\t\t} else if((header >> 1) == 1) {\n\t\t\t/* Fixed Huffman */\n\t\t\tmax_len_1 = 9; max_len_2 = 5;\n\t\t} else {\n\t\t\t/* Dynamic Huffman */\n\t\t\tboff = dyn(data, boff);\n\t\t\tmax_len_1 = dyn_len_1; max_len_2 = dyn_len_2;\n\t\t}\n\t\tfor(;;) { // while(true) is apparently out of vogue in modern JS circles\n\t\t\tif(!usz && (OL < woff + 32767)) { outbuf = realloc(outbuf, woff + 32767); OL = outbuf.length; }\n\t\t\t/* ingest code and move read head */\n\t\t\tvar bits = read_bits_n(data, boff, max_len_1);\n\t\t\tvar code = (header>>>1) == 1 ? fix_lmap[bits] : dyn_lmap[bits];\n\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t/* 0-255 are literals, 256 is end of block token, 257+ are copy tokens */\n\t\t\tif(((code>>>8)&0xFF) === 0) outbuf[woff++] = code;\n\t\t\telse if(code == 256) break;\n\t\t\telse {\n\t\t\t\tcode -= 257;\n\t\t\t\tvar len_eb = (code < 8) ? 0 : ((code-4)>>2); if(len_eb > 5) len_eb = 0;\n\t\t\t\tvar tgt = woff + LEN_LN[code];\n\t\t\t\t/* length extra bits */\n\t\t\t\tif(len_eb > 0) {\n\t\t\t\t\ttgt += read_bits_n(data, boff, len_eb);\n\t\t\t\t\tboff += len_eb;\n\t\t\t\t}\n\n\t\t\t\t/* dist code */\n\t\t\t\tbits = read_bits_n(data, boff, max_len_2);\n\t\t\t\tcode = (header>>>1) == 1 ? fix_dmap[bits] : dyn_dmap[bits];\n\t\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t\tvar dst_eb = (code < 4 ? 0 : (code-2)>>1);\n\t\t\t\tvar dst = DST_LN[code];\n\t\t\t\t/* dist extra bits */\n\t\t\t\tif(dst_eb > 0) {\n\t\t\t\t\tdst += read_bits_n(data, boff, dst_eb);\n\t\t\t\t\tboff += dst_eb;\n\t\t\t\t}\n\n\t\t\t\t/* in the common case, manual byte copy is faster than TA set / Buffer copy */\n\t\t\t\tif(!usz && OL < tgt) { outbuf = realloc(outbuf, tgt + 100); OL = outbuf.length; }\n\t\t\t\twhile(woff < tgt) { outbuf[woff] = outbuf[woff - dst]; ++woff; }\n\t\t\t}\n\t\t}\n\t}\n\tif(usz) return [outbuf, (boff+7)>>>3];\n\treturn [outbuf.slice(0, woff), (boff+7)>>>3];\n}\n\nfunction _inflate(payload, usz) {\n\tvar data = payload.slice(payload.l||0);\n\tvar out = inflate(data, usz);\n\tpayload.l += out[1];\n\treturn out[0];\n}\n\nfunction warn_or_throw(wrn, msg) {\n\tif(wrn) { if(typeof console !== 'undefined') console.error(msg); }\n\telse throw new Error(msg);\n}\n\nfunction parse_zip(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\n\tvar blob/*:CFBlob*/ = /*::(*/file/*:: :any)*/;\n\tprep_blob(blob, 0);\n\n\tvar FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array<string>*/ = [];\n\tvar o = {\n\t\tFileIndex: FileIndex,\n\t\tFullPaths: FullPaths\n\t};\n\tinit_cfb(o, { root: options.root });\n\n\t/* find end of central directory, start just after signature */\n\tvar i = blob.length - 4;\n\twhile((blob[i] != 0x50 || blob[i+1] != 0x4b || blob[i+2] != 0x05 || blob[i+3] != 0x06) && i >= 0) --i;\n\tblob.l = i + 4;\n\n\t/* parse end of central directory */\n\tblob.l += 4;\n\tvar fcnt = blob.read_shift(2);\n\tblob.l += 6;\n\tvar start_cd = blob.read_shift(4);\n\n\t/* parse central directory */\n\tblob.l = start_cd;\n\n\tfor(i = 0; i < fcnt; ++i) {\n\t\t/* trust local file header instead of CD entry */\n\t\tblob.l += 20;\n\t\tvar csz = blob.read_shift(4);\n\t\tvar usz = blob.read_shift(4);\n\t\tvar namelen = blob.read_shift(2);\n\t\tvar efsz = blob.read_shift(2);\n\t\tvar fcsz = blob.read_shift(2);\n\t\tblob.l += 8;\n\t\tvar offset = blob.read_shift(4);\n\t\tvar EF = parse_extra_field(/*::(*/blob.slice(blob.l+namelen, blob.l+namelen+efsz)/*:: :any)*/);\n\t\tblob.l += namelen + efsz + fcsz;\n\n\t\tvar L = blob.l;\n\t\tblob.l = offset + 4;\n\t\tparse_local_file(blob, csz, usz, o, EF);\n\t\tblob.l = L;\n\t}\n\treturn o;\n}\n\n\n/* head starts just after local file header signature */\nfunction parse_local_file(blob/*:CFBlob*/, csz/*:number*/, usz/*:number*/, o/*:CFBContainer*/, EF) {\n\t/* [local file header] */\n\tblob.l += 2;\n\tvar flags = blob.read_shift(2);\n\tvar meth = blob.read_shift(2);\n\tvar date = parse_dos_date(blob);\n\n\tif(flags & 0x2041) throw new Error(\"Unsupported ZIP encryption\");\n\tvar crc32 = blob.read_shift(4);\n\tvar _csz = blob.read_shift(4);\n\tvar _usz = blob.read_shift(4);\n\n\tvar namelen = blob.read_shift(2);\n\tvar efsz = blob.read_shift(2);\n\n\t// TODO: flags & (1<<11) // UTF8\n\tvar name = \"\"; for(var i = 0; i < namelen; ++i) name += String.fromCharCode(blob[blob.l++]);\n\tif(efsz) {\n\t\tvar ef = parse_extra_field(/*::(*/blob.slice(blob.l, blob.l + efsz)/*:: :any)*/);\n\t\tif((ef[0x5455]||{}).mt) date = ef[0x5455].mt;\n\t\tif(((EF||{})[0x5455]||{}).mt) date = EF[0x5455].mt;\n\t}\n\tblob.l += efsz;\n\n\t/* [encryption header] */\n\n\t/* [file data] */\n\tvar data = blob.slice(blob.l, blob.l + _csz);\n\tswitch(meth) {\n\t\tcase 8: data = _inflateRawSync(blob, _usz); break;\n\t\tcase 0: break; // TODO: scan for magic number\n\t\tdefault: throw new Error(\"Unsupported ZIP Compression method \" + meth);\n\t}\n\n\t/* [data descriptor] */\n\tvar wrn = false;\n\tif(flags & 8) {\n\t\tcrc32 = blob.read_shift(4);\n\t\tif(crc32 == 0x08074b50) { crc32 = blob.read_shift(4); wrn = true; }\n\t\t_csz = blob.read_shift(4);\n\t\t_usz = blob.read_shift(4);\n\t}\n\n\tif(_csz != csz) warn_or_throw(wrn, \"Bad compressed size: \" + csz + \" != \" + _csz);\n\tif(_usz != usz) warn_or_throw(wrn, \"Bad uncompressed size: \" + usz + \" != \" + _usz);\n\t//var _crc32 = CRC32.buf(data, 0);\n\t//if((crc32>>0) != (_crc32>>0)) warn_or_throw(wrn, \"Bad CRC32 checksum: \" + crc32 + \" != \" + _crc32);\n\tcfb_add(o, name, data, {unsafe: true, mt: date});\n}\nfunction write_zip(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes*/ {\n\tvar _opts = options || {};\n\tvar out = [], cdirs = [];\n\tvar o/*:CFBlob*/ = new_buf(1);\n\tvar method = (_opts.compression ? 8 : 0), flags = 0;\n\tvar desc = false;\n\tif(desc) flags |= 8;\n\tvar i = 0, j = 0;\n\n\tvar start_cd = 0, fcnt = 0;\n\tvar root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];\n\tvar crcs = [];\n\tvar sz_cd = 0;\n\n\tfor(i = 1; i < cfb.FullPaths.length; ++i) {\n\t\tfp = cfb.FullPaths[i].slice(root.length); fi = cfb.FileIndex[i];\n\t\tif(!fi.size || !fi.content || fp == \"\\u0001Sh33tJ5\") continue;\n\t\tvar start = start_cd;\n\n\t\t/* TODO: CP437 filename */\n\t\tvar namebuf = new_buf(fp.length);\n\t\tfor(j = 0; j < fp.length; ++j) namebuf.write_shift(1, fp.charCodeAt(j) & 0x7F);\n\t\tnamebuf = namebuf.slice(0, namebuf.l);\n\t\tcrcs[fcnt] = CRC32.buf(/*::((*/fi.content/*::||[]):any)*/, 0);\n\n\t\tvar outbuf = fi.content/*::||[]*/;\n\t\tif(method == 8) outbuf = _deflateRawSync(outbuf);\n\n\t\t/* local file header */\n\t\to = new_buf(30);\n\t\to.write_shift(4, 0x04034b50);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\t/* TODO: last mod file time/date */\n\t\tif(fi.mt) write_dos_date(o, fi.mt);\n\t\telse o.write_shift(4, 0);\n\t\to.write_shift(-4, (flags & 8) ? 0 : crcs[fcnt]);\n\t\to.write_shift(4,  (flags & 8) ? 0 : outbuf.length);\n\t\to.write_shift(4,  (flags & 8) ? 0 : /*::(*/fi.content/*::||[])*/.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\n\t\tstart_cd += o.length;\n\t\tout.push(o);\n\t\tstart_cd += namebuf.length;\n\t\tout.push(namebuf);\n\n\t\t/* TODO: extra fields? */\n\n\t\t/* TODO: encryption header ? */\n\n\t\tstart_cd += outbuf.length;\n\t\tout.push(outbuf);\n\n\t\t/* data descriptor */\n\t\tif(flags & 8) {\n\t\t\to = new_buf(12);\n\t\t\to.write_shift(-4, crcs[fcnt]);\n\t\t\to.write_shift(4, outbuf.length);\n\t\t\to.write_shift(4, /*::(*/fi.content/*::||[])*/.length);\n\t\t\tstart_cd += o.l;\n\t\t\tout.push(o);\n\t\t}\n\n\t\t/* central directory */\n\t\to = new_buf(46);\n\t\to.write_shift(4, 0x02014b50);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\to.write_shift(4, 0); /* TODO: last mod file time/date */\n\t\to.write_shift(-4, crcs[fcnt]);\n\n\t\to.write_shift(4, outbuf.length);\n\t\to.write_shift(4, /*::(*/fi.content/*::||[])*/.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, start);\n\n\t\tsz_cd += o.l;\n\t\tcdirs.push(o);\n\t\tsz_cd += namebuf.length;\n\t\tcdirs.push(namebuf);\n\t\t++fcnt;\n\t}\n\n\t/* end of central directory */\n\to = new_buf(22);\n\to.write_shift(4, 0x06054b50);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, fcnt);\n\to.write_shift(2, fcnt);\n\to.write_shift(4, sz_cd);\n\to.write_shift(4, start_cd);\n\to.write_shift(2, 0);\n\n\treturn bconcat(([bconcat((out/*:any*/)), bconcat(cdirs), o]/*:any*/));\n}\nvar ContentTypeMap = ({\n\t\"htm\": \"text/html\",\n\t\"xml\": \"text/xml\",\n\n\t\"gif\": \"image/gif\",\n\t\"jpg\": \"image/jpeg\",\n\t\"png\": \"image/png\",\n\n\t\"mso\": \"application/x-mso\",\n\t\"thmx\": \"application/vnd.ms-officetheme\",\n\t\"sh33tj5\": \"application/octet-stream\"\n}/*:any*/);\n\nfunction get_content_type(fi/*:CFBEntry*/, fp/*:string*/)/*:string*/ {\n\tif(fi.ctype) return fi.ctype;\n\n\tvar ext = fi.name || \"\", m = ext.match(/\\.([^\\.]+)$/);\n\tif(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];\n\n\tif(fp) {\n\t\tm = (ext = fp).match(/[\\.\\\\]([^\\.\\\\])+$/);\n\t\tif(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];\n\t}\n\n\treturn \"application/octet-stream\";\n}\n\n/* 76 character chunks TODO: intertwine encoding */\nfunction write_base64_76(bstr/*:string*/)/*:string*/ {\n\tvar data = Base64_encode(bstr);\n\tvar o = [];\n\tfor(var i = 0; i < data.length; i+= 76) o.push(data.slice(i, i+76));\n\treturn o.join(\"\\r\\n\") + \"\\r\\n\";\n}\n\n/*\nRules for QP:\n\t- escape =## applies for all non-display characters and literal \"=\"\n\t- space or tab at end of line must be encoded\n\t- \\r\\n newlines can be preserved, but bare \\r and \\n must be escaped\n\t- lines must not exceed 76 characters, use soft breaks =\\r\\n\n\nTODO: Some files from word appear to write line extensions with bare equals:\n\n```\n<table class=3DMsoTableGrid border=3D1 cellspacing=3D0 cellpadding=3D0 width=\n=\"70%\"\n```\n*/\nfunction write_quoted_printable(text/*:string*/)/*:string*/ {\n\tvar encoded = text.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7E-\\xFF=]/g, function(c) {\n\t\tvar w = c.charCodeAt(0).toString(16).toUpperCase();\n\t\treturn \"=\" + (w.length == 1 ? \"0\" + w : w);\n\t});\n\n\tencoded = encoded.replace(/ $/mg, \"=20\").replace(/\\t$/mg, \"=09\");\n\n\tif(encoded.charAt(0) == \"\\n\") encoded = \"=0D\" + encoded.slice(1);\n\tencoded = encoded.replace(/\\r(?!\\n)/mg, \"=0D\").replace(/\\n\\n/mg, \"\\n=0A\").replace(/([^\\r\\n])\\n/mg, \"$1=0A\");\n\n\tvar o/*:Array<string>*/ = [], split = encoded.split(\"\\r\\n\");\n\tfor(var si = 0; si < split.length; ++si) {\n\t\tvar str = split[si];\n\t\tif(str.length == 0) { o.push(\"\"); continue; }\n\t\tfor(var i = 0; i < str.length;) {\n\t\t\tvar end = 76;\n\t\t\tvar tmp = str.slice(i, i + end);\n\t\t\tif(tmp.charAt(end - 1) == \"=\") end --;\n\t\t\telse if(tmp.charAt(end - 2) == \"=\") end -= 2;\n\t\t\telse if(tmp.charAt(end - 3) == \"=\") end -= 3;\n\t\t\ttmp = str.slice(i, i + end);\n\t\t\ti += end;\n\t\t\tif(i < str.length) tmp += \"=\";\n\t\t\to.push(tmp);\n\t\t}\n\t}\n\n\treturn o.join(\"\\r\\n\");\n}\nfunction parse_quoted_printable(data/*:Array<string>*/)/*:RawBytes*/ {\n\tvar o = [];\n\n\t/* unify long lines */\n\tfor(var di = 0; di < data.length; ++di) {\n\t\tvar line = data[di];\n\t\twhile(di <= data.length && line.charAt(line.length - 1) == \"=\") line = line.slice(0, line.length - 1) + data[++di];\n\t\to.push(line);\n\t}\n\n\t/* decode */\n\tfor(var oi = 0; oi < o.length; ++oi) o[oi] = o[oi].replace(/[=][0-9A-Fa-f]{2}/g, function($$) { return String.fromCharCode(parseInt($$.slice(1), 16)); });\n\treturn s2a(o.join(\"\\r\\n\"));\n}\n\n\nfunction parse_mime(cfb/*:CFBContainer*/, data/*:Array<string>*/, root/*:string*/)/*:void*/ {\n\tvar fname = \"\", cte = \"\", ctype = \"\", fdata;\n\tvar di = 0;\n\tfor(;di < 10; ++di) {\n\t\tvar line = data[di];\n\t\tif(!line || line.match(/^\\s*$/)) break;\n\t\tvar m = line.match(/^(.*?):\\s*([^\\s].*)$/);\n\t\tif(m) switch(m[1].toLowerCase()) {\n\t\t\tcase \"content-location\": fname = m[2].trim(); break;\n\t\t\tcase \"content-type\": ctype = m[2].trim(); break;\n\t\t\tcase \"content-transfer-encoding\": cte = m[2].trim(); break;\n\t\t}\n\t}\n\t++di;\n\tswitch(cte.toLowerCase()) {\n\t\tcase 'base64': fdata = s2a(Base64_decode(data.slice(di).join(\"\"))); break;\n\t\tcase 'quoted-printable': fdata = parse_quoted_printable(data.slice(di)); break;\n\t\tdefault: throw new Error(\"Unsupported Content-Transfer-Encoding \" + cte);\n\t}\n\tvar file = cfb_add(cfb, fname.slice(root.length), fdata, {unsafe: true});\n\tif(ctype) file.ctype = ctype;\n}\n\nfunction parse_mad(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {\n\tif(a2s(file.slice(0,13)).toLowerCase() != \"mime-version:\") throw new Error(\"Unsupported MAD header\");\n\tvar root = (options && options.root || \"\");\n\t// $FlowIgnore\n\tvar data = (has_buf && Buffer.isBuffer(file) ? file.toString(\"binary\") : a2s(file)).split(\"\\r\\n\");\n\tvar di = 0, row = \"\";\n\n\t/* if root is not specified, scan for the common prefix */\n\tfor(di = 0; di < data.length; ++di) {\n\t\trow = data[di];\n\t\tif(!/^Content-Location:/i.test(row)) continue;\n\t\trow = row.slice(row.indexOf(\"file\"));\n\t\tif(!root) root = row.slice(0, row.lastIndexOf(\"/\") + 1);\n\t\tif(row.slice(0, root.length) == root) continue;\n\t\twhile(root.length > 0) {\n\t\t\troot = root.slice(0, root.length - 1);\n\t\t\troot = root.slice(0, root.lastIndexOf(\"/\") + 1);\n\t\t\tif(row.slice(0,root.length) == root) break;\n\t\t}\n\t}\n\n\tvar mboundary = (data[1] || \"\").match(/boundary=\"(.*?)\"/);\n\tif(!mboundary) throw new Error(\"MAD cannot find boundary\");\n\tvar boundary = \"--\" + (mboundary[1] || \"\");\n\n\tvar FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array<string>*/ = [];\n\tvar o = {\n\t\tFileIndex: FileIndex,\n\t\tFullPaths: FullPaths\n\t};\n\tinit_cfb(o);\n\tvar start_di, fcnt = 0;\n\tfor(di = 0; di < data.length; ++di) {\n\t\tvar line = data[di];\n\t\tif(line !== boundary && line !== boundary + \"--\") continue;\n\t\tif(fcnt++) parse_mime(o, data.slice(start_di, di), root);\n\t\tstart_di = di;\n\t}\n\treturn o;\n}\n\nfunction write_mad(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:string*/ {\n\tvar opts = options || {};\n\tvar boundary = opts.boundary || \"SheetJS\";\n\tboundary = '------=' + boundary;\n\n\tvar out = [\n\t\t'MIME-Version: 1.0',\n\t\t'Content-Type: multipart/related; boundary=\"' + boundary.slice(2) + '\"',\n\t\t'',\n\t\t'',\n\t\t''\n\t];\n\n\tvar root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];\n\tfor(var i = 1; i < cfb.FullPaths.length; ++i) {\n\t\tfp = cfb.FullPaths[i].slice(root.length);\n\t\tfi = cfb.FileIndex[i];\n\t\tif(!fi.size || !fi.content || fp == \"\\u0001Sh33tJ5\") continue;\n\n\t\t/* Normalize filename */\n\t\tfp = fp.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7E-\\xFF]/g, function(c) {\n\t\t\treturn \"_x\" + c.charCodeAt(0).toString(16) + \"_\";\n\t\t}).replace(/[\\u0080-\\uFFFF]/g, function(u) {\n\t\t\treturn \"_u\" + u.charCodeAt(0).toString(16) + \"_\";\n\t\t});\n\n\t\t/* Extract content as binary string */\n\t\tvar ca = fi.content;\n\t\t// $FlowIgnore\n\t\tvar cstr = has_buf && Buffer.isBuffer(ca) ? ca.toString(\"binary\") : a2s(ca);\n\n\t\t/* 4/5 of first 1024 chars ascii -> quoted printable, else base64 */\n\t\tvar dispcnt = 0, L = Math.min(1024, cstr.length), cc = 0;\n\t\tfor(var csl = 0; csl <= L; ++csl) if((cc=cstr.charCodeAt(csl)) >= 0x20 && cc < 0x80) ++dispcnt;\n\t\tvar qp = dispcnt >= L * 4 / 5;\n\n\t\tout.push(boundary);\n\t\tout.push('Content-Location: ' + (opts.root || 'file:///C:/SheetJS/') + fp);\n\t\tout.push('Content-Transfer-Encoding: ' + (qp ? 'quoted-printable' : 'base64'));\n\t\tout.push('Content-Type: ' + get_content_type(fi, fp));\n\t\tout.push('');\n\n\t\tout.push(qp ? write_quoted_printable(cstr) : write_base64_76(cstr));\n\t}\n\tout.push(boundary + '--\\r\\n');\n\treturn out.join(\"\\r\\n\");\n}\nfunction cfb_new(opts/*:?any*/)/*:CFBContainer*/ {\n\tvar o/*:CFBContainer*/ = ({}/*:any*/);\n\tinit_cfb(o, opts);\n\treturn o;\n}\n\nfunction cfb_add(cfb/*:CFBContainer*/, name/*:string*/, content/*:?RawBytes*/, opts/*:?any*/)/*:CFBEntry*/ {\n\tvar unsafe = opts && opts.unsafe;\n\tif(!unsafe) init_cfb(cfb);\n\tvar file = !unsafe && CFB.find(cfb, name);\n\tif(!file) {\n\t\tvar fpath/*:string*/ = cfb.FullPaths[0];\n\t\tif(name.slice(0, fpath.length) == fpath) fpath = name;\n\t\telse {\n\t\t\tif(fpath.slice(-1) != \"/\") fpath += \"/\";\n\t\t\tfpath = (fpath + name).replace(\"//\",\"/\");\n\t\t}\n\t\tfile = ({name: filename(name), type: 2}/*:any*/);\n\t\tcfb.FileIndex.push(file);\n\t\tcfb.FullPaths.push(fpath);\n\t\tif(!unsafe) CFB.utils.cfb_gc(cfb);\n\t}\n\t/*:: if(!file) throw new Error(\"unreachable\"); */\n\tfile.content = (content/*:any*/);\n\tfile.size = content ? content.length : 0;\n\tif(opts) {\n\t\tif(opts.CLSID) file.clsid = opts.CLSID;\n\t\tif(opts.mt) file.mt = opts.mt;\n\t\tif(opts.ct) file.ct = opts.ct;\n\t}\n\treturn file;\n}\n\nfunction cfb_del(cfb/*:CFBContainer*/, name/*:string*/)/*:boolean*/ {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex.splice(j, 1);\n\t\tcfb.FullPaths.splice(j, 1);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_mov(cfb/*:CFBContainer*/, old_name/*:string*/, new_name/*:string*/)/*:boolean*/ {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, old_name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex[j].name = filename(new_name);\n\t\tcfb.FullPaths[j] = new_name;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_gc(cfb/*:CFBContainer*/)/*:void*/ { rebuild_cfb(cfb, true); }\n\nexports.find = find;\nexports.read = read;\nexports.parse = parse;\nexports.write = write;\nexports.writeFile = write_file;\nexports.utils = {\n\tcfb_new: cfb_new,\n\tcfb_add: cfb_add,\n\tcfb_del: cfb_del,\n\tcfb_mov: cfb_mov,\n\tcfb_gc: cfb_gc,\n\tReadShift: ReadShift,\n\tCheckField: CheckField,\n\tprep_blob: prep_blob,\n\tbconcat: bconcat,\n\tuse_zlib: use_zlib,\n\t_deflateRaw: _deflate,\n\t_inflateRaw: _inflate,\n\tconsts: consts\n};\n\nreturn exports;\n})();\n\nlet _fs = void 0;\nfunction set_fs(fs) { _fs = fs; }\nexport { set_fs };\n\n/* normalize data for blob ctor */\nfunction blobify(data) {\n\tif(typeof data === \"string\") return s2ab(data);\n\tif(Array.isArray(data)) return a2u(data);\n\treturn data;\n}\n/* write or download file */\nfunction write_dl(fname/*:string*/, payload/*:any*/, enc/*:?string*/) {\n\t/*global IE_SaveFile, Blob, navigator, saveAs, document, File, chrome */\n\tif(typeof _fs !== 'undefined' && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload);\n\tif(typeof Deno !== 'undefined') {\n\t\t/* in this spot, it's safe to assume typed arrays and TextEncoder/TextDecoder exist */\n\t\tif(enc && typeof payload == \"string\") switch(enc) {\n\t\t\tcase \"utf8\": payload = new TextEncoder(enc).encode(payload); break;\n\t\t\tcase \"binary\": payload = s2ab(payload); break;\n\t\t\t/* TODO: binary equivalent */\n\t\t\tdefault: throw new Error(\"Unsupported encoding \" + enc);\n\t\t}\n\t\treturn Deno.writeFileSync(fname, payload);\n\t}\n\tvar data = (enc == \"utf8\") ? utf8write(payload) : payload;\n\t/*:: declare var IE_SaveFile: any; */\n\tif(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);\n\tif(typeof Blob !== 'undefined') {\n\t\tvar blob = new Blob([blobify(data)], {type:\"application/octet-stream\"});\n\t\t/*:: declare var navigator: any; */\n\t\tif(typeof navigator !== 'undefined' && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname);\n\t\t/*:: declare var saveAs: any; */\n\t\tif(typeof saveAs !== 'undefined') return saveAs(blob, fname);\n\t\tif(typeof URL !== 'undefined' && typeof document !== 'undefined' && document.createElement && URL.createObjectURL) {\n\t\t\tvar url = URL.createObjectURL(blob);\n\t\t\t/*:: declare var chrome: any; */\n\t\t\tif(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == \"function\") {\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn chrome.downloads.download({ url: url, filename: fname, saveAs: true});\n\t\t\t}\n\t\t\tvar a = document.createElement(\"a\");\n\t\t\tif(a.download != null) {\n\t\t\t\t/*:: if(document.body == null) throw new Error(\"unreachable\"); */\n\t\t\t\ta.download = fname; a.href = url; document.body.appendChild(a); a.click();\n\t\t\t\t/*:: if(document.body == null) throw new Error(\"unreachable\"); */ document.body.removeChild(a);\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn url;\n\t\t\t}\n\t\t}\n\t}\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar out = File(fname); out.open(\"w\"); out.encoding = \"binary\";\n\t\tif(Array.isArray(payload)) payload = a2s(payload);\n\t\tout.write(payload); out.close(); return payload;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"cannot save file \" + fname);\n}\n\n/* read binary data from file */\nfunction read_binary(path/*:string*/) {\n\tif(typeof _fs !== 'undefined') return _fs.readFileSync(path);\n\tif(typeof Deno !== 'undefined') return Deno.readFileSync(path);\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar infile = File(path); infile.open(\"r\"); infile.encoding = \"binary\";\n\t\tvar data = infile.read(); infile.close();\n\t\treturn data;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"Cannot access file \" + path);\n}\nfunction keys(o/*:any*/)/*:Array<any>*/ {\n\tvar ks = Object.keys(o), o2 = [];\n\tfor(var i = 0; i < ks.length; ++i) if(Object.prototype.hasOwnProperty.call(o, ks[i])) o2.push(ks[i]);\n\treturn o2;\n}\n\nfunction evert_key(obj/*:any*/, key/*:string*/)/*:EvertType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) if(o[obj[K[i]][key]] == null) o[obj[K[i]][key]] = K[i];\n\treturn o;\n}\n\nfunction evert(obj/*:any*/)/*:EvertType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = K[i];\n\treturn o;\n}\n\nfunction evert_num(obj/*:any*/)/*:EvertNumType*/ {\n\tvar o = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = parseInt(K[i],10);\n\treturn o;\n}\n\nfunction evert_arr(obj/*:any*/)/*:EvertArrType*/ {\n\tvar o/*:EvertArrType*/ = ([]/*:any*/), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) {\n\t\tif(o[obj[K[i]]] == null) o[obj[K[i]]] = [];\n\t\to[obj[K[i]]].push(K[i]);\n\t}\n\treturn o;\n}\n\nvar basedate = /*#__PURE__*/new Date(1899, 11, 30, 0, 0, 0); // 2209161600000\nfunction datenum(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {\n\tvar epoch = /*#__PURE__*/v.getTime();\n\tif(date1904) epoch -= 1462*24*60*60*1000;\n\tvar dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;\n\treturn (epoch - dnthresh) / (24 * 60 * 60 * 1000);\n}\nvar refdate = /*#__PURE__*/new Date();\nvar dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/refdate.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;\nvar refoffset = /*#__PURE__*/refdate.getTimezoneOffset();\nfunction numdate(v/*:number*/)/*:Date*/ {\n\tvar out = new Date();\n\tout.setTime(v * 24 * 60 * 60 * 1000 + dnthresh);\n\tif (out.getTimezoneOffset() !== refoffset) {\n\t\tout.setTime(out.getTime() + (out.getTimezoneOffset() - refoffset) * 60000);\n\t}\n\treturn out;\n}\n\n/* ISO 8601 Duration */\nfunction parse_isodur(s) {\n\tvar sec = 0, mt = 0, time = false;\n\tvar m = s.match(/P([0-9\\.]+Y)?([0-9\\.]+M)?([0-9\\.]+D)?T([0-9\\.]+H)?([0-9\\.]+M)?([0-9\\.]+S)?/);\n\tif(!m) throw new Error(\"|\" + s + \"| is not an ISO8601 Duration\");\n\tfor(var i = 1; i != m.length; ++i) {\n\t\tif(!m[i]) continue;\n\t\tmt = 1;\n\t\tif(i > 3) time = true;\n\t\tswitch(m[i].slice(m[i].length-1)) {\n\t\t\tcase 'Y':\n\t\t\t\tthrow new Error(\"Unsupported ISO Duration Field: \" + m[i].slice(m[i].length-1));\n\t\t\tcase 'D': mt *= 24;\n\t\t\t\t/* falls through */\n\t\t\tcase 'H': mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'M':\n\t\t\t\tif(!time) throw new Error(\"Unsupported ISO Duration Field: M\");\n\t\t\t\telse mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'S': break;\n\t\t}\n\t\tsec += mt * parseInt(m[i], 10);\n\t}\n\treturn sec;\n}\n\nvar good_pd_date_1 = /*#__PURE__*/new Date('2017-02-19T19:06:09.000Z');\nvar good_pd_date = /*#__PURE__*/isNaN(/*#__PURE__*/good_pd_date_1.getFullYear()) ? /*#__PURE__*/new Date('2/19/17') : good_pd_date_1;\nvar good_pd = /*#__PURE__*/good_pd_date.getFullYear() == 2017;\n/* parses a date as a local date */\nfunction parseDate(str/*:string|Date*/, fixdate/*:?number*/)/*:Date*/ {\n\tvar d = new Date(str);\n\tif(good_pd) {\n\t\t/*:: if(fixdate == null) fixdate = 0; */\n\t\tif(fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000);\n\t\telse if(fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);\n\t\treturn d;\n\t}\n\tif(str instanceof Date) return str;\n\tif(good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) {\n\t\tvar s = d.getFullYear();\n\t\tif(str.indexOf(\"\" + s) > -1) return d;\n\t\td.setFullYear(d.getFullYear() + 100); return d;\n\t}\n\tvar n = str.match(/\\d+/g)||[\"2017\",\"2\",\"19\",\"0\",\"0\",\"0\"];\n\tvar out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3]||0), (+n[4]||0), (+n[5]||0));\n\tif(str.indexOf(\"Z\") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000);\n\treturn out;\n}\n\nfunction cc2str(arr/*:Array<number>*/, debomit)/*:string*/ {\n\tif(has_buf && Buffer.isBuffer(arr)) {\n\t\tif(debomit) {\n\t\t\tif(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(arr.slice(2).toString(\"utf16le\"));\n\t\t\tif(arr[1] == 0xFE && arr[2] == 0xFF) return utf8write(utf16beread(arr.slice(2).toString(\"binary\")));\n\t\t}\n\t\treturn arr.toString(\"binary\");\n\t}\n\n\tif(typeof TextDecoder !== \"undefined\") try {\n\t\tif(debomit) {\n\t\t\tif(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(new TextDecoder(\"utf-16le\").decode(arr.slice(2)));\n\t\t\tif(arr[0] == 0xFE && arr[1] == 0xFF) return utf8write(new TextDecoder(\"utf-16be\").decode(arr.slice(2)));\n\t\t}\n\t\tvar rev = {\n\t\t\t\"\\u20ac\": \"\\x80\", \"\\u201a\": \"\\x82\", \"\\u0192\": \"\\x83\", \"\\u201e\": \"\\x84\",\n\t\t\t\"\\u2026\": \"\\x85\", \"\\u2020\": \"\\x86\", \"\\u2021\": \"\\x87\", \"\\u02c6\": \"\\x88\",\n\t\t\t\"\\u2030\": \"\\x89\", \"\\u0160\": \"\\x8a\", \"\\u2039\": \"\\x8b\", \"\\u0152\": \"\\x8c\",\n\t\t\t\"\\u017d\": \"\\x8e\", \"\\u2018\": \"\\x91\", \"\\u2019\": \"\\x92\", \"\\u201c\": \"\\x93\",\n\t\t\t\"\\u201d\": \"\\x94\", \"\\u2022\": \"\\x95\", \"\\u2013\": \"\\x96\", \"\\u2014\": \"\\x97\",\n\t\t\t\"\\u02dc\": \"\\x98\", \"\\u2122\": \"\\x99\", \"\\u0161\": \"\\x9a\", \"\\u203a\": \"\\x9b\",\n\t\t\t\"\\u0153\": \"\\x9c\", \"\\u017e\": \"\\x9e\", \"\\u0178\": \"\\x9f\"\n\t\t};\n\t\tif(Array.isArray(arr)) arr = new Uint8Array(arr);\n\t\treturn new TextDecoder(\"latin1\").decode(arr).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(c) { return rev[c] || c; });\n\t} catch(e) {}\n\n\tvar o = [];\n\tfor(var i = 0; i != arr.length; ++i) o.push(String.fromCharCode(arr[i]));\n\treturn o.join(\"\");\n}\n\nfunction dup(o/*:any*/)/*:any*/ {\n\tif(typeof JSON != 'undefined' && !Array.isArray(o)) return JSON.parse(JSON.stringify(o));\n\tif(typeof o != 'object' || o == null) return o;\n\tif(o instanceof Date) return new Date(o.getTime());\n\tvar out = {};\n\tfor(var k in o) if(Object.prototype.hasOwnProperty.call(o, k)) out[k] = dup(o[k]);\n\treturn out;\n}\n\nfunction fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = \"\"; while(o.length < l) o+=c; return o; }\n\n/* TODO: stress test */\nfunction fuzzynum(s/*:string*/)/*:number*/ {\n\tvar v/*:number*/ = Number(s);\n\tif(!isNaN(v)) return isFinite(v) ? v : NaN;\n\tif(!/\\d/.test(s)) return v;\n\tvar wt = 1;\n\tvar ss = s.replace(/([\\d]),([\\d])/g,\"$1$2\").replace(/[$]/g,\"\").replace(/[%]/g, function() { wt *= 100; return \"\";});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\tss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\treturn v;\n}\nvar lower_months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];\nfunction fuzzydate(s/*:string*/)/*:Date*/ {\n\tvar o = new Date(s), n = new Date(NaN);\n\tvar y = o.getYear(), m = o.getMonth(), d = o.getDate();\n\tif(isNaN(d)) return n;\n\tvar lower = s.toLowerCase();\n\tif(lower.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) {\n\t\tlower = lower.replace(/[^a-z]/g,\"\").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,\"\");\n\t\tif(lower.length > 3 && lower_months.indexOf(lower) == -1) return n;\n\t} else if(lower.match(/[a-z]/)) return n;\n\tif(y < 0 || y > 8099) return n;\n\tif((m > 0 || d > 1) && y != 101) return o;\n\tif(s.match(/[^-0-9:,\\/\\\\]/)) return n;\n\treturn o;\n}\n\nvar split_regex = /*#__PURE__*/(function() {\n\tvar safe_split_regex = \"abacaba\".split(/(:?b)/i).length == 5;\n\treturn function split_regex(str/*:string*/, re, def/*:string*/)/*:Array<string>*/ {\n\t\tif(safe_split_regex || typeof re == \"string\") return str.split(re);\n\t\tvar p = str.split(re), o = [p[0]];\n\t\tfor(var i = 1; i < p.length; ++i) { o.push(def); o.push(p[i]); }\n\t\treturn o;\n\t};\n})();\nfunction getdatastr(data)/*:?string*/ {\n\tif(!data) return null;\n\tif(data.content && data.type) return cc2str(data.content, true);\n\tif(data.data) return debom(data.data);\n\tif(data.asNodeBuffer && has_buf) return debom(data.asNodeBuffer().toString('binary'));\n\tif(data.asBinary) return debom(data.asBinary());\n\tif(data._data && data._data.getContent) return debom(cc2str(Array.prototype.slice.call(data._data.getContent(),0)));\n\treturn null;\n}\n\nfunction getdatabin(data) {\n\tif(!data) return null;\n\tif(data.data) return char_codes(data.data);\n\tif(data.asNodeBuffer && has_buf) return data.asNodeBuffer();\n\tif(data._data && data._data.getContent) {\n\t\tvar o = data._data.getContent();\n\t\tif(typeof o == \"string\") return char_codes(o);\n\t\treturn Array.prototype.slice.call(o);\n\t}\n\tif(data.content && data.type) return data.content;\n\treturn null;\n}\n\nfunction getdata(data) { return (data && data.name.slice(-4) === \".bin\") ? getdatabin(data) : getdatastr(data); }\n\n/* Part 2 Section 10.1.2 \"Mapping Content Types\" Names are case-insensitive */\n/* OASIS does not comment on filename case sensitivity */\nfunction safegetzipfile(zip, file/*:string*/) {\n\tvar k = zip.FullPaths || keys(zip.files);\n\tvar f = file.toLowerCase().replace(/[\\/]/g, '\\\\'), g = f.replace(/\\\\/g,'\\/');\n\tfor(var i=0; i<k.length; ++i) {\n\t\tvar n = k[i].replace(/^Root Entry[\\/]/,\"\").toLowerCase();\n\t\tif(f == n || g == n) return zip.files ? zip.files[k[i]] : zip.FileIndex[i];\n\t}\n\treturn null;\n}\n\nfunction getzipfile(zip, file/*:string*/) {\n\tvar o = safegetzipfile(zip, file);\n\tif(o == null) throw new Error(\"Cannot find file \" + file + \" in zip\");\n\treturn o;\n}\n\nfunction getzipdata(zip, file/*:string*/, safe/*:?boolean*/)/*:any*/ {\n\tif(!safe) return getdata(getzipfile(zip, file));\n\tif(!file) return null;\n\ttry { return getzipdata(zip, file); } catch(e) { return null; }\n}\n\nfunction getzipstr(zip, file/*:string*/, safe/*:?boolean*/)/*:?string*/ {\n\tif(!safe) return getdatastr(getzipfile(zip, file));\n\tif(!file) return null;\n\ttry { return getzipstr(zip, file); } catch(e) { return null; }\n}\n\nfunction getzipbin(zip, file/*:string*/, safe/*:?boolean*/)/*:any*/ {\n\tif(!safe) return getdatabin(getzipfile(zip, file));\n\tif(!file) return null;\n\ttry { return getzipbin(zip, file); } catch(e) { return null; }\n}\n\nfunction zipentries(zip) {\n\tvar k = zip.FullPaths || keys(zip.files), o = [];\n\tfor(var i = 0; i < k.length; ++i) if(k[i].slice(-1) != '/') o.push(k[i].replace(/^Root Entry[\\/]/, \"\"));\n\treturn o.sort();\n}\n\nfunction zip_add_file(zip, path, content) {\n\tif(zip.FullPaths) {\n\t\tif(typeof content == \"string\") {\n\t\t\tvar res;\n\t\t\tif(has_buf) res = Buffer_from(content);\n\t\t\t/* TODO: investigate performance in Edge 13 */\n\t\t\t//else if(typeof TextEncoder !== \"undefined\") res = new TextEncoder().encode(content);\n\t\t\telse res = utf8decode(content);\n\t\t\treturn CFB.utils.cfb_add(zip, path, res);\n\t\t}\n\t\tCFB.utils.cfb_add(zip, path, content);\n\t}\n\telse zip.file(path, content);\n}\n\nfunction zip_new() { return CFB.utils.cfb_new(); }\n\nfunction zip_read(d, o) {\n\tswitch(o.type) {\n\t\tcase \"base64\": return CFB.read(d, { type: \"base64\" });\n\t\tcase \"binary\": return CFB.read(d, { type: \"binary\" });\n\t\tcase \"buffer\": case \"array\": return CFB.read(d, { type: \"buffer\" });\n\t}\n\tthrow new Error(\"Unrecognized type \" + o.type);\n}\n\nfunction resolve_path(path/*:string*/, base/*:string*/)/*:string*/ {\n\tif(path.charAt(0) == \"/\") return path.slice(1);\n\tvar result = base.split('/');\n\tif(base.slice(-1) != \"/\") result.pop(); // folder path\n\tvar target = path.split('/');\n\twhile (target.length !== 0) {\n\t\tvar step = target.shift();\n\t\tif (step === '..') result.pop();\n\t\telse if (step !== '.') result.push(step);\n\t}\n\treturn result.join('/');\n}\nvar XML_HEADER = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\r\\n';\nvar attregexg=/([^\"\\s?>\\/]+)\\s*=\\s*((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:')|([^'\">\\s]+))/g;\nvar tagregex1=/<[\\/\\?]?[a-zA-Z0-9:_-]+(?:\\s+[^\"\\s?>\\/]+\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^'\">\\s=]+))*\\s*[\\/\\?]?>/mg, tagregex2 = /<[^>]*>/g;\nvar tagregex = /*#__PURE__*/XML_HEADER.match(tagregex1) ? tagregex1 : tagregex2;\nvar nsregex=/<\\w*:/, nsregex2 = /<(\\/?)\\w+:/;\nfunction parsexmltag(tag/*:string*/, skip_root/*:?boolean*/, skip_LC/*:?boolean*/)/*:any*/ {\n\tvar z = ({}/*:any*/);\n\tvar eq = 0, c = 0;\n\tfor(; eq !== tag.length; ++eq) if((c = tag.charCodeAt(eq)) === 32 || c === 10 || c === 13) break;\n\tif(!skip_root) z[0] = tag.slice(0, eq);\n\tif(eq === tag.length) return z;\n\tvar m = tag.match(attregexg), j=0, v=\"\", i=0, q=\"\", cc=\"\", quot = 1;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\tcc = m[i];\n\t\tfor(c=0; c != cc.length; ++c) if(cc.charCodeAt(c) === 61) break;\n\t\tq = cc.slice(0,c).trim();\n\t\twhile(cc.charCodeAt(c+1) == 32) ++c;\n\t\tquot = ((eq=cc.charCodeAt(c+1)) == 34 || eq == 39) ? 1 : 0;\n\t\tv = cc.slice(c+1+quot, cc.length-quot);\n\t\tfor(j=0;j!=q.length;++j) if(q.charCodeAt(j) === 58) break;\n\t\tif(j===q.length) {\n\t\t\tif(q.indexOf(\"_\") > 0) q = q.slice(0, q.indexOf(\"_\")); // from ods\n\t\t\tz[q] = v;\n\t\t\tif(!skip_LC) z[q.toLowerCase()] = v;\n\t\t}\n\t\telse {\n\t\t\tvar k = (j===5 && q.slice(0,5)===\"xmlns\"?\"xmlns\":\"\")+q.slice(j+1);\n\t\t\tif(z[k] && q.slice(j-3,j) == \"ext\") continue; // from ods\n\t\t\tz[k] = v;\n\t\t\tif(!skip_LC) z[k.toLowerCase()] = v;\n\t\t}\n\t}\n\treturn z;\n}\nfunction strip_ns(x/*:string*/)/*:string*/ { return x.replace(nsregex2, \"<$1\"); }\n\nvar encodings = {\n\t'&quot;': '\"',\n\t'&apos;': \"'\",\n\t'&gt;': '>',\n\t'&lt;': '<',\n\t'&amp;': '&'\n};\nvar rencoding = /*#__PURE__*/evert(encodings);\n//var rencstr = \"&<>'\\\"\".split(\"\");\n\n// TODO: CP remap (need to read file version to determine OS)\nvar unescapexml/*:StringConv*/ = /*#__PURE__*/(function() {\n\t/* 22.4.2.4 bstr (Basic String) */\n\tvar encregex = /&(?:quot|apos|gt|lt|amp|#x?([\\da-fA-F]+));/ig, coderegex = /_x([\\da-fA-F]{4})_/ig;\n\treturn function unescapexml(text/*:string*/)/*:string*/ {\n\t\tvar s = text + '', i = s.indexOf(\"<![CDATA[\");\n\t\tif(i == -1) return s.replace(encregex, function($$, $1) { return encodings[$$]||String.fromCharCode(parseInt($1,$$.indexOf(\"x\")>-1?16:10))||$$; }).replace(coderegex,function(m,c) {return String.fromCharCode(parseInt(c,16));});\n\t\tvar j = s.indexOf(\"]]>\");\n\t\treturn unescapexml(s.slice(0, i)) + s.slice(i+9,j) + unescapexml(s.slice(j+3));\n\t};\n})();\n\nvar decregex=/[&<>'\"]/g, charegex = /[\\u0000-\\u0008\\u000b-\\u001f]/g;\nfunction escapexml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(charegex,function(s) { return \"_x\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \"_\";});\n}\nfunction escapexmltag(text/*:string*/)/*:string*/{ return escapexml(text).replace(/ /g,\"_x0020_\"); }\n\nvar htmlcharegex = /[\\u0000-\\u001f]/g;\nfunction escapehtml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\\n/g, \"<br/>\").replace(htmlcharegex,function(s) { return \"&#x\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \";\"; });\n}\n\nfunction escapexlml(text/*:string*/)/*:string*/{\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return \"&#x\" + (s.charCodeAt(0).toString(16)).toUpperCase() + \";\"; });\n}\n\n/* TODO: handle codepages */\nvar xlml_fixstr/*:StringConv*/ = /*#__PURE__*/(function() {\n\tvar entregex = /&#(\\d+);/g;\n\tfunction entrepl($$/*:string*/,$1/*:string*/)/*:string*/ { return String.fromCharCode(parseInt($1,10)); }\n\treturn function xlml_fixstr(str/*:string*/)/*:string*/ { return str.replace(entregex,entrepl); };\n})();\nfunction xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\\r\\n|[\\r\\n])/g,\"\\&#10;\"); }\n\nfunction parsexmlbool(value/*:any*/)/*:boolean*/ {\n\tswitch(value) {\n\t\tcase 1: case true: case '1': case 'true': case 'TRUE': return true;\n\t\t/* case '0': case 'false': case 'FALSE':*/\n\t\tdefault: return false;\n\t}\n}\n\nfunction utf8reada(orig/*:string*/)/*:string*/ {\n\tvar out = \"\", i = 0, c = 0, d = 0, e = 0, f = 0, w = 0;\n\twhile (i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tif (c < 128) { out += String.fromCharCode(c); continue; }\n\t\td = orig.charCodeAt(i++);\n\t\tif (c>191 && c<224) { f = ((c & 31) << 6); f |= (d & 63); out += String.fromCharCode(f); continue; }\n\t\te = orig.charCodeAt(i++);\n\t\tif (c < 240) { out += String.fromCharCode(((c & 15) << 12) | ((d & 63) << 6) | (e & 63)); continue; }\n\t\tf = orig.charCodeAt(i++);\n\t\tw = (((c & 7) << 18) | ((d & 63) << 12) | ((e & 63) << 6) | (f & 63))-65536;\n\t\tout += String.fromCharCode(0xD800 + ((w>>>10)&1023));\n\t\tout += String.fromCharCode(0xDC00 + (w&1023));\n\t}\n\treturn out;\n}\n\nfunction utf8readb(data) {\n\tvar out = new_raw_buf(2*data.length), w, i, j = 1, k = 0, ww=0, c;\n\tfor(i = 0; i < data.length; i+=j) {\n\t\tj = 1;\n\t\tif((c=data.charCodeAt(i)) < 128) w = c;\n\t\telse if(c < 224) { w = (c&31)*64+(data.charCodeAt(i+1)&63); j=2; }\n\t\telse if(c < 240) { w=(c&15)*4096+(data.charCodeAt(i+1)&63)*64+(data.charCodeAt(i+2)&63); j=3; }\n\t\telse { j = 4;\n\t\t\tw = (c & 7)*262144+(data.charCodeAt(i+1)&63)*4096+(data.charCodeAt(i+2)&63)*64+(data.charCodeAt(i+3)&63);\n\t\t\tw -= 65536; ww = 0xD800 + ((w>>>10)&1023); w = 0xDC00 + (w&1023);\n\t\t}\n\t\tif(ww !== 0) { out[k++] = ww&255; out[k++] = ww>>>8; ww = 0; }\n\t\tout[k++] = w%256; out[k++] = w>>>8;\n\t}\n\treturn out.slice(0,k).toString('ucs2');\n}\n\nfunction utf8readc(data) { return Buffer_from(data, 'binary').toString('utf8'); }\n\nvar utf8corpus = \"foo bar baz\\u00e2\\u0098\\u0083\\u00f0\\u009f\\u008d\\u00a3\";\nvar utf8read = has_buf && (/*#__PURE__*/utf8readc(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readc || /*#__PURE__*/utf8readb(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readb) || utf8reada;\n\nvar utf8write/*:StringConv*/ = has_buf ? function(data) { return Buffer_from(data, 'utf8').toString(\"binary\"); } : function(orig/*:string*/)/*:string*/ {\n\tvar out/*:Array<string>*/ = [], i = 0, c = 0, d = 0;\n\twhile(i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tswitch(true) {\n\t\t\tcase c < 128: out.push(String.fromCharCode(c)); break;\n\t\t\tcase c < 2048:\n\t\t\t\tout.push(String.fromCharCode(192 + (c >> 6)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t\t\tbreak;\n\t\t\tcase c >= 55296 && c < 57344:\n\t\t\t\tc -= 55296; d = orig.charCodeAt(i++) - 56320 + (c<<10);\n\t\t\t\tout.push(String.fromCharCode(240 + ((d >>18) & 7)));\n\t\t\t\tout.push(String.fromCharCode(144 + ((d >>12) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((d >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (d & 63)));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tout.push(String.fromCharCode(224 + (c >> 12)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((c >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t}\n\t}\n\treturn out.join(\"\");\n};\n\n// matches <foo>...</foo> extracts content\nvar matchtag = /*#__PURE__*/(function() {\n\tvar mtcache/*:{[k:string]:RegExp}*/ = ({}/*:any*/);\n\treturn function matchtag(f/*:string*/,g/*:?string*/)/*:RegExp*/ {\n\t\tvar t = f+\"|\"+(g||\"\");\n\t\tif(mtcache[t]) return mtcache[t];\n\t\treturn (mtcache[t] = new RegExp('<(?:\\\\w+:)?'+f+'(?: xml:space=\"preserve\")?(?:[^>]*)>([\\\\s\\\\S]*?)</(?:\\\\w+:)?'+f+'>',((g||\"\")/*:any*/)));\n\t};\n})();\n\nvar htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() {\n\tvar entities/*:Array<[RegExp, string]>*/ = [\n\t\t['nbsp', ' '], ['middot', '·'],\n\t\t['quot', '\"'], ['apos', \"'\"], ['gt',   '>'], ['lt',   '<'], ['amp',  '&']\n\t].map(function(x/*:[string, string]*/) { return [new RegExp('&' + x[0] + ';', \"ig\"), x[1]]; });\n\treturn function htmldecode(str/*:string*/)/*:string*/ {\n\t\tvar o = str\n\t\t\t\t// Remove new lines and spaces from start of content\n\t\t\t\t.replace(/^[\\t\\n\\r ]+/, \"\")\n\t\t\t\t// Remove new lines and spaces from end of content\n\t\t\t\t.replace(/[\\t\\n\\r ]+$/,\"\")\n\t\t\t\t// Added line which removes any white space characters after and before html tags\n\t\t\t\t.replace(/>\\s+/g,\">\").replace(/\\s+</g,\"<\")\n\t\t\t\t// Replace remaining new lines and spaces with space\n\t\t\t\t.replace(/[\\t\\n\\r ]+/g, \" \")\n\t\t\t\t// Replace <br> tags with new lines\n\t\t\t\t.replace(/<\\s*[bB][rR]\\s*\\/?>/g,\"\\n\")\n\t\t\t\t// Strip HTML elements\n\t\t\t\t.replace(/<[^>]*>/g,\"\");\n\t\tfor(var i = 0; i < entities.length; ++i) o = o.replace(entities[i][0], entities[i][1]);\n\t\treturn o;\n\t};\n})();\n\nvar vtregex = /*#__PURE__*/(function(){ var vt_cache = {};\n\treturn function vt_regex(bt) {\n\t\tif(vt_cache[bt] !== undefined) return vt_cache[bt];\n\t\treturn (vt_cache[bt] = new RegExp(\"<(?:vt:)?\" + bt + \">([\\\\s\\\\S]*?)</(?:vt:)?\" + bt + \">\", 'g') );\n};})();\nvar vtvregex = /<\\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^>]*)>([\\s\\S]*)</;\nfunction parseVector(data/*:string*/, opts)/*:Array<{v:string,t:string}>*/ {\n\tvar h = parsexmltag(data);\n\n\tvar matches/*:Array<string>*/ = data.match(vtregex(h.baseType))||[];\n\tvar res/*:Array<any>*/ = [];\n\tif(matches.length != h.size) {\n\t\tif(opts.WTF) throw new Error(\"unexpected vector length \" + matches.length + \" != \" + h.size);\n\t\treturn res;\n\t}\n\tmatches.forEach(function(x/*:string*/) {\n\t\tvar v = x.replace(vtvregex,\"\").match(vtmregex);\n\t\tif(v) res.push({v:utf8read(v[2]), t:v[1]});\n\t});\n\treturn res;\n}\n\nvar wtregex = /(^\\s|\\s$|\\n)/;\nfunction writetag(f/*:string*/,g/*:string*/)/*:string*/ { return '<' + f + (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + '</' + f + '>'; }\n\nfunction wxt_helper(h)/*:string*/ { return keys(h).map(function(k) { return \" \" + k + '=\"' + h[k] + '\"';}).join(\"\"); }\nfunction writextag(f/*:string*/,g/*:?string*/,h) { return '<' + f + ((h != null) ? wxt_helper(h) : \"\") + ((g != null) ? (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + '</' + f : \"/\") + '>';}\n\nfunction write_w3cdtf(d/*:Date*/, t/*:?boolean*/)/*:string*/ { try { return d.toISOString().replace(/\\.\\d*/,\"\"); } catch(e) { if(t) throw e; } return \"\"; }\n\nfunction write_vt(s, xlsx/*:?boolean*/)/*:string*/ {\n\tswitch(typeof s) {\n\t\tcase 'string':\n\t\t\tvar o = writextag('vt:lpwstr', escapexml(s));\n\t\t\tif(xlsx) o = o.replace(/&quot;/g, \"_x0022_\");\n\t\t\treturn o;\n\t\tcase 'number': return writextag((s|0)==s?'vt:i4':'vt:r8', escapexml(String(s)));\n\t\tcase 'boolean': return writextag('vt:bool',s?'true':'false');\n\t}\n\tif(s instanceof Date) return writextag('vt:filetime', write_w3cdtf(s));\n\tthrow new Error(\"Unable to serialize \" + s);\n}\n\nfunction xlml_normalize(d)/*:string*/ {\n\tif(has_buf &&/*::typeof Buffer !== \"undefined\" && d != null && d instanceof Buffer &&*/ Buffer.isBuffer(d)) return d.toString('utf8');\n\tif(typeof d === 'string') return d;\n\t/* duktape */\n\tif(typeof Uint8Array !== 'undefined' && d instanceof Uint8Array) return utf8read(a2s(ab2a(d)));\n\tthrow new Error(\"Bad input format: expected Buffer or string\");\n}\n/* UOS uses CJK in tags */\nvar xlmlregex = /<(\\/?)([^\\s?><!\\/:]*:|)([^\\s?<>:\\/]+)(?:[\\s?:\\/][^>]*)?>/mg;\n//var xlmlregex = /<(\\/?)([a-z0-9]*:|)(\\w+)[^>]*>/mg;\n\nvar XMLNS = ({\n\tCORE_PROPS: 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',\n\tCUST_PROPS: \"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\",\n\tEXT_PROPS: \"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\",\n\tCT: 'http://schemas.openxmlformats.org/package/2006/content-types',\n\tRELS: 'http://schemas.openxmlformats.org/package/2006/relationships',\n\tTCMNT: 'http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments',\n\t'dc': 'http://purl.org/dc/elements/1.1/',\n\t'dcterms': 'http://purl.org/dc/terms/',\n\t'dcmitype': 'http://purl.org/dc/dcmitype/',\n\t'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',\n\t'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\n\t'sjs': 'http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties',\n\t'vt': 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',\n\t'xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n\t'xsd': 'http://www.w3.org/2001/XMLSchema'\n}/*:any*/);\n\nvar XMLNS_main = [\n\t'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\n\t'http://purl.oclc.org/ooxml/spreadsheetml/main',\n\t'http://schemas.microsoft.com/office/excel/2006/main',\n\t'http://schemas.microsoft.com/office/excel/2006/2'\n];\n\nvar XLMLNS = ({\n\t'o':    'urn:schemas-microsoft-com:office:office',\n\t'x':    'urn:schemas-microsoft-com:office:excel',\n\t'ss':   'urn:schemas-microsoft-com:office:spreadsheet',\n\t'dt':   'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882',\n\t'mv':   'http://macVmlSchemaUri',\n\t'v':    'urn:schemas-microsoft-com:vml',\n\t'html': 'http://www.w3.org/TR/REC-html40'\n}/*:any*/);\nfunction read_double_le(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ {\n\tvar s = 1 - 2 * (b[idx + 7] >>> 7);\n\tvar e = ((b[idx + 7] & 0x7f) << 4) + ((b[idx + 6] >>> 4) & 0x0f);\n\tvar m = (b[idx+6]&0x0f);\n\tfor(var i = 5; i >= 0; --i) m = m * 256 + b[idx + i];\n\tif(e == 0x7ff) return m == 0 ? (s * Infinity) : NaN;\n\tif(e == 0) e = -1022;\n\telse { e -= 1023; m += Math.pow(2,52); }\n\treturn s * Math.pow(2, e - 52) * m;\n}\n\nfunction write_double_le(b/*:RawBytes|CFBlob*/, v/*:number*/, idx/*:number*/) {\n\tvar bs = ((((v < 0) || (1/v == -Infinity)) ? 1 : 0) << 7), e = 0, m = 0;\n\tvar av = bs ? (-v) : v;\n\tif(!isFinite(av)) { e = 0x7ff; m = isNaN(v) ? 0x6969 : 0; }\n\telse if(av == 0) e = m = 0;\n\telse {\n\t\te = Math.floor(Math.log(av) / Math.LN2);\n\t\tm = av * Math.pow(2, 52 - e);\n\t\tif((e <= -1023) && (!isFinite(m) || (m < Math.pow(2,52)))) { e = -1022; }\n\t\telse { m -= Math.pow(2,52); e+=1023; }\n\t}\n\tfor(var i = 0; i <= 5; ++i, m/=256) b[idx + i] = m & 0xff;\n\tb[idx + 6] = ((e & 0x0f) << 4) | (m & 0xf);\n\tb[idx + 7] = (e >> 4) | bs;\n}\n\nvar ___toBuffer = function(bufs/*:Array<Array<RawBytes> >*/)/*:RawBytes*/ { var x=[],w=10240; for(var i=0;i<bufs[0].length;++i) if(bufs[0][i]) for(var j=0,L=bufs[0][i].length;j<L;j+=w) x.push.apply(x, bufs[0][i].slice(j,j+w)); return x; };\nvar __toBuffer = has_buf ? function(bufs) { return (bufs[0].length > 0 && Buffer.isBuffer(bufs[0][0])) ? Buffer.concat(bufs[0].map(function(x) { return Buffer.isBuffer(x) ? x : Buffer_from(x); })) : ___toBuffer(bufs);} : ___toBuffer;\n\nvar ___utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { var ss/*:Array<string>*/=[]; for(var i=s; i<e; i+=2) ss.push(String.fromCharCode(__readUInt16LE(b,i))); return ss.join(\"\").replace(chr0,''); };\nvar __utf16le = has_buf ? function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___utf16le(b,s,e); return b.toString('utf16le',s,e).replace(chr0,'')/*.replace(chr1,'!')*/; } : ___utf16le;\n\nvar ___hexlify = function(b/*:RawBytes|CFBlob*/,s/*:number*/,l/*:number*/)/*:string*/ { var ss/*:Array<string>*/=[]; for(var i=s; i<s+l; ++i) ss.push((\"0\" + b[i].toString(16)).slice(-2)); return ss.join(\"\"); };\nvar __hexlify = has_buf ? function(b/*:RawBytes|CFBlob*/,s/*:number*/,l/*:number*/)/*:string*/ { return Buffer.isBuffer(b)/*:: && b instanceof Buffer*/ ? b.toString('hex',s,s+l) : ___hexlify(b,s,l); } : ___hexlify;\n\nvar ___utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { var ss=[]; for(var i=s; i<e; i++) ss.push(String.fromCharCode(__readUInt8(b,i))); return ss.join(\"\"); };\nvar __utf8 = has_buf ? function utf8_b(b/*:RawBytes|CFBlob*/, s/*:number*/, e/*:number*/) { return (Buffer.isBuffer(b)/*:: && (b instanceof Buffer)*/) ? b.toString('utf8',s,e) : ___utf8(b,s,e); } : ___utf8;\n\nvar ___lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __lpstr = ___lpstr;\n\nvar ___cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __cpstr = ___cpstr;\n\nvar ___lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar __lpwstr = ___lpwstr;\n\nvar ___lpp4 = function lpp4_(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf16le(b, i+4,i+4+len) : \"\";};\nvar __lpp4 = ___lpp4;\n\nvar ___8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len) : \"\";};\nvar __8lpp4 = ___8lpp4;\n\nvar ___double = function(b/*:RawBytes|CFBlob*/, idx/*:number*/) { return read_double_le(b, idx);};\nvar __double = ___double;\n\nvar is_buf = function is_buf_a(a) { return Array.isArray(a) || (typeof Uint8Array !== \"undefined\" && a instanceof Uint8Array); };\n\nif(has_buf/*:: && typeof Buffer !== 'undefined'*/) {\n\t__lpstr = function lpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__cpstr = function cpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___cpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__lpwstr = function lpwstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpwstr(b, i); var len = 2*b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len-1);};\n\t__lpp4 = function lpp4_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len);};\n\t__8lpp4 = function lpp4_8b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___8lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf8',i+4,i+4+len);};\n\t__double = function double_(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(Buffer.isBuffer(b)/*::&& b instanceof Buffer*/) return b.readDoubleLE(i); return ___double(b,i); };\n\tis_buf = function is_buf_b(a) { return Buffer.isBuffer(a) || Array.isArray(a) || (typeof Uint8Array !== \"undefined\" && a instanceof Uint8Array); };\n}\n\n/* from js-xls */\nfunction cpdoit() {\n\t__utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(1200, b.slice(s,e)).replace(chr0, ''); };\n\t__utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(65001, b.slice(s,e)); };\n\t__lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_ansi, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_codepage, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len-1)) : \"\";};\n\t__lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len)) : \"\";};\n\t__8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(65001, b.slice(i+4,i+4+len)) : \"\";};\n}\nif(typeof $cptable !== 'undefined') cpdoit();\n\nvar __readUInt8 = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx]; };\nvar __readUInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+1]*(1<<8))+b[idx]; };\nvar __readInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { var u = (b[idx+1]*(1<<8))+b[idx]; return (u < 0x8000) ? u : ((0xffff - u + 1) * -1); };\nvar __readUInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]; };\nvar __readInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+3]<<24)|(b[idx+2]<<16)|(b[idx+1]<<8)|b[idx]; };\nvar __readInt32BE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx]<<24)|(b[idx+1]<<16)|(b[idx+2]<<8)|b[idx+3]; };\n\nfunction ReadShift(size/*:number*/, t/*:?string*/)/*:number|string*/ {\n\tvar o=\"\", oI/*:: :number = 0*/, oR, oo=[], w, vv, i, loc;\n\tswitch(t) {\n\t\tcase 'dbcs':\n\t\t\tloc = this.l;\n\t\t\tif(has_buf && Buffer.isBuffer(this)) o = this.slice(this.l, this.l+2*size).toString(\"utf16le\");\n\t\t\telse for(i = 0; i < size; ++i) { o+=String.fromCharCode(__readUInt16LE(this, loc)); loc+=2; }\n\t\t\tsize *= 2;\n\t\t\tbreak;\n\n\t\tcase 'utf8': o = __utf8(this, this.l, this.l + size); break;\n\t\tcase 'utf16le': size *= 2; o = __utf16le(this, this.l, this.l + size); break;\n\n\t\tcase 'wstr':\n\t\t\tif(typeof $cptable !== 'undefined') o = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l+2*size));\n\t\t\telse return ReadShift.call(this, size, 'dbcs');\n\t\t\tsize = 2 * size; break;\n\n\t\t/* [MS-OLEDS] 2.1.4 LengthPrefixedAnsiString */\n\t\tcase 'lpstr-ansi': o = __lpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\tcase 'lpstr-cp': o = __cpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OLEDS] 2.1.5 LengthPrefixedUnicodeString */\n\t\tcase 'lpwstr': o = __lpwstr(this, this.l); size = 4 + 2 * __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OFFCRYPTO] 2.1.2 Length-Prefixed Padded Unicode String (UNICODE-LP-P4) */\n\t\tcase 'lpp4': size = 4 +  __readUInt32LE(this, this.l); o = __lpp4(this, this.l); if(size & 0x02) size += 2; break;\n\t\t/* [MS-OFFCRYPTO] 2.1.3 Length-Prefixed UTF-8 String (UTF-8-LP-P4) */\n\t\tcase '8lpp4': size = 4 +  __readUInt32LE(this, this.l); o = __8lpp4(this, this.l); if(size & 0x03) size += 4 - (size & 0x03); break;\n\n\t\tcase 'cstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt8(this, this.l + size++))!==0) oo.push(_getchar(w));\n\t\t\to = oo.join(\"\"); break;\n\t\tcase '_wstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt16LE(this,this.l +size))!==0){oo.push(_getchar(w));size+=2;}\n\t\t\tsize+=2; o = oo.join(\"\"); break;\n\n\t\t/* sbcs and dbcs support continue records in the SST way TODO codepages */\n\t\tcase 'dbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i < size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt16LE(this, loc)));\n\t\t\t\tloc+=2;\n\t\t\t} o = oo.join(\"\"); size *= 2; break;\n\n\t\tcase 'cpstr':\n\t\t\tif(typeof $cptable !== 'undefined') {\n\t\t\t\to = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l + size));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t/* falls through */\n\t\tcase 'sbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i != size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt8(this, loc)));\n\t\t\t\tloc+=1;\n\t\t\t} o = oo.join(\"\"); break;\n\n\t\tdefault:\n\tswitch(size) {\n\t\tcase 1: oI = __readUInt8(this, this.l); this.l++; return oI;\n\t\tcase 2: oI = (t === 'i' ? __readInt16LE : __readUInt16LE)(this, this.l); this.l += 2; return oI;\n\t\tcase 4: case -4:\n\t\t\tif(t === 'i' || ((this[this.l+3] & 0x80)===0)) { oI = ((size > 0) ? __readInt32LE : __readInt32BE)(this, this.l); this.l += 4; return oI; }\n\t\t\telse { oR = __readUInt32LE(this, this.l); this.l += 4; } return oR;\n\t\tcase 8: case -8:\n\t\t\tif(t === 'f') {\n\t\t\t\tif(size == 8) oR = __double(this, this.l);\n\t\t\t\telse oR = __double([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]], 0);\n\t\t\t\tthis.l += 8; return oR;\n\t\t\t} else size = 8;\n\t\t/* falls through */\n\t\tcase 16: o = __hexlify(this, this.l, size); break;\n\t}}\n\tthis.l+=size; return o;\n}\n\nvar __writeUInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); b[idx+2] = ((val >>> 16) & 0xFF); b[idx+3] = ((val >>> 24) & 0xFF); };\nvar __writeInt32LE  = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >> 8) & 0xFF); b[idx+2] = ((val >> 16) & 0xFF); b[idx+3] = ((val >> 24) & 0xFF); };\nvar __writeUInt16LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); };\n\nfunction WriteShift(t/*:number*/, val/*:string|number*/, f/*:?string*/)/*:any*/ {\n\tvar size = 0, i = 0;\n\tif(f === 'dbcs') {\n\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\tfor(i = 0; i != val.length; ++i) __writeUInt16LE(this, val.charCodeAt(i), this.l + 2 * i);\n\t\tsize = 2 * val.length;\n\t} else if(f === 'sbcs') {\n\t\tif(typeof $cptable !== 'undefined' && current_ansi == 874) {\n\t\t\t/* TODO: use tables directly, don't encode */\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tfor(i = 0; i != val.length; ++i) {\n\t\t\t\tvar cppayload = $cptable.utils.encode(current_ansi, val.charAt(i));\n\t\t\t\tthis[this.l + i] = cppayload[0];\n\t\t\t}\n\t\t} else {\n\t\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\t\tval = val.replace(/[^\\x00-\\x7F]/g, \"_\");\n\t\t\t/*:: if(typeof val !== 'string') throw new Error(\"unreachable\"); */\n\t\t\tfor(i = 0; i != val.length; ++i) this[this.l + i] = (val.charCodeAt(i) & 0xFF);\n\t\t}\n\t\tsize = val.length;\n\t} else if(f === 'hex') {\n\t\tfor(; i < t; ++i) {\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tthis[this.l++] = (parseInt(val.slice(2*i, 2*i+2), 16)||0);\n\t\t} return this;\n\t} else if(f === 'utf16le') {\n\t\t\t/*:: if(typeof val !== \"string\") throw new Error(\"unreachable\"); */\n\t\t\tvar end/*:number*/ = Math.min(this.l + t, this.length);\n\t\t\tfor(i = 0; i < Math.min(val.length, t); ++i) {\n\t\t\t\tvar cc = val.charCodeAt(i);\n\t\t\t\tthis[this.l++] = (cc & 0xff);\n\t\t\t\tthis[this.l++] = (cc >> 8);\n\t\t\t}\n\t\t\twhile(this.l < end) this[this.l++] = 0;\n\t\t\treturn this;\n\t} else /*:: if(typeof val === 'number') */ switch(t) {\n\t\tcase  1: size = 1; this[this.l] = val&0xFF; break;\n\t\tcase  2: size = 2; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; break;\n\t\tcase  3: size = 3; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; val >>>= 8; this[this.l+2] = val&0xFF; break;\n\t\tcase  4: size = 4; __writeUInt32LE(this, val, this.l); break;\n\t\tcase  8: size = 8; if(f === 'f') { write_double_le(this, val, this.l); break; }\n\t\t/* falls through */\n\t\tcase 16: break;\n\t\tcase -4: size = 4; __writeInt32LE(this, val, this.l); break;\n\t}\n\tthis.l += size; return this;\n}\n\nfunction CheckField(hexstr/*:string*/, fld/*:string*/)/*:void*/ {\n\tvar m = __hexlify(this,this.l,hexstr.length>>1);\n\tif(m !== hexstr) throw new Error(fld + 'Expected ' + hexstr + ' saw ' + m);\n\tthis.l += hexstr.length>>1;\n}\n\nfunction prep_blob(blob, pos/*:number*/)/*:void*/ {\n\tblob.l = pos;\n\tblob.read_shift = /*::(*/ReadShift/*:: :any)*/;\n\tblob.chk = CheckField;\n\tblob.write_shift = WriteShift;\n}\n\nfunction parsenoop(blob, length/*:: :number, opts?:any */) { blob.l += length; }\n\nfunction new_buf(sz/*:number*/)/*:Block*/ {\n\tvar o = new_raw_buf(sz);\n\tprep_blob(o, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.1.4 Record */\nfunction recordhopper(data, cb/*:RecordHopperCB*/, opts/*:?any*/) {\n\tif(!data) return;\n\tvar tmpbyte, cntbyte, length;\n\tprep_blob(data, data.l || 0);\n\tvar L = data.length, RT = 0, tgt = 0;\n\twhile(data.l < L) {\n\t\tRT = data.read_shift(1);\n\t\tif(RT & 0x80) RT = (RT & 0x7F) + ((data.read_shift(1) & 0x7F)<<7);\n\t\tvar R = XLSBRecordEnum[RT] || XLSBRecordEnum[0xFFFF];\n\t\ttmpbyte = data.read_shift(1);\n\t\tlength = tmpbyte & 0x7F;\n\t\tfor(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);\n\t\ttgt = data.l + length;\n\t\tvar d = R.f && R.f(data, length, opts);\n\t\tdata.l = tgt;\n\t\tif(cb(d, R, RT)) return;\n\t}\n}\n\n/* control buffer usage for fixed-length buffers */\nfunction buf_array()/*:BufArray*/ {\n\tvar bufs/*:Array<Block>*/ = [], blksz = has_buf ? 256 : 2048;\n\tvar newblk = function ba_newblk(sz/*:number*/)/*:Block*/ {\n\t\tvar o/*:Block*/ = (new_buf(sz)/*:any*/);\n\t\tprep_blob(o, 0);\n\t\treturn o;\n\t};\n\n\tvar curbuf/*:Block*/ = newblk(blksz);\n\n\tvar endbuf = function ba_endbuf() {\n\t\tif(!curbuf) return;\n\t\tif(curbuf.length > curbuf.l) { curbuf = curbuf.slice(0, curbuf.l); curbuf.l = curbuf.length; }\n\t\tif(curbuf.length > 0) bufs.push(curbuf);\n\t\tcurbuf = null;\n\t};\n\n\tvar next = function ba_next(sz/*:number*/)/*:Block*/ {\n\t\tif(curbuf && (sz < (curbuf.length - curbuf.l))) return curbuf;\n\t\tendbuf();\n\t\treturn (curbuf = newblk(Math.max(sz+1, blksz)));\n\t};\n\n\tvar end = function ba_end() {\n\t\tendbuf();\n\t\treturn bconcat(bufs);\n\t};\n\n\tvar push = function ba_push(buf) { endbuf(); curbuf = buf; if(curbuf.l == null) curbuf.l = curbuf.length; next(blksz); };\n\n\treturn ({ next:next, push:push, end:end, _bufs:bufs }/*:any*/);\n}\n\nfunction write_record(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/) {\n\tvar t/*:number*/ = +type, l;\n\tif(isNaN(t)) return; // TODO: throw something here?\n\tif(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;\n\tl = 1 + (t >= 0x80 ? 1 : 0) + 1/* + length*/;\n\tif(length >= 0x80) ++l; if(length >= 0x4000) ++l; if(length >= 0x200000) ++l;\n\tvar o = ba.next(l);\n\tif(t <= 0x7F) o.write_shift(1, t);\n\telse {\n\t\to.write_shift(1, (t & 0x7F) + 0x80);\n\t\to.write_shift(1, (t >> 7));\n\t}\n\tfor(var i = 0; i != 4; ++i) {\n\t\tif(length >= 0x80) { o.write_shift(1, (length & 0x7F)+0x80); length >>= 7; }\n\t\telse { o.write_shift(1, length); break; }\n\t}\n\tif(/*:: length != null &&*/length > 0 && is_buf(payload)) ba.push(payload);\n}\n/* XLS ranges enforced */\nfunction shift_cell_xls(cell/*:CellAddress*/, tgt/*:any*/, opts/*:?any*/)/*:CellAddress*/ {\n\tvar out = dup(cell);\n\tif(tgt.s) {\n\t\tif(out.cRel) out.c += tgt.s.c;\n\t\tif(out.rRel) out.r += tgt.s.r;\n\t} else {\n\t\tif(out.cRel) out.c += tgt.c;\n\t\tif(out.rRel) out.r += tgt.r;\n\t}\n\tif(!opts || opts.biff < 12) {\n\t\twhile(out.c >= 0x100) out.c -= 0x100;\n\t\twhile(out.r >= 0x10000) out.r -= 0x10000;\n\t}\n\treturn out;\n}\n\nfunction shift_range_xls(cell, range, opts) {\n\tvar out = dup(cell);\n\tout.s = shift_cell_xls(out.s, range.s, opts);\n\tout.e = shift_cell_xls(out.e, range.s, opts);\n\treturn out;\n}\n\nfunction encode_cell_xls(c/*:CellAddress*/, biff/*:number*/)/*:string*/ {\n\tif(c.cRel && c.c < 0) { c = dup(c); while(c.c < 0) c.c += (biff > 8) ? 0x4000 : 0x100; }\n\tif(c.rRel && c.r < 0) { c = dup(c); while(c.r < 0) c.r += (biff > 8) ? 0x100000 : ((biff > 5) ? 0x10000 : 0x4000); }\n\tvar s = encode_cell(c);\n\tif(!c.cRel && c.cRel != null) s = fix_col(s);\n\tif(!c.rRel && c.rRel != null) s = fix_row(s);\n\treturn s;\n}\n\nfunction encode_range_xls(r, opts)/*:string*/ {\n\tif(r.s.r == 0 && !r.s.rRel) {\n\t\tif(r.e.r == (opts.biff >= 12 ? 0xFFFFF : (opts.biff >= 8 ? 0x10000 : 0x4000)) && !r.e.rRel) {\n\t\t\treturn (r.s.cRel ? \"\" : \"$\") + encode_col(r.s.c) + \":\" + (r.e.cRel ? \"\" : \"$\") + encode_col(r.e.c);\n\t\t}\n\t}\n\tif(r.s.c == 0 && !r.s.cRel) {\n\t\tif(r.e.c == (opts.biff >= 12 ? 0x3FFF : 0xFF) && !r.e.cRel) {\n\t\t\treturn (r.s.rRel ? \"\" : \"$\") + encode_row(r.s.r) + \":\" + (r.e.rRel ? \"\" : \"$\") + encode_row(r.e.r);\n\t\t}\n\t}\n\treturn encode_cell_xls(r.s, opts.biff) + \":\" + encode_cell_xls(r.e, opts.biff);\n}\nfunction decode_row(rowstr/*:string*/)/*:number*/ { return parseInt(unfix_row(rowstr),10) - 1; }\nfunction encode_row(row/*:number*/)/*:string*/ { return \"\" + (row + 1); }\nfunction fix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/([A-Z]|^)(\\d+)$/,\"$1$$$2\"); }\nfunction unfix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/\\$(\\d+)$/,\"$1\"); }\n\nfunction decode_col(colstr/*:string*/)/*:number*/ { var c = unfix_col(colstr), d = 0, i = 0; for(; i !== c.length; ++i) d = 26*d + c.charCodeAt(i) - 64; return d - 1; }\nfunction encode_col(col/*:number*/)/*:string*/ { if(col < 0) throw new Error(\"invalid column \" + col); var s=\"\"; for(++col; col; col=Math.floor((col-1)/26)) s = String.fromCharCode(((col-1)%26) + 65) + s; return s; }\nfunction fix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^([A-Z])/,\"$$$1\"); }\nfunction unfix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^\\$([A-Z])/,\"$1\"); }\n\nfunction split_cell(cstr/*:string*/)/*:Array<string>*/ { return cstr.replace(/(\\$?[A-Z]*)(\\$?\\d*)/,\"$1,$2\").split(\",\"); }\n//function decode_cell(cstr/*:string*/)/*:CellAddress*/ { var splt = split_cell(cstr); return { c:decode_col(splt[0]), r:decode_row(splt[1]) }; }\nfunction decode_cell(cstr/*:string*/)/*:CellAddress*/ {\n\tvar R = 0, C = 0;\n\tfor(var i = 0; i < cstr.length; ++i) {\n\t\tvar cc = cstr.charCodeAt(i);\n\t\tif(cc >= 48 && cc <= 57) R = 10 * R + (cc - 48);\n\t\telse if(cc >= 65 && cc <= 90) C = 26 * C + (cc - 64);\n\t}\n\treturn { c: C - 1, r:R - 1 };\n}\n//function encode_cell(cell/*:CellAddress*/)/*:string*/ { return encode_col(cell.c) + encode_row(cell.r); }\nfunction encode_cell(cell/*:CellAddress*/)/*:string*/ {\n\tvar col = cell.c + 1;\n\tvar s=\"\";\n\tfor(; col; col=((col-1)/26)|0) s = String.fromCharCode(((col-1)%26) + 65) + s;\n\treturn s + (cell.r + 1);\n}\nfunction decode_range(range/*:string*/)/*:Range*/ {\n\tvar idx = range.indexOf(\":\");\n\tif(idx == -1) return { s: decode_cell(range), e: decode_cell(range) };\n\treturn { s: decode_cell(range.slice(0, idx)), e: decode_cell(range.slice(idx + 1)) };\n}\n/*# if only one arg, it is assumed to be a Range.  If 2 args, both are cell addresses */\nfunction encode_range(cs/*:CellAddrSpec|Range*/,ce/*:?CellAddrSpec*/)/*:string*/ {\n\tif(typeof ce === 'undefined' || typeof ce === 'number') {\n/*:: if(!(cs instanceof Range)) throw \"unreachable\"; */\n\t\treturn encode_range(cs.s, cs.e);\n\t}\n/*:: if((cs instanceof Range)) throw \"unreachable\"; */\n\tif(typeof cs !== 'string') cs = encode_cell((cs/*:any*/));\n\tif(typeof ce !== 'string') ce = encode_cell((ce/*:any*/));\n/*:: if(typeof cs !== 'string') throw \"unreachable\"; */\n/*:: if(typeof ce !== 'string') throw \"unreachable\"; */\n\treturn cs == ce ? cs : cs + \":\" + ce;\n}\n\nfunction safe_decode_range(range/*:string*/)/*:Range*/ {\n\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\tvar idx = 0, i = 0, cc = 0;\n\tvar len = range.length;\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.s.c = --idx;\n\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.s.r = --idx;\n\n\tif(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }\n\t++i;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.e.c = --idx;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.e.r = --idx;\n\treturn o;\n}\n\nfunction safe_format_cell(cell/*:Cell*/, v/*:any*/) {\n\tvar q = (cell.t == 'd' && v instanceof Date);\n\tif(cell.z != null) try { return (cell.w = SSF_format(cell.z, q ? datenum(v) : v)); } catch(e) { }\n\ttry { return (cell.w = SSF_format((cell.XF||{}).numFmtId||(q ? 14 : 0),  q ? datenum(v) : v)); } catch(e) { return ''+v; }\n}\n\nfunction format_cell(cell/*:Cell*/, v/*:any*/, o/*:any*/) {\n\tif(cell == null || cell.t == null || cell.t == 'z') return \"\";\n\tif(cell.w !== undefined) return cell.w;\n\tif(cell.t == 'd' && !cell.z && o && o.dateNF) cell.z = o.dateNF;\n\tif(cell.t == \"e\") return BErr[cell.v] || cell.v;\n\tif(v == undefined) return safe_format_cell(cell, cell.v);\n\treturn safe_format_cell(cell, v);\n}\n\nfunction sheet_to_workbook(sheet/*:Worksheet*/, opts)/*:Workbook*/ {\n\tvar n = opts && opts.sheet ? opts.sheet : \"Sheet1\";\n\tvar sheets = {}; sheets[n] = sheet;\n\treturn { SheetNames: [n], Sheets: sheets };\n}\n\nfunction sheet_add_aoa(_ws/*:?Worksheet*/, data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tvar dense = _ws ? Array.isArray(_ws) : o.dense;\n\tif(DENSE != null && dense == null) dense = DENSE;\n\tvar ws/*:Worksheet*/ = _ws || (dense ? ([]/*:any*/) : ({}/*:any*/));\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t\tif(!ws[\"!ref\"]) ws[\"!ref\"] = \"A1:A1\";\n\t}\n\tvar range/*:Range*/ = ({s: {c:10000000, r:10000000}, e: {c:0, r:0}}/*:any*/);\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.s.c = _range.s.c;\n\t\trange.s.r = _range.s.r;\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) range.e.r = _R = _range.e.r + 1;\n\t}\n\tfor(var R = 0; R != data.length; ++R) {\n\t\tif(!data[R]) continue;\n\t\tif(!Array.isArray(data[R])) throw new Error(\"aoa_to_sheet expects an array of arrays\");\n\t\tfor(var C = 0; C != data[R].length; ++C) {\n\t\t\tif(typeof data[R][C] === 'undefined') continue;\n\t\t\tvar cell/*:Cell*/ = ({v: data[R][C] }/*:any*/);\n\t\t\tvar __R = _R + R, __C = _C + C;\n\t\t\tif(range.s.r > __R) range.s.r = __R;\n\t\t\tif(range.s.c > __C) range.s.c = __C;\n\t\t\tif(range.e.r < __R) range.e.r = __R;\n\t\t\tif(range.e.c < __C) range.e.c = __C;\n\t\t\tif(data[R][C] && typeof data[R][C] === 'object' && !Array.isArray(data[R][C]) && !(data[R][C] instanceof Date)) cell = data[R][C];\n\t\t\telse {\n\t\t\t\tif(Array.isArray(cell.v)) { cell.f = data[R][C][1]; cell.v = cell.v[0]; }\n\t\t\t\tif(cell.v === null) {\n\t\t\t\t\tif(cell.f) cell.t = 'n';\n\t\t\t\t\telse if(o.nullError) { cell.t = 'e'; cell.v = 0; }\n\t\t\t\t\telse if(!o.sheetStubs) continue;\n\t\t\t\t\telse cell.t = 'z';\n\t\t\t\t}\n\t\t\t\telse if(typeof cell.v === 'number') cell.t = 'n';\n\t\t\t\telse if(typeof cell.v === 'boolean') cell.t = 'b';\n\t\t\t\telse if(cell.v instanceof Date) {\n\t\t\t\t\tcell.z = o.dateNF || table_fmt[14];\n\t\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.w = SSF_format(cell.z, datenum(cell.v)); }\n\t\t\t\t\telse { cell.t = 'n'; cell.v = datenum(cell.v); cell.w = SSF_format(cell.z, cell.v); }\n\t\t\t\t}\n\t\t\t\telse cell.t = 's';\n\t\t\t}\n\t\t\tif(dense) {\n\t\t\t\tif(!ws[__R]) ws[__R] = [];\n\t\t\t\tif(ws[__R][__C] && ws[__R][__C].z) cell.z = ws[__R][__C].z;\n\t\t\t\tws[__R][__C] = cell;\n\t\t\t} else {\n\t\t\t\tvar cell_ref = encode_cell(({c:__C,r:__R}/*:any*/));\n\t\t\t\tif(ws[cell_ref] && ws[cell_ref].z) cell.z = ws[cell_ref].z;\n\t\t\t\tws[cell_ref] = cell;\n\t\t\t}\n\t\t}\n\t}\n\tif(range.s.c < 10000000) ws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction aoa_to_sheet(data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ { return sheet_add_aoa(null, data, opts); }\n\nfunction parse_Int32LE(data) {\n\treturn data.read_shift(4, 'i');\n}\nfunction write_UInt32LE(x/*:number*/, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(4, x);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.168 */\nfunction parse_XLWideString(data/*::, length*/)/*:string*/ {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLWideString(data/*:string*/, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(4 + 2 * data.length); }\n\to.write_shift(4, data.length);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.91 */\n//function parse_LPWideString(data/*::, length*/)/*:string*/ {\n//\tvar cchCharacters = data.read_shift(2);\n//\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, \"utf16le\");\n//}\n\n/* [MS-XLSB] 2.5.143 */\nfunction parse_StrRun(data) {\n\treturn { ich: data.read_shift(2), ifnt: data.read_shift(2) };\n}\nfunction write_StrRun(run, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(2, run.ich || 0);\n\to.write_shift(2, run.ifnt || 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.121 */\nfunction parse_RichStr(data, length/*:number*/)/*:XLString*/ {\n\tvar start = data.l;\n\tvar flags = data.read_shift(1);\n\tvar str = parse_XLWideString(data);\n\tvar rgsStrRun = [];\n\tvar z = ({ t: str, h: str }/*:any*/);\n\tif ((flags & 1) !== 0) { /* fRichStr */\n\t\t/* TODO: formatted string */\n\t\tvar dwSizeStrRun = data.read_shift(4);\n\t\tfor (var i = 0; i != dwSizeStrRun; ++i) rgsStrRun.push(parse_StrRun(data));\n\t\tz.r = rgsStrRun;\n\t}\n\telse z.r = [{ ich: 0, ifnt: 0 }];\n\t//if((flags & 2) !== 0) { /* fExtStr */\n\t//\t/* TODO: phonetic string */\n\t//}\n\tdata.l = start + length;\n\treturn z;\n}\nfunction write_RichStr(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(15 + 4 * str.t.length); }\n\to.write_shift(1, 0);\n\twrite_XLWideString(str.t, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n/* [MS-XLSB] 2.4.328 BrtCommentText (RichStr w/1 run) */\nvar parse_BrtCommentText = parse_RichStr;\nfunction write_BrtCommentText(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(23 + 4 * str.t.length); }\n\to.write_shift(1, 1);\n\twrite_XLWideString(str.t, o);\n\to.write_shift(4, 1);\n\twrite_StrRun({ ich: 0, ifnt: 0 }, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.9 */\nfunction parse_XLSBCell(data)/*:any*/ {\n\tvar col = data.read_shift(4);\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) << 16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c: col, iStyleRef: iStyleRef };\n}\nfunction write_XLSBCell(cell/*:any*/, o/*:?Block*/) {\n\tif (o == null) o = new_buf(8);\n\to.write_shift(-4, cell.c);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* Short XLSB Cell does not include column */\nfunction parse_XLSBShortCell(data)/*:any*/ {\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) <<16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c:-1, iStyleRef: iStyleRef };\n}\nfunction write_XLSBShortCell(cell/*:any*/, o/*:?Block*/) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.21 */\nvar parse_XLSBCodeName = parse_XLWideString;\nvar write_XLSBCodeName = write_XLWideString;\n\n/* [MS-XLSB] 2.5.166 */\nfunction parse_XLNullableWideString(data/*::, length*/)/*:string*/ {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 || cchCharacters === 0xFFFFFFFF ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLNullableWideString(data/*:string*/, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(127); }\n\to.write_shift(4, data.length > 0 ? data.length : 0xFFFFFFFF);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.165 */\nvar parse_XLNameWideString = parse_XLWideString;\n//var write_XLNameWideString = write_XLWideString;\n\n/* [MS-XLSB] 2.5.114 */\nvar parse_RelID = parse_XLNullableWideString;\nvar write_RelID = write_XLNullableWideString;\n\n\n/* [MS-XLS] 2.5.217 ; [MS-XLSB] 2.5.122 */\nfunction parse_RkNumber(data)/*:number*/ {\n\tvar b = data.slice(data.l, data.l + 4);\n\tvar fX100 = (b[0] & 1), fInt = (b[0] & 2);\n\tdata.l += 4;\n\tvar RK = fInt === 0 ? __double([0, 0, 0, 0, (b[0] & 0xFC), b[1], b[2], b[3]], 0) : __readInt32LE(b, 0) >> 2;\n\treturn fX100 ? (RK / 100) : RK;\n}\nfunction write_RkNumber(data/*:number*/, o) {\n\tif (o == null) o = new_buf(4);\n\tvar fX100 = 0, fInt = 0, d100 = data * 100;\n\tif ((data == (data | 0)) && (data >= -(1 << 29)) && (data < (1 << 29))) { fInt = 1; }\n\telse if ((d100 == (d100 | 0)) && (d100 >= -(1 << 29)) && (d100 < (1 << 29))) { fInt = 1; fX100 = 1; }\n\tif (fInt) o.write_shift(-4, ((fX100 ? d100 : data) << 2) + (fX100 + 2));\n\telse throw new Error(\"unsupported RkNumber \" + data); // TODO\n}\n\n\n/* [MS-XLSB] 2.5.117 RfX */\nfunction parse_RfX(data /*::, length*/)/*:Range*/ {\n\tvar cell/*:Range*/ = ({ s: {}, e: {} }/*:any*/);\n\tcell.s.r = data.read_shift(4);\n\tcell.e.r = data.read_shift(4);\n\tcell.s.c = data.read_shift(4);\n\tcell.e.c = data.read_shift(4);\n\treturn cell;\n}\nfunction write_RfX(r/*:Range*/, o) {\n\tif (!o) o = new_buf(16);\n\to.write_shift(4, r.s.r);\n\to.write_shift(4, r.e.r);\n\to.write_shift(4, r.s.c);\n\to.write_shift(4, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.153 UncheckedRfX */\nvar parse_UncheckedRfX = parse_RfX;\nvar write_UncheckedRfX = write_RfX;\n\n/* [MS-XLSB] 2.5.155 UncheckedSqRfX */\n//function parse_UncheckedSqRfX(data) {\n//\tvar cnt = data.read_shift(4);\n//\tvar out = [];\n//\tfor(var i = 0; i < cnt; ++i) {\n//\t\tvar rng = parse_UncheckedRfX(data);\n//\t\tout.push(encode_range(rng));\n//\t}\n//\treturn out.join(\",\");\n//}\n//function write_UncheckedSqRfX(sqrfx/*:string*/) {\n//\tvar parts = sqrfx.split(/\\s*,\\s*/);\n//\tvar o = new_buf(4); o.write_shift(4, parts.length);\n//\tvar out = [o];\n//\tparts.forEach(function(rng) {\n//\t\tout.push(write_UncheckedRfX(safe_decode_range(rng)));\n//\t});\n//\treturn bconcat(out);\n//}\n\n/* [MS-XLS] 2.5.342 ; [MS-XLSB] 2.5.171 */\n/* TODO: error checking, NaN and Infinity values are not valid Xnum */\nfunction parse_Xnum(data/*::, length*/) {\n\tif(data.length - data.l < 8) throw \"XLS Xnum Buffer underflow\";\n\treturn data.read_shift(8, 'f');\n}\nfunction write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }\n\n/* [MS-XLSB] 2.4.324 BrtColor */\nfunction parse_BrtColor(data/*::, length*/) {\n\tvar out = {};\n\tvar d = data.read_shift(1);\n\n\t//var fValidRGB = d & 1;\n\tvar xColorType = d >>> 1;\n\n\tvar index = data.read_shift(1);\n\tvar nTS = data.read_shift(2, 'i');\n\tvar bR = data.read_shift(1);\n\tvar bG = data.read_shift(1);\n\tvar bB = data.read_shift(1);\n\tdata.l++; //var bAlpha = data.read_shift(1);\n\n\tswitch (xColorType) {\n\t\tcase 0: out.auto = 1; break;\n\t\tcase 1:\n\t\t\tout.index = index;\n\t\t\tvar icv = XLSIcv[index];\n\t\t\t/* automatic pseudo index 81 */\n\t\t\tif (icv) out.rgb = rgb2Hex(icv);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/* if(!fValidRGB) throw new Error(\"invalid\"); */\n\t\t\tout.rgb = rgb2Hex([bR, bG, bB]);\n\t\t\tbreak;\n\t\tcase 3: out.theme = index; break;\n\t}\n\tif (nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768;\n\n\treturn out;\n}\nfunction write_BrtColor(color, o) {\n\tif (!o) o = new_buf(8);\n\tif (!color || color.auto) { o.write_shift(4, 0); o.write_shift(4, 0); return o; }\n\tif (color.index != null) {\n\t\to.write_shift(1, 0x02);\n\t\to.write_shift(1, color.index);\n\t} else if (color.theme != null) {\n\t\to.write_shift(1, 0x06);\n\t\to.write_shift(1, color.theme);\n\t} else {\n\t\to.write_shift(1, 0x05);\n\t\to.write_shift(1, 0);\n\t}\n\tvar nTS = color.tint || 0;\n\tif (nTS > 0) nTS *= 32767;\n\telse if (nTS < 0) nTS *= 32768;\n\to.write_shift(2, nTS);\n\tif (!color.rgb || color.theme != null) {\n\t\to.write_shift(2, 0);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(1, 0);\n\t} else {\n\t\tvar rgb = (color.rgb || 'FFFFFF');\n\t\tif (typeof rgb == 'number') rgb = (\"000000\" + rgb.toString(16)).slice(-6);\n\t\to.write_shift(1, parseInt(rgb.slice(0, 2), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(2, 4), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(4, 6), 16));\n\t\to.write_shift(1, 0xFF);\n\t}\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.52 */\nfunction parse_FontFlags(data/*::, length, opts*/) {\n\tvar d = data.read_shift(1);\n\tdata.l++;\n\tvar out = {\n\t\tfBold: d & 0x01,\n\t\tfItalic: d & 0x02,\n\t\tfUnderline: d & 0x04,\n\t\tfStrikeout: d & 0x08,\n\t\tfOutline: d & 0x10,\n\t\tfShadow: d & 0x20,\n\t\tfCondense: d & 0x40,\n\t\tfExtend: d & 0x80\n\t};\n\treturn out;\n}\nfunction write_FontFlags(font, o) {\n\tif (!o) o = new_buf(2);\n\tvar grbit =\n\t\t(font.italic ? 0x02 : 0) |\n\t\t(font.strike ? 0x08 : 0) |\n\t\t(font.outline ? 0x10 : 0) |\n\t\t(font.shadow ? 0x20 : 0) |\n\t\t(font.condense ? 0x40 : 0) |\n\t\t(font.extend ? 0x80 : 0);\n\to.write_shift(1, grbit);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-OLEDS] 2.3.1 and 2.3.2 */\nfunction parse_ClipboardFormatOrString(o, w/*:number*/)/*:string*/ {\n\t// $FlowIgnore\n\tvar ClipFmt = { 2: \"BITMAP\", 3: \"METAFILEPICT\", 8: \"DIB\", 14: \"ENHMETAFILE\" };\n\tvar m/*:number*/ = o.read_shift(4);\n\tswitch (m) {\n\t\tcase 0x00000000: return \"\";\n\t\tcase 0xffffffff: case 0xfffffffe: return ClipFmt[o.read_shift(4)] || \"\";\n\t}\n\tif (m > 0x190) throw new Error(\"Unsupported Clipboard: \" + m.toString(16));\n\to.l -= 4;\n\treturn o.read_shift(0, w == 1 ? \"lpstr\" : \"lpwstr\");\n}\nfunction parse_ClipboardFormatOrAnsiString(o) { return parse_ClipboardFormatOrString(o, 1); }\nfunction parse_ClipboardFormatOrUnicodeString(o) { return parse_ClipboardFormatOrString(o, 2); }\n\n/* [MS-OLEPS] 2.2 PropertyType */\n// Note: some tree shakers cannot handle VT_VECTOR | $CONST, hence extra vars\n//var VT_EMPTY    = 0x0000;\n//var VT_NULL     = 0x0001;\nvar VT_I2       = 0x0002;\nvar VT_I4       = 0x0003;\n//var VT_R4       = 0x0004;\n//var VT_R8       = 0x0005;\n//var VT_CY       = 0x0006;\n//var VT_DATE     = 0x0007;\n//var VT_BSTR     = 0x0008;\n//var VT_ERROR    = 0x000A;\nvar VT_BOOL     = 0x000B;\nvar VT_VARIANT  = 0x000C;\n//var VT_DECIMAL  = 0x000E;\n//var VT_I1       = 0x0010;\n//var VT_UI1      = 0x0011;\n//var VT_UI2      = 0x0012;\nvar VT_UI4      = 0x0013;\n//var VT_I8       = 0x0014;\n//var VT_UI8      = 0x0015;\n//var VT_INT      = 0x0016;\n//var VT_UINT     = 0x0017;\nvar VT_LPSTR    = 0x001E;\n//var VT_LPWSTR   = 0x001F;\nvar VT_FILETIME = 0x0040;\nvar VT_BLOB     = 0x0041;\n//var VT_STREAM   = 0x0042;\n//var VT_STORAGE  = 0x0043;\n//var VT_STREAMED_Object  = 0x0044;\n//var VT_STORED_Object    = 0x0045;\n//var VT_BLOB_Object      = 0x0046;\nvar VT_CF       = 0x0047;\n//var VT_CLSID    = 0x0048;\n//var VT_VERSIONED_STREAM = 0x0049;\nvar VT_VECTOR   = 0x1000;\nvar VT_VECTOR_VARIANT = 0x100C;\nvar VT_VECTOR_LPSTR   = 0x101E;\n//var VT_ARRAY    = 0x2000;\n\nvar VT_STRING   = 0x0050; // 2.3.3.1.11 VtString\nvar VT_USTR     = 0x0051; // 2.3.3.1.12 VtUnalignedString\nvar VT_CUSTOM   = [VT_STRING, VT_USTR];\n\n/* [MS-OSHARED] 2.3.3.2.2.1 Document Summary Information PIDDSI */\nvar DocSummaryPIDDSI = {\n\t/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },\n\t/*::[*/0x02/*::]*/: { n: 'Category', t: VT_STRING },\n\t/*::[*/0x03/*::]*/: { n: 'PresentationFormat', t: VT_STRING },\n\t/*::[*/0x04/*::]*/: { n: 'ByteCount', t: VT_I4 },\n\t/*::[*/0x05/*::]*/: { n: 'LineCount', t: VT_I4 },\n\t/*::[*/0x06/*::]*/: { n: 'ParagraphCount', t: VT_I4 },\n\t/*::[*/0x07/*::]*/: { n: 'SlideCount', t: VT_I4 },\n\t/*::[*/0x08/*::]*/: { n: 'NoteCount', t: VT_I4 },\n\t/*::[*/0x09/*::]*/: { n: 'HiddenCount', t: VT_I4 },\n\t/*::[*/0x0a/*::]*/: { n: 'MultimediaClipCount', t: VT_I4 },\n\t/*::[*/0x0b/*::]*/: { n: 'ScaleCrop', t: VT_BOOL },\n\t/*::[*/0x0c/*::]*/: { n: 'HeadingPairs', t: VT_VECTOR_VARIANT /* VT_VECTOR | VT_VARIANT */ },\n\t/*::[*/0x0d/*::]*/: { n: 'TitlesOfParts', t: VT_VECTOR_LPSTR /* VT_VECTOR | VT_LPSTR */ },\n\t/*::[*/0x0e/*::]*/: { n: 'Manager', t: VT_STRING },\n\t/*::[*/0x0f/*::]*/: { n: 'Company', t: VT_STRING },\n\t/*::[*/0x10/*::]*/: { n: 'LinksUpToDate', t: VT_BOOL },\n\t/*::[*/0x11/*::]*/: { n: 'CharacterCount', t: VT_I4 },\n\t/*::[*/0x13/*::]*/: { n: 'SharedDoc', t: VT_BOOL },\n\t/*::[*/0x16/*::]*/: { n: 'HyperlinksChanged', t: VT_BOOL },\n\t/*::[*/0x17/*::]*/: { n: 'AppVersion', t: VT_I4, p: 'version' },\n\t/*::[*/0x18/*::]*/: { n: 'DigSig', t: VT_BLOB },\n\t/*::[*/0x1A/*::]*/: { n: 'ContentType', t: VT_STRING },\n\t/*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING },\n\t/*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING },\n\t/*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING },\n\t/*::[*/0xFF/*::]*/: {},\n\t/* [MS-OLEPS] 2.18 */\n\t/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },\n\t/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },\n\t/*::[*/0x72627262/*::]*/: {}\n};\n\n/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */\nvar SummaryPIDSI = {\n\t/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },\n\t/*::[*/0x02/*::]*/: { n: 'Title', t: VT_STRING },\n\t/*::[*/0x03/*::]*/: { n: 'Subject', t: VT_STRING },\n\t/*::[*/0x04/*::]*/: { n: 'Author', t: VT_STRING },\n\t/*::[*/0x05/*::]*/: { n: 'Keywords', t: VT_STRING },\n\t/*::[*/0x06/*::]*/: { n: 'Comments', t: VT_STRING },\n\t/*::[*/0x07/*::]*/: { n: 'Template', t: VT_STRING },\n\t/*::[*/0x08/*::]*/: { n: 'LastAuthor', t: VT_STRING },\n\t/*::[*/0x09/*::]*/: { n: 'RevNumber', t: VT_STRING },\n\t/*::[*/0x0A/*::]*/: { n: 'EditTime', t: VT_FILETIME },\n\t/*::[*/0x0B/*::]*/: { n: 'LastPrinted', t: VT_FILETIME },\n\t/*::[*/0x0C/*::]*/: { n: 'CreatedDate', t: VT_FILETIME },\n\t/*::[*/0x0D/*::]*/: { n: 'ModifiedDate', t: VT_FILETIME },\n\t/*::[*/0x0E/*::]*/: { n: 'PageCount', t: VT_I4 },\n\t/*::[*/0x0F/*::]*/: { n: 'WordCount', t: VT_I4 },\n\t/*::[*/0x10/*::]*/: { n: 'CharCount', t: VT_I4 },\n\t/*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF },\n\t/*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING },\n\t/*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 },\n\t/*::[*/0xFF/*::]*/: {},\n\t/* [MS-OLEPS] 2.18 */\n\t/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },\n\t/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },\n\t/*::[*/0x72627262/*::]*/: {}\n};\n\n/* [MS-XLS] 2.4.63 Country/Region codes */\nvar CountryEnum = {\n\t/*::[*/0x0001/*::]*/: \"US\", // United States\n\t/*::[*/0x0002/*::]*/: \"CA\", // Canada\n\t/*::[*/0x0003/*::]*/: \"\", // Latin America (except Brazil)\n\t/*::[*/0x0007/*::]*/: \"RU\", // Russia\n\t/*::[*/0x0014/*::]*/: \"EG\", // Egypt\n\t/*::[*/0x001E/*::]*/: \"GR\", // Greece\n\t/*::[*/0x001F/*::]*/: \"NL\", // Netherlands\n\t/*::[*/0x0020/*::]*/: \"BE\", // Belgium\n\t/*::[*/0x0021/*::]*/: \"FR\", // France\n\t/*::[*/0x0022/*::]*/: \"ES\", // Spain\n\t/*::[*/0x0024/*::]*/: \"HU\", // Hungary\n\t/*::[*/0x0027/*::]*/: \"IT\", // Italy\n\t/*::[*/0x0029/*::]*/: \"CH\", // Switzerland\n\t/*::[*/0x002B/*::]*/: \"AT\", // Austria\n\t/*::[*/0x002C/*::]*/: \"GB\", // United Kingdom\n\t/*::[*/0x002D/*::]*/: \"DK\", // Denmark\n\t/*::[*/0x002E/*::]*/: \"SE\", // Sweden\n\t/*::[*/0x002F/*::]*/: \"NO\", // Norway\n\t/*::[*/0x0030/*::]*/: \"PL\", // Poland\n\t/*::[*/0x0031/*::]*/: \"DE\", // Germany\n\t/*::[*/0x0034/*::]*/: \"MX\", // Mexico\n\t/*::[*/0x0037/*::]*/: \"BR\", // Brazil\n\t/*::[*/0x003d/*::]*/: \"AU\", // Australia\n\t/*::[*/0x0040/*::]*/: \"NZ\", // New Zealand\n\t/*::[*/0x0042/*::]*/: \"TH\", // Thailand\n\t/*::[*/0x0051/*::]*/: \"JP\", // Japan\n\t/*::[*/0x0052/*::]*/: \"KR\", // Korea\n\t/*::[*/0x0054/*::]*/: \"VN\", // Viet Nam\n\t/*::[*/0x0056/*::]*/: \"CN\", // China\n\t/*::[*/0x005A/*::]*/: \"TR\", // Turkey\n\t/*::[*/0x0069/*::]*/: \"JS\", // Ramastan\n\t/*::[*/0x00D5/*::]*/: \"DZ\", // Algeria\n\t/*::[*/0x00D8/*::]*/: \"MA\", // Morocco\n\t/*::[*/0x00DA/*::]*/: \"LY\", // Libya\n\t/*::[*/0x015F/*::]*/: \"PT\", // Portugal\n\t/*::[*/0x0162/*::]*/: \"IS\", // Iceland\n\t/*::[*/0x0166/*::]*/: \"FI\", // Finland\n\t/*::[*/0x01A4/*::]*/: \"CZ\", // Czech Republic\n\t/*::[*/0x0376/*::]*/: \"TW\", // Taiwan\n\t/*::[*/0x03C1/*::]*/: \"LB\", // Lebanon\n\t/*::[*/0x03C2/*::]*/: \"JO\", // Jordan\n\t/*::[*/0x03C3/*::]*/: \"SY\", // Syria\n\t/*::[*/0x03C4/*::]*/: \"IQ\", // Iraq\n\t/*::[*/0x03C5/*::]*/: \"KW\", // Kuwait\n\t/*::[*/0x03C6/*::]*/: \"SA\", // Saudi Arabia\n\t/*::[*/0x03CB/*::]*/: \"AE\", // United Arab Emirates\n\t/*::[*/0x03CC/*::]*/: \"IL\", // Israel\n\t/*::[*/0x03CE/*::]*/: \"QA\", // Qatar\n\t/*::[*/0x03D5/*::]*/: \"IR\", // Iran\n\t/*::[*/0xFFFF/*::]*/: \"US\"  // United States\n};\n\n/* [MS-XLS] 2.5.127 */\nvar XLSFillPattern = [\n\tnull,\n\t'solid',\n\t'mediumGray',\n\t'darkGray',\n\t'lightGray',\n\t'darkHorizontal',\n\t'darkVertical',\n\t'darkDown',\n\t'darkUp',\n\t'darkGrid',\n\t'darkTrellis',\n\t'lightHorizontal',\n\t'lightVertical',\n\t'lightDown',\n\t'lightUp',\n\t'lightGrid',\n\t'lightTrellis',\n\t'gray125',\n\t'gray0625'\n];\n\nfunction rgbify(arr/*:Array<number>*/)/*:Array<[number, number, number]>*/ { return arr.map(function(x) { return [(x>>16)&255,(x>>8)&255,x&255]; }); }\n\n/* [MS-XLS] 2.5.161 */\n/* [MS-XLSB] 2.5.75 Icv */\nvar _XLSIcv = /*#__PURE__*/ rgbify([\n\t/* Color Constants */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t/* Overridable Defaults */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t0x800000,\n\t0x008000,\n\t0x000080,\n\t0x808000,\n\t0x800080,\n\t0x008080,\n\t0xC0C0C0,\n\t0x808080,\n\t0x9999FF,\n\t0x993366,\n\t0xFFFFCC,\n\t0xCCFFFF,\n\t0x660066,\n\t0xFF8080,\n\t0x0066CC,\n\t0xCCCCFF,\n\n\t0x000080,\n\t0xFF00FF,\n\t0xFFFF00,\n\t0x00FFFF,\n\t0x800080,\n\t0x800000,\n\t0x008080,\n\t0x0000FF,\n\t0x00CCFF,\n\t0xCCFFFF,\n\t0xCCFFCC,\n\t0xFFFF99,\n\t0x99CCFF,\n\t0xFF99CC,\n\t0xCC99FF,\n\t0xFFCC99,\n\n\t0x3366FF,\n\t0x33CCCC,\n\t0x99CC00,\n\t0xFFCC00,\n\t0xFF9900,\n\t0xFF6600,\n\t0x666699,\n\t0x969696,\n\t0x003366,\n\t0x339966,\n\t0x003300,\n\t0x333300,\n\t0x993300,\n\t0x993366,\n\t0x333399,\n\t0x333333,\n\n\t/* Other entries to appease BIFF8/12 */\n\t0xFFFFFF, /* 0x40 icvForeground ?? */\n\t0x000000, /* 0x41 icvBackground ?? */\n\t0x000000, /* 0x42 icvFrame ?? */\n\t0x000000, /* 0x43 icv3D ?? */\n\t0x000000, /* 0x44 icv3DText ?? */\n\t0x000000, /* 0x45 icv3DHilite ?? */\n\t0x000000, /* 0x46 icv3DShadow ?? */\n\t0x000000, /* 0x47 icvHilite ?? */\n\t0x000000, /* 0x48 icvCtlText ?? */\n\t0x000000, /* 0x49 icvCtlScrl ?? */\n\t0x000000, /* 0x4A icvCtlInv ?? */\n\t0x000000, /* 0x4B icvCtlBody ?? */\n\t0x000000, /* 0x4C icvCtlFrame ?? */\n\t0x000000, /* 0x4D icvCtlFore ?? */\n\t0x000000, /* 0x4E icvCtlBack ?? */\n\t0x000000, /* 0x4F icvCtlNeutral */\n\t0x000000, /* 0x50 icvInfoBk ?? */\n\t0x000000 /* 0x51 icvInfoText ?? */\n]);\nvar XLSIcv = /*#__PURE__*/dup(_XLSIcv);\n\n/* [MS-XLSB] 2.5.97.2 */\nvar BErr = {\n\t/*::[*/0x00/*::]*/: \"#NULL!\",\n\t/*::[*/0x07/*::]*/: \"#DIV/0!\",\n\t/*::[*/0x0F/*::]*/: \"#VALUE!\",\n\t/*::[*/0x17/*::]*/: \"#REF!\",\n\t/*::[*/0x1D/*::]*/: \"#NAME?\",\n\t/*::[*/0x24/*::]*/: \"#NUM!\",\n\t/*::[*/0x2A/*::]*/: \"#N/A\",\n\t/*::[*/0x2B/*::]*/: \"#GETTING_DATA\",\n\t/*::[*/0xFF/*::]*/: \"#WTF?\"\n};\n//var RBErr = evert_num(BErr);\nvar RBErr = {\n\t\"#NULL!\":        0x00,\n\t\"#DIV/0!\":       0x07,\n\t\"#VALUE!\":       0x0F,\n\t\"#REF!\":         0x17,\n\t\"#NAME?\":        0x1D,\n\t\"#NUM!\":         0x24,\n\t\"#N/A\":          0x2A,\n\t\"#GETTING_DATA\": 0x2B,\n\t\"#WTF?\":         0xFF\n};\n\n/* Parts enumerated in OPC spec, MS-XLSB and MS-XLSX */\n/* 12.3 Part Summary <SpreadsheetML> */\n/* 14.2 Part Summary <DrawingML> */\n/* [MS-XLSX] 2.1 Part Enumerations ; [MS-XLSB] 2.1.7 Part Enumeration */\nvar ct2type/*{[string]:string}*/ = ({\n\t/* Workbook */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\": \"workbooks\",\n\t\"application/vnd.ms-excel.sheet.macroEnabled.main+xml\": \"workbooks\",\n\t\"application/vnd.ms-excel.sheet.binary.macroEnabled.main\": \"workbooks\",\n\t\"application/vnd.ms-excel.addin.macroEnabled.main+xml\": \"workbooks\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\": \"workbooks\",\n\n\t/* Worksheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\": \"sheets\",\n\t\"application/vnd.ms-excel.worksheet\": \"sheets\",\n\t\"application/vnd.ms-excel.binIndexWs\": \"TODO\", /* Binary Index */\n\n\t/* Chartsheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\": \"charts\",\n\t\"application/vnd.ms-excel.chartsheet\": \"charts\",\n\n\t/* Macrosheet */\n\t\"application/vnd.ms-excel.macrosheet+xml\": \"macros\",\n\t\"application/vnd.ms-excel.macrosheet\": \"macros\",\n\t\"application/vnd.ms-excel.intlmacrosheet\": \"TODO\",\n\t\"application/vnd.ms-excel.binIndexMs\": \"TODO\", /* Binary Index */\n\n\t/* Dialogsheet */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\": \"dialogs\",\n\t\"application/vnd.ms-excel.dialogsheet\": \"dialogs\",\n\n\t/* Shared Strings */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\": \"strs\",\n\t\"application/vnd.ms-excel.sharedStrings\": \"strs\",\n\n\t/* Styles */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\": \"styles\",\n\t\"application/vnd.ms-excel.styles\": \"styles\",\n\n\t/* File Properties */\n\t\"application/vnd.openxmlformats-package.core-properties+xml\": \"coreprops\",\n\t\"application/vnd.openxmlformats-officedocument.custom-properties+xml\": \"custprops\",\n\t\"application/vnd.openxmlformats-officedocument.extended-properties+xml\": \"extprops\",\n\n\t/* Custom Data Properties */\n\t\"application/vnd.openxmlformats-officedocument.customXmlProperties+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty\": \"TODO\",\n\n\t/* Comments */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\": \"comments\",\n\t\"application/vnd.ms-excel.comments\": \"comments\",\n\t\"application/vnd.ms-excel.threadedcomments+xml\": \"threadedcomments\",\n\t\"application/vnd.ms-excel.person+xml\": \"people\",\n\n\t/* Metadata (Stock/Geography and Dynamic Array) */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\": \"metadata\",\n\t\"application/vnd.ms-excel.sheetMetadata\": \"metadata\",\n\n\t/* PivotTable */\n\t\"application/vnd.ms-excel.pivotTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml\": \"TODO\",\n\n\t/* Chart Objects */\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\": \"TODO\",\n\n\t/* Chart Colors */\n\t\"application/vnd.ms-office.chartcolorstyle+xml\": \"TODO\",\n\n\t/* Chart Style */\n\t\"application/vnd.ms-office.chartstyle+xml\": \"TODO\",\n\n\t/* Chart Advanced */\n\t\"application/vnd.ms-office.chartex+xml\": \"TODO\",\n\n\t/* Calculation Chain */\n\t\"application/vnd.ms-excel.calcChain\": \"calcchains\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml\": \"calcchains\",\n\n\t/* Printer Settings */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings\": \"TODO\",\n\n\t/* ActiveX */\n\t\"application/vnd.ms-office.activeX\": \"TODO\",\n\t\"application/vnd.ms-office.activeX+xml\": \"TODO\",\n\n\t/* Custom Toolbars */\n\t\"application/vnd.ms-excel.attachedToolbars\": \"TODO\",\n\n\t/* External Data Connections */\n\t\"application/vnd.ms-excel.connections\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\": \"TODO\",\n\n\t/* External Links */\n\t\"application/vnd.ms-excel.externalLink\": \"links\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml\": \"links\",\n\n\t/* PivotCache */\n\t\"application/vnd.ms-excel.pivotCacheDefinition\": \"TODO\",\n\t\"application/vnd.ms-excel.pivotCacheRecords\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml\": \"TODO\",\n\n\t/* Query Table */\n\t\"application/vnd.ms-excel.queryTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml\": \"TODO\",\n\n\t/* Shared Workbook */\n\t\"application/vnd.ms-excel.userNames\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionHeaders\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionLog\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml\": \"TODO\",\n\n\t/* Single Cell Table */\n\t\"application/vnd.ms-excel.tableSingleCells\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml\": \"TODO\",\n\n\t/* Slicer */\n\t\"application/vnd.ms-excel.slicer\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache\": \"TODO\",\n\t\"application/vnd.ms-excel.slicer+xml\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache+xml\": \"TODO\",\n\n\t/* Sort Map */\n\t\"application/vnd.ms-excel.wsSortMap\": \"TODO\",\n\n\t/* Table */\n\t\"application/vnd.ms-excel.table\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\": \"TODO\",\n\n\t/* Themes */\n\t\"application/vnd.openxmlformats-officedocument.theme+xml\": \"themes\",\n\n\t/* Theme Override */\n\t\"application/vnd.openxmlformats-officedocument.themeOverride+xml\": \"TODO\",\n\n\t/* Timeline */\n\t\"application/vnd.ms-excel.Timeline+xml\": \"TODO\", /* verify */\n\t\"application/vnd.ms-excel.TimelineCache+xml\": \"TODO\", /* verify */\n\n\t/* VBA */\n\t\"application/vnd.ms-office.vbaProject\": \"vba\",\n\t\"application/vnd.ms-office.vbaProjectSignature\": \"TODO\",\n\n\t/* Volatile Dependencies */\n\t\"application/vnd.ms-office.volatileDependencies\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml\": \"TODO\",\n\n\t/* Control Properties */\n\t\"application/vnd.ms-excel.controlproperties+xml\": \"TODO\",\n\n\t/* Data Model */\n\t\"application/vnd.openxmlformats-officedocument.model+data\": \"TODO\",\n\n\t/* Survey */\n\t\"application/vnd.ms-excel.Survey+xml\": \"TODO\",\n\n\t/* Drawing */\n\t\"application/vnd.openxmlformats-officedocument.drawing+xml\": \"drawings\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml\": \"TODO\",\n\n\t/* VML */\n\t\"application/vnd.openxmlformats-officedocument.vmlDrawing\": \"TODO\",\n\n\t\"application/vnd.openxmlformats-package.relationships+xml\": \"rels\",\n\t\"application/vnd.openxmlformats-officedocument.oleObject\": \"TODO\",\n\n\t/* Image */\n\t\"image/png\": \"TODO\",\n\n\t\"sheet\": \"js\"\n}/*:any*/);\n\nvar CT_LIST = {\n\t\tworkbooks: {\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\",\n\t\t\txlsm: \"application/vnd.ms-excel.sheet.macroEnabled.main+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sheet.binary.macroEnabled.main\",\n\t\t\txlam: \"application/vnd.ms-excel.addin.macroEnabled.main+xml\",\n\t\t\txltx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\"\n\t\t},\n\t\tstrs: { /* Shared Strings */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sharedStrings\"\n\t\t},\n\t\tcomments: { /* Comments */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.comments\"\n\t\t},\n\t\tsheets: { /* Worksheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.worksheet\"\n\t\t},\n\t\tcharts: { /* Chartsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.chartsheet\"\n\t\t},\n\t\tdialogs: { /* Dialogsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.dialogsheet\"\n\t\t},\n\t\tmacros: { /* Macrosheet (Excel 4.0 Macros) */\n\t\t\txlsx: \"application/vnd.ms-excel.macrosheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.macrosheet\"\n\t\t},\n\t\tmetadata: { /* Metadata (Stock/Geography and Dynamic Array) */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sheetMetadata\"\n\t\t},\n\t\tstyles: { /* Styles */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.styles\"\n\t\t}\n};\n\nfunction new_ct()/*:any*/ {\n\treturn ({\n\t\tworkbooks:[], sheets:[], charts:[], dialogs:[], macros:[],\n\t\trels:[], strs:[], comments:[], threadedcomments:[], links:[],\n\t\tcoreprops:[], extprops:[], custprops:[], themes:[], styles:[],\n\t\tcalcchains:[], vba: [], drawings: [], metadata: [], people:[],\n\t\tTODO:[], xmlns: \"\" }/*:any*/);\n}\n\nfunction parse_ct(data/*:?string*/) {\n\tvar ct = new_ct();\n\tif(!data || !data.match) return ct;\n\tvar ctext = {};\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0].replace(nsregex,\"<\")) {\n\t\t\tcase '<?xml': break;\n\t\t\tcase '<Types': ct.xmlns = y['xmlns' + (y[0].match(/<(\\w+):/)||[\"\",\"\"])[1] ]; break;\n\t\t\tcase '<Default': ctext[y.Extension] = y.ContentType; break;\n\t\t\tcase '<Override':\n\t\t\t\tif(ct[ct2type[y.ContentType]] !== undefined) ct[ct2type[y.ContentType]].push(y.PartName);\n\t\t\t\tbreak;\n\t\t}\n\t});\n\tif(ct.xmlns !== XMLNS.CT) throw new Error(\"Unknown Namespace: \" + ct.xmlns);\n\tct.calcchain = ct.calcchains.length > 0 ? ct.calcchains[0] : \"\";\n\tct.sst = ct.strs.length > 0 ? ct.strs[0] : \"\";\n\tct.style = ct.styles.length > 0 ? ct.styles[0] : \"\";\n\tct.defaults = ctext;\n\tdelete ct.calcchains;\n\treturn ct;\n}\n\nfunction write_ct(ct, opts)/*:string*/ {\n\tvar type2ct/*{[string]:Array<string>}*/ = evert_arr(ct2type);\n\n\tvar o/*:Array<string>*/ = [], v;\n\to[o.length] = (XML_HEADER);\n\to[o.length] = writextag('Types', null, {\n\t\t'xmlns': XMLNS.CT,\n\t\t'xmlns:xsd': XMLNS.xsd,\n\t\t'xmlns:xsi': XMLNS.xsi\n\t});\n\n\to = o.concat([\n\t\t['xml', 'application/xml'],\n\t\t['bin', 'application/vnd.ms-excel.sheet.binary.macroEnabled.main'],\n\t\t['vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'],\n\t\t['data', 'application/vnd.openxmlformats-officedocument.model+data'],\n\t\t/* from test files */\n\t\t['bmp', 'image/bmp'],\n\t\t['png', 'image/png'],\n\t\t['gif', 'image/gif'],\n\t\t['emf', 'image/x-emf'],\n\t\t['wmf', 'image/x-wmf'],\n\t\t['jpg', 'image/jpeg'], ['jpeg', 'image/jpeg'],\n\t\t['tif', 'image/tiff'], ['tiff', 'image/tiff'],\n\t\t['pdf', 'application/pdf'],\n\t\t['rels', 'application/vnd.openxmlformats-package.relationships+xml']\n\t].map(function(x) {\n\t\treturn writextag('Default', null, {'Extension':x[0], 'ContentType': x[1]});\n\t}));\n\n\t/* only write first instance */\n\tvar f1 = function(w) {\n\t\tif(ct[w] && ct[w].length > 0) {\n\t\t\tv = ct[w][0];\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']\n\t\t\t}));\n\t\t}\n\t};\n\n\t/* book type-specific */\n\tvar f2 = function(w) {\n\t\t(ct[w]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']\n\t\t\t}));\n\t\t});\n\t};\n\n\t/* standard type */\n\tvar f3 = function(t) {\n\t\t(ct[t]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': type2ct[t][0]\n\t\t\t}));\n\t\t});\n\t};\n\n\tf1('workbooks');\n\tf2('sheets');\n\tf2('charts');\n\tf3('themes');\n\t['strs', 'styles'].forEach(f1);\n\t['coreprops', 'extprops', 'custprops'].forEach(f3);\n\tf3('vba');\n\tf3('comments');\n\tf3('threadedcomments');\n\tf3('drawings');\n\tf2('metadata');\n\tf3('people');\n\tif(o.length>2){ o[o.length] = ('</Types>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 9.3 Relationships */\nvar RELS = ({\n\tWB: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tSHEET: \"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tHLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n\tVML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing\",\n\tXPATH: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath\",\n\tXMISS: \"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing\",\n\tXLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink\",\n\tCXML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml\",\n\tCXMLP: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps\",\n\tCMNT: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments\",\n\tCORE_PROPS: \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n\tEXT_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',\n\tCUST_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties',\n\tSST: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\",\n\tSTY: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\",\n\tTHEME: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\",\n\tCHART: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\",\n\tCHARTEX: \"http://schemas.microsoft.com/office/2014/relationships/chartEx\",\n\tCS: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet\",\n\tWS: [\n\t\t\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\",\n\t\t\"http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet\"\n\t],\n\tDS: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet\",\n\tMS: \"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet\",\n\tIMG: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n\tDRAW: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\",\n\tXLMETA: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata\",\n\tTCMNT: \"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment\",\n\tPEOPLE: \"http://schemas.microsoft.com/office/2017/10/relationships/person\",\n\tVBA: \"http://schemas.microsoft.com/office/2006/relationships/vbaProject\"\n}/*:any*/);\n\n\n/* 9.3.3 Representing Relationships */\nfunction get_rels_path(file/*:string*/)/*:string*/ {\n\tvar n = file.lastIndexOf(\"/\");\n\treturn file.slice(0,n+1) + '_rels/' + file.slice(n+1) + \".rels\";\n}\n\nfunction parse_rels(data/*:?string*/, currentFilePath/*:string*/) {\n\tvar rels = {\"!id\":{}};\n\tif (!data) return rels;\n\tif (currentFilePath.charAt(0) !== '/') {\n\t\tcurrentFilePath = '/'+currentFilePath;\n\t}\n\tvar hash = {};\n\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\t/* 9.3.2.2 OPC_Relationships */\n\t\tif (y[0] === '<Relationship') {\n\t\t\tvar rel = {}; rel.Type = y.Type; rel.Target = y.Target; rel.Id = y.Id; if(y.TargetMode) rel.TargetMode = y.TargetMode;\n\t\t\tvar canonictarget = y.TargetMode === 'External' ? y.Target : resolve_path(y.Target, currentFilePath);\n\t\t\trels[canonictarget] = rel;\n\t\t\thash[y.Id] = rel;\n\t\t}\n\t});\n\trels[\"!id\"] = hash;\n\treturn rels;\n}\n\n\n/* TODO */\nfunction write_rels(rels)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('Relationships', null, {\n\t\t//'xmlns:ns0': XMLNS.RELS,\n\t\t'xmlns': XMLNS.RELS\n\t})];\n\tkeys(rels['!id']).forEach(function(rid) {\n\t\to[o.length] = (writextag('Relationship', null, rels['!id'][rid]));\n\t});\n\tif(o.length>2){ o[o.length] = ('</Relationships>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\nfunction add_rels(rels, rId/*:number*/, f, type, relobj, targetmode/*:?string*/)/*:number*/ {\n\tif(!relobj) relobj = {};\n\tif(!rels['!id']) rels['!id'] = {};\n\tif(!rels['!idx']) rels['!idx'] = 1;\n\tif(rId < 0) for(rId = rels['!idx']; rels['!id']['rId' + rId]; ++rId){/* empty */}\n\trels['!idx'] = rId + 1;\n\trelobj.Id = 'rId' + rId;\n\trelobj.Type = type;\n\trelobj.Target = f;\n\tif(targetmode) relobj.TargetMode = targetmode;\n\telse if([RELS.HLINK, RELS.XPATH, RELS.XMISS].indexOf(relobj.Type) > -1) relobj.TargetMode = \"External\";\n\tif(rels['!id'][relobj.Id]) throw new Error(\"Cannot rewrite rId \" + rId);\n\trels['!id'][relobj.Id] = relobj;\n\trels[('/' + relobj.Target).replace(\"//\",\"/\")] = relobj;\n\treturn rId;\n}\n/* Open Document Format for Office Applications (OpenDocument) Version 1.2 */\n/* Part 3 Section 4 Manifest File */\nvar CT_ODS = \"application/vnd.oasis.opendocument.spreadsheet\";\nfunction parse_manifest(d, opts) {\n\tvar str = xlml_normalize(d);\n\tvar Rn;\n\tvar FEtag;\n\twhile((Rn = xlmlregex.exec(str))) switch(Rn[3]) {\n\t\tcase 'manifest': break; // 4.2 <manifest:manifest>\n\t\tcase 'file-entry': // 4.3 <manifest:file-entry>\n\t\t\tFEtag = parsexmltag(Rn[0], false);\n\t\t\tif(FEtag.path == '/' && FEtag.type !== CT_ODS) throw new Error(\"This OpenDocument is not a spreadsheet\");\n\t\t\tbreak;\n\t\tcase 'encryption-data': // 4.4 <manifest:encryption-data>\n\t\tcase 'algorithm': // 4.5 <manifest:algorithm>\n\t\tcase 'start-key-generation': // 4.6 <manifest:start-key-generation>\n\t\tcase 'key-derivation': // 4.7 <manifest:key-derivation>\n\t\t\tthrow new Error(\"Unsupported ODS Encryption\");\n\t\tdefault: if(opts && opts.WTF) throw Rn;\n\t}\n}\n\nfunction write_manifest(manifest/*:Array<Array<string> >*/)/*:string*/ {\n\tvar o = [XML_HEADER];\n\to.push('<manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\" manifest:version=\"1.2\">\\n');\n\to.push('  <manifest:file-entry manifest:full-path=\"/\" manifest:version=\"1.2\" manifest:media-type=\"application/vnd.oasis.opendocument.spreadsheet\"/>\\n');\n\tfor(var i = 0; i < manifest.length; ++i) o.push('  <manifest:file-entry manifest:full-path=\"' + manifest[i][0] + '\" manifest:media-type=\"' + manifest[i][1] + '\"/>\\n');\n\to.push('</manifest:manifest>');\n\treturn o.join(\"\");\n}\n\n/* Part 3 Section 6 Metadata Manifest File */\nfunction write_rdf_type(file/*:string*/, res/*:string*/, tag/*:?string*/) {\n\treturn [\n\t\t'  <rdf:Description rdf:about=\"' + file + '\">\\n',\n\t\t'    <rdf:type rdf:resource=\"http://docs.oasis-open.org/ns/office/1.2/meta/' + (tag || \"odf\") + '#' + res + '\"/>\\n',\n\t\t'  </rdf:Description>\\n'\n\t].join(\"\");\n}\nfunction write_rdf_has(base/*:string*/, file/*:string*/) {\n\treturn [\n\t\t'  <rdf:Description rdf:about=\"' + base + '\">\\n',\n\t\t'    <ns0:hasPart xmlns:ns0=\"http://docs.oasis-open.org/ns/office/1.2/meta/pkg#\" rdf:resource=\"' + file + '\"/>\\n',\n\t\t'  </rdf:Description>\\n'\n\t].join(\"\");\n}\nfunction write_rdf(rdf) {\n\tvar o = [XML_HEADER];\n\to.push('<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\\n');\n\tfor(var i = 0; i != rdf.length; ++i) {\n\t\to.push(write_rdf_type(rdf[i][0], rdf[i][1]));\n\t\to.push(write_rdf_has(\"\",rdf[i][0]));\n\t}\n\to.push(write_rdf_type(\"\",\"Document\", \"pkg\"));\n\to.push('</rdf:RDF>');\n\treturn o.join(\"\");\n}\n/* TODO: pull properties */\nfunction write_meta_ods(/*:: wb: Workbook, opts: any*/)/*:string*/ {\n\treturn '<office:document-meta xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" office:version=\"1.2\"><office:meta><meta:generator>Sheet' + 'JS ' + XLSX.version + '</meta:generator></office:meta></office:document-meta>';\n}\n\n/* ECMA-376 Part II 11.1 Core Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar CORE_PROPS/*:Array<Array<string> >*/ = [\n\t[\"cp:category\", \"Category\"],\n\t[\"cp:contentStatus\", \"ContentStatus\"],\n\t[\"cp:keywords\", \"Keywords\"],\n\t[\"cp:lastModifiedBy\", \"LastAuthor\"],\n\t[\"cp:lastPrinted\", \"LastPrinted\"],\n\t[\"cp:revision\", \"RevNumber\"],\n\t[\"cp:version\", \"Version\"],\n\t[\"dc:creator\", \"Author\"],\n\t[\"dc:description\", \"Comments\"],\n\t[\"dc:identifier\", \"Identifier\"],\n\t[\"dc:language\", \"Language\"],\n\t[\"dc:subject\", \"Subject\"],\n\t[\"dc:title\", \"Title\"],\n\t[\"dcterms:created\", \"CreatedDate\", 'date'],\n\t[\"dcterms:modified\", \"ModifiedDate\", 'date']\n];\n\nvar CORE_PROPS_REGEX/*:Array<RegExp>*/ = /*#__PURE__*/(function() {\n\tvar r = new Array(CORE_PROPS.length);\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar g = \"(?:\"+ f[0].slice(0,f[0].indexOf(\":\")) +\":)\"+ f[0].slice(f[0].indexOf(\":\")+1);\n\t\tr[i] = new RegExp(\"<\" + g + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + g + \">\");\n\t}\n\treturn r;\n})();\n\nfunction parse_core_props(data) {\n\tvar p = {};\n\tdata = utf8read(data);\n\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i], cur = data.match(CORE_PROPS_REGEX[i]);\n\t\tif(cur != null && cur.length > 0) p[f[1]] = unescapexml(cur[1]);\n\t\tif(f[2] === 'date' && p[f[1]]) p[f[1]] = parseDate(p[f[1]]);\n\t}\n\n\treturn p;\n}\n\nfunction cp_doit(f, g, h, o, p) {\n\tif(p[f] != null || g == null || g === \"\") return;\n\tp[f] = g;\n\tg = escapexml(g);\n\to[o.length] = (h ? writextag(f,g,h) : writetag(f,g));\n}\n\nfunction write_core_props(cp, _opts) {\n\tvar opts = _opts || {};\n\tvar o = [XML_HEADER, writextag('cp:coreProperties', null, {\n\t\t//'xmlns': XMLNS.CORE_PROPS,\n\t\t'xmlns:cp': XMLNS.CORE_PROPS,\n\t\t'xmlns:dc': XMLNS.dc,\n\t\t'xmlns:dcterms': XMLNS.dcterms,\n\t\t'xmlns:dcmitype': XMLNS.dcmitype,\n\t\t'xmlns:xsi': XMLNS.xsi\n\t})], p = {};\n\tif(!cp && !opts.Props) return o.join(\"\");\n\n\tif(cp) {\n\t\tif(cp.CreatedDate != null) cp_doit(\"dcterms:created\", typeof cp.CreatedDate === \"string\" ? cp.CreatedDate : write_w3cdtf(cp.CreatedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t\tif(cp.ModifiedDate != null) cp_doit(\"dcterms:modified\", typeof cp.ModifiedDate === \"string\" ? cp.ModifiedDate : write_w3cdtf(cp.ModifiedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t}\n\n\tfor(var i = 0; i != CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar v = opts.Props && opts.Props[f[1]] != null ? opts.Props[f[1]] : cp ? cp[f[1]] : null;\n\t\tif(v === true) v = \"1\";\n\t\telse if(v === false) v = \"0\";\n\t\telse if(typeof v == \"number\") v = String(v);\n\t\tif(v != null) cp_doit(f[0], v, null, o, p);\n\t}\n\tif(o.length>2){ o[o.length] = ('</cp:coreProperties>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.3 Extended File Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar EXT_PROPS/*:Array<Array<string> >*/ = [\n\t[\"Application\", \"Application\", \"string\"],\n\t[\"AppVersion\", \"AppVersion\", \"string\"],\n\t[\"Company\", \"Company\", \"string\"],\n\t[\"DocSecurity\", \"DocSecurity\", \"string\"],\n\t[\"Manager\", \"Manager\", \"string\"],\n\t[\"HyperlinksChanged\", \"HyperlinksChanged\", \"bool\"],\n\t[\"SharedDoc\", \"SharedDoc\", \"bool\"],\n\t[\"LinksUpToDate\", \"LinksUpToDate\", \"bool\"],\n\t[\"ScaleCrop\", \"ScaleCrop\", \"bool\"],\n\t[\"HeadingPairs\", \"HeadingPairs\", \"raw\"],\n\t[\"TitlesOfParts\", \"TitlesOfParts\", \"raw\"]\n];\n\nvar PseudoPropsPairs = [\n\t\"Worksheets\",  \"SheetNames\",\n\t\"NamedRanges\", \"DefinedNames\",\n\t\"Chartsheets\", \"ChartNames\"\n];\nfunction load_props_pairs(HP/*:string|Array<Array<any>>*/, TOP, props, opts) {\n\tvar v = [];\n\tif(typeof HP == \"string\") v = parseVector(HP, opts);\n\telse for(var j = 0; j < HP.length; ++j) v = v.concat(HP[j].map(function(hp) { return {v:hp}; }));\n\tvar parts = (typeof TOP == \"string\") ? parseVector(TOP, opts).map(function (x) { return x.v; }) : TOP;\n\tvar idx = 0, len = 0;\n\tif(parts.length > 0) for(var i = 0; i !== v.length; i += 2) {\n\t\tlen = +(v[i+1].v);\n\t\tswitch(v[i].v) {\n\t\t\tcase \"Worksheets\":\n\t\t\tcase \"工作表\":\n\t\t\tcase \"Листы\":\n\t\t\tcase \"أوراق العمل\":\n\t\t\tcase \"ワークシート\":\n\t\t\tcase \"גליונות עבודה\":\n\t\t\tcase \"Arbeitsblätter\":\n\t\t\tcase \"Çalışma Sayfaları\":\n\t\t\tcase \"Feuilles de calcul\":\n\t\t\tcase \"Fogli di lavoro\":\n\t\t\tcase \"Folhas de cálculo\":\n\t\t\tcase \"Planilhas\":\n\t\t\tcase \"Regneark\":\n\t\t\tcase \"Hojas de cálculo\":\n\t\t\tcase \"Werkbladen\":\n\t\t\t\tprops.Worksheets = len;\n\t\t\t\tprops.SheetNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Named Ranges\":\n\t\t\tcase \"Rangos con nombre\":\n\t\t\tcase \"名前付き一覧\":\n\t\t\tcase \"Benannte Bereiche\":\n\t\t\tcase \"Navngivne områder\":\n\t\t\t\tprops.NamedRanges = len;\n\t\t\t\tprops.DefinedNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Charts\":\n\t\t\tcase \"Diagramme\":\n\t\t\t\tprops.Chartsheets = len;\n\t\t\t\tprops.ChartNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\t\t}\n\t\tidx += len;\n\t}\n}\n\nfunction parse_ext_props(data, p, opts) {\n\tvar q = {}; if(!p) p = {};\n\tdata = utf8read(data);\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tvar xml = (data.match(matchtag(f[0]))||[])[1];\n\t\tswitch(f[2]) {\n\t\t\tcase \"string\": if(xml) p[f[1]] = unescapexml(xml); break;\n\t\t\tcase \"bool\": p[f[1]] = xml === \"true\"; break;\n\t\t\tcase \"raw\":\n\t\t\t\tvar cur = data.match(new RegExp(\"<\" + f[0] + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + f[0] + \">\"));\n\t\t\t\tif(cur && cur.length > 0) q[f[1]] = cur[1];\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(q.HeadingPairs && q.TitlesOfParts) load_props_pairs(q.HeadingPairs, q.TitlesOfParts, p, opts);\n\n\treturn p;\n}\n\nfunction write_ext_props(cp/*::, opts*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [], W = writextag;\n\tif(!cp) cp = {};\n\tcp.Application = \"SheetJS\";\n\to[o.length] = (XML_HEADER);\n\to[o.length] = (writextag('Properties', null, {\n\t\t'xmlns': XMLNS.EXT_PROPS,\n\t\t'xmlns:vt': XMLNS.vt\n\t}));\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tif(cp[f[1]] === undefined) return;\n\t\tvar v;\n\t\tswitch(f[2]) {\n\t\t\tcase 'string': v = escapexml(String(cp[f[1]])); break;\n\t\t\tcase 'bool': v = cp[f[1]] ? 'true' : 'false'; break;\n\t\t}\n\t\tif(v !== undefined) o[o.length] = (W(f[0], v));\n\t});\n\n\t/* TODO: HeadingPairs, TitlesOfParts */\n\to[o.length] = (W('HeadingPairs', W('vt:vector', W('vt:variant', '<vt:lpstr>Worksheets</vt:lpstr>')+W('vt:variant', W('vt:i4', String(cp.Worksheets))), {size:2, baseType:\"variant\"})));\n\to[o.length] = (W('TitlesOfParts', W('vt:vector', cp.SheetNames.map(function(s) { return \"<vt:lpstr>\" + escapexml(s) + \"</vt:lpstr>\"; }).join(\"\"), {size: cp.Worksheets, baseType:\"lpstr\"})));\n\tif(o.length>2){ o[o.length] = ('</Properties>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.2 Custom File Properties Part */\nvar custregex = /<[^>]+>[^<]*/g;\nfunction parse_cust_props(data/*:string*/, opts) {\n\tvar p = {}, name = \"\";\n\tvar m = data.match(custregex);\n\tif(m) for(var i = 0; i != m.length; ++i) {\n\t\tvar x = m[i], y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '<?xml': break;\n\t\t\tcase '<Properties': break;\n\t\t\tcase '<property': name = unescapexml(y.name); break;\n\t\t\tcase '</property>': name = null; break;\n\t\t\tdefault: if (x.indexOf('<vt:') === 0) {\n\t\t\t\tvar toks = x.split('>');\n\t\t\t\tvar type = toks[0].slice(4), text = toks[1];\n\t\t\t\t/* 22.4.2.32 (CT_Variant). Omit the binary types from 22.4 (Variant Types) */\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase 'lpstr': case 'bstr': case 'lpwstr':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bool':\n\t\t\t\t\t\tp[name] = parsexmlbool(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'i1': case 'i2': case 'i4': case 'i8': case 'int': case 'uint':\n\t\t\t\t\t\tp[name] = parseInt(text, 10);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'r4': case 'r8': case 'decimal':\n\t\t\t\t\t\tp[name] = parseFloat(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'filetime': case 'date':\n\t\t\t\t\t\tp[name] = parseDate(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cy': case 'error':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(type.slice(-1) == '/') break;\n\t\t\t\t\t\tif(opts.WTF && typeof console !== 'undefined') console.warn('Unexpected', x, type, toks);\n\t\t\t\t}\n\t\t\t} else if(x.slice(0,2) === \"</\") {/* empty */\n\t\t\t} else if(opts.WTF) throw new Error(x);\n\t\t}\n\t}\n\treturn p;\n}\n\nfunction write_cust_props(cp/*::, opts*/)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('Properties', null, {\n\t\t'xmlns': XMLNS.CUST_PROPS,\n\t\t'xmlns:vt': XMLNS.vt\n\t})];\n\tif(!cp) return o.join(\"\");\n\tvar pid = 1;\n\tkeys(cp).forEach(function custprop(k) { ++pid;\n\t\to[o.length] = (writextag('property', write_vt(cp[k], true), {\n\t\t\t'fmtid': '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}',\n\t\t\t'pid': pid,\n\t\t\t'name': escapexml(k)\n\t\t}));\n\t});\n\tif(o.length>2){ o[o.length] = '</Properties>'; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* Common Name -> XLML Name */\nvar XLMLDocPropsMap = {\n\tTitle: 'Title',\n\tSubject: 'Subject',\n\tAuthor: 'Author',\n\tKeywords: 'Keywords',\n\tComments: 'Description',\n\tLastAuthor: 'LastAuthor',\n\tRevNumber: 'Revision',\n\tApplication: 'AppName',\n\t/* TotalTime: 'TotalTime', */\n\tLastPrinted: 'LastPrinted',\n\tCreatedDate: 'Created',\n\tModifiedDate: 'LastSaved',\n\t/* Pages */\n\t/* Words */\n\t/* Characters */\n\tCategory: 'Category',\n\t/* PresentationFormat */\n\tManager: 'Manager',\n\tCompany: 'Company',\n\t/* Guid */\n\t/* HyperlinkBase */\n\t/* Bytes */\n\t/* Lines */\n\t/* Paragraphs */\n\t/* CharactersWithSpaces */\n\tAppVersion: 'Version',\n\n\tContentStatus: 'ContentStatus', /* NOTE: missing from schema */\n\tIdentifier: 'Identifier', /* NOTE: missing from schema */\n\tLanguage: 'Language' /* NOTE: missing from schema */\n};\nvar evert_XLMLDPM;\n\nfunction xlml_set_prop(Props, tag/*:string*/, val) {\n\tif(!evert_XLMLDPM) evert_XLMLDPM = evert(XLMLDocPropsMap);\n\ttag = evert_XLMLDPM[tag] || tag;\n\tProps[tag] = val;\n}\n\nfunction xlml_write_docprops(Props, opts) {\n\tvar o/*:Array<string>*/ = [];\n\tkeys(XLMLDocPropsMap).map(function(m) {\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(CORE_PROPS[i][1] == m) return CORE_PROPS[i];\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(EXT_PROPS[i][1] == m) return EXT_PROPS[i];\n\t\tthrow m;\n\t}).forEach(function(p) {\n\t\tif(Props[p[1]] == null) return;\n\t\tvar m = opts && opts.Props && opts.Props[p[1]] != null ? opts.Props[p[1]] : Props[p[1]];\n\t\tswitch(p[2]) {\n\t\t\tcase 'date': m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"Z\"); break;\n\t\t}\n\t\tif(typeof m == 'number') m = String(m);\n\t\telse if(m === true || m === false) { m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"\");\n\t\to.push(writetag(XLMLDocPropsMap[p[1]] || p[1], m));\n\t});\n\treturn writextag('DocumentProperties', o.join(\"\"), {xmlns:XLMLNS.o });\n}\nfunction xlml_write_custprops(Props, Custprops/*::, opts*/) {\n\tvar BLACKLIST = [\"Worksheets\",\"SheetNames\"];\n\tvar T = 'CustomDocumentProperties';\n\tvar o/*:Array<string>*/ = [];\n\tif(Props) keys(Props).forEach(function(k) {\n\t\t/*:: if(!Props) return; */\n\t\tif(!Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(k == CORE_PROPS[i][1]) return;\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(k == EXT_PROPS[i][1]) return;\n\t\tfor(i = 0; i < BLACKLIST.length; ++i) if(k == BLACKLIST[i]) return;\n\n\t\tvar m = Props[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\tif(Custprops) keys(Custprops).forEach(function(k) {\n\t\t/*:: if(!Custprops) return; */\n\t\tif(!Object.prototype.hasOwnProperty.call(Custprops, k)) return;\n\t\tif(Props && Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tvar m = Custprops[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) { t = \"dateTime.tz\"; m = m.toISOString(); }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\treturn '<' + T + ' xmlns=\"' + XLMLNS.o + '\">' + o.join(\"\") + '</' + T + '>';\n}\n/* [MS-DTYP] 2.3.3 FILETIME */\n/* [MS-OLEDS] 2.1.3 FILETIME (Packet Version) */\n/* [MS-OLEPS] 2.8 FILETIME (Packet Version) */\nfunction parse_FILETIME(blob) {\n\tvar dwLowDateTime = blob.read_shift(4), dwHighDateTime = blob.read_shift(4);\n\treturn new Date(((dwHighDateTime/1e7*Math.pow(2,32) + dwLowDateTime/1e7) - 11644473600)*1000).toISOString().replace(/\\.000/,\"\");\n}\nfunction write_FILETIME(time/*:string|Date*/) {\n\tvar date = (typeof time == \"string\") ? new Date(Date.parse(time)) : time;\n\tvar t = date.getTime() / 1000 + 11644473600;\n\tvar l = t % Math.pow(2,32), h = (t - l) / Math.pow(2,32);\n\tl *= 1e7; h *= 1e7;\n\tvar w = (l / Math.pow(2,32)) | 0;\n\tif(w > 0) { l = l % Math.pow(2,32); h += w; }\n\tvar o = new_buf(8); o.write_shift(4, l); o.write_shift(4, h); return o;\n}\n\n/* [MS-OSHARED] 2.3.3.1.4 Lpstr */\nfunction parse_lpstr(blob, type, pad/*:?number*/) {\n\tvar start = blob.l;\n\tvar str = blob.read_shift(0, 'lpstr-cp');\n\tif(pad) while((blob.l - start) & 3) ++blob.l;\n\treturn str;\n}\n\n/* [MS-OSHARED] 2.3.3.1.6 Lpwstr */\nfunction parse_lpwstr(blob, type, pad) {\n\tvar str = blob.read_shift(0, 'lpwstr');\n\tif(pad) blob.l += (4 - ((str.length+1) & 3)) & 3;\n\treturn str;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.11 VtString */\n/* [MS-OSHARED] 2.3.3.1.12 VtUnalignedString */\nfunction parse_VtStringBase(blob, stringType, pad) {\n\tif(stringType === 0x1F /*VT_LPWSTR*/) return parse_lpwstr(blob);\n\treturn parse_lpstr(blob, stringType, pad);\n}\n\nfunction parse_VtString(blob, t/*:number*/, pad/*:?boolean*/) { return parse_VtStringBase(blob, t, pad === false ? 0: 4); }\nfunction parse_VtUnalignedString(blob, t/*:number*/) { if(!t) throw new Error(\"VtUnalignedString must have positive length\"); return parse_VtStringBase(blob, t, 0); }\n\n/* [MS-OSHARED] 2.3.3.1.7 VtVecLpwstrValue */\nfunction parse_VtVecLpwstrValue(blob)/*:Array<string>*/ {\n\tvar length = blob.read_shift(4);\n\tvar ret/*:Array<string>*/ = [];\n\tfor(var i = 0; i != length; ++i) {\n\t\tvar start = blob.l;\n\t\tret[i] = blob.read_shift(0, 'lpwstr').replace(chr0,'');\n\t\tif((blob.l - start) & 0x02) blob.l += 2;\n\t}\n\treturn ret;\n}\n\n/* [MS-OSHARED] 2.3.3.1.9 VtVecUnalignedLpstrValue */\nfunction parse_VtVecUnalignedLpstrValue(blob)/*:Array<string>*/ {\n\tvar length = blob.read_shift(4);\n\tvar ret/*:Array<string>*/ = [];\n\tfor(var i = 0; i != length; ++i) ret[i] = blob.read_shift(0, 'lpstr-cp').replace(chr0,'');\n\treturn ret;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.13 VtHeadingPair */\nfunction parse_VtHeadingPair(blob) {\n\tvar start = blob.l;\n\tvar headingString = parse_TypedPropertyValue(blob, VT_USTR);\n\tif(blob[blob.l] == 0x00 && blob[blob.l+1] == 0x00 && ((blob.l - start) & 0x02)) blob.l += 2;\n\tvar headerParts = parse_TypedPropertyValue(blob, VT_I4);\n\treturn [headingString, headerParts];\n}\n\n/* [MS-OSHARED] 2.3.3.1.14 VtVecHeadingPairValue */\nfunction parse_VtVecHeadingPairValue(blob) {\n\tvar cElements = blob.read_shift(4);\n\tvar out = [];\n\tfor(var i = 0; i < cElements / 2; ++i) out.push(parse_VtHeadingPair(blob));\n\treturn out;\n}\n\n/* [MS-OLEPS] 2.18.1 Dictionary (uses 2.17, 2.16) */\nfunction parse_dictionary(blob,CodePage) {\n\tvar cnt = blob.read_shift(4);\n\tvar dict/*:{[number]:string}*/ = ({}/*:any*/);\n\tfor(var j = 0; j != cnt; ++j) {\n\t\tvar pid = blob.read_shift(4);\n\t\tvar len = blob.read_shift(4);\n\t\tdict[pid] = blob.read_shift(len, (CodePage === 0x4B0 ?'utf16le':'utf8')).replace(chr0,'').replace(chr1,'!');\n\t\tif(CodePage === 0x4B0 && (len % 2)) blob.l += 2;\n\t}\n\tif(blob.l & 3) blob.l = (blob.l>>2+1)<<2;\n\treturn dict;\n}\n\n/* [MS-OLEPS] 2.9 BLOB */\nfunction parse_BLOB(blob) {\n\tvar size = blob.read_shift(4);\n\tvar bytes = blob.slice(blob.l,blob.l+size);\n\tblob.l += size;\n\tif((size & 3) > 0) blob.l += (4 - (size & 3)) & 3;\n\treturn bytes;\n}\n\n/* [MS-OLEPS] 2.11 ClipboardData */\nfunction parse_ClipboardData(blob) {\n\t// TODO\n\tvar o = {};\n\to.Size = blob.read_shift(4);\n\t//o.Format = blob.read_shift(4);\n\tblob.l += o.Size + 3 - (o.Size - 1) % 4;\n\treturn o;\n}\n\n/* [MS-OLEPS] 2.15 TypedPropertyValue */\nfunction parse_TypedPropertyValue(blob, type/*:number*/, _opts)/*:any*/ {\n\tvar t = blob.read_shift(2), ret, opts = _opts||{};\n\tblob.l += 2;\n\tif(type !== VT_VARIANT)\n\tif(t !== type && VT_CUSTOM.indexOf(type)===-1 && !((type & 0xFFFE) == 0x101E && (t & 0xFFFE) == 0x101E)) throw new Error('Expected type ' + type + ' saw ' + t);\n\tswitch(type === VT_VARIANT ? t : type) {\n\t\tcase 0x02 /*VT_I2*/: ret = blob.read_shift(2, 'i'); if(!opts.raw) blob.l += 2; return ret;\n\t\tcase 0x03 /*VT_I4*/: ret = blob.read_shift(4, 'i'); return ret;\n\t\tcase 0x0B /*VT_BOOL*/: return blob.read_shift(4) !== 0x0;\n\t\tcase 0x13 /*VT_UI4*/: ret = blob.read_shift(4); return ret;\n\t\tcase 0x1E /*VT_LPSTR*/: return parse_lpstr(blob, t, 4).replace(chr0,'');\n\t\tcase 0x1F /*VT_LPWSTR*/: return parse_lpwstr(blob);\n\t\tcase 0x40 /*VT_FILETIME*/: return parse_FILETIME(blob);\n\t\tcase 0x41 /*VT_BLOB*/: return parse_BLOB(blob);\n\t\tcase 0x47 /*VT_CF*/: return parse_ClipboardData(blob);\n\t\tcase 0x50 /*VT_STRING*/: return parse_VtString(blob, t, !opts.raw).replace(chr0,'');\n\t\tcase 0x51 /*VT_USTR*/: return parse_VtUnalignedString(blob, t/*, 4*/).replace(chr0,'');\n\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: return parse_VtVecHeadingPairValue(blob);\n\t\tcase 0x101E /*VT_VECTOR|VT_LPSTR*/:\n\t\tcase 0x101F /*VT_VECTOR|VT_LPWSTR*/:\n\t\t\treturn t == 0x101F ? parse_VtVecLpwstrValue(blob) : parse_VtVecUnalignedLpstrValue(blob);\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + t);\n\t}\n}\nfunction write_TypedPropertyValue(type/*:number*/, value) {\n\tvar o = new_buf(4), p = new_buf(4);\n\to.write_shift(4, type == 0x50 ? 0x1F : type);\n\tswitch(type) {\n\t\tcase 0x03 /*VT_I4*/: p.write_shift(-4, value); break;\n\t\tcase 0x05 /*VT_I4*/: p = new_buf(8); p.write_shift(8, value, 'f'); break;\n\t\tcase 0x0B /*VT_BOOL*/: p.write_shift(4, value ? 0x01 : 0x00); break;\n\t\tcase 0x40 /*VT_FILETIME*/: /*:: if(typeof value !== \"string\" && !(value instanceof Date)) throw \"unreachable\"; */ p = write_FILETIME(value); break;\n\t\tcase 0x1F /*VT_LPWSTR*/:\n\t\tcase 0x50 /*VT_STRING*/:\n\t\t\t/*:: if(typeof value !== \"string\") throw \"unreachable\"; */\n\t\t\tp = new_buf(4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tp.write_shift(4, value.length + 1);\n\t\t\tp.write_shift(0, value, \"dbcs\");\n\t\t\twhile(p.l != p.length) p.write_shift(1, 0);\n\t\t\tbreak;\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + value);\n\t}\n\treturn bconcat([o, p]);\n}\n\n/* [MS-OLEPS] 2.20 PropertySet */\nfunction parse_PropertySet(blob, PIDSI) {\n\tvar start_addr = blob.l;\n\tvar size = blob.read_shift(4);\n\tvar NumProps = blob.read_shift(4);\n\tvar Props = [], i = 0;\n\tvar CodePage = 0;\n\tvar Dictionary = -1, DictObj/*:{[number]:string}*/ = ({}/*:any*/);\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tvar PropID = blob.read_shift(4);\n\t\tvar Offset = blob.read_shift(4);\n\t\tProps[i] = [PropID, Offset + start_addr];\n\t}\n\tProps.sort(function(x,y) { return x[1] - y[1]; });\n\tvar PropH = {};\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tif(blob.l !== Props[i][1]) {\n\t\t\tvar fail = true;\n\t\t\tif(i>0 && PIDSI) switch(PIDSI[Props[i-1][0]].t) {\n\t\t\t\tcase 0x02 /*VT_I2*/: if(blob.l+2 === Props[i][1]) { blob.l+=2; fail = false; } break;\n\t\t\t\tcase 0x50 /*VT_STRING*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t}\n\t\t\tif((!PIDSI||i==0) && blob.l <= Props[i][1]) { fail=false; blob.l = Props[i][1]; }\n\t\t\tif(fail) throw new Error(\"Read Error: Expected address \" + Props[i][1] + ' at ' + blob.l + ' :' + i);\n\t\t}\n\t\tif(PIDSI) {\n\t\t\tvar piddsi = PIDSI[Props[i][0]];\n\t\t\tPropH[piddsi.n] = parse_TypedPropertyValue(blob, piddsi.t, {raw:true});\n\t\t\tif(piddsi.p === 'version') PropH[piddsi.n] = String(PropH[piddsi.n] >> 16) + \".\" + (\"0000\" + String(PropH[piddsi.n] & 0xFFFF)).slice(-4);\n\t\t\tif(piddsi.n == \"CodePage\") switch(PropH[piddsi.n]) {\n\t\t\t\tcase 0: PropH[piddsi.n] = 1252;\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 874:\n\t\t\t\tcase 932:\n\t\t\t\tcase 936:\n\t\t\t\tcase 949:\n\t\t\t\tcase 950:\n\t\t\t\tcase 1250:\n\t\t\t\tcase 1251:\n\t\t\t\tcase 1253:\n\t\t\t\tcase 1254:\n\t\t\t\tcase 1255:\n\t\t\t\tcase 1256:\n\t\t\t\tcase 1257:\n\t\t\t\tcase 1258:\n\t\t\t\tcase 10000:\n\t\t\t\tcase 1200:\n\t\t\t\tcase 1201:\n\t\t\t\tcase 1252:\n\t\t\t\tcase 65000: case -536:\n\t\t\t\tcase 65001: case -535:\n\t\t\t\t\tset_cp(CodePage = (PropH[piddsi.n]>>>0) & 0xFFFF); break;\n\t\t\t\tdefault: throw new Error(\"Unsupported CodePage: \" + PropH[piddsi.n]);\n\t\t\t}\n\t\t} else {\n\t\t\tif(Props[i][0] === 0x1) {\n\t\t\t\tCodePage = PropH.CodePage = (parse_TypedPropertyValue(blob, VT_I2)/*:number*/);\n\t\t\t\tset_cp(CodePage);\n\t\t\t\tif(Dictionary !== -1) {\n\t\t\t\t\tvar oldpos = blob.l;\n\t\t\t\t\tblob.l = Props[Dictionary][1];\n\t\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t\t\tblob.l = oldpos;\n\t\t\t\t}\n\t\t\t} else if(Props[i][0] === 0) {\n\t\t\t\tif(CodePage === 0) { Dictionary = i; blob.l = Props[i+1][1]; continue; }\n\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t} else {\n\t\t\t\tvar name = DictObj[Props[i][0]];\n\t\t\t\tvar val;\n\t\t\t\t/* [MS-OSHARED] 2.3.3.2.3.1.2 + PROPVARIANT */\n\t\t\t\tswitch(blob[blob.l]) {\n\t\t\t\t\tcase 0x41 /*VT_BLOB*/: blob.l += 4; val = parse_BLOB(blob); break;\n\t\t\t\t\tcase 0x1E /*VT_LPSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x1F /*VT_LPWSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x03 /*VT_I4*/: blob.l += 4; val = blob.read_shift(4, 'i'); break;\n\t\t\t\t\tcase 0x13 /*VT_UI4*/: blob.l += 4; val = blob.read_shift(4); break;\n\t\t\t\t\tcase 0x05 /*VT_R8*/: blob.l += 4; val = blob.read_shift(8, 'f'); break;\n\t\t\t\t\tcase 0x0B /*VT_BOOL*/: blob.l += 4; val = parsebool(blob, 4); break;\n\t\t\t\t\tcase 0x40 /*VT_FILETIME*/: blob.l += 4; val = parseDate(parse_FILETIME(blob)); break;\n\t\t\t\t\tdefault: throw new Error(\"unparsed value: \" + blob[blob.l]);\n\t\t\t\t}\n\t\t\t\tPropH[name] = val;\n\t\t\t}\n\t\t}\n\t}\n\tblob.l = start_addr + size; /* step ahead to skip padding */\n\treturn PropH;\n}\nvar XLSPSSkip = [ \"CodePage\", \"Thumbnail\", \"_PID_LINKBASE\", \"_PID_HLINKS\", \"SystemIdentifier\", \"FMTID\" ]; //.concat(PseudoPropsPairs);\nfunction guess_property_type(val/*:any*/)/*:number*/ {\n\tswitch(typeof val) {\n\t\tcase \"boolean\": return 0x0B;\n\t\tcase \"number\": return ((val|0)==val) ? 0x03 : 0x05;\n\t\tcase \"string\": return 0x1F;\n\t\tcase \"object\": if(val instanceof Date) return 0x40; break;\n\t}\n\treturn -1;\n}\nfunction write_PropertySet(entries, RE, PIDSI) {\n\tvar hdr = new_buf(8), piao = [], prop = [];\n\tvar sz = 8, i = 0;\n\n\tvar pr = new_buf(8), pio = new_buf(8);\n\tpr.write_shift(4, 0x0002);\n\tpr.write_shift(4, 0x04B0);\n\tpio.write_shift(4, 0x0001);\n\tprop.push(pr); piao.push(pio);\n\tsz += 8 + pr.length;\n\n\tif(!RE) {\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, 0);\n\t\tpiao.unshift(pio);\n\n\t\tvar bufs = [new_buf(4)];\n\t\tbufs[0].write_shift(4, entries.length);\n\t\tfor(i = 0; i < entries.length; ++i) {\n\t\t\tvar value = entries[i][0];\n\t\t\tpr = new_buf(4 + 4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tpr.write_shift(4, i+2);\n\t\t\tpr.write_shift(4, value.length + 1);\n\t\t\tpr.write_shift(0, value, \"dbcs\");\n\t\t\twhile(pr.l != pr.length) pr.write_shift(1, 0);\n\t\t\tbufs.push(pr);\n\t\t}\n\t\tpr = bconcat(bufs);\n\t\tprop.unshift(pr);\n\t\tsz += 8 + pr.length;\n\t}\n\n\tfor(i = 0; i < entries.length; ++i) {\n\t\tif(RE && !RE[entries[i][0]]) continue;\n\t\tif(XLSPSSkip.indexOf(entries[i][0]) > -1 || PseudoPropsPairs.indexOf(entries[i][0]) > -1) continue;\n\t\tif(entries[i][1] == null) continue;\n\n\t\tvar val = entries[i][1], idx = 0;\n\t\tif(RE) {\n\t\t\tidx = +RE[entries[i][0]];\n\t\t\tvar pinfo = (PIDSI/*:: || {}*/)[idx]/*:: || {} */;\n\t\t\tif(pinfo.p == \"version\" && typeof val == \"string\") {\n\t\t\t\t/*:: if(typeof val !== \"string\") throw \"unreachable\"; */\n\t\t\t\tvar arr = val.split(\".\");\n\t\t\t\tval = ((+arr[0])<<16) + ((+arr[1])||0);\n\t\t\t}\n\t\t\tpr = write_TypedPropertyValue(pinfo.t, val);\n\t\t} else {\n\t\t\tvar T = guess_property_type(val);\n\t\t\tif(T == -1) { T = 0x1F; val = String(val); }\n\t\t\tpr = write_TypedPropertyValue(T, val);\n\t\t}\n\t\tprop.push(pr);\n\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, !RE ? 2+i : idx);\n\t\tpiao.push(pio);\n\n\t\tsz += 8 + pr.length;\n\t}\n\n\tvar w = 8 * (prop.length + 1);\n\tfor(i = 0; i < prop.length; ++i) { piao[i].write_shift(4, w); w += prop[i].length; }\n\thdr.write_shift(4, sz);\n\thdr.write_shift(4, prop.length);\n\treturn bconcat([hdr].concat(piao).concat(prop));\n}\n\n/* [MS-OLEPS] 2.21 PropertySetStream */\nfunction parse_PropertySetStream(file, PIDSI, clsid) {\n\tvar blob = file.content;\n\tif(!blob) return ({}/*:any*/);\n\tprep_blob(blob, 0);\n\n\tvar NumSets, FMTID0, FMTID1, Offset0, Offset1 = 0;\n\tblob.chk('feff', 'Byte Order: ');\n\n\t/*var vers = */blob.read_shift(2); // TODO: check version\n\tvar SystemIdentifier = blob.read_shift(4);\n\tvar CLSID = blob.read_shift(16);\n\tif(CLSID !== CFB.utils.consts.HEADER_CLSID && CLSID !== clsid) throw new Error(\"Bad PropertySet CLSID \" + CLSID);\n\tNumSets = blob.read_shift(4);\n\tif(NumSets !== 1 && NumSets !== 2) throw new Error(\"Unrecognized #Sets: \" + NumSets);\n\tFMTID0 = blob.read_shift(16); Offset0 = blob.read_shift(4);\n\n\tif(NumSets === 1 && Offset0 !== blob.l) throw new Error(\"Length mismatch: \" + Offset0 + \" !== \" + blob.l);\n\telse if(NumSets === 2) { FMTID1 = blob.read_shift(16); Offset1 = blob.read_shift(4); }\n\tvar PSet0 = parse_PropertySet(blob, PIDSI);\n\n\tvar rval = ({ SystemIdentifier: SystemIdentifier }/*:any*/);\n\tfor(var y in PSet0) rval[y] = PSet0[y];\n\t//rval.blob = blob;\n\trval.FMTID = FMTID0;\n\t//rval.PSet0 = PSet0;\n\tif(NumSets === 1) return rval;\n\tif(Offset1 - blob.l == 2) blob.l += 2;\n\tif(blob.l !== Offset1) throw new Error(\"Length mismatch 2: \" + blob.l + \" !== \" + Offset1);\n\tvar PSet1;\n\ttry { PSet1 = parse_PropertySet(blob, null); } catch(e) {/* empty */}\n\tfor(y in PSet1) rval[y] = PSet1[y];\n\trval.FMTID = [FMTID0, FMTID1]; // TODO: verify FMTID0/1\n\treturn rval;\n}\nfunction write_PropertySetStream(entries, clsid, RE, PIDSI/*:{[key:string|number]:any}*/, entries2/*:?any*/, clsid2/*:?any*/) {\n\tvar hdr = new_buf(entries2 ? 68 : 48);\n\tvar bufs = [hdr];\n\thdr.write_shift(2, 0xFFFE);\n\thdr.write_shift(2, 0x0000); /* TODO: type 1 props */\n\thdr.write_shift(4, 0x32363237);\n\thdr.write_shift(16, CFB.utils.consts.HEADER_CLSID, \"hex\");\n\thdr.write_shift(4, (entries2 ? 2 : 1));\n\thdr.write_shift(16, clsid, \"hex\");\n\thdr.write_shift(4, (entries2 ? 68 : 48));\n\tvar ps0 = write_PropertySet(entries, RE, PIDSI);\n\tbufs.push(ps0);\n\n\tif(entries2) {\n\t\tvar ps1 = write_PropertySet(entries2, null, null);\n\t\thdr.write_shift(16, clsid2, \"hex\");\n\t\thdr.write_shift(4, 68 + ps0.length);\n\t\tbufs.push(ps1);\n\t}\n\treturn bconcat(bufs);\n}\n\nfunction parsenoop2(blob, length) { blob.read_shift(length); return null; }\nfunction writezeroes(n, o) { if(!o) o=new_buf(n); for(var j=0; j<n; ++j) o.write_shift(1, 0); return o; }\n\nfunction parslurp(blob, length, cb) {\n\tvar arr = [], target = blob.l + length;\n\twhile(blob.l < target) arr.push(cb(blob, target - blob.l));\n\tif(target !== blob.l) throw new Error(\"Slurp error\");\n\treturn arr;\n}\n\nfunction parsebool(blob, length/*:number*/) { return blob.read_shift(length) === 0x1; }\nfunction writebool(v/*:any*/, o) { if(!o) o=new_buf(2); o.write_shift(2, +!!v); return o; }\n\nfunction parseuint16(blob/*::, length:?number, opts:?any*/) { return blob.read_shift(2, 'u'); }\nfunction writeuint16(v/*:number*/, o) { if(!o) o=new_buf(2); o.write_shift(2, v); return o; }\nfunction parseuint16a(blob, length/*:: :?number, opts:?any*/) { return parslurp(blob,length,parseuint16);}\n\n/* --- 2.5 Structures --- */\n\n/* [MS-XLS] 2.5.10 Bes (boolean or error) */\nfunction parse_Bes(blob/*::, length*/) {\n\tvar v = blob.read_shift(1), t = blob.read_shift(1);\n\treturn t === 0x01 ? v : v === 0x01;\n}\nfunction write_Bes(v, t/*:string*/, o) {\n\tif(!o) o = new_buf(2);\n\to.write_shift(1, ((t == 'e') ? +v : +!!v));\n\to.write_shift(1, ((t == 'e') ? 1 : 0));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.240 ShortXLUnicodeString */\nfunction parse_ShortXLUnicodeString(blob, length, opts) {\n\tvar cch = blob.read_shift(opts && opts.biff >= 12 ? 2 : 1);\n\tvar encoding = 'sbcs-cont';\n\tvar cp = current_codepage;\n\tif(opts && opts.biff >= 8) current_codepage = 1200;\n\tif(!opts || opts.biff == 8 ) {\n\t\tvar fHighByte = blob.read_shift(1);\n\t\tif(fHighByte) { encoding = 'dbcs-cont'; }\n\t} else if(opts.biff == 12) {\n\t\tencoding = 'wstr';\n\t}\n\tif(opts.biff >= 2 && opts.biff <= 5) encoding = 'cpstr';\n\tvar o = cch ? blob.read_shift(cch, encoding) : \"\";\n\tcurrent_codepage = cp;\n\treturn o;\n}\n\n/* 2.5.293 XLUnicodeRichExtendedString */\nfunction parse_XLUnicodeRichExtendedString(blob) {\n\tvar cp = current_codepage;\n\tcurrent_codepage = 1200;\n\tvar cch = blob.read_shift(2), flags = blob.read_shift(1);\n\tvar /*fHighByte = flags & 0x1,*/ fExtSt = flags & 0x4, fRichSt = flags & 0x8;\n\tvar width = 1 + (flags & 0x1); // 0x0 -> utf8, 0x1 -> dbcs\n\tvar cRun = 0, cbExtRst;\n\tvar z = {};\n\tif(fRichSt) cRun = blob.read_shift(2);\n\tif(fExtSt) cbExtRst = blob.read_shift(4);\n\tvar encoding = width == 2 ? 'dbcs-cont' : 'sbcs-cont';\n\tvar msg = cch === 0 ? \"\" : blob.read_shift(cch, encoding);\n\tif(fRichSt) blob.l += 4 * cRun; //TODO: parse this\n\tif(fExtSt) blob.l += cbExtRst; //TODO: parse this\n\tz.t = msg;\n\tif(!fRichSt) { z.raw = \"<t>\" + z.t + \"</t>\"; z.r = z.t; }\n\tcurrent_codepage = cp;\n\treturn z;\n}\nfunction write_XLUnicodeRichExtendedString(xlstr/*:: :XLString, opts*/) {\n\tvar str = (xlstr.t||\"\"), nfmts = 1;\n\n\tvar hdr = new_buf(3 + (nfmts > 1 ? 2 : 0));\n\thdr.write_shift(2, str.length);\n\thdr.write_shift(1, (nfmts > 1 ? 0x08 : 0x00) | 0x01);\n\tif(nfmts > 1) hdr.write_shift(2, nfmts);\n\n\tvar otext = new_buf(2 * str.length);\n\totext.write_shift(2 * str.length, str, 'utf16le');\n\n\tvar out = [hdr, otext];\n\n\treturn bconcat(out);\n}\n\n/* 2.5.296 XLUnicodeStringNoCch */\nfunction parse_XLUnicodeStringNoCch(blob, cch, opts) {\n\tvar retval;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return blob.read_shift(cch, 'cpstr');\n\t\tif(opts.biff >= 12) return blob.read_shift(cch, 'dbcs-cont');\n\t}\n\tvar fHighByte = blob.read_shift(1);\n\tif(fHighByte===0) { retval = blob.read_shift(cch, 'sbcs-cont'); }\n\telse { retval = blob.read_shift(cch, 'dbcs-cont'); }\n\treturn retval;\n}\n\n/* 2.5.294 XLUnicodeString */\nfunction parse_XLUnicodeString(blob, length, opts) {\n\tvar cch = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn parse_XLUnicodeStringNoCch(blob, cch, opts);\n}\n/* BIFF5 override */\nfunction parse_XLUnicodeString2(blob, length, opts) {\n\tif(opts.biff > 5) return parse_XLUnicodeString(blob, length, opts);\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, (opts.biff <= 4 || !blob.lens ) ? 'cpstr' : 'sbcs-cont');\n}\n/* TODO: BIFF5 and lower, codepage awareness */\nfunction write_XLUnicodeString(str, opts, o) {\n\tif(!o) o = new_buf(3 + 2 * str.length);\n\to.write_shift(2, str.length);\n\to.write_shift(1, 1);\n\to.write_shift(31, str, 'utf16le');\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.61 ControlInfo */\nfunction parse_ControlInfo(blob/*::, length, opts*/) {\n\tvar flags = blob.read_shift(1);\n\tblob.l++;\n\tvar accel = blob.read_shift(2);\n\tblob.l += 2;\n\treturn [flags, accel];\n}\n\n/* [MS-OSHARED] 2.3.7.6 URLMoniker TODO: flags */\nfunction parse_URLMoniker(blob/*::, length, opts*/) {\n\tvar len = blob.read_shift(4), start = blob.l;\n\tvar extra = false;\n\tif(len > 24) {\n\t\t/* look ahead */\n\t\tblob.l += len - 24;\n\t\tif(blob.read_shift(16) === \"795881f43b1d7f48af2c825dc4852763\") extra = true;\n\t\tblob.l = start;\n\t}\n\tvar url = blob.read_shift((extra?len-24:len)>>1, 'utf16le').replace(chr0,\"\");\n\tif(extra) blob.l += 24;\n\treturn url;\n}\n\n/* [MS-OSHARED] 2.3.7.8 FileMoniker TODO: all fields */\nfunction parse_FileMoniker(blob/*::, length*/) {\n\tvar cAnti = blob.read_shift(2);\n\tvar preamble = \"\"; while(cAnti-- > 0) preamble += \"../\";\n\tvar ansiPath = blob.read_shift(0, 'lpstr-ansi');\n\tblob.l += 2; //var endServer = blob.read_shift(2);\n\tif(blob.read_shift(2) != 0xDEAD) throw new Error(\"Bad FileMoniker\");\n\tvar sz = blob.read_shift(4);\n\tif(sz === 0) return preamble + ansiPath.replace(/\\\\/g,\"/\");\n\tvar bytes = blob.read_shift(4);\n\tif(blob.read_shift(2) != 3) throw new Error(\"Bad FileMoniker\");\n\tvar unicodePath = blob.read_shift(bytes>>1, 'utf16le').replace(chr0,\"\");\n\treturn preamble + unicodePath;\n}\n\n/* [MS-OSHARED] 2.3.7.2 HyperlinkMoniker TODO: all the monikers */\nfunction parse_HyperlinkMoniker(blob, length) {\n\tvar clsid = blob.read_shift(16); length -= 16;\n\tswitch(clsid) {\n\t\tcase \"e0c9ea79f9bace118c8200aa004ba90b\": return parse_URLMoniker(blob, length);\n\t\tcase \"0303000000000000c000000000000046\": return parse_FileMoniker(blob, length);\n\t\tdefault: throw new Error(\"Unsupported Moniker \" + clsid);\n\t}\n}\n\n/* [MS-OSHARED] 2.3.7.9 HyperlinkString */\nfunction parse_HyperlinkString(blob/*::, length*/) {\n\tvar len = blob.read_shift(4);\n\tvar o = len > 0 ? blob.read_shift(len, 'utf16le').replace(chr0, \"\") : \"\";\n\treturn o;\n}\nfunction write_HyperlinkString(str/*:string*/, o) {\n\tif(!o) o = new_buf(6 + str.length * 2);\n\to.write_shift(4, 1 + str.length);\n\tfor(var i = 0; i < str.length; ++i) o.write_shift(2, str.charCodeAt(i));\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-OSHARED] 2.3.7.1 Hyperlink Object */\nfunction parse_Hyperlink(blob, length)/*:Hyperlink*/ {\n\tvar end = blob.l + length;\n\tvar sVer = blob.read_shift(4);\n\tif(sVer !== 2) throw new Error(\"Unrecognized streamVersion: \" + sVer);\n\tvar flags = blob.read_shift(2);\n\tblob.l += 2;\n\tvar displayName, targetFrameName, moniker, oleMoniker, Loc=\"\", guid, fileTime;\n\tif(flags & 0x0010) displayName = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0080) targetFrameName = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0101) moniker = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0001) oleMoniker = parse_HyperlinkMoniker(blob, end - blob.l);\n\tif(flags & 0x0008) Loc = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0020) guid = blob.read_shift(16);\n\tif(flags & 0x0040) fileTime = parse_FILETIME(blob/*, 8*/);\n\tblob.l = end;\n\tvar target = targetFrameName||moniker||oleMoniker||\"\";\n\tif(target && Loc) target+=\"#\"+Loc;\n\tif(!target) target = \"#\" + Loc;\n\tif((flags & 0x0002) && target.charAt(0) == \"/\" && target.charAt(1) != \"/\") target = \"file://\" + target;\n\tvar out = ({Target:target}/*:any*/);\n\tif(guid) out.guid = guid;\n\tif(fileTime) out.time = fileTime;\n\tif(displayName) out.Tooltip = displayName;\n\treturn out;\n}\nfunction write_Hyperlink(hl) {\n\tvar out = new_buf(512), i = 0;\n\tvar Target = hl.Target;\n\tif(Target.slice(0,7) == \"file://\") Target = Target.slice(7);\n\tvar hashidx = Target.indexOf(\"#\");\n\tvar F = hashidx > -1 ? 0x1f : 0x17;\n\tswitch(Target.charAt(0)) { case \"#\": F=0x1c; break; case \".\": F&=~2; break; }\n\tout.write_shift(4,2); out.write_shift(4, F);\n\tvar data = [8,6815827,6619237,4849780,83]; for(i = 0; i < data.length; ++i) out.write_shift(4, data[i]);\n\tif(F == 0x1C) {\n\t\tTarget = Target.slice(1);\n\t\twrite_HyperlinkString(Target, out);\n\t} else if(F & 0x02) {\n\t\tdata = \"e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar Pretarget = hashidx > -1 ? Target.slice(0, hashidx) : Target;\n\t\tout.write_shift(4, 2*(Pretarget.length + 1));\n\t\tfor(i = 0; i < Pretarget.length; ++i) out.write_shift(2, Pretarget.charCodeAt(i));\n\t\tout.write_shift(2, 0);\n\t\tif(F & 0x08) write_HyperlinkString(hashidx > -1 ? Target.slice(hashidx+1): \"\", out);\n\t} else {\n\t\tdata = \"03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar P = 0;\n\t\twhile(Target.slice(P*3,P*3+3)==\"../\"||Target.slice(P*3,P*3+3)==\"..\\\\\") ++P;\n\t\tout.write_shift(2, P);\n\t\tout.write_shift(4, Target.length - 3 * P + 1);\n\t\tfor(i = 0; i < Target.length - 3 * P; ++i) out.write_shift(1, Target.charCodeAt(i + 3 * P) & 0xFF);\n\t\tout.write_shift(1, 0);\n\t\tout.write_shift(2, 0xFFFF);\n\t\tout.write_shift(2, 0xDEAD);\n\t\tfor(i = 0; i < 6; ++i) out.write_shift(4, 0);\n\t}\n\treturn out.slice(0, out.l);\n}\n\n/* 2.5.178 LongRGBA */\nfunction parse_LongRGBA(blob/*::, length*/) { var r = blob.read_shift(1), g = blob.read_shift(1), b = blob.read_shift(1), a = blob.read_shift(1); return [r,g,b,a]; }\n\n/* 2.5.177 LongRGB */\nfunction parse_LongRGB(blob, length) { var x = parse_LongRGBA(blob, length); x[3] = 0; return x; }\n\n\n/* [MS-XLS] 2.5.19 */\nfunction parse_XLSCell(blob/*::, length*/)/*:Cell*/ {\n\tvar rw = blob.read_shift(2); // 0-indexed\n\tvar col = blob.read_shift(2);\n\tvar ixfe = blob.read_shift(2);\n\treturn ({r:rw, c:col, ixfe:ixfe}/*:any*/);\n}\nfunction write_XLSCell(R/*:number*/, C/*:number*/, ixfe/*:?number*/, o) {\n\tif(!o) o = new_buf(6);\n\to.write_shift(2, R);\n\to.write_shift(2, C);\n\to.write_shift(2, ixfe||0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.134 */\nfunction parse_frtHeader(blob) {\n\tvar rt = blob.read_shift(2);\n\tvar flags = blob.read_shift(2); // TODO: parse these flags\n\tblob.l += 8;\n\treturn {type: rt, flags: flags};\n}\n\n\n\nfunction parse_OptXLUnicodeString(blob, length, opts) { return length === 0 ? \"\" : parse_XLUnicodeString2(blob, length, opts); }\n\n/* [MS-XLS] 2.5.344 */\nfunction parse_XTI(blob, length, opts) {\n\tvar w = opts.biff > 8 ? 4 : 2;\n\tvar iSupBook = blob.read_shift(w), itabFirst = blob.read_shift(w,'i'), itabLast = blob.read_shift(w,'i');\n\treturn [iSupBook, itabFirst, itabLast];\n}\n\n/* [MS-XLS] 2.5.218 */\nfunction parse_RkRec(blob) {\n\tvar ixfe = blob.read_shift(2);\n\tvar RK = parse_RkNumber(blob);\n\treturn [ixfe, RK];\n}\n\n/* [MS-XLS] 2.5.1 */\nfunction parse_AddinUdf(blob, length, opts) {\n\tblob.l += 4; length -= 4;\n\tvar l = blob.l + length;\n\tvar udfName = parse_ShortXLUnicodeString(blob, length, opts);\n\tvar cb = blob.read_shift(2);\n\tl -= blob.l;\n\tif(cb !== l) throw new Error(\"Malformed AddinUdf: padding = \" + l + \" != \" + cb);\n\tblob.l += cb;\n\treturn udfName;\n}\n\n/* [MS-XLS] 2.5.209 TODO: Check sizes */\nfunction parse_Ref8U(blob/*::, length*/) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(2);\n\tvar colLast = blob.read_shift(2);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\nfunction write_Ref8U(r/*:Range*/, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(2, r.s.r);\n\to.write_shift(2, r.e.r);\n\to.write_shift(2, r.s.c);\n\to.write_shift(2, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.211 */\nfunction parse_RefU(blob/*::, length*/) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(1);\n\tvar colLast = blob.read_shift(1);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\n\n/* [MS-XLS] 2.5.207 */\nvar parse_Ref = parse_RefU;\n\n/* [MS-XLS] 2.5.143 */\nfunction parse_FtCmo(blob/*::, length*/) {\n\tblob.l += 4;\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tblob.l+=12;\n\treturn [id, ot, flags];\n}\n\n/* [MS-XLS] 2.5.149 */\nfunction parse_FtNts(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.l += 16; // GUID TODO\n\tout.fSharedNote = blob.read_shift(2);\n\tblob.l += 4;\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.142 */\nfunction parse_FtCf(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.cf = blob.read_shift(2);\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.140 - 2.5.154 and friends */\nfunction parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }\nvar FtTab = {\n\t/*::[*/0x00/*::]*/: parse_FtSkip,      /* FtEnd */\n\t/*::[*/0x04/*::]*/: parse_FtSkip,      /* FtMacro */\n\t/*::[*/0x05/*::]*/: parse_FtSkip,      /* FtButton */\n\t/*::[*/0x06/*::]*/: parse_FtSkip,      /* FtGmo */\n\t/*::[*/0x07/*::]*/: parse_FtCf,        /* FtCf */\n\t/*::[*/0x08/*::]*/: parse_FtSkip,      /* FtPioGrbit */\n\t/*::[*/0x09/*::]*/: parse_FtSkip,      /* FtPictFmla */\n\t/*::[*/0x0A/*::]*/: parse_FtSkip,      /* FtCbls */\n\t/*::[*/0x0B/*::]*/: parse_FtSkip,      /* FtRbo */\n\t/*::[*/0x0C/*::]*/: parse_FtSkip,      /* FtSbs */\n\t/*::[*/0x0D/*::]*/: parse_FtNts,       /* FtNts */\n\t/*::[*/0x0E/*::]*/: parse_FtSkip,      /* FtSbsFmla */\n\t/*::[*/0x0F/*::]*/: parse_FtSkip,      /* FtGboData */\n\t/*::[*/0x10/*::]*/: parse_FtSkip,      /* FtEdoData */\n\t/*::[*/0x11/*::]*/: parse_FtSkip,      /* FtRboData */\n\t/*::[*/0x12/*::]*/: parse_FtSkip,      /* FtCblsData */\n\t/*::[*/0x13/*::]*/: parse_FtSkip,      /* FtLbsData */\n\t/*::[*/0x14/*::]*/: parse_FtSkip,      /* FtCblsFmla */\n\t/*::[*/0x15/*::]*/: parse_FtCmo\n};\nfunction parse_FtArray(blob, length/*::, ot*/) {\n\tvar tgt = blob.l + length;\n\tvar fts = [];\n\twhile(blob.l < tgt) {\n\t\tvar ft = blob.read_shift(2);\n\t\tblob.l-=2;\n\t\ttry {\n\t\t\tfts.push(FtTab[ft](blob, tgt - blob.l));\n\t\t} catch(e) { blob.l = tgt; return fts; }\n\t}\n\tif(blob.l != tgt) blob.l = tgt; //throw new Error(\"bad Object Ft-sequence\");\n\treturn fts;\n}\n\n/* --- 2.4 Records --- */\n\n/* [MS-XLS] 2.4.21 */\nfunction parse_BOF(blob, length) {\n\tvar o = {BIFFVer:0, dt:0};\n\to.BIFFVer = blob.read_shift(2); length -= 2;\n\tif(length >= 2) { o.dt = blob.read_shift(2); blob.l -= 2; }\n\tswitch(o.BIFFVer) {\n\t\tcase 0x0600: /* BIFF8 */\n\t\tcase 0x0500: /* BIFF5 */\n\t\tcase 0x0400: /* BIFF4 */\n\t\tcase 0x0300: /* BIFF3 */\n\t\tcase 0x0200: /* BIFF2 */\n\t\tcase 0x0002: case 0x0007: /* BIFF2 */\n\t\t\tbreak;\n\t\tdefault: if(length > 6) throw new Error(\"Unexpected BIFF Ver \" + o.BIFFVer);\n\t}\n\n\tblob.read_shift(length);\n\treturn o;\n}\nfunction write_BOF(wb/*:Workbook*/, t/*:number*/, o) {\n\tvar h = 0x0600, w = 16;\n\tswitch(o.bookType) {\n\t\tcase 'biff8': break;\n\t\tcase 'biff5': h = 0x0500; w = 8; break;\n\t\tcase 'biff4': h = 0x0004; w = 6; break;\n\t\tcase 'biff3': h = 0x0003; w = 6; break;\n\t\tcase 'biff2': h = 0x0002; w = 4; break;\n\t\tcase 'xla': break;\n\t\tdefault: throw new Error(\"unsupported BIFF version\");\n\t}\n\tvar out = new_buf(w);\n\tout.write_shift(2, h);\n\tout.write_shift(2, t);\n\tif(w > 4) out.write_shift(2, 0x7262);\n\tif(w > 6) out.write_shift(2, 0x07CD);\n\tif(w > 8) {\n\t\tout.write_shift(2, 0xC009);\n\t\tout.write_shift(2, 0x0001);\n\t\tout.write_shift(2, 0x0706);\n\t\tout.write_shift(2, 0x0000);\n\t}\n\treturn out;\n}\n\n\n/* [MS-XLS] 2.4.146 */\nfunction parse_InterfaceHdr(blob, length) {\n\tif(length === 0) return 0x04b0;\n\tif((blob.read_shift(2))!==0x04b0){/* empty */}\n\treturn 0x04b0;\n}\n\n\n/* [MS-XLS] 2.4.349 */\nfunction parse_WriteAccess(blob, length, opts) {\n\tif(opts.enc) { blob.l += length; return \"\"; }\n\tvar l = blob.l;\n\t// TODO: make sure XLUnicodeString doesnt overrun\n\tvar UserName = parse_XLUnicodeString2(blob, 0, opts);\n\tblob.read_shift(length + l - blob.l);\n\treturn UserName;\n}\nfunction write_WriteAccess(s/*:string*/, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(b8 ? 112 : 54);\n\to.write_shift(opts.biff == 8 ? 2 : 1, 7);\n\tif(b8) o.write_shift(1, 0);\n\to.write_shift(4, 0x33336853);\n\to.write_shift(4, (0x00534A74 | (b8 ? 0 : 0x20000000)));\n\twhile(o.l < o.length) o.write_shift(1, (b8 ? 0 : 32));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.351 */\nfunction parse_WsBool(blob, length, opts) {\n\tvar flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0);\n\treturn { fDialog: flags & 0x10, fBelow: flags & 0x40, fRight: flags & 0x80 };\n}\n\n/* [MS-XLS] 2.4.28 */\nfunction parse_BoundSheet8(blob, length, opts) {\n\tvar pos = blob.read_shift(4);\n\tvar hidden = blob.read_shift(1) & 0x03;\n\tvar dt = blob.read_shift(1);\n\tswitch(dt) {\n\t\tcase 0: dt = 'Worksheet'; break;\n\t\tcase 1: dt = 'Macrosheet'; break;\n\t\tcase 2: dt = 'Chartsheet'; break;\n\t\tcase 6: dt = 'VBAModule'; break;\n\t}\n\tvar name = parse_ShortXLUnicodeString(blob, 0, opts);\n\tif(name.length === 0) name = \"Sheet1\";\n\treturn { pos:pos, hs:hidden, dt:dt, name:name };\n}\nfunction write_BoundSheet8(data, opts) {\n\tvar w = (!opts || opts.biff >= 8 ? 2 : 1);\n\tvar o = new_buf(8 + w * data.name.length);\n\to.write_shift(4, data.pos);\n\to.write_shift(1, data.hs || 0);\n\to.write_shift(1, data.dt);\n\to.write_shift(1, data.name.length);\n\tif(opts.biff >= 8) o.write_shift(1, 1);\n\to.write_shift(w * data.name.length, data.name, opts.biff < 8 ? 'sbcs' : 'utf16le');\n\tvar out = o.slice(0, o.l);\n\tout.l = o.l; return out;\n}\n\n/* [MS-XLS] 2.4.265 TODO */\nfunction parse_SST(blob, length)/*:SST*/ {\n\tvar end = blob.l + length;\n\tvar cnt = blob.read_shift(4);\n\tvar ucnt = blob.read_shift(4);\n\tvar strs/*:SST*/ = ([]/*:any*/);\n\tfor(var i = 0; i != ucnt && blob.l < end; ++i) {\n\t\tstrs.push(parse_XLUnicodeRichExtendedString(blob));\n\t}\n\tstrs.Count = cnt; strs.Unique = ucnt;\n\treturn strs;\n}\nfunction write_SST(sst, opts) {\n\tvar header = new_buf(8);\n\theader.write_shift(4, sst.Count);\n\theader.write_shift(4, sst.Unique);\n\tvar strs = [];\n\tfor(var j = 0; j < sst.length; ++j) strs[j] = write_XLUnicodeRichExtendedString(sst[j], opts);\n\tvar o = bconcat([header].concat(strs));\n\t/*::(*/o/*:: :any)*/.parts = [header.length].concat(strs.map(function(str) { return str.length; }));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.107 */\nfunction parse_ExtSST(blob, length) {\n\tvar extsst = {};\n\textsst.dsst = blob.read_shift(2);\n\tblob.l += length-2;\n\treturn extsst;\n}\n\n\n/* [MS-XLS] 2.4.221 TODO: check BIFF2-4 */\nfunction parse_Row(blob) {\n\tvar z = ({}/*:any*/);\n\tz.r = blob.read_shift(2);\n\tz.c = blob.read_shift(2);\n\tz.cnt = blob.read_shift(2) - z.c;\n\tvar miyRw = blob.read_shift(2);\n\tblob.l += 4; // reserved(2), unused(2)\n\tvar flags = blob.read_shift(1); // various flags\n\tblob.l += 3; // reserved(8), ixfe(12), flags(4)\n\tif(flags & 0x07) z.level = flags & 0x07;\n\t// collapsed: flags & 0x10\n\tif(flags & 0x20) z.hidden = true;\n\tif(flags & 0x40) z.hpt = miyRw / 20;\n\treturn z;\n}\n\n\n/* [MS-XLS] 2.4.125 */\nfunction parse_ForceFullCalculation(blob) {\n\tvar header = parse_frtHeader(blob);\n\tif(header.type != 0x08A3) throw new Error(\"Invalid Future Record \" + header.type);\n\tvar fullcalc = blob.read_shift(4);\n\treturn fullcalc !== 0x0;\n}\n\n\n\n\n\n/* [MS-XLS] 2.4.215 rt */\nfunction parse_RecalcId(blob) {\n\tblob.read_shift(2);\n\treturn blob.read_shift(4);\n}\n\n/* [MS-XLS] 2.4.87 */\nfunction parse_DefaultRowHeight(blob, length, opts) {\n\tvar f = 0;\n\tif(!(opts && opts.biff == 2)) {\n\t\tf = blob.read_shift(2);\n\t}\n\tvar miyRw = blob.read_shift(2);\n\tif((opts && opts.biff == 2)) {\n\t\tf = 1 - (miyRw >> 15); miyRw &= 0x7fff;\n\t}\n\tvar fl = {Unsynced:f&1,DyZero:(f&2)>>1,ExAsc:(f&4)>>2,ExDsc:(f&8)>>3};\n\treturn [fl, miyRw];\n}\n\n/* [MS-XLS] 2.4.345 TODO */\nfunction parse_Window1(blob) {\n\tvar xWn = blob.read_shift(2), yWn = blob.read_shift(2), dxWn = blob.read_shift(2), dyWn = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), iTabCur = blob.read_shift(2), iTabFirst = blob.read_shift(2);\n\tvar ctabSel = blob.read_shift(2), wTabRatio = blob.read_shift(2);\n\treturn { Pos: [xWn, yWn], Dim: [dxWn, dyWn], Flags: flags, CurTab: iTabCur,\n\t\tFirstTab: iTabFirst, Selected: ctabSel, TabRatio: wTabRatio };\n}\nfunction write_Window1(/*::opts*/) {\n\tvar o = new_buf(18);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0x7260);\n\to.write_shift(2, 0x44c0);\n\to.write_shift(2, 0x38);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 1);\n\to.write_shift(2, 0x01f4);\n\treturn o;\n}\n/* [MS-XLS] 2.4.346 TODO */\nfunction parse_Window2(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff < 5) return {};\n\tvar f = blob.read_shift(2);\n\treturn { RTL: f & 0x40 };\n}\nfunction write_Window2(view) {\n\tvar o = new_buf(18), f = 0x6b6;\n\tif(view && view.RTL) f |= 0x40;\n\to.write_shift(2, f);\n\to.write_shift(4, 0);\n\to.write_shift(4, 64);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.189 TODO */\nfunction parse_Pane(/*blob, length, opts*/) {\n}\n\n/* [MS-XLS] 2.4.122 TODO */\nfunction parse_Font(blob, length, opts) {\n\tvar o/*:any*/ = {\n\t\tdyHeight: blob.read_shift(2),\n\t\tfl: blob.read_shift(2)\n\t};\n\tswitch((opts && opts.biff) || 8) {\n\t\tcase 2: break;\n\t\tcase 3: case 4: blob.l += 2; break;\n\t\tdefault: blob.l += 10; break;\n\t}\n\to.name = parse_ShortXLUnicodeString(blob, 0, opts);\n\treturn o;\n}\nfunction write_Font(data, opts) {\n\tvar name = data.name || \"Arial\";\n\tvar b5 = (opts && (opts.biff == 5)), w = (b5 ? (15 + name.length) : (16 + 2 * name.length));\n\tvar o = new_buf(w);\n\to.write_shift(2, (data.sz || 12) * 20);\n\to.write_shift(4, 0);\n\to.write_shift(2, 400);\n\to.write_shift(4, 0);\n\to.write_shift(2, 0);\n\to.write_shift(1, name.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * name.length, name, (b5 ? \"sbcs\" : \"utf16le\"));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.149 */\nfunction parse_LabelSst(blob) {\n\tvar cell = parse_XLSCell(blob);\n\tcell.isst = blob.read_shift(4);\n\treturn cell;\n}\nfunction write_LabelSst(R/*:number*/, C/*:number*/, v/*:number*/, os/*:number*/ /*::, opts*/) {\n\tvar o = new_buf(10);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(4, v);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.148 */\nfunction parse_Label(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar target = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) blob.l++;\n\tvar str = parse_XLUnicodeString(blob, target - blob.l, opts);\n\tcell.val = str;\n\treturn cell;\n}\nfunction write_Label(R/*:number*/, C/*:number*/, v/*:string*/, os/*:number*/, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(6 + 2 + (+b8) + (1 + b8) * v.length);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(2, v.length);\n\tif(b8) o.write_shift(1, 1);\n\to.write_shift((1 + b8) * v.length, v, b8 ? 'utf16le' : 'sbcs');\n\treturn o;\n}\n\n\n/* [MS-XLS] 2.4.126 Number Formats */\nfunction parse_Format(blob, length, opts) {\n\tvar numFmtId = blob.read_shift(2);\n\tvar fmtstr = parse_XLUnicodeString2(blob, 0, opts);\n\treturn [numFmtId, fmtstr];\n}\nfunction write_Format(i/*:number*/, f/*:string*/, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? (3 + f.length) : (5 + 2 * f.length));\n\to.write_shift(2, i);\n\to.write_shift((b5 ? 1 : 2), f.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * f.length, f, (b5 ? 'sbcs' : 'utf16le'));\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(out.l == null) out.l = out.length;\n\treturn out;\n}\nvar parse_BIFF2Format = parse_XLUnicodeString2;\n\n/* [MS-XLS] 2.4.90 */\nfunction parse_Dimensions(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar r = blob.read_shift(w), R = blob.read_shift(w);\n\tvar c = blob.read_shift(2), C = blob.read_shift(2);\n\tblob.l = end;\n\treturn {s: {r:r, c:c}, e: {r:R, c:C}};\n}\nfunction write_Dimensions(range, opts) {\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar o = new_buf(2*w + 6);\n\to.write_shift(w, range.s.r);\n\to.write_shift(w, range.e.r + 1);\n\to.write_shift(2, range.s.c);\n\to.write_shift(2, range.e.c + 1);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.220 */\nfunction parse_RK(blob) {\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrec = parse_RkRec(blob);\n\treturn {r:rw, c:col, ixfe:rkrec[0], rknum:rkrec[1]};\n}\n\n/* [MS-XLS] 2.4.175 */\nfunction parse_MulRk(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrecs = [];\n\twhile(blob.l < target) rkrecs.push(parse_RkRec(blob));\n\tif(blob.l !== target) throw new Error(\"MulRK read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(rkrecs.length != lastcol - col + 1) throw new Error(\"MulRK length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, rkrec:rkrecs};\n}\n/* [MS-XLS] 2.4.174 */\nfunction parse_MulBlank(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar ixfes = [];\n\twhile(blob.l < target) ixfes.push(blob.read_shift(2));\n\tif(blob.l !== target) throw new Error(\"MulBlank read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(ixfes.length != lastcol - col + 1) throw new Error(\"MulBlank length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, ixfe:ixfes};\n}\n\n/* [MS-XLS] 2.5.20 2.5.249 TODO: interpret values here */\nfunction parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}\n//function parse_CellXF(blob, length, opts) {return parse_CellStyleXF(blob,length,0, opts);}\n//function parse_StyleXF(blob, length, opts) {return parse_CellStyleXF(blob,length,1, opts);}\n\n/* [MS-XLS] 2.4.353 TODO: actually do this right */\nfunction parse_XF(blob, length, opts) {\n\tvar o = {};\n\to.ifnt = blob.read_shift(2); o.numFmtId = blob.read_shift(2); o.flags = blob.read_shift(2);\n\to.fStyle = (o.flags >> 2) & 0x01;\n\tlength -= 6;\n\to.data = parse_CellStyleXF(blob, length, o.fStyle, opts);\n\treturn o;\n}\nfunction write_XF(data, ixfeP, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? 16 : 20);\n\to.write_shift(2, 0);\n\tif(data.style) {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, 0xFFF4);\n\t} else {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, (ixfeP<<4));\n\t}\n\tvar f = 0;\n\tif(data.numFmtId > 0 && b5) f |= 0x0400;\n\to.write_shift(4, f);\n\to.write_shift(4, 0);\n\tif(!b5) o.write_shift(4, 0);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.134 */\nfunction parse_Guts(blob) {\n\tblob.l += 4;\n\tvar out = [blob.read_shift(2), blob.read_shift(2)];\n\tif(out[0] !== 0) out[0]--;\n\tif(out[1] !== 0) out[1]--;\n\tif(out[0] > 7 || out[1] > 7) throw new Error(\"Bad Gutters: \" + out.join(\"|\"));\n\treturn out;\n}\nfunction write_Guts(guts/*:Array<number>*/) {\n\tvar o = new_buf(8);\n\to.write_shift(4, 0);\n\to.write_shift(2, guts[0] ? guts[0] + 1 : 0);\n\to.write_shift(2, guts[1] ? guts[1] + 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.24 */\nfunction parse_BoolErr(blob, length, opts) {\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2 || length == 9) ++blob.l;\n\tvar val = parse_Bes(blob, 2);\n\tcell.val = val;\n\tcell.t = (val === true || val === false) ? 'b' : 'e';\n\treturn cell;\n}\nfunction write_BoolErr(R/*:number*/, C/*:number*/, v, os/*:number*/, opts, t/*:string*/) {\n\tvar o = new_buf(8);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Bes(v, t, o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.180 Number */\nfunction parse_Number(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar xnum = parse_Xnum(blob, 8);\n\tcell.val = xnum;\n\treturn cell;\n}\nfunction write_Number(R/*:number*/, C/*:number*/, v, os/*:: :number, opts*/) {\n\tvar o = new_buf(14);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Xnum(v, o);\n\treturn o;\n}\n\nvar parse_XLHeaderFooter = parse_OptXLUnicodeString; // TODO: parse 2.4.136\n\n/* [MS-XLS] 2.4.271 */\nfunction parse_SupBook(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar ctab = blob.read_shift(2);\n\tvar cch = blob.read_shift(2);\n\topts.sbcch = cch;\n\tif(cch == 0x0401 || cch == 0x3A01) return [cch, ctab];\n\tif(cch < 0x01 || cch >0xff) throw new Error(\"Unexpected SupBook type: \"+cch);\n\tvar virtPath = parse_XLUnicodeStringNoCch(blob, cch);\n\t/* TODO: 2.5.277 Virtual Path */\n\tvar rgst = [];\n\twhile(end > blob.l) rgst.push(parse_XLUnicodeString(blob));\n\treturn [cch, ctab, virtPath, rgst];\n}\n\n/* [MS-XLS] 2.4.105 TODO */\nfunction parse_ExternName(blob, length, opts) {\n\tvar flags = blob.read_shift(2);\n\tvar body;\n\tvar o = ({\n\t\tfBuiltIn: flags & 0x01,\n\t\tfWantAdvise: (flags >>> 1) & 0x01,\n\t\tfWantPict: (flags >>> 2) & 0x01,\n\t\tfOle: (flags >>> 3) & 0x01,\n\t\tfOleLink: (flags >>> 4) & 0x01,\n\t\tcf: (flags >>> 5) & 0x3FF,\n\t\tfIcon: flags >>> 15 & 0x01\n\t}/*:any*/);\n\tif(opts.sbcch === 0x3A01) body = parse_AddinUdf(blob, length-2, opts);\n\t//else throw new Error(\"unsupported SupBook cch: \" + opts.sbcch);\n\to.body = body || blob.read_shift(length-2);\n\tif(typeof body === \"string\") o.Name = body;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.150 TODO */\nvar XLSLblBuiltIn = [\n\t\"_xlnm.Consolidate_Area\",\n\t\"_xlnm.Auto_Open\",\n\t\"_xlnm.Auto_Close\",\n\t\"_xlnm.Extract\",\n\t\"_xlnm.Database\",\n\t\"_xlnm.Criteria\",\n\t\"_xlnm.Print_Area\",\n\t\"_xlnm.Print_Titles\",\n\t\"_xlnm.Recorder\",\n\t\"_xlnm.Data_Form\",\n\t\"_xlnm.Auto_Activate\",\n\t\"_xlnm.Auto_Deactivate\",\n\t\"_xlnm.Sheet_Title\",\n\t\"_xlnm._FilterDatabase\"\n];\nfunction parse_Lbl(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar flags = blob.read_shift(2);\n\tvar chKey = blob.read_shift(1);\n\tvar cch = blob.read_shift(1);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar itab = 0;\n\tif(!opts || opts.biff >= 5) {\n\t\tif(opts.biff != 5) blob.l += 2;\n\t\titab = blob.read_shift(2);\n\t\tif(opts.biff == 5) blob.l += 2;\n\t\tblob.l += 4;\n\t}\n\tvar name = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tif(flags & 0x20) name = XLSLblBuiltIn[name.charCodeAt(0)];\n\tvar npflen = target - blob.l; if(opts && opts.biff == 2) --npflen;\n\t/*jshint -W018 */\n\tvar rgce = (target == blob.l || cce === 0 || !(npflen > 0)) ? [] : parse_NameParsedFormula(blob, npflen, opts, cce);\n\t/*jshint +W018 */\n\treturn {\n\t\tchKey: chKey,\n\t\tName: name,\n\t\titab: itab,\n\t\trgce: rgce\n\t};\n}\n\n/* [MS-XLS] 2.4.106 TODO: verify filename encoding */\nfunction parse_ExternSheet(blob, length, opts) {\n\tif(opts.biff < 8) return parse_BIFF5ExternSheet(blob, length, opts);\n\tvar o = [], target = blob.l + length, len = blob.read_shift(opts.biff > 8 ? 4 : 2);\n\twhile(len-- !== 0) o.push(parse_XTI(blob, opts.biff > 8 ? 12 : 6, opts));\n\t\t// [iSupBook, itabFirst, itabLast];\n\tif(blob.l != target) throw new Error(\"Bad ExternSheet: \" + blob.l + \" != \" + target);\n\treturn o;\n}\nfunction parse_BIFF5ExternSheet(blob, length, opts) {\n\tif(blob[blob.l + 1] == 0x03) blob[blob.l]++;\n\tvar o = parse_ShortXLUnicodeString(blob, length, opts);\n\treturn o.charCodeAt(0) == 0x03 ? o.slice(1) : o;\n}\n\n/* [MS-XLS] 2.4.176 TODO: check older biff */\nfunction parse_NameCmt(blob, length, opts) {\n\tif(opts.biff < 8) { blob.l += length; return; }\n\tvar cchName = blob.read_shift(2);\n\tvar cchComment = blob.read_shift(2);\n\tvar name = parse_XLUnicodeStringNoCch(blob, cchName, opts);\n\tvar comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts);\n\treturn [name, comment];\n}\n\n/* [MS-XLS] 2.4.260 */\nfunction parse_ShrFmla(blob, length, opts) {\n\tvar ref = parse_RefU(blob, 6);\n\tblob.l++;\n\tvar cUse = blob.read_shift(1);\n\tlength -= 8;\n\treturn [parse_SharedParsedFormula(blob, length, opts), cUse, ref];\n}\n\n/* [MS-XLS] 2.4.4 TODO */\nfunction parse_Array(blob, length, opts) {\n\tvar ref = parse_Ref(blob, 6);\n\t/* TODO: fAlwaysCalc */\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l ++; length -= 7; break;\n\t\tcase 3: case 4: blob.l += 2; length -= 8; break;\n\t\tdefault: blob.l += 6; length -= 12;\n\t}\n\treturn [ref, parse_ArrayParsedFormula(blob, length, opts, ref)];\n}\n\n/* [MS-XLS] 2.4.173 */\nfunction parse_MTRSettings(blob) {\n\tvar fMTREnabled = blob.read_shift(4) !== 0x00;\n\tvar fUserSetThreadCount = blob.read_shift(4) !== 0x00;\n\tvar cUserThreadCount = blob.read_shift(4);\n\treturn [fMTREnabled, fUserSetThreadCount, cUserThreadCount];\n}\n\n/* [MS-XLS] 2.5.186 TODO: BIFF5 */\nfunction parse_NoteSh(blob, length, opts) {\n\tif(opts.biff < 8) return;\n\tvar row = blob.read_shift(2), col = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), idObj = blob.read_shift(2);\n\tvar stAuthor = parse_XLUnicodeString2(blob, 0, opts);\n\tif(opts.biff < 8) blob.read_shift(1);\n\treturn [{r:row,c:col}, stAuthor, idObj, flags];\n}\n\n/* [MS-XLS] 2.4.179 */\nfunction parse_Note(blob, length, opts) {\n\t/* TODO: Support revisions */\n\treturn parse_NoteSh(blob, length, opts);\n}\n\n/* [MS-XLS] 2.4.168 */\nfunction parse_MergeCells(blob, length)/*:Array<Range>*/ {\n\tvar merges/*:Array<Range>*/ = [];\n\tvar cmcs = blob.read_shift(2);\n\twhile (cmcs--) merges.push(parse_Ref8U(blob,length));\n\treturn merges;\n}\nfunction write_MergeCells(merges/*:Array<Range>*/) {\n\tvar o = new_buf(2 + merges.length * 8);\n\to.write_shift(2, merges.length);\n\tfor(var i = 0; i < merges.length; ++i) write_Ref8U(merges[i], o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.181 TODO: parse all the things! */\nfunction parse_Obj(blob, length, opts) {\n\tif(opts && opts.biff < 8) return parse_BIFF5Obj(blob, length, opts);\n\tvar cmo = parse_FtCmo(blob, 22); // id, ot, flags\n\tvar fts = parse_FtArray(blob, length-22, cmo[1]);\n\treturn { cmo: cmo, ft:fts };\n}\n/* from older spec */\nvar parse_BIFF5OT = {\n0x08: function(blob, length) {\n\tvar tgt = blob.l + length;\n\tblob.l += 10; // todo\n\tvar cf = blob.read_shift(2);\n\tblob.l += 4;\n\tblob.l += 2; //var cbPictFmla = blob.read_shift(2);\n\tblob.l += 2;\n\tblob.l += 2; //var grbit = blob.read_shift(2);\n\tblob.l += 4;\n\tvar cchName = blob.read_shift(1);\n\tblob.l += cchName; // TODO: stName\n\tblob.l = tgt; // TODO: fmla\n\treturn { fmt:cf };\n}\n};\n\nfunction parse_BIFF5Obj(blob, length, opts) {\n\tblob.l += 4; //var cnt = blob.read_shift(4);\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar grbit = blob.read_shift(2);\n\tblob.l += 2; //var colL = blob.read_shift(2);\n\tblob.l += 2; //var dxL = blob.read_shift(2);\n\tblob.l += 2; //var rwT = blob.read_shift(2);\n\tblob.l += 2; //var dyT = blob.read_shift(2);\n\tblob.l += 2; //var colR = blob.read_shift(2);\n\tblob.l += 2; //var dxR = blob.read_shift(2);\n\tblob.l += 2; //var rwB = blob.read_shift(2);\n\tblob.l += 2; //var dyB = blob.read_shift(2);\n\tblob.l += 2; //var cbMacro = blob.read_shift(2);\n\tblob.l += 6;\n\tlength -= 36;\n\tvar fts = [];\n\tfts.push((parse_BIFF5OT[ot]||parsenoop)(blob, length, opts));\n\treturn { cmo: [id, ot, grbit], ft:fts };\n}\n\n/* [MS-XLS] 2.4.329 TODO: parse properly */\nfunction parse_TxO(blob, length, opts) {\n\tvar s = blob.l;\n\tvar texts = \"\";\ntry {\n\tblob.l += 4;\n\tvar ot = (opts.lastobj||{cmo:[0,0]}).cmo[1];\n\tvar controlInfo; // eslint-disable-line no-unused-vars\n\tif([0,5,7,11,12,14].indexOf(ot) == -1) blob.l += 6;\n\telse controlInfo = parse_ControlInfo(blob, 6, opts); // eslint-disable-line no-unused-vars\n\tvar cchText = blob.read_shift(2);\n\t/*var cbRuns = */blob.read_shift(2);\n\t/*var ifntEmpty = */parseuint16(blob, 2);\n\tvar len = blob.read_shift(2);\n\tblob.l += len;\n\t//var fmla = parse_ObjFmla(blob, s + length - blob.l);\n\n\tfor(var i = 1; i < blob.lens.length-1; ++i) {\n\t\tif(blob.l-s != blob.lens[i]) throw new Error(\"TxO: bad continue record\");\n\t\tvar hdr = blob[blob.l];\n\t\tvar t = parse_XLUnicodeStringNoCch(blob, blob.lens[i+1]-blob.lens[i]-1);\n\t\ttexts += t;\n\t\tif(texts.length >= (hdr ? cchText : 2*cchText)) break;\n\t}\n\tif(texts.length !== cchText && texts.length !== cchText*2) {\n\t\tthrow new Error(\"cchText: \" + cchText + \" != \" + texts.length);\n\t}\n\n\tblob.l = s + length;\n\t/* [MS-XLS] 2.5.272 TxORuns */\n//\tvar rgTxoRuns = [];\n//\tfor(var j = 0; j != cbRuns/8-1; ++j) blob.l += 8;\n//\tvar cchText2 = blob.read_shift(2);\n//\tif(cchText2 !== cchText) throw new Error(\"TxOLastRun mismatch: \" + cchText2 + \" \" + cchText);\n//\tblob.l += 6;\n//\tif(s + length != blob.l) throw new Error(\"TxO \" + (s + length) + \", at \" + blob.l);\n\treturn { t: texts };\n} catch(e) { blob.l = s + length; return { t: texts }; }\n}\n\n/* [MS-XLS] 2.4.140 */\nfunction parse_HLink(blob, length) {\n\tvar ref = parse_Ref8U(blob, 8);\n\tblob.l += 16; /* CLSID */\n\tvar hlink = parse_Hyperlink(blob, length-24);\n\treturn [ref, hlink];\n}\nfunction write_HLink(hl) {\n\tvar O = new_buf(24);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tvar clsid = \"d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\tfor(var i = 0; i < 16; ++i) O.write_shift(1, parseInt(clsid[i], 16));\n\treturn bconcat([O, write_Hyperlink(hl[1])]);\n}\n\n\n/* [MS-XLS] 2.4.141 */\nfunction parse_HLinkTooltip(blob, length) {\n\tblob.read_shift(2);\n\tvar ref = parse_Ref8U(blob, 8);\n\tvar wzTooltip = blob.read_shift((length-10)/2, 'dbcs-cont');\n\twzTooltip = wzTooltip.replace(chr0,\"\");\n\treturn [ref, wzTooltip];\n}\nfunction write_HLinkTooltip(hl) {\n\tvar TT = hl[1].Tooltip;\n\tvar O = new_buf(10 + 2 * (TT.length + 1));\n\tO.write_shift(2, 0x0800);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tfor(var i = 0; i < TT.length; ++i) O.write_shift(2, TT.charCodeAt(i));\n\tO.write_shift(2, 0);\n\treturn O;\n}\n\n/* [MS-XLS] 2.4.63 */\nfunction parse_Country(blob)/*:[string|number, string|number]*/ {\n\tvar o = [0,0], d;\n\td = blob.read_shift(2); o[0] = CountryEnum[d] || d;\n\td = blob.read_shift(2); o[1] = CountryEnum[d] || d;\n\treturn o;\n}\nfunction write_Country(o) {\n\tif(!o) o = new_buf(4);\n\to.write_shift(2, 0x01);\n\to.write_shift(2, 0x01);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.50 ClrtClient */\nfunction parse_ClrtClient(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.188 */\nfunction parse_Palette(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.354 */\nfunction parse_XFCRC(blob) {\n\tblob.l += 2;\n\tvar o = {cxfs:0, crc:0};\n\to.cxfs = blob.read_shift(2);\n\to.crc = blob.read_shift(4);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.53 TODO: parse flags */\n/* [MS-XLSB] 2.4.323 TODO: parse flags */\nfunction parse_ColInfo(blob, length, opts) {\n\tif(!opts.cellStyles) return parsenoop(blob, length);\n\tvar w = opts && opts.biff >= 12 ? 4 : 2;\n\tvar colFirst = blob.read_shift(w);\n\tvar colLast = blob.read_shift(w);\n\tvar coldx = blob.read_shift(w);\n\tvar ixfe = blob.read_shift(w);\n\tvar flags = blob.read_shift(2);\n\tif(w == 2) blob.l += 2;\n\tvar o = ({s:colFirst, e:colLast, w:coldx, ixfe:ixfe, flags:flags}/*:any*/);\n\tif(opts.biff >= 5 || !opts.biff) o.level = (flags >> 8) & 0x7;\n\treturn o;\n}\nfunction write_ColInfo(col, idx) {\n\tvar o = new_buf(12);\n\to.write_shift(2, idx);\n\to.write_shift(2, idx);\n\to.write_shift(2, col.width * 256);\n\to.write_shift(2, 0);\n\tvar f = 0;\n\tif(col.hidden) f |= 1;\n\to.write_shift(1, f);\n\tf = col.level || 0;\n\to.write_shift(1, f);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.257 */\nfunction parse_Setup(blob, length) {\n\tvar o = {};\n\tif(length < 32) return o;\n\tblob.l += 16;\n\to.header = parse_Xnum(blob, 8);\n\to.footer = parse_Xnum(blob, 8);\n\tblob.l += 2;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.261 */\nfunction parse_ShtProps(blob, length, opts) {\n\tvar def = {area:false};\n\tif(opts.biff != 5) { blob.l += length; return def; }\n\tvar d = blob.read_shift(1); blob.l += 3;\n\tif((d & 0x10)) def.area = true;\n\treturn def;\n}\n\n/* [MS-XLS] 2.4.241 */\nfunction write_RRTabId(n/*:number*/) {\n\tvar out = new_buf(2 * n);\n\tfor(var i = 0; i < n; ++i) out.write_shift(2, i+1);\n\treturn out;\n}\n\nvar parse_Blank = parse_XLSCell; /* [MS-XLS] 2.4.20 Just the cell */\nvar parse_Scl = parseuint16a; /* [MS-XLS] 2.4.247 num, den */\nvar parse_String = parse_XLUnicodeString; /* [MS-XLS] 2.4.268 */\n\n/* --- Specific to versions before BIFF8 --- */\nfunction parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}\n\n/* BIFF2_??? where ??? is the name from [XLS] */\nfunction parse_BIFF2STR(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 5) opts.biff = 2;\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar str = parse_XLUnicodeString2(blob, length-7, opts);\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n\nfunction parse_BIFF2NUM(blob/*::, length*/) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = parse_Xnum(blob, 8);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2NUM(r/*:number*/, c/*:number*/, val/*:number*/) {\n\tvar out = new_buf(15);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(8, val, 'f');\n\treturn out;\n}\n\nfunction parse_BIFF2INT(blob) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = blob.read_shift(2);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2INT(r/*:number*/, c/*:number*/, val/*:number*/) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(2, val);\n\treturn out;\n}\n\nfunction parse_BIFF2STRING(blob) {\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, 'sbcs-cont');\n}\n\n/* TODO: convert to BIFF8 font struct */\nfunction parse_BIFF2FONTXTRA(blob, length) {\n\tblob.l += 6; // unknown\n\tblob.l += 2; // font weight \"bls\"\n\tblob.l += 1; // charset\n\tblob.l += 3; // unknown\n\tblob.l += 1; // font family\n\tblob.l += length - 13;\n}\n\n/* TODO: parse rich text runs */\nfunction parse_RString(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar cch = blob.read_shift(2);\n\tvar str = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tblob.l = end;\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n/* from js-harb (C) 2014-present  SheetJS */\nvar DBF_SUPPORTED_VERSIONS = [0x02, 0x03, 0x30, 0x31, 0x83, 0x8B, 0x8C, 0xF5];\nvar DBF = /*#__PURE__*/(function() {\nvar dbf_codepage_map = {\n\t/* Code Pages Supported by Visual FoxPro */\n\t/*::[*/0x01/*::]*/:   437,           /*::[*/0x02/*::]*/:   850,\n\t/*::[*/0x03/*::]*/:  1252,           /*::[*/0x04/*::]*/: 10000,\n\t/*::[*/0x64/*::]*/:   852,           /*::[*/0x65/*::]*/:   866,\n\t/*::[*/0x66/*::]*/:   865,           /*::[*/0x67/*::]*/:   861,\n\t/*::[*/0x68/*::]*/:   895,           /*::[*/0x69/*::]*/:   620,\n\t/*::[*/0x6A/*::]*/:   737,           /*::[*/0x6B/*::]*/:   857,\n\t/*::[*/0x78/*::]*/:   950,           /*::[*/0x79/*::]*/:   949,\n\t/*::[*/0x7A/*::]*/:   936,           /*::[*/0x7B/*::]*/:   932,\n\t/*::[*/0x7C/*::]*/:   874,           /*::[*/0x7D/*::]*/:  1255,\n\t/*::[*/0x7E/*::]*/:  1256,           /*::[*/0x96/*::]*/: 10007,\n\t/*::[*/0x97/*::]*/: 10029,           /*::[*/0x98/*::]*/: 10006,\n\t/*::[*/0xC8/*::]*/:  1250,           /*::[*/0xC9/*::]*/:  1251,\n\t/*::[*/0xCA/*::]*/:  1254,           /*::[*/0xCB/*::]*/:  1253,\n\n\t/* shapefile DBF extension */\n\t/*::[*/0x00/*::]*/: 20127,           /*::[*/0x08/*::]*/:   865,\n\t/*::[*/0x09/*::]*/:   437,           /*::[*/0x0A/*::]*/:   850,\n\t/*::[*/0x0B/*::]*/:   437,           /*::[*/0x0D/*::]*/:   437,\n\t/*::[*/0x0E/*::]*/:   850,           /*::[*/0x0F/*::]*/:   437,\n\t/*::[*/0x10/*::]*/:   850,           /*::[*/0x11/*::]*/:   437,\n\t/*::[*/0x12/*::]*/:   850,           /*::[*/0x13/*::]*/:   932,\n\t/*::[*/0x14/*::]*/:   850,           /*::[*/0x15/*::]*/:   437,\n\t/*::[*/0x16/*::]*/:   850,           /*::[*/0x17/*::]*/:   865,\n\t/*::[*/0x18/*::]*/:   437,           /*::[*/0x19/*::]*/:   437,\n\t/*::[*/0x1A/*::]*/:   850,           /*::[*/0x1B/*::]*/:   437,\n\t/*::[*/0x1C/*::]*/:   863,           /*::[*/0x1D/*::]*/:   850,\n\t/*::[*/0x1F/*::]*/:   852,           /*::[*/0x22/*::]*/:   852,\n\t/*::[*/0x23/*::]*/:   852,           /*::[*/0x24/*::]*/:   860,\n\t/*::[*/0x25/*::]*/:   850,           /*::[*/0x26/*::]*/:   866,\n\t/*::[*/0x37/*::]*/:   850,           /*::[*/0x40/*::]*/:   852,\n\t/*::[*/0x4D/*::]*/:   936,           /*::[*/0x4E/*::]*/:   949,\n\t/*::[*/0x4F/*::]*/:   950,           /*::[*/0x50/*::]*/:   874,\n\t/*::[*/0x57/*::]*/:  1252,           /*::[*/0x58/*::]*/:  1252,\n\t/*::[*/0x59/*::]*/:  1252,           /*::[*/0x6C/*::]*/:   863,\n\t/*::[*/0x86/*::]*/:   737,           /*::[*/0x87/*::]*/:   852,\n\t/*::[*/0x88/*::]*/:   857,           /*::[*/0xCC/*::]*/:  1257,\n\n\t/*::[*/0xFF/*::]*/: 16969\n};\nvar dbf_reverse_map = evert({\n\t/*::[*/0x01/*::]*/:   437,           /*::[*/0x02/*::]*/:   850,\n\t/*::[*/0x03/*::]*/:  1252,           /*::[*/0x04/*::]*/: 10000,\n\t/*::[*/0x64/*::]*/:   852,           /*::[*/0x65/*::]*/:   866,\n\t/*::[*/0x66/*::]*/:   865,           /*::[*/0x67/*::]*/:   861,\n\t/*::[*/0x68/*::]*/:   895,           /*::[*/0x69/*::]*/:   620,\n\t/*::[*/0x6A/*::]*/:   737,           /*::[*/0x6B/*::]*/:   857,\n\t/*::[*/0x78/*::]*/:   950,           /*::[*/0x79/*::]*/:   949,\n\t/*::[*/0x7A/*::]*/:   936,           /*::[*/0x7B/*::]*/:   932,\n\t/*::[*/0x7C/*::]*/:   874,           /*::[*/0x7D/*::]*/:  1255,\n\t/*::[*/0x7E/*::]*/:  1256,           /*::[*/0x96/*::]*/: 10007,\n\t/*::[*/0x97/*::]*/: 10029,           /*::[*/0x98/*::]*/: 10006,\n\t/*::[*/0xC8/*::]*/:  1250,           /*::[*/0xC9/*::]*/:  1251,\n\t/*::[*/0xCA/*::]*/:  1254,           /*::[*/0xCB/*::]*/:  1253,\n\t/*::[*/0x00/*::]*/: 20127\n});\n/* TODO: find an actual specification */\nfunction dbf_to_aoa(buf, opts)/*:AOA*/ {\n\tvar out/*:AOA*/ = [];\n\tvar d/*:Block*/ = (new_raw_buf(1)/*:any*/);\n\tswitch(opts.type) {\n\t\tcase 'base64': d = s2a(Base64_decode(buf)); break;\n\t\tcase 'binary': d = s2a(buf); break;\n\t\tcase 'buffer':\n\t\tcase 'array': d = buf; break;\n\t}\n\tprep_blob(d, 0);\n\n\t/* header */\n\tvar ft = d.read_shift(1);\n\tvar memo = !!(ft & 0x88);\n\tvar vfp = false, l7 = false;\n\tswitch(ft) {\n\t\tcase 0x02: break; // dBASE II\n\t\tcase 0x03: break; // dBASE III\n\t\tcase 0x30: vfp = true; memo = true; break; // VFP\n\t\tcase 0x31: vfp = true; memo = true; break; // VFP with autoincrement\n\t\t// 0x43 dBASE IV SQL table files\n\t\t// 0x63 dBASE IV SQL system files\n\t\tcase 0x83: break; // dBASE III with memo\n\t\tcase 0x8B: break; // dBASE IV with memo\n\t\tcase 0x8C: l7 = true; break; // dBASE Level 7 with memo\n\t\t// case 0xCB dBASE IV SQL table files with memo\n\t\tcase 0xF5: break; // FoxPro 2.x with memo\n\t\t// case 0xFB FoxBASE\n\t\tdefault: throw new Error(\"DBF Unsupported Version: \" + ft.toString(16));\n\t}\n\n\tvar nrow = 0, fpos = 0x0209;\n\tif(ft == 0x02) nrow = d.read_shift(2);\n\td.l += 3; // dBASE II stores DDMMYY date, others use YYMMDD\n\tif(ft != 0x02) nrow = d.read_shift(4);\n\tif(nrow > 1048576) nrow = 1e6;\n\n\tif(ft != 0x02) fpos = d.read_shift(2); // header length\n\tvar rlen = d.read_shift(2); // record length\n\n\tvar /*flags = 0,*/ current_cp = opts.codepage || 1252;\n\tif(ft != 0x02) { // 20 reserved bytes\n\t\td.l+=16;\n\t\t/*flags = */d.read_shift(1);\n\t\t//if(memo && ((flags & 0x02) === 0)) throw new Error(\"DBF Flags \" + flags.toString(16) + \" ft \" + ft.toString(16));\n\n\t\t/* codepage present in FoxPro and dBASE Level 7 */\n\t\tif(d[d.l] !== 0) current_cp = dbf_codepage_map[d[d.l]];\n\t\td.l+=1;\n\n\t\td.l+=2;\n\t}\n\tif(l7) d.l += 36; // Level 7: 32 byte \"Language driver name\", 4 byte reserved\n\n/*:: type DBFField = { name:string; len:number; type:string; } */\n\tvar fields/*:Array<DBFField>*/ = [], field/*:DBFField*/ = ({}/*:any*/);\n\tvar hend = Math.min(d.length, (ft == 0x02 ? 0x209 : (fpos - 10 - (vfp ? 264 : 0))));\n\tvar ww = l7 ? 32 : 11;\n\twhile(d.l < hend && d[d.l] != 0x0d) {\n\t\tfield = ({}/*:any*/);\n\t\tfield.name = $cptable.utils.decode(current_cp, d.slice(d.l, d.l+ww)).replace(/[\\u0000\\r\\n].*$/g,\"\");\n\t\td.l += ww;\n\t\tfield.type = String.fromCharCode(d.read_shift(1));\n\t\tif(ft != 0x02 && !l7) field.offset = d.read_shift(4);\n\t\tfield.len = d.read_shift(1);\n\t\tif(ft == 0x02) field.offset = d.read_shift(2);\n\t\tfield.dec = d.read_shift(1);\n\t\tif(field.name.length) fields.push(field);\n\t\tif(ft != 0x02) d.l += l7 ? 13 : 14;\n\t\tswitch(field.type) {\n\t\t\tcase 'B': // Double (VFP) / Binary (dBASE L7)\n\t\t\t\tif((!vfp || field.len != 8) && opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase 'G': // General (FoxPro and dBASE L7)\n\t\t\tcase 'P': // Picture (FoxPro and dBASE L7)\n\t\t\t\tif(opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase '+': // Autoincrement (dBASE L7 only)\n\t\t\tcase '0': // _NullFlags (VFP only)\n\t\t\tcase '@': // Timestamp (dBASE L7 only)\n\t\t\tcase 'C': // Character (dBASE II)\n\t\t\tcase 'D': // Date (dBASE III)\n\t\t\tcase 'F': // Float (dBASE IV)\n\t\t\tcase 'I': // Long (VFP and dBASE L7)\n\t\t\tcase 'L': // Logical (dBASE II)\n\t\t\tcase 'M': // Memo (dBASE III)\n\t\t\tcase 'N': // Number (dBASE II)\n\t\t\tcase 'O': // Double (dBASE L7 only)\n\t\t\tcase 'T': // Datetime (VFP only)\n\t\t\tcase 'Y': // Currency (VFP only)\n\t\t\t\tbreak;\n\t\t\tdefault: throw new Error('Unknown Field Type: ' + field.type);\n\t\t}\n\t}\n\n\tif(d[d.l] !== 0x0D) d.l = fpos-1;\n\tif(d.read_shift(1) !== 0x0D) throw new Error(\"DBF Terminator not found \" + d.l + \" \" + d[d.l]);\n\td.l = fpos;\n\n\t/* data */\n\tvar R = 0, C = 0;\n\tout[0] = [];\n\tfor(C = 0; C != fields.length; ++C) out[0][C] = fields[C].name;\n\twhile(nrow-- > 0) {\n\t\tif(d[d.l] === 0x2A) {\n\t\t\t// TODO: record marked as deleted -- create a hidden row?\n\t\t\td.l+=rlen;\n\t\t\tcontinue;\n\t\t}\n\t\t++d.l;\n\t\tout[++R] = []; C = 0;\n\t\tfor(C = 0; C != fields.length; ++C) {\n\t\t\tvar dd = d.slice(d.l, d.l+fields[C].len); d.l+=fields[C].len;\n\t\t\tprep_blob(dd, 0);\n\t\t\tvar s = $cptable.utils.decode(current_cp, dd);\n\t\t\tswitch(fields[C].type) {\n\t\t\t\tcase 'C':\n\t\t\t\t\t// NOTE: it is conventional to write '  /  /  ' for empty dates\n\t\t\t\t\tif(s.trim().length) out[R][C] = s.replace(/\\s+$/,\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'D':\n\t\t\t\t\tif(s.length === 8) out[R][C] = new Date(+s.slice(0,4), +s.slice(4,6)-1, +s.slice(6,8));\n\t\t\t\t\telse out[R][C] = s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'F': out[R][C] = parseFloat(s.trim()); break;\n\t\t\t\tcase '+': case 'I': out[R][C] = l7 ? dd.read_shift(-4, 'i') ^ 0x80000000 : dd.read_shift(4, 'i'); break;\n\t\t\t\tcase 'L': switch(s.trim().toUpperCase()) {\n\t\t\t\t\tcase 'Y': case 'T': out[R][C] = true; break;\n\t\t\t\t\tcase 'N': case 'F': out[R][C] = false; break;\n\t\t\t\t\tcase '': case '?': break;\n\t\t\t\t\tdefault: throw new Error(\"DBF Unrecognized L:|\" + s + \"|\");\n\t\t\t\t\t} break;\n\t\t\t\tcase 'M': /* TODO: handle memo files */\n\t\t\t\t\tif(!memo) throw new Error(\"DBF Unexpected MEMO for type \" + ft.toString(16));\n\t\t\t\t\tout[R][C] = \"##MEMO##\" + (l7 ? parseInt(s.trim(), 10): dd.read_shift(4));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'N':\n\t\t\t\t\ts = s.replace(/\\u0000/g,\"\").trim();\n\t\t\t\t\t// NOTE: dBASE II interprets \"  .  \" as 0\n\t\t\t\t\tif(s && s != \".\") out[R][C] = +s || 0; break;\n\t\t\t\tcase '@':\n\t\t\t\t\t// NOTE: dBASE specs appear to be incorrect\n\t\t\t\t\tout[R][C] = new Date(dd.read_shift(-8, 'f') - 0x388317533400);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'T': out[R][C] = new Date((dd.read_shift(4) - 0x253D8C) * 0x5265C00 + dd.read_shift(4)); break;\n\t\t\t\tcase 'Y': out[R][C] = dd.read_shift(4,'i')/1e4 + (dd.read_shift(4, 'i')/1e4)*Math.pow(2,32); break;\n\t\t\t\tcase 'O': out[R][C] = -dd.read_shift(-8, 'f'); break;\n\t\t\t\tcase 'B': if(vfp && fields[C].len == 8) { out[R][C] = dd.read_shift(8,'f'); break; }\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'G': case 'P': dd.l += fields[C].len; break;\n\t\t\t\tcase '0':\n\t\t\t\t\tif(fields[C].name === '_NullFlags') break;\n\t\t\t\t\t/* falls through */\n\t\t\t\tdefault: throw new Error(\"DBF Unsupported data type \" + fields[C].type);\n\t\t\t}\n\t\t}\n\t}\n\tif(ft != 0x02) if(d.l < d.length && d[d.l++] != 0x1A) throw new Error(\"DBF EOF Marker missing \" + (d.l-1) + \" of \" + d.length + \" \" + d[d.l-1].toString(16));\n\tif(opts && opts.sheetRows) out = out.slice(0, opts.sheetRows);\n\topts.DBF = fields;\n\treturn out;\n}\n\nfunction dbf_to_sheet(buf, opts)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tif(!o.dateNF) o.dateNF = \"yyyymmdd\";\n\tvar ws = aoa_to_sheet(dbf_to_aoa(buf, o), o);\n\tws[\"!cols\"] = o.DBF.map(function(field) { return {\n\t\twch: field.len,\n\t\tDBF: field\n\t};});\n\tdelete o.DBF;\n\treturn ws;\n}\n\nfunction dbf_to_workbook(buf, opts)/*:Workbook*/ {\n\ttry { return sheet_to_workbook(dbf_to_sheet(buf, opts), opts); }\n\tcatch(e) { if(opts && opts.WTF) throw e; }\n\treturn ({SheetNames:[],Sheets:{}});\n}\n\nvar _RLEN = { 'B': 8, 'C': 250, 'L': 1, 'D': 8, '?': 0, '': 0 };\nfunction sheet_to_dbf(ws/*:Worksheet*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\tif(o.type == \"string\") throw new Error(\"Cannot write DBF to JS string\");\n\tvar ba = buf_array();\n\tvar aoa/*:AOA*/ = sheet_to_json(ws, {header:1, raw:true, cellDates:true});\n\tvar headers = aoa[0], data = aoa.slice(1), cols = ws[\"!cols\"] || [];\n\tvar i = 0, j = 0, hcnt = 0, rlen = 1;\n\tfor(i = 0; i < headers.length; ++i) {\n\t\tif(((cols[i]||{}).DBF||{}).name) { headers[i] = cols[i].DBF.name; ++hcnt; continue; }\n\t\tif(headers[i] == null) continue;\n\t\t++hcnt;\n\t\tif(typeof headers[i] === 'number') headers[i] = headers[i].toString(10);\n\t\tif(typeof headers[i] !== 'string') throw new Error(\"DBF Invalid column name \" + headers[i] + \" |\" + (typeof headers[i]) + \"|\");\n\t\tif(headers.indexOf(headers[i]) !== i) for(j=0; j<1024;++j)\n\t\t\tif(headers.indexOf(headers[i] + \"_\" + j) == -1) { headers[i] += \"_\" + j; break; }\n\t}\n\tvar range = safe_decode_range(ws['!ref']);\n\tvar coltypes/*:Array<string>*/ = [];\n\tvar colwidths/*:Array<number>*/ = [];\n\tvar coldecimals/*:Array<number>*/ = [];\n\tfor(i = 0; i <= range.e.c - range.s.c; ++i) {\n\t\tvar guess = '', _guess = '', maxlen = 0;\n\t\tvar col/*:Array<any>*/ = [];\n\t\tfor(j=0; j < data.length; ++j) {\n\t\t\tif(data[j][i] != null) col.push(data[j][i]);\n\t\t}\n\t\tif(col.length == 0 || headers[i] == null) { coltypes[i] = '?'; continue; }\n\t\tfor(j = 0; j < col.length; ++j) {\n\t\t\tswitch(typeof col[j]) {\n\t\t\t\t/* TODO: check if L2 compat is desired */\n\t\t\t\tcase 'number': _guess = 'B'; break;\n\t\t\t\tcase 'string': _guess = 'C'; break;\n\t\t\t\tcase 'boolean': _guess = 'L'; break;\n\t\t\t\tcase 'object': _guess = col[j] instanceof Date ? 'D' : 'C'; break;\n\t\t\t\tdefault: _guess = 'C';\n\t\t\t}\n\t\t\tmaxlen = Math.max(maxlen, String(col[j]).length);\n\t\t\tguess = guess && guess != _guess ? 'C' : _guess;\n\t\t\t//if(guess == 'C') break;\n\t\t}\n\t\tif(maxlen > 250) maxlen = 250;\n\t\t_guess = ((cols[i]||{}).DBF||{}).type;\n\t\t/* TODO: more fine grained control over DBF type resolution */\n\t\tif(_guess == 'C') {\n\t\t\tif(cols[i].DBF.len > maxlen) maxlen = cols[i].DBF.len;\n\t\t}\n\t\tif(guess == 'B' && _guess == 'N') {\n\t\t\tguess = 'N';\n\t\t\tcoldecimals[i] = cols[i].DBF.dec;\n\t\t\tmaxlen = cols[i].DBF.len;\n\t\t}\n\t\tcolwidths[i] = guess == 'C' || _guess == 'N' ? maxlen : (_RLEN[guess] || 0);\n\t\trlen += colwidths[i];\n\t\tcoltypes[i] = guess;\n\t}\n\n\tvar h = ba.next(32);\n\th.write_shift(4, 0x13021130);\n\th.write_shift(4, data.length);\n\th.write_shift(2, 296 + 32 * hcnt);\n\th.write_shift(2, rlen);\n\tfor(i=0; i < 4; ++i) h.write_shift(4, 0);\n\th.write_shift(4, 0x00000000 | ((+dbf_reverse_map[/*::String(*/current_ansi/*::)*/] || 0x03)<<8));\n\n\tfor(i = 0, j = 0; i < headers.length; ++i) {\n\t\tif(headers[i] == null) continue;\n\t\tvar hf = ba.next(32);\n\t\tvar _f = (headers[i].slice(-10) + \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\").slice(0, 11);\n\t\thf.write_shift(1, _f, \"sbcs\");\n\t\thf.write_shift(1, coltypes[i] == '?' ? 'C' : coltypes[i], \"sbcs\");\n\t\thf.write_shift(4, j);\n\t\thf.write_shift(1, colwidths[i] || _RLEN[coltypes[i]] || 0);\n\t\thf.write_shift(1, coldecimals[i] || 0);\n\t\thf.write_shift(1, 0x02);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(1, 0);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(4, 0);\n\t\tj += (colwidths[i] || _RLEN[coltypes[i]] || 0);\n\t}\n\n\tvar hb = ba.next(264);\n\thb.write_shift(4, 0x0000000D);\n\tfor(i=0; i < 65;++i) hb.write_shift(4, 0x00000000);\n\tfor(i=0; i < data.length; ++i) {\n\t\tvar rout = ba.next(rlen);\n\t\trout.write_shift(1, 0);\n\t\tfor(j=0; j<headers.length; ++j) {\n\t\t\tif(headers[j] == null) continue;\n\t\t\tswitch(coltypes[j]) {\n\t\t\t\tcase 'L': rout.write_shift(1, data[i][j] == null ? 0x3F : data[i][j] ? 0x54 : 0x46); break;\n\t\t\t\tcase 'B': rout.write_shift(8, data[i][j]||0, 'f'); break;\n\t\t\t\tcase 'N':\n\t\t\t\t\tvar _n = \"0\";\n\t\t\t\t\tif(typeof data[i][j] == \"number\") _n = data[i][j].toFixed(coldecimals[j]||0);\n\t\t\t\t\tfor(hcnt=0; hcnt < colwidths[j]-_n.length; ++hcnt) rout.write_shift(1, 0x20);\n\t\t\t\t\trout.write_shift(1, _n, \"sbcs\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'D':\n\t\t\t\t\tif(!data[i][j]) rout.write_shift(8, \"00000000\", \"sbcs\");\n\t\t\t\t\telse {\n\t\t\t\t\t\trout.write_shift(4, (\"0000\"+data[i][j].getFullYear()).slice(-4), \"sbcs\");\n\t\t\t\t\t\trout.write_shift(2, (\"00\"+(data[i][j].getMonth()+1)).slice(-2), \"sbcs\");\n\t\t\t\t\t\trout.write_shift(2, (\"00\"+data[i][j].getDate()).slice(-2), \"sbcs\");\n\t\t\t\t\t} break;\n\t\t\t\tcase 'C':\n\t\t\t\t\tvar _s = String(data[i][j] != null ? data[i][j] : \"\").slice(0, colwidths[j]);\n\t\t\t\t\trout.write_shift(1, _s, \"sbcs\");\n\t\t\t\t\tfor(hcnt=0; hcnt < colwidths[j]-_s.length; ++hcnt) rout.write_shift(1, 0x20); break;\n\t\t\t}\n\t\t}\n\t\t// data\n\t}\n\tba.next(1).write_shift(1, 0x1A);\n\treturn ba.end();\n}\n\treturn {\n\t\tto_workbook: dbf_to_workbook,\n\t\tto_sheet: dbf_to_sheet,\n\t\tfrom_sheet: sheet_to_dbf\n\t};\n})();\n\nvar SYLK = /*#__PURE__*/(function() {\n\t/* TODO: stress test sequences */\n\tvar sylk_escapes = ({\n\t\tAA:'À', BA:'Á', CA:'Â', DA:195, HA:'Ä', JA:197,\n\t\tAE:'È', BE:'É', CE:'Ê',         HE:'Ë',\n\t\tAI:'Ì', BI:'Í', CI:'Î',         HI:'Ï',\n\t\tAO:'Ò', BO:'Ó', CO:'Ô', DO:213, HO:'Ö',\n\t\tAU:'Ù', BU:'Ú', CU:'Û',         HU:'Ü',\n\t\tAa:'à', Ba:'á', Ca:'â', Da:227, Ha:'ä', Ja:229,\n\t\tAe:'è', Be:'é', Ce:'ê',         He:'ë',\n\t\tAi:'ì', Bi:'í', Ci:'î',         Hi:'ï',\n\t\tAo:'ò', Bo:'ó', Co:'ô', Do:245, Ho:'ö',\n\t\tAu:'ù', Bu:'ú', Cu:'û',         Hu:'ü',\n\t\tKC:'Ç', Kc:'ç', q:'æ',  z:'œ',  a:'Æ',  j:'Œ',\n\t\tDN:209, Dn:241, Hy:255,\n\t\tS:169,  c:170,  R:174,  \"B \":180,\n\t\t/*::[*/0/*::]*/:176,    /*::[*/1/*::]*/:177,  /*::[*/2/*::]*/:178,\n\t\t/*::[*/3/*::]*/:179,    /*::[*/5/*::]*/:181,  /*::[*/6/*::]*/:182,\n\t\t/*::[*/7/*::]*/:183,    Q:185,  k:186,  b:208,  i:216,  l:222,  s:240,  y:248,\n\t\t\"!\":161, '\"':162, \"#\":163, \"(\":164, \"%\":165, \"'\":167, \"H \":168,\n\t\t\"+\":171, \";\":187, \"<\":188, \"=\":189, \">\":190, \"?\":191, \"{\":223\n\t}/*:any*/);\n\tvar sylk_char_regex = new RegExp(\"\\u001BN(\" + keys(sylk_escapes).join(\"|\").replace(/\\|\\|\\|/, \"|\\\\||\").replace(/([?()+])/g,\"\\\\$1\") + \"|\\\\|)\", \"gm\");\n\tvar sylk_char_fn = function(_, $1){ var o = sylk_escapes[$1]; return typeof o == \"number\" ? _getansi(o) : o; };\n\tvar decode_sylk_char = function($$, $1, $2) { var newcc = (($1.charCodeAt(0) - 0x20)<<4) | ($2.charCodeAt(0) - 0x30); return newcc == 59 ? $$ : _getansi(newcc); };\n\tsylk_escapes[\"|\"] = 254;\n\t/* TODO: find an actual specification */\n\tfunction sylk_to_aoa(d/*:RawData*/, opts)/*:[AOA, Worksheet]*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return sylk_to_aoa_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return sylk_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return sylk_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return sylk_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction sylk_to_aoa_str(str/*:string*/, opts)/*:[AOA, Worksheet]*/ {\n\t\tvar records = str.split(/[\\n\\r]+/), R = -1, C = -1, ri = 0, rj = 0, arr/*:AOA*/ = [];\n\t\tvar formats/*:Array<string>*/ = [];\n\t\tvar next_cell_format/*:string|null*/ = null;\n\t\tvar sht = {}, rowinfo/*:Array<RowInfo>*/ = [], colinfo/*:Array<ColInfo>*/ = [], cw/*:Array<string>*/ = [];\n\t\tvar Mval = 0, j;\n\t\tif(+opts.codepage >= 0) set_cp(+opts.codepage);\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tMval = 0;\n\t\t\tvar rstr=records[ri].trim().replace(/\\x1B([\\x20-\\x2F])([\\x30-\\x3F])/g, decode_sylk_char).replace(sylk_char_regex, sylk_char_fn);\n\t\t\tvar record=rstr.replace(/;;/g, \"\\u0000\").split(\";\").map(function(x) { return x.replace(/\\u0000/g, \";\"); });\n\t\t\tvar RT=record[0], val;\n\t\t\tif(rstr.length > 0) switch(RT) {\n\t\t\tcase 'ID': break; /* header */\n\t\t\tcase 'E': break; /* EOF */\n\t\t\tcase 'B': break; /* dimensions */\n\t\t\tcase 'O': break; /* options? */\n\t\t\tcase 'W': break; /* window? */\n\t\t\tcase 'P':\n\t\t\t\tif(record[1].charAt(0) == 'P')\n\t\t\t\t\tformats.push(rstr.slice(3).replace(/;;/g, \";\"));\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\tvar C_seen_K = false, C_seen_X = false, C_seen_S = false, C_seen_E = false, _R = -1, _C = -1;\n\t\t\tfor(rj=1; rj<record.length; ++rj) switch(record[rj].charAt(0)) {\n\t\t\t\tcase 'A': break; // TODO: comment\n\t\t\t\tcase 'X': C = parseInt(record[rj].slice(1))-1; C_seen_X = true; break;\n\t\t\t\tcase 'Y':\n\t\t\t\t\tR = parseInt(record[rj].slice(1))-1; if(!C_seen_X) C = 0;\n\t\t\t\t\tfor(j = arr.length; j <= R; ++j) arr[j] = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'K':\n\t\t\t\t\tval = record[rj].slice(1);\n\t\t\t\t\tif(val.charAt(0) === '\"') val = val.slice(1,val.length - 1);\n\t\t\t\t\telse if(val === 'TRUE') val = true;\n\t\t\t\t\telse if(val === 'FALSE') val = false;\n\t\t\t\t\telse if(!isNaN(fuzzynum(val))) {\n\t\t\t\t\t\tval = fuzzynum(val);\n\t\t\t\t\t\tif(next_cell_format !== null && fmt_is_date(next_cell_format)) val = numdate(val);\n\t\t\t\t\t} else if(!isNaN(fuzzydate(val).getDate())) {\n\t\t\t\t\t\tval = parseDate(val);\n\t\t\t\t\t}\n\t\t\t\t\tif(typeof $cptable !== 'undefined' && typeof val == \"string\" && ((opts||{}).type != \"string\") && (opts||{}).codepage) val = $cptable.utils.decode(opts.codepage, val);\n\t\t\t\t\tC_seen_K = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'E':\n\t\t\t\t\tC_seen_E = true;\n\t\t\t\t\tvar formula = rc_to_a1(record[rj].slice(1), {r:R,c:C});\n\t\t\t\t\tarr[R][C] = [arr[R][C], formula];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'S':\n\t\t\t\t\tC_seen_S = true;\n\t\t\t\t\tarr[R][C] = [arr[R][C], \"S5S\"];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'G': break; // unknown\n\t\t\t\tcase 'R': _R = parseInt(record[rj].slice(1))-1; break;\n\t\t\t\tcase 'C': _C = parseInt(record[rj].slice(1))-1; break;\n\t\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t\tif(C_seen_K) {\n\t\t\t\tif(arr[R][C] && arr[R][C].length == 2) arr[R][C][0] = val;\n\t\t\t\telse arr[R][C] = val;\n\t\t\t\tnext_cell_format = null;\n\t\t\t}\n\t\t\tif(C_seen_S) {\n\t\t\t\tif(C_seen_E) throw new Error(\"SYLK shared formula cannot have own formula\");\n\t\t\t\tvar shrbase = _R > -1 && arr[_R][_C];\n\t\t\t\tif(!shrbase || !shrbase[1]) throw new Error(\"SYLK shared formula cannot find base\");\n\t\t\t\tarr[R][C][1] = shift_formula_str(shrbase[1], {r: R - _R, c: C - _C});\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'F':\n\t\t\tvar F_seen = 0;\n\t\t\tfor(rj=1; rj<record.length; ++rj) switch(record[rj].charAt(0)) {\n\t\t\t\tcase 'X': C = parseInt(record[rj].slice(1))-1; ++F_seen; break;\n\t\t\t\tcase 'Y':\n\t\t\t\t\tR = parseInt(record[rj].slice(1))-1; /*C = 0;*/\n\t\t\t\t\tfor(j = arr.length; j <= R; ++j) arr[j] = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'M': Mval = parseInt(record[rj].slice(1)) / 20; break;\n\t\t\t\tcase 'F': break; /* ??? */\n\t\t\t\tcase 'G': break; /* hide grid */\n\t\t\t\tcase 'P':\n\t\t\t\t\tnext_cell_format = formats[parseInt(record[rj].slice(1))];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'S': break; /* cell style */\n\t\t\t\tcase 'D': break; /* column */\n\t\t\t\tcase 'N': break; /* font */\n\t\t\t\tcase 'W':\n\t\t\t\t\tcw = record[rj].slice(1).split(\" \");\n\t\t\t\t\tfor(j = parseInt(cw[0], 10); j <= parseInt(cw[1], 10); ++j) {\n\t\t\t\t\t\tMval = parseInt(cw[2], 10);\n\t\t\t\t\t\tcolinfo[j-1] = Mval === 0 ? {hidden:true}: {wch:Mval}; process_col(colinfo[j-1]);\n\t\t\t\t\t} break;\n\t\t\t\tcase 'C': /* default column format */\n\t\t\t\t\tC = parseInt(record[rj].slice(1))-1;\n\t\t\t\t\tif(!colinfo[C]) colinfo[C] = {};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'R': /* row properties */\n\t\t\t\t\tR = parseInt(record[rj].slice(1))-1;\n\t\t\t\t\tif(!rowinfo[R]) rowinfo[R] = {};\n\t\t\t\t\tif(Mval > 0) { rowinfo[R].hpt = Mval; rowinfo[R].hpx = pt2px(Mval); }\n\t\t\t\t\telse if(Mval === 0) rowinfo[R].hidden = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t\tif(F_seen < 1) next_cell_format = null; break;\n\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t}\n\t\tif(rowinfo.length > 0) sht['!rows'] = rowinfo;\n\t\tif(colinfo.length > 0) sht['!cols'] = colinfo;\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn [arr, sht];\n\t}\n\n\tfunction sylk_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tvar aoasht = sylk_to_aoa(d, opts);\n\t\tvar aoa = aoasht[0], ws = aoasht[1];\n\t\tvar o = aoa_to_sheet(aoa, opts);\n\t\tkeys(ws).forEach(function(k) { o[k] = ws[k]; });\n\t\treturn o;\n\t}\n\n\tfunction sylk_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(sylk_to_sheet(d, opts), opts); }\n\n\tfunction write_ws_cell_sylk(cell/*:Cell*/, ws/*:Worksheet*/, R/*:number*/, C/*:number*//*::, opts*/)/*:string*/ {\n\t\tvar o = \"C;Y\" + (R+1) + \";X\" + (C+1) + \";K\";\n\t\tswitch(cell.t) {\n\t\t\tcase 'n':\n\t\t\t\to += (cell.v||0);\n\t\t\t\tif(cell.f && !cell.F) o += \";E\" + a1_to_rc(cell.f, {r:R, c:C}); break;\n\t\t\tcase 'b': o += cell.v ? \"TRUE\" : \"FALSE\"; break;\n\t\t\tcase 'e': o += cell.w || cell.v; break;\n\t\t\tcase 'd': o += '\"' + (cell.w || cell.v) + '\"'; break;\n\t\t\tcase 's': o += '\"' + cell.v.replace(/\"/g,\"\").replace(/;/g, \";;\") + '\"'; break;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction write_ws_cols_sylk(out, cols) {\n\t\tcols.forEach(function(col, i) {\n\t\t\tvar rec = \"F;W\" + (i+1) + \" \" + (i+1) + \" \";\n\t\t\tif(col.hidden) rec += \"0\";\n\t\t\telse {\n\t\t\t\tif(typeof col.width == 'number' && !col.wpx) col.wpx = width2px(col.width);\n\t\t\t\tif(typeof col.wpx == 'number' && !col.wch) col.wch = px2char(col.wpx);\n\t\t\t\tif(typeof col.wch == 'number') rec += Math.round(col.wch);\n\t\t\t}\n\t\t\tif(rec.charAt(rec.length - 1) != \" \") out.push(rec);\n\t\t});\n\t}\n\n\tfunction write_ws_rows_sylk(out/*:Array<string>*/, rows/*:Array<RowInfo>*/) {\n\t\trows.forEach(function(row, i) {\n\t\t\tvar rec = \"F;\";\n\t\t\tif(row.hidden) rec += \"M0;\";\n\t\t\telse if(row.hpt) rec += \"M\" + 20 * row.hpt + \";\";\n\t\t\telse if(row.hpx) rec += \"M\" + 20 * px2pt(row.hpx) + \";\";\n\t\t\tif(rec.length > 2) out.push(rec + \"R\" + (i+1));\n\t\t});\n\t}\n\n\tfunction sheet_to_sylk(ws/*:Worksheet*/, opts/*:?any*/)/*:string*/ {\n\t\tvar preamble/*:Array<string>*/ = [\"ID;PWXL;N;E\"], o/*:Array<string>*/ = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tvar RS = \"\\r\\n\";\n\n\t\tpreamble.push(\"P;PGeneral\");\n\t\tpreamble.push(\"F;P0;DG0G8;M255\");\n\t\tif(ws['!cols']) write_ws_cols_sylk(preamble, ws['!cols']);\n\t\tif(ws['!rows']) write_ws_rows_sylk(preamble, ws['!rows']);\n\n\t\tpreamble.push(\"B;Y\" + (r.e.r - r.s.r + 1) + \";X\" + (r.e.c - r.s.c + 1) + \";D\" + [r.s.c,r.s.r,r.e.c,r.e.r].join(\" \"));\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || (cell.v == null && (!cell.f || cell.F))) continue;\n\t\t\t\to.push(write_ws_cell_sylk(cell, ws, R, C, opts));\n\t\t\t}\n\t\t}\n\t\treturn preamble.join(RS) + RS + o.join(RS) + RS + \"E\" + RS;\n\t}\n\n\treturn {\n\t\tto_workbook: sylk_to_workbook,\n\t\tto_sheet: sylk_to_sheet,\n\t\tfrom_sheet: sheet_to_sylk\n\t};\n})();\n\nvar DIF = /*#__PURE__*/(function() {\n\tfunction dif_to_aoa(d/*:RawData*/, opts)/*:AOA*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return dif_to_aoa_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return dif_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return dif_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return dif_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction dif_to_aoa_str(str/*:string*/, opts)/*:AOA*/ {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr/*:AOA*/ = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tif (records[ri].trim() === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\tif (R < 0) continue;\n\t\t\tvar metadata = records[ri].trim().split(\",\");\n\t\t\tvar type = metadata[0], value = metadata[1];\n\t\t\t++ri;\n\t\t\tvar data = records[ri] || \"\";\n\t\t\twhile(((data.match(/[\"]/g)||[]).length & 1) && ri < records.length - 1) data += \"\\n\" + records[++ri];\n\t\t\tdata = data.trim();\n\t\t\tswitch (+type) {\n\t\t\t\tcase -1:\n\t\t\t\t\tif (data === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\t\t\telse if (data !== 'EOD') throw new Error(\"Unrecognized DIF special command \" + data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\tif(data === 'TRUE') arr[R][C] = true;\n\t\t\t\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\t\t\t\telse if(!isNaN(fuzzynum(value))) arr[R][C] = fuzzynum(value);\n\t\t\t\t\telse if(!isNaN(fuzzydate(value).getDate())) arr[R][C] = parseDate(value);\n\t\t\t\t\telse arr[R][C] = value;\n\t\t\t\t\t++C; break;\n\t\t\t\tcase 1:\n\t\t\t\t\tdata = data.slice(1,data.length-1);\n\t\t\t\t\tdata = data.replace(/\"\"/g, '\"');\n\t\t\t\t\tif(DIF_XL && data && data.match(/^=\".*\"$/)) data = data.slice(2, -1);\n\t\t\t\t\tarr[R][C++] = data !== '' ? data : null;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (data === 'EOD') break;\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction dif_to_sheet(str/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(dif_to_aoa(str, opts), opts); }\n\tfunction dif_to_workbook(str/*:string*/, opts)/*:Workbook*/ { return sheet_to_workbook(dif_to_sheet(str, opts), opts); }\n\n\tvar sheet_to_dif = /*#__PURE__*/(function() {\n\t\tvar push_field = function pf(o/*:Array<string>*/, topic/*:string*/, v/*:number*/, n/*:number*/, s/*:string*/) {\n\t\t\to.push(topic);\n\t\t\to.push(v + \",\" + n);\n\t\t\to.push('\"' + s.replace(/\"/g,'\"\"') + '\"');\n\t\t};\n\t\tvar push_value = function po(o/*:Array<string>*/, type/*:number*/, v/*:any*/, s/*:string*/) {\n\t\t\to.push(type + \",\" + v);\n\t\t\to.push(type == 1 ? '\"' + s.replace(/\"/g,'\"\"') + '\"' : s);\n\t\t};\n\t\treturn function sheet_to_dif(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\t\tvar o/*:Array<string>*/ = [];\n\t\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tpush_field(o, \"TABLE\", 0, 1, \"sheetjs\");\n\t\t\tpush_field(o, \"VECTORS\", 0, r.e.r - r.s.r + 1,\"\");\n\t\t\tpush_field(o, \"TUPLES\", 0, r.e.c - r.s.c + 1,\"\");\n\t\t\tpush_field(o, \"DATA\", 0, 0,\"\");\n\t\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\t\tpush_value(o, -1, 0, \"BOT\");\n\t\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\t\tif(!cell) { push_value(o, 1, 0, \"\"); continue;}\n\t\t\t\t\tswitch(cell.t) {\n\t\t\t\t\t\tcase 'n':\n\t\t\t\t\t\t\tvar val = DIF_XL ? cell.w : cell.v;\n\t\t\t\t\t\t\tif(!val && cell.v != null) val = cell.v;\n\t\t\t\t\t\t\tif(val == null) {\n\t\t\t\t\t\t\t\tif(DIF_XL && cell.f && !cell.F) push_value(o, 1, 0, \"=\" + cell.f);\n\t\t\t\t\t\t\t\telse push_value(o, 1, 0, \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse push_value(o, 0, val, \"V\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tpush_value(o, 0, cell.v ? 1 : 0, cell.v ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 's':\n\t\t\t\t\t\t\tpush_value(o, 1, 0, (!DIF_XL || isNaN(cell.v)) ? cell.v : '=\"' + cell.v + '\"');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tif(!cell.w) cell.w = SSF_format(cell.z || table_fmt[14], datenum(parseDate(cell.v)));\n\t\t\t\t\t\t\tif(DIF_XL) push_value(o, 0, cell.w, \"V\");\n\t\t\t\t\t\t\telse push_value(o, 1, 0, cell.w);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: push_value(o, 1, 0, \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpush_value(o, -1, 0, \"EOD\");\n\t\t\tvar RS = \"\\r\\n\";\n\t\t\tvar oo = o.join(RS);\n\t\t\t//while((oo.length & 0x7F) != 0) oo += \"\\0\";\n\t\t\treturn oo;\n\t\t};\n\t})();\n\treturn {\n\t\tto_workbook: dif_to_workbook,\n\t\tto_sheet: dif_to_sheet,\n\t\tfrom_sheet: sheet_to_dif\n\t};\n})();\n\nvar ETH = /*#__PURE__*/(function() {\n\tfunction decode(s/*:string*/)/*:string*/ { return s.replace(/\\\\b/g,\"\\\\\").replace(/\\\\c/g,\":\").replace(/\\\\n/g,\"\\n\"); }\n\tfunction encode(s/*:string*/)/*:string*/ { return s.replace(/\\\\/g, \"\\\\b\").replace(/:/g, \"\\\\c\").replace(/\\n/g,\"\\\\n\"); }\n\n\tfunction eth_to_aoa(str/*:string*/, opts)/*:AOA*/ {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr/*:AOA*/ = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tvar record = records[ri].trim().split(\":\");\n\t\t\tif(record[0] !== 'cell') continue;\n\t\t\tvar addr = decode_cell(record[1]);\n\t\t\tif(arr.length <= addr.r) for(R = arr.length; R <= addr.r; ++R) if(!arr[R]) arr[R] = [];\n\t\t\tR = addr.r; C = addr.c;\n\t\t\tswitch(record[2]) {\n\t\t\t\tcase 't': arr[R][C] = decode(record[3]); break;\n\t\t\t\tcase 'v': arr[R][C] = +record[3]; break;\n\t\t\t\tcase 'vtf': var _f = record[record.length - 1];\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'vtc':\n\t\t\t\t\tswitch(record[3]) {\n\t\t\t\t\t\tcase 'nl': arr[R][C] = +record[4] ? true : false; break;\n\t\t\t\t\t\tdefault: arr[R][C] = +record[4]; break;\n\t\t\t\t\t}\n\t\t\t\t\tif(record[2] == 'vtf') arr[R][C] = [arr[R][C], _f];\n\t\t\t}\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction eth_to_sheet(d/*:string*/, opts)/*:Worksheet*/ { return aoa_to_sheet(eth_to_aoa(d, opts), opts); }\n\tfunction eth_to_workbook(d/*:string*/, opts)/*:Workbook*/ { return sheet_to_workbook(eth_to_sheet(d, opts), opts); }\n\n\tvar header = [\n\t\t\"socialcalc:version:1.5\",\n\t\t\"MIME-Version: 1.0\",\n\t\t\"Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave\"\n\t].join(\"\\n\");\n\n\tvar sep = [\n\t\t\"--SocialCalcSpreadsheetControlSave\",\n\t\t\"Content-type: text/plain; charset=UTF-8\"\n\t].join(\"\\n\") + \"\\n\";\n\n\t/* TODO: the other parts */\n\tvar meta = [\n\t\t\"# SocialCalc Spreadsheet Control Save\",\n\t\t\"part:sheet\"\n\t].join(\"\\n\");\n\n\tvar end = \"--SocialCalcSpreadsheetControlSave--\";\n\n\tfunction sheet_to_eth_data(ws/*:Worksheet*/)/*:string*/ {\n\t\tif(!ws || !ws['!ref']) return \"\";\n\t\tvar o/*:Array<string>*/ = [], oo/*:Array<string>*/ = [], cell, coord = \"\";\n\t\tvar r = decode_range(ws['!ref']);\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tcoord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null || cell.t === 'z') continue;\n\t\t\t\too = [\"cell\", coord, 't'];\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 's': case 'str': oo.push(encode(cell.v)); break;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tif(!cell.f) { oo[2]='v'; oo[3]=cell.v; }\n\t\t\t\t\t\telse { oo[2]='vtf'; oo[3]='n'; oo[4]=cell.v; oo[5]=encode(cell.f); }\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\too[2] = 'vt'+(cell.f?'f':'c'); oo[3]='nl'; oo[4]=cell.v?\"1\":\"0\";\n\t\t\t\t\t\too[5] = encode(cell.f||(cell.v?'TRUE':'FALSE'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tvar t = datenum(parseDate(cell.v));\n\t\t\t\t\t\too[2] = 'vtc'; oo[3] = 'nd'; oo[4] = \"\"+t;\n\t\t\t\t\t\too[5] = cell.w || SSF_format(cell.z || table_fmt[14], t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'e': continue;\n\t\t\t\t}\n\t\t\t\to.push(oo.join(\":\"));\n\t\t\t}\n\t\t}\n\t\to.push(\"sheet:c:\" + (r.e.c-r.s.c+1) + \":r:\" + (r.e.r-r.s.r+1) + \":tvf:1\");\n\t\to.push(\"valueformat:1:text-wiki\");\n\t\t//o.push(\"copiedfrom:\" + ws['!ref']); // clipboard only\n\t\treturn o.join(\"\\n\");\n\t}\n\n\tfunction sheet_to_eth(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\treturn [header, sep, meta, sep, sheet_to_eth_data(ws), end].join(\"\\n\");\n\t\t// return [\"version:1.5\", sheet_to_eth_data(ws)].join(\"\\n\"); // clipboard form\n\t}\n\n\treturn {\n\t\tto_workbook: eth_to_workbook,\n\t\tto_sheet: eth_to_sheet,\n\t\tfrom_sheet: sheet_to_eth\n\t};\n})();\n\nvar PRN = /*#__PURE__*/(function() {\n\tfunction set_text_arr(data/*:string*/, arr/*:AOA*/, R/*:number*/, C/*:number*/, o/*:any*/) {\n\t\tif(o.raw) arr[R][C] = data;\n\t\telse if(data === \"\"){/* empty */}\n\t\telse if(data === 'TRUE') arr[R][C] = true;\n\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\telse if(!isNaN(fuzzynum(data))) arr[R][C] = fuzzynum(data);\n\t\telse if(!isNaN(fuzzydate(data).getDate())) arr[R][C] = parseDate(data);\n\t\telse arr[R][C] = data;\n\t}\n\n\tfunction prn_to_aoa_str(f/*:string*/, opts)/*:AOA*/ {\n\t\tvar o = opts || {};\n\t\tvar arr/*:AOA*/ = ([]/*:any*/);\n\t\tif(!f || f.length === 0) return arr;\n\t\tvar lines = f.split(/[\\r\\n]/);\n\t\tvar L = lines.length - 1;\n\t\twhile(L >= 0 && lines[L].length === 0) --L;\n\t\tvar start = 10, idx = 0;\n\t\tvar R = 0;\n\t\tfor(; R <= L; ++R) {\n\t\t\tidx = lines[R].indexOf(\" \");\n\t\t\tif(idx == -1) idx = lines[R].length; else idx++;\n\t\t\tstart = Math.max(start, idx);\n\t\t}\n\t\tfor(R = 0; R <= L; ++R) {\n\t\t\tarr[R] = [];\n\t\t\t/* TODO: confirm that widths are always 10 */\n\t\t\tvar C = 0;\n\t\t\tset_text_arr(lines[R].slice(0, start).trim(), arr, R, C, o);\n\t\t\tfor(C = 1; C <= (lines[R].length - start)/10 + 1; ++C)\n\t\t\t\tset_text_arr(lines[R].slice(start+(C-1)*10,start+C*10).trim(),arr,R,C,o);\n\t\t}\n\t\tif(o.sheetRows) arr = arr.slice(0, o.sheetRows);\n\t\treturn arr;\n\t}\n\n\t// List of accepted CSV separators\n\tvar guess_seps = {\n\t\t/*::[*/0x2C/*::]*/: ',',\n\t\t/*::[*/0x09/*::]*/: \"\\t\",\n\t\t/*::[*/0x3B/*::]*/: ';',\n\t\t/*::[*/0x7C/*::]*/: '|'\n\t};\n\n\t// CSV separator weights to be used in case of equal numbers\n\tvar guess_sep_weights = {\n\t\t/*::[*/0x2C/*::]*/: 3,\n\t\t/*::[*/0x09/*::]*/: 2,\n\t\t/*::[*/0x3B/*::]*/: 1,\n\t\t/*::[*/0x7C/*::]*/: 0\n\t};\n\n\tfunction guess_sep(str) {\n\t\tvar cnt = {}, instr = false, end = 0, cc = 0;\n\t\tfor(;end < str.length;++end) {\n\t\t\tif((cc=str.charCodeAt(end)) == 0x22) instr = !instr;\n\t\t\telse if(!instr && cc in guess_seps) cnt[cc] = (cnt[cc]||0)+1;\n\t\t}\n\n\t\tcc = [];\n\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\tcc.push([ cnt[end], end ]);\n\t\t}\n\n\t\tif ( !cc.length ) {\n\t\t\tcnt = guess_sep_weights;\n\t\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\t\tcc.push([ cnt[end], end ]);\n\t\t\t}\n\t\t}\n\n\t\tcc.sort(function(a, b) { return a[0] - b[0] || guess_sep_weights[a[1]] - guess_sep_weights[b[1]]; });\n\n\t\treturn guess_seps[cc.pop()[1]] || 0x2C;\n\t}\n\n\tfunction dsv_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tvar o = opts || {};\n\t\tvar sep = \"\";\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar ws/*:Worksheet*/ = o.dense ? ([]/*:any*/) : ({}/*:any*/);\n\t\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:0, r:0}}/*:any*/);\n\n\t\tif(str.slice(0,4) == \"sep=\") {\n\t\t\t// If the line ends in \\r\\n\n\t\t\tif(str.charCodeAt(5) == 13 && str.charCodeAt(6) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(7);\n\t\t\t}\n\t\t\t// If line ends in \\r OR \\n\n\t\t\telse if(str.charCodeAt(5) == 13 || str.charCodeAt(5) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(6);\n\t\t\t}\n\t\t\telse sep = guess_sep(str.slice(0,1024));\n\t\t}\n\t\telse if(o && o.FS) sep = o.FS;\n\t\telse sep = guess_sep(str.slice(0,1024));\n\t\tvar R = 0, C = 0, v = 0;\n\t\tvar start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc=0, startcc=str.charCodeAt(0);\n\t\tstr = str.replace(/\\r\\n/mg, \"\\n\");\n\t\tvar _re/*:?RegExp*/ = o.dateNF != null ? dateNF_regex(o.dateNF) : null;\n\t\tfunction finish_cell() {\n\t\t\tvar s = str.slice(start, end);\n\t\t\tvar cell = ({}/*:any*/);\n\t\t\tif(s.charAt(0) == '\"' && s.charAt(s.length - 1) == '\"') s = s.slice(1,-1).replace(/\"\"/g,'\"');\n\t\t\tif(s.length === 0) cell.t = 'z';\n\t\t\telse if(o.raw) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.trim().length === 0) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.charCodeAt(0) == 0x3D) {\n\t\t\t\tif(s.charCodeAt(1) == 0x22 && s.charCodeAt(s.length - 1) == 0x22) { cell.t = 's'; cell.v = s.slice(2,-1).replace(/\"\"/g,'\"'); }\n\t\t\t\telse if(fuzzyfmla(s)) { cell.t = 'n'; cell.f = s.slice(1); }\n\t\t\t\telse { cell.t = 's'; cell.v = s; } }\n\t\t\telse if(s == \"TRUE\") { cell.t = 'b'; cell.v = true; }\n\t\t\telse if(s == \"FALSE\") { cell.t = 'b'; cell.v = false; }\n\t\t\telse if(!isNaN(v = fuzzynum(s))) { cell.t = 'n'; if(o.cellText !== false) cell.w = s; cell.v = v; }\n\t\t\telse if(!isNaN(fuzzydate(s).getDate()) || _re && s.match(_re)) {\n\t\t\t\tcell.z = o.dateNF || table_fmt[14];\n\t\t\t\tvar k = 0;\n\t\t\t\tif(_re && s.match(_re)){ s=dateNF_fix(s, o.dateNF, (s.match(_re)||[])); k=1; }\n\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.v = parseDate(s, k); }\n\t\t\t\telse { cell.t = 'n'; cell.v = datenum(parseDate(s, k)); }\n\t\t\t\tif(o.cellText !== false) cell.w = SSF_format(cell.z, cell.v instanceof Date ? datenum(cell.v):cell.v);\n\t\t\t\tif(!o.cellNF) delete cell.z;\n\t\t\t} else {\n\t\t\t\tcell.t = 's';\n\t\t\t\tcell.v = s;\n\t\t\t}\n\t\t\tif(cell.t == 'z'){}\n\t\t\telse if(o.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = cell; }\n\t\t\telse ws[encode_cell({c:C,r:R})] = cell;\n\t\t\tstart = end+1; startcc = str.charCodeAt(start);\n\t\t\tif(range.e.c < C) range.e.c = C;\n\t\t\tif(range.e.r < R) range.e.r = R;\n\t\t\tif(cc == sepcc) ++C; else { C = 0; ++R; if(o.sheetRows && o.sheetRows <= R) return true; }\n\t\t}\n\t\touter: for(;end < str.length;++end) switch((cc=str.charCodeAt(end))) {\n\t\t\tcase 0x22: if(startcc === 0x22) instr = !instr; break;\n\t\t\tcase sepcc: case 0x0a: case 0x0d: if(!instr && finish_cell()) break outer; break;\n\t\t\tdefault: break;\n\t\t}\n\t\tif(end - start > 0) finish_cell();\n\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction prn_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tif(!(opts && opts.PRN)) return dsv_to_sheet_str(str, opts);\n\t\tif(opts.FS) return dsv_to_sheet_str(str, opts);\n\t\tif(str.slice(0,4) == \"sep=\") return dsv_to_sheet_str(str, opts);\n\t\tif(str.indexOf(\"\\t\") >= 0 || str.indexOf(\",\") >= 0 || str.indexOf(\";\") >= 0) return dsv_to_sheet_str(str, opts);\n\t\treturn aoa_to_sheet(prn_to_aoa_str(str, opts), opts);\n\t}\n\n\tfunction prn_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tvar str = \"\", bytes = opts.type == 'string' ? [0,0,0,0] : firstbyte(d, opts);\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': str = Base64_decode(d); break;\n\t\t\tcase 'binary': str = d; break;\n\t\t\tcase 'buffer':\n\t\t\t\tif(opts.codepage == 65001) str = d.toString('utf8'); // TODO: test if buf\n\t\t\t\telse if(opts.codepage && typeof $cptable !== 'undefined') str = $cptable.utils.decode(opts.codepage, d);\n\t\t\t\telse str = has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d);\n\t\t\t\tbreak;\n\t\t\tcase 'array': str = cc2str(d); break;\n\t\t\tcase 'string': str = d; break;\n\t\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t\t}\n\t\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str.slice(3));\n\t\telse if(opts.type != 'string' && opts.type != 'buffer' && opts.codepage == 65001) str = utf8read(str);\n\t\telse if((opts.type == 'binary') && typeof $cptable !== 'undefined' && opts.codepage)  str = $cptable.utils.decode(opts.codepage, $cptable.utils.encode(28591,str));\n\t\tif(str.slice(0,19) == \"socialcalc:version:\") return ETH.to_sheet(opts.type == 'string' ? str : utf8read(str), opts);\n\t\treturn prn_to_sheet_str(str, opts);\n\t}\n\n\tfunction prn_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(prn_to_sheet(d, opts), opts); }\n\n\tfunction sheet_to_prn(ws/*:Worksheet*//*::, opts:?any*/)/*:string*/ {\n\t\tvar o/*:Array<string>*/ = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tvar oo/*:Array<string>*/ = [];\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null) { oo.push(\"          \"); continue; }\n\t\t\t\tvar w = (cell.w || (format_cell(cell), cell.w) || \"\").slice(0,10);\n\t\t\t\twhile(w.length < 10) w += \" \";\n\t\t\t\too.push(w + (C === 0 ? \" \" : \"\"));\n\t\t\t}\n\t\t\to.push(oo.join(\"\"));\n\t\t}\n\t\treturn o.join(\"\\n\");\n\t}\n\n\treturn {\n\t\tto_workbook: prn_to_workbook,\n\t\tto_sheet: prn_to_sheet,\n\t\tfrom_sheet: sheet_to_prn\n\t};\n})();\n\n/* Excel defaults to SYLK but warns if data is not valid */\nfunction read_wb_ID(d, opts) {\n\tvar o = opts || {}, OLD_WTF = !!o.WTF; o.WTF = true;\n\ttry {\n\t\tvar out = SYLK.to_workbook(d, o);\n\t\to.WTF = OLD_WTF;\n\t\treturn out;\n\t} catch(e) {\n\t\to.WTF = OLD_WTF;\n\t\tif(!e.message.match(/SYLK bad record ID/) && OLD_WTF) throw e;\n\t\treturn PRN.to_workbook(d, opts);\n\t}\n}\n\nvar WK_ = /*#__PURE__*/(function() {\n\tfunction lotushopper(data, cb/*:RecordHopperCB*/, opts/*:any*/) {\n\t\tif(!data) return;\n\t\tprep_blob(data, data.l || 0);\n\t\tvar Enum = opts.Enum || WK1Enum;\n\t\twhile(data.l < data.length) {\n\t\t\tvar RT = data.read_shift(2);\n\t\t\tvar R = Enum[RT] || Enum[0xFFFF];\n\t\t\tvar length = data.read_shift(2);\n\t\t\tvar tgt = data.l + length;\n\t\t\tvar d = R.f && R.f(data, length, opts);\n\t\t\tdata.l = tgt;\n\t\t\tif(cb(d, R, RT)) return;\n\t\t}\n\t}\n\n\tfunction lotus_to_workbook(d/*:RawData*/, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return lotus_to_workbook_buf(s2a(Base64_decode(d)), opts);\n\t\t\tcase 'binary': return lotus_to_workbook_buf(s2a(d), opts);\n\t\t\tcase 'buffer':\n\t\t\tcase 'array': return lotus_to_workbook_buf(d, opts);\n\t\t}\n\t\tthrow \"Unsupported type \" + opts.type;\n\t}\n\n\tfunction lotus_to_workbook_buf(d, opts)/*:Workbook*/ {\n\t\tif(!d) return d;\n\t\tvar o = opts || {};\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar s/*:Worksheet*/ = ((o.dense ? [] : {})/*:any*/), n = \"Sheet1\", next_n = \"\", sidx = 0;\n\t\tvar sheets = {}, snames = [], realnames = [];\n\n\t\tvar refguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\tvar sheetRows = o.sheetRows || 0;\n\n\t\tif(d[2] == 0x00) {\n\t\t\tif(d[3] == 0x08 || d[3] == 0x09) {\n\t\t\t\tif(d.length >= 16 && d[14] == 0x05 && d[15] === 0x6c) throw new Error(\"Unsupported Works 3 for Mac file\");\n\t\t\t}\n\t\t}\n\n\t\tif(d[2] == 0x02) {\n\t\t\to.Enum = WK1Enum;\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0x00: /* BOF */\n\t\t\t\t\to.vers = val;\n\t\t\t\t\tif(val >= 0x1000) o.qpro = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x06: refguess = val; break; /* RANGE */\n\t\t\t\tcase 0xCC: if(val) next_n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0xDE: next_n = val; break; /* SHEETNAMELP */\n\t\t\t\tcase 0x0F: /* LABEL */\n\t\t\t\tcase 0x33: /* STRING */\n\t\t\t\t\tif(!o.qpro) val[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x0D: /* INTEGER */\n\t\t\t\tcase 0x0E: /* NUMBER */\n\t\t\t\tcase 0x10: /* FORMULA */\n\t\t\t\t\t/* TODO: actual translation of the format code */\n\t\t\t\t\tif(RT == 0x0E && (val[2] & 0x70) == 0x70 && (val[2] & 0x0F) > 1 && (val[2] & 0x0F) < 15) {\n\t\t\t\t\t\tval[1].z = o.dateNF || table_fmt[14];\n\t\t\t\t\t\tif(o.cellDates) { val[1].t = 'd'; val[1].v = numdate(val[1].v); }\n\t\t\t\t\t}\n\n\t\t\t\t\tif(o.qpro) {\n\t\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\t\tsidx = val[3]; n = next_n || \"Sheet\" + (sidx + 1); next_n = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar tmpcell = o.dense ? (s[val[0].r]||[])[val[0].c] : s[encode_cell(val[0])];\n\t\t\t\t\tif(tmpcell) {\n\t\t\t\t\t\ttmpcell.t = val[1].t; tmpcell.v = val[1].v;\n\t\t\t\t\t\tif(val[1].z != null) tmpcell.z = val[1].z;\n\t\t\t\t\t\tif(val[1].f != null) tmpcell.f = val[1].f;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}}, o);\n\t\t} else if(d[2] == 0x1A || d[2] == 0x0E) {\n\t\t\to.Enum = WK3Enum;\n\t\t\tif(d[2] == 0x0E) { o.qpro = true; d.l = 0; }\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0xCC: n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0x16: /* LABEL16 */\n\t\t\t\t\tval[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x17: /* NUMBER17 */\n\t\t\t\tcase 0x18: /* NUMBER18 */\n\t\t\t\tcase 0x19: /* FORMULA19 */\n\t\t\t\tcase 0x25: /* NUMBER25 */\n\t\t\t\tcase 0x27: /* NUMBER27 */\n\t\t\t\tcase 0x28: /* FORMULA28 */\n\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\tsidx = val[3]; n = \"Sheet\" + (sidx + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif(sheetRows > 0 && val[0].r >= sheetRows) break;\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tif(refguess.e.c < val[0].c) refguess.e.c = val[0].c;\n\t\t\t\t\tif(refguess.e.r < val[0].r) refguess.e.r = val[0].r;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x1B: /* XFORMAT */\n\t\t\t\t\tif(val[0x36b0]) realnames[val[0x36b0][0]] = val[0x36b0][1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0601: /* SHEETINFOQP */\n\t\t\t\t\trealnames[val[0]] = val[1]; if(val[0] == sidx) n = val[1]; break;\n\t\t\t\tdefault: break;\n\t\t\t}}, o);\n\t\t} else throw new Error(\"Unrecognized LOTUS BOF \" + d[2]);\n\t\ts[\"!ref\"] = encode_range(refguess);\n\t\tsheets[next_n || n] = s;\n\t\tsnames.push(next_n || n);\n\t\tif(!realnames.length) return { SheetNames: snames, Sheets: sheets };\n\t\tvar osheets = {}, rnames = [];\n\t\t/* TODO: verify no collisions */\n\t\tfor(var i = 0; i < realnames.length; ++i) if(sheets[snames[i]]) {\n\t\t\trnames.push(realnames[i] || snames[i]);\n\t\t\tosheets[realnames[i]] = sheets[realnames[i]] || sheets[snames[i]];\n\t\t} else {\n\t\t\trnames.push(realnames[i]);\n\t\t\tosheets[realnames[i]] = ({ \"!ref\": \"A1\" });\n\t\t}\n\t\treturn { SheetNames: rnames, Sheets: osheets };\n\t}\n\n\tfunction sheet_to_wk1(ws/*:Worksheet*/, opts/*:WriteOpts*/) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK1 to JS string\");\n\t\tvar ba = buf_array();\n\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\tvar dense = Array.isArray(ws);\n\t\tvar cols = [];\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK1(0x0406));\n\t\twrite_biff_rec(ba, 0x06, write_RANGE(range));\n\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\tvar rr = encode_row(R);\n\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t/* TODO: formula records */\n\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\tif((cell.v|0)==cell.v && cell.v >= -32768 && cell.v <= 32767) write_biff_rec(ba, 0x0d, write_INTEGER(R, C, cell.v));\n\t\t\t\t\telse write_biff_rec(ba, 0x0e, write_NUMBER(R, C, cell.v));\n\t\t\t\t} else {\n\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\twrite_biff_rec(ba, 0x0F, write_LABEL(R, C, str.slice(0, 239)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\tfunction book_to_wk3(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK3 to JS string\");\n\t\tvar ba = buf_array();\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK3(wb));\n\n\t\tfor(var i = 0, cnt = 0; i < wb.SheetNames.length; ++i) if((wb.Sheets[wb.SheetNames[i]] || {})[\"!ref\"]) write_biff_rec(ba, 0x1b, write_XFORMAT_SHEETNAME(wb.SheetNames[i], cnt++));\n\n\t\tvar wsidx = 0;\n\t\tfor(i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tvar cols = [];\n\t\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\t\tvar rr = encode_row(R);\n\t\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t\t/* TODO: FORMULA19 NUMBER18 records */\n\t\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\t\twrite_biff_rec(ba, 0x17, write_NUMBER_17(R, C, wsidx, cell.v));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\t\t/* TODO: max len? */\n\t\t\t\t\t\twrite_biff_rec(ba, 0x16, write_LABEL_16(R, C, wsidx, str.slice(0, 239)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t++wsidx;\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\n\tfunction write_BOF_WK1(v/*:number*/) {\n\t\tvar out = new_buf(2);\n\t\tout.write_shift(2, v);\n\t\treturn out;\n\t}\n\n\tfunction write_BOF_WK3(wb/*:Workbook*/) {\n\t\tvar out = new_buf(26);\n\t\tout.write_shift(2, 0x1000);\n\t\tout.write_shift(2, 0x0004);\n\t\tout.write_shift(4, 0x0000);\n\t\tvar rows = 0, cols = 0, wscnt = 0;\n\t\tfor(var i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar name = wb.SheetNames[i];\n\t\t\tvar ws = wb.Sheets[name];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\t++wscnt;\n\t\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\t\tif(rows < range.e.r) rows = range.e.r;\n\t\t\tif(cols < range.e.c) cols = range.e.c;\n\t\t}\n\t\tif(rows > 8191) rows = 8191;\n\t\tout.write_shift(2, rows);\n\t\tout.write_shift(1, wscnt);\n\t\tout.write_shift(1, cols);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(1, 0x01);\n\t\tout.write_shift(1, 0x02);\n\t\tout.write_shift(4, 0);\n\t\tout.write_shift(4, 0);\n\t\treturn out;\n\t}\n\n\tfunction parse_RANGE(blob, length, opts) {\n\t\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\t\tif(length == 8 && opts.qpro) {\n\t\t\to.s.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.s.r = blob.read_shift(2);\n\t\t\to.e.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.e.r = blob.read_shift(2);\n\t\t\treturn o;\n\t\t}\n\t\to.s.c = blob.read_shift(2);\n\t\to.s.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\to.e.c = blob.read_shift(2);\n\t\to.e.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\tif(o.s.c == 0xFFFF) o.s.c = o.e.c = o.s.r = o.e.r = 0;\n\t\treturn o;\n\t}\n\tfunction write_RANGE(range) {\n\t\tvar out = new_buf(8);\n\t\tout.write_shift(2, range.s.c);\n\t\tout.write_shift(2, range.s.r);\n\t\tout.write_shift(2, range.e.c);\n\t\tout.write_shift(2, range.e.r);\n\t\treturn out;\n\t}\n\n\tfunction parse_cell(blob, length, opts) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0, 0];\n\t\tif(opts.qpro && opts.vers != 0x5120) {\n\t\t\to[0].c = blob.read_shift(1);\n\t\t\to[3] = blob.read_shift(1);\n\t\t\to[0].r = blob.read_shift(2);\n\t\t\tblob.l+=2;\n\t\t} else {\n\t\t\to[2] = blob.read_shift(1);\n\t\t\to[0].c = blob.read_shift(2); o[0].r = blob.read_shift(2);\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].t = 's';\n\t\tif(opts.vers == 0x5120) {\n\t\t\tblob.l++;\n\t\t\tvar len = blob.read_shift(1);\n\t\t\to[1].v = blob.read_shift(len, 'utf8');\n\t\t\treturn o;\n\t\t}\n\t\tif(opts.qpro) blob.l++;\n\t\to[1].v = blob.read_shift(tgt - blob.l, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL(R, C, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(7 + s.length);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, 0x27); // ??\n\t\tfor(var i = 0; i < o.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_INTEGER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(2, 'i');\n\t\treturn o;\n\t}\n\tfunction write_INTEGER(R, C, v) {\n\t\tvar o = new_buf(7);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(2, v, 'i');\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\treturn o;\n\t}\n\tfunction write_NUMBER(R, C, v) {\n\t\tvar o = new_buf(13);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(8, v, 'f');\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\t/* TODO: formula */\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\tif(opts.qpro) blob.l = tgt;\n\t\telse {\n\t\t\tvar flen = blob.read_shift(2);\n\t\t\twk1_fmla_to_csf(blob.slice(blob.l, blob.l + flen), o);\n\t\t\tblob.l += flen;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction wk1_parse_rc(B, V, col) {\n\t\tvar rel = V & 0x8000;\n\t\tV &= ~0x8000;\n\t\tV = (rel ? B : 0) + ((V >= 0x2000) ? V - 0x4000 : V);\n\t\treturn (rel ? \"\" : \"$\") + (col ? encode_col(V) : encode_row(V));\n\t}\n\t/* var oprec = [\n\t\t8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 4, 5, 5, 7, 3, 3,\n\t\t3, 3, 3, 3, 1, 1, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8\n\t]; */\n\t/* TODO: flesh out */\n\tvar FuncTab = {\n\t\t0x33: [\"FALSE\", 0],\n\t\t0x34: [\"TRUE\", 0],\n\t\t0x46: [\"LEN\", 1],\n\t\t0x50: [\"SUM\", 69],\n\t\t0x51: [\"AVERAGEA\", 69],\n\t\t0x52: [\"COUNTA\", 69],\n\t\t0x53: [\"MINA\", 69],\n\t\t0x54: [\"MAXA\", 69],\n\t\t0x6F: [\"T\", 1]\n\t};\n\tvar BinOpTab = [\n\t\t  \"\",   \"\",   \"\",   \"\",   \"\",   \"\",   \"\",   \"\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t  \"\",  \"+\",  \"-\",  \"*\",  \"/\",  \"^\",  \"=\", \"<>\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t\"<=\", \">=\",  \"<\",  \">\",   \"\",   \"\",   \"\",   \"\", // eslint-disable-line no-mixed-spaces-and-tabs\n\t\t \"&\",   \"\",   \"\",   \"\",   \"\",   \"\",   \"\",   \"\"  // eslint-disable-line no-mixed-spaces-and-tabs\n\t];\n\n\tfunction wk1_fmla_to_csf(blob, o) {\n\t\tprep_blob(blob, 0);\n\t\tvar out = [], argc = 0, R = \"\", C = \"\", argL = \"\", argR = \"\";\n\t\twhile(blob.l < blob.length) {\n\t\t\tvar cc = blob[blob.l++];\n\t\t\tswitch(cc) {\n\t\t\t\tcase 0x00: out.push(blob.read_shift(8, 'f')); break;\n\t\t\t\tcase 0x01: {\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x02: {\n\t\t\t\t\tvar c = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tvar r = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(c + r + \":\" + C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x03:\n\t\t\t\t\tif(blob.l < blob.length) { console.error(\"WK1 premature formula end\"); return; }\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x04: out.push(\"(\" + out.pop() + \")\"); break;\n\t\t\t\tcase 0x05: out.push(blob.read_shift(2)); break;\n\t\t\t\tcase 0x06: {\n\t\t\t\t\t/* TODO: text encoding */\n\t\t\t\t\tvar Z = \"\"; while((cc = blob[blob.l++])) Z += String.fromCharCode(cc);\n\t\t\t\t\tout.push('\"' + Z.replace(/\"/g, '\"\"') + '\"');\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x08: out.push(\"-\" + out.pop()); break;\n\t\t\t\tcase 0x17: out.push(\"+\" + out.pop()); break;\n\t\t\t\tcase 0x16: out.push(\"NOT(\" + out.pop() + \")\"); break;\n\n\t\t\t\tcase 0x14: case 0x15: {\n\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\tout.push([\"AND\", \"OR\"][cc - 0x14] + \"(\" + argL + \",\" + argR + \")\");\n\t\t\t\t} break;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif(cc < 0x20 && BinOpTab[cc]) {\n\t\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\t\tout.push(argL + BinOpTab[cc] + argR);\n\t\t\t\t\t} else if(FuncTab[cc]) {\n\t\t\t\t\t\targc = FuncTab[cc][1];\n\t\t\t\t\t\tif(argc == 69) argc = blob[blob.l++];\n\t\t\t\t\t\tif(argc > out.length) { console.error(\"WK1 bad formula parse 0x\" + cc.toString(16) + \":|\" + out.join(\"|\") + \"|\"); return; }\n\t\t\t\t\t\tvar args = out.slice(-argc);\n\t\t\t\t\t\tout.length -= argc;\n\t\t\t\t\t\tout.push(FuncTab[cc][0] + \"(\" + args.join(\",\") + \")\");\n\t\t\t\t\t}\n\t\t\t\t\telse if(cc <= 0x07) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x18) return console.error(\"WK1 unsupported op \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x1E) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x73) return console.error(\"WK1 unsupported function opcode \" + cc.toString(16));\n\t\t\t\t\t// possible future functions ??\n\t\t\t\t\telse return console.error(\"WK1 unrecognized opcode \" + cc.toString(16));\n\t\t\t}\n\t\t}\n\t\tif(out.length == 1) o[1].f = \"\" + out[0];\n\t\telse console.error(\"WK1 bad formula parse |\" + out.join(\"|\") + \"|\");\n\t}\n\n\n\tfunction parse_cell_3(blob/*::, length*/) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0];\n\t\to[0].r = blob.read_shift(2); o[3] = blob[blob.l++]; o[0].c = blob[blob.l++];\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL_16(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].t = 's';\n\t\to[1].v = blob.read_shift(length - 4, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL_16(R, C, wsidx, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(6 + s.length);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\to.write_shift(1, 0x27);\n\t\tfor(var i = 0; i < s.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_18(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].v = blob.read_shift(2);\n\t\tvar v = o[1].v >> 1;\n\t\tif(o[1].v & 0x1) {\n\t\t\tswitch(v & 0x07) {\n\t\t\t\tcase 0: v = (v >> 3) * 5000; break;\n\t\t\t\tcase 1: v = (v >> 3) * 500; break;\n\t\t\t\tcase 2: v = (v >> 3) / 20; break;\n\t\t\t\tcase 3: v = (v >> 3) / 200; break;\n\t\t\t\tcase 4: v = (v >> 3) / 2000; break;\n\t\t\t\tcase 5: v = (v >> 3) / 20000; break;\n\t\t\t\tcase 6: v = (v >> 3) / 16; break;\n\t\t\t\tcase 7: v = (v >> 3) / 64; break;\n\t\t\t}\n\t\t}\n\t\to[1].v = v;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_17(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\tvar v2 = blob.read_shift(4);\n\t\tvar e = blob.read_shift(2);\n\t\tif(e == 0xFFFF) {\n\t\t\tif(v1 === 0 && v2 === 0xC0000000) { o[1].t = \"e\"; o[1].v = 0x0F; } // ERR -> #VALUE!\n\t\t\telse if(v1 === 0 && v2 === 0xD0000000) { o[1].t = \"e\"; o[1].v = 0x2A; } // NA -> #N/A\n\t\t\telse o[1].v = 0;\n\t\t\treturn o;\n\t\t}\n\t\tvar s = e & 0x8000; e = (e&0x7FFF) - 16446;\n\t\to[1].v = (1 - s*2) * (v2 * Math.pow(2, e+32) + v1 * Math.pow(2, e));\n\t\treturn o;\n\t}\n\tfunction write_NUMBER_17(R, C, wsidx, v) {\n\t\tvar o = new_buf(14);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\tif(v == 0) {\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(2, 0xFFFF);\n\t\t\treturn o;\n\t\t}\n\t\tvar s = 0, e = 0, v1 = 0, v2 = 0;\n\t\tif(v < 0) { s = 1; v = -v; }\n\t\te = Math.log2(v) | 0;\n\t\tv /= Math.pow(2, e-31);\n\t\tv2 = (v)>>>0;\n\t\tif((v2&0x80000000) == 0) { v/=2; ++e; v2 = v >>> 0; }\n\t\tv -= v2;\n\t\tv2 |= 0x80000000;\n\t\tv2 >>>= 0;\n\t\tv *= Math.pow(2, 32);\n\t\tv1 = v>>>0;\n\t\to.write_shift(4, v1);\n\t\to.write_shift(4, v2);\n\t\te += 0x3FFF + (s ? 0x8000 : 0);\n\t\to.write_shift(2, e);\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_19(blob, length) {\n\t\tvar o = parse_NUMBER_17(blob, 14);\n\t\tblob.l += length - 14; /* TODO: WK3 formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_25(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\to[1].v = v1 >> 6;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_27(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(8,'f');\n\t\to[1].v = v1;\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_28(blob, length) {\n\t\tvar o = parse_NUMBER_27(blob, 14);\n\t\tblob.l += length - 10; /* TODO: formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETNAMECS(blob, length) {\n\t\treturn blob[blob.l + length - 1] == 0 ? blob.read_shift(length, 'cstr') : \"\";\n\t}\n\n\tfunction parse_SHEETNAMELP(blob, length) {\n\t\tvar len = blob[blob.l++];\n\t\tif(len > length - 1) len = length - 1;\n\t\tvar o = \"\"; while(o.length < len) o += String.fromCharCode(blob[blob.l++]);\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETINFOQP(blob, length, opts) {\n\t\tif(!opts.qpro || length < 21) return;\n\t\tvar id = blob.read_shift(1);\n\t\tblob.l += 17;\n\t\tblob.l += 1; //var len = blob.read_shift(1);\n\t\tblob.l += 2;\n\t\tvar nm = blob.read_shift(length - 21, 'cstr');\n\t\treturn [id, nm];\n\t}\n\n\tfunction parse_XFORMAT(blob, length) {\n\t\tvar o = {}, tgt = blob.l + length;\n\t\twhile(blob.l < tgt) {\n\t\t\tvar dt = blob.read_shift(2);\n\t\t\tif(dt == 0x36b0) {\n\t\t\t\to[dt] = [0, \"\"];\n\t\t\t\to[dt][0] = blob.read_shift(2);\n\t\t\t\twhile(blob[blob.l]) { o[dt][1] += String.fromCharCode(blob[blob.l]); blob.l++; } blob.l++;\n\t\t\t}\n\t\t\t// TODO: 0x3a99 ??\n\t\t}\n\t\treturn o;\n\t}\n\tfunction write_XFORMAT_SHEETNAME(name, wsidx) {\n\t\tvar out = new_buf(5 + name.length);\n\t\tout.write_shift(2, 0x36b0);\n\t\tout.write_shift(2, wsidx);\n\t\tfor(var i = 0; i < name.length; ++i) {\n\t\t\tvar cc = name.charCodeAt(i);\n\t\t\tout[out.l++] = cc > 0x7F ? 0x5F : cc;\n\t\t}\n\t\tout[out.l++] = 0;\n\t\treturn out;\n\t}\n\n\tvar WK1Enum = {\n\t\t/*::[*/0x0000/*::]*/: { n:\"BOF\", f:parseuint16 },\n\t\t/*::[*/0x0001/*::]*/: { n:\"EOF\" },\n\t\t/*::[*/0x0002/*::]*/: { n:\"CALCMODE\" },\n\t\t/*::[*/0x0003/*::]*/: { n:\"CALCORDER\" },\n\t\t/*::[*/0x0004/*::]*/: { n:\"SPLIT\" },\n\t\t/*::[*/0x0005/*::]*/: { n:\"SYNC\" },\n\t\t/*::[*/0x0006/*::]*/: { n:\"RANGE\", f:parse_RANGE },\n\t\t/*::[*/0x0007/*::]*/: { n:\"WINDOW1\" },\n\t\t/*::[*/0x0008/*::]*/: { n:\"COLW1\" },\n\t\t/*::[*/0x0009/*::]*/: { n:\"WINTWO\" },\n\t\t/*::[*/0x000A/*::]*/: { n:\"COLW2\" },\n\t\t/*::[*/0x000B/*::]*/: { n:\"NAME\" },\n\t\t/*::[*/0x000C/*::]*/: { n:\"BLANK\" },\n\t\t/*::[*/0x000D/*::]*/: { n:\"INTEGER\", f:parse_INTEGER },\n\t\t/*::[*/0x000E/*::]*/: { n:\"NUMBER\", f:parse_NUMBER },\n\t\t/*::[*/0x000F/*::]*/: { n:\"LABEL\", f:parse_LABEL },\n\t\t/*::[*/0x0010/*::]*/: { n:\"FORMULA\", f:parse_FORMULA },\n\t\t/*::[*/0x0018/*::]*/: { n:\"TABLE\" },\n\t\t/*::[*/0x0019/*::]*/: { n:\"ORANGE\" },\n\t\t/*::[*/0x001A/*::]*/: { n:\"PRANGE\" },\n\t\t/*::[*/0x001B/*::]*/: { n:\"SRANGE\" },\n\t\t/*::[*/0x001C/*::]*/: { n:\"FRANGE\" },\n\t\t/*::[*/0x001D/*::]*/: { n:\"KRANGE1\" },\n\t\t/*::[*/0x0020/*::]*/: { n:\"HRANGE\" },\n\t\t/*::[*/0x0023/*::]*/: { n:\"KRANGE2\" },\n\t\t/*::[*/0x0024/*::]*/: { n:\"PROTEC\" },\n\t\t/*::[*/0x0025/*::]*/: { n:\"FOOTER\" },\n\t\t/*::[*/0x0026/*::]*/: { n:\"HEADER\" },\n\t\t/*::[*/0x0027/*::]*/: { n:\"SETUP\" },\n\t\t/*::[*/0x0028/*::]*/: { n:\"MARGINS\" },\n\t\t/*::[*/0x0029/*::]*/: { n:\"LABELFMT\" },\n\t\t/*::[*/0x002A/*::]*/: { n:\"TITLES\" },\n\t\t/*::[*/0x002B/*::]*/: { n:\"SHEETJS\" },\n\t\t/*::[*/0x002D/*::]*/: { n:\"GRAPH\" },\n\t\t/*::[*/0x002E/*::]*/: { n:\"NGRAPH\" },\n\t\t/*::[*/0x002F/*::]*/: { n:\"CALCCOUNT\" },\n\t\t/*::[*/0x0030/*::]*/: { n:\"UNFORMATTED\" },\n\t\t/*::[*/0x0031/*::]*/: { n:\"CURSORW12\" },\n\t\t/*::[*/0x0032/*::]*/: { n:\"WINDOW\" },\n\t\t/*::[*/0x0033/*::]*/: { n:\"STRING\", f:parse_LABEL },\n\t\t/*::[*/0x0037/*::]*/: { n:\"PASSWORD\" },\n\t\t/*::[*/0x0038/*::]*/: { n:\"LOCKED\" },\n\t\t/*::[*/0x003C/*::]*/: { n:\"QUERY\" },\n\t\t/*::[*/0x003D/*::]*/: { n:\"QUERYNAME\" },\n\t\t/*::[*/0x003E/*::]*/: { n:\"PRINT\" },\n\t\t/*::[*/0x003F/*::]*/: { n:\"PRINTNAME\" },\n\t\t/*::[*/0x0040/*::]*/: { n:\"GRAPH2\" },\n\t\t/*::[*/0x0041/*::]*/: { n:\"GRAPHNAME\" },\n\t\t/*::[*/0x0042/*::]*/: { n:\"ZOOM\" },\n\t\t/*::[*/0x0043/*::]*/: { n:\"SYMSPLIT\" },\n\t\t/*::[*/0x0044/*::]*/: { n:\"NSROWS\" },\n\t\t/*::[*/0x0045/*::]*/: { n:\"NSCOLS\" },\n\t\t/*::[*/0x0046/*::]*/: { n:\"RULER\" },\n\t\t/*::[*/0x0047/*::]*/: { n:\"NNAME\" },\n\t\t/*::[*/0x0048/*::]*/: { n:\"ACOMM\" },\n\t\t/*::[*/0x0049/*::]*/: { n:\"AMACRO\" },\n\t\t/*::[*/0x004A/*::]*/: { n:\"PARSE\" },\n\t\t/*::[*/0x0066/*::]*/: { n:\"PRANGES??\" },\n\t\t/*::[*/0x0067/*::]*/: { n:\"RRANGES??\" },\n\t\t/*::[*/0x0068/*::]*/: { n:\"FNAME??\" },\n\t\t/*::[*/0x0069/*::]*/: { n:\"MRANGES??\" },\n\t\t/*::[*/0x00CC/*::]*/: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n\t\t/*::[*/0x00DE/*::]*/: { n:\"SHEETNAMELP\", f:parse_SHEETNAMELP },\n\t\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n\t};\n\n\tvar WK3Enum = {\n\t\t/*::[*/0x0000/*::]*/: { n:\"BOF\" },\n\t\t/*::[*/0x0001/*::]*/: { n:\"EOF\" },\n\t\t/*::[*/0x0002/*::]*/: { n:\"PASSWORD\" },\n\t\t/*::[*/0x0003/*::]*/: { n:\"CALCSET\" },\n\t\t/*::[*/0x0004/*::]*/: { n:\"WINDOWSET\" },\n\t\t/*::[*/0x0005/*::]*/: { n:\"SHEETCELLPTR\" },\n\t\t/*::[*/0x0006/*::]*/: { n:\"SHEETLAYOUT\" },\n\t\t/*::[*/0x0007/*::]*/: { n:\"COLUMNWIDTH\" },\n\t\t/*::[*/0x0008/*::]*/: { n:\"HIDDENCOLUMN\" },\n\t\t/*::[*/0x0009/*::]*/: { n:\"USERRANGE\" },\n\t\t/*::[*/0x000A/*::]*/: { n:\"SYSTEMRANGE\" },\n\t\t/*::[*/0x000B/*::]*/: { n:\"ZEROFORCE\" },\n\t\t/*::[*/0x000C/*::]*/: { n:\"SORTKEYDIR\" },\n\t\t/*::[*/0x000D/*::]*/: { n:\"FILESEAL\" },\n\t\t/*::[*/0x000E/*::]*/: { n:\"DATAFILLNUMS\" },\n\t\t/*::[*/0x000F/*::]*/: { n:\"PRINTMAIN\" },\n\t\t/*::[*/0x0010/*::]*/: { n:\"PRINTSTRING\" },\n\t\t/*::[*/0x0011/*::]*/: { n:\"GRAPHMAIN\" },\n\t\t/*::[*/0x0012/*::]*/: { n:\"GRAPHSTRING\" },\n\t\t/*::[*/0x0013/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0014/*::]*/: { n:\"ERRCELL\" },\n\t\t/*::[*/0x0015/*::]*/: { n:\"NACELL\" },\n\t\t/*::[*/0x0016/*::]*/: { n:\"LABEL16\", f:parse_LABEL_16},\n\t\t/*::[*/0x0017/*::]*/: { n:\"NUMBER17\", f:parse_NUMBER_17 },\n\t\t/*::[*/0x0018/*::]*/: { n:\"NUMBER18\", f:parse_NUMBER_18 },\n\t\t/*::[*/0x0019/*::]*/: { n:\"FORMULA19\", f:parse_FORMULA_19},\n\t\t/*::[*/0x001A/*::]*/: { n:\"FORMULA1A\" },\n\t\t/*::[*/0x001B/*::]*/: { n:\"XFORMAT\", f:parse_XFORMAT },\n\t\t/*::[*/0x001C/*::]*/: { n:\"DTLABELMISC\" },\n\t\t/*::[*/0x001D/*::]*/: { n:\"DTLABELCELL\" },\n\t\t/*::[*/0x001E/*::]*/: { n:\"GRAPHWINDOW\" },\n\t\t/*::[*/0x001F/*::]*/: { n:\"CPA\" },\n\t\t/*::[*/0x0020/*::]*/: { n:\"LPLAUTO\" },\n\t\t/*::[*/0x0021/*::]*/: { n:\"QUERY\" },\n\t\t/*::[*/0x0022/*::]*/: { n:\"HIDDENSHEET\" },\n\t\t/*::[*/0x0023/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0025/*::]*/: { n:\"NUMBER25\", f:parse_NUMBER_25 },\n\t\t/*::[*/0x0026/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0027/*::]*/: { n:\"NUMBER27\", f:parse_NUMBER_27 },\n\t\t/*::[*/0x0028/*::]*/: { n:\"FORMULA28\", f:parse_FORMULA_28 },\n\t\t/*::[*/0x008E/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0093/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0096/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0097/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0098/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0099/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009B/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x009C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00A3/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00AE/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00AF/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B0/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B1/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B8/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00B9/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BA/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BB/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00BC/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00C3/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00C9/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CC/*::]*/: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n\t\t/*::[*/0x00CD/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CE/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00CF/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x00D0/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0100/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0103/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0104/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0105/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0106/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0107/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0109/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010B/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010E/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x010F/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0180/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0185/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0186/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0189/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x018C/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0200/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0202/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0201/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0204/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0205/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0280/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0281/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0282/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0283/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0284/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0285/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0286/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0287/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0288/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0292/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0293/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0294/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0295/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0296/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0299/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x029A/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0300/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0304/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0601/*::]*/: { n:\"SHEETINFOQP\", f:parse_SHEETINFOQP },\n\t\t/*::[*/0x0640/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0642/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0701/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0702/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0703/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0704/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0780/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0800/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0801/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0804/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x0A80/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x2AF6/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x3231/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x6E49/*::]*/: { n:\"??\" },\n\t\t/*::[*/0x6F44/*::]*/: { n:\"??\" },\n\t\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n\t};\n\treturn {\n\t\tsheet_to_wk1: sheet_to_wk1,\n\t\tbook_to_wk3: book_to_wk3,\n\t\tto_workbook: lotus_to_workbook\n\t};\n})();\n/* 18.4.7 rPr CT_RPrElt */\nfunction parse_rpr(rpr) {\n\tvar font = {}, m = rpr.match(tagregex), i = 0;\n\tvar pass = false;\n\tif(m) for(;i!=m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(y[0].replace(/\\w*:/g,\"\")) {\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\t/* ** not required . */\n\t\t\tcase '<condense': break;\n\t\t\t/* 18.8.17 extend CT_BooleanProperty */\n\t\t\t/* ** not required . */\n\t\t\tcase '<extend': break;\n\t\t\t/* 18.8.36 shadow CT_BooleanProperty */\n\t\t\t/* ** not required . */\n\t\t\tcase '<shadow':\n\t\t\t\tif(!y.val) break;\n\t\t\t\t/* falls through */\n\t\t\tcase '<shadow>':\n\t\t\tcase '<shadow/>': font.shadow = 1; break;\n\t\t\tcase '</shadow>': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty TODO */\n\t\t\tcase '<charset':\n\t\t\t\tif(y.val == '1') break;\n\t\t\t\tfont.cp = CS2CP[parseInt(y.val, 10)];\n\t\t\t\tbreak;\n\n\t\t\t/* 18.4.2 outline CT_BooleanProperty TODO */\n\t\t\tcase '<outline':\n\t\t\t\tif(!y.val) break;\n\t\t\t\t/* falls through */\n\t\t\tcase '<outline>':\n\t\t\tcase '<outline/>': font.outline = 1; break;\n\t\t\tcase '</outline>': break;\n\n\t\t\t/* 18.4.5 rFont CT_FontName */\n\t\t\tcase '<rFont': font.name = y.val; break;\n\n\t\t\t/* 18.4.11 sz CT_FontSize */\n\t\t\tcase '<sz': font.sz = y.val; break;\n\n\t\t\t/* 18.4.10 strike CT_BooleanProperty */\n\t\t\tcase '<strike':\n\t\t\t\tif(!y.val) break;\n\t\t\t\t/* falls through */\n\t\t\tcase '<strike>':\n\t\t\tcase '<strike/>': font.strike = 1; break;\n\t\t\tcase '</strike>': break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '<u':\n\t\t\t\tif(!y.val) break;\n\t\t\t\tswitch(y.val) {\n\t\t\t\t\tcase 'double': font.uval = \"double\"; break;\n\t\t\t\t\tcase 'singleAccounting': font.uval = \"single-accounting\"; break;\n\t\t\t\t\tcase 'doubleAccounting': font.uval = \"double-accounting\"; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase '<u>':\n\t\t\tcase '<u/>': font.u = 1; break;\n\t\t\tcase '</u>': break;\n\n\t\t\t/* 18.8.2 b */\n\t\t\tcase '<b':\n\t\t\t\tif(y.val == '0') break;\n\t\t\t\t/* falls through */\n\t\t\tcase '<b>':\n\t\t\tcase '<b/>': font.b = 1; break;\n\t\t\tcase '</b>': break;\n\n\t\t\t/* 18.8.26 i */\n\t\t\tcase '<i':\n\t\t\t\tif(y.val == '0') break;\n\t\t\t\t/* falls through */\n\t\t\tcase '<i>':\n\t\t\tcase '<i/>': font.i = 1; break;\n\t\t\tcase '</i>': break;\n\n\t\t\t/* 18.3.1.15 color CT_Color TODO: tint, theme, auto, indexed */\n\t\t\tcase '<color':\n\t\t\t\tif(y.rgb) font.color = y.rgb.slice(2,8);\n\t\t\t\tbreak;\n\t\t\tcase '<color>': case '<color/>': case '</color>': break;\n\n\t\t\t/* 18.8.18 family ST_FontFamily */\n\t\t\tcase '<family': font.family = y.val; break;\n\t\t\tcase '<family>': case '<family/>': case '</family>': break;\n\n\t\t\t/* 18.4.14 vertAlign CT_VerticalAlignFontProperty TODO */\n\t\t\tcase '<vertAlign': font.valign = y.val; break;\n\t\t\tcase '<vertAlign>': case '<vertAlign/>': case '</vertAlign>': break;\n\n\t\t\t/* 18.8.35 scheme CT_FontScheme TODO */\n\t\t\tcase '<scheme': break;\n\t\t\tcase '<scheme>': case '<scheme/>': case '</scheme>': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': break;\n\t\t\tcase '<ext': pass = true; break;\n\t\t\tcase '</ext>': pass = false; break;\n\t\t\tdefault:\n\t\t\t\tif(y[0].charCodeAt(1) !== 47 && !pass) throw new Error('Unrecognized rich format ' + y[0]);\n\t\t}\n\t}\n\treturn font;\n}\n\nvar parse_rs = /*#__PURE__*/(function() {\n\tvar tregex = matchtag(\"t\"), rpregex = matchtag(\"rPr\");\n\t/* 18.4.4 r CT_RElt */\n\tfunction parse_r(r) {\n\t\t/* 18.4.12 t ST_Xstring */\n\t\tvar t = r.match(tregex)/*, cp = 65001*/;\n\t\tif(!t) return {t:\"s\", v:\"\"};\n\n\t\tvar o/*:Cell*/ = ({t:'s', v:unescapexml(t[1])}/*:any*/);\n\t\tvar rpr = r.match(rpregex);\n\t\tif(rpr) o.s = parse_rpr(rpr[1]);\n\t\treturn o;\n\t}\n\tvar rregex = /<(?:\\w+:)?r>/g, rend = /<\\/(?:\\w+:)?r>/;\n\treturn function parse_rs(rs) {\n\t\treturn rs.replace(rregex,\"\").split(rend).map(parse_r).filter(function(r) { return r.v; });\n\t};\n})();\n\n\n/* Parse a list of <r> tags */\nvar rs_to_html = /*#__PURE__*/(function parse_rs_factory() {\n\tvar nlregex = /(\\r\\n|\\n)/g;\n\tfunction parse_rpr2(font, intro, outro) {\n\t\tvar style/*:Array<string>*/ = [];\n\n\t\tif(font.u) style.push(\"text-decoration: underline;\");\n\t\tif(font.uval) style.push(\"text-underline-style:\" + font.uval + \";\");\n\t\tif(font.sz) style.push(\"font-size:\" + font.sz + \"pt;\");\n\t\tif(font.outline) style.push(\"text-effect: outline;\");\n\t\tif(font.shadow) style.push(\"text-shadow: auto;\");\n\t\tintro.push('<span style=\"' + style.join(\"\") + '\">');\n\n\t\tif(font.b) { intro.push(\"<b>\"); outro.push(\"</b>\"); }\n\t\tif(font.i) { intro.push(\"<i>\"); outro.push(\"</i>\"); }\n\t\tif(font.strike) { intro.push(\"<s>\"); outro.push(\"</s>\"); }\n\n\t\tvar align = font.valign || \"\";\n\t\tif(align == \"superscript\" || align == \"super\") align = \"sup\";\n\t\telse if(align == \"subscript\") align = \"sub\";\n\t\tif(align != \"\") { intro.push(\"<\" + align + \">\"); outro.push(\"</\" + align + \">\"); }\n\n\t\toutro.push(\"</span>\");\n\t\treturn font;\n\t}\n\n\t/* 18.4.4 r CT_RElt */\n\tfunction r_to_html(r) {\n\t\tvar terms/*:[Array<string>, string, Array<string>]*/ = [[],r.v,[]];\n\t\tif(!r.v) return \"\";\n\n\t\tif(r.s) parse_rpr2(r.s, terms[0], terms[2]);\n\n\t\treturn terms[0].join(\"\") + terms[1].replace(nlregex,'<br/>') + terms[2].join(\"\");\n\t}\n\n\treturn function parse_rs(rs) {\n\t\treturn rs.map(r_to_html).join(\"\");\n\t};\n})();\n\n/* 18.4.8 si CT_Rst */\nvar sitregex = /<(?:\\w+:)?t[^>]*>([^<]*)<\\/(?:\\w+:)?t>/g, sirregex = /<(?:\\w+:)?r>/;\nvar sirphregex = /<(?:\\w+:)?rPh.*?>([\\s\\S]*?)<\\/(?:\\w+:)?rPh>/g;\nfunction parse_si(x, opts) {\n\tvar html = opts ? opts.cellHTML : true;\n\tvar z = {};\n\tif(!x) return { t: \"\" };\n\t//var y;\n\t/* 18.4.12 t ST_Xstring (Plaintext String) */\n\t// TODO: is whitespace actually valid here?\n\tif(x.match(/^\\s*<(?:\\w+:)?t[^>]*>/)) {\n\t\tz.t = unescapexml(utf8read(x.slice(x.indexOf(\">\")+1).split(/<\\/(?:\\w+:)?t>/)[0]||\"\"));\n\t\tz.r = utf8read(x);\n\t\tif(html) z.h = escapehtml(z.t);\n\t}\n\t/* 18.4.4 r CT_RElt (Rich Text Run) */\n\telse if((/*y = */x.match(sirregex))) {\n\t\tz.r = utf8read(x);\n\t\tz.t = unescapexml(utf8read((x.replace(sirphregex, '').match(sitregex)||[]).join(\"\").replace(tagregex,\"\")));\n\t\tif(html) z.h = rs_to_html(parse_rs(z.r));\n\t}\n\t/* 18.4.3 phoneticPr CT_PhoneticPr (TODO: needed for Asian support) */\n\t/* 18.4.6 rPh CT_PhoneticRun (TODO: needed for Asian support) */\n\treturn z;\n}\n\n/* 18.4 Shared String Table */\nvar sstr0 = /<(?:\\w+:)?sst([^>]*)>([\\s\\S]*)<\\/(?:\\w+:)?sst>/;\nvar sstr1 = /<(?:\\w+:)?(?:si|sstItem)>/g;\nvar sstr2 = /<\\/(?:\\w+:)?(?:si|sstItem)>/;\nfunction parse_sst_xml(data/*:string*/, opts)/*:SST*/ {\n\tvar s/*:SST*/ = ([]/*:any*/), ss = \"\";\n\tif(!data) return s;\n\t/* 18.4.9 sst CT_Sst */\n\tvar sst = data.match(sstr0);\n\tif(sst) {\n\t\tss = sst[2].replace(sstr1,\"\").split(sstr2);\n\t\tfor(var i = 0; i != ss.length; ++i) {\n\t\t\tvar o = parse_si(ss[i].trim(), opts);\n\t\t\tif(o != null) s[s.length] = o;\n\t\t}\n\t\tsst = parsexmltag(sst[1]); s.Count = sst.count; s.Unique = sst.uniqueCount;\n\t}\n\treturn s;\n}\n\nvar straywsregex = /^\\s|\\s$|[\\t\\n\\r]/;\nfunction write_sst_xml(sst/*:SST*/, opts)/*:string*/ {\n\tif(!opts.bookSST) return \"\";\n\tvar o = [XML_HEADER];\n\to[o.length] = (writextag('sst', null, {\n\t\txmlns: XMLNS_main[0],\n\t\tcount: sst.Count,\n\t\tuniqueCount: sst.Unique\n\t}));\n\tfor(var i = 0; i != sst.length; ++i) { if(sst[i] == null) continue;\n\t\tvar s/*:XLString*/ = sst[i];\n\t\tvar sitag = \"<si>\";\n\t\tif(s.r) sitag += s.r;\n\t\telse {\n\t\t\tsitag += \"<t\";\n\t\t\tif(!s.t) s.t = \"\";\n\t\t\tif(s.t.match(straywsregex)) sitag += ' xml:space=\"preserve\"';\n\t\t\tsitag += \">\" + escapexml(s.t) + \"</t>\";\n\t\t}\n\t\tsitag += \"</si>\";\n\t\to[o.length] = (sitag);\n\t}\n\tif(o.length>2){ o[o.length] = ('</sst>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.221 BrtBeginSst */\nfunction parse_BrtBeginSst(data) {\n\treturn [data.read_shift(4), data.read_shift(4)];\n}\n\n/* [MS-XLSB] 2.1.7.45 Shared Strings */\nfunction parse_sst_bin(data, opts)/*:SST*/ {\n\tvar s/*:SST*/ = ([]/*:any*/);\n\tvar pass = false;\n\trecordhopper(data, function hopper_sst(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009F: /* BrtBeginSst */\n\t\t\t\ts.Count = val[0]; s.Unique = val[1]; break;\n\t\t\tcase 0x0013: /* BrtSSTItem */\n\t\t\t\ts.push(val); break;\n\t\t\tcase 0x00A0: /* BrtEndSst */\n\t\t\t\treturn true;\n\n\t\t\tcase 0x0023: /* BrtFRTBegin */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* BrtFRTEnd */\n\t\t\t\tpass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){}\n\t\t\t\tif(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn s;\n}\n\nfunction write_BrtBeginSst(sst, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(4, sst.Count);\n\to.write_shift(4, sst.Unique);\n\treturn o;\n}\n\nvar write_BrtSSTItem = write_RichStr;\n\nfunction write_sst_bin(sst/*::, opts*/) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x009F /* BrtBeginSst */, write_BrtBeginSst(sst));\n\tfor(var i = 0; i < sst.length; ++i) write_record(ba, 0x0013 /* BrtSSTItem */, write_BrtSSTItem(sst[i]));\n\t/* FRTSST */\n\twrite_record(ba, 0x00A0 /* BrtEndSst */);\n\treturn ba.end();\n}\nfunction _JS2ANSI(str/*:string*/)/*:Array<number>*/ {\n\tif(typeof $cptable !== 'undefined') return $cptable.utils.encode(current_ansi, str);\n\tvar o/*:Array<number>*/ = [], oo = str.split(\"\");\n\tfor(var i = 0; i < oo.length; ++i) o[i] = oo[i].charCodeAt(0);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.4 Version */\nfunction parse_CRYPTOVersion(blob, length/*:?number*/) {\n\tvar o/*:any*/ = {};\n\to.Major = blob.read_shift(2);\n\to.Minor = blob.read_shift(2);\n\t/*:: if(length == null) return o; */\n\tif(length >= 4) blob.l += length - 4;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.5 DataSpaceVersionInfo */\nfunction parse_DataSpaceVersionInfo(blob) {\n\tvar o = {};\n\to.id = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6.1 DataSpaceMapEntry Structure */\nfunction parse_DataSpaceMapEntry(blob) {\n\tvar len = blob.read_shift(4);\n\tvar end = blob.l + len - 4;\n\tvar o = {};\n\tvar cnt = blob.read_shift(4);\n\tvar comps/*:Array<{t:number, v:string}>*/ = [];\n\t/* [MS-OFFCRYPTO] 2.1.6.2 DataSpaceReferenceComponent Structure */\n\twhile(cnt-- > 0) comps.push({ t: blob.read_shift(4), v: blob.read_shift(0, 'lpp4') });\n\to.name = blob.read_shift(0, 'lpp4');\n\to.comps = comps;\n\tif(blob.l != end) throw new Error(\"Bad DataSpaceMapEntry: \" + blob.l + \" != \" + end);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6 DataSpaceMap */\nfunction parse_DataSpaceMap(blob) {\n\tvar o = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(parse_DataSpaceMapEntry(blob));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.7 DataSpaceDefinition */\nfunction parse_DataSpaceDefinition(blob)/*:Array<string>*/ {\n\tvar o/*:Array<string>*/ = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(blob.read_shift(0, 'lpp4'));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.8 DataSpaceDefinition */\nfunction parse_TransformInfoHeader(blob) {\n\tvar o = {};\n\t/*var len = */blob.read_shift(4);\n\tblob.l += 4; // must be 0x1\n\to.id = blob.read_shift(0, 'lpp4');\n\to.name = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\nfunction parse_Primary(blob) {\n\t/* [MS-OFFCRYPTO] 2.2.6 IRMDSTransformInfo */\n\tvar hdr = parse_TransformInfoHeader(blob);\n\t/* [MS-OFFCRYPTO] 2.1.9 EncryptionTransformInfo */\n\thdr.ename = blob.read_shift(0, '8lpp4');\n\thdr.blksz = blob.read_shift(4);\n\thdr.cmode = blob.read_shift(4);\n\tif(blob.read_shift(4) != 0x04) throw new Error(\"Bad !Primary record\");\n\treturn hdr;\n}\n\n/* [MS-OFFCRYPTO] 2.3.2 Encryption Header */\nfunction parse_EncryptionHeader(blob, length/*:number*/) {\n\tvar tgt = blob.l + length;\n\tvar o = {};\n\to.Flags = (blob.read_shift(4) & 0x3F);\n\tblob.l += 4;\n\to.AlgID = blob.read_shift(4);\n\tvar valid = false;\n\tswitch(o.AlgID) {\n\t\tcase 0x660E: case 0x660F: case 0x6610: valid = (o.Flags == 0x24); break;\n\t\tcase 0x6801: valid = (o.Flags == 0x04); break;\n\t\tcase 0: valid = (o.Flags == 0x10 || o.Flags == 0x04 || o.Flags == 0x24); break;\n\t\tdefault: throw 'Unrecognized encryption algorithm: ' + o.AlgID;\n\t}\n\tif(!valid) throw new Error(\"Encryption Flags/AlgID mismatch\");\n\to.AlgIDHash = blob.read_shift(4);\n\to.KeySize = blob.read_shift(4);\n\to.ProviderType = blob.read_shift(4);\n\tblob.l += 8;\n\to.CSPName = blob.read_shift((tgt-blob.l)>>1, 'utf16le');\n\tblob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.3 Encryption Verifier */\nfunction parse_EncryptionVerifier(blob, length/*:number*/) {\n\tvar o = {}, tgt = blob.l + length;\n\tblob.l += 4; // SaltSize must be 0x10\n\to.Salt = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\to.Verifier = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\t/*var sz = */blob.read_shift(4);\n\to.VerifierHash = blob.slice(blob.l, tgt); blob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.* EncryptionInfo Stream */\nfunction parse_EncryptionInfo(blob) {\n\tvar vers = parse_CRYPTOVersion(blob);\n\tswitch(vers.Minor) {\n\t\tcase 0x02: return [vers.Minor, parse_EncInfoStd(blob, vers)];\n\t\tcase 0x03: return [vers.Minor, parse_EncInfoExt(blob, vers)];\n\t\tcase 0x04: return [vers.Minor, parse_EncInfoAgl(blob, vers)];\n\t}\n\tthrow new Error(\"ECMA-376 Encrypted file unrecognized Version: \" + vers.Minor);\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.5  EncryptionInfo Stream (Standard Encryption) */\nfunction parse_EncInfoStd(blob/*::, vers*/) {\n\tvar flags = blob.read_shift(4);\n\tif((flags & 0x3F) != 0x24) throw new Error(\"EncryptionInfo mismatch\");\n\tvar sz = blob.read_shift(4);\n\t//var tgt = blob.l + sz;\n\tvar hdr = parse_EncryptionHeader(blob, sz);\n\tvar verifier = parse_EncryptionVerifier(blob, blob.length - blob.l);\n\treturn { t:\"Std\", h:hdr, v:verifier };\n}\n/* [MS-OFFCRYPTO] 2.3.4.6  EncryptionInfo Stream (Extensible Encryption) */\nfunction parse_EncInfoExt(/*::blob, vers*/) { throw new Error(\"File is password-protected: ECMA-376 Extensible\"); }\n/* [MS-OFFCRYPTO] 2.3.4.10 EncryptionInfo Stream (Agile Encryption) */\nfunction parse_EncInfoAgl(blob/*::, vers*/) {\n\tvar KeyData = [\"saltSize\",\"blockSize\",\"keyBits\",\"hashSize\",\"cipherAlgorithm\",\"cipherChaining\",\"hashAlgorithm\",\"saltValue\"];\n\tblob.l+=4;\n\tvar xml = blob.read_shift(blob.length - blob.l, 'utf8');\n\tvar o = {};\n\txml.replace(tagregex, function xml_agile(x) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<?xml': break;\n\t\t\tcase '<encryption': case '</encryption>': break;\n\t\t\tcase '<keyData': KeyData.forEach(function(k) { o[k] = y[k]; }); break;\n\t\t\tcase '<dataIntegrity': o.encryptedHmacKey = y.encryptedHmacKey; o.encryptedHmacValue = y.encryptedHmacValue; break;\n\t\t\tcase '<keyEncryptors>': case '<keyEncryptors': o.encs = []; break;\n\t\t\tcase '</keyEncryptors>': break;\n\n\t\t\tcase '<keyEncryptor': o.uri = y.uri; break;\n\t\t\tcase '</keyEncryptor>': break;\n\t\t\tcase '<encryptedKey': o.encs.push(y); break;\n\t\t\tdefault: throw y[0];\n\t\t}\n\t});\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.5.1 RC4 CryptoAPI Encryption Header */\nfunction parse_RC4CryptoHeader(blob, length/*:number*/) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}\n/* [MS-OFFCRYPTO] 2.3.6.1 RC4 Encryption Header */\nfunction parse_RC4Header(blob/*::, length*/) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.1 Binary Document Password Verifier Derivation */\nfunction crypto_CreatePasswordVerifier_Method1(Password/*:string*/) {\n\tvar Verifier = 0x0000, PasswordArray;\n\tvar PasswordDecoded = _JS2ANSI(Password);\n\tvar len = PasswordDecoded.length + 1, i, PasswordByte;\n\tvar Intermediate1, Intermediate2, Intermediate3;\n\tPasswordArray = new_raw_buf(len);\n\tPasswordArray[0] = PasswordDecoded.length;\n\tfor(i = 1; i != len; ++i) PasswordArray[i] = PasswordDecoded[i-1];\n\tfor(i = len-1; i >= 0; --i) {\n\t\tPasswordByte = PasswordArray[i];\n\t\tIntermediate1 = ((Verifier & 0x4000) === 0x0000) ? 0 : 1;\n\t\tIntermediate2 = (Verifier << 1) & 0x7FFF;\n\t\tIntermediate3 = Intermediate1 | Intermediate2;\n\t\tVerifier = Intermediate3 ^ PasswordByte;\n\t}\n\treturn Verifier ^ 0xCE4B;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.2 Binary Document XOR Array Initialization */\nvar crypto_CreateXorArray_Method1 = /*#__PURE__*/(function() {\n\tvar PadArray = [0xBB, 0xFF, 0xFF, 0xBA, 0xFF, 0xFF, 0xB9, 0x80, 0x00, 0xBE, 0x0F, 0x00, 0xBF, 0x0F, 0x00];\n\tvar InitialCode = [0xE1F0, 0x1D0F, 0xCC9C, 0x84C0, 0x110C, 0x0E10, 0xF1CE, 0x313E, 0x1872, 0xE139, 0xD40F, 0x84F9, 0x280C, 0xA96A, 0x4EC3];\n\tvar XorMatrix = [0xAEFC, 0x4DD9, 0x9BB2, 0x2745, 0x4E8A, 0x9D14, 0x2A09, 0x7B61, 0xF6C2, 0xFDA5, 0xEB6B, 0xC6F7, 0x9DCF, 0x2BBF, 0x4563, 0x8AC6, 0x05AD, 0x0B5A, 0x16B4, 0x2D68, 0x5AD0, 0x0375, 0x06EA, 0x0DD4, 0x1BA8, 0x3750, 0x6EA0, 0xDD40, 0xD849, 0xA0B3, 0x5147, 0xA28E, 0x553D, 0xAA7A, 0x44D5, 0x6F45, 0xDE8A, 0xAD35, 0x4A4B, 0x9496, 0x390D, 0x721A, 0xEB23, 0xC667, 0x9CEF, 0x29FF, 0x53FE, 0xA7FC, 0x5FD9, 0x47D3, 0x8FA6, 0x0F6D, 0x1EDA, 0x3DB4, 0x7B68, 0xF6D0, 0xB861, 0x60E3, 0xC1C6, 0x93AD, 0x377B, 0x6EF6, 0xDDEC, 0x45A0, 0x8B40, 0x06A1, 0x0D42, 0x1A84, 0x3508, 0x6A10, 0xAA51, 0x4483, 0x8906, 0x022D, 0x045A, 0x08B4, 0x1168, 0x76B4, 0xED68, 0xCAF1, 0x85C3, 0x1BA7, 0x374E, 0x6E9C, 0x3730, 0x6E60, 0xDCC0, 0xA9A1, 0x4363, 0x86C6, 0x1DAD, 0x3331, 0x6662, 0xCCC4, 0x89A9, 0x0373, 0x06E6, 0x0DCC, 0x1021, 0x2042, 0x4084, 0x8108, 0x1231, 0x2462, 0x48C4];\n\tvar Ror = function(Byte) { return ((Byte/2) | (Byte*128)) & 0xFF; };\n\tvar XorRor = function(byte1, byte2) { return Ror(byte1 ^ byte2); };\n\tvar CreateXorKey_Method1 = function(Password) {\n\t\tvar XorKey = InitialCode[Password.length - 1];\n\t\tvar CurrentElement = 0x68;\n\t\tfor(var i = Password.length-1; i >= 0; --i) {\n\t\t\tvar Char = Password[i];\n\t\t\tfor(var j = 0; j != 7; ++j) {\n\t\t\t\tif(Char & 0x40) XorKey ^= XorMatrix[CurrentElement];\n\t\t\t\tChar *= 2; --CurrentElement;\n\t\t\t}\n\t\t}\n\t\treturn XorKey;\n\t};\n\treturn function(password/*:string*/) {\n\t\tvar Password = _JS2ANSI(password);\n\t\tvar XorKey = CreateXorKey_Method1(Password);\n\t\tvar Index = Password.length;\n\t\tvar ObfuscationArray = new_raw_buf(16);\n\t\tfor(var i = 0; i != 16; ++i) ObfuscationArray[i] = 0x00;\n\t\tvar Temp, PasswordLastChar, PadIndex;\n\t\tif((Index & 1) === 1) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[0], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tPasswordLastChar = Password[Password.length - 1];\n\t\t\tObfuscationArray[Index] = XorRor(PasswordLastChar, Temp);\n\t\t}\n\t\twhile(Index > 0) {\n\t\t\t--Index;\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t}\n\t\tIndex = 15;\n\t\tPadIndex = 15 - Password.length;\n\t\twhile(PadIndex > 0) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[PadIndex], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t}\n\t\treturn ObfuscationArray;\n\t};\n})();\n\n/* [MS-OFFCRYPTO] 2.3.7.3 Binary Document XOR Data Transformation Method 1 */\nvar crypto_DecryptData_Method1 = function(password/*:string*/, Data, XorArrayIndex, XorArray, O) {\n\t/* If XorArray is set, use it; if O is not set, make changes in-place */\n\tif(!O) O = Data;\n\tif(!XorArray) XorArray = crypto_CreateXorArray_Method1(password);\n\tvar Index, Value;\n\tfor(Index = 0; Index != Data.length; ++Index) {\n\t\tValue = Data[Index];\n\t\tValue ^= XorArray[XorArrayIndex];\n\t\tValue = ((Value>>5) | (Value<<3)) & 0xFF;\n\t\tO[Index] = Value;\n\t\t++XorArrayIndex;\n\t}\n\treturn [O, XorArrayIndex, XorArray];\n};\n\nvar crypto_MakeXorDecryptor = function(password/*:string*/) {\n\tvar XorArrayIndex = 0, XorArray = crypto_CreateXorArray_Method1(password);\n\treturn function(Data) {\n\t\tvar O = crypto_DecryptData_Method1(\"\", Data, XorArrayIndex, XorArray);\n\t\tXorArrayIndex = O[1];\n\t\treturn O[0];\n\t};\n};\n\n/* 2.5.343 */\nfunction parse_XORObfuscation(blob, length, opts, out) {\n\tvar o = ({ key: parseuint16(blob), verificationBytes: parseuint16(blob) }/*:any*/);\n\tif(opts.password) o.verifier = crypto_CreatePasswordVerifier_Method1(opts.password);\n\tout.valid = o.verificationBytes === o.verifier;\n\tif(out.valid) out.insitu = crypto_MakeXorDecryptor(opts.password);\n\treturn o;\n}\n\n/* 2.4.117 */\nfunction parse_FilePassHeader(blob, length/*:number*/, oo) {\n\tvar o = oo || {}; o.Info = blob.read_shift(2); blob.l -= 2;\n\tif(o.Info === 1) o.Data = parse_RC4Header(blob, length);\n\telse o.Data = parse_RC4CryptoHeader(blob, length);\n\treturn o;\n}\nfunction parse_FilePass(blob, length/*:number*/, opts) {\n\tvar o = ({ Type: opts.biff >= 8 ? blob.read_shift(2) : 0 }/*:any*/); /* wEncryptionType */\n\tif(o.Type) parse_FilePassHeader(blob, length-2, o);\n\telse parse_XORObfuscation(blob, opts.biff >= 8 ? length : length - 2, opts, o);\n\treturn o;\n}\n\n\nvar RTF = /*#__PURE__*/(function() {\n\tfunction rtf_to_sheet(d/*:RawData*/, opts)/*:Worksheet*/ {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return rtf_to_sheet_str(Base64_decode(d), opts);\n\t\t\tcase 'binary': return rtf_to_sheet_str(d, opts);\n\t\t\tcase 'buffer': return rtf_to_sheet_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array':  return rtf_to_sheet_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\n\t/* TODO: this is a stub */\n\tfunction rtf_to_sheet_str(str/*:string*/, opts)/*:Worksheet*/ {\n\t\tvar o = opts || {};\n\t\tvar ws/*:Worksheet*/ = o.dense ? ([]/*:any*/) : ({}/*:any*/);\n\n\t\tvar rows = str.match(/\\\\trowd.*?\\\\row\\b/g);\n\t\tif(!rows.length) throw new Error(\"RTF missing table\");\n\t\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:0, r:rows.length - 1}}/*:any*/);\n\t\trows.forEach(function(rowtf, R) {\n\t\t\tif(Array.isArray(ws)) ws[R] = [];\n\t\t\tvar rtfre = /\\\\\\w+\\b/g;\n\t\t\tvar last_index = 0;\n\t\t\tvar res;\n\t\t\tvar C = -1;\n\t\t\twhile((res = rtfre.exec(rowtf))) {\n\t\t\t\tswitch(res[0]) {\n\t\t\t\t\tcase \"\\\\cell\":\n\t\t\t\t\t\tvar data = rowtf.slice(last_index, rtfre.lastIndex - res[0].length);\n\t\t\t\t\t\tif(data[0] == \" \") data = data.slice(1);\n\t\t\t\t\t\t++C;\n\t\t\t\t\t\tif(data.length) {\n\t\t\t\t\t\t\t// TODO: value parsing, including codepage adjustments\n\t\t\t\t\t\t\tvar cell = {v: data, t:\"s\"};\n\t\t\t\t\t\t\tif(Array.isArray(ws)) ws[R][C] = cell;\n\t\t\t\t\t\t\telse ws[encode_cell({r:R, c:C})] = cell;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlast_index = rtfre.lastIndex;\n\t\t\t}\n\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t});\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction rtf_to_workbook(d/*:RawData*/, opts)/*:Workbook*/ { return sheet_to_workbook(rtf_to_sheet(d, opts), opts); }\n\n\t/* TODO: this is a stub */\n\tfunction sheet_to_rtf(ws/*:Worksheet*//*::, opts*/)/*:string*/ {\n\t\tvar o = [\"{\\\\rtf1\\\\ansi\"];\n\t\tvar r = safe_decode_range(ws['!ref']), cell/*:Cell*/;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\to.push(\"\\\\trowd\\\\trautofit1\");\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) o.push(\"\\\\cellx\" + (C+1));\n\t\t\to.push(\"\\\\pard\\\\intbl\");\n\t\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || cell.v == null && (!cell.f || cell.F)) continue;\n\t\t\t\to.push(\" \" + (cell.w || (format_cell(cell), cell.w)));\n\t\t\t\to.push(\"\\\\cell\");\n\t\t\t}\n\t\t\to.push(\"\\\\pard\\\\intbl\\\\row\");\n\t\t}\n\t\treturn o.join(\"\") + \"}\";\n\t}\n\n\treturn {\n\t\tto_workbook: rtf_to_workbook,\n\t\tto_sheet: rtf_to_sheet,\n\t\tfrom_sheet: sheet_to_rtf\n\t};\n})();\nfunction hex2RGB(h) {\n\tvar o = h.slice(h[0]===\"#\"?1:0).slice(0,6);\n\treturn [parseInt(o.slice(0,2),16),parseInt(o.slice(2,4),16),parseInt(o.slice(4,6),16)];\n}\nfunction rgb2Hex(rgb) {\n\tfor(var i=0,o=1; i!=3; ++i) o = o*256 + (rgb[i]>255?255:rgb[i]<0?0:rgb[i]);\n\treturn o.toString(16).toUpperCase().slice(1);\n}\n\nfunction rgb2HSL(rgb) {\n\tvar R = rgb[0]/255, G = rgb[1]/255, B=rgb[2]/255;\n\tvar M = Math.max(R, G, B), m = Math.min(R, G, B), C = M - m;\n\tif(C === 0) return [0, 0, R];\n\n\tvar H6 = 0, S = 0, L2 = (M + m);\n\tS = C / (L2 > 1 ? 2 - L2 : L2);\n\tswitch(M){\n\t\tcase R: H6 = ((G - B) / C + 6)%6; break;\n\t\tcase G: H6 = ((B - R) / C + 2); break;\n\t\tcase B: H6 = ((R - G) / C + 4); break;\n\t}\n\treturn [H6 / 6, S, L2 / 2];\n}\n\nfunction hsl2RGB(hsl){\n\tvar H = hsl[0], S = hsl[1], L = hsl[2];\n\tvar C = S * 2 * (L < 0.5 ? L : 1 - L), m = L - C/2;\n\tvar rgb = [m,m,m], h6 = 6*H;\n\n\tvar X;\n\tif(S !== 0) switch(h6|0) {\n\t\tcase 0: case 6: X = C * h6; rgb[0] += C; rgb[1] += X; break;\n\t\tcase 1: X = C * (2 - h6);   rgb[0] += X; rgb[1] += C; break;\n\t\tcase 2: X = C * (h6 - 2);   rgb[1] += C; rgb[2] += X; break;\n\t\tcase 3: X = C * (4 - h6);   rgb[1] += X; rgb[2] += C; break;\n\t\tcase 4: X = C * (h6 - 4);   rgb[2] += C; rgb[0] += X; break;\n\t\tcase 5: X = C * (6 - h6);   rgb[2] += X; rgb[0] += C; break;\n\t}\n\tfor(var i = 0; i != 3; ++i) rgb[i] = Math.round(rgb[i]*255);\n\treturn rgb;\n}\n\n/* 18.8.3 bgColor tint algorithm */\nfunction rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}\n\n/* 18.3.1.13 width calculations */\n/* [MS-OI29500] 2.1.595 Column Width & Formatting */\nvar DEF_MDW = 6, MAX_MDW = 15, MIN_MDW = 1, MDW = DEF_MDW;\nfunction width2px(width) { return Math.floor(( width + (Math.round(128/MDW))/256 )* MDW ); }\nfunction px2char(px) { return (Math.floor((px - 5)/MDW * 100 + 0.5))/100; }\nfunction char2width(chr) { return (Math.round((chr * MDW + 5)/MDW*256))/256; }\n//function px2char_(px) { return (((px - 5)/MDW * 100 + 0.5))/100; }\n//function char2width_(chr) { return (((chr * MDW + 5)/MDW*256))/256; }\nfunction cycle_width(collw) { return char2width(px2char(width2px(collw))); }\n/* XLSX/XLSB/XLS specify width in units of MDW */\nfunction find_mdw_colw(collw) {\n\tvar delta = Math.abs(collw - cycle_width(collw)), _MDW = MDW;\n\tif(delta > 0.005) for(MDW=MIN_MDW; MDW<MAX_MDW; ++MDW) if(Math.abs(collw - cycle_width(collw)) <= delta) { delta = Math.abs(collw - cycle_width(collw)); _MDW = MDW; }\n\tMDW = _MDW;\n}\n/* XLML specifies width in terms of pixels */\n/*function find_mdw_wpx(wpx) {\n\tvar delta = Infinity, guess = 0, _MDW = MIN_MDW;\n\tfor(MDW=MIN_MDW; MDW<MAX_MDW; ++MDW) {\n\t\tguess = char2width_(px2char_(wpx))*256;\n\t\tguess = (guess) % 1;\n\t\tif(guess > 0.5) guess--;\n\t\tif(Math.abs(guess) < delta) { delta = Math.abs(guess); _MDW = MDW; }\n\t}\n\tMDW = _MDW;\n}*/\n\nfunction process_col(coll/*:ColInfo*/) {\n\tif(coll.width) {\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.MDW = MDW;\n\t} else if(coll.wpx) {\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.MDW = MDW;\n\t} else if(typeof coll.wch == 'number') {\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.MDW = MDW;\n\t}\n\tif(coll.customWidth) delete coll.customWidth;\n}\n\nvar DEF_PPI = 96, PPI = DEF_PPI;\nfunction px2pt(px) { return px * 96 / PPI; }\nfunction pt2px(pt) { return pt * PPI / 96; }\n\n/* [MS-EXSPXML3] 2.4.54 ST_enmPattern */\nvar XLMLPatternTypeMap = {\n\t\"None\": \"none\",\n\t\"Solid\": \"solid\",\n\t\"Gray50\": \"mediumGray\",\n\t\"Gray75\": \"darkGray\",\n\t\"Gray25\": \"lightGray\",\n\t\"HorzStripe\": \"darkHorizontal\",\n\t\"VertStripe\": \"darkVertical\",\n\t\"ReverseDiagStripe\": \"darkDown\",\n\t\"DiagStripe\": \"darkUp\",\n\t\"DiagCross\": \"darkGrid\",\n\t\"ThickDiagCross\": \"darkTrellis\",\n\t\"ThinHorzStripe\": \"lightHorizontal\",\n\t\"ThinVertStripe\": \"lightVertical\",\n\t\"ThinReverseDiagStripe\": \"lightDown\",\n\t\"ThinHorzCross\": \"lightGrid\"\n};\n\n/* 18.8.5 borders CT_Borders */\nfunction parse_borders(t, styles, themes, opts) {\n\tstyles.Borders = [];\n\tvar border = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<borders': case '<borders>': case '</borders>': break;\n\n\t\t\t/* 18.8.4 border CT_Border */\n\t\t\tcase '<border': case '<border>': case '<border/>':\n\t\t\t\tborder = /*::(*/{}/*:: :any)*/;\n\t\t\t\tif(y.diagonalUp) border.diagonalUp = parsexmlbool(y.diagonalUp);\n\t\t\t\tif(y.diagonalDown) border.diagonalDown = parsexmlbool(y.diagonalDown);\n\t\t\t\tstyles.Borders.push(border);\n\t\t\t\tbreak;\n\t\t\tcase '</border>': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '<left/>': break;\n\t\t\tcase '<left': case '<left>': break;\n\t\t\tcase '</left>': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '<right/>': break;\n\t\t\tcase '<right': case '<right>': break;\n\t\t\tcase '</right>': break;\n\n\t\t\t/* 18.8.43 top CT_BorderPr */\n\t\t\tcase '<top/>': break;\n\t\t\tcase '<top': case '<top>': break;\n\t\t\tcase '</top>': break;\n\n\t\t\t/* 18.8.6 bottom CT_BorderPr */\n\t\t\tcase '<bottom/>': break;\n\t\t\tcase '<bottom': case '<bottom>': break;\n\t\t\tcase '</bottom>': break;\n\n\t\t\t/* 18.8.13 diagonal CT_BorderPr */\n\t\t\tcase '<diagonal': case '<diagonal>': case '<diagonal/>': break;\n\t\t\tcase '</diagonal>': break;\n\n\t\t\t/* 18.8.25 horizontal CT_BorderPr */\n\t\t\tcase '<horizontal': case '<horizontal>': case '<horizontal/>': break;\n\t\t\tcase '</horizontal>': break;\n\n\t\t\t/* 18.8.44 vertical CT_BorderPr */\n\t\t\tcase '<vertical': case '<vertical>': case '<vertical/>': break;\n\t\t\tcase '</vertical>': break;\n\n\t\t\t/* 18.8.37 start CT_BorderPr */\n\t\t\tcase '<start': case '<start>': case '<start/>': break;\n\t\t\tcase '</start>': break;\n\n\t\t\t/* 18.8.16 end CT_BorderPr */\n\t\t\tcase '<end': case '<end>': case '<end/>': break;\n\t\t\tcase '</end>': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '<color': case '<color>':\n\t\t\t\tbreak;\n\t\t\tcase '<color/>': case '</color>': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': break;\n\t\t\tcase '<ext': pass = true; break;\n\t\t\tcase '</ext>': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in borders');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.21 fills CT_Fills */\nfunction parse_fills(t, styles, themes, opts) {\n\tstyles.Fills = [];\n\tvar fill = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<fills': case '<fills>': case '</fills>': break;\n\n\t\t\t/* 18.8.20 fill CT_Fill */\n\t\t\tcase '<fill>': case '<fill': case '<fill/>':\n\t\t\t\tfill = {}; styles.Fills.push(fill); break;\n\t\t\tcase '</fill>': break;\n\n\t\t\t/* 18.8.24 gradientFill CT_GradientFill */\n\t\t\tcase '<gradientFill>': break;\n\t\t\tcase '<gradientFill':\n\t\t\tcase '</gradientFill>': styles.Fills.push(fill); fill = {}; break;\n\n\t\t\t/* 18.8.32 patternFill CT_PatternFill */\n\t\t\tcase '<patternFill': case '<patternFill>':\n\t\t\t\tif(y.patternType) fill.patternType = y.patternType;\n\t\t\t\tbreak;\n\t\t\tcase '<patternFill/>': case '</patternFill>': break;\n\n\t\t\t/* 18.8.3 bgColor CT_Color */\n\t\t\tcase '<bgColor':\n\t\t\t\tif(!fill.bgColor) fill.bgColor = {};\n\t\t\t\tif(y.indexed) fill.bgColor.indexed = parseInt(y.indexed, 10);\n\t\t\t\tif(y.theme) fill.bgColor.theme = parseInt(y.theme, 10);\n\t\t\t\tif(y.tint) fill.bgColor.tint = parseFloat(y.tint);\n\t\t\t\t/* Excel uses ARGB strings */\n\t\t\t\tif(y.rgb) fill.bgColor.rgb = y.rgb.slice(-6);\n\t\t\t\tbreak;\n\t\t\tcase '<bgColor/>': case '</bgColor>': break;\n\n\t\t\t/* 18.8.19 fgColor CT_Color */\n\t\t\tcase '<fgColor':\n\t\t\t\tif(!fill.fgColor) fill.fgColor = {};\n\t\t\t\tif(y.theme) fill.fgColor.theme = parseInt(y.theme, 10);\n\t\t\t\tif(y.tint) fill.fgColor.tint = parseFloat(y.tint);\n\t\t\t\t/* Excel uses ARGB strings */\n\t\t\t\tif(y.rgb != null) fill.fgColor.rgb = y.rgb.slice(-6);\n\t\t\t\tbreak;\n\t\t\tcase '<fgColor/>': case '</fgColor>': break;\n\n\t\t\t/* 18.8.38 stop CT_GradientStop */\n\t\t\tcase '<stop': case '<stop/>': break;\n\t\t\tcase '</stop>': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '<color': case '<color/>': break;\n\t\t\tcase '</color>': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': break;\n\t\t\tcase '<ext': pass = true; break;\n\t\t\tcase '</ext>': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fills');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.23 fonts CT_Fonts */\nfunction parse_fonts(t, styles, themes, opts) {\n\tstyles.Fonts = [];\n\tvar font = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<fonts': case '<fonts>': case '</fonts>': break;\n\n\t\t\t/* 18.8.22 font CT_Font */\n\t\t\tcase '<font': case '<font>': break;\n\t\t\tcase '</font>': case '<font/>':\n\t\t\t\tstyles.Fonts.push(font);\n\t\t\t\tfont = {};\n\t\t\t\tbreak;\n\n\t\t\t/* 18.8.29 name CT_FontName */\n\t\t\tcase '<name': if(y.val) font.name = utf8read(y.val); break;\n\t\t\tcase '<name/>': case '</name>': break;\n\n\t\t\t/* 18.8.2  b CT_BooleanProperty */\n\t\t\tcase '<b': font.bold = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<b/>': font.bold = 1; break;\n\n\t\t\t/* 18.8.26 i CT_BooleanProperty */\n\t\t\tcase '<i': font.italic = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<i/>': font.italic = 1; break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '<u':\n\t\t\t\tswitch(y.val) {\n\t\t\t\t\tcase \"none\": font.underline = 0x00; break;\n\t\t\t\t\tcase \"single\": font.underline = 0x01; break;\n\t\t\t\t\tcase \"double\": font.underline = 0x02; break;\n\t\t\t\t\tcase \"singleAccounting\": font.underline = 0x21; break;\n\t\t\t\t\tcase \"doubleAccounting\": font.underline = 0x22; break;\n\t\t\t\t} break;\n\t\t\tcase '<u/>': font.underline = 1; break;\n\n\t\t\t/* 18.4.10 strike CT_BooleanProperty */\n\t\t\tcase '<strike': font.strike = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<strike/>': font.strike = 1; break;\n\n\t\t\t/* 18.4.2  outline CT_BooleanProperty */\n\t\t\tcase '<outline': font.outline = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<outline/>': font.outline = 1; break;\n\n\t\t\t/* 18.8.36 shadow CT_BooleanProperty */\n\t\t\tcase '<shadow': font.shadow = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<shadow/>': font.shadow = 1; break;\n\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\tcase '<condense': font.condense = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<condense/>': font.condense = 1; break;\n\n\t\t\t/* 18.8.17 extend CT_BooleanProperty */\n\t\t\tcase '<extend': font.extend = y.val ? parsexmlbool(y.val) : 1; break;\n\t\t\tcase '<extend/>': font.extend = 1; break;\n\n\t\t\t/* 18.4.11 sz CT_FontSize */\n\t\t\tcase '<sz': if(y.val) font.sz = +y.val; break;\n\t\t\tcase '<sz/>': case '</sz>': break;\n\n\t\t\t/* 18.4.14 vertAlign CT_VerticalAlignFontProperty */\n\t\t\tcase '<vertAlign': if(y.val) font.vertAlign = y.val; break;\n\t\t\tcase '<vertAlign/>': case '</vertAlign>': break;\n\n\t\t\t/* 18.8.18 family CT_FontFamily */\n\t\t\tcase '<family': if(y.val) font.family = parseInt(y.val,10); break;\n\t\t\tcase '<family/>': case '</family>': break;\n\n\t\t\t/* 18.8.35 scheme CT_FontScheme */\n\t\t\tcase '<scheme': if(y.val) font.scheme = y.val; break;\n\t\t\tcase '<scheme/>': case '</scheme>': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty */\n\t\t\tcase '<charset':\n\t\t\t\tif(y.val == '1') break;\n\t\t\t\ty.codepage = CS2CP[parseInt(y.val, 10)];\n\t\t\t\tbreak;\n\n\t\t\t/* 18.?.? color CT_Color */\n\t\t\tcase '<color':\n\t\t\t\tif(!font.color) font.color = {};\n\t\t\t\tif(y.auto) font.color.auto = parsexmlbool(y.auto);\n\n\t\t\t\tif(y.rgb) font.color.rgb = y.rgb.slice(-6);\n\t\t\t\telse if(y.indexed) {\n\t\t\t\t\tfont.color.index = parseInt(y.indexed, 10);\n\t\t\t\t\tvar icv = XLSIcv[font.color.index];\n\t\t\t\t\tif(font.color.index == 81) icv = XLSIcv[1];\n\t\t\t\t\tif(!icv) icv = XLSIcv[1]; //throw new Error(x); // note: 206 is valid\n\t\t\t\t\tfont.color.rgb = icv[0].toString(16) + icv[1].toString(16) + icv[2].toString(16);\n\t\t\t\t} else if(y.theme) {\n\t\t\t\t\tfont.color.theme = parseInt(y.theme, 10);\n\t\t\t\t\tif(y.tint) font.color.tint = parseFloat(y.tint);\n\t\t\t\t\tif(y.theme && themes.themeElements && themes.themeElements.clrScheme) {\n\t\t\t\t\t\tfont.color.rgb = rgb_tint(themes.themeElements.clrScheme[font.color.theme].rgb, font.color.tint || 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase '<color/>': case '</color>': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '<AlternateContent': pass = true; break;\n\t\t\tcase '</AlternateContent>': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': break;\n\t\t\tcase '<ext': pass = true; break;\n\t\t\tcase '</ext>': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fonts');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.31 numFmts CT_NumFmts */\nfunction parse_numFmts(t, styles, opts) {\n\tstyles.NumberFmt = [];\n\tvar k/*Array<number>*/ = (keys(table_fmt)/*:any*/);\n\tfor(var i=0; i < k.length; ++i) styles.NumberFmt[k[i]] = table_fmt[k[i]];\n\tvar m = t[0].match(tagregex);\n\tif(!m) return;\n\tfor(i=0; i < m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<numFmts': case '</numFmts>': case '<numFmts/>': case '<numFmts>': break;\n\t\t\tcase '<numFmt': {\n\t\t\t\tvar f=unescapexml(utf8read(y.formatCode)), j=parseInt(y.numFmtId,10);\n\t\t\t\tstyles.NumberFmt[j] = f;\n\t\t\t\tif(j>0) {\n\t\t\t\t\tif(j > 0x188) {\n\t\t\t\t\t\tfor(j = 0x188; j > 0x3c; --j) if(styles.NumberFmt[j] == null) break;\n\t\t\t\t\t\tstyles.NumberFmt[j] = f;\n\t\t\t\t\t}\n\t\t\t\t\tSSF_load(f,j);\n\t\t\t\t}\n\t\t\t} break;\n\t\t\tcase '</numFmt>': break;\n\t\t\tdefault: if(opts.WTF) throw new Error('unrecognized ' + y[0] + ' in numFmts');\n\t\t}\n\t}\n}\n\nfunction write_numFmts(NF/*:{[n:number|string]:string}*//*::, opts*/) {\n\tvar o = [\"<numFmts>\"];\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) o[o.length] = (writextag('numFmt',null,{numFmtId:i,formatCode:escapexml(NF[i])}));\n\t});\n\tif(o.length === 1) return \"\";\n\to[o.length] = (\"</numFmts>\");\n\to[0] = writextag('numFmts', null, { count:o.length-2 }).replace(\"/>\", \">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8.10 cellXfs CT_CellXfs */\nvar cellXF_uint = [ \"numFmtId\", \"fillId\", \"fontId\", \"borderId\", \"xfId\" ];\nvar cellXF_bool = [ \"applyAlignment\", \"applyBorder\", \"applyFill\", \"applyFont\", \"applyNumberFormat\", \"applyProtection\", \"pivotButton\", \"quotePrefix\" ];\nfunction parse_cellXfs(t, styles, opts) {\n\tstyles.CellXf = [];\n\tvar xf;\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x), i = 0;\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<cellXfs': case '<cellXfs>': case '<cellXfs/>': case '</cellXfs>': break;\n\n\t\t\t/* 18.8.45 xf CT_Xf */\n\t\t\tcase '<xf': case '<xf/>':\n\t\t\t\txf = y;\n\t\t\t\tdelete xf[0];\n\t\t\t\tfor(i = 0; i < cellXF_uint.length; ++i) if(xf[cellXF_uint[i]])\n\t\t\t\t\txf[cellXF_uint[i]] = parseInt(xf[cellXF_uint[i]], 10);\n\t\t\t\tfor(i = 0; i < cellXF_bool.length; ++i) if(xf[cellXF_bool[i]])\n\t\t\t\t\txf[cellXF_bool[i]] = parsexmlbool(xf[cellXF_bool[i]]);\n\t\t\t\tif(styles.NumberFmt && xf.numFmtId > 0x188) {\n\t\t\t\t\tfor(i = 0x188; i > 0x3c; --i) if(styles.NumberFmt[xf.numFmtId] == styles.NumberFmt[i]) { xf.numFmtId = i; break; }\n\t\t\t\t}\n\t\t\t\tstyles.CellXf.push(xf); break;\n\t\t\tcase '</xf>': break;\n\n\t\t\t/* 18.8.1 alignment CT_CellAlignment */\n\t\t\tcase '<alignment': case '<alignment/>':\n\t\t\t\tvar alignment = {};\n\t\t\t\tif(y.vertical) alignment.vertical = y.vertical;\n\t\t\t\tif(y.horizontal) alignment.horizontal = y.horizontal;\n\t\t\t\tif(y.textRotation != null) alignment.textRotation = y.textRotation;\n\t\t\t\tif(y.indent) alignment.indent = y.indent;\n\t\t\t\tif(y.wrapText) alignment.wrapText = parsexmlbool(y.wrapText);\n\t\t\t\txf.alignment = alignment;\n\t\t\t\tbreak;\n\t\t\tcase '</alignment>': break;\n\n\t\t\t/* 18.8.33 protection CT_CellProtection */\n\t\t\tcase '<protection':\n\t\t\t\tbreak;\n\t\t\tcase '</protection>': case '<protection/>': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '<AlternateContent': pass = true; break;\n\t\t\tcase '</AlternateContent>': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': break;\n\t\t\tcase '<ext': pass = true; break;\n\t\t\tcase '</ext>': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in cellXfs');\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction write_cellXfs(cellXfs)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\to[o.length] = (writextag('cellXfs',null));\n\tcellXfs.forEach(function(c) {\n\t\to[o.length] = (writextag('xf', null, c));\n\t});\n\to[o.length] = (\"</cellXfs>\");\n\tif(o.length === 2) return \"\";\n\to[0] = writextag('cellXfs',null, {count:o.length-2}).replace(\"/>\",\">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8 Styles CT_Stylesheet*/\nvar parse_sty_xml= /*#__PURE__*/(function make_pstyx() {\nvar numFmtRegex = /<(?:\\w+:)?numFmts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?numFmts>/;\nvar cellXfRegex = /<(?:\\w+:)?cellXfs([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?cellXfs>/;\nvar fillsRegex = /<(?:\\w+:)?fills([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fills>/;\nvar fontsRegex = /<(?:\\w+:)?fonts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fonts>/;\nvar bordersRegex = /<(?:\\w+:)?borders([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?borders>/;\n\nreturn function parse_sty_xml(data, themes, opts) {\n\tvar styles = {};\n\tif(!data) return styles;\n\tdata = data.replace(/<!--([\\s\\S]*?)-->/mg,\"\").replace(/<!DOCTYPE[^\\[]*\\[[^\\]]*\\]>/gm,\"\");\n\t/* 18.8.39 styleSheet CT_Stylesheet */\n\tvar t;\n\n\t/* 18.8.31 numFmts CT_NumFmts ? */\n\tif((t=data.match(numFmtRegex))) parse_numFmts(t, styles, opts);\n\n\t/* 18.8.23 fonts CT_Fonts ? */\n\tif((t=data.match(fontsRegex))) parse_fonts(t, styles, themes, opts);\n\n\t/* 18.8.21 fills CT_Fills ? */\n\tif((t=data.match(fillsRegex))) parse_fills(t, styles, themes, opts);\n\n\t/* 18.8.5  borders CT_Borders ? */\n\tif((t=data.match(bordersRegex))) parse_borders(t, styles, themes, opts);\n\n\t/* 18.8.9  cellStyleXfs CT_CellStyleXfs ? */\n\t/* 18.8.8  cellStyles CT_CellStyles ? */\n\n\t/* 18.8.10 cellXfs CT_CellXfs ? */\n\tif((t=data.match(cellXfRegex))) parse_cellXfs(t, styles, opts);\n\n\t/* 18.8.15 dxfs CT_Dxfs ? */\n\t/* 18.8.42 tableStyles CT_TableStyles ? */\n\t/* 18.8.11 colors CT_Colors ? */\n\t/* 18.2.10 extLst CT_ExtensionList ? */\n\n\treturn styles;\n};\n})();\n\nfunction write_sty_xml(wb/*:Workbook*/, opts)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('styleSheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:vt': XMLNS.vt\n\t})], w;\n\tif(wb.SSF && (w = write_numFmts(wb.SSF)) != null) o[o.length] = w;\n\to[o.length] = ('<fonts count=\"1\"><font><sz val=\"12\"/><color theme=\"1\"/><name val=\"Calibri\"/><family val=\"2\"/><scheme val=\"minor\"/></font></fonts>');\n\to[o.length] = ('<fills count=\"2\"><fill><patternFill patternType=\"none\"/></fill><fill><patternFill patternType=\"gray125\"/></fill></fills>');\n\to[o.length] = ('<borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>');\n\to[o.length] = ('<cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>');\n\tif((w = write_cellXfs(opts.cellXfs))) o[o.length] = (w);\n\to[o.length] = ('<cellStyles count=\"1\"><cellStyle name=\"Normal\" xfId=\"0\" builtinId=\"0\"/></cellStyles>');\n\to[o.length] = ('<dxfs count=\"0\"/>');\n\to[o.length] = ('<tableStyles count=\"0\" defaultTableStyle=\"TableStyleMedium9\" defaultPivotStyle=\"PivotStyleMedium4\"/>');\n\n\tif(o.length>2){ o[o.length] = ('</styleSheet>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.657 BrtFmt */\nfunction parse_BrtFmt(data, length/*:number*/) {\n\tvar numFmtId = data.read_shift(2);\n\tvar stFmtCode = parse_XLWideString(data,length-2);\n\treturn [numFmtId, stFmtCode];\n}\nfunction write_BrtFmt(i/*:number*/, f/*:string*/, o) {\n\tif(!o) o = new_buf(6 + 4 * f.length);\n\to.write_shift(2, i);\n\twrite_XLWideString(f, o);\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(o.l == null) o.l = o.length;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.4.659 BrtFont TODO */\nfunction parse_BrtFont(data, length/*:number*/, opts) {\n\tvar out = ({}/*:any*/);\n\n\tout.sz = data.read_shift(2) / 20;\n\n\tvar grbit = parse_FontFlags(data, 2, opts);\n\tif(grbit.fItalic) out.italic = 1;\n\tif(grbit.fCondense) out.condense = 1;\n\tif(grbit.fExtend) out.extend = 1;\n\tif(grbit.fShadow) out.shadow = 1;\n\tif(grbit.fOutline) out.outline = 1;\n\tif(grbit.fStrikeout) out.strike = 1;\n\n\tvar bls = data.read_shift(2);\n\tif(bls === 0x02BC) out.bold = 1;\n\n\tswitch(data.read_shift(2)) {\n\t\t/* case 0: out.vertAlign = \"baseline\"; break; */\n\t\tcase 1: out.vertAlign = \"superscript\"; break;\n\t\tcase 2: out.vertAlign = \"subscript\"; break;\n\t}\n\n\tvar underline = data.read_shift(1);\n\tif(underline != 0) out.underline = underline;\n\n\tvar family = data.read_shift(1);\n\tif(family > 0) out.family = family;\n\n\tvar bCharSet = data.read_shift(1);\n\tif(bCharSet > 0) out.charset = bCharSet;\n\n\tdata.l++;\n\tout.color = parse_BrtColor(data, 8);\n\n\tswitch(data.read_shift(1)) {\n\t\t/* case 0: out.scheme = \"none\": break; */\n\t\tcase 1: out.scheme = \"major\"; break;\n\t\tcase 2: out.scheme = \"minor\"; break;\n\t}\n\n\tout.name = parse_XLWideString(data, length - 21);\n\n\treturn out;\n}\nfunction write_BrtFont(font/*:any*/, o) {\n\tif(!o) o = new_buf(25+4*32);\n\to.write_shift(2, font.sz * 20);\n\twrite_FontFlags(font, o);\n\to.write_shift(2, font.bold ? 0x02BC : 0x0190);\n\tvar sss = 0;\n\tif(font.vertAlign == \"superscript\") sss = 1;\n\telse if(font.vertAlign == \"subscript\") sss = 2;\n\to.write_shift(2, sss);\n\to.write_shift(1, font.underline || 0);\n\to.write_shift(1, font.family || 0);\n\to.write_shift(1, font.charset || 0);\n\to.write_shift(1, 0);\n\twrite_BrtColor(font.color, o);\n\tvar scheme = 0;\n\tif(font.scheme == \"major\") scheme = 1;\n\tif(font.scheme == \"minor\") scheme = 2;\n\to.write_shift(1, scheme);\n\twrite_XLWideString(font.name, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.650 BrtFill */\nvar XLSBFillPTNames = [\n\t\"none\",\n\t\"solid\",\n\t\"mediumGray\",\n\t\"darkGray\",\n\t\"lightGray\",\n\t\"darkHorizontal\",\n\t\"darkVertical\",\n\t\"darkDown\",\n\t\"darkUp\",\n\t\"darkGrid\",\n\t\"darkTrellis\",\n\t\"lightHorizontal\",\n\t\"lightVertical\",\n\t\"lightDown\",\n\t\"lightUp\",\n\t\"lightGrid\",\n\t\"lightTrellis\",\n\t\"gray125\",\n\t\"gray0625\"\n];\nvar rev_XLSBFillPTNames/*:EvertNumType*/;\n/* TODO: gradient fill representation */\nvar parse_BrtFill = parsenoop;\nfunction write_BrtFill(fill, o) {\n\tif(!o) o = new_buf(4*3 + 8*7 + 16*1);\n\tif(!rev_XLSBFillPTNames) rev_XLSBFillPTNames = (evert(XLSBFillPTNames)/*:any*/);\n\tvar fls/*:number*/ = rev_XLSBFillPTNames[fill.patternType];\n\tif(fls == null) fls = 0x28;\n\to.write_shift(4, fls);\n\tvar j = 0;\n\tif(fls != 0x28) {\n\t\t/* TODO: custom FG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\t\t/* TODO: custom BG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0);\n\t} else {\n\t\tfor(; j < 4; ++j) o.write_shift(4, 0);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0); /* TODO */\n\t\t/* iGradientType */\n\t\t/* xnumDegree */\n\t\t/* xnumFillToLeft */\n\t\t/* xnumFillToRight */\n\t\t/* xnumFillToTop */\n\t\t/* xnumFillToBottom */\n\t\t/* cNumStop */\n\t\t/* xfillGradientStop */\n\t}\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.824 BrtXF */\nfunction parse_BrtXF(data, length/*:number*/) {\n\tvar tgt = data.l + length;\n\tvar ixfeParent = data.read_shift(2);\n\tvar ifmt = data.read_shift(2);\n\tdata.l = tgt;\n\treturn {ixfe:ixfeParent, numFmtId:ifmt };\n}\nfunction write_BrtXF(data, ixfeP, o) {\n\tif(!o) o = new_buf(16);\n\to.write_shift(2, ixfeP||0);\n\to.write_shift(2, data.numFmtId||0);\n\to.write_shift(2, 0); /* iFont */\n\to.write_shift(2, 0); /* iFill */\n\to.write_shift(2, 0); /* ixBorder */\n\to.write_shift(1, 0); /* trot */\n\to.write_shift(1, 0); /* indent */\n\tvar flow = 0;\n\to.write_shift(1, flow); /* flags */\n\to.write_shift(1, 0); /* flags */\n\to.write_shift(1, 0); /* xfGrbitAtr */\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.4 Blxf TODO */\nfunction write_Blxf(data, o) {\n\tif(!o) o = new_buf(10);\n\to.write_shift(1, 0); /* dg */\n\to.write_shift(1, 0);\n\to.write_shift(4, 0); /* color */\n\to.write_shift(4, 0); /* color */\n\treturn o;\n}\n/* [MS-XLSB] 2.4.302 BrtBorder TODO */\nvar parse_BrtBorder = parsenoop;\nfunction write_BrtBorder(border, o) {\n\tif(!o) o = new_buf(51);\n\to.write_shift(1, 0); /* diagonal */\n\twrite_Blxf(null, o); /* top */\n\twrite_Blxf(null, o); /* bottom */\n\twrite_Blxf(null, o); /* left */\n\twrite_Blxf(null, o); /* right */\n\twrite_Blxf(null, o); /* diag */\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.763 BrtStyle TODO */\nfunction write_BrtStyle(style, o) {\n\tif(!o) o = new_buf(12+4*10);\n\to.write_shift(4, style.xfId);\n\to.write_shift(2, 1);\n\to.write_shift(1, +style.builtinId);\n\to.write_shift(1, 0); /* iLevel */\n\twrite_XLNullableWideString(style.name || \"\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.272 BrtBeginTableStyles */\nfunction write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) {\n\tvar o = new_buf(4+256*2*4);\n\to.write_shift(4, cnt);\n\twrite_XLNullableWideString(defTableStyle, o);\n\twrite_XLNullableWideString(defPivotStyle, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction parse_sty_bin(data, themes, opts) {\n\tvar styles = {};\n\tstyles.NumberFmt = ([]/*:any*/);\n\tfor(var y in table_fmt) styles.NumberFmt[y] = table_fmt[y];\n\n\tstyles.CellXf = [];\n\tstyles.Fonts = [];\n\tvar state/*:Array<string>*/ = [];\n\tvar pass = false;\n\trecordhopper(data, function hopper_sty(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x002C: /* BrtFmt */\n\t\t\t\tstyles.NumberFmt[val[0]] = val[1]; SSF_load(val[1], val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x002B: /* BrtFont */\n\t\t\t\tstyles.Fonts.push(val);\n\t\t\t\tif(val.color.theme != null && themes && themes.themeElements && themes.themeElements.clrScheme) {\n\t\t\t\t\tval.color.rgb = rgb_tint(themes.themeElements.clrScheme[val.color.theme].rgb, val.color.tint || 0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0401: /* BrtKnownFonts */ break;\n\t\t\tcase 0x002D: /* BrtFill */\n\t\t\t\tbreak;\n\t\t\tcase 0x002E: /* BrtBorder */\n\t\t\t\tbreak;\n\t\t\tcase 0x002F: /* BrtXF */\n\t\t\t\tif(state[state.length - 1] == 0x0269 /* BrtBeginCellXFs */) {\n\t\t\t\t\tstyles.CellXf.push(val);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0030: /* BrtStyle */\n\t\t\tcase 0x01FB: /* BrtDXF */\n\t\t\tcase 0x023C: /* BrtMRUColor */\n\t\t\tcase 0x01DB: /* BrtIndexedColor */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0493: /* BrtDXF14 */\n\t\t\tcase 0x0836: /* BrtDXF15 */\n\t\t\tcase 0x046A: /* BrtSlicerStyleElement */\n\t\t\tcase 0x0200: /* BrtTableStyleElement */\n\t\t\tcase 0x082F: /* BrtTimelineStyleElement */\n\t\t\tcase 0x0C00: /* BrtUid */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* BrtFRTBegin */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* BrtFRTEnd */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* BrtACBegin */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* BrtACEnd */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T > 0) state.push(RT);\n\t\t\t\telse if(R.T < 0) state.pop();\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != 0x0025 /* BrtACBegin */)) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn styles;\n}\n\nfunction write_FMTS_bin(ba, NF/*:?SSFTable*/) {\n\tif(!NF) return;\n\tvar cnt = 0;\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\t/*:: if(!NF) return; */\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) ++cnt;\n\t});\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0267 /* BrtBeginFmts */, write_UInt32LE(cnt));\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\t/*:: if(!NF) return; */\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) write_record(ba, 0x002C /* BrtFmt */, write_BrtFmt(i, NF[i]));\n\t});\n\twrite_record(ba, 0x0268 /* BrtEndFmts */);\n}\n\nfunction write_FONTS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0263 /* BrtBeginFonts */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002B /* BrtFont */, write_BrtFont({\n\t\tsz:12,\n\t\tcolor: {theme:1},\n\t\tname: \"Calibri\",\n\t\tfamily: 2,\n\t\tscheme: \"minor\"\n\t}));\n\t/* 1*65491BrtFont [ACFONTS] */\n\twrite_record(ba, 0x0264 /* BrtEndFonts */);\n}\n\nfunction write_FILLS_bin(ba/*::, data*/) {\n\tvar cnt = 2;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x025B /* BrtBeginFills */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002D /* BrtFill */, write_BrtFill({patternType:\"none\"}));\n\twrite_record(ba, 0x002D /* BrtFill */, write_BrtFill({patternType:\"gray125\"}));\n\t/* 1*65431BrtFill */\n\twrite_record(ba, 0x025C /* BrtEndFills */);\n}\n\nfunction write_BORDERS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, 0x0265 /* BrtBeginBorders */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002E /* BrtBorder */, write_BrtBorder({}));\n\t/* 1*65430BrtBorder */\n\twrite_record(ba, 0x0266 /* BrtEndBorders */);\n}\n\nfunction write_CELLSTYLEXFS_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\twrite_record(ba, 0x0272 /* BrtBeginCellStyleXFs */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x002F /* BrtXF */, write_BrtXF({\n\t\tnumFmtId: 0,\n\t\tfontId:   0,\n\t\tfillId:   0,\n\t\tborderId: 0\n\t}, 0xFFFF));\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, 0x0273 /* BrtEndCellStyleXFs */);\n}\n\nfunction write_CELLXFS_bin(ba, data) {\n\twrite_record(ba, 0x0269 /* BrtBeginCellXFs */, write_UInt32LE(data.length));\n\tdata.forEach(function(c) { write_record(ba, 0x002F /* BrtXF */, write_BrtXF(c,0)); });\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, 0x026A /* BrtEndCellXFs */);\n}\n\nfunction write_STYLES_bin(ba/*::, data*/) {\n\tvar cnt = 1;\n\n\twrite_record(ba, 0x026B /* BrtBeginStyles */, write_UInt32LE(cnt));\n\twrite_record(ba, 0x0030 /* BrtStyle */, write_BrtStyle({\n\t\txfId:0,\n\t\tbuiltinId:0,\n\t\tname:\"Normal\"\n\t}));\n\t/* 1*65430(BrtStyle *FRT) */\n\twrite_record(ba, 0x026C /* BrtEndStyles */);\n}\n\nfunction write_DXFS_bin(ba/*::, data*/) {\n\tvar cnt = 0;\n\n\twrite_record(ba, 0x01F9 /* BrtBeginDXFs */, write_UInt32LE(cnt));\n\t/* *2147483647(BrtDXF *FRT) */\n\twrite_record(ba, 0x01FA /* BrtEndDXFs */);\n}\n\nfunction write_TABLESTYLES_bin(ba/*::, data*/) {\n\tvar cnt = 0;\n\n\twrite_record(ba, 0x01FC /* BrtBeginTableStyles */, write_BrtBeginTableStyles(cnt, \"TableStyleMedium9\", \"PivotStyleMedium4\"));\n\t/* *TABLESTYLE */\n\twrite_record(ba, 0x01FD /* BrtEndTableStyles */);\n}\n\nfunction write_COLORPALETTE_bin(/*::ba, data*/) {\n\treturn;\n\t/* BrtBeginColorPalette [INDEXEDCOLORS] [MRUCOLORS] BrtEndColorPalette */\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction write_sty_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0116 /* BrtBeginStyleSheet */);\n\twrite_FMTS_bin(ba, wb.SSF);\n\twrite_FONTS_bin(ba, wb);\n\twrite_FILLS_bin(ba, wb);\n\twrite_BORDERS_bin(ba, wb);\n\twrite_CELLSTYLEXFS_bin(ba, wb);\n\twrite_CELLXFS_bin(ba, opts.cellXfs);\n\twrite_STYLES_bin(ba, wb);\n\twrite_DXFS_bin(ba, wb);\n\twrite_TABLESTYLES_bin(ba, wb);\n\twrite_COLORPALETTE_bin(ba, wb);\n\t/* FRTSTYLESHEET*/\n\twrite_record(ba, 0x0117 /* BrtEndStyleSheet */);\n\treturn ba.end();\n}\n/* Even though theme layout is dk1 lt1 dk2 lt2, true order is lt1 dk1 lt2 dk2 */\nvar XLSXThemeClrScheme = [\n\t'</a:lt1>', '</a:dk1>', '</a:lt2>', '</a:dk2>',\n\t'</a:accent1>', '</a:accent2>', '</a:accent3>',\n\t'</a:accent4>', '</a:accent5>', '</a:accent6>',\n\t'</a:hlink>', '</a:folHlink>'\n];\n/* 20.1.6.2 clrScheme CT_ColorScheme */\nfunction parse_clrScheme(t, themes, opts) {\n\tthemes.themeElements.clrScheme = [];\n\tvar color = {};\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\t/* 20.1.6.2 clrScheme (Color Scheme) CT_ColorScheme */\n\t\t\tcase '<a:clrScheme': case '</a:clrScheme>': break;\n\n\t\t\t/* 20.1.2.3.32 srgbClr CT_SRgbColor */\n\t\t\tcase '<a:srgbClr':\n\t\t\t\tcolor.rgb = y.val; break;\n\n\t\t\t/* 20.1.2.3.33 sysClr CT_SystemColor */\n\t\t\tcase '<a:sysClr':\n\t\t\t\tcolor.rgb = y.lastClr; break;\n\n\t\t\t/* 20.1.4.1.1 accent1 (Accent 1) */\n\t\t\t/* 20.1.4.1.2 accent2 (Accent 2) */\n\t\t\t/* 20.1.4.1.3 accent3 (Accent 3) */\n\t\t\t/* 20.1.4.1.4 accent4 (Accent 4) */\n\t\t\t/* 20.1.4.1.5 accent5 (Accent 5) */\n\t\t\t/* 20.1.4.1.6 accent6 (Accent 6) */\n\t\t\t/* 20.1.4.1.9 dk1 (Dark 1) */\n\t\t\t/* 20.1.4.1.10 dk2 (Dark 2) */\n\t\t\t/* 20.1.4.1.15 folHlink (Followed Hyperlink) */\n\t\t\t/* 20.1.4.1.19 hlink (Hyperlink) */\n\t\t\t/* 20.1.4.1.22 lt1 (Light 1) */\n\t\t\t/* 20.1.4.1.23 lt2 (Light 2) */\n\t\t\tcase '<a:dk1>': case '</a:dk1>':\n\t\t\tcase '<a:lt1>': case '</a:lt1>':\n\t\t\tcase '<a:dk2>': case '</a:dk2>':\n\t\t\tcase '<a:lt2>': case '</a:lt2>':\n\t\t\tcase '<a:accent1>': case '</a:accent1>':\n\t\t\tcase '<a:accent2>': case '</a:accent2>':\n\t\t\tcase '<a:accent3>': case '</a:accent3>':\n\t\t\tcase '<a:accent4>': case '</a:accent4>':\n\t\t\tcase '<a:accent5>': case '</a:accent5>':\n\t\t\tcase '<a:accent6>': case '</a:accent6>':\n\t\t\tcase '<a:hlink>': case '</a:hlink>':\n\t\t\tcase '<a:folHlink>': case '</a:folHlink>':\n\t\t\t\tif (y[0].charAt(1) === '/') {\n\t\t\t\t\tthemes.themeElements.clrScheme[XLSXThemeClrScheme.indexOf(y[0])] = color;\n\t\t\t\t\tcolor = {};\n\t\t\t\t} else {\n\t\t\t\t\tcolor.name = y[0].slice(3, y[0].length - 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault: if(opts && opts.WTF) throw new Error('Unrecognized ' + y[0] + ' in clrScheme');\n\t\t}\n\t});\n}\n\n/* 20.1.4.1.18 fontScheme CT_FontScheme */\nfunction parse_fontScheme(/*::t, themes, opts*/) { }\n\n/* 20.1.4.1.15 fmtScheme CT_StyleMatrix */\nfunction parse_fmtScheme(/*::t, themes, opts*/) { }\n\nvar clrsregex = /<a:clrScheme([^>]*)>[\\s\\S]*<\\/a:clrScheme>/;\nvar fntsregex = /<a:fontScheme([^>]*)>[\\s\\S]*<\\/a:fontScheme>/;\nvar fmtsregex = /<a:fmtScheme([^>]*)>[\\s\\S]*<\\/a:fmtScheme>/;\n\n/* 20.1.6.10 themeElements CT_BaseStyles */\nfunction parse_themeElements(data, themes, opts) {\n\tthemes.themeElements = {};\n\n\tvar t;\n\n\t[\n\t\t/* clrScheme CT_ColorScheme */\n\t\t['clrScheme', clrsregex, parse_clrScheme],\n\t\t/* fontScheme CT_FontScheme */\n\t\t['fontScheme', fntsregex, parse_fontScheme],\n\t\t/* fmtScheme CT_StyleMatrix */\n\t\t['fmtScheme', fmtsregex, parse_fmtScheme]\n\t].forEach(function(m) {\n\t\tif(!(t=data.match(m[1]))) throw new Error(m[0] + ' not found in themeElements');\n\t\tm[2](t, themes, opts);\n\t});\n}\n\nvar themeltregex = /<a:themeElements([^>]*)>[\\s\\S]*<\\/a:themeElements>/;\n\n/* 14.2.7 Theme Part */\nfunction parse_theme_xml(data/*:string*/, opts) {\n\t/* 20.1.6.9 theme CT_OfficeStyleSheet */\n\tif(!data || data.length === 0) data = write_theme();\n\n\tvar t;\n\tvar themes = {};\n\n\t/* themeElements CT_BaseStyles */\n\tif(!(t=data.match(themeltregex))) throw new Error('themeElements not found in theme');\n\tparse_themeElements(t[0], themes, opts);\n\tthemes.raw = data;\n\treturn themes;\n}\n\nfunction write_theme(Themes, opts)/*:string*/ {\n\tif(opts && opts.themeXLSX) return opts.themeXLSX;\n\tif(Themes && typeof Themes.raw == \"string\") return Themes.raw;\n\tvar o = [XML_HEADER];\n\to[o.length] = '<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"Office Theme\">';\n\to[o.length] =  '<a:themeElements>';\n\n\to[o.length] =   '<a:clrScheme name=\"Office\">';\n\to[o.length] =    '<a:dk1><a:sysClr val=\"windowText\" lastClr=\"000000\"/></a:dk1>';\n\to[o.length] =    '<a:lt1><a:sysClr val=\"window\" lastClr=\"FFFFFF\"/></a:lt1>';\n\to[o.length] =    '<a:dk2><a:srgbClr val=\"1F497D\"/></a:dk2>';\n\to[o.length] =    '<a:lt2><a:srgbClr val=\"EEECE1\"/></a:lt2>';\n\to[o.length] =    '<a:accent1><a:srgbClr val=\"4F81BD\"/></a:accent1>';\n\to[o.length] =    '<a:accent2><a:srgbClr val=\"C0504D\"/></a:accent2>';\n\to[o.length] =    '<a:accent3><a:srgbClr val=\"9BBB59\"/></a:accent3>';\n\to[o.length] =    '<a:accent4><a:srgbClr val=\"8064A2\"/></a:accent4>';\n\to[o.length] =    '<a:accent5><a:srgbClr val=\"4BACC6\"/></a:accent5>';\n\to[o.length] =    '<a:accent6><a:srgbClr val=\"F79646\"/></a:accent6>';\n\to[o.length] =    '<a:hlink><a:srgbClr val=\"0000FF\"/></a:hlink>';\n\to[o.length] =    '<a:folHlink><a:srgbClr val=\"800080\"/></a:folHlink>';\n\to[o.length] =   '</a:clrScheme>';\n\n\to[o.length] =   '<a:fontScheme name=\"Office\">';\n\to[o.length] =    '<a:majorFont>';\n\to[o.length] =     '<a:latin typeface=\"Cambria\"/>';\n\to[o.length] =     '<a:ea typeface=\"\"/>';\n\to[o.length] =     '<a:cs typeface=\"\"/>';\n\to[o.length] =     '<a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/>';\n\to[o.length] =     '<a:font script=\"Hang\" typeface=\"맑은 고딕\"/>';\n\to[o.length] =     '<a:font script=\"Hans\" typeface=\"宋体\"/>';\n\to[o.length] =     '<a:font script=\"Hant\" typeface=\"新細明體\"/>';\n\to[o.length] =     '<a:font script=\"Arab\" typeface=\"Times New Roman\"/>';\n\to[o.length] =     '<a:font script=\"Hebr\" typeface=\"Times New Roman\"/>';\n\to[o.length] =     '<a:font script=\"Thai\" typeface=\"Tahoma\"/>';\n\to[o.length] =     '<a:font script=\"Ethi\" typeface=\"Nyala\"/>';\n\to[o.length] =     '<a:font script=\"Beng\" typeface=\"Vrinda\"/>';\n\to[o.length] =     '<a:font script=\"Gujr\" typeface=\"Shruti\"/>';\n\to[o.length] =     '<a:font script=\"Khmr\" typeface=\"MoolBoran\"/>';\n\to[o.length] =     '<a:font script=\"Knda\" typeface=\"Tunga\"/>';\n\to[o.length] =     '<a:font script=\"Guru\" typeface=\"Raavi\"/>';\n\to[o.length] =     '<a:font script=\"Cans\" typeface=\"Euphemia\"/>';\n\to[o.length] =     '<a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/>';\n\to[o.length] =     '<a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/>';\n\to[o.length] =     '<a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/>';\n\to[o.length] =     '<a:font script=\"Thaa\" typeface=\"MV Boli\"/>';\n\to[o.length] =     '<a:font script=\"Deva\" typeface=\"Mangal\"/>';\n\to[o.length] =     '<a:font script=\"Telu\" typeface=\"Gautami\"/>';\n\to[o.length] =     '<a:font script=\"Taml\" typeface=\"Latha\"/>';\n\to[o.length] =     '<a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/>';\n\to[o.length] =     '<a:font script=\"Orya\" typeface=\"Kalinga\"/>';\n\to[o.length] =     '<a:font script=\"Mlym\" typeface=\"Kartika\"/>';\n\to[o.length] =     '<a:font script=\"Laoo\" typeface=\"DokChampa\"/>';\n\to[o.length] =     '<a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/>';\n\to[o.length] =     '<a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/>';\n\to[o.length] =     '<a:font script=\"Viet\" typeface=\"Times New Roman\"/>';\n\to[o.length] =     '<a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/>';\n\to[o.length] =     '<a:font script=\"Geor\" typeface=\"Sylfaen\"/>';\n\to[o.length] =    '</a:majorFont>';\n\to[o.length] =    '<a:minorFont>';\n\to[o.length] =     '<a:latin typeface=\"Calibri\"/>';\n\to[o.length] =     '<a:ea typeface=\"\"/>';\n\to[o.length] =     '<a:cs typeface=\"\"/>';\n\to[o.length] =     '<a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/>';\n\to[o.length] =     '<a:font script=\"Hang\" typeface=\"맑은 고딕\"/>';\n\to[o.length] =     '<a:font script=\"Hans\" typeface=\"宋体\"/>';\n\to[o.length] =     '<a:font script=\"Hant\" typeface=\"新細明體\"/>';\n\to[o.length] =     '<a:font script=\"Arab\" typeface=\"Arial\"/>';\n\to[o.length] =     '<a:font script=\"Hebr\" typeface=\"Arial\"/>';\n\to[o.length] =     '<a:font script=\"Thai\" typeface=\"Tahoma\"/>';\n\to[o.length] =     '<a:font script=\"Ethi\" typeface=\"Nyala\"/>';\n\to[o.length] =     '<a:font script=\"Beng\" typeface=\"Vrinda\"/>';\n\to[o.length] =     '<a:font script=\"Gujr\" typeface=\"Shruti\"/>';\n\to[o.length] =     '<a:font script=\"Khmr\" typeface=\"DaunPenh\"/>';\n\to[o.length] =     '<a:font script=\"Knda\" typeface=\"Tunga\"/>';\n\to[o.length] =     '<a:font script=\"Guru\" typeface=\"Raavi\"/>';\n\to[o.length] =     '<a:font script=\"Cans\" typeface=\"Euphemia\"/>';\n\to[o.length] =     '<a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/>';\n\to[o.length] =     '<a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/>';\n\to[o.length] =     '<a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/>';\n\to[o.length] =     '<a:font script=\"Thaa\" typeface=\"MV Boli\"/>';\n\to[o.length] =     '<a:font script=\"Deva\" typeface=\"Mangal\"/>';\n\to[o.length] =     '<a:font script=\"Telu\" typeface=\"Gautami\"/>';\n\to[o.length] =     '<a:font script=\"Taml\" typeface=\"Latha\"/>';\n\to[o.length] =     '<a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/>';\n\to[o.length] =     '<a:font script=\"Orya\" typeface=\"Kalinga\"/>';\n\to[o.length] =     '<a:font script=\"Mlym\" typeface=\"Kartika\"/>';\n\to[o.length] =     '<a:font script=\"Laoo\" typeface=\"DokChampa\"/>';\n\to[o.length] =     '<a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/>';\n\to[o.length] =     '<a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/>';\n\to[o.length] =     '<a:font script=\"Viet\" typeface=\"Arial\"/>';\n\to[o.length] =     '<a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/>';\n\to[o.length] =     '<a:font script=\"Geor\" typeface=\"Sylfaen\"/>';\n\to[o.length] =    '</a:minorFont>';\n\to[o.length] =   '</a:fontScheme>';\n\n\to[o.length] =   '<a:fmtScheme name=\"Office\">';\n\to[o.length] =    '<a:fillStyleLst>';\n\to[o.length] =     '<a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>';\n\to[o.length] =     '<a:gradFill rotWithShape=\"1\">';\n\to[o.length] =      '<a:gsLst>';\n\to[o.length] =       '<a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"50000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"35000\"><a:schemeClr val=\"phClr\"><a:tint val=\"37000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:tint val=\"15000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs>';\n\to[o.length] =      '</a:gsLst>';\n\to[o.length] =      '<a:lin ang=\"16200000\" scaled=\"1\"/>';\n\to[o.length] =     '</a:gradFill>';\n\to[o.length] =     '<a:gradFill rotWithShape=\"1\">';\n\to[o.length] =      '<a:gsLst>';\n\to[o.length] =       '<a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"100000\"/><a:shade val=\"100000\"/><a:satMod val=\"130000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:tint val=\"50000\"/><a:shade val=\"100000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs>';\n\to[o.length] =      '</a:gsLst>';\n\to[o.length] =      '<a:lin ang=\"16200000\" scaled=\"0\"/>';\n\to[o.length] =     '</a:gradFill>';\n\to[o.length] =    '</a:fillStyleLst>';\n\to[o.length] =    '<a:lnStyleLst>';\n\to[o.length] =     '<a:ln w=\"9525\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"><a:shade val=\"95000\"/><a:satMod val=\"105000\"/></a:schemeClr></a:solidFill><a:prstDash val=\"solid\"/></a:ln>';\n\to[o.length] =     '<a:ln w=\"25400\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln>';\n\to[o.length] =     '<a:ln w=\"38100\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln>';\n\to[o.length] =    '</a:lnStyleLst>';\n\to[o.length] =    '<a:effectStyleLst>';\n\to[o.length] =     '<a:effectStyle>';\n\to[o.length] =      '<a:effectLst>';\n\to[o.length] =       '<a:outerShdw blurRad=\"40000\" dist=\"20000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"38000\"/></a:srgbClr></a:outerShdw>';\n\to[o.length] =      '</a:effectLst>';\n\to[o.length] =     '</a:effectStyle>';\n\to[o.length] =     '<a:effectStyle>';\n\to[o.length] =      '<a:effectLst>';\n\to[o.length] =       '<a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw>';\n\to[o.length] =      '</a:effectLst>';\n\to[o.length] =     '</a:effectStyle>';\n\to[o.length] =     '<a:effectStyle>';\n\to[o.length] =      '<a:effectLst>';\n\to[o.length] =       '<a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw>';\n\to[o.length] =      '</a:effectLst>';\n\to[o.length] =      '<a:scene3d><a:camera prst=\"orthographicFront\"><a:rot lat=\"0\" lon=\"0\" rev=\"0\"/></a:camera><a:lightRig rig=\"threePt\" dir=\"t\"><a:rot lat=\"0\" lon=\"0\" rev=\"1200000\"/></a:lightRig></a:scene3d>';\n\to[o.length] =      '<a:sp3d><a:bevelT w=\"63500\" h=\"25400\"/></a:sp3d>';\n\to[o.length] =     '</a:effectStyle>';\n\to[o.length] =    '</a:effectStyleLst>';\n\to[o.length] =    '<a:bgFillStyleLst>';\n\to[o.length] =     '<a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>';\n\to[o.length] =     '<a:gradFill rotWithShape=\"1\">';\n\to[o.length] =      '<a:gsLst>';\n\to[o.length] =       '<a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"40000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"40000\"><a:schemeClr val=\"phClr\"><a:tint val=\"45000\"/><a:shade val=\"99000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"20000\"/><a:satMod val=\"255000\"/></a:schemeClr></a:gs>';\n\to[o.length] =      '</a:gsLst>';\n\to[o.length] =      '<a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"-80000\" r=\"50000\" b=\"180000\"/></a:path>';\n\to[o.length] =     '</a:gradFill>';\n\to[o.length] =     '<a:gradFill rotWithShape=\"1\">';\n\to[o.length] =      '<a:gsLst>';\n\to[o.length] =       '<a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"80000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs>';\n\to[o.length] =       '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"30000\"/><a:satMod val=\"200000\"/></a:schemeClr></a:gs>';\n\to[o.length] =      '</a:gsLst>';\n\to[o.length] =      '<a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"50000\" r=\"50000\" b=\"50000\"/></a:path>';\n\to[o.length] =     '</a:gradFill>';\n\to[o.length] =    '</a:bgFillStyleLst>';\n\to[o.length] =   '</a:fmtScheme>';\n\to[o.length] =  '</a:themeElements>';\n\n\to[o.length] =  '<a:objectDefaults>';\n\to[o.length] =   '<a:spDef>';\n\to[o.length] =    '<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx=\"1\"><a:schemeClr val=\"accent1\"/></a:lnRef><a:fillRef idx=\"3\"><a:schemeClr val=\"accent1\"/></a:fillRef><a:effectRef idx=\"2\"><a:schemeClr val=\"accent1\"/></a:effectRef><a:fontRef idx=\"minor\"><a:schemeClr val=\"lt1\"/></a:fontRef></a:style>';\n\to[o.length] =   '</a:spDef>';\n\to[o.length] =   '<a:lnDef>';\n\to[o.length] =    '<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx=\"2\"><a:schemeClr val=\"accent1\"/></a:lnRef><a:fillRef idx=\"0\"><a:schemeClr val=\"accent1\"/></a:fillRef><a:effectRef idx=\"1\"><a:schemeClr val=\"accent1\"/></a:effectRef><a:fontRef idx=\"minor\"><a:schemeClr val=\"tx1\"/></a:fontRef></a:style>';\n\to[o.length] =   '</a:lnDef>';\n\to[o.length] =  '</a:objectDefaults>';\n\to[o.length] =  '<a:extraClrSchemeLst/>';\n\to[o.length] = '</a:theme>';\n\treturn o.join(\"\");\n}\n/* [MS-XLS] 2.4.326 TODO: payload is a zip file */\nfunction parse_Theme(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar dwThemeVersion = blob.read_shift(4);\n\tif(dwThemeVersion === 124226) return;\n\tif(!opts.cellStyles) { blob.l = end; return; }\n\tvar data = blob.slice(blob.l);\n\tblob.l = end;\n\tvar zip; try { zip = zip_read(data, {type: \"array\"}); } catch(e) { return; }\n\tvar themeXML = getzipstr(zip, \"theme/theme/theme1.xml\", true);\n\tif(!themeXML) return;\n\treturn parse_theme_xml(themeXML, opts);\n}\n\n/* 2.5.49 */\nfunction parse_ColorTheme(blob/*::, length*/) { return blob.read_shift(4); }\n\n/* 2.5.155 */\nfunction parse_FullColorExt(blob/*::, length*/) {\n\tvar o = {};\n\to.xclrType = blob.read_shift(2);\n\to.nTintShade = blob.read_shift(2);\n\tswitch(o.xclrType) {\n\t\tcase 0: blob.l += 4; break;\n\t\tcase 1: o.xclrValue = parse_IcvXF(blob, 4); break;\n\t\tcase 2: o.xclrValue = parse_LongRGBA(blob, 4); break;\n\t\tcase 3: o.xclrValue = parse_ColorTheme(blob, 4); break;\n\t\tcase 4: blob.l += 4; break;\n\t}\n\tblob.l += 8;\n\treturn o;\n}\n\n/* 2.5.164 TODO: read 7 bits*/\nfunction parse_IcvXF(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* 2.5.280 */\nfunction parse_XFExtGradient(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* [MS-XLS] 2.5.108 */\nfunction parse_ExtProp(blob/*::, length*/)/*:Array<any>*/ {\n\tvar extType = blob.read_shift(2);\n\tvar cb = blob.read_shift(2) - 4;\n\tvar o = [extType];\n\tswitch(extType) {\n\t\tcase 0x04: case 0x05: case 0x07: case 0x08:\n\t\tcase 0x09: case 0x0A: case 0x0B: case 0x0D:\n\t\t\to[1] = parse_FullColorExt(blob, cb); break;\n\t\tcase 0x06: o[1] = parse_XFExtGradient(blob, cb); break;\n\t\tcase 0x0E: case 0x0F: o[1] = blob.read_shift(cb === 1 ? 1 : 2); break;\n\t\tdefault: throw new Error(\"Unrecognized ExtProp type: \" + extType + \" \" + cb);\n\t}\n\treturn o;\n}\n\n/* 2.4.355 */\nfunction parse_XFExt(blob, length) {\n\tvar end = blob.l + length;\n\tblob.l += 2;\n\tvar ixfe = blob.read_shift(2);\n\tblob.l += 2;\n\tvar cexts = blob.read_shift(2);\n\tvar ext/*:AOA*/ = [];\n\twhile(cexts-- > 0) ext.push(parse_ExtProp(blob, end-blob.l));\n\treturn {ixfe:ixfe, ext:ext};\n}\n\n/* xf is an XF, see parse_XFExt for xfext */\nfunction update_xfext(xf, xfext) {\n\txfext.forEach(function(xfe) {\n\t\tswitch(xfe[0]) { /* 2.5.108 extPropData */\n\t\t\tcase 0x04: break; /* foreground color */\n\t\t\tcase 0x05: break; /* background color */\n\t\t\tcase 0x06: break; /* gradient fill */\n\t\t\tcase 0x07: break; /* top cell border color */\n\t\t\tcase 0x08: break; /* bottom cell border color */\n\t\t\tcase 0x09: break; /* left cell border color */\n\t\t\tcase 0x0a: break; /* right cell border color */\n\t\t\tcase 0x0b: break; /* diagonal cell border color */\n\t\t\tcase 0x0d: /* text color */\n\t\t\t\tbreak;\n\t\t\tcase 0x0e: break; /* font scheme */\n\t\t\tcase 0x0f: break; /* indentation level */\n\t\t}\n\t});\n}\n\nfunction parse_BrtMdtinfo(data, length) {\n  return {\n    flags: data.read_shift(4),\n    version: data.read_shift(4),\n    name: parse_XLWideString(data, length - 8)\n  };\n}\nfunction write_BrtMdtinfo(data) {\n  var o = new_buf(12 + 2 * data.name.length);\n  o.write_shift(4, data.flags);\n  o.write_shift(4, data.version);\n  write_XLWideString(data.name, o);\n  return o.slice(0, o.l);\n}\nfunction parse_BrtMdb(data) {\n  var out = [];\n  var cnt = data.read_shift(4);\n  while (cnt-- > 0)\n    out.push([data.read_shift(4), data.read_shift(4)]);\n  return out;\n}\nfunction write_BrtMdb(mdb) {\n  var o = new_buf(4 + 8 * mdb.length);\n  o.write_shift(4, mdb.length);\n  for (var i = 0; i < mdb.length; ++i) {\n    o.write_shift(4, mdb[i][0]);\n    o.write_shift(4, mdb[i][1]);\n  }\n  return o;\n}\nfunction write_BrtBeginEsfmd(cnt, name) {\n  var o = new_buf(8 + 2 * name.length);\n  o.write_shift(4, cnt);\n  write_XLWideString(name, o);\n  return o.slice(0, o.l);\n}\nfunction parse_BrtBeginEsmdb(data) {\n  data.l += 4;\n  return data.read_shift(4) != 0;\n}\nfunction write_BrtBeginEsmdb(cnt, cm) {\n  var o = new_buf(8);\n  o.write_shift(4, cnt);\n  o.write_shift(4, cm ? 1 : 0);\n  return o;\n}\nfunction parse_xlmeta_bin(data, name, _opts) {\n  var out = { Types: [], Cell: [], Value: [] };\n  var opts = _opts || {};\n  var state = [];\n  var pass = false;\n  var metatype = 2;\n  recordhopper(data, function(val, R, RT) {\n    switch (RT) {\n      case 335:\n        out.Types.push({ name: val.name });\n        break;\n      case 51:\n        val.forEach(function(r) {\n          if (metatype == 1)\n            out.Cell.push({ type: out.Types[r[0] - 1].name, index: r[1] });\n          else if (metatype == 0)\n            out.Value.push({ type: out.Types[r[0] - 1].name, index: r[1] });\n        });\n        break;\n      case 337:\n        metatype = val ? 1 : 0;\n        break;\n      case 338:\n        metatype = 2;\n        break;\n      case 35:\n        state.push(RT);\n        pass = true;\n        break;\n      case 36:\n        state.pop();\n        pass = false;\n        break;\n      default:\n        if (R.T) {\n        } else if (!pass || opts.WTF && state[state.length - 1] != 35)\n          throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n    }\n  });\n  return out;\n}\nfunction write_xlmeta_bin() {\n  var ba = buf_array();\n  write_record(ba, 332);\n  write_record(ba, 334, write_UInt32LE(1));\n  write_record(ba, 335, write_BrtMdtinfo({\n    name: \"XLDAPR\",\n    version: 12e4,\n    flags: 3496657072\n  }));\n  write_record(ba, 336);\n  write_record(ba, 339, write_BrtBeginEsfmd(1, \"XLDAPR\"));\n  write_record(ba, 52);\n  write_record(ba, 35, write_UInt32LE(514));\n  write_record(ba, 4096, write_UInt32LE(0));\n  write_record(ba, 4097, writeuint16(1));\n  write_record(ba, 36);\n  write_record(ba, 53);\n  write_record(ba, 340);\n  write_record(ba, 337, write_BrtBeginEsmdb(1, true));\n  write_record(ba, 51, write_BrtMdb([[1, 0]]));\n  write_record(ba, 338);\n  write_record(ba, 333);\n  return ba.end();\n}\nfunction parse_xlmeta_xml(data, name, opts) {\n  var out = { Types: [], Cell: [], Value: [] };\n  if (!data)\n    return out;\n  var pass = false;\n  var metatype = 2;\n  var lastmeta;\n  data.replace(tagregex, function(x) {\n    var y = parsexmltag(x);\n    switch (strip_ns(y[0])) {\n      case \"<?xml\":\n        break;\n      case \"<metadata\":\n      case \"</metadata>\":\n        break;\n      case \"<metadataTypes\":\n      case \"</metadataTypes>\":\n        break;\n      case \"<metadataType\":\n        out.Types.push({ name: y.name });\n        break;\n      case \"</metadataType>\":\n        break;\n      case \"<futureMetadata\":\n        for (var j = 0; j < out.Types.length; ++j)\n          if (out.Types[j].name == y.name)\n            lastmeta = out.Types[j];\n        break;\n      case \"</futureMetadata>\":\n        break;\n      case \"<bk>\":\n        break;\n      case \"</bk>\":\n        break;\n      case \"<rc\":\n        if (metatype == 1)\n          out.Cell.push({ type: out.Types[y.t - 1].name, index: +y.v });\n        else if (metatype == 0)\n          out.Value.push({ type: out.Types[y.t - 1].name, index: +y.v });\n        break;\n      case \"</rc>\":\n        break;\n      case \"<cellMetadata\":\n        metatype = 1;\n        break;\n      case \"</cellMetadata>\":\n        metatype = 2;\n        break;\n      case \"<valueMetadata\":\n        metatype = 0;\n        break;\n      case \"</valueMetadata>\":\n        metatype = 2;\n        break;\n      case \"<extLst\":\n      case \"<extLst>\":\n      case \"</extLst>\":\n      case \"<extLst/>\":\n        break;\n      case \"<ext\":\n        pass = true;\n        break;\n      case \"</ext>\":\n        pass = false;\n        break;\n      case \"<rvb\":\n        if (!lastmeta)\n          break;\n        if (!lastmeta.offsets)\n          lastmeta.offsets = [];\n        lastmeta.offsets.push(+y.i);\n        break;\n      default:\n        if (!pass && opts.WTF)\n          throw new Error(\"unrecognized \" + y[0] + \" in metadata\");\n    }\n    return x;\n  });\n  return out;\n}\nfunction write_xlmeta_xml() {\n  var o = [XML_HEADER];\n  o.push('<metadata xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:xlrd=\"http://schemas.microsoft.com/office/spreadsheetml/2017/richdata\" xmlns:xda=\"http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray\">\\n  <metadataTypes count=\"1\">\\n    <metadataType name=\"XLDAPR\" minSupportedVersion=\"120000\" copy=\"1\" pasteAll=\"1\" pasteValues=\"1\" merge=\"1\" splitFirst=\"1\" rowColShift=\"1\" clearFormats=\"1\" clearComments=\"1\" assign=\"1\" coerce=\"1\" cellMeta=\"1\"/>\\n  </metadataTypes>\\n  <futureMetadata name=\"XLDAPR\" count=\"1\">\\n    <bk>\\n      <extLst>\\n        <ext uri=\"{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}\">\\n          <xda:dynamicArrayProperties fDynamic=\"1\" fCollapsed=\"0\"/>\\n        </ext>\\n      </extLst>\\n    </bk>\\n  </futureMetadata>\\n  <cellMetadata count=\"1\">\\n    <bk>\\n      <rc t=\"1\" v=\"0\"/>\\n    </bk>\\n  </cellMetadata>\\n</metadata>');\n  return o.join(\"\");\n}\n/* 18.6 Calculation Chain */\nfunction parse_cc_xml(data/*::, name, opts*/)/*:Array<any>*/ {\n\tvar d = [];\n\tif(!data) return d;\n\tvar i = 1;\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '<?xml': break;\n\t\t\t/* 18.6.2  calcChain CT_CalcChain 1 */\n\t\t\tcase '<calcChain': case '<calcChain>': case '</calcChain>': break;\n\t\t\t/* 18.6.1  c CT_CalcCell 1 */\n\t\t\tcase '<c': delete y[0]; if(y.i) i = y.i; else y.i = i; d.push(y); break;\n\t\t}\n\t});\n\treturn d;\n}\n\n//function write_cc_xml(data, opts) { }\n\n/* [MS-XLSB] 2.6.4.1 */\nfunction parse_BrtCalcChainItem$(data) {\n\tvar out = {};\n\tout.i = data.read_shift(4);\n\tvar cell = {};\n\tcell.r = data.read_shift(4);\n\tcell.c = data.read_shift(4);\n\tout.r = encode_cell(cell);\n\tvar flags = data.read_shift(1);\n\tif(flags & 0x2) out.l = '1';\n\tif(flags & 0x8) out.a = '1';\n\treturn out;\n}\n\n/* 18.6 Calculation Chain */\nfunction parse_cc_bin(data, name, opts) {\n\tvar out = [];\n\tvar pass = false;\n\trecordhopper(data, function hopper_cc(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x003F: /* 'BrtCalcChainItem$' */\n\t\t\t\tout.push(val); break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn out;\n}\n\n//function write_cc_bin(data, opts) { }\n/* 18.14 Supplementary Workbook Data */\nfunction parse_xlink_xml(/*::data, rel, name:string, _opts*/) {\n\t//var opts = _opts || {};\n\t//if(opts.WTF) throw \"XLSX External Link\";\n}\n\n/* [MS-XLSB] 2.1.7.25 External Link */\nfunction parse_xlink_bin(data, rel, name/*:string*/, _opts) {\n\tif(!data) return data;\n\tvar opts = _opts || {};\n\n\tvar pass = false, end = false;\n\n\trecordhopper(data, function xlink_parse(val, R, RT) {\n\t\tif(end) return;\n\t\tswitch(RT) {\n\t\t\tcase 0x0167: /* 'BrtSupTabs' */\n\t\t\tcase 0x016B: /* 'BrtExternTableStart' */\n\t\t\tcase 0x016C: /* 'BrtExternTableEnd' */\n\t\t\tcase 0x016E: /* 'BrtExternRowHdr' */\n\t\t\tcase 0x016F: /* 'BrtExternCellBlank' */\n\t\t\tcase 0x0170: /* 'BrtExternCellReal' */\n\t\t\tcase 0x0171: /* 'BrtExternCellBool' */\n\t\t\tcase 0x0172: /* 'BrtExternCellError' */\n\t\t\tcase 0x0173: /* 'BrtExternCellString' */\n\t\t\tcase 0x01D8: /* 'BrtExternValueMeta' */\n\t\t\tcase 0x0241: /* 'BrtSupNameStart' */\n\t\t\tcase 0x0242: /* 'BrtSupNameValueStart' */\n\t\t\tcase 0x0243: /* 'BrtSupNameValueEnd' */\n\t\t\tcase 0x0244: /* 'BrtSupNameNum' */\n\t\t\tcase 0x0245: /* 'BrtSupNameErr' */\n\t\t\tcase 0x0246: /* 'BrtSupNameSt' */\n\t\t\tcase 0x0247: /* 'BrtSupNameNil' */\n\t\t\tcase 0x0248: /* 'BrtSupNameBool' */\n\t\t\tcase 0x0249: /* 'BrtSupNameFmla' */\n\t\t\tcase 0x024A: /* 'BrtSupNameBits' */\n\t\t\tcase 0x024B: /* 'BrtSupNameEnd' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n}\n/* 20.5 DrawingML - SpreadsheetML Drawing */\n/* 20.5.2.35 wsDr CT_Drawing */\nfunction parse_drawing(data, rels/*:any*/) {\n\tif(!data) return \"??\";\n\t/*\n\t  Chartsheet Drawing:\n\t   - 20.5.2.35 wsDr CT_Drawing\n\t    - 20.5.2.1  absoluteAnchor CT_AbsoluteAnchor\n\t     - 20.5.2.16 graphicFrame CT_GraphicalObjectFrame\n\t      - 20.1.2.2.16 graphic CT_GraphicalObject\n\t       - 20.1.2.2.17 graphicData CT_GraphicalObjectData\n          - chart reference\n\t   the actual type is based on the URI of the graphicData\n\t\tTODO: handle embedded charts and other types of graphics\n\t*/\n\tvar id = (data.match(/<c:chart [^>]*r:id=\"([^\"]*)\"/)||[\"\",\"\"])[1];\n\n\treturn rels['!id'][id].Target;\n}\n\n/* L.5.5.2 SpreadsheetML Comments + VML Schema */\nvar _shapeid = 1024;\nfunction write_comments_vml(rId/*:number*/, comments) {\n\tvar csize = [21600, 21600];\n\t/* L.5.2.1.2 Path Attribute */\n\tvar bbox = [\"m0,0l0\",csize[1],csize[0],csize[1],csize[0],\"0xe\"].join(\",\");\n\tvar o = [\n\t\twritextag(\"xml\", null, { 'xmlns:v': XLMLNS.v, 'xmlns:o': XLMLNS.o, 'xmlns:x': XLMLNS.x, 'xmlns:mv': XLMLNS.mv }).replace(/\\/>/,\">\"),\n\t\twritextag(\"o:shapelayout\", writextag(\"o:idmap\", null, {'v:ext':\"edit\", 'data':rId}), {'v:ext':\"edit\"}),\n\t\twritextag(\"v:shapetype\", [\n\t\t\twritextag(\"v:stroke\", null, {joinstyle:\"miter\"}),\n\t\t\twritextag(\"v:path\", null, {gradientshapeok:\"t\", 'o:connecttype':\"rect\"})\n\t\t].join(\"\"), {id:\"_x0000_t202\", 'o:spt':202, coordsize:csize.join(\",\"),path:bbox})\n\t];\n\twhile(_shapeid < rId * 1000) _shapeid += 1000;\n\n\tcomments.forEach(function(x) {\n\tvar c = decode_cell(x[0]);\n\tvar fillopts = /*::(*/{'color2':\"#BEFF82\", 'type':\"gradient\"}/*:: :any)*/;\n\tif(fillopts.type == \"gradient\") fillopts.angle = \"-180\";\n\tvar fillparm = fillopts.type == \"gradient\" ? writextag(\"o:fill\", null, {type:\"gradientUnscaled\", 'v:ext':\"view\"}) : null;\n\tvar fillxml = writextag('v:fill', fillparm, fillopts);\n\n\tvar shadata = ({on:\"t\", 'obscured':\"t\"}/*:any*/);\n\t++_shapeid;\n\n\to = o.concat([\n\t'<v:shape' + wxt_helper({\n\t\tid:'_x0000_s' + _shapeid,\n\t\ttype:\"#_x0000_t202\",\n\t\tstyle:\"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10\" + (x[1].hidden ? \";visibility:hidden\" : \"\") ,\n\t\tfillcolor:\"#ECFAD4\",\n\t\tstrokecolor:\"#edeaa1\"\n\t}) + '>',\n\t\tfillxml,\n\t\twritextag(\"v:shadow\", null, shadata),\n\t\twritextag(\"v:path\", null, {'o:connecttype':\"none\"}),\n\t\t'<v:textbox><div style=\"text-align:left\"></div></v:textbox>',\n\t\t'<x:ClientData ObjectType=\"Note\">',\n\t\t\t'<x:MoveWithCells/>',\n\t\t\t'<x:SizeWithCells/>',\n\t\t\t/* Part 4 19.4.2.3 Anchor (Anchor) */\n\t\t\twritetag('x:Anchor', [c.c+1, 0, c.r+1, 0, c.c+3, 20, c.r+5, 20].join(\",\")),\n\t\t\twritetag('x:AutoFill', \"False\"),\n\t\t\twritetag('x:Row', String(c.r)),\n\t\t\twritetag('x:Column', String(c.c)),\n\t\t\tx[1].hidden ? '' : '<x:Visible/>',\n\t\t'</x:ClientData>',\n\t'</v:shape>'\n\t]); });\n\to.push('</xml>');\n\treturn o.join(\"\");\n}\nfunction sheet_insert_comments(sheet, comments/*:Array<RawComment>*/, threaded/*:boolean*/, people/*:?Array<any>*/) {\n\tvar dense = Array.isArray(sheet);\n\tvar cell/*:Cell*/;\n\tcomments.forEach(function(comment) {\n\t\tvar r = decode_cell(comment.ref);\n\t\tif(dense) {\n\t\t\tif(!sheet[r.r]) sheet[r.r] = [];\n\t\t\tcell = sheet[r.r][r.c];\n\t\t} else cell = sheet[comment.ref];\n\t\tif (!cell) {\n\t\t\tcell = ({t:\"z\"}/*:any*/);\n\t\t\tif(dense) sheet[r.r][r.c] = cell;\n\t\t\telse sheet[comment.ref] = cell;\n\t\t\tvar range = safe_decode_range(sheet[\"!ref\"]||\"BDWGO1000001:A1\");\n\t\t\tif(range.s.r > r.r) range.s.r = r.r;\n\t\t\tif(range.e.r < r.r) range.e.r = r.r;\n\t\t\tif(range.s.c > r.c) range.s.c = r.c;\n\t\t\tif(range.e.c < r.c) range.e.c = r.c;\n\t\t\tvar encoded = encode_range(range);\n\t\t\tif (encoded !== sheet[\"!ref\"]) sheet[\"!ref\"] = encoded;\n\t\t}\n\n\t\tif (!cell.c) cell.c = [];\n\t\tvar o/*:Comment*/ = ({a: comment.author, t: comment.t, r: comment.r, T: threaded});\n\t\tif(comment.h) o.h = comment.h;\n\n\t\t/* threaded comments always override */\n\t\tfor(var i = cell.c.length - 1; i >= 0; --i) {\n\t\t\tif(!threaded && cell.c[i].T) return;\n\t\t\tif(threaded && !cell.c[i].T) cell.c.splice(i, 1);\n\t\t}\n\t\tif(threaded && people) for(i = 0; i < people.length; ++i) {\n\t\t\tif(o.a == people[i].id) { o.a = people[i].name || o.a; break; }\n\t\t}\n\t\tcell.c.push(o);\n\t});\n}\n\n/* 18.7 Comments */\nfunction parse_comments_xml(data/*:string*/, opts)/*:Array<RawComment>*/ {\n\t/* 18.7.6 CT_Comments */\n\tif(data.match(/<(?:\\w+:)?comments *\\/>/)) return [];\n\tvar authors/*:Array<string>*/ = [];\n\tvar commentList/*:Array<RawComment>*/ = [];\n\tvar authtag = data.match(/<(?:\\w+:)?authors>([\\s\\S]*)<\\/(?:\\w+:)?authors>/);\n\tif(authtag && authtag[1]) authtag[1].split(/<\\/\\w*:?author>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar a = x.match(/<(?:\\w+:)?author[^>]*>(.*)/);\n\t\tif(a) authors.push(a[1]);\n\t});\n\tvar cmnttag = data.match(/<(?:\\w+:)?commentList>([\\s\\S]*)<\\/(?:\\w+:)?commentList>/);\n\tif(cmnttag && cmnttag[1]) cmnttag[1].split(/<\\/\\w*:?comment>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar cm = x.match(/<(?:\\w+:)?comment[^>]*>/);\n\t\tif(!cm) return;\n\t\tvar y = parsexmltag(cm[0]);\n\t\tvar comment/*:RawComment*/ = ({ author: y.authorId && authors[y.authorId] || \"sheetjsghost\", ref: y.ref, guid: y.guid }/*:any*/);\n\t\tvar cell = decode_cell(y.ref);\n\t\tif(opts.sheetRows && opts.sheetRows <= cell.r) return;\n\t\tvar textMatch = x.match(/<(?:\\w+:)?text>([\\s\\S]*)<\\/(?:\\w+:)?text>/);\n\t\tvar rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:\"\",t:\"\",h:\"\"};\n\t\tcomment.r = rt.r;\n\t\tif(rt.r == \"<t></t>\") rt.t = rt.h = \"\";\n\t\tcomment.t = (rt.t||\"\").replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\t\tif(opts.cellHTML) comment.h = rt.h;\n\t\tcommentList.push(comment);\n\t});\n\treturn commentList;\n}\n\nfunction write_comments_xml(data/*::, opts*/) {\n\tvar o = [XML_HEADER, writextag('comments', null, { 'xmlns': XMLNS_main[0] })];\n\n\tvar iauthor/*:Array<string>*/ = [];\n\to.push(\"<authors>\");\n\tdata.forEach(function(x) { x[1].forEach(function(w) { var a = escapexml(w.a);\n\t\tif(iauthor.indexOf(a) == -1) {\n\t\t\tiauthor.push(a);\n\t\t\to.push(\"<author>\" + a + \"</author>\");\n\t\t}\n\t\tif(w.T && w.ID && iauthor.indexOf(\"tc=\" + w.ID) == -1) {\n\t\t\tiauthor.push(\"tc=\" + w.ID);\n\t\t\to.push(\"<author>\" + \"tc=\" + w.ID + \"</author>\");\n\t\t}\n\t}); });\n\tif(iauthor.length == 0) { iauthor.push(\"SheetJ5\"); o.push(\"<author>SheetJ5</author>\"); }\n\to.push(\"</authors>\");\n\to.push(\"<commentList>\");\n\tdata.forEach(function(d) {\n\t\t/* 18.7.3 CT_Comment */\n\t\tvar lastauthor = 0, ts = [];\n\t\tif(d[1][0] && d[1][0].T && d[1][0].ID) lastauthor = iauthor.indexOf(\"tc=\" + d[1][0].ID);\n\t\telse d[1].forEach(function(c) {\n\t\t\tif(c.a) lastauthor = iauthor.indexOf(escapexml(c.a));\n\t\t\tts.push(c.t||\"\");\n\t\t});\n\t\to.push('<comment ref=\"' + d[0] + '\" authorId=\"' + lastauthor + '\"><text>');\n\t\tif(ts.length <= 1) o.push(writetag(\"t\", escapexml(ts[0]||\"\")));\n\t\telse {\n\t\t\t/* based on Threaded Comments -> Comments projection */\n\t\t\tvar t = \"Comment:\\n    \" + (ts[0]) + \"\\n\";\n\t\t\tfor(var i = 1; i < ts.length; ++i) t += \"Reply:\\n    \" + ts[i] + \"\\n\";\n\t\t\to.push(writetag(\"t\", escapexml(t)));\n\t\t}\n\t\to.push('</text></comment>');\n\t});\n\to.push(\"</commentList>\");\n\tif(o.length>2) { o[o.length] = ('</comments>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSX] 2.1.17 */\nfunction parse_tcmnt_xml(data/*:string*/, opts)/*:Array<RawComment>*/ {\n\tvar out = [];\n\tvar pass = false, comment = {}, tidx = 0;\n\tdata.replace(tagregex, function xml_tcmnt(x, idx) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<?xml': break;\n\n\t\t\t/* 2.6.207 ThreadedComments CT_ThreadedComments */\n\t\t\tcase '<ThreadedComments': break;\n\t\t\tcase '</ThreadedComments>': break;\n\n\t\t\t/* 2.6.205 threadedComment CT_ThreadedComment */\n\t\t\tcase '<threadedComment': comment = {author: y.personId, guid: y.id, ref: y.ref, T: 1}; break;\n\t\t\tcase '</threadedComment>': if(comment.t != null) out.push(comment); break;\n\n\t\t\tcase '<text>': case '<text': tidx = idx + x.length; break;\n\t\t\tcase '</text>': comment.t = data.slice(tidx, idx).replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\"); break;\n\n\t\t\t/* 2.6.206 mentions CT_ThreadedCommentMentions TODO */\n\t\t\tcase '<mentions': case '<mentions>': pass = true; break;\n\t\t\tcase '</mentions>': pass = false; break;\n\n\t\t\t/* 2.6.202 mention CT_Mention TODO */\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': case '<extLst/>': break;\n\t\t\t/* 18.2.7  ext CT_Extension + */\n\t\t\tcase '<ext': pass=true; break;\n\t\t\tcase '</ext>': pass=false; break;\n\n\t\t\tdefault: if(!pass && opts.WTF) throw new Error('unrecognized ' + y[0] + ' in threaded comments');\n\t\t}\n\t\treturn x;\n\t});\n\treturn out;\n}\n\nfunction write_tcmnt_xml(comments, people, opts) {\n\tvar o = [XML_HEADER, writextag('ThreadedComments', null, { 'xmlns': XMLNS.TCMNT }).replace(/[\\/]>/, \">\")];\n\tcomments.forEach(function(carr) {\n\t\tvar rootid = \"\";\n\t\t(carr[1] || []).forEach(function(c, idx) {\n\t\t\tif(!c.T) { delete c.ID; return; }\n\t\t\tif(c.a && people.indexOf(c.a) == -1) people.push(c.a);\n\t\t\tvar tcopts = {\n\t\t\t\tref: carr[0],\n\t\t\t\tid: \"{54EE7951-7262-4200-6969-\" + (\"000000000000\" + opts.tcid++).slice(-12) + \"}\"\n\t\t\t};\n\t\t\tif(idx == 0) rootid = tcopts.id;\n\t\t\telse tcopts.parentId = rootid;\n\t\t\tc.ID = tcopts.id;\n\t\t\tif(c.a) tcopts.personId = \"{54EE7950-7262-4200-6969-\" + (\"000000000000\" + people.indexOf(c.a)).slice(-12) + \"}\";\n\t\t\to.push(writextag('threadedComment', writetag('text', c.t||\"\"), tcopts));\n\t\t});\n\t});\n\to.push('</ThreadedComments>');\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSX] 2.1.18 */\nfunction parse_people_xml(data/*:string*/, opts) {\n\tvar out = [];\n\tvar pass = false;\n\tdata.replace(tagregex, function xml_tcmnt(x) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<?xml': break;\n\n\t\t\t/* 2.4.85 personList CT_PersonList */\n\t\t\tcase '<personList': break;\n\t\t\tcase '</personList>': break;\n\n\t\t\t/* 2.6.203 person CT_Person TODO: providers */\n\t\t\tcase '<person': out.push({name: y.displayname, id: y.id }); break;\n\t\t\tcase '</person>': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': case '<extLst/>': break;\n\t\t\t/* 18.2.7  ext CT_Extension + */\n\t\t\tcase '<ext': pass=true; break;\n\t\t\tcase '</ext>': pass=false; break;\n\n\t\t\tdefault: if(!pass && opts.WTF) throw new Error('unrecognized ' + y[0] + ' in threaded comments');\n\t\t}\n\t\treturn x;\n\t});\n\treturn out;\n}\nfunction write_people_xml(people/*, opts*/) {\n\tvar o = [XML_HEADER, writextag('personList', null, {\n\t\t'xmlns': XMLNS.TCMNT,\n\t\t'xmlns:x': XMLNS_main[0]\n\t}).replace(/[\\/]>/, \">\")];\n\tpeople.forEach(function(person, idx) {\n\t\to.push(writextag('person', null, {\n\t\t\tdisplayName: person,\n\t\t\tid: \"{54EE7950-7262-4200-6969-\" + (\"000000000000\" + idx).slice(-12) + \"}\",\n\t\t\tuserId: person,\n\t\t\tproviderId: \"None\"\n\t\t}));\n\t});\n\to.push(\"</personList>\");\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.28 BrtBeginComment */\nfunction parse_BrtBeginComment(data) {\n\tvar out = {};\n\tout.iauthor = data.read_shift(4);\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tout.rfx = rfx.s;\n\tout.ref = encode_cell(rfx.s);\n\tdata.l += 16; /*var guid = parse_GUID(data); */\n\treturn out;\n}\nfunction write_BrtBeginComment(data, o) {\n\tif(o == null) o = new_buf(36);\n\to.write_shift(4, data[1].iauthor);\n\twrite_UncheckedRfX((data[0]/*:any*/), o);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.327 BrtCommentAuthor */\nvar parse_BrtCommentAuthor = parse_XLWideString;\nfunction write_BrtCommentAuthor(data) { return write_XLWideString(data.slice(0, 54)); }\n\n/* [MS-XLSB] 2.1.7.8 Comments */\nfunction parse_comments_bin(data, opts)/*:Array<RawComment>*/ {\n\tvar out/*:Array<RawComment>*/ = [];\n\tvar authors/*:Array<string>*/ = [];\n\tvar c = {};\n\tvar pass = false;\n\trecordhopper(data, function hopper_cmnt(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x0278: /* 'BrtCommentAuthor' */\n\t\t\t\tauthors.push(val); break;\n\t\t\tcase 0x027B: /* 'BrtBeginComment' */\n\t\t\t\tc = val; break;\n\t\t\tcase 0x027D: /* 'BrtCommentText' */\n\t\t\t\tc.t = val.t; c.h = val.h; c.r = val.r; break;\n\t\t\tcase 0x027C: /* 'BrtEndComment' */\n\t\t\t\tc.author = authors[c.iauthor];\n\t\t\t\tdelete (c/*:any*/).iauthor;\n\t\t\t\tif(opts.sheetRows && c.rfx && opts.sheetRows <= c.rfx.r) break;\n\t\t\t\tif(!c.t) c.t = \"\";\n\t\t\t\tdelete c.rfx; out.push(c); break;\n\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */ break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */ break;\n\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t});\n\treturn out;\n}\n\nfunction write_comments_bin(data/*::, opts*/) {\n\tvar ba = buf_array();\n\tvar iauthor/*:Array<string>*/ = [];\n\twrite_record(ba, 0x0274 /* BrtBeginComments */);\n\n\twrite_record(ba, 0x0276 /* BrtBeginCommentAuthors */);\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tif(iauthor.indexOf(c.a) > -1) return;\n\t\t\tiauthor.push(c.a.slice(0,54));\n\t\t\twrite_record(ba, 0x0278 /* BrtCommentAuthor */, write_BrtCommentAuthor(c.a));\n\t\t});\n\t});\n\twrite_record(ba, 0x0277 /* BrtEndCommentAuthors */);\n\n\twrite_record(ba, 0x0279 /* BrtBeginCommentList */);\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tc.iauthor = iauthor.indexOf(c.a);\n\t\t\tvar range = {s:decode_cell(comment[0]),e:decode_cell(comment[0])};\n\t\t\twrite_record(ba, 0x027B /* BrtBeginComment */, write_BrtBeginComment([range, c]));\n\t\t\tif(c.t && c.t.length > 0) write_record(ba, 0x027D /* BrtCommentText */, write_BrtCommentText(c));\n\t\t\twrite_record(ba, 0x027C /* BrtEndComment */);\n\t\t\tdelete c.iauthor;\n\t\t});\n\t});\n\twrite_record(ba, 0x027A /* BrtEndCommentList */);\n\n\twrite_record(ba, 0x0275 /* BrtEndComments */);\n\treturn ba.end();\n}\nvar CT_VBA = \"application/vnd.ms-office.vbaProject\";\nfunction make_vba_xls(cfb) {\n  var newcfb = CFB.utils.cfb_new({ root: \"R\" });\n  cfb.FullPaths.forEach(function(p, i) {\n    if (p.slice(-1) === \"/\" || !p.match(/_VBA_PROJECT_CUR/))\n      return;\n    var newpath = p.replace(/^[^\\/]*/, \"R\").replace(/\\/_VBA_PROJECT_CUR\\u0000*/, \"\");\n    CFB.utils.cfb_add(newcfb, newpath, cfb.FileIndex[i].content);\n  });\n  return CFB.write(newcfb);\n}\nfunction fill_vba_xls(cfb, vba) {\n  vba.FullPaths.forEach(function(p, i) {\n    if (i == 0)\n      return;\n    var newpath = p.replace(/[^\\/]*[\\/]/, \"/_VBA_PROJECT_CUR/\");\n    if (newpath.slice(-1) !== \"/\")\n      CFB.utils.cfb_add(cfb, newpath, vba.FileIndex[i].content);\n  });\n}\nvar VBAFMTS = [\"xlsb\", \"xlsm\", \"xlam\", \"biff8\", \"xla\"];\n/* macro and dialog sheet stubs */\nfunction parse_ds_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'dialog'}; }\nfunction parse_ds_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'dialog'}; }\nfunction parse_ms_bin(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'macro'}; }\nfunction parse_ms_xml(/*::data:any, opts, idx:number, rels, wb, themes, styles*/)/*:Worksheet*/ { return {'!type':'macro'}; }\n/* TODO: it will be useful to parse the function str */\nvar rc_to_a1 = /*#__PURE__*/(function(){\n\tvar rcregex = /(^|[^A-Za-z_])R(\\[?-?\\d+\\]|[1-9]\\d*|)C(\\[?-?\\d+\\]|[1-9]\\d*|)(?![A-Za-z0-9_])/g;\n\tvar rcbase/*:Cell*/ = ({r:0,c:0}/*:any*/);\n\tfunction rcfunc($$,$1,$2,$3) {\n\t\tvar cRel = false, rRel = false;\n\n\t\tif($2.length == 0) rRel = true;\n\t\telse if($2.charAt(0) == \"[\") { rRel = true; $2 = $2.slice(1, -1); }\n\n\t\tif($3.length == 0) cRel = true;\n\t\telse if($3.charAt(0) == \"[\") { cRel = true; $3 = $3.slice(1, -1); }\n\n\t\tvar R = $2.length>0?parseInt($2,10)|0:0, C = $3.length>0?parseInt($3,10)|0:0;\n\n\t\tif(cRel) C += rcbase.c; else --C;\n\t\tif(rRel) R += rcbase.r; else --R;\n\t\treturn $1 + (cRel ? \"\" : \"$\") + encode_col(C) + (rRel ? \"\" : \"$\") + encode_row(R);\n\t}\n\treturn function rc_to_a1(fstr/*:string*/, base/*:Cell*/)/*:string*/ {\n\t\trcbase = base;\n\t\treturn fstr.replace(rcregex, rcfunc);\n\t};\n})();\n\nvar crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\\d{4}|104[0-7]\\d{3}|1048[0-4]\\d{2}|10485[0-6]\\d|104857[0-6]|[1-9]\\d{0,5})(?![_.\\(A-Za-z0-9])/g;\nvar a1_to_rc = /*#__PURE__*/(function(){\n\treturn function a1_to_rc(fstr/*:string*/, base/*:CellAddress*/) {\n\t\treturn fstr.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\t\tvar c = decode_col($3) - ($2 ? 0 : base.c);\n\t\t\tvar r = decode_row($5) - ($4 ? 0 : base.r);\n\t\t\tvar R = (r == 0 ? \"\" : !$4 ? \"[\" + r + \"]\" : (r+1));\n\t\t\tvar C = (c == 0 ? \"\" : !$2 ? \"[\" + c + \"]\" : (c+1));\n\t\t\treturn $1 + \"R\" + R + \"C\" + C;\n\t\t});\n\t};\n})();\n\n/* no defined name can collide with a valid cell address A1:XFD1048576 ... except LOG10! */\nfunction shift_formula_str(f/*:string*/, delta/*:Cell*/)/*:string*/ {\n\treturn f.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\treturn $1+($2==\"$\" ? $2+$3 : encode_col(decode_col($3)+delta.c))+($4==\"$\" ? $4+$5 : encode_row(decode_row($5) + delta.r));\n\t});\n}\n\nfunction shift_formula_xlsx(f/*:string*/, range/*:string*/, cell/*:string*/)/*:string*/ {\n\tvar r = decode_range(range), s = r.s, c = decode_cell(cell);\n\tvar delta = {r:c.r - s.r, c:c.c - s.c};\n\treturn shift_formula_str(f, delta);\n}\n\n/* TODO: parse formula */\nfunction fuzzyfmla(f/*:string*/)/*:boolean*/ {\n\tif(f.length == 1) return false;\n\treturn true;\n}\n\nfunction _xlfn(f/*:string*/)/*:string*/ {\n\treturn f.replace(/_xlfn\\./g,\"\");\n}\nfunction parseread1(blob) { blob.l+=1; return; }\n\n/* [MS-XLS] 2.5.51 */\nfunction parse_ColRelU(blob, length) {\n\tvar c = blob.read_shift(length == 1 ? 1 : 2);\n\treturn [c & 0x3FFF, (c >> 14) & 1, (c >> 15) & 1];\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.89 */\nfunction parse_RgceArea(blob, length, opts) {\n\tvar w = 2;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return parse_RgceArea_BIFF2(blob, length, opts);\n\t\telse if(opts.biff == 12) w = 4;\n\t}\n\tvar r=blob.read_shift(w), R=blob.read_shift(w);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n/* BIFF 2-5 encodes flags in the row field */\nfunction parse_RgceArea_BIFF2(blob/*::, length, opts*/) {\n\tvar r=parse_ColRelU(blob, 2), R=parse_ColRelU(blob, 2);\n\tvar c=blob.read_shift(1);\n\tvar C=blob.read_shift(1);\n\treturn { s:{r:r[0], c:c, cRel:r[1], rRel:r[2]}, e:{r:R[0], c:C, cRel:R[1], rRel:R[2]} };\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.90 */\nfunction parse_RgceAreaRel(blob, length, opts) {\n\tif(opts.biff < 8) return parse_RgceArea_BIFF2(blob, length, opts);\n\tvar r=blob.read_shift(opts.biff == 12 ? 4 : 2), R=blob.read_shift(opts.biff == 12 ? 4 : 2);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n\n/* [MS-XLS] 2.5.198.109 ; [MS-XLSB] 2.5.97.91 */\nfunction parse_RgceLoc(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff <= 5) return parse_RgceLoc_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(opts && opts.biff == 12 ? 4 : 2);\n\tvar c = parse_ColRelU(blob, 2);\n\treturn {r:r, c:c[0], cRel:c[1], rRel:c[2]};\n}\nfunction parse_RgceLoc_BIFF2(blob/*::, length, opts*/) {\n\tvar r = parse_ColRelU(blob, 2);\n\tvar c = blob.read_shift(1);\n\treturn {r:r[0], c:c, cRel:r[1], rRel:r[2]};\n}\n\n/* [MS-XLS] 2.5.198.107, 2.5.47 */\nfunction parse_RgceElfLoc(blob/*::, length, opts*/) {\n\tvar r = blob.read_shift(2);\n\tvar c = blob.read_shift(2);\n\treturn {r:r, c:c & 0xFF, fQuoted:!!(c & 0x4000), cRel:c>>15, rRel:c>>15 };\n}\n\n/* [MS-XLS] 2.5.198.111 ; [MS-XLSB] 2.5.97.92 TODO */\nfunction parse_RgceLocRel(blob, length, opts) {\n\tvar biff = opts && opts.biff ? opts.biff : 8;\n\tif(biff >= 2 && biff <= 5) return parse_RgceLocRel_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(biff >= 12 ? 4 : 2);\n\tvar cl = blob.read_shift(2);\n\tvar cRel = (cl & 0x4000) >> 14, rRel = (cl & 0x8000) >> 15;\n\tcl &= 0x3FFF;\n\tif(rRel == 1) while(r > 0x7FFFF) r -= 0x100000;\n\tif(cRel == 1) while(cl > 0x1FFF) cl = cl - 0x4000;\n\treturn {r:r,c:cl,cRel:cRel,rRel:rRel};\n}\nfunction parse_RgceLocRel_BIFF2(blob/*::, length:number, opts*/) {\n\tvar rl = blob.read_shift(2);\n\tvar c = blob.read_shift(1);\n\tvar rRel = (rl & 0x8000) >> 15, cRel = (rl & 0x4000) >> 14;\n\trl &= 0x3FFF;\n\tif(rRel == 1 && rl >= 0x2000) rl = rl - 0x4000;\n\tif(cRel == 1 && c >= 0x80) c = c - 0x100;\n\treturn {r:rl,c:c,cRel:cRel,rRel:rRel};\n}\n\n/* [MS-XLS] 2.5.198.27 ; [MS-XLSB] 2.5.97.18 */\nfunction parse_PtgArea(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceArea(blob, opts.biff >= 2 && opts.biff <= 5 ? 6 : 8, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.28 ; [MS-XLSB] 2.5.97.19 */\nfunction parse_PtgArea3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2, 'i');\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tvar area = parse_RgceArea(blob, w, opts);\n\treturn [type, ixti, area];\n}\n\n/* [MS-XLS] 2.5.198.29 ; [MS-XLSB] 2.5.97.20 */\nfunction parse_PtgAreaErr(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts && (opts.biff > 8) ? 12 : (opts.biff < 8 ? 6 : 8);\n\treturn [type];\n}\n/* [MS-XLS] 2.5.198.30 ; [MS-XLSB] 2.5.97.21 */\nfunction parse_PtgAreaErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.31 ; [MS-XLSB] 2.5.97.22 */\nfunction parse_PtgAreaN(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceAreaRel(blob, length - 1, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.32 ; [MS-XLSB] 2.5.97.23 */\nfunction parse_PtgArray(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts.biff == 2 ? 6 : opts.biff == 12 ? 14 : 7;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.33 ; [MS-XLSB] 2.5.97.24 */\nfunction parse_PtgAttrBaxcel(blob) {\n\tvar bitSemi = blob[blob.l+1] & 0x01; /* 1 = volatile */\n\tvar bitBaxcel = 1;\n\tblob.l += 4;\n\treturn [bitSemi, bitBaxcel];\n}\n\n/* [MS-XLS] 2.5.198.34 ; [MS-XLSB] 2.5.97.25 */\nfunction parse_PtgAttrChoose(blob, length, opts)/*:Array<number>*/ {\n\tblob.l +=2;\n\tvar offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar o/*:Array<number>*/ = [];\n\t/* offset is 1 less than the number of elements */\n\tfor(var i = 0; i <= offset; ++i) o.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.35 ; [MS-XLSB] 2.5.97.26 */\nfunction parse_PtgAttrGoto(blob, length, opts) {\n\tvar bitGoto = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitGoto, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLS] 2.5.198.36 ; [MS-XLSB] 2.5.97.27 */\nfunction parse_PtgAttrIf(blob, length, opts) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLSB] 2.5.97.28 */\nfunction parse_PtgAttrIfError(blob) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(2)];\n}\n\n/* [MS-XLS] 2.5.198.37 ; [MS-XLSB] 2.5.97.29 */\nfunction parse_PtgAttrSemi(blob, length, opts) {\n\tvar bitSemi = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += opts && opts.biff == 2 ? 3 : 4;\n\treturn [bitSemi];\n}\n\n/* [MS-XLS] 2.5.198.40 ; [MS-XLSB] 2.5.97.32 */\nfunction parse_PtgAttrSpaceType(blob/*::, length*/) {\n\tvar type = blob.read_shift(1), cch = blob.read_shift(1);\n\treturn [type, cch];\n}\n\n/* [MS-XLS] 2.5.198.38 ; [MS-XLSB] 2.5.97.30 */\nfunction parse_PtgAttrSpace(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.39 ; [MS-XLSB] 2.5.97.31 */\nfunction parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.84 ; [MS-XLSB] 2.5.97.68 TODO */\nfunction parse_PtgRef(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLoc(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.88 ; [MS-XLSB] 2.5.97.72 TODO */\nfunction parse_PtgRefN(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLocRel(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.85 ; [MS-XLSB] 2.5.97.69 TODO */\nfunction parse_PtgRef3d(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tif(opts && opts.biff == 5) blob.l += 12;\n\tvar loc = parse_RgceLoc(blob, 0, opts); // TODO: or RgceLocRel\n\treturn [type, ixti, loc];\n}\n\n\n/* [MS-XLS] 2.5.198.62 ; [MS-XLSB] 2.5.97.45 TODO */\nfunction parse_PtgFunc(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar iftab = blob.read_shift(opts && opts.biff <= 3 ? 1 : 2);\n\treturn [FtabArgc[iftab], Ftab[iftab], type];\n}\n/* [MS-XLS] 2.5.198.63 ; [MS-XLSB] 2.5.97.46 TODO */\nfunction parse_PtgFuncVar(blob, length, opts) {\n\tvar type = blob[blob.l++];\n\tvar cparams = blob.read_shift(1), tab = opts && opts.biff <= 3 ? [(type == 0x58 ? -1 : 0), blob.read_shift(1)]: parsetab(blob);\n\treturn [cparams, (tab[0] === 0 ? Ftab : Cetab)[tab[1]]];\n}\n\nfunction parsetab(blob) {\n\treturn [blob[blob.l+1]>>7, blob.read_shift(2) & 0x7FFF];\n}\n\n/* [MS-XLS] 2.5.198.41 ; [MS-XLSB] 2.5.97.33 */\nfunction parse_PtgAttrSum(blob, length, opts) {\n\tblob.l += opts && opts.biff == 2 ? 3 : 4; return;\n}\n\n/* [MS-XLS] 2.5.198.58 ; [MS-XLSB] 2.5.97.40 */\nfunction parse_PtgExp(blob, length, opts) {\n\tblob.l++;\n\tif(opts && opts.biff == 12) return [blob.read_shift(4, 'i'), 0];\n\tvar row = blob.read_shift(2);\n\tvar col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [row, col];\n}\n\n/* [MS-XLS] 2.5.198.57 ; [MS-XLSB] 2.5.97.39 */\nfunction parse_PtgErr(blob) { blob.l++; return BErr[blob.read_shift(1)]; }\n\n/* [MS-XLS] 2.5.198.66 ; [MS-XLSB] 2.5.97.49 */\nfunction parse_PtgInt(blob) { blob.l++; return blob.read_shift(2); }\n\n/* [MS-XLS] 2.5.198.42 ; [MS-XLSB] 2.5.97.34 */\nfunction parse_PtgBool(blob) { blob.l++; return blob.read_shift(1)!==0;}\n\n/* [MS-XLS] 2.5.198.79 ; [MS-XLSB] 2.5.97.63 */\nfunction parse_PtgNum(blob) { blob.l++; return parse_Xnum(blob, 8); }\n\n/* [MS-XLS] 2.5.198.89 ; [MS-XLSB] 2.5.97.74 */\nfunction parse_PtgStr(blob, length, opts) { blob.l++; return parse_ShortXLUnicodeString(blob, length-1, opts); }\n\n/* [MS-XLS] 2.5.192.112 + 2.5.192.11{3,4,5,6,7} */\n/* [MS-XLSB] 2.5.97.93 + 2.5.97.9{4,5,6,7} */\nfunction parse_SerAr(blob, biff/*:number*/) {\n\tvar val = [blob.read_shift(1)];\n\tif(biff == 12) switch(val[0]) {\n\t\tcase 0x02: val[0] = 0x04; break; /* SerBool */\n\t\tcase 0x04: val[0] = 0x10; break; /* SerErr */\n\t\tcase 0x00: val[0] = 0x01; break; /* SerNum */\n\t\tcase 0x01: val[0] = 0x02; break; /* SerStr */\n\t}\n\tswitch(val[0]) {\n\t\tcase 0x04: /* SerBool -- boolean */\n\t\t\tval[1] = parsebool(blob, 1) ? 'TRUE' : 'FALSE';\n\t\t\tif(biff != 12) blob.l += 7; break;\n\t\tcase 0x25: /* appears to be an alias */\n\t\tcase 0x10: /* SerErr -- error */\n\t\t\tval[1] = BErr[blob[blob.l]];\n\t\t\tblob.l += ((biff == 12) ? 4 : 8); break;\n\t\tcase 0x00: /* SerNil -- honestly, I'm not sure how to reproduce this */\n\t\t\tblob.l += 8; break;\n\t\tcase 0x01: /* SerNum -- Xnum */\n\t\t\tval[1] = parse_Xnum(blob, 8); break;\n\t\tcase 0x02: /* SerStr -- XLUnicodeString (<256 chars) */\n\t\t\tval[1] = parse_XLUnicodeString2(blob, 0, {biff:biff > 0 && biff < 8 ? 2 : biff}); break;\n\t\tdefault: throw new Error(\"Bad SerAr: \" + val[0]); /* Unreachable */\n\t}\n\treturn val;\n}\n\n/* [MS-XLS] 2.5.198.61 ; [MS-XLSB] 2.5.97.44 */\nfunction parse_PtgExtraMem(blob, cce, opts) {\n\tvar count = blob.read_shift((opts.biff == 12) ? 4 : 2);\n\tvar out/*:Array<Range>*/ = [];\n\tfor(var i = 0; i != count; ++i) out.push(((opts.biff == 12) ? parse_UncheckedRfX : parse_Ref8U)(blob, 8));\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.198.59 ; [MS-XLSB] 2.5.97.41 */\nfunction parse_PtgExtraArray(blob, length, opts) {\n\tvar rows = 0, cols = 0;\n\tif(opts.biff == 12) {\n\t\trows = blob.read_shift(4); // DRw\n\t\tcols = blob.read_shift(4); // DCol\n\t} else {\n\t\tcols = 1 + blob.read_shift(1); //DColByteU\n\t\trows = 1 + blob.read_shift(2); //DRw\n\t}\n\tif(opts.biff >= 2 && opts.biff < 8) { --rows; if(--cols == 0) cols = 0x100; }\n\t// $FlowIgnore\n\tfor(var i = 0, o/*:Array<Array<any>>*/ = []; i != rows && (o[i] = []); ++i)\n\t\tfor(var j = 0; j != cols; ++j) o[i][j] = parse_SerAr(blob, opts.biff);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 */\nfunction parse_PtgName(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar w = (!opts || (opts.biff >= 8)) ? 4 : 2;\n\tvar nameindex = blob.read_shift(w);\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l += 5; break;\n\t\tcase 3: case 4: blob.l += 8; break;\n\t\tcase 5: blob.l += 12; break;\n\t}\n\treturn [type, 0, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 */\nfunction parse_PtgNameX(blob, length, opts) {\n\tif(opts.biff == 5) return parse_PtgNameX_BIFF5(blob, length, opts);\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tvar nameindex = blob.read_shift(4);\n\treturn [type, ixti, nameindex];\n}\nfunction parse_PtgNameX_BIFF5(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2, 'i'); // XtiIndex\n\tblob.l += 8;\n\tvar nameindex = blob.read_shift(2);\n\tblob.l += 12;\n\treturn [type, ixti, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.70 ; [MS-XLSB] 2.5.97.54 */\nfunction parse_PtgMemArea(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += (opts && opts.biff == 2 ? 3 : 4);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n/* [MS-XLS] 2.5.198.72 ; [MS-XLSB] 2.5.97.56 */\nfunction parse_PtgMemFunc(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n\n/* [MS-XLS] 2.5.198.86 ; [MS-XLSB] 2.5.97.69 */\nfunction parse_PtgRefErr(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += 4;\n\tif(opts.biff < 8) blob.l--;\n\tif(opts.biff == 12) blob.l += 2;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.87 ; [MS-XLSB] 2.5.97.71 */\nfunction parse_PtgRefErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 4;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: w = 15; break;\n\t\tcase 12: w = 6; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.71 ; [MS-XLSB] 2.5.97.55 */\nvar parse_PtgMemErr = parsenoop;\n/* [MS-XLS] 2.5.198.73  ; [MS-XLSB] 2.5.97.57 */\nvar parse_PtgMemNoMem = parsenoop;\n/* [MS-XLS] 2.5.198.92 */\nvar parse_PtgTbl = parsenoop;\n\nfunction parse_PtgElfLoc(blob, length, opts) {\n\tblob.l += 2;\n\treturn [parse_RgceElfLoc(blob, 4, opts)];\n}\nfunction parse_PtgElfNoop(blob/*::, length, opts*/) {\n\tblob.l += 6;\n\treturn [];\n}\n/* [MS-XLS] 2.5.198.46 */\nvar parse_PtgElfCol = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.47 */\nvar parse_PtgElfColS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.48 */\nvar parse_PtgElfColSV = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.49 */\nvar parse_PtgElfColV = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.50 */\nfunction parse_PtgElfLel(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\treturn [parseuint16(blob), blob.read_shift(2) & 0x01];\n}\n/* [MS-XLS] 2.5.198.51 */\nvar parse_PtgElfRadical = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.52 */\nvar parse_PtgElfRadicalLel = parse_PtgElfLel;\n/* [MS-XLS] 2.5.198.53 */\nvar parse_PtgElfRadicalS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.54 */\nvar parse_PtgElfRw = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.55 */\nvar parse_PtgElfRwV = parse_PtgElfLoc;\n\n/* [MS-XLSB] 2.5.97.52 TODO */\nvar PtgListRT = [\n\t\"Data\",\n\t\"All\",\n\t\"Headers\",\n\t\"??\",\n\t\"?Data2\",\n\t\"??\",\n\t\"?DataHeaders\",\n\t\"??\",\n\t\"Totals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?DataTotals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?Current\"\n];\nfunction parse_PtgList(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\tvar ixti = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tvar idx = blob.read_shift(4);\n\tvar c = blob.read_shift(2);\n\tvar C = blob.read_shift(2);\n\tvar rt = PtgListRT[(flags >> 2) & 0x1F];\n\treturn {ixti: ixti, coltype:(flags&0x3), rt:rt, idx:idx, c:c, C:C};\n}\n/* [MS-XLS] 2.5.198.91 ; [MS-XLSB] 2.5.97.76 */\nfunction parse_PtgSxName(blob/*::, length, opts*/) {\n\tblob.l += 2;\n\treturn [blob.read_shift(4)];\n}\n\n/* [XLS] old spec */\nfunction parse_PtgSheet(blob, length, opts) {\n\tblob.l += 5;\n\tblob.l += 2;\n\tblob.l += (opts.biff == 2 ? 1 : 4);\n\treturn [\"PTGSHEET\"];\n}\nfunction parse_PtgEndSheet(blob, length, opts) {\n\tblob.l += (opts.biff == 2 ? 4 : 5);\n\treturn [\"PTGENDSHEET\"];\n}\nfunction parse_PtgMemAreaN(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgMemNoMemN(blob/*::, length, opts*/) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgAttrNoop(blob/*::, length, opts*/) {\n\tblob.l += 4;\n\treturn [0, 0];\n}\n\n/* [MS-XLS] 2.5.198.25 ; [MS-XLSB] 2.5.97.16 */\nvar PtgTypes = {\n\t/*::[*/0x01/*::]*/: { n:'PtgExp', f:parse_PtgExp },\n\t/*::[*/0x02/*::]*/: { n:'PtgTbl', f:parse_PtgTbl },\n\t/*::[*/0x03/*::]*/: { n:'PtgAdd', f:parseread1 },\n\t/*::[*/0x04/*::]*/: { n:'PtgSub', f:parseread1 },\n\t/*::[*/0x05/*::]*/: { n:'PtgMul', f:parseread1 },\n\t/*::[*/0x06/*::]*/: { n:'PtgDiv', f:parseread1 },\n\t/*::[*/0x07/*::]*/: { n:'PtgPower', f:parseread1 },\n\t/*::[*/0x08/*::]*/: { n:'PtgConcat', f:parseread1 },\n\t/*::[*/0x09/*::]*/: { n:'PtgLt', f:parseread1 },\n\t/*::[*/0x0A/*::]*/: { n:'PtgLe', f:parseread1 },\n\t/*::[*/0x0B/*::]*/: { n:'PtgEq', f:parseread1 },\n\t/*::[*/0x0C/*::]*/: { n:'PtgGe', f:parseread1 },\n\t/*::[*/0x0D/*::]*/: { n:'PtgGt', f:parseread1 },\n\t/*::[*/0x0E/*::]*/: { n:'PtgNe', f:parseread1 },\n\t/*::[*/0x0F/*::]*/: { n:'PtgIsect', f:parseread1 },\n\t/*::[*/0x10/*::]*/: { n:'PtgUnion', f:parseread1 },\n\t/*::[*/0x11/*::]*/: { n:'PtgRange', f:parseread1 },\n\t/*::[*/0x12/*::]*/: { n:'PtgUplus', f:parseread1 },\n\t/*::[*/0x13/*::]*/: { n:'PtgUminus', f:parseread1 },\n\t/*::[*/0x14/*::]*/: { n:'PtgPercent', f:parseread1 },\n\t/*::[*/0x15/*::]*/: { n:'PtgParen', f:parseread1 },\n\t/*::[*/0x16/*::]*/: { n:'PtgMissArg', f:parseread1 },\n\t/*::[*/0x17/*::]*/: { n:'PtgStr', f:parse_PtgStr },\n\t/*::[*/0x1A/*::]*/: { n:'PtgSheet', f:parse_PtgSheet },\n\t/*::[*/0x1B/*::]*/: { n:'PtgEndSheet', f:parse_PtgEndSheet },\n\t/*::[*/0x1C/*::]*/: { n:'PtgErr', f:parse_PtgErr },\n\t/*::[*/0x1D/*::]*/: { n:'PtgBool', f:parse_PtgBool },\n\t/*::[*/0x1E/*::]*/: { n:'PtgInt', f:parse_PtgInt },\n\t/*::[*/0x1F/*::]*/: { n:'PtgNum', f:parse_PtgNum },\n\t/*::[*/0x20/*::]*/: { n:'PtgArray', f:parse_PtgArray },\n\t/*::[*/0x21/*::]*/: { n:'PtgFunc', f:parse_PtgFunc },\n\t/*::[*/0x22/*::]*/: { n:'PtgFuncVar', f:parse_PtgFuncVar },\n\t/*::[*/0x23/*::]*/: { n:'PtgName', f:parse_PtgName },\n\t/*::[*/0x24/*::]*/: { n:'PtgRef', f:parse_PtgRef },\n\t/*::[*/0x25/*::]*/: { n:'PtgArea', f:parse_PtgArea },\n\t/*::[*/0x26/*::]*/: { n:'PtgMemArea', f:parse_PtgMemArea },\n\t/*::[*/0x27/*::]*/: { n:'PtgMemErr', f:parse_PtgMemErr },\n\t/*::[*/0x28/*::]*/: { n:'PtgMemNoMem', f:parse_PtgMemNoMem },\n\t/*::[*/0x29/*::]*/: { n:'PtgMemFunc', f:parse_PtgMemFunc },\n\t/*::[*/0x2A/*::]*/: { n:'PtgRefErr', f:parse_PtgRefErr },\n\t/*::[*/0x2B/*::]*/: { n:'PtgAreaErr', f:parse_PtgAreaErr },\n\t/*::[*/0x2C/*::]*/: { n:'PtgRefN', f:parse_PtgRefN },\n\t/*::[*/0x2D/*::]*/: { n:'PtgAreaN', f:parse_PtgAreaN },\n\t/*::[*/0x2E/*::]*/: { n:'PtgMemAreaN', f:parse_PtgMemAreaN },\n\t/*::[*/0x2F/*::]*/: { n:'PtgMemNoMemN', f:parse_PtgMemNoMemN },\n\t/*::[*/0x39/*::]*/: { n:'PtgNameX', f:parse_PtgNameX },\n\t/*::[*/0x3A/*::]*/: { n:'PtgRef3d', f:parse_PtgRef3d },\n\t/*::[*/0x3B/*::]*/: { n:'PtgArea3d', f:parse_PtgArea3d },\n\t/*::[*/0x3C/*::]*/: { n:'PtgRefErr3d', f:parse_PtgRefErr3d },\n\t/*::[*/0x3D/*::]*/: { n:'PtgAreaErr3d', f:parse_PtgAreaErr3d },\n\t/*::[*/0xFF/*::]*/: {}\n};\n/* These are duplicated in the PtgTypes table */\nvar PtgDupes = {\n\t/*::[*/0x40/*::]*/: 0x20, /*::[*/0x60/*::]*/: 0x20,\n\t/*::[*/0x41/*::]*/: 0x21, /*::[*/0x61/*::]*/: 0x21,\n\t/*::[*/0x42/*::]*/: 0x22, /*::[*/0x62/*::]*/: 0x22,\n\t/*::[*/0x43/*::]*/: 0x23, /*::[*/0x63/*::]*/: 0x23,\n\t/*::[*/0x44/*::]*/: 0x24, /*::[*/0x64/*::]*/: 0x24,\n\t/*::[*/0x45/*::]*/: 0x25, /*::[*/0x65/*::]*/: 0x25,\n\t/*::[*/0x46/*::]*/: 0x26, /*::[*/0x66/*::]*/: 0x26,\n\t/*::[*/0x47/*::]*/: 0x27, /*::[*/0x67/*::]*/: 0x27,\n\t/*::[*/0x48/*::]*/: 0x28, /*::[*/0x68/*::]*/: 0x28,\n\t/*::[*/0x49/*::]*/: 0x29, /*::[*/0x69/*::]*/: 0x29,\n\t/*::[*/0x4A/*::]*/: 0x2A, /*::[*/0x6A/*::]*/: 0x2A,\n\t/*::[*/0x4B/*::]*/: 0x2B, /*::[*/0x6B/*::]*/: 0x2B,\n\t/*::[*/0x4C/*::]*/: 0x2C, /*::[*/0x6C/*::]*/: 0x2C,\n\t/*::[*/0x4D/*::]*/: 0x2D, /*::[*/0x6D/*::]*/: 0x2D,\n\t/*::[*/0x4E/*::]*/: 0x2E, /*::[*/0x6E/*::]*/: 0x2E,\n\t/*::[*/0x4F/*::]*/: 0x2F, /*::[*/0x6F/*::]*/: 0x2F,\n\t/*::[*/0x58/*::]*/: 0x22, /*::[*/0x78/*::]*/: 0x22,\n\t/*::[*/0x59/*::]*/: 0x39, /*::[*/0x79/*::]*/: 0x39,\n\t/*::[*/0x5A/*::]*/: 0x3A, /*::[*/0x7A/*::]*/: 0x3A,\n\t/*::[*/0x5B/*::]*/: 0x3B, /*::[*/0x7B/*::]*/: 0x3B,\n\t/*::[*/0x5C/*::]*/: 0x3C, /*::[*/0x7C/*::]*/: 0x3C,\n\t/*::[*/0x5D/*::]*/: 0x3D, /*::[*/0x7D/*::]*/: 0x3D\n};\n\nvar Ptg18 = {\n\t/*::[*/0x01/*::]*/: { n:'PtgElfLel', f:parse_PtgElfLel },\n\t/*::[*/0x02/*::]*/: { n:'PtgElfRw', f:parse_PtgElfRw },\n\t/*::[*/0x03/*::]*/: { n:'PtgElfCol', f:parse_PtgElfCol },\n\t/*::[*/0x06/*::]*/: { n:'PtgElfRwV', f:parse_PtgElfRwV },\n\t/*::[*/0x07/*::]*/: { n:'PtgElfColV', f:parse_PtgElfColV },\n\t/*::[*/0x0A/*::]*/: { n:'PtgElfRadical', f:parse_PtgElfRadical },\n\t/*::[*/0x0B/*::]*/: { n:'PtgElfRadicalS', f:parse_PtgElfRadicalS },\n\t/*::[*/0x0D/*::]*/: { n:'PtgElfColS', f:parse_PtgElfColS },\n\t/*::[*/0x0F/*::]*/: { n:'PtgElfColSV', f:parse_PtgElfColSV },\n\t/*::[*/0x10/*::]*/: { n:'PtgElfRadicalLel', f:parse_PtgElfRadicalLel },\n\t/*::[*/0x19/*::]*/: { n:'PtgList', f:parse_PtgList },\n\t/*::[*/0x1D/*::]*/: { n:'PtgSxName', f:parse_PtgSxName },\n\t/*::[*/0xFF/*::]*/: {}\n};\nvar Ptg19 = {\n\t/*::[*/0x00/*::]*/: { n:'PtgAttrNoop', f:parse_PtgAttrNoop },\n\t/*::[*/0x01/*::]*/: { n:'PtgAttrSemi', f:parse_PtgAttrSemi },\n\t/*::[*/0x02/*::]*/: { n:'PtgAttrIf', f:parse_PtgAttrIf },\n\t/*::[*/0x04/*::]*/: { n:'PtgAttrChoose', f:parse_PtgAttrChoose },\n\t/*::[*/0x08/*::]*/: { n:'PtgAttrGoto', f:parse_PtgAttrGoto },\n\t/*::[*/0x10/*::]*/: { n:'PtgAttrSum', f:parse_PtgAttrSum },\n\t/*::[*/0x20/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel },\n\t/*::[*/0x21/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel },\n\t/*::[*/0x40/*::]*/: { n:'PtgAttrSpace', f:parse_PtgAttrSpace },\n\t/*::[*/0x41/*::]*/: { n:'PtgAttrSpaceSemi', f:parse_PtgAttrSpaceSemi },\n\t/*::[*/0x80/*::]*/: { n:'PtgAttrIfError', f:parse_PtgAttrIfError },\n\t/*::[*/0xFF/*::]*/: {}\n};\n\n/* [MS-XLS] 2.5.198.103 ; [MS-XLSB] 2.5.97.87 */\nfunction parse_RgbExtra(blob, length, rgce, opts) {\n\tif(opts.biff < 8) return parsenoop(blob, length);\n\tvar target = blob.l + length;\n\tvar o = [];\n\tfor(var i = 0; i !== rgce.length; ++i) {\n\t\tswitch(rgce[i][0]) {\n\t\t\tcase 'PtgArray': /* PtgArray -> PtgExtraArray */\n\t\t\t\trgce[i][1] = parse_PtgExtraArray(blob, 0, opts);\n\t\t\t\to.push(rgce[i][1]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemArea': /* PtgMemArea -> PtgExtraMem */\n\t\t\t\trgce[i][2] = parse_PtgExtraMem(blob, rgce[i][1], opts);\n\t\t\t\to.push(rgce[i][2]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgExp': /* PtgExp -> PtgExtraCol */\n\t\t\t\tif(opts && opts.biff == 12) {\n\t\t\t\t\trgce[i][1][1] = blob.read_shift(4);\n\t\t\t\t\to.push(rgce[i][1]);\n\t\t\t\t} break;\n\t\t\tcase 'PtgList': /* TODO: PtgList -> PtgExtraList */\n\t\t\tcase 'PtgElfRadicalS': /* TODO: PtgElfRadicalS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColS': /* TODO: PtgElfColS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColSV': /* TODO: PtgElfColSV -> PtgExtraElf */\n\t\t\t\tthrow \"Unsupported \" + rgce[i][0];\n\t\t\tdefault: break;\n\t\t}\n\t}\n\tlength = target - blob.l;\n\t/* note: this is technically an error but Excel disregards */\n\t//if(target !== blob.l && blob.l !== target - length) throw new Error(target + \" != \" + blob.l);\n\tif(length !== 0) o.push(parsenoop(blob, length));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.104 ; [MS-XLSB] 2.5.97.88 */\nfunction parse_Rgce(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar R, id, ptgs = [];\n\twhile(target != blob.l) {\n\t\tlength = target - blob.l;\n\t\tid = blob[blob.l];\n\t\tR = PtgTypes[id] || PtgTypes[PtgDupes[id]];\n\t\tif(id === 0x18 || id === 0x19) R = (id === 0x18 ? Ptg18 : Ptg19)[blob[blob.l + 1]];\n\t\tif(!R || !R.f) { /*ptgs.push*/(parsenoop(blob, length)); }\n\t\telse { ptgs.push([R.n, R.f(blob, length, opts)]); }\n\t}\n\treturn ptgs;\n}\n\nfunction stringify_array(f/*:Array<Array<string>>*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\tfor(var i = 0; i < f.length; ++i) {\n\t\tvar x = f[i], r/*:Array<string>*/ = [];\n\t\tfor(var j = 0; j < x.length; ++j) {\n\t\t\tvar y = x[j];\n\t\t\tif(y) switch(y[0]) {\n\t\t\t\t// TODO: handle embedded quotes\n\t\t\t\tcase 0x02:\n\t\t\t\t\t/*:: if(typeof y[1] != 'string') throw \"unreachable\"; */\n\t\t\t\t\tr.push('\"' + y[1].replace(/\"/g,'\"\"') + '\"'); break;\n\t\t\t\tdefault: r.push(y[1]);\n\t\t\t} else r.push(\"\");\n\t\t}\n\t\to.push(r.join(\",\"));\n\t}\n\treturn o.join(\";\");\n}\n\n/* [MS-XLS] 2.2.2 ; [MS-XLSB] 2.2.2 TODO */\nvar PtgBinOp = {\n\tPtgAdd: \"+\",\n\tPtgConcat: \"&\",\n\tPtgDiv: \"/\",\n\tPtgEq: \"=\",\n\tPtgGe: \">=\",\n\tPtgGt: \">\",\n\tPtgLe: \"<=\",\n\tPtgLt: \"<\",\n\tPtgMul: \"*\",\n\tPtgNe: \"<>\",\n\tPtgPower: \"^\",\n\tPtgSub: \"-\"\n};\n\n// List of invalid characters needs to be tested further\nfunction formula_quote_sheet_name(sname/*:string*/, opts)/*:string*/ {\n\tif(!sname && !(opts && opts.biff <= 5 && opts.biff >= 2)) throw new Error(\"empty sheet name\");\n\tif (/[^\\w\\u4E00-\\u9FFF\\u3040-\\u30FF]/.test(sname)) return \"'\" + sname + \"'\";\n\treturn sname;\n}\nfunction get_ixti_raw(supbooks, ixti/*:number*/, opts)/*:string*/ {\n\tif(!supbooks) return \"SH33TJSERR0\";\n\tif(opts.biff > 8 && (!supbooks.XTI || !supbooks.XTI[ixti])) return supbooks.SheetNames[ixti];\n\tif(!supbooks.XTI) return \"SH33TJSERR6\";\n\tvar XTI = supbooks.XTI[ixti];\n\tif(opts.biff < 8) {\n\t\tif(ixti > 10000) ixti-= 65536;\n\t\tif(ixti < 0) ixti = -ixti;\n\t\treturn ixti == 0 ? \"\" : supbooks.XTI[ixti - 1];\n\t}\n\tif(!XTI) return \"SH33TJSERR1\";\n\tvar o = \"\";\n\tif(opts.biff > 8) switch(supbooks[XTI[0]][0]) {\n\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\to = XTI[1] == -1 ? \"#REF\" : supbooks.SheetNames[XTI[1]];\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tif(opts.SID != null) return supbooks.SheetNames[opts.SID];\n\t\t\treturn \"SH33TJSSAME\" + supbooks[XTI[0]][0];\n\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\t/* falls through */\n\t\tdefault: return \"SH33TJSSRC\" + supbooks[XTI[0]][0];\n\t}\n\tswitch(supbooks[XTI[0]][0][0]) {\n\t\tcase 0x0401:\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks.SheetNames[XTI[1]] || \"SH33TJSERR3\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x3A01: return supbooks[XTI[0]].slice(1).map(function(name) { return name.Name; }).join(\";;\"); //return \"SH33TJSERR8\";\n\t\tdefault:\n\t\t\tif(!supbooks[XTI[0]][0][3]) return \"SH33TJSERR2\";\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks[XTI[0]][0][3][XTI[1]] || \"SH33TJSERR4\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks[XTI[0]][0][3][XTI[2]];\n\t}\n}\nfunction get_ixti(supbooks, ixti/*:number*/, opts)/*:string*/ {\n\tvar ixtiraw = get_ixti_raw(supbooks, ixti, opts);\n\treturn ixtiraw == \"#REF\" ? ixtiraw : formula_quote_sheet_name(ixtiraw, opts);\n}\nfunction stringify_formula(formula/*Array<any>*/, range, cell/*:any*/, supbooks, opts)/*:string*/ {\n\tvar biff = (opts && opts.biff) || 8;\n\tvar _range = /*range != null ? range :*/ {s:{c:0, r:0},e:{c:0, r:0}};\n\tvar stack/*:Array<string>*/ = [], e1, e2, /*::type,*/ c/*:CellAddress*/, ixti=0, nameidx=0, r, sname=\"\";\n\tif(!formula[0] || !formula[0][0]) return \"\";\n\tvar last_sp = -1, sp = \"\";\n\tfor(var ff = 0, fflen = formula[0].length; ff < fflen; ++ff) {\n\t\tvar f = formula[0][ff];\n\t\tswitch(f[0]) {\n\t\t\tcase 'PtgUminus': /* [MS-XLS] 2.5.198.93 */\n\t\t\t\tstack.push(\"-\" + stack.pop()); break;\n\t\t\tcase 'PtgUplus': /* [MS-XLS] 2.5.198.95 */\n\t\t\t\tstack.push(\"+\" + stack.pop()); break;\n\t\t\tcase 'PtgPercent': /* [MS-XLS] 2.5.198.81 */\n\t\t\t\tstack.push(stack.pop() + \"%\"); break;\n\n\t\t\tcase 'PtgAdd':    /* [MS-XLS] 2.5.198.26 */\n\t\t\tcase 'PtgConcat': /* [MS-XLS] 2.5.198.43 */\n\t\t\tcase 'PtgDiv':    /* [MS-XLS] 2.5.198.45 */\n\t\t\tcase 'PtgEq':     /* [MS-XLS] 2.5.198.56 */\n\t\t\tcase 'PtgGe':     /* [MS-XLS] 2.5.198.64 */\n\t\t\tcase 'PtgGt':     /* [MS-XLS] 2.5.198.65 */\n\t\t\tcase 'PtgLe':     /* [MS-XLS] 2.5.198.68 */\n\t\t\tcase 'PtgLt':     /* [MS-XLS] 2.5.198.69 */\n\t\t\tcase 'PtgMul':    /* [MS-XLS] 2.5.198.75 */\n\t\t\tcase 'PtgNe':     /* [MS-XLS] 2.5.198.78 */\n\t\t\tcase 'PtgPower':  /* [MS-XLS] 2.5.198.82 */\n\t\t\tcase 'PtgSub':    /* [MS-XLS] 2.5.198.90 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\" \", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\"\\r\", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tsp = \"\";\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\te2 = e2 + sp;\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(e2+PtgBinOp[f[0]]+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgIsect': /* [MS-XLS] 2.5.198.67 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\" \"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgUnion': /* [MS-XLS] 2.5.198.94 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\",\"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRange': /* [MS-XLS] 2.5.198.83 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\":\"+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrChoose': /* [MS-XLS] 2.5.198.34 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrGoto': /* [MS-XLS] 2.5.198.35 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIf': /* [MS-XLS] 2.5.198.36 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIfError': /* [MS-XLSB] 2.5.97.28 */\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'PtgRef': /* [MS-XLS] 2.5.198.84 */\n\t\t\t\t/*::type = f[1][0]; */c = shift_cell_xls((f[1][1]/*:any*/), _range, opts);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRefN': /* [MS-XLS] 2.5.198.88 */\n\t\t\t\t/*::type = f[1][0]; */c = cell ? shift_cell_xls((f[1][1]/*:any*/), cell, opts) : (f[1][1]/*:any*/);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRef3d': /* [MS-XLS] 2.5.198.85 */\n\t\t\t\t/*::type = f[1][0]; */ixti = /*::Number(*/f[1][1]/*::)*/; c = shift_cell_xls((f[1][2]/*:any*/), _range, opts);\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tvar w = sname; /* IE9 fails on defined names */ // eslint-disable-line no-unused-vars\n\t\t\t\tstack.push(sname + \"!\" + encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgFunc': /* [MS-XLS] 2.5.198.62 */\n\t\t\tcase 'PtgFuncVar': /* [MS-XLS] 2.5.198.63 */\n\t\t\t\t/* f[1] = [argc, func, type] */\n\t\t\t\tvar argc/*:number*/ = (f[1][0]/*:any*/), func/*:string*/ = (f[1][1]/*:any*/);\n\t\t\t\tif(!argc) argc = 0;\n\t\t\t\targc &= 0x7F;\n\t\t\t\tvar args = argc == 0 ? [] : stack.slice(-argc);\n\t\t\t\tstack.length -= argc;\n\t\t\t\tif(func === 'User') func = args.shift();\n\t\t\t\tstack.push(func + \"(\" + args.join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgBool': /* [MS-XLS] 2.5.198.42 */\n\t\t\t\tstack.push(f[1] ? \"TRUE\" : \"FALSE\"); break;\n\t\t\tcase 'PtgInt': /* [MS-XLS] 2.5.198.66 */\n\t\t\t\tstack.push(/*::String(*/f[1]/*::)*/); break;\n\t\t\tcase 'PtgNum': /* [MS-XLS] 2.5.198.79 TODO: precision? */\n\t\t\t\tstack.push(String(f[1])); break;\n\t\t\tcase 'PtgStr': /* [MS-XLS] 2.5.198.89 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push('\"' + f[1].replace(/\"/g, '\"\"') + '\"'); break;\n\t\t\tcase 'PtgErr': /* [MS-XLS] 2.5.198.57 */\n\t\t\t\tstack.push(/*::String(*/f[1]/*::)*/); break;\n\t\t\tcase 'PtgAreaN': /* [MS-XLS] 2.5.198.31 TODO */\n\t\t\t\t/*::type = f[1][0]; */r = shift_range_xls(f[1][1], cell ? {s:cell} : _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea': /* [MS-XLS] 2.5.198.27 TODO: fixed points */\n\t\t\t\t/*::type = f[1][0]; */r = shift_range_xls(f[1][1], _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea3d': /* [MS-XLS] 2.5.198.28 TODO */\n\t\t\t\t/*::type = f[1][0]; */ixti = /*::Number(*/f[1][1]/*::)*/; r = f[1][2];\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tstack.push(sname + \"!\" + encode_range_xls((r/*:any*/), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrSum': /* [MS-XLS] 2.5.198.41 */\n\t\t\t\tstack.push(\"SUM(\" + stack.pop() + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrBaxcel': /* [MS-XLS] 2.5.198.33 */\n\t\t\tcase 'PtgAttrSemi': /* [MS-XLS] 2.5.198.37 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgName': /* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 TODO: revisions */\n\t\t\t\t/* f[1] = type, 0, nameindex */\n\t\t\t\tnameidx = (f[1][2]/*:any*/);\n\t\t\t\tvar lbl = (supbooks.names||[])[nameidx-1] || (supbooks[0]||[])[nameidx];\n\t\t\t\tvar name = lbl ? lbl.Name : \"SH33TJSNAME\" + String(nameidx);\n\t\t\t\t/* [MS-XLSB] 2.5.97.10 Ftab -- last verified 20220204 */\n\t\t\t\tif(name && name.slice(0,6) == \"_xlfn.\" && !opts.xlfn) name = name.slice(6);\n\t\t\t\tstack.push(name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgNameX': /* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 TODO: revisions */\n\t\t\t\t/* f[1] = type, ixti, nameindex */\n\t\t\t\tvar bookidx/*:number*/ = (f[1][1]/*:any*/); nameidx = (f[1][2]/*:any*/); var externbook;\n\t\t\t\t/* TODO: Properly handle missing values -- this should be using get_ixti_raw primarily */\n\t\t\t\tif(opts.biff <= 5) {\n\t\t\t\t\tif(bookidx < 0) bookidx = -bookidx;\n\t\t\t\t\tif(supbooks[bookidx]) externbook = supbooks[bookidx][nameidx];\n\t\t\t\t} else {\n\t\t\t\t\tvar o = \"\";\n\t\t\t\t\tif(((supbooks[bookidx]||[])[0]||[])[0] == 0x3A01){/* empty */}\n\t\t\t\t\telse if(((supbooks[bookidx]||[])[0]||[])[0] == 0x0401){\n\t\t\t\t\t\tif(supbooks[bookidx][nameidx] && supbooks[bookidx][nameidx].itab > 0) {\n\t\t\t\t\t\t\to = supbooks.SheetNames[supbooks[bookidx][nameidx].itab-1] + \"!\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse o = supbooks.SheetNames[nameidx-1]+ \"!\";\n\t\t\t\t\tif(supbooks[bookidx] && supbooks[bookidx][nameidx]) o += supbooks[bookidx][nameidx].Name;\n\t\t\t\t\telse if(supbooks[0] && supbooks[0][nameidx]) o += supbooks[0][nameidx].Name;\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar ixtidata = (get_ixti_raw(supbooks, bookidx, opts)||\"\").split(\";;\");\n\t\t\t\t\t\tif(ixtidata[nameidx - 1]) o = ixtidata[nameidx - 1]; // TODO: confirm this is correct\n\t\t\t\t\t\telse o += \"SH33TJSERRX\";\n\t\t\t\t\t}\n\t\t\t\t\tstack.push(o);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!externbook) externbook = {Name: \"SH33TJSERRY\"};\n\t\t\t\tstack.push(externbook.Name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgParen': /* [MS-XLS] 2.5.198.80 */\n\t\t\t\tvar lp = '(', rp = ')';\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 2: lp = fill(\" \", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 3: lp = fill(\"\\r\", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 4: rp = fill(\" \", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 5: rp = fill(\"\\r\", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(lp + stack.pop() + rp); break;\n\n\t\t\tcase 'PtgRefErr': /* [MS-XLS] 2.5.198.86 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgRefErr3d': /* [MS-XLS] 2.5.198.87 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgExp': /* [MS-XLS] 2.5.198.58 TODO */\n\t\t\t\tc = {c:(f[1][1]/*:any*/),r:(f[1][0]/*:any*/)};\n\t\t\t\tvar q = ({c: cell.c, r:cell.r}/*:any*/);\n\t\t\t\tif(supbooks.sharedf[encode_cell(c)]) {\n\t\t\t\t\tvar parsedf = (supbooks.sharedf[encode_cell(c)]);\n\t\t\t\t\tstack.push(stringify_formula(parsedf, _range, q, supbooks, opts));\n\t\t\t\t} else {\n\t\t\t\t\tvar fnd = false;\n\t\t\t\t\tfor(e1=0;e1!=supbooks.arrayf.length; ++e1) {\n\t\t\t\t\t\t/* TODO: should be something like range_has */\n\t\t\t\t\t\te2 = supbooks.arrayf[e1];\n\t\t\t\t\t\tif(c.c < e2[0].s.c || c.c > e2[0].e.c) continue;\n\t\t\t\t\t\tif(c.r < e2[0].s.r || c.r > e2[0].e.r) continue;\n\t\t\t\t\t\tstack.push(stringify_formula(e2[1], _range, q, supbooks, opts));\n\t\t\t\t\t\tfnd = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(!fnd) stack.push(/*::String(*/f[1]/*::)*/);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgArray': /* [MS-XLS] 2.5.198.32 TODO */\n\t\t\t\tstack.push(\"{\" + stringify_array(/*::(*/f[1]/*:: :any)*/) + \"}\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemArea': /* [MS-XLS] 2.5.198.70 TODO: confirm this is a non-display */\n\t\t\t\t//stack.push(\"(\" + f[2].map(encode_range).join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrSpace': /* [MS-XLS] 2.5.198.38 */\n\t\t\tcase 'PtgAttrSpaceSemi': /* [MS-XLS] 2.5.198.39 */\n\t\t\t\tlast_sp = ff;\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgTbl': /* [MS-XLS] 2.5.198.92 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemErr': /* [MS-XLS] 2.5.198.71 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMissArg': /* [MS-XLS] 2.5.198.74 */\n\t\t\t\tstack.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAreaErr': /* [MS-XLS] 2.5.198.29 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgAreaErr3d': /* [MS-XLS] 2.5.198.30 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgList': /* [MS-XLSB] 2.5.97.52 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push(\"Table\" + f[1].idx + \"[#\" + f[1].rt + \"]\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemAreaN':\n\t\t\tcase 'PtgMemNoMemN':\n\t\t\tcase 'PtgAttrNoop':\n\t\t\tcase 'PtgSheet':\n\t\t\tcase 'PtgEndSheet':\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemFunc': /* [MS-XLS] 2.5.198.72 TODO */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemNoMem': /* [MS-XLS] 2.5.198.73 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgElfCol': /* [MS-XLS] 2.5.198.46 */\n\t\t\tcase 'PtgElfColS': /* [MS-XLS] 2.5.198.47 */\n\t\t\tcase 'PtgElfColSV': /* [MS-XLS] 2.5.198.48 */\n\t\t\tcase 'PtgElfColV': /* [MS-XLS] 2.5.198.49 */\n\t\t\tcase 'PtgElfLel': /* [MS-XLS] 2.5.198.50 */\n\t\t\tcase 'PtgElfRadical': /* [MS-XLS] 2.5.198.51 */\n\t\t\tcase 'PtgElfRadicalLel': /* [MS-XLS] 2.5.198.52 */\n\t\t\tcase 'PtgElfRadicalS': /* [MS-XLS] 2.5.198.53 */\n\t\t\tcase 'PtgElfRw': /* [MS-XLS] 2.5.198.54 */\n\t\t\tcase 'PtgElfRwV': /* [MS-XLS] 2.5.198.55 */\n\t\t\t\tthrow new Error(\"Unsupported ELFs\");\n\n\t\t\tcase 'PtgSxName': /* [MS-XLS] 2.5.198.91 TODO -- find a test case */\n\t\t\t\tthrow new Error('Unrecognized Formula Token: ' + String(f));\n\t\t\tdefault: throw new Error('Unrecognized Formula Token: ' + String(f));\n\t\t}\n\t\tvar PtgNonDisp = ['PtgAttrSpace', 'PtgAttrSpaceSemi', 'PtgAttrGoto'];\n\t\tif(opts.biff != 3) if(last_sp >= 0 && PtgNonDisp.indexOf(formula[0][ff][0]) == -1) {\n\t\t\tf = formula[0][last_sp];\n\t\t\tvar _left = true;\n\t\t\tswitch(f[1][0]) {\n\t\t\t\t/* note: some bad XLSB files omit the PtgParen */\n\t\t\t\tcase 4: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 0:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\" \", f[1][1]); break;\n\t\t\t\tcase 5: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 1:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\"\\r\", f[1][1]); break;\n\t\t\t\tdefault:\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + f[1][0]);\n\t\t\t}\n\t\t\tstack.push((_left ? sp : \"\") + stack.pop() + (_left ? \"\" : sp));\n\t\t\tlast_sp = -1;\n\t\t}\n\t}\n\tif(stack.length > 1 && opts.WTF) throw new Error(\"bad formula stack\");\n\treturn stack[0];\n}\n\n/* [MS-XLS] 2.5.198.1 TODO */\nfunction parse_ArrayParsedFormula(blob, length, opts/*::, ref*/) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.3 TODO */\nfunction parse_XLSCellParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.21 */\nfunction parse_NameParsedFormula(blob, length, opts, cce) {\n\tvar target = blob.l + length;\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tvar rgcb;\n\tif(target !== blob.l) rgcb = parse_RgbExtra(blob, target - blob.l, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.118 TODO */\nfunction parse_SharedParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar rgcb, cce = blob.read_shift(2); // length of rgce\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tif(length !== cce + 2) rgcb = parse_RgbExtra(blob, target - cce - 2, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.133 TODO: how to emit empty strings? */\nfunction parse_FormulaValue(blob/*::, length*/) {\n\tvar b;\n\tif(__readUInt16LE(blob,blob.l + 6) !== 0xFFFF) return [parse_Xnum(blob),'n'];\n\tswitch(blob[blob.l]) {\n\t\tcase 0x00: blob.l += 8; return [\"String\", 's'];\n\t\tcase 0x01: b = blob[blob.l+2] === 0x1; blob.l += 8; return [b,'b'];\n\t\tcase 0x02: b = blob[blob.l+2]; blob.l += 8; return [b,'e'];\n\t\tcase 0x03: blob.l += 8; return [\"\",'s'];\n\t}\n\treturn [];\n}\nfunction write_FormulaValue(value) {\n\tif(value == null) {\n\t\t// Blank String Value\n\t\tvar o = new_buf(8);\n\t\to.write_shift(1, 0x03);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0xFFFF);\n\t\treturn o;\n\t} else if(typeof value == \"number\") return write_Xnum(value);\n\treturn write_Xnum(0);\n}\n\n/* [MS-XLS] 2.4.127 TODO */\nfunction parse_Formula(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) ++blob.l;\n\tvar val = parse_FormulaValue(blob,8);\n\tvar flags = blob.read_shift(1);\n\tif(opts.biff != 2) {\n\t\tblob.read_shift(1);\n\t\tif(opts.biff >= 5) {\n\t\t\t/*var chn = */blob.read_shift(4);\n\t\t}\n\t}\n\tvar cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts);\n\treturn {cell:cell, val:val[0], formula:cbf, shared: (flags >> 3) & 1, tt:val[1]};\n}\nfunction write_Formula(cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, os/*:number*/) {\n\t// Cell\n\tvar o1 = write_XLSCell(R, C, os);\n\n\t// FormulaValue\n\tvar o2 = write_FormulaValue(cell.v);\n\n\t// flags + cache\n\tvar o3 = new_buf(6);\n\tvar flags = 0x01 | 0x20;\n\to3.write_shift(2, flags);\n\to3.write_shift(4, 0);\n\n\t// CellParsedFormula\n\tvar bf = new_buf(cell.bf.length);\n\tfor(var i = 0; i < cell.bf.length; ++i) bf[i] = cell.bf[i];\n\n\tvar out = bconcat([o1, o2, o3, bf]);\n\treturn out;\n}\n\n\n/* XLSB Parsed Formula records have the same shape */\nfunction parse_XLSBParsedFormula(data, length, opts) {\n\tvar cce = data.read_shift(4);\n\tvar rgce = parse_Rgce(data, cce, opts);\n\tvar cb = data.read_shift(4);\n\tvar rgcb = cb > 0 ? parse_RgbExtra(data, cb, rgce, opts) : null;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLSB] 2.5.97.1 ArrayParsedFormula */\nvar parse_XLSBArrayParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.4 CellParsedFormula */\nvar parse_XLSBCellParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.8 DVParsedFormula */\n//var parse_XLSBDVParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.9 FRTParsedFormula */\n//var parse_XLSBFRTParsedFormula = parse_XLSBParsedFormula2;\n/* [MS-XLSB] 2.5.97.12 NameParsedFormula */\nvar parse_XLSBNameParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.98 SharedParsedFormula */\nvar parse_XLSBSharedParsedFormula = parse_XLSBParsedFormula;\nvar Cetab = {\n  0: \"BEEP\",\n  1: \"OPEN\",\n  2: \"OPEN.LINKS\",\n  3: \"CLOSE.ALL\",\n  4: \"SAVE\",\n  5: \"SAVE.AS\",\n  6: \"FILE.DELETE\",\n  7: \"PAGE.SETUP\",\n  8: \"PRINT\",\n  9: \"PRINTER.SETUP\",\n  10: \"QUIT\",\n  11: \"NEW.WINDOW\",\n  12: \"ARRANGE.ALL\",\n  13: \"WINDOW.SIZE\",\n  14: \"WINDOW.MOVE\",\n  15: \"FULL\",\n  16: \"CLOSE\",\n  17: \"RUN\",\n  22: \"SET.PRINT.AREA\",\n  23: \"SET.PRINT.TITLES\",\n  24: \"SET.PAGE.BREAK\",\n  25: \"REMOVE.PAGE.BREAK\",\n  26: \"FONT\",\n  27: \"DISPLAY\",\n  28: \"PROTECT.DOCUMENT\",\n  29: \"PRECISION\",\n  30: \"A1.R1C1\",\n  31: \"CALCULATE.NOW\",\n  32: \"CALCULATION\",\n  34: \"DATA.FIND\",\n  35: \"EXTRACT\",\n  36: \"DATA.DELETE\",\n  37: \"SET.DATABASE\",\n  38: \"SET.CRITERIA\",\n  39: \"SORT\",\n  40: \"DATA.SERIES\",\n  41: \"TABLE\",\n  42: \"FORMAT.NUMBER\",\n  43: \"ALIGNMENT\",\n  44: \"STYLE\",\n  45: \"BORDER\",\n  46: \"CELL.PROTECTION\",\n  47: \"COLUMN.WIDTH\",\n  48: \"UNDO\",\n  49: \"CUT\",\n  50: \"COPY\",\n  51: \"PASTE\",\n  52: \"CLEAR\",\n  53: \"PASTE.SPECIAL\",\n  54: \"EDIT.DELETE\",\n  55: \"INSERT\",\n  56: \"FILL.RIGHT\",\n  57: \"FILL.DOWN\",\n  61: \"DEFINE.NAME\",\n  62: \"CREATE.NAMES\",\n  63: \"FORMULA.GOTO\",\n  64: \"FORMULA.FIND\",\n  65: \"SELECT.LAST.CELL\",\n  66: \"SHOW.ACTIVE.CELL\",\n  67: \"GALLERY.AREA\",\n  68: \"GALLERY.BAR\",\n  69: \"GALLERY.COLUMN\",\n  70: \"GALLERY.LINE\",\n  71: \"GALLERY.PIE\",\n  72: \"GALLERY.SCATTER\",\n  73: \"COMBINATION\",\n  74: \"PREFERRED\",\n  75: \"ADD.OVERLAY\",\n  76: \"GRIDLINES\",\n  77: \"SET.PREFERRED\",\n  78: \"AXES\",\n  79: \"LEGEND\",\n  80: \"ATTACH.TEXT\",\n  81: \"ADD.ARROW\",\n  82: \"SELECT.CHART\",\n  83: \"SELECT.PLOT.AREA\",\n  84: \"PATTERNS\",\n  85: \"MAIN.CHART\",\n  86: \"OVERLAY\",\n  87: \"SCALE\",\n  88: \"FORMAT.LEGEND\",\n  89: \"FORMAT.TEXT\",\n  90: \"EDIT.REPEAT\",\n  91: \"PARSE\",\n  92: \"JUSTIFY\",\n  93: \"HIDE\",\n  94: \"UNHIDE\",\n  95: \"WORKSPACE\",\n  96: \"FORMULA\",\n  97: \"FORMULA.FILL\",\n  98: \"FORMULA.ARRAY\",\n  99: \"DATA.FIND.NEXT\",\n  100: \"DATA.FIND.PREV\",\n  101: \"FORMULA.FIND.NEXT\",\n  102: \"FORMULA.FIND.PREV\",\n  103: \"ACTIVATE\",\n  104: \"ACTIVATE.NEXT\",\n  105: \"ACTIVATE.PREV\",\n  106: \"UNLOCKED.NEXT\",\n  107: \"UNLOCKED.PREV\",\n  108: \"COPY.PICTURE\",\n  109: \"SELECT\",\n  110: \"DELETE.NAME\",\n  111: \"DELETE.FORMAT\",\n  112: \"VLINE\",\n  113: \"HLINE\",\n  114: \"VPAGE\",\n  115: \"HPAGE\",\n  116: \"VSCROLL\",\n  117: \"HSCROLL\",\n  118: \"ALERT\",\n  119: \"NEW\",\n  120: \"CANCEL.COPY\",\n  121: \"SHOW.CLIPBOARD\",\n  122: \"MESSAGE\",\n  124: \"PASTE.LINK\",\n  125: \"APP.ACTIVATE\",\n  126: \"DELETE.ARROW\",\n  127: \"ROW.HEIGHT\",\n  128: \"FORMAT.MOVE\",\n  129: \"FORMAT.SIZE\",\n  130: \"FORMULA.REPLACE\",\n  131: \"SEND.KEYS\",\n  132: \"SELECT.SPECIAL\",\n  133: \"APPLY.NAMES\",\n  134: \"REPLACE.FONT\",\n  135: \"FREEZE.PANES\",\n  136: \"SHOW.INFO\",\n  137: \"SPLIT\",\n  138: \"ON.WINDOW\",\n  139: \"ON.DATA\",\n  140: \"DISABLE.INPUT\",\n  142: \"OUTLINE\",\n  143: \"LIST.NAMES\",\n  144: \"FILE.CLOSE\",\n  145: \"SAVE.WORKBOOK\",\n  146: \"DATA.FORM\",\n  147: \"COPY.CHART\",\n  148: \"ON.TIME\",\n  149: \"WAIT\",\n  150: \"FORMAT.FONT\",\n  151: \"FILL.UP\",\n  152: \"FILL.LEFT\",\n  153: \"DELETE.OVERLAY\",\n  155: \"SHORT.MENUS\",\n  159: \"SET.UPDATE.STATUS\",\n  161: \"COLOR.PALETTE\",\n  162: \"DELETE.STYLE\",\n  163: \"WINDOW.RESTORE\",\n  164: \"WINDOW.MAXIMIZE\",\n  166: \"CHANGE.LINK\",\n  167: \"CALCULATE.DOCUMENT\",\n  168: \"ON.KEY\",\n  169: \"APP.RESTORE\",\n  170: \"APP.MOVE\",\n  171: \"APP.SIZE\",\n  172: \"APP.MINIMIZE\",\n  173: \"APP.MAXIMIZE\",\n  174: \"BRING.TO.FRONT\",\n  175: \"SEND.TO.BACK\",\n  185: \"MAIN.CHART.TYPE\",\n  186: \"OVERLAY.CHART.TYPE\",\n  187: \"SELECT.END\",\n  188: \"OPEN.MAIL\",\n  189: \"SEND.MAIL\",\n  190: \"STANDARD.FONT\",\n  191: \"CONSOLIDATE\",\n  192: \"SORT.SPECIAL\",\n  193: \"GALLERY.3D.AREA\",\n  194: \"GALLERY.3D.COLUMN\",\n  195: \"GALLERY.3D.LINE\",\n  196: \"GALLERY.3D.PIE\",\n  197: \"VIEW.3D\",\n  198: \"GOAL.SEEK\",\n  199: \"WORKGROUP\",\n  200: \"FILL.GROUP\",\n  201: \"UPDATE.LINK\",\n  202: \"PROMOTE\",\n  203: \"DEMOTE\",\n  204: \"SHOW.DETAIL\",\n  206: \"UNGROUP\",\n  207: \"OBJECT.PROPERTIES\",\n  208: \"SAVE.NEW.OBJECT\",\n  209: \"SHARE\",\n  210: \"SHARE.NAME\",\n  211: \"DUPLICATE\",\n  212: \"APPLY.STYLE\",\n  213: \"ASSIGN.TO.OBJECT\",\n  214: \"OBJECT.PROTECTION\",\n  215: \"HIDE.OBJECT\",\n  216: \"SET.EXTRACT\",\n  217: \"CREATE.PUBLISHER\",\n  218: \"SUBSCRIBE.TO\",\n  219: \"ATTRIBUTES\",\n  220: \"SHOW.TOOLBAR\",\n  222: \"PRINT.PREVIEW\",\n  223: \"EDIT.COLOR\",\n  224: \"SHOW.LEVELS\",\n  225: \"FORMAT.MAIN\",\n  226: \"FORMAT.OVERLAY\",\n  227: \"ON.RECALC\",\n  228: \"EDIT.SERIES\",\n  229: \"DEFINE.STYLE\",\n  240: \"LINE.PRINT\",\n  243: \"ENTER.DATA\",\n  249: \"GALLERY.RADAR\",\n  250: \"MERGE.STYLES\",\n  251: \"EDITION.OPTIONS\",\n  252: \"PASTE.PICTURE\",\n  253: \"PASTE.PICTURE.LINK\",\n  254: \"SPELLING\",\n  256: \"ZOOM\",\n  259: \"INSERT.OBJECT\",\n  260: \"WINDOW.MINIMIZE\",\n  265: \"SOUND.NOTE\",\n  266: \"SOUND.PLAY\",\n  267: \"FORMAT.SHAPE\",\n  268: \"EXTEND.POLYGON\",\n  269: \"FORMAT.AUTO\",\n  272: \"GALLERY.3D.BAR\",\n  273: \"GALLERY.3D.SURFACE\",\n  274: \"FILL.AUTO\",\n  276: \"CUSTOMIZE.TOOLBAR\",\n  277: \"ADD.TOOL\",\n  278: \"EDIT.OBJECT\",\n  279: \"ON.DOUBLECLICK\",\n  280: \"ON.ENTRY\",\n  281: \"WORKBOOK.ADD\",\n  282: \"WORKBOOK.MOVE\",\n  283: \"WORKBOOK.COPY\",\n  284: \"WORKBOOK.OPTIONS\",\n  285: \"SAVE.WORKSPACE\",\n  288: \"CHART.WIZARD\",\n  289: \"DELETE.TOOL\",\n  290: \"MOVE.TOOL\",\n  291: \"WORKBOOK.SELECT\",\n  292: \"WORKBOOK.ACTIVATE\",\n  293: \"ASSIGN.TO.TOOL\",\n  295: \"COPY.TOOL\",\n  296: \"RESET.TOOL\",\n  297: \"CONSTRAIN.NUMERIC\",\n  298: \"PASTE.TOOL\",\n  302: \"WORKBOOK.NEW\",\n  305: \"SCENARIO.CELLS\",\n  306: \"SCENARIO.DELETE\",\n  307: \"SCENARIO.ADD\",\n  308: \"SCENARIO.EDIT\",\n  309: \"SCENARIO.SHOW\",\n  310: \"SCENARIO.SHOW.NEXT\",\n  311: \"SCENARIO.SUMMARY\",\n  312: \"PIVOT.TABLE.WIZARD\",\n  313: \"PIVOT.FIELD.PROPERTIES\",\n  314: \"PIVOT.FIELD\",\n  315: \"PIVOT.ITEM\",\n  316: \"PIVOT.ADD.FIELDS\",\n  318: \"OPTIONS.CALCULATION\",\n  319: \"OPTIONS.EDIT\",\n  320: \"OPTIONS.VIEW\",\n  321: \"ADDIN.MANAGER\",\n  322: \"MENU.EDITOR\",\n  323: \"ATTACH.TOOLBARS\",\n  324: \"VBAActivate\",\n  325: \"OPTIONS.CHART\",\n  328: \"VBA.INSERT.FILE\",\n  330: \"VBA.PROCEDURE.DEFINITION\",\n  336: \"ROUTING.SLIP\",\n  338: \"ROUTE.DOCUMENT\",\n  339: \"MAIL.LOGON\",\n  342: \"INSERT.PICTURE\",\n  343: \"EDIT.TOOL\",\n  344: \"GALLERY.DOUGHNUT\",\n  350: \"CHART.TREND\",\n  352: \"PIVOT.ITEM.PROPERTIES\",\n  354: \"WORKBOOK.INSERT\",\n  355: \"OPTIONS.TRANSITION\",\n  356: \"OPTIONS.GENERAL\",\n  370: \"FILTER.ADVANCED\",\n  373: \"MAIL.ADD.MAILER\",\n  374: \"MAIL.DELETE.MAILER\",\n  375: \"MAIL.REPLY\",\n  376: \"MAIL.REPLY.ALL\",\n  377: \"MAIL.FORWARD\",\n  378: \"MAIL.NEXT.LETTER\",\n  379: \"DATA.LABEL\",\n  380: \"INSERT.TITLE\",\n  381: \"FONT.PROPERTIES\",\n  382: \"MACRO.OPTIONS\",\n  383: \"WORKBOOK.HIDE\",\n  384: \"WORKBOOK.UNHIDE\",\n  385: \"WORKBOOK.DELETE\",\n  386: \"WORKBOOK.NAME\",\n  388: \"GALLERY.CUSTOM\",\n  390: \"ADD.CHART.AUTOFORMAT\",\n  391: \"DELETE.CHART.AUTOFORMAT\",\n  392: \"CHART.ADD.DATA\",\n  393: \"AUTO.OUTLINE\",\n  394: \"TAB.ORDER\",\n  395: \"SHOW.DIALOG\",\n  396: \"SELECT.ALL\",\n  397: \"UNGROUP.SHEETS\",\n  398: \"SUBTOTAL.CREATE\",\n  399: \"SUBTOTAL.REMOVE\",\n  400: \"RENAME.OBJECT\",\n  412: \"WORKBOOK.SCROLL\",\n  413: \"WORKBOOK.NEXT\",\n  414: \"WORKBOOK.PREV\",\n  415: \"WORKBOOK.TAB.SPLIT\",\n  416: \"FULL.SCREEN\",\n  417: \"WORKBOOK.PROTECT\",\n  420: \"SCROLLBAR.PROPERTIES\",\n  421: \"PIVOT.SHOW.PAGES\",\n  422: \"TEXT.TO.COLUMNS\",\n  423: \"FORMAT.CHARTTYPE\",\n  424: \"LINK.FORMAT\",\n  425: \"TRACER.DISPLAY\",\n  430: \"TRACER.NAVIGATE\",\n  431: \"TRACER.CLEAR\",\n  432: \"TRACER.ERROR\",\n  433: \"PIVOT.FIELD.GROUP\",\n  434: \"PIVOT.FIELD.UNGROUP\",\n  435: \"CHECKBOX.PROPERTIES\",\n  436: \"LABEL.PROPERTIES\",\n  437: \"LISTBOX.PROPERTIES\",\n  438: \"EDITBOX.PROPERTIES\",\n  439: \"PIVOT.REFRESH\",\n  440: \"LINK.COMBO\",\n  441: \"OPEN.TEXT\",\n  442: \"HIDE.DIALOG\",\n  443: \"SET.DIALOG.FOCUS\",\n  444: \"ENABLE.OBJECT\",\n  445: \"PUSHBUTTON.PROPERTIES\",\n  446: \"SET.DIALOG.DEFAULT\",\n  447: \"FILTER\",\n  448: \"FILTER.SHOW.ALL\",\n  449: \"CLEAR.OUTLINE\",\n  450: \"FUNCTION.WIZARD\",\n  451: \"ADD.LIST.ITEM\",\n  452: \"SET.LIST.ITEM\",\n  453: \"REMOVE.LIST.ITEM\",\n  454: \"SELECT.LIST.ITEM\",\n  455: \"SET.CONTROL.VALUE\",\n  456: \"SAVE.COPY.AS\",\n  458: \"OPTIONS.LISTS.ADD\",\n  459: \"OPTIONS.LISTS.DELETE\",\n  460: \"SERIES.AXES\",\n  461: \"SERIES.X\",\n  462: \"SERIES.Y\",\n  463: \"ERRORBAR.X\",\n  464: \"ERRORBAR.Y\",\n  465: \"FORMAT.CHART\",\n  466: \"SERIES.ORDER\",\n  467: \"MAIL.LOGOFF\",\n  468: \"CLEAR.ROUTING.SLIP\",\n  469: \"APP.ACTIVATE.MICROSOFT\",\n  470: \"MAIL.EDIT.MAILER\",\n  471: \"ON.SHEET\",\n  472: \"STANDARD.WIDTH\",\n  473: \"SCENARIO.MERGE\",\n  474: \"SUMMARY.INFO\",\n  475: \"FIND.FILE\",\n  476: \"ACTIVE.CELL.FONT\",\n  477: \"ENABLE.TIPWIZARD\",\n  478: \"VBA.MAKE.ADDIN\",\n  480: \"INSERTDATATABLE\",\n  481: \"WORKGROUP.OPTIONS\",\n  482: \"MAIL.SEND.MAILER\",\n  485: \"AUTOCORRECT\",\n  489: \"POST.DOCUMENT\",\n  491: \"PICKLIST\",\n  493: \"VIEW.SHOW\",\n  494: \"VIEW.DEFINE\",\n  495: \"VIEW.DELETE\",\n  509: \"SHEET.BACKGROUND\",\n  510: \"INSERT.MAP.OBJECT\",\n  511: \"OPTIONS.MENONO\",\n  517: \"MSOCHECKS\",\n  518: \"NORMAL\",\n  519: \"LAYOUT\",\n  520: \"RM.PRINT.AREA\",\n  521: \"CLEAR.PRINT.AREA\",\n  522: \"ADD.PRINT.AREA\",\n  523: \"MOVE.BRK\",\n  545: \"HIDECURR.NOTE\",\n  546: \"HIDEALL.NOTES\",\n  547: \"DELETE.NOTE\",\n  548: \"TRAVERSE.NOTES\",\n  549: \"ACTIVATE.NOTES\",\n  620: \"PROTECT.REVISIONS\",\n  621: \"UNPROTECT.REVISIONS\",\n  647: \"OPTIONS.ME\",\n  653: \"WEB.PUBLISH\",\n  667: \"NEWWEBQUERY\",\n  673: \"PIVOT.TABLE.CHART\",\n  753: \"OPTIONS.SAVE\",\n  755: \"OPTIONS.SPELL\",\n  808: \"HIDEALL.INKANNOTS\"\n};\nvar Ftab = {\n  0: \"COUNT\",\n  1: \"IF\",\n  2: \"ISNA\",\n  3: \"ISERROR\",\n  4: \"SUM\",\n  5: \"AVERAGE\",\n  6: \"MIN\",\n  7: \"MAX\",\n  8: \"ROW\",\n  9: \"COLUMN\",\n  10: \"NA\",\n  11: \"NPV\",\n  12: \"STDEV\",\n  13: \"DOLLAR\",\n  14: \"FIXED\",\n  15: \"SIN\",\n  16: \"COS\",\n  17: \"TAN\",\n  18: \"ATAN\",\n  19: \"PI\",\n  20: \"SQRT\",\n  21: \"EXP\",\n  22: \"LN\",\n  23: \"LOG10\",\n  24: \"ABS\",\n  25: \"INT\",\n  26: \"SIGN\",\n  27: \"ROUND\",\n  28: \"LOOKUP\",\n  29: \"INDEX\",\n  30: \"REPT\",\n  31: \"MID\",\n  32: \"LEN\",\n  33: \"VALUE\",\n  34: \"TRUE\",\n  35: \"FALSE\",\n  36: \"AND\",\n  37: \"OR\",\n  38: \"NOT\",\n  39: \"MOD\",\n  40: \"DCOUNT\",\n  41: \"DSUM\",\n  42: \"DAVERAGE\",\n  43: \"DMIN\",\n  44: \"DMAX\",\n  45: \"DSTDEV\",\n  46: \"VAR\",\n  47: \"DVAR\",\n  48: \"TEXT\",\n  49: \"LINEST\",\n  50: \"TREND\",\n  51: \"LOGEST\",\n  52: \"GROWTH\",\n  53: \"GOTO\",\n  54: \"HALT\",\n  55: \"RETURN\",\n  56: \"PV\",\n  57: \"FV\",\n  58: \"NPER\",\n  59: \"PMT\",\n  60: \"RATE\",\n  61: \"MIRR\",\n  62: \"IRR\",\n  63: \"RAND\",\n  64: \"MATCH\",\n  65: \"DATE\",\n  66: \"TIME\",\n  67: \"DAY\",\n  68: \"MONTH\",\n  69: \"YEAR\",\n  70: \"WEEKDAY\",\n  71: \"HOUR\",\n  72: \"MINUTE\",\n  73: \"SECOND\",\n  74: \"NOW\",\n  75: \"AREAS\",\n  76: \"ROWS\",\n  77: \"COLUMNS\",\n  78: \"OFFSET\",\n  79: \"ABSREF\",\n  80: \"RELREF\",\n  81: \"ARGUMENT\",\n  82: \"SEARCH\",\n  83: \"TRANSPOSE\",\n  84: \"ERROR\",\n  85: \"STEP\",\n  86: \"TYPE\",\n  87: \"ECHO\",\n  88: \"SET.NAME\",\n  89: \"CALLER\",\n  90: \"DEREF\",\n  91: \"WINDOWS\",\n  92: \"SERIES\",\n  93: \"DOCUMENTS\",\n  94: \"ACTIVE.CELL\",\n  95: \"SELECTION\",\n  96: \"RESULT\",\n  97: \"ATAN2\",\n  98: \"ASIN\",\n  99: \"ACOS\",\n  100: \"CHOOSE\",\n  101: \"HLOOKUP\",\n  102: \"VLOOKUP\",\n  103: \"LINKS\",\n  104: \"INPUT\",\n  105: \"ISREF\",\n  106: \"GET.FORMULA\",\n  107: \"GET.NAME\",\n  108: \"SET.VALUE\",\n  109: \"LOG\",\n  110: \"EXEC\",\n  111: \"CHAR\",\n  112: \"LOWER\",\n  113: \"UPPER\",\n  114: \"PROPER\",\n  115: \"LEFT\",\n  116: \"RIGHT\",\n  117: \"EXACT\",\n  118: \"TRIM\",\n  119: \"REPLACE\",\n  120: \"SUBSTITUTE\",\n  121: \"CODE\",\n  122: \"NAMES\",\n  123: \"DIRECTORY\",\n  124: \"FIND\",\n  125: \"CELL\",\n  126: \"ISERR\",\n  127: \"ISTEXT\",\n  128: \"ISNUMBER\",\n  129: \"ISBLANK\",\n  130: \"T\",\n  131: \"N\",\n  132: \"FOPEN\",\n  133: \"FCLOSE\",\n  134: \"FSIZE\",\n  135: \"FREADLN\",\n  136: \"FREAD\",\n  137: \"FWRITELN\",\n  138: \"FWRITE\",\n  139: \"FPOS\",\n  140: \"DATEVALUE\",\n  141: \"TIMEVALUE\",\n  142: \"SLN\",\n  143: \"SYD\",\n  144: \"DDB\",\n  145: \"GET.DEF\",\n  146: \"REFTEXT\",\n  147: \"TEXTREF\",\n  148: \"INDIRECT\",\n  149: \"REGISTER\",\n  150: \"CALL\",\n  151: \"ADD.BAR\",\n  152: \"ADD.MENU\",\n  153: \"ADD.COMMAND\",\n  154: \"ENABLE.COMMAND\",\n  155: \"CHECK.COMMAND\",\n  156: \"RENAME.COMMAND\",\n  157: \"SHOW.BAR\",\n  158: \"DELETE.MENU\",\n  159: \"DELETE.COMMAND\",\n  160: \"GET.CHART.ITEM\",\n  161: \"DIALOG.BOX\",\n  162: \"CLEAN\",\n  163: \"MDETERM\",\n  164: \"MINVERSE\",\n  165: \"MMULT\",\n  166: \"FILES\",\n  167: \"IPMT\",\n  168: \"PPMT\",\n  169: \"COUNTA\",\n  170: \"CANCEL.KEY\",\n  171: \"FOR\",\n  172: \"WHILE\",\n  173: \"BREAK\",\n  174: \"NEXT\",\n  175: \"INITIATE\",\n  176: \"REQUEST\",\n  177: \"POKE\",\n  178: \"EXECUTE\",\n  179: \"TERMINATE\",\n  180: \"RESTART\",\n  181: \"HELP\",\n  182: \"GET.BAR\",\n  183: \"PRODUCT\",\n  184: \"FACT\",\n  185: \"GET.CELL\",\n  186: \"GET.WORKSPACE\",\n  187: \"GET.WINDOW\",\n  188: \"GET.DOCUMENT\",\n  189: \"DPRODUCT\",\n  190: \"ISNONTEXT\",\n  191: \"GET.NOTE\",\n  192: \"NOTE\",\n  193: \"STDEVP\",\n  194: \"VARP\",\n  195: \"DSTDEVP\",\n  196: \"DVARP\",\n  197: \"TRUNC\",\n  198: \"ISLOGICAL\",\n  199: \"DCOUNTA\",\n  200: \"DELETE.BAR\",\n  201: \"UNREGISTER\",\n  204: \"USDOLLAR\",\n  205: \"FINDB\",\n  206: \"SEARCHB\",\n  207: \"REPLACEB\",\n  208: \"LEFTB\",\n  209: \"RIGHTB\",\n  210: \"MIDB\",\n  211: \"LENB\",\n  212: \"ROUNDUP\",\n  213: \"ROUNDDOWN\",\n  214: \"ASC\",\n  215: \"DBCS\",\n  216: \"RANK\",\n  219: \"ADDRESS\",\n  220: \"DAYS360\",\n  221: \"TODAY\",\n  222: \"VDB\",\n  223: \"ELSE\",\n  224: \"ELSE.IF\",\n  225: \"END.IF\",\n  226: \"FOR.CELL\",\n  227: \"MEDIAN\",\n  228: \"SUMPRODUCT\",\n  229: \"SINH\",\n  230: \"COSH\",\n  231: \"TANH\",\n  232: \"ASINH\",\n  233: \"ACOSH\",\n  234: \"ATANH\",\n  235: \"DGET\",\n  236: \"CREATE.OBJECT\",\n  237: \"VOLATILE\",\n  238: \"LAST.ERROR\",\n  239: \"CUSTOM.UNDO\",\n  240: \"CUSTOM.REPEAT\",\n  241: \"FORMULA.CONVERT\",\n  242: \"GET.LINK.INFO\",\n  243: \"TEXT.BOX\",\n  244: \"INFO\",\n  245: \"GROUP\",\n  246: \"GET.OBJECT\",\n  247: \"DB\",\n  248: \"PAUSE\",\n  251: \"RESUME\",\n  252: \"FREQUENCY\",\n  253: \"ADD.TOOLBAR\",\n  254: \"DELETE.TOOLBAR\",\n  255: \"User\",\n  256: \"RESET.TOOLBAR\",\n  257: \"EVALUATE\",\n  258: \"GET.TOOLBAR\",\n  259: \"GET.TOOL\",\n  260: \"SPELLING.CHECK\",\n  261: \"ERROR.TYPE\",\n  262: \"APP.TITLE\",\n  263: \"WINDOW.TITLE\",\n  264: \"SAVE.TOOLBAR\",\n  265: \"ENABLE.TOOL\",\n  266: \"PRESS.TOOL\",\n  267: \"REGISTER.ID\",\n  268: \"GET.WORKBOOK\",\n  269: \"AVEDEV\",\n  270: \"BETADIST\",\n  271: \"GAMMALN\",\n  272: \"BETAINV\",\n  273: \"BINOMDIST\",\n  274: \"CHIDIST\",\n  275: \"CHIINV\",\n  276: \"COMBIN\",\n  277: \"CONFIDENCE\",\n  278: \"CRITBINOM\",\n  279: \"EVEN\",\n  280: \"EXPONDIST\",\n  281: \"FDIST\",\n  282: \"FINV\",\n  283: \"FISHER\",\n  284: \"FISHERINV\",\n  285: \"FLOOR\",\n  286: \"GAMMADIST\",\n  287: \"GAMMAINV\",\n  288: \"CEILING\",\n  289: \"HYPGEOMDIST\",\n  290: \"LOGNORMDIST\",\n  291: \"LOGINV\",\n  292: \"NEGBINOMDIST\",\n  293: \"NORMDIST\",\n  294: \"NORMSDIST\",\n  295: \"NORMINV\",\n  296: \"NORMSINV\",\n  297: \"STANDARDIZE\",\n  298: \"ODD\",\n  299: \"PERMUT\",\n  300: \"POISSON\",\n  301: \"TDIST\",\n  302: \"WEIBULL\",\n  303: \"SUMXMY2\",\n  304: \"SUMX2MY2\",\n  305: \"SUMX2PY2\",\n  306: \"CHITEST\",\n  307: \"CORREL\",\n  308: \"COVAR\",\n  309: \"FORECAST\",\n  310: \"FTEST\",\n  311: \"INTERCEPT\",\n  312: \"PEARSON\",\n  313: \"RSQ\",\n  314: \"STEYX\",\n  315: \"SLOPE\",\n  316: \"TTEST\",\n  317: \"PROB\",\n  318: \"DEVSQ\",\n  319: \"GEOMEAN\",\n  320: \"HARMEAN\",\n  321: \"SUMSQ\",\n  322: \"KURT\",\n  323: \"SKEW\",\n  324: \"ZTEST\",\n  325: \"LARGE\",\n  326: \"SMALL\",\n  327: \"QUARTILE\",\n  328: \"PERCENTILE\",\n  329: \"PERCENTRANK\",\n  330: \"MODE\",\n  331: \"TRIMMEAN\",\n  332: \"TINV\",\n  334: \"MOVIE.COMMAND\",\n  335: \"GET.MOVIE\",\n  336: \"CONCATENATE\",\n  337: \"POWER\",\n  338: \"PIVOT.ADD.DATA\",\n  339: \"GET.PIVOT.TABLE\",\n  340: \"GET.PIVOT.FIELD\",\n  341: \"GET.PIVOT.ITEM\",\n  342: \"RADIANS\",\n  343: \"DEGREES\",\n  344: \"SUBTOTAL\",\n  345: \"SUMIF\",\n  346: \"COUNTIF\",\n  347: \"COUNTBLANK\",\n  348: \"SCENARIO.GET\",\n  349: \"OPTIONS.LISTS.GET\",\n  350: \"ISPMT\",\n  351: \"DATEDIF\",\n  352: \"DATESTRING\",\n  353: \"NUMBERSTRING\",\n  354: \"ROMAN\",\n  355: \"OPEN.DIALOG\",\n  356: \"SAVE.DIALOG\",\n  357: \"VIEW.GET\",\n  358: \"GETPIVOTDATA\",\n  359: \"HYPERLINK\",\n  360: \"PHONETIC\",\n  361: \"AVERAGEA\",\n  362: \"MAXA\",\n  363: \"MINA\",\n  364: \"STDEVPA\",\n  365: \"VARPA\",\n  366: \"STDEVA\",\n  367: \"VARA\",\n  368: \"BAHTTEXT\",\n  369: \"THAIDAYOFWEEK\",\n  370: \"THAIDIGIT\",\n  371: \"THAIMONTHOFYEAR\",\n  372: \"THAINUMSOUND\",\n  373: \"THAINUMSTRING\",\n  374: \"THAISTRINGLENGTH\",\n  375: \"ISTHAIDIGIT\",\n  376: \"ROUNDBAHTDOWN\",\n  377: \"ROUNDBAHTUP\",\n  378: \"THAIYEAR\",\n  379: \"RTD\",\n  380: \"CUBEVALUE\",\n  381: \"CUBEMEMBER\",\n  382: \"CUBEMEMBERPROPERTY\",\n  383: \"CUBERANKEDMEMBER\",\n  384: \"HEX2BIN\",\n  385: \"HEX2DEC\",\n  386: \"HEX2OCT\",\n  387: \"DEC2BIN\",\n  388: \"DEC2HEX\",\n  389: \"DEC2OCT\",\n  390: \"OCT2BIN\",\n  391: \"OCT2HEX\",\n  392: \"OCT2DEC\",\n  393: \"BIN2DEC\",\n  394: \"BIN2OCT\",\n  395: \"BIN2HEX\",\n  396: \"IMSUB\",\n  397: \"IMDIV\",\n  398: \"IMPOWER\",\n  399: \"IMABS\",\n  400: \"IMSQRT\",\n  401: \"IMLN\",\n  402: \"IMLOG2\",\n  403: \"IMLOG10\",\n  404: \"IMSIN\",\n  405: \"IMCOS\",\n  406: \"IMEXP\",\n  407: \"IMARGUMENT\",\n  408: \"IMCONJUGATE\",\n  409: \"IMAGINARY\",\n  410: \"IMREAL\",\n  411: \"COMPLEX\",\n  412: \"IMSUM\",\n  413: \"IMPRODUCT\",\n  414: \"SERIESSUM\",\n  415: \"FACTDOUBLE\",\n  416: \"SQRTPI\",\n  417: \"QUOTIENT\",\n  418: \"DELTA\",\n  419: \"GESTEP\",\n  420: \"ISEVEN\",\n  421: \"ISODD\",\n  422: \"MROUND\",\n  423: \"ERF\",\n  424: \"ERFC\",\n  425: \"BESSELJ\",\n  426: \"BESSELK\",\n  427: \"BESSELY\",\n  428: \"BESSELI\",\n  429: \"XIRR\",\n  430: \"XNPV\",\n  431: \"PRICEMAT\",\n  432: \"YIELDMAT\",\n  433: \"INTRATE\",\n  434: \"RECEIVED\",\n  435: \"DISC\",\n  436: \"PRICEDISC\",\n  437: \"YIELDDISC\",\n  438: \"TBILLEQ\",\n  439: \"TBILLPRICE\",\n  440: \"TBILLYIELD\",\n  441: \"PRICE\",\n  442: \"YIELD\",\n  443: \"DOLLARDE\",\n  444: \"DOLLARFR\",\n  445: \"NOMINAL\",\n  446: \"EFFECT\",\n  447: \"CUMPRINC\",\n  448: \"CUMIPMT\",\n  449: \"EDATE\",\n  450: \"EOMONTH\",\n  451: \"YEARFRAC\",\n  452: \"COUPDAYBS\",\n  453: \"COUPDAYS\",\n  454: \"COUPDAYSNC\",\n  455: \"COUPNCD\",\n  456: \"COUPNUM\",\n  457: \"COUPPCD\",\n  458: \"DURATION\",\n  459: \"MDURATION\",\n  460: \"ODDLPRICE\",\n  461: \"ODDLYIELD\",\n  462: \"ODDFPRICE\",\n  463: \"ODDFYIELD\",\n  464: \"RANDBETWEEN\",\n  465: \"WEEKNUM\",\n  466: \"AMORDEGRC\",\n  467: \"AMORLINC\",\n  468: \"CONVERT\",\n  724: \"SHEETJS\",\n  469: \"ACCRINT\",\n  470: \"ACCRINTM\",\n  471: \"WORKDAY\",\n  472: \"NETWORKDAYS\",\n  473: \"GCD\",\n  474: \"MULTINOMIAL\",\n  475: \"LCM\",\n  476: \"FVSCHEDULE\",\n  477: \"CUBEKPIMEMBER\",\n  478: \"CUBESET\",\n  479: \"CUBESETCOUNT\",\n  480: \"IFERROR\",\n  481: \"COUNTIFS\",\n  482: \"SUMIFS\",\n  483: \"AVERAGEIF\",\n  484: \"AVERAGEIFS\"\n};\nvar FtabArgc = {\n  2: 1,\n  3: 1,\n  10: 0,\n  15: 1,\n  16: 1,\n  17: 1,\n  18: 1,\n  19: 0,\n  20: 1,\n  21: 1,\n  22: 1,\n  23: 1,\n  24: 1,\n  25: 1,\n  26: 1,\n  27: 2,\n  30: 2,\n  31: 3,\n  32: 1,\n  33: 1,\n  34: 0,\n  35: 0,\n  38: 1,\n  39: 2,\n  40: 3,\n  41: 3,\n  42: 3,\n  43: 3,\n  44: 3,\n  45: 3,\n  47: 3,\n  48: 2,\n  53: 1,\n  61: 3,\n  63: 0,\n  65: 3,\n  66: 3,\n  67: 1,\n  68: 1,\n  69: 1,\n  70: 1,\n  71: 1,\n  72: 1,\n  73: 1,\n  74: 0,\n  75: 1,\n  76: 1,\n  77: 1,\n  79: 2,\n  80: 2,\n  83: 1,\n  85: 0,\n  86: 1,\n  89: 0,\n  90: 1,\n  94: 0,\n  95: 0,\n  97: 2,\n  98: 1,\n  99: 1,\n  101: 3,\n  102: 3,\n  105: 1,\n  106: 1,\n  108: 2,\n  111: 1,\n  112: 1,\n  113: 1,\n  114: 1,\n  117: 2,\n  118: 1,\n  119: 4,\n  121: 1,\n  126: 1,\n  127: 1,\n  128: 1,\n  129: 1,\n  130: 1,\n  131: 1,\n  133: 1,\n  134: 1,\n  135: 1,\n  136: 2,\n  137: 2,\n  138: 2,\n  140: 1,\n  141: 1,\n  142: 3,\n  143: 4,\n  144: 4,\n  161: 1,\n  162: 1,\n  163: 1,\n  164: 1,\n  165: 2,\n  172: 1,\n  175: 2,\n  176: 2,\n  177: 3,\n  178: 2,\n  179: 1,\n  184: 1,\n  186: 1,\n  189: 3,\n  190: 1,\n  195: 3,\n  196: 3,\n  197: 1,\n  198: 1,\n  199: 3,\n  201: 1,\n  207: 4,\n  210: 3,\n  211: 1,\n  212: 2,\n  213: 2,\n  214: 1,\n  215: 1,\n  225: 0,\n  229: 1,\n  230: 1,\n  231: 1,\n  232: 1,\n  233: 1,\n  234: 1,\n  235: 3,\n  244: 1,\n  247: 4,\n  252: 2,\n  257: 1,\n  261: 1,\n  271: 1,\n  273: 4,\n  274: 2,\n  275: 2,\n  276: 2,\n  277: 3,\n  278: 3,\n  279: 1,\n  280: 3,\n  281: 3,\n  282: 3,\n  283: 1,\n  284: 1,\n  285: 2,\n  286: 4,\n  287: 3,\n  288: 2,\n  289: 4,\n  290: 3,\n  291: 3,\n  292: 3,\n  293: 4,\n  294: 1,\n  295: 3,\n  296: 1,\n  297: 3,\n  298: 1,\n  299: 2,\n  300: 3,\n  301: 3,\n  302: 4,\n  303: 2,\n  304: 2,\n  305: 2,\n  306: 2,\n  307: 2,\n  308: 2,\n  309: 3,\n  310: 2,\n  311: 2,\n  312: 2,\n  313: 2,\n  314: 2,\n  315: 2,\n  316: 4,\n  325: 2,\n  326: 2,\n  327: 2,\n  328: 2,\n  331: 2,\n  332: 2,\n  337: 2,\n  342: 1,\n  343: 1,\n  346: 2,\n  347: 1,\n  350: 4,\n  351: 3,\n  352: 1,\n  353: 2,\n  360: 1,\n  368: 1,\n  369: 1,\n  370: 1,\n  371: 1,\n  372: 1,\n  373: 1,\n  374: 1,\n  375: 1,\n  376: 1,\n  377: 1,\n  378: 1,\n  382: 3,\n  385: 1,\n  392: 1,\n  393: 1,\n  396: 2,\n  397: 2,\n  398: 2,\n  399: 1,\n  400: 1,\n  401: 1,\n  402: 1,\n  403: 1,\n  404: 1,\n  405: 1,\n  406: 1,\n  407: 1,\n  408: 1,\n  409: 1,\n  410: 1,\n  414: 4,\n  415: 1,\n  416: 1,\n  417: 2,\n  420: 1,\n  421: 1,\n  422: 2,\n  424: 1,\n  425: 2,\n  426: 2,\n  427: 2,\n  428: 2,\n  430: 3,\n  438: 3,\n  439: 3,\n  440: 3,\n  443: 2,\n  444: 2,\n  445: 2,\n  446: 2,\n  447: 6,\n  448: 6,\n  449: 2,\n  450: 2,\n  464: 2,\n  468: 3,\n  476: 2,\n  479: 1,\n  480: 2,\n  65535: 0\n};\n/* Part 3 TODO: actually parse formulae */\nfunction ods_to_csf_formula(f/*:string*/)/*:string*/ {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}\n\nfunction csf_to_ods_formula(f/*:string*/)/*:string*/ {\n\tvar o = \"of:=\" + f.replace(crefregex, \"$1[.$2$3$4$5]\").replace(/\\]:\\[/g,\":\");\n\t/* TODO: something other than this */\n\treturn o.replace(/;/g, \"|\").replace(/,/g,\";\");\n}\n\nfunction ods_to_csf_3D(r/*:string*/)/*:[string, string]*/ {\n\tvar a = r.split(\":\");\n\tvar s = a[0].split(\".\")[0];\n\treturn [s, a[0].split(\".\")[1] + (a.length > 1 ? (\":\" + (a[1].split(\".\")[1] || a[1].split(\".\")[0])) : \"\")];\n}\n\nfunction csf_to_ods_3D(r/*:string*/)/*:string*/ {\n\treturn r.replace(/\\./,\"!\");\n}\n\nvar strs = {}; // shared strings\nvar _ssfopts = {}; // spreadsheet formatting options\n\n\n/*global Map */\nvar browser_has_Map = typeof Map !== 'undefined';\n\nfunction get_sst_id(sst/*:SST*/, str/*:string*/, rev)/*:number*/ {\n\tvar i = 0, len = sst.length;\n\tif(rev) {\n\t\tif(browser_has_Map ? rev.has(str) : Object.prototype.hasOwnProperty.call(rev, str)) {\n\t\t\tvar revarr = browser_has_Map ? rev.get(str) : rev[str];\n\t\t\tfor(; i < revarr.length; ++i) {\n\t\t\t\tif(sst[revarr[i]].t === str) { sst.Count ++; return revarr[i]; }\n\t\t\t}\n\t\t}\n\t} else for(; i < len; ++i) {\n\t\tif(sst[i].t === str) { sst.Count ++; return i; }\n\t}\n\tsst[len] = ({t:str}/*:any*/); sst.Count ++; sst.Unique ++;\n\tif(rev) {\n\t\tif(browser_has_Map) {\n\t\t\tif(!rev.has(str)) rev.set(str, []);\n\t\t\trev.get(str).push(len);\n\t\t} else {\n\t\t\tif(!Object.prototype.hasOwnProperty.call(rev, str)) rev[str] = [];\n\t\t\trev[str].push(len);\n\t\t}\n\t}\n\treturn len;\n}\n\nfunction col_obj_w(C/*:number*/, col) {\n\tvar p = ({min:C+1,max:C+1}/*:any*/);\n\t/* wch (chars), wpx (pixels) */\n\tvar wch = -1;\n\tif(col.MDW) MDW = col.MDW;\n\tif(col.width != null) p.customWidth = 1;\n\telse if(col.wpx != null) wch = px2char(col.wpx);\n\telse if(col.wch != null) wch = col.wch;\n\tif(wch > -1) { p.width = char2width(wch); p.customWidth = 1; }\n\telse if(col.width != null) p.width = col.width;\n\tif(col.hidden) p.hidden = true;\n\tif(col.level != null) { p.outlineLevel = p.level = col.level; }\n\treturn p;\n}\n\nfunction default_margins(margins/*:Margins*/, mode/*:?string*/) {\n\tif(!margins) return;\n\tvar defs = [0.7, 0.7, 0.75, 0.75, 0.3, 0.3];\n\tif(mode == 'xlml') defs = [1, 1, 1, 1, 0.5, 0.5];\n\tif(margins.left   == null) margins.left   = defs[0];\n\tif(margins.right  == null) margins.right  = defs[1];\n\tif(margins.top    == null) margins.top    = defs[2];\n\tif(margins.bottom == null) margins.bottom = defs[3];\n\tif(margins.header == null) margins.header = defs[4];\n\tif(margins.footer == null) margins.footer = defs[5];\n}\n\nfunction get_cell_style(styles/*:Array<any>*/, cell/*:Cell*/, opts) {\n\tvar z = opts.revssf[cell.z != null ? cell.z : \"General\"];\n\tvar i = 0x3c, len = styles.length;\n\tif(z == null && opts.ssf) {\n\t\tfor(; i < 0x188; ++i) if(opts.ssf[i] == null) {\n\t\t\tSSF_load(cell.z, i);\n\t\t\t// $FlowIgnore\n\t\t\topts.ssf[i] = cell.z;\n\t\t\topts.revssf[cell.z] = z = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0; i != len; ++i) if(styles[i].numFmtId === z) return i;\n\tstyles[len] = {\n\t\tnumFmtId:z,\n\t\tfontId:0,\n\t\tfillId:0,\n\t\tborderId:0,\n\t\txfId:0,\n\t\tapplyNumberFormat:1\n\t};\n\treturn len;\n}\n\nfunction safe_format(p/*:Cell*/, fmtid/*:number*/, fillid/*:?number*/, opts, themes, styles) {\n\ttry {\n\t\tif(opts.cellNF) p.z = table_fmt[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(p.t === 'z' && !opts.cellStyles) return;\n\tif(p.t === 'd' && typeof p.v === 'string') p.v = parseDate(p.v);\n\tif((!opts || opts.cellText !== false) && p.t !== 'z') try {\n\t\tif(table_fmt[fmtid] == null) SSF_load(SSFImplicit[fmtid] || \"General\", fmtid);\n\t\tif(p.t === 'e') p.w = p.w || BErr[p.v];\n\t\telse if(fmtid === 0) {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = p.v.toString(10);\n\t\t\t\telse p.w = SSF_general_num(p.v);\n\t\t\t}\n\t\t\telse if(p.t === 'd') {\n\t\t\t\tvar dd = datenum(p.v);\n\t\t\t\tif((dd|0) === dd) p.w = dd.toString(10);\n\t\t\t\telse p.w = SSF_general_num(dd);\n\t\t\t}\n\t\t\telse if(p.v === undefined) return \"\";\n\t\t\telse p.w = SSF_general(p.v,_ssfopts);\n\t\t}\n\t\telse if(p.t === 'd') p.w = SSF_format(fmtid,datenum(p.v),_ssfopts);\n\t\telse p.w = SSF_format(fmtid,p.v,_ssfopts);\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts.cellStyles) return;\n\tif(fillid != null) try {\n\t\tp.s = styles.Fills[fillid];\n\t\tif (p.s.fgColor && p.s.fgColor.theme && !p.s.fgColor.rgb) {\n\t\t\tp.s.fgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.fgColor.theme].rgb, p.s.fgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.fgColor.raw_rgb = themes.themeElements.clrScheme[p.s.fgColor.theme].rgb;\n\t\t}\n\t\tif (p.s.bgColor && p.s.bgColor.theme) {\n\t\t\tp.s.bgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.bgColor.theme].rgb, p.s.bgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.bgColor.raw_rgb = themes.themeElements.clrScheme[p.s.bgColor.theme].rgb;\n\t\t}\n\t} catch(e) { if(opts.WTF && styles.Fills) throw e; }\n}\n\nfunction check_ws(ws/*:Worksheet*/, sname/*:string*/, i/*:number*/) {\n\tif(ws && ws['!ref']) {\n\t\tvar range = safe_decode_range(ws['!ref']);\n\t\tif(range.e.c < range.s.c || range.e.r < range.s.r) throw new Error(\"Bad range (\" + i + \"): \" + ws['!ref']);\n\t}\n}\nfunction parse_ws_xml_dim(ws/*:Worksheet*/, s/*:string*/) {\n\tvar d = safe_decode_range(s);\n\tif(d.s.r<=d.e.r && d.s.c<=d.e.c && d.s.r>=0 && d.s.c>=0) ws[\"!ref\"] = encode_range(d);\n}\nvar mergecregex = /<(?:\\w:)?mergeCell ref=\"[A-Z0-9:]+\"\\s*[\\/]?>/g;\nvar sheetdataregex = /<(?:\\w+:)?sheetData[^>]*>([\\s\\S]*)<\\/(?:\\w+:)?sheetData>/;\nvar hlinkregex = /<(?:\\w:)?hyperlink [^>]*>/mg;\nvar dimregex = /\"(\\w*:\\w*)\"/;\nvar colregex = /<(?:\\w:)?col\\b[^>]*[\\/]?>/g;\nvar afregex = /<(?:\\w:)?autoFilter[^>]*([\\/]|>([\\s\\S]*)<\\/(?:\\w:)?autoFilter)>/g;\nvar marginregex= /<(?:\\w:)?pageMargins[^>]*\\/>/g;\nvar sheetprregex = /<(?:\\w:)?sheetPr\\b(?:[^>a-z][^>]*)?\\/>/;\nvar sheetprregex2= /<(?:\\w:)?sheetPr[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetPr)>/;\nvar svsregex = /<(?:\\w:)?sheetViews[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetViews)>/;\n\n/* 18.3 Worksheets */\nfunction parse_ws_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*:WBWBProps*/, themes, styles)/*:Worksheet*/ {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\n\t/* 18.3.1.99 worksheet CT_Worksheet */\n\tvar s = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\tvar refguess/*:Range*/ = ({s: {r:2000000, c:2000000}, e: {r:0, c:0} }/*:any*/);\n\n\tvar data1 = \"\", data2 = \"\";\n\tvar mtch/*:?any*/ = data.match(sheetdataregex);\n\tif(mtch) {\n\t\tdata1 = data.slice(0, mtch.index);\n\t\tdata2 = data.slice(mtch.index + mtch[0].length);\n\t} else data1 = data2 = data;\n\n\t/* 18.3.1.82 sheetPr CT_SheetPr */\n\tvar sheetPr = data1.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\telse if((sheetPr = data1.match(sheetprregex2))) parse_ws_xml_sheetpr2(sheetPr[0], sheetPr[1]||\"\", s, wb, idx, styles, themes);\n\n\t/* 18.3.1.35 dimension CT_SheetDimension */\n\tvar ridx = (data1.match(/<(?:\\w*:)?dimension/)||{index:-1}).index;\n\tif(ridx > 0) {\n\t\tvar ref = data1.slice(ridx,ridx+50).match(dimregex);\n\t\tif(ref) parse_ws_xml_dim(s, ref[1]);\n\t}\n\n\t/* 18.3.1.88 sheetViews CT_SheetViews */\n\tvar svs = data1.match(svsregex);\n\tif(svs && svs[1]) parse_ws_xml_sheetviews(svs[1], wb);\n\n\t/* 18.3.1.17 cols CT_Cols */\n\tvar columns/*:Array<ColInfo>*/ = [];\n\tif(opts.cellStyles) {\n\t\t/* 18.3.1.13 col CT_Col */\n\t\tvar cols = data1.match(colregex);\n\t\tif(cols) parse_ws_xml_cols(columns, cols);\n\t}\n\n\t/* 18.3.1.80 sheetData CT_SheetData ? */\n\tif(mtch) parse_ws_xml_data(mtch[1], s, opts, refguess, themes, styles);\n\n\t/* 18.3.1.2  autoFilter CT_AutoFilter */\n\tvar afilter = data2.match(afregex);\n\tif(afilter) s['!autofilter'] = parse_ws_xml_autofilter(afilter[0]);\n\n\t/* 18.3.1.55 mergeCells CT_MergeCells */\n\tvar merges/*:Array<Range>*/ = [];\n\tvar _merge = data2.match(mergecregex);\n\tif(_merge) for(ridx = 0; ridx != _merge.length; ++ridx)\n\t\tmerges[ridx] = safe_decode_range(_merge[ridx].slice(_merge[ridx].indexOf(\"\\\"\")+1));\n\n\t/* 18.3.1.48 hyperlinks CT_Hyperlinks */\n\tvar hlink = data2.match(hlinkregex);\n\tif(hlink) parse_ws_xml_hlinks(s, hlink, rels);\n\n\t/* 18.3.1.62 pageMargins CT_PageMargins */\n\tvar margins = data2.match(marginregex);\n\tif(margins) s['!margins'] = parse_ws_xml_margins(parsexmltag(margins[0]));\n\n\tif(!s[\"!ref\"] && refguess.e.c >= refguess.s.c && refguess.e.r >= refguess.s.r) s[\"!ref\"] = encode_range(refguess);\n\tif(opts.sheetRows > 0 && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(columns.length > 0) s[\"!cols\"] = columns;\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\treturn s;\n}\n\nfunction write_ws_xml_merges(merges/*:Array<Range>*/)/*:string*/ {\n\tif(merges.length === 0) return \"\";\n\tvar o = '<mergeCells count=\"' + merges.length + '\">';\n\tfor(var i = 0; i != merges.length; ++i) o += '<mergeCell ref=\"' + encode_range(merges[i]) + '\"/>';\n\treturn o + '</mergeCells>';\n}\n\n/* 18.3.1.82-3 sheetPr CT_ChartsheetPr / CT_SheetPr */\nfunction parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {\n\tvar data = parsexmltag(sheetPr);\n\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\tif(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));\n}\nfunction parse_ws_xml_sheetpr2(sheetPr/*:string*/, body/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {\n\tparse_ws_xml_sheetpr(sheetPr.slice(0, sheetPr.indexOf(\">\")), s, wb, idx);\n}\nfunction write_ws_xml_sheetpr(ws, wb, idx, opts, o) {\n\tvar needed = false;\n\tvar props = {}, payload = null;\n\tif(opts.bookType !== 'xlsx' && wb.vbaraw) {\n\t\tvar cname = wb.SheetNames[idx];\n\t\ttry { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}\n\t\tneeded = true;\n\t\tprops.codeName = utf8write(escapexml(cname));\n\t}\n\n\tif(ws && ws[\"!outline\"]) {\n\t\tvar outlineprops = {summaryBelow:1, summaryRight:1};\n\t\tif(ws[\"!outline\"].above) outlineprops.summaryBelow = 0;\n\t\tif(ws[\"!outline\"].left) outlineprops.summaryRight = 0;\n\t\tpayload = (payload||\"\") + writextag('outlinePr', null, outlineprops);\n\t}\n\n\tif(!needed && !payload) return;\n\to[o.length] = (writextag('sheetPr', payload, props));\n}\n\n/* 18.3.1.85 sheetProtection CT_SheetProtection */\nvar sheetprot_deffalse = [\"objects\", \"scenarios\", \"selectLockedCells\", \"selectUnlockedCells\"];\nvar sheetprot_deftrue = [\n\t\"formatColumns\", \"formatRows\", \"formatCells\",\n\t\"insertColumns\", \"insertRows\", \"insertHyperlinks\",\n\t\"deleteColumns\", \"deleteRows\",\n\t\"sort\", \"autoFilter\", \"pivotTables\"\n];\nfunction write_ws_xml_protection(sp)/*:string*/ {\n\t// algorithmName, hashValue, saltValue, spinCount\n\tvar o = ({sheet:1}/*:any*/);\n\tsheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = \"1\"; });\n\tsheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = \"0\"; });\n\t/* TODO: algorithm */\n\tif(sp.password) o.password = crypto_CreatePasswordVerifier_Method1(sp.password).toString(16).toUpperCase();\n\treturn writextag('sheetProtection', null, o);\n}\n\nfunction parse_ws_xml_hlinks(s, data/*:Array<string>*/, rels) {\n\tvar dense = Array.isArray(s);\n\tfor(var i = 0; i != data.length; ++i) {\n\t\tvar val = parsexmltag(utf8read(data[i]), true);\n\t\tif(!val.ref) return;\n\t\tvar rel = ((rels || {})['!id']||[])[val.id];\n\t\tif(rel) {\n\t\t\tval.Target = rel.Target;\n\t\t\tif(val.location) val.Target += \"#\"+unescapexml(val.location);\n\t\t} else {\n\t\t\tval.Target = \"#\" + unescapexml(val.location);\n\t\t\trel = {Target: val.Target, TargetMode: 'Internal'};\n\t\t}\n\t\tval.Rel = rel;\n\t\tif(val.tooltip) { val.Tooltip = val.tooltip; delete val.tooltip; }\n\t\tvar rng = safe_decode_range(val.ref);\n\t\tfor(var R=rng.s.r;R<=rng.e.r;++R) for(var C=rng.s.c;C<=rng.e.c;++C) {\n\t\t\tvar addr = encode_cell({c:C,r:R});\n\t\t\tif(dense) {\n\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\tif(!s[R][C]) s[R][C] = {t:\"z\",v:undefined};\n\t\t\t\ts[R][C].l = val;\n\t\t\t} else {\n\t\t\t\tif(!s[addr]) s[addr] = {t:\"z\",v:undefined};\n\t\t\t\ts[addr].l = val;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction parse_ws_xml_margins(margin) {\n\tvar o = {};\n\t[\"left\", \"right\", \"top\", \"bottom\", \"header\", \"footer\"].forEach(function(k) {\n\t\tif(margin[k]) o[k] = parseFloat(margin[k]);\n\t});\n\treturn o;\n}\nfunction write_ws_xml_margins(margin)/*:string*/ {\n\tdefault_margins(margin);\n\treturn writextag('pageMargins', null, margin);\n}\n\nfunction parse_ws_xml_cols(columns, cols) {\n\tvar seencol = false;\n\tfor(var coli = 0; coli != cols.length; ++coli) {\n\t\tvar coll = parsexmltag(cols[coli], true);\n\t\tif(coll.hidden) coll.hidden = parsexmlbool(coll.hidden);\n\t\tvar colm=parseInt(coll.min, 10)-1, colM=parseInt(coll.max,10)-1;\n\t\tif(coll.outlineLevel) coll.level = (+coll.outlineLevel || 0);\n\t\tdelete coll.min; delete coll.max; coll.width = +coll.width;\n\t\tif(!seencol && coll.width) { seencol = true; find_mdw_colw(coll.width); }\n\t\tprocess_col(coll);\n\t\twhile(colm <= colM) columns[colm++] = dup(coll);\n\t}\n}\nfunction write_ws_xml_cols(ws, cols)/*:string*/ {\n\tvar o = [\"<cols>\"], col;\n\tfor(var i = 0; i != cols.length; ++i) {\n\t\tif(!(col = cols[i])) continue;\n\t\to[o.length] = (writextag('col', null, col_obj_w(i, col)));\n\t}\n\to[o.length] = \"</cols>\";\n\treturn o.join(\"\");\n}\n\nfunction parse_ws_xml_autofilter(data/*:string*/) {\n\tvar o = { ref: (data.match(/ref=\"([^\"]*)\"/)||[])[1]};\n\treturn o;\n}\nfunction write_ws_xml_autofilter(data, ws, wb, idx)/*:string*/ {\n\tvar ref = typeof data.ref == \"string\" ? data.ref : encode_range(data.ref);\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]}/*:any*/);\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names/*: Array<any> */ = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref  });\n\treturn writextag(\"autoFilter\", null, {ref:ref});\n}\n\n/* 18.3.1.88 sheetViews CT_SheetViews */\n/* 18.3.1.87 sheetView CT_SheetView */\nvar sviewregex = /<(?:\\w:)?sheetView(?:[^>a-z][^>]*)?\\/?>/;\nfunction parse_ws_xml_sheetviews(data, wb/*:WBWBProps*/) {\n\tif(!wb.Views) wb.Views = [{}];\n\t(data.match(sviewregex)||[]).forEach(function(r/*:string*/, i/*:number*/) {\n\t\tvar tag = parsexmltag(r);\n\t\t// $FlowIgnore\n\t\tif(!wb.Views[i]) wb.Views[i] = {};\n\t\t// $FlowIgnore\n\t\tif(+tag.zoomScale) wb.Views[i].zoom = +tag.zoomScale;\n\t\t// $FlowIgnore\n\t\tif(parsexmlbool(tag.rightToLeft)) wb.Views[i].RTL = true;\n\t});\n}\nfunction write_ws_xml_sheetviews(ws, opts, idx, wb)/*:string*/ {\n\tvar sview = ({workbookViewId:\"0\"}/*:any*/);\n\t// $FlowIgnore\n\tif((((wb||{}).Workbook||{}).Views||[])[0]) sview.rightToLeft = wb.Workbook.Views[0].RTL ? \"1\" : \"0\";\n\treturn writextag(\"sheetViews\", writextag(\"sheetView\", null, sview), {});\n}\n\nfunction write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string*/ {\n\tif(cell.c) ws['!comments'].push([ref, cell.c]);\n\tif(cell.v === undefined && typeof cell.f !== \"string\" || cell.t === 'z' && !cell.f) return \"\";\n\tvar vv = \"\";\n\tvar oldt = cell.t, oldv = cell.v;\n\tif(cell.t !== \"z\") switch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'n': vv = ''+cell.v; break;\n\t\tcase 'e': vv = BErr[cell.v]; break;\n\t\tcase 'd':\n\t\t\tif(opts && opts.cellDates) vv = parseDate(cell.v, -1).toISOString();\n\t\t\telse {\n\t\t\t\tcell = dup(cell);\n\t\t\t\tcell.t = 'n';\n\t\t\t\tvv = ''+(cell.v = datenum(parseDate(cell.v)));\n\t\t\t}\n\t\t\tif(typeof cell.z === 'undefined') cell.z = table_fmt[14];\n\t\t\tbreak;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar v = writetag('v', escapexml(vv)), o = ({r:ref}/*:any*/);\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tif(os !== 0) o.s = os;\n\tswitch(cell.t) {\n\t\tcase 'n': break;\n\t\tcase 'd': o.t = \"d\"; break;\n\t\tcase 'b': o.t = \"b\"; break;\n\t\tcase 'e': o.t = \"e\"; break;\n\t\tcase 'z': break;\n\t\tdefault: if(cell.v == null) { delete cell.t; break; }\n\t\t\tif(cell.v.length > 32767) throw new Error(\"Text length must not exceed 32767 characters\");\n\t\t\tif(opts && opts.bookSST) {\n\t\t\t\tv = writetag('v', ''+get_sst_id(opts.Strings, cell.v, opts.revStrings));\n\t\t\t\to.t = \"s\"; break;\n\t\t\t}\n\t\t\to.t = \"str\"; break;\n\t}\n\tif(cell.t != oldt) { cell.t = oldt; cell.v = oldv; }\n\tif(typeof cell.f == \"string\" && cell.f) {\n\t\tvar ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:\"array\", ref:cell.F} : null;\n\t\tv = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : \"\");\n\t}\n\tif(cell.l) ws['!links'].push([ref, cell.l]);\n\tif(cell.D) o.cm = 1;\n\treturn writextag('c', v, o);\n}\n\nvar parse_ws_xml_data = /*#__PURE__*/(function() {\n\tvar cellregex = /<(?:\\w+:)?c[ \\/>]/, rowregex = /<\\/(?:\\w+:)?row>/;\n\tvar rregex = /r=[\"']([^\"']*)[\"']/, isregex = /<(?:\\w+:)?is>([\\S\\s]*?)<\\/(?:\\w+:)?is>/;\n\tvar refregex = /ref=[\"']([^\"']*)[\"']/;\n\tvar match_v = matchtag(\"v\"), match_f = matchtag(\"f\");\n\nreturn function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, themes, styles) {\n\tvar ri = 0, x = \"\", cells/*:Array<string>*/ = [], cref/*:?Array<string>*/ = [], idx=0, i=0, cc=0, d=\"\", p/*:any*/;\n\tvar tag, tagr = 0, tagc = 0;\n\tvar sstr, ftag;\n\tvar fmtid = 0, fillid = 0;\n\tvar do_format = Array.isArray(styles.CellXf), cf;\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar sharedf = [];\n\tvar dense = Array.isArray(s);\n\tvar rows/*:Array<RowInfo>*/ = [], rowobj = {}, rowrite = false;\n\tvar sheetStubs = !!opts.sheetStubs;\n\tfor(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {\n\t\tx = marr[mt].trim();\n\t\tvar xlen = x.length;\n\t\tif(xlen === 0) continue;\n\n\t\t/* 18.3.1.73 row CT_Row */\n\t\tvar rstarti = 0;\n\t\touta: for(ri = 0; ri < xlen; ++ri) switch(/*x.charCodeAt(ri)*/x[ri]) {\n\t\t\tcase \">\" /*62*/:\n\t\t\t\tif(/*x.charCodeAt(ri-1) != 47*/x[ri-1] != \"/\") { ++ri; break outa; }\n\t\t\t\tif(opts && opts.cellStyles) {\n\t\t\t\t\t// TODO: avoid duplication\n\t\t\t\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\t\t\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\t\t\t\trowobj = {}; rowrite = false;\n\t\t\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"<\" /*60*/: rstarti = ri; break;\n\t\t}\n\t\tif(rstarti >= ri) break;\n\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\tif(guess.s.r > tagr - 1) guess.s.r = tagr - 1;\n\t\tif(guess.e.r < tagr - 1) guess.e.r = tagr - 1;\n\n\t\tif(opts && opts.cellStyles) {\n\t\t\trowobj = {}; rowrite = false;\n\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t}\n\n\t\t/* 18.3.1.4 c CT_Cell */\n\t\tcells = x.slice(ri).split(cellregex);\n\t\tfor(var rslice = 0; rslice != cells.length; ++rslice) if(cells[rslice].trim().charAt(0) != \"<\") break;\n\t\tcells = cells.slice(rslice);\n\t\tfor(ri = 0; ri != cells.length; ++ri) {\n\t\t\tx = cells[ri].trim();\n\t\t\tif(x.length === 0) continue;\n\t\t\tcref = x.match(rregex); idx = ri; i=0; cc=0;\n\t\t\tx = \"<c \" + (x.slice(0,1)==\"<\"?\">\":\"\") + x;\n\t\t\tif(cref != null && cref.length === 2) {\n\t\t\t\tidx = 0; d=cref[1];\n\t\t\t\tfor(i=0; i != d.length; ++i) {\n\t\t\t\t\tif((cc=d.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\t\t\t\tidx = 26*idx + cc;\n\t\t\t\t}\n\t\t\t\t--idx;\n\t\t\t\ttagc = idx;\n\t\t\t} else ++tagc;\n\t\t\tfor(i = 0; i != x.length; ++i) if(x.charCodeAt(i) === 62) break; ++i;\n\t\t\ttag = parsexmltag(x.slice(0,i), true);\n\t\t\tif(!tag.r) tag.r = encode_cell({r:tagr-1, c:tagc});\n\t\t\td = x.slice(i);\n\t\t\tp = ({t:\"\"}/*:any*/);\n\n\t\t\tif((cref=d.match(match_v))!= null && /*::cref != null && */cref[1] !== '') p.v=unescapexml(cref[1]);\n\t\t\tif(opts.cellFormula) {\n\t\t\t\tif((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {\n\t\t\t\t\t/* TODO: match against XLSXFutureFunctions */\n\t\t\t\t\tp.f=unescapexml(utf8read(cref[1])).replace(/\\r\\n/g, \"\\n\");\n\t\t\t\t\tif(!opts.xlfn) p.f = _xlfn(p.f);\n\t\t\t\t\tif(/*::cref != null && cref[0] != null && */cref[0].indexOf('t=\"array\"') > -1) {\n\t\t\t\t\t\tp.F = (d.match(refregex)||[])[1];\n\t\t\t\t\t\tif(p.F.indexOf(\":\") > -1) arrayf.push([safe_decode_range(p.F), p.F]);\n\t\t\t\t\t} else if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t=\"shared\"') > -1) {\n\t\t\t\t\t\t// TODO: parse formula\n\t\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\t\tvar ___f = unescapexml(utf8read(cref[1]));\n\t\t\t\t\t\tif(!opts.xlfn) ___f = _xlfn(___f);\n\t\t\t\t\t\tsharedf[parseInt(ftag.si, 10)] = [ftag, ___f, tag.r];\n\t\t\t\t\t}\n\t\t\t\t} else if((cref=d.match(/<f[^>]*\\/>/))) {\n\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\tif(sharedf[ftag.si]) p.f = shift_formula_xlsx(sharedf[ftag.si][1], sharedf[ftag.si][2]/*[0].ref*/, tag.r);\n\t\t\t\t}\n\t\t\t\t/* TODO: factor out contains logic */\n\t\t\t\tvar _tag = decode_cell(tag.r);\n\t\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\tif(_tag.r >= arrayf[i][0].s.r && _tag.r <= arrayf[i][0].e.r)\n\t\t\t\t\t\tif(_tag.c >= arrayf[i][0].s.c && _tag.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\tp.F = arrayf[i][1];\n\t\t\t}\n\n\t\t\tif(tag.t == null && p.v === undefined) {\n\t\t\t\tif(p.f || p.F) {\n\t\t\t\t\tp.v = 0; p.t = \"n\";\n\t\t\t\t} else if(!sheetStubs) continue;\n\t\t\t\telse p.t = \"z\";\n\t\t\t}\n\t\t\telse p.t = tag.t || \"n\";\n\t\t\tif(guess.s.c > tagc) guess.s.c = tagc;\n\t\t\tif(guess.e.c < tagc) guess.e.c = tagc;\n\t\t\t/* 18.18.11 t ST_CellType */\n\t\t\tswitch(p.t) {\n\t\t\t\tcase 'n':\n\t\t\t\t\tif(p.v == \"\" || p.v == null) {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else p.v = parseFloat(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\tif(typeof p.v == 'undefined') {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsstr = strs[parseInt(p.v, 10)];\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tp.r = sstr.r;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'str':\n\t\t\t\t\tp.t = \"s\";\n\t\t\t\t\tp.v = (p.v!=null) ? utf8read(p.v) : '';\n\t\t\t\t\tif(opts.cellHTML) p.h = escapehtml(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'inlineStr':\n\t\t\t\t\tcref = d.match(isregex);\n\t\t\t\t\tp.t = 's';\n\t\t\t\t\tif(cref != null && (sstr = parse_si(cref[1]))) {\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t} else p.v = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'b': p.v = parsexmlbool(p.v); break;\n\t\t\t\tcase 'd':\n\t\t\t\t\tif(opts.cellDates) p.v = parseDate(p.v, 1);\n\t\t\t\t\telse { p.v = datenum(parseDate(p.v, 1)); p.t = 'n'; }\n\t\t\t\t\tbreak;\n\t\t\t\t/* error string in .w, number in .v */\n\t\t\t\tcase 'e':\n\t\t\t\t\tif(!opts || opts.cellText !== false) p.w = p.v;\n\t\t\t\t\tp.v = RBErr[p.v]; break;\n\t\t\t}\n\t\t\t/* formatting */\n\t\t\tfmtid = fillid = 0;\n\t\t\tcf = null;\n\t\t\tif(do_format && tag.s !== undefined) {\n\t\t\t\tcf = styles.CellXf[tag.s];\n\t\t\t\tif(cf != null) {\n\t\t\t\t\tif(cf.numFmtId != null) fmtid = cf.numFmtId;\n\t\t\t\t\tif(opts.cellStyles) {\n\t\t\t\t\t\tif(cf.fillId != null) fillid = cf.fillId;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsafe_format(p, fmtid, fillid, opts, themes, styles);\n\t\t\tif(opts.cellDates && do_format && p.t == 'n' && fmt_is_date(table_fmt[fmtid])) { p.t = 'd'; p.v = numdate(p.v); }\n\t\t\tif(tag.cm && opts.xlmeta) {\n\t\t\t\tvar cm = (opts.xlmeta.Cell||[])[+tag.cm-1];\n\t\t\t\tif(cm && cm.type == 'XLDAPR') p.D = true;\n\t\t\t}\n\t\t\tif(dense) {\n\t\t\t\tvar _r = decode_cell(tag.r);\n\t\t\t\tif(!s[_r.r]) s[_r.r] = [];\n\t\t\t\ts[_r.r][_r.c] = p;\n\t\t\t} else s[tag.r] = p;\n\t\t}\n\t}\n\tif(rows.length > 0) s['!rows'] = rows;\n}; })();\n\nfunction write_ws_xml_data(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*//*::, rels*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [], r/*:Array<string>*/ = [], range = safe_decode_range(ws['!ref']), cell=\"\", ref, rr = \"\", cols/*:Array<string>*/ = [], R=0, C=0, rows = ws['!rows'];\n\tvar dense = Array.isArray(ws);\n\tvar params = ({r:rr}/*:any*/), row/*:RowInfo*/, height = -1;\n\tfor(C = range.s.c; C <= range.e.c; ++C) cols[C] = encode_col(C);\n\tfor(R = range.s.r; R <= range.e.r; ++R) {\n\t\tr = [];\n\t\trr = encode_row(R);\n\t\tfor(C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tref = cols[C] + rr;\n\t\t\tvar _cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\tif(_cell === undefined) continue;\n\t\t\tif((cell = write_ws_xml_cell(_cell, ref, ws, opts, idx, wb)) != null) r.push(cell);\n\t\t}\n\t\tif(r.length > 0 || (rows && rows[R])) {\n\t\t\tparams = ({r:rr}/*:any*/);\n\t\t\tif(rows && rows[R]) {\n\t\t\t\trow = rows[R];\n\t\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\t\theight = -1;\n\t\t\t\tif(row.hpx) height = px2pt(row.hpx);\n\t\t\t\telse if(row.hpt) height = row.hpt;\n\t\t\t\tif(height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\t\tif(row.level) { params.outlineLevel = row.level; }\n\t\t\t}\n\t\t\to[o.length] = (writextag('row', r.join(\"\"), params));\n\t\t}\n\t}\n\tif(rows) for(; R < rows.length; ++R) {\n\t\tif(rows && rows[R]) {\n\t\t\tparams = ({r:R+1}/*:any*/);\n\t\t\trow = rows[R];\n\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\theight = -1;\n\t\t\tif (row.hpx) height = px2pt(row.hpx);\n\t\t\telse if (row.hpt) height = row.hpt;\n\t\t\tif (height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\tif (row.level) { params.outlineLevel = row.level; }\n\t\t\to[o.length] = (writextag('row', \"\", params));\n\t\t}\n\t}\n\treturn o.join(\"\");\n}\n\nfunction write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('worksheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:r': XMLNS.r\n\t})];\n\tvar s = wb.SheetNames[idx], sidx = 0, rdata = \"\";\n\tvar ws = wb.Sheets[s];\n\tif(ws == null) ws = {};\n\tvar ref = ws['!ref'] || 'A1';\n\tvar range = safe_decode_range(ref);\n\tif(range.e.c > 0x3FFF || range.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + ref + \" exceeds format limit A1:XFD1048576\");\n\t\trange.e.c = Math.min(range.e.c, 0x3FFF);\n\t\trange.e.r = Math.min(range.e.c, 0xFFFFF);\n\t\tref = encode_range(range);\n\t}\n\tif(!rels) rels = {};\n\tws['!comments'] = [];\n\tvar _drawing = [];\n\n\twrite_ws_xml_sheetpr(ws, wb, idx, opts, o);\n\n\to[o.length] = (writextag('dimension', null, {'ref': ref}));\n\n\to[o.length] = write_ws_xml_sheetviews(ws, opts, idx, wb);\n\n\t/* TODO: store in WB, process styles */\n\tif(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {\n\t\tdefaultRowHeight:opts.sheetFormat.defaultRowHeight||'16',\n\t\tbaseColWidth:opts.sheetFormat.baseColWidth||'10',\n\t\toutlineLevelRow:opts.sheetFormat.outlineLevelRow||'7'\n\t}));\n\n\tif(ws['!cols'] != null && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols']));\n\n\to[sidx = o.length] = '<sheetData/>';\n\tws['!links'] = [];\n\tif(ws['!ref'] != null) {\n\t\trdata = write_ws_xml_data(ws, opts, idx, wb, rels);\n\t\tif(rdata.length > 0) o[o.length] = (rdata);\n\t}\n\tif(o.length>sidx+1) { o[o.length] = ('</sheetData>'); o[sidx]=o[sidx].replace(\"/>\",\">\"); }\n\n\t/* sheetCalcPr */\n\n\tif(ws['!protect']) o[o.length] = write_ws_xml_protection(ws['!protect']);\n\n\t/* protectedRanges */\n\t/* scenarios */\n\n\tif(ws['!autofilter'] != null) o[o.length] = write_ws_xml_autofilter(ws['!autofilter'], ws, wb, idx);\n\n\t/* sortState */\n\t/* dataConsolidate */\n\t/* customSheetViews */\n\n\tif(ws['!merges'] != null && ws['!merges'].length > 0) o[o.length] = (write_ws_xml_merges(ws['!merges']));\n\n\t/* phoneticPr */\n\t/* conditionalFormatting */\n\t/* dataValidations */\n\n\tvar relc = -1, rel, rId = -1;\n\tif(/*::(*/ws['!links']/*::||[])*/.length > 0) {\n\t\to[o.length] = \"<hyperlinks>\";\n\t\t/*::(*/ws['!links']/*::||[])*/.forEach(function(l) {\n\t\t\tif(!l[1].Target) return;\n\t\t\trel = ({\"ref\":l[0]}/*:any*/);\n\t\t\tif(l[1].Target.charAt(0) != \"#\") {\n\t\t\t\trId = add_rels(rels, -1, escapexml(l[1].Target).replace(/#.*$/, \"\"), RELS.HLINK);\n\t\t\t\trel[\"r:id\"] = \"rId\"+rId;\n\t\t\t}\n\t\t\tif((relc = l[1].Target.indexOf(\"#\")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));\n\t\t\tif(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);\n\t\t\to[o.length] = writextag(\"hyperlink\",null,rel);\n\t\t});\n\t\to[o.length] = \"</hyperlinks>\";\n\t}\n\tdelete ws['!links'];\n\n\t/* printOptions */\n\n\tif(ws['!margins'] != null) o[o.length] =  write_ws_xml_margins(ws['!margins']);\n\n\t/* pageSetup */\n\t/* headerFooter */\n\t/* rowBreaks */\n\t/* colBreaks */\n\t/* customProperties */\n\t/* cellWatches */\n\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) o[o.length] = writetag(\"ignoredErrors\", writextag(\"ignoredError\", null, {numberStoredAsText:1, sqref:ref}));\n\n\t/* smartTags */\n\n\tif(_drawing.length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\t\to[o.length] = writextag(\"drawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!drawing'] = _drawing;\n\t}\n\n\tif(ws['!comments'].length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\to[o.length] = writextag(\"legacyDrawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!legacy'] = rId;\n\t}\n\n\t/* legacyDrawingHF */\n\t/* picture */\n\t/* oleObjects */\n\t/* controls */\n\t/* webPublishItems */\n\t/* tableParts */\n\t/* extLst */\n\n\tif(o.length>1) { o[o.length] = ('</worksheet>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.726 BrtRowHdr */\nfunction parse_BrtRowHdr(data, length) {\n\tvar z = ({}/*:any*/);\n\tvar tgt = data.l + length;\n\tz.r = data.read_shift(4);\n\tdata.l += 4; // TODO: ixfe\n\tvar miyRw = data.read_shift(2);\n\tdata.l += 1; // TODO: top/bot padding\n\tvar flags = data.read_shift(1);\n\tdata.l = tgt;\n\tif(flags & 0x07) z.level = flags & 0x07;\n\tif(flags & 0x10) z.hidden = true;\n\tif(flags & 0x20) z.hpt = miyRw / 20;\n\treturn z;\n}\nfunction write_BrtRowHdr(R/*:number*/, range, ws) {\n\tvar o = new_buf(17+8*16);\n\tvar row = (ws['!rows']||[])[R]||{};\n\to.write_shift(4, R);\n\n\to.write_shift(4, 0); /* TODO: ixfe */\n\n\tvar miyRw = 0x0140;\n\tif(row.hpx) miyRw = px2pt(row.hpx) * 20;\n\telse if(row.hpt) miyRw = row.hpt * 20;\n\to.write_shift(2, miyRw);\n\n\to.write_shift(1, 0); /* top/bot padding */\n\n\tvar flags = 0x0;\n\tif(row.level) flags |= row.level;\n\tif(row.hidden) flags |= 0x10;\n\tif(row.hpx || row.hpt) flags |= 0x20;\n\to.write_shift(1, flags);\n\n\to.write_shift(1, 0); /* phonetic guide */\n\n\t/* [MS-XLSB] 2.5.8 BrtColSpan explains the mechanism */\n\tvar ncolspan = 0, lcs = o.l;\n\to.l += 4;\n\n\tvar caddr = {r:R, c:0};\n\tfor(var i = 0; i < 16; ++i) {\n\t\tif((range.s.c > ((i+1) << 10)) || (range.e.c < (i << 10))) continue;\n\t\tvar first = -1, last = -1;\n\t\tfor(var j = (i<<10); j < ((i+1)<<10); ++j) {\n\t\t\tcaddr.c = j;\n\t\t\tvar cell = Array.isArray(ws) ? (ws[caddr.r]||[])[caddr.c] : ws[encode_cell(caddr)];\n\t\t\tif(cell) { if(first < 0) first = j; last = j; }\n\t\t}\n\t\tif(first < 0) continue;\n\t\t++ncolspan;\n\t\to.write_shift(4, first);\n\t\to.write_shift(4, last);\n\t}\n\n\tvar l = o.l;\n\to.l = lcs;\n\to.write_shift(4, ncolspan);\n\to.l = l;\n\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction write_row_header(ba, ws, range, R) {\n\tvar o = write_BrtRowHdr(R, range, ws);\n\tif((o.length > 17) || (ws['!rows']||[])[R]) write_record(ba, 0x0000 /* BrtRowHdr */, o);\n}\n\n/* [MS-XLSB] 2.4.820 BrtWsDim */\nvar parse_BrtWsDim = parse_UncheckedRfX;\nvar write_BrtWsDim = write_UncheckedRfX;\n\n/* [MS-XLSB] 2.4.821 BrtWsFmtInfo */\nfunction parse_BrtWsFmtInfo(/*::data, length*/) {\n}\n//function write_BrtWsFmtInfo(ws, o) { }\n\n/* [MS-XLSB] 2.4.823 BrtWsProp */\nfunction parse_BrtWsProp(data, length) {\n\tvar z = {};\n\tvar f = data[data.l]; ++data.l;\n\tz.above = !(f & 0x40);\n\tz.left  = !(f & 0x80);\n\t/* TODO: pull flags */\n\tdata.l += 18;\n\tz.name = parse_XLSBCodeName(data, length - 19);\n\treturn z;\n}\nfunction write_BrtWsProp(str, outl, o) {\n\tif(o == null) o = new_buf(84+4*str.length);\n\tvar f = 0xC0;\n\tif(outl) {\n\t\tif(outl.above) f &= ~0x40;\n\t\tif(outl.left)  f &= ~0x80;\n\t}\n\to.write_shift(1, f);\n\tfor(var i = 1; i < 3; ++i) o.write_shift(1,0);\n\twrite_BrtColor({auto:1}, o);\n\to.write_shift(-4,-1);\n\to.write_shift(-4,-1);\n\twrite_XLSBCodeName(str, o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.306 BrtCellBlank */\nfunction parse_BrtCellBlank(data) {\n\tvar cell = parse_XLSBCell(data);\n\treturn [cell];\n}\nfunction write_BrtCellBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\treturn write_XLSBCell(ncell, o);\n}\nfunction parse_BrtShortBlank(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\treturn [cell];\n}\nfunction write_BrtShortBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(4);\n\treturn write_XLSBShortCell(ncell, o);\n}\n\n/* [MS-XLSB] 2.4.307 BrtCellBool */\nfunction parse_BrtCellBool(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtCellBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\nfunction parse_BrtShortBool(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtShortBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(5);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.308 BrtCellError */\nfunction parse_BrtCellError(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtCellError(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v);\n\treturn o;\n}\nfunction parse_BrtShortError(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtShortError(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v);\n\to.write_shift(2, 0);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n\n/* [MS-XLSB] 2.4.311 BrtCellIsst */\nfunction parse_BrtCellIsst(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtCellIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\nfunction parse_BrtShortIsst(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtShortIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.313 BrtCellReal */\nfunction parse_BrtCellReal(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(16);\n\twrite_XLSBCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortReal(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.314 BrtCellRk */\nfunction parse_BrtCellRk(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortRk(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.323 BrtCellRString */\nfunction parse_BrtCellRString(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_RichStr(data);\n\treturn [cell, value, 'is'];\n}\n\n/* [MS-XLSB] 2.4.317 BrtCellSt */\nfunction parse_BrtCellSt(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtCellSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(12 + 4 * cell.v.length);\n\twrite_XLSBCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction parse_BrtShortSt(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtShortSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(8 + 4 * cell.v.length);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.653 BrtFmlaBool */\nfunction parse_BrtFmlaBool(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'b'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.654 BrtFmlaError */\nfunction parse_BrtFmlaError(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'e'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.655 BrtFmlaNum */\nfunction parse_BrtFmlaNum(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_Xnum(data);\n\tvar o = [cell, value, 'n'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.656 BrtFmlaString */\nfunction parse_BrtFmlaString(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_XLWideString(data);\n\tvar o = [cell, value, 'str'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.682 BrtMergeCell */\nvar parse_BrtMergeCell = parse_UncheckedRfX;\nvar write_BrtMergeCell = write_UncheckedRfX;\n/* [MS-XLSB] 2.4.107 BrtBeginMergeCells */\nfunction write_BrtBeginMergeCells(cnt, o) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(4, cnt);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.662 BrtHLink */\nfunction parse_BrtHLink(data, length/*::, opts*/) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar relId = parse_XLNullableWideString(data);\n\tvar loc = parse_XLWideString(data);\n\tvar tooltip = parse_XLWideString(data);\n\tvar display = parse_XLWideString(data);\n\tdata.l = end;\n\tvar o = ({rfx:rfx, relId:relId, loc:loc, display:display}/*:any*/);\n\tif(tooltip) o.Tooltip = tooltip;\n\treturn o;\n}\nfunction write_BrtHLink(l, rId) {\n\tvar o = new_buf(50+4*(l[1].Target.length + (l[1].Tooltip || \"\").length));\n\twrite_UncheckedRfX({s:decode_cell(l[0]), e:decode_cell(l[0])}, o);\n\twrite_RelID(\"rId\" + rId, o);\n\tvar locidx = l[1].Target.indexOf(\"#\");\n\tvar loc = locidx == -1 ? \"\" : l[1].Target.slice(locidx+1);\n\twrite_XLWideString(loc || \"\", o);\n\twrite_XLWideString(l[1].Tooltip || \"\", o);\n\twrite_XLWideString(\"\", o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.692 BrtPane */\nfunction parse_BrtPane(/*data, length, opts*/) {\n}\n\n/* [MS-XLSB] 2.4.6 BrtArrFmla */\nfunction parse_BrtArrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_RfX(data, 16);\n\tvar fAlwaysCalc = data.read_shift(1);\n\tvar o = [rfx]; o[2] = fAlwaysCalc;\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBArrayParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.750 BrtShrFmla */\nfunction parse_BrtShrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar o = [rfx];\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBSharedParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t\tdata.l = end;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.323 BrtColInfo */\n/* TODO: once XLS ColInfo is set, combine the functions */\nfunction write_BrtColInfo(C/*:number*/, col, o) {\n\tif(o == null) o = new_buf(18);\n\tvar p = col_obj_w(C, col);\n\to.write_shift(-4, C);\n\to.write_shift(-4, C);\n\to.write_shift(4, (p.width || 10) * 256);\n\to.write_shift(4, 0/*ixfe*/); // style\n\tvar flags = 0;\n\tif(col.hidden) flags |= 0x01;\n\tif(typeof p.width == 'number') flags |= 0x02;\n\tif(col.level) flags |= (col.level << 8);\n\to.write_shift(2, flags); // bit flag\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.678 BrtMargins */\nvar BrtMarginKeys = [\"left\",\"right\",\"top\",\"bottom\",\"header\",\"footer\"];\nfunction parse_BrtMargins(data/*::, length, opts*/)/*:Margins*/ {\n\tvar margins = ({}/*:any*/);\n\tBrtMarginKeys.forEach(function(k) { margins[k] = parse_Xnum(data, 8); });\n\treturn margins;\n}\nfunction write_BrtMargins(margins/*:Margins*/, o) {\n\tif(o == null) o = new_buf(6*8);\n\tdefault_margins(margins);\n\tBrtMarginKeys.forEach(function(k) { write_Xnum((margins/*:any*/)[k], o); });\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.299 BrtBeginWsView */\nfunction parse_BrtBeginWsView(data/*::, length, opts*/) {\n\tvar f = data.read_shift(2);\n\tdata.l += 28;\n\treturn { RTL: f & 0x20 };\n}\nfunction write_BrtBeginWsView(ws, Workbook, o) {\n\tif(o == null) o = new_buf(30);\n\tvar f = 0x39c;\n\tif((((Workbook||{}).Views||[])[0]||{}).RTL) f |= 0x20;\n\to.write_shift(2, f); // bit flag\n\to.write_shift(4, 0);\n\to.write_shift(4, 0); // view first row\n\to.write_shift(4, 0); // view first col\n\to.write_shift(1, 0); // gridline color ICV\n\to.write_shift(1, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 100); // zoom scale\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(4, 0); // workbook view id\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.309 BrtCellIgnoreEC */\nfunction write_BrtCellIgnoreEC(ref) {\n\tvar o = new_buf(24);\n\to.write_shift(4, 4);\n\to.write_shift(4, 1);\n\twrite_UncheckedRfX(ref, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.748 BrtSheetProtection */\nfunction write_BrtSheetProtection(sp, o) {\n\tif(o == null) o = new_buf(16*4+2);\n\to.write_shift(2, sp.password ? crypto_CreatePasswordVerifier_Method1(sp.password) : 0);\n\to.write_shift(4, 1); // this record should not be written if no protection\n\t[\n\t\t[\"objects\",             false], // fObjects\n\t\t[\"scenarios\",           false], // fScenarios\n\t\t[\"formatCells\",          true], // fFormatCells\n\t\t[\"formatColumns\",        true], // fFormatColumns\n\t\t[\"formatRows\",           true], // fFormatRows\n\t\t[\"insertColumns\",        true], // fInsertColumns\n\t\t[\"insertRows\",           true], // fInsertRows\n\t\t[\"insertHyperlinks\",     true], // fInsertHyperlinks\n\t\t[\"deleteColumns\",        true], // fDeleteColumns\n\t\t[\"deleteRows\",           true], // fDeleteRows\n\t\t[\"selectLockedCells\",   false], // fSelLockedCells\n\t\t[\"sort\",                 true], // fSort\n\t\t[\"autoFilter\",           true], // fAutoFilter\n\t\t[\"pivotTables\",          true], // fPivotTables\n\t\t[\"selectUnlockedCells\", false]  // fSelUnlockedCells\n\t].forEach(function(n) {\n\t\t/*:: if(o == null) throw \"unreachable\"; */\n\t\tif(n[1]) o.write_shift(4, sp[n[0]] != null && !sp[n[0]] ? 1 : 0);\n\t\telse      o.write_shift(4, sp[n[0]] != null && sp[n[0]] ? 0 : 1);\n\t});\n\treturn o;\n}\n\nfunction parse_BrtDVal(/*data, length, opts*/) {\n}\nfunction parse_BrtDVal14(/*data, length, opts*/) {\n}\n/* [MS-XLSB] 2.1.7.61 Worksheet */\nfunction parse_ws_bin(data, _opts, idx, rels, wb/*:WBWBProps*/, themes, styles)/*:Worksheet*/ {\n\tif(!data) return data;\n\tvar opts = _opts || {};\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar s/*:Worksheet*/ = (opts.dense ? [] : {});\n\n\tvar ref;\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\tvar state/*:Array<string>*/ = [];\n\tvar pass = false, end = false;\n\tvar row, p, cf, R, C, addr, sstr, rr, cell/*:Cell*/;\n\tvar merges/*:Array<Range>*/ = [];\n\topts.biff = 12;\n\topts['!row'] = 0;\n\n\tvar ai = 0, af = false;\n\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar sharedf = {};\n\tvar supbooks = opts.supbooks || /*::(*/wb/*:: :any)*/.supbooks || ([[]]/*:any*/);\n\tsupbooks.sharedf = sharedf;\n\tsupbooks.arrayf = arrayf;\n\tsupbooks.SheetNames = wb.SheetNames || wb.Sheets.map(function(x) { return x.name; });\n\tif(!opts.supbooks) {\n\t\topts.supbooks = supbooks;\n\t\tif(wb.Names) for(var i = 0; i < wb.Names.length; ++i) supbooks[0][i+1] = wb.Names[i];\n\t}\n\n\tvar colinfo/*:Array<ColInfo>*/ = [], rowinfo/*:Array<RowInfo>*/ = [];\n\tvar seencol = false;\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtShortReal\", f:parse_BrtShortReal };\n\n\tvar cm, vm;\n\n\trecordhopper(data, function ws_parse(val, RR, RT) {\n\t\tif(end) return;\n\t\tswitch(RT) {\n\t\t\tcase 0x0094: /* 'BrtWsDim' */\n\t\t\t\tref = val; break;\n\t\t\tcase 0x0000: /* 'BrtRowHdr' */\n\t\t\t\trow = val;\n\t\t\t\tif(opts.sheetRows && opts.sheetRows <= row.r) end=true;\n\t\t\t\trr = encode_row(R = row.r);\n\t\t\t\topts['!row'] = row.r;\n\t\t\t\tif(val.hidden || val.hpt || val.level != null) {\n\t\t\t\t\tif(val.hpt) val.hpx = pt2px(val.hpt);\n\t\t\t\t\trowinfo[val.r] = val;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0002: /* 'BrtCellRk' */\n\t\t\tcase 0x0003: /* 'BrtCellError' */\n\t\t\tcase 0x0004: /* 'BrtCellBool' */\n\t\t\tcase 0x0005: /* 'BrtCellReal' */\n\t\t\tcase 0x0006: /* 'BrtCellSt' */\n\t\t\tcase 0x0007: /* 'BrtCellIsst' */\n\t\t\tcase 0x0008: /* 'BrtFmlaString' */\n\t\t\tcase 0x0009: /* 'BrtFmlaNum' */\n\t\t\tcase 0x000A: /* 'BrtFmlaBool' */\n\t\t\tcase 0x000B: /* 'BrtFmlaError' */\n\t\t\tcase 0x000D: /* 'BrtShortRk' */\n\t\t\tcase 0x000E: /* 'BrtShortError' */\n\t\t\tcase 0x000F: /* 'BrtShortBool' */\n\t\t\tcase 0x0010: /* 'BrtShortReal' */\n\t\t\tcase 0x0011: /* 'BrtShortSt' */\n\t\t\tcase 0x0012: /* 'BrtShortIsst' */\n\t\t\tcase 0x003E: /* 'BrtCellRString' */\n\t\t\t\tp = ({t:val[2]}/*:any*/);\n\t\t\t\tswitch(val[2]) {\n\t\t\t\t\tcase 'n': p.v = val[1]; break;\n\t\t\t\t\tcase 's': sstr = strs[val[1]]; p.v = sstr.t; p.r = sstr.r; break;\n\t\t\t\t\tcase 'b': p.v = val[1] ? true : false; break;\n\t\t\t\t\tcase 'e': p.v = val[1]; if(opts.cellText !== false) p.w = BErr[p.v]; break;\n\t\t\t\t\tcase 'str': p.t = 's'; p.v = val[1]; break;\n\t\t\t\t\tcase 'is': p.t = 's'; p.v = val[1].t; break;\n\t\t\t\t}\n\t\t\t\tif((cf = styles.CellXf[val[0].iStyleRef])) safe_format(p,cf.numFmtId,null,opts, themes, styles);\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\taf = false;\n\t\t\t\t\tfor(ai = 0; ai < arrayf.length; ++ai) {\n\t\t\t\t\t\tvar aii = arrayf[ai];\n\t\t\t\t\t\tif(row.r >= aii[0].s.r && row.r <= aii[0].e.r)\n\t\t\t\t\t\t\tif(C >= aii[0].s.c && C <= aii[0].e.c) {\n\t\t\t\t\t\t\t\tp.F = encode_range(aii[0]); af = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!af && val.length > 3) p.f = val[3];\n\t\t\t\t}\n\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tif(opts.cellDates && cf && p.t == 'n' && fmt_is_date(table_fmt[cf.numFmtId])) {\n\t\t\t\t\tvar _d = SSF_parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t\t\t}\n\t\t\t\tif(cm) {\n\t\t\t\t\tif(cm.type == 'XLDAPR') p.D = true;\n\t\t\t\t\tcm = void 0;\n\t\t\t\t}\n\t\t\t\tif(vm) vm = void 0;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0001: /* 'BrtCellBlank' */\n\t\t\tcase 0x000C: /* 'BrtShortBlank' */\n\t\t\t\tif(!opts.sheetStubs || pass) break;\n\t\t\t\tp = ({t:'z',v:void 0}/*:any*/);\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tif(cm) {\n\t\t\t\t\tif(cm.type == 'XLDAPR') p.D = true;\n\t\t\t\t\tcm = void 0;\n\t\t\t\t}\n\t\t\t\tif(vm) vm = void 0;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00B0: /* 'BrtMergeCell' */\n\t\t\t\tmerges.push(val); break;\n\n\t\t\tcase 0x0031: { /* 'BrtCellMeta' */\n\t\t\t\tcm = ((opts.xlmeta||{}).Cell||[])[val-1];\n\t\t\t} break;\n\n\t\t\tcase 0x01EE: /* 'BrtHLink' */\n\t\t\t\tvar rel = rels['!id'][val.relId];\n\t\t\t\tif(rel) {\n\t\t\t\t\tval.Target = rel.Target;\n\t\t\t\t\tif(val.loc) val.Target += \"#\"+val.loc;\n\t\t\t\t\tval.Rel = rel;\n\t\t\t\t} else if(val.relId == '') {\n\t\t\t\t\tval.Target = \"#\" + val.loc;\n\t\t\t\t}\n\t\t\t\tfor(R=val.rfx.s.r;R<=val.rfx.e.r;++R) for(C=val.rfx.s.c;C<=val.rfx.e.c;++C) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\t\t\tif(!s[R][C]) s[R][C] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[R][C].l = val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddr = encode_cell({c:C,r:R});\n\t\t\t\t\t\tif(!s[addr]) s[addr] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[addr].l = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01AA: /* 'BrtArrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tarrayf.push(val);\n\t\t\t\tcell = ((opts.dense ? s[R][C] : s[encode_col(C) + rr])/*:any*/);\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tcell.F = encode_range(val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x01AB: /* 'BrtShrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tsharedf[encode_cell(val[0].s)] = val[1];\n\t\t\t\tcell = (opts.dense ? s[R][C] : s[encode_col(C) + rr]);\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tbreak;\n\n\t\t\t/* identical to 'ColInfo' in XLS */\n\t\t\tcase 0x003C: /* 'BrtColInfo' */\n\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, hidden: !!(val.flags & 0x01), level: val.level };\n\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00A1: /* 'BrtBeginAFilter' */\n\t\t\t\ts['!autofilter'] = { ref:encode_range(val) };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\t\ts['!margins'] = val;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0093: /* 'BrtWsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tif(val.above || val.left) s['!outline'] = { above: val.above, left: val.left };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0089: /* 'BrtBeginWsView' */\n\t\t\t\tif(!wb.Views) wb.Views = [{}];\n\t\t\t\tif(!wb.Views[0]) wb.Views[0] = {};\n\t\t\t\tif(val.RTL) wb.Views[0].RTL = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01E5: /* 'BrtWsFmtInfo' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0040: /* 'BrtDVal' */\n\t\t\tcase 0x041D: /* 'BrtDVal14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0097: /* 'BrtPane' */\n\t\t\t\tbreak;\n\t\t\tcase 0x0098: /* 'BrtSel' */\n\t\t\tcase 0x00AF: /* 'BrtAFilterDateGroupItem' */\n\t\t\tcase 0x0284: /* 'BrtActiveX' */\n\t\t\tcase 0x0271: /* 'BrtBigName' */\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x018C: /* 'BrtBrk' */\n\t\t\tcase 0x0458: /* 'BrtCFIcon' */\n\t\t\tcase 0x047A: /* 'BrtCFRuleExt' */\n\t\t\tcase 0x01D7: /* 'BrtCFVO' */\n\t\t\tcase 0x041A: /* 'BrtCFVO14' */\n\t\t\tcase 0x0289: /* 'BrtCellIgnoreEC' */\n\t\t\tcase 0x0451: /* 'BrtCellIgnoreEC14' */\n\t\t\tcase 0x024D: /* 'BrtCellSmartTagProperty' */\n\t\t\tcase 0x025F: /* 'BrtCellWatch' */\n\t\t\tcase 0x0234: /* 'BrtColor' */\n\t\t\tcase 0x041F: /* 'BrtColor14' */\n\t\t\tcase 0x00A8: /* 'BrtColorFilter' */\n\t\t\tcase 0x00AE: /* 'BrtCustomFilter' */\n\t\t\tcase 0x049C: /* 'BrtCustomFilter14' */\n\t\t\tcase 0x01F3: /* 'BrtDRef' */\n\t\t\tcase 0x01FB: /* 'BrtDXF' */\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\tcase 0x00AB: /* 'BrtDynamicFilter' */\n\t\t\tcase 0x00A7: /* 'BrtFilter' */\n\t\t\tcase 0x0499: /* 'BrtFilter14' */\n\t\t\tcase 0x00A9: /* 'BrtIconFilter' */\n\t\t\tcase 0x049D: /* 'BrtIconFilter14' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x0295: /* 'BrtListPart' */\n\t\t\tcase 0x027F: /* 'BrtOleObject' */\n\t\t\tcase 0x01DE: /* 'BrtPageSetup' */\n\t\t\tcase 0x0219: /* 'BrtPhoneticInfo' */\n\t\t\tcase 0x01DD: /* 'BrtPrintOptions' */\n\t\t\tcase 0x0218: /* 'BrtRangeProtection' */\n\t\t\tcase 0x044F: /* 'BrtRangeProtection14' */\n\t\t\tcase 0x02A8: /* 'BrtRangeProtectionIso' */\n\t\t\tcase 0x0450: /* 'BrtRangeProtectionIso14' */\n\t\t\tcase 0x0400: /* 'BrtRwDescent' */\n\t\t\tcase 0x0297: /* 'BrtSheetCalcProp' */\n\t\t\tcase 0x0217: /* 'BrtSheetProtection' */\n\t\t\tcase 0x02A6: /* 'BrtSheetProtectionIso' */\n\t\t\tcase 0x01F8: /* 'BrtSlc' */\n\t\t\tcase 0x0413: /* 'BrtSparkline' */\n\t\t\tcase 0x01AC: /* 'BrtTable' */\n\t\t\tcase 0x00AA: /* 'BrtTop10Filter' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0032: /* 'BrtValueMeta' */\n\t\t\tcase 0x0816: /* 'BrtWebExtension' */\n\t\t\tcase 0x0415: /* 'BrtWsFmtInfoEx14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(RR.T){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tdelete opts.supbooks;\n\tdelete opts['!row'];\n\n\tif(!s[\"!ref\"] && (refguess.s.r < 2000000 || ref && (ref.e.r > 0 || ref.e.c > 0 || ref.s.r > 0 || ref.s.c > 0))) s[\"!ref\"] = encode_range(ref || refguess);\n\tif(opts.sheetRows && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\tif(colinfo.length > 0) s[\"!cols\"] = colinfo;\n\tif(rowinfo.length > 0) s[\"!rows\"] = rowinfo;\n\treturn s;\n}\n\n/* TODO: something useful -- this is a stub */\nfunction write_ws_bin_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*/, opts, ws/*:Worksheet*/, last_seen/*:boolean*/)/*:boolean*/ {\n\tif(cell.v === undefined) return false;\n\tvar vv = \"\";\n\tswitch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'd': // no BrtCellDate :(\n\t\t\tcell = dup(cell);\n\t\t\tcell.z = cell.z || table_fmt[14];\n\t\t\tcell.v = datenum(parseDate(cell.v)); cell.t = 'n';\n\t\t\tbreak;\n\t\t/* falls through */\n\t\tcase 'n': case 'e': vv = ''+cell.v; break;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar o/*:any*/ = ({r:R, c:C}/*:any*/);\n\t/* TODO: cell style */\n\to.s = get_cell_style(opts.cellXfs, cell, opts);\n\tif(cell.l) ws['!links'].push([encode_cell(o), cell.l]);\n\tif(cell.c) ws['!comments'].push([encode_cell(o), cell.c]);\n\tswitch(cell.t) {\n\t\tcase 's': case 'str':\n\t\t\tif(opts.bookSST) {\n\t\t\t\tvv = get_sst_id(opts.Strings, (cell.v/*:any*/), opts.revStrings);\n\t\t\t\to.t = \"s\"; o.v = vv;\n\t\t\t\tif(last_seen) write_record(ba, 0x0012 /* BrtShortIsst */, write_BrtShortIsst(cell, o));\n\t\t\t\telse write_record(ba, 0x0007 /* BrtCellIsst */, write_BrtCellIsst(cell, o));\n\t\t\t} else {\n\t\t\t\to.t = \"str\";\n\t\t\t\tif(last_seen) write_record(ba, 0x0011 /* BrtShortSt */, write_BrtShortSt(cell, o));\n\t\t\t\telse write_record(ba, 0x0006 /* BrtCellSt */, write_BrtCellSt(cell, o));\n\t\t\t}\n\t\t\treturn true;\n\t\tcase 'n':\n\t\t\t/* TODO: determine threshold for Real vs RK */\n\t\t\tif(cell.v == (cell.v | 0) && cell.v > -1000 && cell.v < 1000) {\n\t\t\t\tif(last_seen) write_record(ba, 0x000D /* BrtShortRk */, write_BrtShortRk(cell, o));\n\t\t\t\telse write_record(ba, 0x0002 /* BrtCellRk */, write_BrtCellRk(cell, o));\n\t\t\t} else {\n\t\t\t\tif(last_seen) write_record(ba, 0x0010 /* BrtShortReal */, write_BrtShortReal(cell, o));\n\t\t\t\telse write_record(ba, 0x0005 /* BrtCellReal */, write_BrtCellReal(cell, o));\n\t\t\t} return true;\n\t\tcase 'b':\n\t\t\to.t = \"b\";\n\t\t\tif(last_seen) write_record(ba, 0x000F /* BrtShortBool */, write_BrtShortBool(cell, o));\n\t\t\telse write_record(ba, 0x0004 /* BrtCellBool */, write_BrtCellBool(cell, o));\n\t\t\treturn true;\n\t\tcase 'e':\n\t\t\to.t = \"e\";\n\t\t\tif(last_seen) write_record(ba, 0x000E /* BrtShortError */, write_BrtShortError(cell, o));\n\t\t\telse write_record(ba, 0x0003 /* BrtCellError */, write_BrtCellError(cell, o));\n\t\t\treturn true;\n\t}\n\tif(last_seen) write_record(ba, 0x000C /* BrtShortBlank */, write_BrtShortBlank(cell, o));\n\telse write_record(ba, 0x0001 /* BrtCellBlank */, write_BrtCellBlank(cell, o));\n\treturn true;\n}\n\nfunction write_CELLTABLE(ba, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref, rr = \"\", cols/*:Array<string>*/ = [];\n\twrite_record(ba, 0x0091 /* BrtBeginSheetData */);\n\tvar dense = Array.isArray(ws);\n\tvar cap = range.e.r;\n\tif(ws['!rows']) cap = Math.max(range.e.r, ws['!rows'].length - 1);\n\tfor(var R = range.s.r; R <= cap; ++R) {\n\t\trr = encode_row(R);\n\t\t/* [ACCELLTABLE] */\n\t\t/* BrtRowHdr */\n\t\twrite_row_header(ba, ws, range, R);\n\t\tvar last_seen = false;\n\t\tif(R <= range.e.r) for(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t/* *16384CELL */\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) { last_seen = false; continue; }\n\t\t\t/* write cell */\n\t\t\tlast_seen = write_ws_bin_cell(ba, cell, R, C, opts, ws, last_seen);\n\t\t}\n\t}\n\twrite_record(ba, 0x0092 /* BrtEndSheetData */);\n}\n\nfunction write_MERGECELLS(ba, ws/*:Worksheet*/) {\n\tif(!ws || !ws['!merges']) return;\n\twrite_record(ba, 0x00B1 /* BrtBeginMergeCells */, write_BrtBeginMergeCells(ws['!merges'].length));\n\tws['!merges'].forEach(function(m) { write_record(ba, 0x00B0 /* BrtMergeCell */, write_BrtMergeCell(m)); });\n\twrite_record(ba, 0x00B2 /* BrtEndMergeCells */);\n}\n\nfunction write_COLINFOS(ba, ws/*:Worksheet*//*::, idx:number, opts, wb:Workbook*/) {\n\tif(!ws || !ws['!cols']) return;\n\twrite_record(ba, 0x0186 /* BrtBeginColInfos */);\n\tws['!cols'].forEach(function(m, i) { if(m) write_record(ba, 0x003C /* 'BrtColInfo' */, write_BrtColInfo(i, m)); });\n\twrite_record(ba, 0x0187 /* BrtEndColInfos */);\n}\n\nfunction write_IGNOREECS(ba, ws/*:Worksheet*/) {\n\tif(!ws || !ws['!ref']) return;\n\twrite_record(ba, 0x0288 /* BrtBeginCellIgnoreECs */);\n\twrite_record(ba, 0x0289 /* BrtCellIgnoreEC */, write_BrtCellIgnoreEC(safe_decode_range(ws['!ref'])));\n\twrite_record(ba, 0x028A /* BrtEndCellIgnoreECs */);\n}\n\nfunction write_HLINKS(ba, ws/*:Worksheet*/, rels) {\n\t/* *BrtHLink */\n\tws['!links'].forEach(function(l) {\n\t\tif(!l[1].Target) return;\n\t\tvar rId = add_rels(rels, -1, l[1].Target.replace(/#.*$/, \"\"), RELS.HLINK);\n\t\twrite_record(ba, 0x01EE /* BrtHLink */, write_BrtHLink(l, rId));\n\t});\n\tdelete ws['!links'];\n}\nfunction write_LEGACYDRAWING(ba, ws/*:Worksheet*/, idx/*:number*/, rels) {\n\t/* [BrtLegacyDrawing] */\n\tif(ws['!comments'].length > 0) {\n\t\tvar rId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\twrite_record(ba, 0x0227 /* BrtLegacyDrawing */, write_RelID(\"rId\" + rId));\n\t\tws['!legacy'] = rId;\n\t}\n}\n\nfunction write_AUTOFILTER(ba, ws, wb, idx) {\n\tif(!ws['!autofilter']) return;\n\tvar data = ws['!autofilter'];\n\tvar ref = typeof data.ref === \"string\" ? data.ref : encode_range(data.ref);\n\n\t/* Update FilterDatabase defined name for the worksheet */\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]}/*:any*/);\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names/*: Array<any> */ = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref  });\n\n\twrite_record(ba, 0x00A1 /* BrtBeginAFilter */, write_UncheckedRfX(safe_decode_range(ref)));\n\t/* *FILTERCOLUMN */\n\t/* [SORTSTATE] */\n\t/* BrtEndAFilter */\n\twrite_record(ba, 0x00A2 /* BrtEndAFilter */);\n}\n\nfunction write_WSVIEWS2(ba, ws, Workbook) {\n\twrite_record(ba, 0x0085 /* BrtBeginWsViews */);\n\t{ /* 1*WSVIEW2 */\n\t\t/* [ACUID] */\n\t\twrite_record(ba, 0x0089 /* BrtBeginWsView */, write_BrtBeginWsView(ws, Workbook));\n\t\t/* [BrtPane] */\n\t\t/* *4BrtSel */\n\t\t/* *4SXSELECT */\n\t\t/* *FRT */\n\t\twrite_record(ba, 0x008A /* BrtEndWsView */);\n\t}\n\t/* *FRT */\n\twrite_record(ba, 0x0086 /* BrtEndWsViews */);\n}\n\nfunction write_WSFMTINFO(/*::ba, ws*/) {\n\t/* [ACWSFMTINFO] */\n\t// write_record(ba, 0x01E5 /* BrtWsFmtInfo */, write_BrtWsFmtInfo(ws));\n}\n\nfunction write_SHEETPROTECT(ba, ws) {\n\tif(!ws['!protect']) return;\n\t/* [BrtSheetProtectionIso] */\n\twrite_record(ba, 0x0217 /* BrtSheetProtection */, write_BrtSheetProtection(ws['!protect']));\n}\n\nfunction write_ws_bin(idx/*:number*/, opts, wb/*:Workbook*/, rels) {\n\tvar ba = buf_array();\n\tvar s = wb.SheetNames[idx], ws = wb.Sheets[s] || {};\n\tvar c/*:string*/ = s; try { if(wb && wb.Workbook) c = wb.Workbook.Sheets[idx].CodeName || c; } catch(e) {}\n\tvar r = safe_decode_range(ws['!ref'] || \"A1\");\n\tif(r.e.c > 0x3FFF || r.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:XFD1048576\");\n\t\tr.e.c = Math.min(r.e.c, 0x3FFF);\n\t\tr.e.r = Math.min(r.e.c, 0xFFFFF);\n\t}\n\tws['!links'] = [];\n\t/* passed back to write_zip and removed there */\n\tws['!comments'] = [];\n\twrite_record(ba, 0x0081 /* BrtBeginSheet */);\n\tif(wb.vbaraw || ws['!outline']) write_record(ba, 0x0093 /* BrtWsProp */, write_BrtWsProp(c, ws['!outline']));\n\twrite_record(ba, 0x0094 /* BrtWsDim */, write_BrtWsDim(r));\n\twrite_WSVIEWS2(ba, ws, wb.Workbook);\n\twrite_WSFMTINFO(ba, ws);\n\twrite_COLINFOS(ba, ws, idx, opts, wb);\n\twrite_CELLTABLE(ba, ws, idx, opts, wb);\n\t/* [BrtSheetCalcProp] */\n\twrite_SHEETPROTECT(ba, ws);\n\t/* *([BrtRangeProtectionIso] BrtRangeProtection) */\n\t/* [SCENMAN] */\n\twrite_AUTOFILTER(ba, ws, wb, idx);\n\t/* [SORTSTATE] */\n\t/* [DCON] */\n\t/* [USERSHVIEWS] */\n\twrite_MERGECELLS(ba, ws);\n\t/* [BrtPhoneticInfo] */\n\t/* *CONDITIONALFORMATTING */\n\t/* [DVALS] */\n\twrite_HLINKS(ba, ws, rels);\n\t/* [BrtPrintOptions] */\n\tif(ws['!margins']) write_record(ba, 0x01DC /* BrtMargins */, write_BrtMargins(ws['!margins']));\n\t/* [BrtPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* [RWBRK] */\n\t/* [COLBRK] */\n\t/* *BrtBigName */\n\t/* [CELLWATCHES] */\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) write_IGNOREECS(ba, ws);\n\t/* [SMARTTAGS] */\n\t/* [BrtDrawing] */\n\twrite_LEGACYDRAWING(ba, ws, idx, rels);\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [OLEOBJECTS] */\n\t/* [ACTIVEXCONTROLS] */\n\t/* [WEBPUBITEMS] */\n\t/* [LISTPARTS] */\n\t/* FRTWORKSHEET */\n\twrite_record(ba, 0x0082 /* BrtEndSheet */);\n\treturn ba.end();\n}\nfunction parse_Cache(data/*:string*/)/*:[Array<number|string>, string, ?string]*/ {\n\tvar col/*:Array<number|string>*/ = [];\n\tvar num = data.match(/^<c:numCache>/);\n\tvar f;\n\n\t/* 21.2.2.150 pt CT_NumVal */\n\t(data.match(/<c:pt idx=\"(\\d*)\">(.*?)<\\/c:pt>/mg)||[]).forEach(function(pt) {\n\t\tvar q = pt.match(/<c:pt idx=\"(\\d*?)\"><c:v>(.*)<\\/c:v><\\/c:pt>/);\n\t\tif(!q) return;\n\t\tcol[+q[1]] = num ? +q[2] : q[2];\n\t});\n\n\t/* 21.2.2.71 formatCode CT_Xstring */\n\tvar nf = unescapexml((data.match(/<c:formatCode>([\\s\\S]*?)<\\/c:formatCode>/) || [\"\",\"General\"])[1]);\n\n\t(data.match(/<c:f>(.*?)<\\/c:f>/mg)||[]).forEach(function(F) { f = F.replace(/<.*?>/g,\"\"); });\n\n\treturn [col, nf, f];\n}\n\n/* 21.2 DrawingML - Charts */\nfunction parse_chart(data/*:?string*/, name/*:string*/, opts, rels, wb, csheet) {\n\tvar cs/*:Worksheet*/ = ((csheet || {\"!type\":\"chart\"})/*:any*/);\n\tif(!data) return csheet;\n\t/* 21.2.2.27 chart CT_Chart */\n\n\tvar C = 0, R = 0, col = \"A\";\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\t/* 21.2.2.120 numCache CT_NumData */\n\t(data.match(/<c:numCache>[\\s\\S]*?<\\/c:numCache>/gm)||[]).forEach(function(nc) {\n\t\tvar cache = parse_Cache(nc);\n\t\trefguess.s.r = refguess.s.c = 0;\n\t\trefguess.e.c = C;\n\t\tcol = encode_col(C);\n\t\tcache[0].forEach(function(n,i) {\n\t\t\tcs[col + encode_row(i)] = {t:'n', v:n, z:cache[1] };\n\t\t\tR = i;\n\t\t});\n\t\tif(refguess.e.r < R) refguess.e.r = R;\n\t\t++C;\n\t});\n\tif(C > 0) cs[\"!ref\"] = encode_range(refguess);\n\treturn cs;\n}\n/* 18.3 Worksheets also covers Chartsheets */\nfunction parse_cs_xml(data/*:?string*/, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {\n\tif(!data) return data;\n\t/* 18.3.1.12 chartsheet CT_ChartSheet */\n\tif(!rels) rels = {'!id':{}};\n\tvar s = ({'!type':\"chart\", '!drawel':null, '!rel':\"\"}/*:any*/);\n\tvar m;\n\n\t/* 18.3.1.83 sheetPr CT_ChartsheetPr */\n\tvar sheetPr = data.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\n\t/* 18.3.1.36 drawing CT_Drawing */\n\tif((m = data.match(/drawing r:id=\"(.*?)\"/))) s['!rel'] = m[1];\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {\n\tvar o = [XML_HEADER, writextag('chartsheet', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t'xmlns:r': XMLNS.r\n\t})];\n\to[o.length] = writextag(\"drawing\", null, {\"r:id\": \"rId1\"});\n\tadd_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\tif(o.length>2) { o[o.length] = ('</chartsheet>'); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.331 BrtCsProp */\nfunction parse_BrtCsProp(data, length/*:number*/) {\n\tdata.l += 10;\n\tvar name = parse_XLWideString(data, length - 10);\n\treturn { name: name };\n}\n\n/* [MS-XLSB] 2.1.7.7 Chart Sheet */\nfunction parse_cs_bin(data, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tvar s = {'!type':\"chart\", '!drawel':null, '!rel':\"\"};\n\tvar state/*:Array<string>*/ = [];\n\tvar pass = false;\n\trecordhopper(data, function cs_parse(val, R, RT) {\n\t\tswitch(RT) {\n\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\t\ts['!rel'] = val; break;\n\n\t\t\tcase 0x028B: /* 'BrtCsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x028C: /* 'BrtCsPageSetup' */\n\t\t\tcase 0x029D: /* 'BrtCsProtection' */\n\t\t\tcase 0x02A7: /* 'BrtCsProtectionIso' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T > 0) state.push(RT);\n\t\t\t\telse if(R.T < 0) state.pop();\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_bin(/*::idx:number, opts, wb:Workbook, rels*/) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0081 /* BrtBeginSheet */);\n\t/* [BrtCsProp] */\n\t/* CSVIEWS */\n\t/* [[BrtCsProtectionIso] BrtCsProtection] */\n\t/* [USERCSVIEWS] */\n\t/* [BrtMargins] */\n\t/* [BrtCsPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* BrtDrawing */\n\t/* [BrtLegacyDrawing] */\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [WEBPUBITEMS] */\n\t/* FRTCHARTSHEET */\n\twrite_record(ba, 0x0082 /* BrtEndSheet */);\n\treturn ba.end();\n}\n/* 18.2.28 (CT_WorkbookProtection) Defaults */\nvar WBPropsDef = [\n\t['allowRefreshQuery',           false, \"bool\"],\n\t['autoCompressPictures',        true,  \"bool\"],\n\t['backupFile',                  false, \"bool\"],\n\t['checkCompatibility',          false, \"bool\"],\n\t['CodeName',                    ''],\n\t['date1904',                    false, \"bool\"],\n\t['defaultThemeVersion',         0,      \"int\"],\n\t['filterPrivacy',               false, \"bool\"],\n\t['hidePivotFieldList',          false, \"bool\"],\n\t['promptedSolutions',           false, \"bool\"],\n\t['publishItems',                false, \"bool\"],\n\t['refreshAllConnections',       false, \"bool\"],\n\t['saveExternalLinkValues',      true,  \"bool\"],\n\t['showBorderUnselectedTables',  true,  \"bool\"],\n\t['showInkAnnotation',           true,  \"bool\"],\n\t['showObjects',                 'all'],\n\t['showPivotChartFilter',        false, \"bool\"],\n\t['updateLinks', 'userSet']\n];\n\n/* 18.2.30 (CT_BookView) Defaults */\nvar WBViewDef = [\n\t['activeTab',                   0,      \"int\"],\n\t['autoFilterDateGrouping',      true,  \"bool\"],\n\t['firstSheet',                  0,      \"int\"],\n\t['minimized',                   false, \"bool\"],\n\t['showHorizontalScroll',        true,  \"bool\"],\n\t['showSheetTabs',               true,  \"bool\"],\n\t['showVerticalScroll',          true,  \"bool\"],\n\t['tabRatio',                    600,    \"int\"],\n\t['visibility',                  'visible']\n\t//window{Height,Width}, {x,y}Window\n];\n\n/* 18.2.19 (CT_Sheet) Defaults */\nvar SheetDef = [\n\t//['state', 'visible']\n];\n\n/* 18.2.2  (CT_CalcPr) Defaults */\nvar CalcPrDef = [\n\t['calcCompleted', 'true'],\n\t['calcMode', 'auto'],\n\t['calcOnSave', 'true'],\n\t['concurrentCalc', 'true'],\n\t['fullCalcOnLoad', 'false'],\n\t['fullPrecision', 'true'],\n\t['iterate', 'false'],\n\t['iterateCount', '100'],\n\t['iterateDelta', '0.001'],\n\t['refMode', 'A1']\n];\n\n/* 18.2.3 (CT_CustomWorkbookView) Defaults */\n/*var CustomWBViewDef = [\n\t['autoUpdate', 'false'],\n\t['changesSavedWin', 'false'],\n\t['includeHiddenRowCol', 'true'],\n\t['includePrintSettings', 'true'],\n\t['maximized', 'false'],\n\t['minimized', 'false'],\n\t['onlySync', 'false'],\n\t['personalView', 'false'],\n\t['showComments', 'commIndicator'],\n\t['showFormulaBar', 'true'],\n\t['showHorizontalScroll', 'true'],\n\t['showObjects', 'all'],\n\t['showSheetTabs', 'true'],\n\t['showStatusbar', 'true'],\n\t['showVerticalScroll', 'true'],\n\t['tabRatio', '600'],\n\t['xWindow', '0'],\n\t['yWindow', '0']\n];*/\n\nfunction push_defaults_array(target, defaults) {\n\tfor(var j = 0; j != target.length; ++j) { var w = target[j];\n\t\tfor(var i=0; i != defaults.length; ++i) { var z = defaults[i];\n\t\t\tif(w[z[0]] == null) w[z[0]] = z[1];\n\t\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof w[z[0]] == \"string\") w[z[0]] = parsexmlbool(w[z[0]]); break;\n\t\t\tcase \"int\": if(typeof w[z[0]] == \"string\") w[z[0]] = parseInt(w[z[0]], 10); break;\n\t\t\t}\n\t\t}\n\t}\n}\nfunction push_defaults(target, defaults) {\n\tfor(var i = 0; i != defaults.length; ++i) { var z = defaults[i];\n\t\tif(target[z[0]] == null) target[z[0]] = z[1];\n\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof target[z[0]] == \"string\") target[z[0]] = parsexmlbool(target[z[0]]); break;\n\t\t\tcase \"int\": if(typeof target[z[0]] == \"string\") target[z[0]] = parseInt(target[z[0]], 10); break;\n\t\t}\n\t}\n}\n\nfunction parse_wb_defaults(wb) {\n\tpush_defaults(wb.WBProps, WBPropsDef);\n\tpush_defaults(wb.CalcPr, CalcPrDef);\n\n\tpush_defaults_array(wb.WBView, WBViewDef);\n\tpush_defaults_array(wb.Sheets, SheetDef);\n\n\t_ssfopts.date1904 = parsexmlbool(wb.WBProps.date1904);\n}\n\nfunction safe1904(wb/*:Workbook*/)/*:string*/ {\n\t/* TODO: store date1904 somewhere else */\n\tif(!wb.Workbook) return \"false\";\n\tif(!wb.Workbook.WBProps) return \"false\";\n\treturn parsexmlbool(wb.Workbook.WBProps.date1904) ? \"true\" : \"false\";\n}\n\nvar badchars = /*#__PURE__*/\"][*?\\/\\\\\".split(\"\");\nfunction check_ws_name(n/*:string*/, safe/*:?boolean*/)/*:boolean*/ {\n\tif(n.length > 31) { if(safe) return false; throw new Error(\"Sheet names cannot exceed 31 chars\"); }\n\tvar _good = true;\n\tbadchars.forEach(function(c) {\n\t\tif(n.indexOf(c) == -1) return;\n\t\tif(!safe) throw new Error(\"Sheet name cannot contain : \\\\ / ? * [ ]\");\n\t\t_good = false;\n\t});\n\treturn _good;\n}\nfunction check_wb_names(N, S, codes) {\n\tN.forEach(function(n,i) {\n\t\tcheck_ws_name(n);\n\t\tfor(var j = 0; j < i; ++j) if(n == N[j]) throw new Error(\"Duplicate Sheet Name: \" + n);\n\t\tif(codes) {\n\t\t\tvar cn = (S && S[i] && S[i].CodeName) || n;\n\t\t\tif(cn.charCodeAt(0) == 95 && cn.length > 22) throw new Error(\"Bad Code Name: Worksheet\" + cn);\n\t\t}\n\t});\n}\nfunction check_wb(wb) {\n\tif(!wb || !wb.SheetNames || !wb.Sheets) throw new Error(\"Invalid Workbook\");\n\tif(!wb.SheetNames.length) throw new Error(\"Workbook is empty\");\n\tvar Sheets = (wb.Workbook && wb.Workbook.Sheets) || [];\n\tcheck_wb_names(wb.SheetNames, Sheets, !!wb.vbaraw);\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) check_ws(wb.Sheets[wb.SheetNames[i]], wb.SheetNames[i], i);\n\t/* TODO: validate workbook */\n}\n/* 18.2 Workbook */\nvar wbnsregex = /<\\w+:workbook/;\nfunction parse_wb_xml(data, opts)/*:WorkbookFile*/ {\n\tif(!data) throw new Error(\"Could not find file\");\n\tvar wb = /*::(*/{ AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, Names:[], xmlns: \"\" }/*::)*/;\n\tvar pass = false, xmlns = \"xmlns\";\n\tvar dname = {}, dnstart = 0;\n\tdata.replace(tagregex, function xml_wb(x, idx) {\n\t\tvar y/*:any*/ = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '<?xml': break;\n\n\t\t\t/* 18.2.27 workbook CT_Workbook 1 */\n\t\t\tcase '<workbook':\n\t\t\t\tif(x.match(wbnsregex)) xmlns = \"xmlns\" + x.match(/<(\\w+):/)[1];\n\t\t\t\twb.xmlns = y[xmlns];\n\t\t\t\tbreak;\n\t\t\tcase '</workbook>': break;\n\n\t\t\t/* 18.2.13 fileVersion CT_FileVersion ? */\n\t\t\tcase '<fileVersion': delete y[0]; wb.AppVersion = y; break;\n\t\t\tcase '<fileVersion/>': case '</fileVersion>': break;\n\n\t\t\t/* 18.2.12 fileSharing CT_FileSharing ? */\n\t\t\tcase '<fileSharing':\n\t\t\t\tbreak;\n\t\t\tcase '<fileSharing/>': break;\n\n\t\t\t/* 18.2.28 workbookPr CT_WorkbookPr ? */\n\t\t\tcase '<workbookPr':\n\t\t\tcase '<workbookPr/>':\n\t\t\t\tWBPropsDef.forEach(function(w) {\n\t\t\t\t\tif(y[w[0]] == null) return;\n\t\t\t\t\tswitch(w[2]) {\n\t\t\t\t\t\tcase \"bool\": wb.WBProps[w[0]] = parsexmlbool(y[w[0]]); break;\n\t\t\t\t\t\tcase \"int\": wb.WBProps[w[0]] = parseInt(y[w[0]], 10); break;\n\t\t\t\t\t\tdefault: wb.WBProps[w[0]] = y[w[0]];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif(y.codeName) wb.WBProps.CodeName = utf8read(y.codeName);\n\t\t\t\tbreak;\n\t\t\tcase '</workbookPr>': break;\n\n\t\t\t/* 18.2.29 workbookProtection CT_WorkbookProtection ? */\n\t\t\tcase '<workbookProtection':\n\t\t\t\tbreak;\n\t\t\tcase '<workbookProtection/>': break;\n\n\t\t\t/* 18.2.1  bookViews CT_BookViews ? */\n\t\t\tcase '<bookViews': case '<bookViews>': case '</bookViews>': break;\n\t\t\t/* 18.2.30   workbookView CT_BookView + */\n\t\t\tcase '<workbookView': case '<workbookView/>': delete y[0]; wb.WBView.push(y); break;\n\t\t\tcase '</workbookView>': break;\n\n\t\t\t/* 18.2.20 sheets CT_Sheets 1 */\n\t\t\tcase '<sheets': case '<sheets>': case '</sheets>': break; // aggregate sheet\n\t\t\t/* 18.2.19   sheet CT_Sheet + */\n\t\t\tcase '<sheet':\n\t\t\t\tswitch(y.state) {\n\t\t\t\t\tcase \"hidden\": y.Hidden = 1; break;\n\t\t\t\t\tcase \"veryHidden\": y.Hidden = 2; break;\n\t\t\t\t\tdefault: y.Hidden = 0;\n\t\t\t\t}\n\t\t\t\tdelete y.state;\n\t\t\t\ty.name = unescapexml(utf8read(y.name));\n\t\t\t\tdelete y[0]; wb.Sheets.push(y); break;\n\t\t\tcase '</sheet>': break;\n\n\t\t\t/* 18.2.15 functionGroups CT_FunctionGroups ? */\n\t\t\tcase '<functionGroups': case '<functionGroups/>': break;\n\t\t\t/* 18.2.14   functionGroup CT_FunctionGroup + */\n\t\t\tcase '<functionGroup': break;\n\n\t\t\t/* 18.2.9  externalReferences CT_ExternalReferences ? */\n\t\t\tcase '<externalReferences': case '</externalReferences>': case '<externalReferences>': break;\n\t\t\t/* 18.2.8    externalReference CT_ExternalReference + */\n\t\t\tcase '<externalReference': break;\n\n\t\t\t/* 18.2.6  definedNames CT_DefinedNames ? */\n\t\t\tcase '<definedNames/>': break;\n\t\t\tcase '<definedNames>': case '<definedNames': pass=true; break;\n\t\t\tcase '</definedNames>': pass=false; break;\n\t\t\t/* 18.2.5    definedName CT_DefinedName + */\n\t\t\tcase '<definedName': {\n\t\t\t\tdname = {};\n\t\t\t\tdname.Name = utf8read(y.name);\n\t\t\t\tif(y.comment) dname.Comment = y.comment;\n\t\t\t\tif(y.localSheetId) dname.Sheet = +y.localSheetId;\n\t\t\t\tif(parsexmlbool(y.hidden||\"0\")) dname.Hidden = true;\n\t\t\t\tdnstart = idx + x.length;\n\t\t\t}\tbreak;\n\t\t\tcase '</definedName>': {\n\t\t\t\tdname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));\n\t\t\t\twb.Names.push(dname);\n\t\t\t} break;\n\t\t\tcase '<definedName/>': break;\n\n\t\t\t/* 18.2.2  calcPr CT_CalcPr ? */\n\t\t\tcase '<calcPr': delete y[0]; wb.CalcPr = y; break;\n\t\t\tcase '<calcPr/>': delete y[0]; wb.CalcPr = y; break;\n\t\t\tcase '</calcPr>': break;\n\n\t\t\t/* 18.2.16 oleSize CT_OleSize ? (ref required) */\n\t\t\tcase '<oleSize': break;\n\n\t\t\t/* 18.2.4  customWorkbookViews CT_CustomWorkbookViews ? */\n\t\t\tcase '<customWorkbookViews>': case '</customWorkbookViews>': case '<customWorkbookViews': break;\n\t\t\t/* 18.2.3  customWorkbookView CT_CustomWorkbookView + */\n\t\t\tcase '<customWorkbookView': case '</customWorkbookView>': break;\n\n\t\t\t/* 18.2.18 pivotCaches CT_PivotCaches ? */\n\t\t\tcase '<pivotCaches>': case '</pivotCaches>': case '<pivotCaches': break;\n\t\t\t/* 18.2.17 pivotCache CT_PivotCache ? */\n\t\t\tcase '<pivotCache': break;\n\n\t\t\t/* 18.2.21 smartTagPr CT_SmartTagPr ? */\n\t\t\tcase '<smartTagPr': case '<smartTagPr/>': break;\n\n\t\t\t/* 18.2.23 smartTagTypes CT_SmartTagTypes ? */\n\t\t\tcase '<smartTagTypes': case '<smartTagTypes>': case '</smartTagTypes>': break;\n\t\t\t/* 18.2.22 smartTagType CT_SmartTagType ? */\n\t\t\tcase '<smartTagType': break;\n\n\t\t\t/* 18.2.24 webPublishing CT_WebPublishing ? */\n\t\t\tcase '<webPublishing': case '<webPublishing/>': break;\n\n\t\t\t/* 18.2.11 fileRecoveryPr CT_FileRecoveryPr ? */\n\t\t\tcase '<fileRecoveryPr': case '<fileRecoveryPr/>': break;\n\n\t\t\t/* 18.2.26 webPublishObjects CT_WebPublishObjects ? */\n\t\t\tcase '<webPublishObjects>': case '<webPublishObjects': case '</webPublishObjects>': break;\n\t\t\t/* 18.2.25 webPublishObject CT_WebPublishObject ? */\n\t\t\tcase '<webPublishObject': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '<extLst': case '<extLst>': case '</extLst>': case '<extLst/>': break;\n\t\t\t/* 18.2.7  ext CT_Extension + */\n\t\t\tcase '<ext': pass=true; break; //TODO: check with versions of excel\n\t\t\tcase '</ext>': pass=false; break;\n\n\t\t\t/* Others */\n\t\t\tcase '<ArchID': break;\n\t\t\tcase '<AlternateContent':\n\t\t\tcase '<AlternateContent>': pass=true; break;\n\t\t\tcase '</AlternateContent>': pass=false; break;\n\n\t\t\t/* TODO */\n\t\t\tcase '<revisionPtr': break;\n\n\t\t\tdefault: if(!pass && opts.WTF) throw new Error('unrecognized ' + y[0] + ' in workbook');\n\t\t}\n\t\treturn x;\n\t});\n\tif(XMLNS_main.indexOf(wb.xmlns) === -1) throw new Error(\"Unknown Namespace: \" + wb.xmlns);\n\n\tparse_wb_defaults(wb);\n\n\treturn wb;\n}\n\nfunction write_wb_xml(wb/*:Workbook*//*::, opts:?WriteOpts*/)/*:string*/ {\n\tvar o = [XML_HEADER];\n\to[o.length] = writextag('workbook', null, {\n\t\t'xmlns': XMLNS_main[0],\n\t\t//'xmlns:mx': XMLNS.mx,\n\t\t//'xmlns:s': XMLNS_main[0],\n\t\t'xmlns:r': XMLNS.r\n\t});\n\n\tvar write_names = (wb.Workbook && (wb.Workbook.Names||[]).length > 0);\n\n\t/* fileVersion */\n\t/* fileSharing */\n\n\tvar workbookPr/*:any*/ = ({codeName:\"ThisWorkbook\"}/*:any*/);\n\tif(wb.Workbook && wb.Workbook.WBProps) {\n\t\tWBPropsDef.forEach(function(x) {\n\t\t\t/*:: if(!wb.Workbook || !wb.Workbook.WBProps) throw \"unreachable\"; */\n\t\t\tif((wb.Workbook.WBProps[x[0]]/*:any*/) == null) return;\n\t\t\tif((wb.Workbook.WBProps[x[0]]/*:any*/) == x[1]) return;\n\t\t\tworkbookPr[x[0]] = (wb.Workbook.WBProps[x[0]]/*:any*/);\n\t\t});\n\t\t/*:: if(!wb.Workbook || !wb.Workbook.WBProps) throw \"unreachable\"; */\n\t\tif(wb.Workbook.WBProps.CodeName) { workbookPr.codeName = wb.Workbook.WBProps.CodeName; delete workbookPr.CodeName; }\n\t}\n\to[o.length] = (writextag('workbookPr', null, workbookPr));\n\n\t/* workbookProtection */\n\n\tvar sheets = wb.Workbook && wb.Workbook.Sheets || [];\n\tvar i = 0;\n\n\t/* bookViews only written if first worksheet is hidden */\n\tif(sheets && sheets[0] && !!sheets[0].Hidden) {\n\t\to[o.length] = \"<bookViews>\";\n\t\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\t\tif(!sheets[i]) break;\n\t\t\tif(!sheets[i].Hidden) break;\n\t\t}\n\t\tif(i == wb.SheetNames.length) i = 0;\n\t\to[o.length] = '<workbookView firstSheet=\"' + i + '\" activeTab=\"' + i + '\"/>';\n\t\to[o.length] = \"</bookViews>\";\n\t}\n\n\to[o.length] = \"<sheets>\";\n\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\tvar sht = ({name:escapexml(wb.SheetNames[i].slice(0,31))}/*:any*/);\n\t\tsht.sheetId = \"\"+(i+1);\n\t\tsht[\"r:id\"] = \"rId\"+(i+1);\n\t\tif(sheets[i]) switch(sheets[i].Hidden) {\n\t\t\tcase 1: sht.state = \"hidden\"; break;\n\t\t\tcase 2: sht.state = \"veryHidden\"; break;\n\t\t}\n\t\to[o.length] = (writextag('sheet',null,sht));\n\t}\n\to[o.length] = \"</sheets>\";\n\n\t/* functionGroups */\n\t/* externalReferences */\n\n\tif(write_names) {\n\t\to[o.length] = \"<definedNames>\";\n\t\tif(wb.Workbook && wb.Workbook.Names) wb.Workbook.Names.forEach(function(n) {\n\t\t\tvar d/*:any*/ = {name:n.Name};\n\t\t\tif(n.Comment) d.comment = n.Comment;\n\t\t\tif(n.Sheet != null) d.localSheetId = \"\"+n.Sheet;\n\t\t\tif(n.Hidden) d.hidden = \"1\";\n\t\t\tif(!n.Ref) return;\n\t\t\to[o.length] = writextag('definedName', escapexml(n.Ref), d);\n\t\t});\n\t\to[o.length] = \"</definedNames>\";\n\t}\n\n\t/* calcPr */\n\t/* oleSize */\n\t/* customWorkbookViews */\n\t/* pivotCaches */\n\t/* smartTagPr */\n\t/* smartTagTypes */\n\t/* webPublishing */\n\t/* fileRecoveryPr */\n\t/* webPublishObjects */\n\t/* extLst */\n\n\tif(o.length>2){ o[o.length] = '</workbook>'; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.304 BrtBundleSh */\nfunction parse_BrtBundleSh(data, length/*:number*/) {\n\tvar z = {};\n\tz.Hidden = data.read_shift(4); //hsState ST_SheetState\n\tz.iTabID = data.read_shift(4);\n\tz.strRelID = parse_RelID(data,length-8);\n\tz.name = parse_XLWideString(data);\n\treturn z;\n}\nfunction write_BrtBundleSh(data, o) {\n\tif(!o) o = new_buf(127);\n\to.write_shift(4, data.Hidden);\n\to.write_shift(4, data.iTabID);\n\twrite_RelID(data.strRelID, o);\n\twrite_XLWideString(data.name.slice(0,31), o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.815 BrtWbProp */\nfunction parse_BrtWbProp(data, length)/*:WBProps*/ {\n\tvar o/*:WBProps*/ = ({}/*:any*/);\n\tvar flags = data.read_shift(4);\n\to.defaultThemeVersion = data.read_shift(4);\n\tvar strName = (length > 8) ? parse_XLWideString(data) : \"\";\n\tif(strName.length > 0) o.CodeName = strName;\n\to.autoCompressPictures = !!(flags & 0x10000);\n\to.backupFile = !!(flags & 0x40);\n\to.checkCompatibility = !!(flags & 0x1000);\n\to.date1904 = !!(flags & 0x01);\n\to.filterPrivacy = !!(flags & 0x08);\n\to.hidePivotFieldList = !!(flags & 0x400);\n\to.promptedSolutions = !!(flags & 0x10);\n\to.publishItems = !!(flags & 0x800);\n\to.refreshAllConnections = !!(flags & 0x40000);\n\to.saveExternalLinkValues = !!(flags & 0x80);\n\to.showBorderUnselectedTables = !!(flags & 0x04);\n\to.showInkAnnotation = !!(flags & 0x20);\n\to.showObjects = [\"all\", \"placeholders\", \"none\"][(flags >> 13) & 0x03];\n\to.showPivotChartFilter = !!(flags & 0x8000);\n\to.updateLinks = [\"userSet\", \"never\", \"always\"][(flags >> 8) & 0x03];\n\treturn o;\n}\nfunction write_BrtWbProp(data/*:?WBProps*/, o) {\n\tif(!o) o = new_buf(72);\n\tvar flags = 0;\n\tif(data) {\n\t\t/* TODO: mirror parse_BrtWbProp fields */\n\t\tif(data.filterPrivacy) flags |= 0x08;\n\t}\n\to.write_shift(4, flags);\n\to.write_shift(4, 0);\n\twrite_XLSBCodeName(data && data.CodeName || \"ThisWorkbook\", o);\n\treturn o.slice(0, o.l);\n}\n\nfunction parse_BrtFRTArchID$(data, length) {\n\tvar o = {};\n\tdata.read_shift(4);\n\to.ArchID = data.read_shift(4);\n\tdata.l += length - 8;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.687 BrtName */\nfunction parse_BrtName(data, length, opts) {\n\tvar end = data.l + length;\n\tdata.l += 4; //var flags = data.read_shift(4);\n\tdata.l += 1; //var chKey = data.read_shift(1);\n\tvar itab = data.read_shift(4);\n\tvar name = parse_XLNameWideString(data);\n\tvar formula = parse_XLSBNameParsedFormula(data, 0, opts);\n\tvar comment = parse_XLNullableWideString(data);\n\t//if(0 /* fProc */) {\n\t\t// unusedstring1: XLNullableWideString\n\t\t// description: XLNullableWideString\n\t\t// helpTopic: XLNullableWideString\n\t\t// unusedstring2: XLNullableWideString\n\t//}\n\tdata.l = end;\n\tvar out = ({Name:name, Ptg:formula}/*:any*/);\n\tif(itab < 0xFFFFFFF) out.Sheet = itab;\n\tif(comment) out.Comment = comment;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction parse_wb_bin(data, opts)/*:WorkbookFile*/ {\n\tvar wb = { AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, xmlns: \"\" };\n\tvar state/*:Array<string>*/ = [];\n\tvar pass = false;\n\n\tif(!opts) opts = {};\n\topts.biff = 12;\n\n\tvar Names = [];\n\tvar supbooks = ([[]]/*:any*/);\n\tsupbooks.SheetNames = [];\n\tsupbooks.XTI = [];\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtFRTArchID$\", f:parse_BrtFRTArchID$ };\n\n\trecordhopper(data, function hopper_wb(val, R, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009C: /* 'BrtBundleSh' */\n\t\t\t\tsupbooks.SheetNames.push(val.name);\n\t\t\t\twb.Sheets.push(val); break;\n\n\t\t\tcase 0x0099: /* 'BrtWbProp' */\n\t\t\t\twb.WBProps = val; break;\n\n\t\t\tcase 0x0027: /* 'BrtName' */\n\t\t\t\tif(val.Sheet != null) opts.SID = val.Sheet;\n\t\t\t\tval.Ref = stringify_formula(val.Ptg, null, null, supbooks, opts);\n\t\t\t\tdelete opts.SID;\n\t\t\t\tdelete val.Ptg;\n\t\t\t\tNames.push(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x040C: /* 'BrtNameExt' */ break;\n\n\t\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\tcase 0x029B: /* 'BrtSupAddin' */\n\t\t\t\tif(!supbooks[0].length) supbooks[0] = [RT, val];\n\t\t\t\telse supbooks.push([RT, val]);\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = [];\n\t\t\t\tbreak;\n\t\t\tcase 0x016A: /* 'BrtExternSheet' */\n\t\t\t\tif(supbooks.length === 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val);\n\t\t\t\tsupbooks.XTI = supbooks.XTI.concat(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x0169: /* 'BrtPlaceholderName' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0817: /* 'BrtAbsPath15' */\n\t\t\tcase 0x009E: /* 'BrtBookView' */\n\t\t\tcase 0x008F: /* 'BrtBeginBundleShs' */\n\t\t\tcase 0x0298: /* 'BrtBeginFnGroup' */\n\t\t\tcase 0x0161: /* 'BrtBeginExternals' */\n\t\t\t\tbreak;\n\n\t\t\t/* case 'BrtModelTimeGroupingCalcCol' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0C01: /* 'BrtRevisionPtr' */\n\t\t\tcase 0x0216: /* 'BrtBookProtection' */\n\t\t\tcase 0x02A5: /* 'BrtBookProtectionIso' */\n\t\t\tcase 0x009D: /* 'BrtCalcProp' */\n\t\t\tcase 0x0262: /* 'BrtCrashRecErr' */\n\t\t\tcase 0x0802: /* 'BrtDecoupledPivotCacheID' */\n\t\t\tcase 0x009B: /* 'BrtFileRecover' */\n\t\t\tcase 0x0224: /* 'BrtFileSharing' */\n\t\t\tcase 0x02A4: /* 'BrtFileSharingIso' */\n\t\t\tcase 0x0080: /* 'BrtFileVersion' */\n\t\t\tcase 0x0299: /* 'BrtFnGroup' */\n\t\t\tcase 0x0850: /* 'BrtModelRelationship' */\n\t\t\tcase 0x084D: /* 'BrtModelTable' */\n\t\t\tcase 0x0225: /* 'BrtOleSize' */\n\t\t\tcase 0x0805: /* 'BrtPivotTableRef' */\n\t\t\tcase 0x0254: /* 'BrtSmartTagType' */\n\t\t\tcase 0x081C: /* 'BrtTableSlicerCacheID' */\n\t\t\tcase 0x081B: /* 'BrtTableSlicerCacheIDs' */\n\t\t\tcase 0x0822: /* 'BrtTimelineCachePivotCacheID' */\n\t\t\tcase 0x018D: /* 'BrtUserBookView' */\n\t\t\tcase 0x009A: /* 'BrtWbFactoid' */\n\t\t\tcase 0x045D: /* 'BrtWbProp14' */\n\t\t\tcase 0x0229: /* 'BrtWebOpt' */\n\t\t\tcase 0x082B: /* 'BrtWorkBookPr15' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(RT); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tcase 0x0010: /* 'BrtFRTArchID$' */ break;\n\n\t\t\tdefault:\n\t\t\t\tif(R.T){/* empty */}\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != 0x0025 /* BrtACBegin */ && state[state.length-1] != 0x0023 /* BrtFRTBegin */)) throw new Error(\"Unexpected record 0x\" + RT.toString(16));\n\t\t}\n\t}, opts);\n\n\tparse_wb_defaults(wb);\n\n\t// $FlowIgnore\n\twb.Names = Names;\n\n\t(wb/*:any*/).supbooks = supbooks;\n\treturn wb;\n}\n\nfunction write_BUNDLESHS(ba, wb/*::, opts*/) {\n\twrite_record(ba, 0x008F /* BrtBeginBundleShs */);\n\tfor(var idx = 0; idx != wb.SheetNames.length; ++idx) {\n\t\tvar viz = wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx] && wb.Workbook.Sheets[idx].Hidden || 0;\n\t\tvar d = { Hidden: viz, iTabID: idx+1, strRelID: 'rId' + (idx+1), name: wb.SheetNames[idx] };\n\t\twrite_record(ba, 0x009C /* BrtBundleSh */, write_BrtBundleSh(d));\n\t}\n\twrite_record(ba, 0x0090 /* BrtEndBundleShs */);\n}\n\n/* [MS-XLSB] 2.4.649 BrtFileVersion */\nfunction write_BrtFileVersion(data, o) {\n\tif(!o) o = new_buf(127);\n\tfor(var i = 0; i != 4; ++i) o.write_shift(4, 0);\n\twrite_XLWideString(\"SheetJS\", o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(\"7262\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.301 BrtBookView */\nfunction write_BrtBookView(idx, o) {\n\tif(!o) o = new_buf(29);\n\to.write_shift(-4, 0);\n\to.write_shift(-4, 460);\n\to.write_shift(4,  28800);\n\to.write_shift(4,  17600);\n\to.write_shift(4,  500);\n\to.write_shift(4,  idx);\n\to.write_shift(4,  idx);\n\tvar flags = 0x78;\n\to.write_shift(1,  flags);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\nfunction write_BOOKVIEWS(ba, wb/*::, opts*/) {\n\t/* required if hidden tab appears before visible tab */\n\tif(!wb.Workbook || !wb.Workbook.Sheets) return;\n\tvar sheets = wb.Workbook.Sheets;\n\tvar i = 0, vistab = -1, hidden = -1;\n\tfor(; i < sheets.length; ++i) {\n\t\tif(!sheets[i] || !sheets[i].Hidden && vistab == -1) vistab = i;\n\t\telse if(sheets[i].Hidden == 1 && hidden == -1) hidden = i;\n\t}\n\tif(hidden > vistab) return;\n\twrite_record(ba, 0x0087 /* BrtBeginBookViews */);\n\twrite_record(ba, 0x009E /* BrtBookView */, write_BrtBookView(vistab));\n\t/* 1*(BrtBookView *FRT) */\n\twrite_record(ba, 0x0088 /* BrtEndBookViews */);\n}\n\n/* [MS-XLSB] 2.4.305 BrtCalcProp */\n/*function write_BrtCalcProp(data, o) {\n\tif(!o) o = new_buf(26);\n\to.write_shift(4,0); // force recalc\n\to.write_shift(4,1);\n\to.write_shift(4,0);\n\twrite_Xnum(0, o);\n\to.write_shift(-4, 1023);\n\to.write_shift(1, 0x33);\n\to.write_shift(1, 0x00);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.4.646 BrtFileRecover */\n/*function write_BrtFileRecover(data, o) {\n\tif(!o) o = new_buf(1);\n\to.write_shift(1,0);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction write_wb_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, 0x0083 /* BrtBeginBook */);\n\twrite_record(ba, 0x0080 /* BrtFileVersion */, write_BrtFileVersion());\n\t/* [[BrtFileSharingIso] BrtFileSharing] */\n\twrite_record(ba, 0x0099 /* BrtWbProp */, write_BrtWbProp(wb.Workbook && wb.Workbook.WBProps || null));\n\t/* [ACABSPATH] */\n\t/* [[BrtBookProtectionIso] BrtBookProtection] */\n\twrite_BOOKVIEWS(ba, wb, opts);\n\twrite_BUNDLESHS(ba, wb, opts);\n\t/* [FNGROUP] */\n\t/* [EXTERNALS] */\n\t/* *BrtName */\n\t/* write_record(ba, 0x009D BrtCalcProp, write_BrtCalcProp()); */\n\t/* [BrtOleSize] */\n\t/* *(BrtUserBookView *FRT) */\n\t/* [PIVOTCACHEIDS] */\n\t/* [BrtWbFactoid] */\n\t/* [SMARTTAGTYPES] */\n\t/* [BrtWebOpt] */\n\t/* write_record(ba, 0x009B BrtFileRecover, write_BrtFileRecover()); */\n\t/* [WEBPUBITEMS] */\n\t/* [CRERRS] */\n\t/* FRTWORKBOOK */\n\twrite_record(ba, 0x0084 /* BrtEndBook */);\n\n\treturn ba.end();\n}\nfunction parse_wb(data, name/*:string*/, opts)/*:WorkbookFile*/ {\n\tif(name.slice(-4)===\".bin\") return parse_wb_bin((data/*:any*/), opts);\n\treturn parse_wb_xml((data/*:any*/), opts);\n}\n\nfunction parse_ws(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ws_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ws_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_cs(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_cs_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_cs_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ms(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ms_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ms_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ds(data, name/*:string*/, idx/*:number*/, opts, rels, wb, themes, styles)/*:Worksheet*/ {\n\tif(name.slice(-4)===\".bin\") return parse_ds_bin((data/*:any*/), opts, idx, rels, wb, themes, styles);\n\treturn parse_ds_xml((data/*:any*/), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_sty(data, name/*:string*/, themes, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_sty_bin((data/*:any*/), themes, opts);\n\treturn parse_sty_xml((data/*:any*/), themes, opts);\n}\n\nfunction parse_theme(data/*:string*/, name/*:string*/, opts) {\n\treturn parse_theme_xml(data, opts);\n}\n\nfunction parse_sst(data, name/*:string*/, opts)/*:SST*/ {\n\tif(name.slice(-4)===\".bin\") return parse_sst_bin((data/*:any*/), opts);\n\treturn parse_sst_xml((data/*:any*/), opts);\n}\n\nfunction parse_cmnt(data, name/*:string*/, opts)/*:Array<RawComment>*/ {\n\tif(name.slice(-4)===\".bin\") return parse_comments_bin((data/*:any*/), opts);\n\treturn parse_comments_xml((data/*:any*/), opts);\n}\n\nfunction parse_cc(data, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_cc_bin((data/*:any*/), name, opts);\n\treturn parse_cc_xml((data/*:any*/), name, opts);\n}\n\nfunction parse_xlink(data, rel, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_xlink_bin((data/*:any*/), rel, name, opts);\n\treturn parse_xlink_xml((data/*:any*/), rel, name, opts);\n}\n\nfunction parse_xlmeta(data, name/*:string*/, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_xlmeta_bin((data/*:any*/), name, opts);\n\treturn parse_xlmeta_xml((data/*:any*/), name, opts);\n}\n\nfunction write_wb(wb, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_wb_bin : write_wb_xml)(wb, opts);\n}\n\nfunction write_ws(data/*:number*/, name/*:string*/, opts, wb/*:Workbook*/, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_ws_bin : write_ws_xml)(data, opts, wb, rels);\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction write_cs(data/*:number*/, name/*:string*/, opts, wb/*:Workbook*/, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_cs_bin : write_cs_xml)(data, opts, wb, rels);\n}\n\nfunction write_sty(data, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sty_bin : write_sty_xml)(data, opts);\n}\n\nfunction write_sst(data/*:SST*/, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sst_bin : write_sst_xml)(data, opts);\n}\n\nfunction write_cmnt(data/*:Array<any>*/, name/*:string*/, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_comments_bin : write_comments_xml)(data, opts);\n}\n/*\nfunction write_cc(data, name:string, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_cc_bin : write_cc_xml)(data, opts);\n}\n*/\n\nfunction write_xlmeta(name/*:string*/) {\n\treturn (name.slice(-4)===\".bin\" ? write_xlmeta_bin : write_xlmeta_xml)();\n}\nvar attregexg2=/([\\w:]+)=((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:'))/g;\nvar attregex2=/([\\w:]+)=((?:\")(?:[^\"]*)(?:\")|(?:')(?:[^']*)(?:'))/;\nfunction xlml_parsexmltag(tag/*:string*/, skip_root/*:?boolean*/) {\n\tvar words = tag.split(/\\s+/);\n\tvar z/*:any*/ = ([]/*:any*/); if(!skip_root) z[0] = words[0];\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\n/*:: if(!y || !y[2]) continue; */\n\t\tif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\nfunction xlml_parsexmltagobj(tag/*:string*/) {\n\tvar words = tag.split(/\\s+/);\n\tvar z = {};\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\n/*:: if(!y || !y[2]) continue; */\n\t\tif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\n\n// ----\n\n/* map from xlml named formats to SSF TODO: localize */\nvar XLMLFormatMap/*: {[string]:string}*/;\n\nfunction xlml_format(format, value)/*:string*/ {\n\tvar fmt = XLMLFormatMap[format] || unescapexml(format);\n\tif(fmt === \"General\") return SSF_general(value);\n\treturn SSF_format(fmt, value);\n}\n\nfunction xlml_set_custprop(Custprops, key, cp, val/*:string*/) {\n\tvar oval/*:any*/ = val;\n\tswitch((cp[0].match(/dt:dt=\"([\\w.]+)\"/)||[\"\",\"\"])[1]) {\n\t\tcase \"boolean\": oval = parsexmlbool(val); break;\n\t\tcase \"i2\": case \"int\": oval = parseInt(val, 10); break;\n\t\tcase \"r4\": case \"float\": oval = parseFloat(val); break;\n\t\tcase \"date\": case \"dateTime.tz\": oval = parseDate(val); break;\n\t\tcase \"i8\": case \"string\": case \"fixed\": case \"uuid\": case \"bin.base64\": break;\n\t\tdefault: throw new Error(\"bad custprop:\" + cp[0]);\n\t}\n\tCustprops[unescapexml(key)] = oval;\n}\n\nfunction safe_format_xlml(cell/*:Cell*/, nf, o) {\n\tif(cell.t === 'z') return;\n\tif(!o || o.cellText !== false) try {\n\t\tif(cell.t === 'e') { cell.w = cell.w || BErr[cell.v]; }\n\t\telse if(nf === \"General\") {\n\t\t\tif(cell.t === 'n') {\n\t\t\t\tif((cell.v|0) === cell.v) cell.w = cell.v.toString(10);\n\t\t\t\telse cell.w = SSF_general_num(cell.v);\n\t\t\t}\n\t\t\telse cell.w = SSF_general(cell.v);\n\t\t}\n\t\telse cell.w = xlml_format(nf||\"General\", cell.v);\n\t} catch(e) { if(o.WTF) throw e; }\n\ttry {\n\t\tvar z = XLMLFormatMap[nf]||nf||\"General\";\n\t\tif(o.cellNF) cell.z = z;\n\t\tif(o.cellDates && cell.t == 'n' && fmt_is_date(z)) {\n\t\t\tvar _d = SSF_parse_date_code(cell.v); if(_d) { cell.t = 'd'; cell.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t}\n\t} catch(e) { if(o.WTF) throw e; }\n}\n\nfunction process_style_xlml(styles, stag, opts) {\n\tif(opts.cellStyles) {\n\t\tif(stag.Interior) {\n\t\t\tvar I = stag.Interior;\n\t\t\tif(I.Pattern) I.patternType = XLMLPatternTypeMap[I.Pattern] || I.Pattern;\n\t\t}\n\t}\n\tstyles[stag.ID] = stag;\n}\n\n/* TODO: there must exist some form of OSP-blessed spec */\nfunction parse_xlml_data(xml, ss, data, cell/*:any*/, base, styles, csty, row, arrayf, o) {\n\tvar nf = \"General\", sid = cell.StyleID, S = {}; o = o || {};\n\tvar interiors = [];\n\tvar i = 0;\n\tif(sid === undefined && row) sid = row.StyleID;\n\tif(sid === undefined && csty) sid = csty.StyleID;\n\twhile(styles[sid] !== undefined) {\n\t\tif(styles[sid].nf) nf = styles[sid].nf;\n\t\tif(styles[sid].Interior) interiors.push(styles[sid].Interior);\n\t\tif(!styles[sid].Parent) break;\n\t\tsid = styles[sid].Parent;\n\t}\n\tswitch(data.Type) {\n\t\tcase 'Boolean':\n\t\t\tcell.t = 'b';\n\t\t\tcell.v = parsexmlbool(xml);\n\t\t\tbreak;\n\t\tcase 'String':\n\t\t\tcell.t = 's'; cell.r = xlml_fixstr(unescapexml(xml));\n\t\t\tcell.v = (xml.indexOf(\"<\") > -1 ? unescapexml(ss||xml).replace(/<.*?>/g, \"\") : cell.r); // todo: BR etc\n\t\t\tbreak;\n\t\tcase 'DateTime':\n\t\t\tif(xml.slice(-1) != \"Z\") xml += \"Z\";\n\t\t\tcell.v = (parseDate(xml) - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);\n\t\t\tif(cell.v !== cell.v) cell.v = unescapexml(xml);\n\t\t\telse if(cell.v<60) cell.v = cell.v -1;\n\t\t\tif(!nf || nf == \"General\") nf = \"yyyy-mm-dd\";\n\t\t\t/* falls through */\n\t\tcase 'Number':\n\t\t\tif(cell.v === undefined) cell.v=+xml;\n\t\t\tif(!cell.t) cell.t = 'n';\n\t\t\tbreak;\n\t\tcase 'Error': cell.t = 'e'; cell.v = RBErr[xml]; if(o.cellText !== false) cell.w = xml; break;\n\t\tdefault:\n\t\t\tif(xml == \"\" && ss == \"\") { cell.t = 'z'; }\n\t\t\telse { cell.t = 's'; cell.v = xlml_fixstr(ss||xml); }\n\t\t\tbreak;\n\t}\n\tsafe_format_xlml(cell, nf, o);\n\tif(o.cellFormula !== false) {\n\t\tif(cell.Formula) {\n\t\t\tvar fstr = unescapexml(cell.Formula);\n\t\t\t/* strictly speaking, the leading = is required but some writers omit */\n\t\t\tif(fstr.charCodeAt(0) == 61 /* = */) fstr = fstr.slice(1);\n\t\t\tcell.f = rc_to_a1(fstr, base);\n\t\t\tdelete cell.Formula;\n\t\t\tif(cell.ArrayRange == \"RC\") cell.F = rc_to_a1(\"RC:RC\", base);\n\t\t\telse if(cell.ArrayRange) {\n\t\t\t\tcell.F = rc_to_a1(cell.ArrayRange, base);\n\t\t\t\tarrayf.push([safe_decode_range(cell.F), cell.F]);\n\t\t\t}\n\t\t} else {\n\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\tif(base.r >= arrayf[i][0].s.r && base.r <= arrayf[i][0].e.r)\n\t\t\t\t\tif(base.c >= arrayf[i][0].s.c && base.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\tcell.F = arrayf[i][1];\n\t\t}\n\t}\n\tif(o.cellStyles) {\n\t\tinteriors.forEach(function(x) {\n\t\t\tif(!S.patternType && x.patternType) S.patternType = x.patternType;\n\t\t});\n\t\tcell.s = S;\n\t}\n\tif(cell.StyleID !== undefined) cell.ixfe = cell.StyleID;\n}\n\nfunction xlml_clean_comment(comment/*:any*/) {\n\tcomment.t = comment.v || \"\";\n\tcomment.t = comment.t.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\tcomment.v = comment.w = comment.ixfe = undefined;\n}\n\n/* TODO: Everything */\nfunction parse_xlml_xml(d, _opts)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tmake_ssf();\n\tvar str = debom(xlml_normalize(d));\n\tif(opts.type == 'binary' || opts.type == 'array' || opts.type == 'base64') {\n\t\tif(typeof $cptable !== 'undefined') str = $cptable.utils.decode(65001, char_codes(str));\n\t\telse str = utf8read(str);\n\t}\n\tvar opening = str.slice(0, 1024).toLowerCase(), ishtml = false;\n\topening = opening.replace(/\".*?\"/g, \"\");\n\tif((opening.indexOf(\">\") & 1023) > Math.min((opening.indexOf(\",\") & 1023), (opening.indexOf(\";\")&1023))) { var _o = dup(opts); _o.type = \"string\"; return PRN.to_workbook(str, _o); }\n\tif(opening.indexOf(\"<?xml\") == -1) [\"html\", \"table\", \"head\", \"meta\", \"script\", \"style\", \"div\"].forEach(function(tag) { if(opening.indexOf(\"<\" + tag) >= 0) ishtml = true; });\n\tif(ishtml) return html_to_workbook(str, opts);\n\n\tXLMLFormatMap = ({\n\t\t\"General Number\": \"General\",\n\t\t\"General Date\": table_fmt[22],\n\t\t\"Long Date\": \"dddd, mmmm dd, yyyy\",\n\t\t\"Medium Date\": table_fmt[15],\n\t\t\"Short Date\": table_fmt[14],\n\t\t\"Long Time\": table_fmt[19],\n\t\t\"Medium Time\": table_fmt[18],\n\t\t\"Short Time\": table_fmt[20],\n\t\t\"Currency\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\t\"Fixed\": table_fmt[2],\n\t\t\"Standard\": table_fmt[4],\n\t\t\"Percent\": table_fmt[10],\n\t\t\"Scientific\": table_fmt[11],\n\t\t\"Yes/No\": '\"Yes\";\"Yes\";\"No\";@',\n\t\t\"True/False\": '\"True\";\"True\";\"False\";@',\n\t\t\"On/Off\": '\"Yes\";\"Yes\";\"No\";@'\n\t}/*:any*/);\n\n\n\tvar Rn;\n\tvar state = [], tmp;\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar sheets = {}, sheetnames/*:Array<string>*/ = [], cursheet/*:Worksheet*/ = (opts.dense ? [] : {}), sheetname = \"\";\n\tvar cell = ({}/*:any*/), row = {};// eslint-disable-line no-unused-vars\n\tvar dtag = xlml_parsexmltag('<Data ss:Type=\"String\">'), didx = 0;\n\tvar c = 0, r = 0;\n\tvar refguess/*:Range*/ = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\tvar styles = {}, stag = {};\n\tvar ss = \"\", fidx = 0;\n\tvar merges/*:Array<Range>*/ = [];\n\tvar Props = {}, Custprops = {}, pidx = 0, cp = [];\n\tvar comments/*:Array<Comment>*/ = [], comment/*:Comment*/ = ({}/*:any*/);\n\tvar cstys = [], csty, seencol = false;\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar rowinfo/*:Array<RowInfo>*/ = [], rowobj = {}, cc = 0, rr = 0;\n\tvar Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false} }/*:any*/), wsprops = {};\n\txlmlregex.lastIndex = 0;\n\tstr = str.replace(/<!--([\\s\\S]*?)-->/mg,\"\");\n\tvar raw_Rn3 = \"\";\n\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3] = (raw_Rn3 = Rn[3]).toLowerCase())) {\n\t\tcase 'data' /*case 'Data'*/:\n\t\t\tif(raw_Rn3 == \"data\") {\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(state[state.length-1][1]) break;\n\t\t\tif(Rn[1]==='/') parse_xlml_data(str.slice(didx, Rn.index), ss, dtag, state[state.length-1][0]==/*\"Comment\"*/\"comment\"?comment:cell, {c:c,r:r}, styles, cstys[c], row, arrayf, opts);\n\t\t\telse { ss = \"\"; dtag = xlml_parsexmltag(Rn[0]); didx = Rn.index + Rn[0].length; }\n\t\t\tbreak;\n\t\tcase 'cell' /*case 'Cell'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif(comments.length > 0) cell.c = comments;\n\t\t\t\tif((!opts.sheetRows || opts.sheetRows > r) && cell.v !== undefined) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!cursheet[r]) cursheet[r] = [];\n\t\t\t\t\t\tcursheet[r][c] = cell;\n\t\t\t\t\t} else cursheet[encode_col(c) + encode_row(r)] = cell;\n\t\t\t\t}\n\t\t\t\tif(cell.HRef) {\n\t\t\t\t\tcell.l = ({Target:unescapexml(cell.HRef)}/*:any*/);\n\t\t\t\t\tif(cell.HRefScreenTip) cell.l.Tooltip = cell.HRefScreenTip;\n\t\t\t\t\tdelete cell.HRef; delete cell.HRefScreenTip;\n\t\t\t\t}\n\t\t\t\tif(cell.MergeAcross || cell.MergeDown) {\n\t\t\t\t\tcc = c + (parseInt(cell.MergeAcross,10)|0);\n\t\t\t\t\trr = r + (parseInt(cell.MergeDown,10)|0);\n\t\t\t\t\tmerges.push({s:{c:c,r:r},e:{c:cc,r:rr}});\n\t\t\t\t}\n\t\t\t\tif(!opts.sheetStubs) { if(cell.MergeAcross) c = cc + 1; else ++c; }\n\t\t\t\telse if(cell.MergeAcross || cell.MergeDown) {\n\t\t\t\t\t/*:: if(!cc) cc = 0; if(!rr) rr = 0; */\n\t\t\t\t\tfor(var cma = c; cma <= cc; ++cma) {\n\t\t\t\t\t\tfor(var cmd = r; cmd <= rr; ++cmd) {\n\t\t\t\t\t\t\tif(cma > c || cmd > r) {\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!cursheet[cmd]) cursheet[cmd] = [];\n\t\t\t\t\t\t\t\t\tcursheet[cmd][cma] = {t:'z'};\n\t\t\t\t\t\t\t\t} else cursheet[encode_col(cma) + encode_row(cmd)] = {t:'z'};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tc = cc + 1;\n\t\t\t\t}\n\t\t\t\telse ++c;\n\t\t\t} else {\n\t\t\t\tcell = xlml_parsexmltagobj(Rn[0]);\n\t\t\t\tif(cell.Index) c = +cell.Index - 1;\n\t\t\t\tif(c < refguess.s.c) refguess.s.c = c;\n\t\t\t\tif(c > refguess.e.c) refguess.e.c = c;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") ++c;\n\t\t\t\tcomments = [];\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'row' /*case 'Row'*/:\n\t\t\tif(Rn[1]==='/' || Rn[0].slice(-2) === \"/>\") {\n\t\t\t\tif(r < refguess.s.r) refguess.s.r = r;\n\t\t\t\tif(r > refguess.e.r) refguess.e.r = r;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") {\n\t\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\t}\n\t\t\t\tc = 0; ++r;\n\t\t\t} else {\n\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\trowobj = {};\n\t\t\t\tif(row.AutoFitHeight == \"0\" || row.Height) {\n\t\t\t\t\trowobj.hpx = parseInt(row.Height, 10); rowobj.hpt = px2pt(rowobj.hpx);\n\t\t\t\t\trowinfo[r] = rowobj;\n\t\t\t\t}\n\t\t\t\tif(row.Hidden == \"1\") { rowobj.hidden = true; rowinfo[r] = rowobj; }\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'worksheet' /*case 'Worksheet'*/: /* TODO: read range from FullRows/FullColumns */\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\tsheetnames.push(sheetname);\n\t\t\t\tif(refguess.s.r <= refguess.e.r && refguess.s.c <= refguess.e.c) {\n\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows <= refguess.e.r) {\n\t\t\t\t\t\tcursheet[\"!fullref\"] = cursheet[\"!ref\"];\n\t\t\t\t\t\trefguess.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(merges.length) cursheet[\"!merges\"] = merges;\n\t\t\t\tif(cstys.length > 0) cursheet[\"!cols\"] = cstys;\n\t\t\t\tif(rowinfo.length > 0) cursheet[\"!rows\"] = rowinfo;\n\t\t\t\tsheets[sheetname] = cursheet;\n\t\t\t} else {\n\t\t\t\trefguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\t\t\t\tr = c = 0;\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tsheetname = unescapexml(tmp.Name);\n\t\t\t\tcursheet = (opts.dense ? [] : {});\n\t\t\t\tmerges = [];\n\t\t\t\tarrayf = [];\n\t\t\t\trowinfo = [];\n\t\t\t\twsprops = {name:sheetname, Hidden:0};\n\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'table' /*case 'Table'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].slice(-2) == \"/>\") break;\n\t\t\telse {\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\tcstys = []; seencol = false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'style' /*case 'Style'*/:\n\t\t\tif(Rn[1]==='/') process_style_xlml(styles, stag, opts);\n\t\t\telse stag = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\n\t\tcase 'numberformat' /*case 'NumberFormat'*/:\n\t\t\tstag.nf = unescapexml(xlml_parsexmltag(Rn[0]).Format || \"General\");\n\t\t\tif(XLMLFormatMap[stag.nf]) stag.nf = XLMLFormatMap[stag.nf];\n\t\t\tfor(var ssfidx = 0; ssfidx != 0x188; ++ssfidx) if(table_fmt[ssfidx] == stag.nf) break;\n\t\t\tif(ssfidx == 0x188) for(ssfidx = 0x39; ssfidx != 0x188; ++ssfidx) if(table_fmt[ssfidx] == null) { SSF_load(stag.nf, ssfidx); break; }\n\t\t\tbreak;\n\n\t\tcase 'column' /*case 'Column'*/:\n\t\t\tif(state[state.length-1][0] !== /*'Table'*/'table') break;\n\t\t\tcsty = xlml_parsexmltag(Rn[0]);\n\t\t\tif(csty.Hidden) { csty.hidden = true; delete csty.Hidden; }\n\t\t\tif(csty.Width) csty.wpx = parseInt(csty.Width, 10);\n\t\t\tif(!seencol && csty.wpx > 10) {\n\t\t\t\tseencol = true; MDW = DEF_MDW; //find_mdw_wpx(csty.wpx);\n\t\t\t\tfor(var _col = 0; _col < cstys.length; ++_col) if(cstys[_col]) process_col(cstys[_col]);\n\t\t\t}\n\t\t\tif(seencol) process_col(csty);\n\t\t\tcstys[(csty.Index-1||cstys.length)] = csty;\n\t\t\tfor(var i = 0; i < +csty.Span; ++i) cstys[cstys.length] = dup(csty);\n\t\t\tbreak;\n\n\t\tcase 'namedrange' /*case 'NamedRange'*/:\n\t\t\tif(Rn[1]==='/') break;\n\t\t\tif(!Workbook.Names) Workbook.Names = [];\n\t\t\tvar _NamedRange = parsexmltag(Rn[0]);\n\t\t\tvar _DefinedName/*:DefinedName*/ = ({\n\t\t\t\tName: _NamedRange.Name,\n\t\t\t\tRef: rc_to_a1(_NamedRange.RefersTo.slice(1), {r:0, c:0})\n\t\t\t}/*:any*/);\n\t\t\tif(Workbook.Sheets.length>0) _DefinedName.Sheet=Workbook.Sheets.length-1;\n\t\t\t/*:: if(Workbook.Names) */Workbook.Names.push(_DefinedName);\n\t\t\tbreak;\n\n\t\tcase 'namedcell' /*case 'NamedCell'*/: break;\n\t\tcase 'b' /*case 'B'*/: break;\n\t\tcase 'i' /*case 'I'*/: break;\n\t\tcase 'u' /*case 'U'*/: break;\n\t\tcase 's' /*case 'S'*/: break;\n\t\tcase 'em' /*case 'EM'*/: break;\n\t\tcase 'h2' /*case 'H2'*/: break;\n\t\tcase 'h3' /*case 'H3'*/: break;\n\t\tcase 'sub' /*case 'Sub'*/: break;\n\t\tcase 'sup' /*case 'Sup'*/: break;\n\t\tcase 'span' /*case 'Span'*/: break;\n\t\tcase 'alignment' /*case 'Alignment'*/:\n\t\t\tbreak;\n\t\tcase 'borders' /*case 'Borders'*/: break;\n\t\tcase 'border' /*case 'Border'*/: break;\n\t\tcase 'font' /*case 'Font'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") ss += str.slice(fidx, Rn.index);\n\t\t\telse fidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'interior' /*case 'Interior'*/:\n\t\t\tif(!opts.cellStyles) break;\n\t\t\tstag.Interior = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\t\tcase 'protection' /*case 'Protection'*/: break;\n\n\t\tcase 'author' /*case 'Author'*/:\n\t\tcase 'title' /*case 'Title'*/:\n\t\tcase 'description' /*case 'Description'*/:\n\t\tcase 'created' /*case 'Created'*/:\n\t\tcase 'keywords' /*case 'Keywords'*/:\n\t\tcase 'subject' /*case 'Subject'*/:\n\t\tcase 'category' /*case 'Category'*/:\n\t\tcase 'company' /*case 'Company'*/:\n\t\tcase 'lastauthor' /*case 'LastAuthor'*/:\n\t\tcase 'lastsaved' /*case 'LastSaved'*/:\n\t\tcase 'lastprinted' /*case 'LastPrinted'*/:\n\t\tcase 'version' /*case 'Version'*/:\n\t\tcase 'revision' /*case 'Revision'*/:\n\t\tcase 'totaltime' /*case 'TotalTime'*/:\n\t\tcase 'hyperlinkbase' /*case 'HyperlinkBase'*/:\n\t\tcase 'manager' /*case 'Manager'*/:\n\t\tcase 'contentstatus' /*case 'ContentStatus'*/:\n\t\tcase 'identifier' /*case 'Identifier'*/:\n\t\tcase 'language' /*case 'Language'*/:\n\t\tcase 'appname' /*case 'AppName'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") xlml_set_prop(Props, raw_Rn3, str.slice(pidx, Rn.index));\n\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'paragraphs' /*case 'Paragraphs'*/: break;\n\n\t\tcase 'styles' /*case 'Styles'*/:\n\t\tcase 'workbook' /*case 'Workbook'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse state.push([Rn[3], false]);\n\t\t\tbreak;\n\n\t\tcase 'comment' /*case 'Comment'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\txlml_clean_comment(comment);\n\t\t\t\tcomments.push(comment);\n\t\t\t} else {\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcomment = ({a:tmp.Author}/*:any*/);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'autofilter' /*case 'AutoFilter'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\tvar AutoFilter = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcursheet['!autofilter'] = { ref:rc_to_a1(AutoFilter.Range).replace(/\\$/g,\"\") };\n\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'name' /*case 'Name'*/: break;\n\n\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t} else {\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'pixelsperinch' /*case 'PixelsPerInch'*/:\n\t\t\tbreak;\n\t\tcase 'componentoptions' /*case 'ComponentOptions'*/:\n\t\tcase 'documentproperties' /*case 'DocumentProperties'*/:\n\t\tcase 'customdocumentproperties' /*case 'CustomDocumentProperties'*/:\n\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/:\n\t\tcase 'pivottable' /*case 'PivotTable'*/:\n\t\tcase 'pivotcache' /*case 'PivotCache'*/:\n\t\tcase 'names' /*case 'Names'*/:\n\t\tcase 'mapinfo' /*case 'MapInfo'*/:\n\t\tcase 'pagebreaks' /*case 'PageBreaks'*/:\n\t\tcase 'querytable' /*case 'QueryTable'*/:\n\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\tcase 'schema' /*case 'Schema'*/: //case 'data' /*case 'data'*/:\n\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\tcase 'smarttagtype' /*case 'SmartTagType'*/:\n\t\tcase 'smarttags' /*case 'SmartTags'*/:\n\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/:\n\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/:\n\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\tbreak;\n\n\t\tcase 'null' /*case 'Null'*/: break;\n\n\t\tdefault:\n\t\t\t/* FODS file root is <office:document> */\n\t\t\tif(state.length == 0 && Rn[3] == \"document\") return parse_fods(str, opts);\n\t\t\t/* UOS file root is <uof:UOF> */\n\t\t\tif(state.length == 0 && Rn[3] == \"uof\"/*\"UOF\"*/) return parse_fods(str, opts);\n\n\t\t\tvar seen = true;\n\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t/* OfficeDocumentSettings */\n\t\t\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'allowpng' /*case 'AllowPNG'*/: break;\n\t\t\t\t\tcase 'removepersonalinformation' /*case 'RemovePersonalInformation'*/: break;\n\t\t\t\t\tcase 'downloadcomponents' /*case 'DownloadComponents'*/: break;\n\t\t\t\t\tcase 'locationofcomponents' /*case 'LocationOfComponents'*/: break;\n\t\t\t\t\tcase 'colors' /*case 'Colors'*/: break;\n\t\t\t\t\tcase 'color' /*case 'Color'*/: break;\n\t\t\t\t\tcase 'index' /*case 'Index'*/: break;\n\t\t\t\t\tcase 'rgb' /*case 'RGB'*/: break;\n\t\t\t\t\tcase 'targetscreensize' /*case 'TargetScreenSize'*/: break;\n\t\t\t\t\tcase 'readonlyrecommended' /*case 'ReadOnlyRecommended'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ComponentOptions */\n\t\t\t\tcase 'componentoptions' /*case 'ComponentOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'toolbar' /*case 'Toolbar'*/: break;\n\t\t\t\t\tcase 'hideofficelogo' /*case 'HideOfficeLogo'*/: break;\n\t\t\t\t\tcase 'spreadsheetautofit' /*case 'SpreadsheetAutoFit'*/: break;\n\t\t\t\t\tcase 'label' /*case 'Label'*/: break;\n\t\t\t\t\tcase 'caption' /*case 'Caption'*/: break;\n\t\t\t\t\tcase 'maxheight' /*case 'MaxHeight'*/: break;\n\t\t\t\t\tcase 'maxwidth' /*case 'MaxWidth'*/: break;\n\t\t\t\t\tcase 'nextsheetnumber' /*case 'NextSheetNumber'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ExcelWorkbook */\n\t\t\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'date1904' /*case 'Date1904'*/:\n\t\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\t\tWorkbook.WBProps.date1904 = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'windowheight' /*case 'WindowHeight'*/: break;\n\t\t\t\t\tcase 'windowwidth' /*case 'WindowWidth'*/: break;\n\t\t\t\t\tcase 'windowtopx' /*case 'WindowTopX'*/: break;\n\t\t\t\t\tcase 'windowtopy' /*case 'WindowTopY'*/: break;\n\t\t\t\t\tcase 'tabratio' /*case 'TabRatio'*/: break;\n\t\t\t\t\tcase 'protectstructure' /*case 'ProtectStructure'*/: break;\n\t\t\t\t\tcase 'protectwindow' /*case 'ProtectWindow'*/: break;\n\t\t\t\t\tcase 'protectwindows' /*case 'ProtectWindows'*/: break;\n\t\t\t\t\tcase 'activesheet' /*case 'ActiveSheet'*/: break;\n\t\t\t\t\tcase 'displayinknotes' /*case 'DisplayInkNotes'*/: break;\n\t\t\t\t\tcase 'firstvisiblesheet' /*case 'FirstVisibleSheet'*/: break;\n\t\t\t\t\tcase 'supbook' /*case 'SupBook'*/: break;\n\t\t\t\t\tcase 'sheetname' /*case 'SheetName'*/: break;\n\t\t\t\t\tcase 'sheetindex' /*case 'SheetIndex'*/: break;\n\t\t\t\t\tcase 'sheetindexfirst' /*case 'SheetIndexFirst'*/: break;\n\t\t\t\t\tcase 'sheetindexlast' /*case 'SheetIndexLast'*/: break;\n\t\t\t\t\tcase 'dll' /*case 'Dll'*/: break;\n\t\t\t\t\tcase 'acceptlabelsinformulas' /*case 'AcceptLabelsInFormulas'*/: break;\n\t\t\t\t\tcase 'donotsavelinkvalues' /*case 'DoNotSaveLinkValues'*/: break;\n\t\t\t\t\tcase 'iteration' /*case 'Iteration'*/: break;\n\t\t\t\t\tcase 'maxiterations' /*case 'MaxIterations'*/: break;\n\t\t\t\t\tcase 'maxchange' /*case 'MaxChange'*/: break;\n\t\t\t\t\tcase 'path' /*case 'Path'*/: break;\n\t\t\t\t\tcase 'xct' /*case 'Xct'*/: break;\n\t\t\t\t\tcase 'count' /*case 'Count'*/: break;\n\t\t\t\t\tcase 'selectedsheets' /*case 'SelectedSheets'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tcase 'uncalced' /*case 'Uncalced'*/: break;\n\t\t\t\t\tcase 'startupprompt' /*case 'StartupPrompt'*/: break;\n\t\t\t\t\tcase 'crn' /*case 'Crn'*/: break;\n\t\t\t\t\tcase 'externname' /*case 'ExternName'*/: break;\n\t\t\t\t\tcase 'formula' /*case 'Formula'*/: break;\n\t\t\t\t\tcase 'colfirst' /*case 'ColFirst'*/: break;\n\t\t\t\t\tcase 'collast' /*case 'ColLast'*/: break;\n\t\t\t\t\tcase 'wantadvise' /*case 'WantAdvise'*/: break;\n\t\t\t\t\tcase 'boolean' /*case 'Boolean'*/: break;\n\t\t\t\t\tcase 'error' /*case 'Error'*/: break;\n\t\t\t\t\tcase 'text' /*case 'Text'*/: break;\n\t\t\t\t\tcase 'ole' /*case 'OLE'*/: break;\n\t\t\t\t\tcase 'noautorecover' /*case 'NoAutoRecover'*/: break;\n\t\t\t\t\tcase 'publishobjects' /*case 'PublishObjects'*/: break;\n\t\t\t\t\tcase 'donotcalculatebeforesave' /*case 'DoNotCalculateBeforeSave'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'refmoder1c1' /*case 'RefModeR1C1'*/: break;\n\t\t\t\t\tcase 'embedsavesmarttags' /*case 'EmbedSaveSmartTags'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorkbookOptions */\n\t\t\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'owcversion' /*case 'OWCVersion'*/: break;\n\t\t\t\t\tcase 'height' /*case 'Height'*/: break;\n\t\t\t\t\tcase 'width' /*case 'Width'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorksheetOptions */\n\t\t\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'visible' /*case 'Visible'*/:\n\t\t\t\t\t\tif(Rn[0].slice(-2) === \"/>\"){/* empty */}\n\t\t\t\t\t\telse if(Rn[1]===\"/\") switch(str.slice(pidx, Rn.index)) {\n\t\t\t\t\t\t\tcase \"SheetHidden\": wsprops.Hidden = 1; break;\n\t\t\t\t\t\t\tcase \"SheetVeryHidden\": wsprops.Hidden = 2; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'header' /*case 'Header'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tif(!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet['!margins'].header = +parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'footer' /*case 'Footer'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tif(!isNaN(+parsexmltag(Rn[0]).Margin)) cursheet['!margins'].footer = +parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'pagemargins' /*case 'PageMargins'*/:\n\t\t\t\t\t\tvar pagemargins = parsexmltag(Rn[0]);\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={},'xlml');\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Top)) cursheet['!margins'].top = +pagemargins.Top;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Left)) cursheet['!margins'].left = +pagemargins.Left;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Right)) cursheet['!margins'].right = +pagemargins.Right;\n\t\t\t\t\t\tif(!isNaN(+pagemargins.Bottom)) cursheet['!margins'].bottom = +pagemargins.Bottom;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'displayrighttoleft' /*case 'DisplayRightToLeft'*/:\n\t\t\t\t\t\tif(!Workbook.Views) Workbook.Views = [];\n\t\t\t\t\t\tif(!Workbook.Views[0]) Workbook.Views[0] = {};\n\t\t\t\t\t\tWorkbook.Views[0].RTL = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'freezepanes' /*case 'FreezePanes'*/: break;\n\t\t\t\t\tcase 'frozennosplit' /*case 'FrozenNoSplit'*/: break;\n\n\t\t\t\t\tcase 'splithorizontal' /*case 'SplitHorizontal'*/:\n\t\t\t\t\tcase 'splitvertical' /*case 'SplitVertical'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'donotdisplaygridlines' /*case 'DoNotDisplayGridlines'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'activerow' /*case 'ActiveRow'*/: break;\n\t\t\t\t\tcase 'activecol' /*case 'ActiveCol'*/: break;\n\t\t\t\t\tcase 'toprowbottompane' /*case 'TopRowBottomPane'*/: break;\n\t\t\t\t\tcase 'leftcolumnrightpane' /*case 'LeftColumnRightPane'*/: break;\n\n\t\t\t\t\tcase 'unsynced' /*case 'Unsynced'*/: break;\n\t\t\t\t\tcase 'print' /*case 'Print'*/: break;\n\t\t\t\t\tcase 'printerrors' /*case 'PrintErrors'*/: break;\n\t\t\t\t\tcase 'panes' /*case 'Panes'*/: break;\n\t\t\t\t\tcase 'scale' /*case 'Scale'*/: break;\n\t\t\t\t\tcase 'pane' /*case 'Pane'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'layout' /*case 'Layout'*/: break;\n\t\t\t\t\tcase 'pagesetup' /*case 'PageSetup'*/: break;\n\t\t\t\t\tcase 'selected' /*case 'Selected'*/: break;\n\t\t\t\t\tcase 'protectobjects' /*case 'ProtectObjects'*/: break;\n\t\t\t\t\tcase 'enableselection' /*case 'EnableSelection'*/: break;\n\t\t\t\t\tcase 'protectscenarios' /*case 'ProtectScenarios'*/: break;\n\t\t\t\t\tcase 'validprinterinfo' /*case 'ValidPrinterInfo'*/: break;\n\t\t\t\t\tcase 'horizontalresolution' /*case 'HorizontalResolution'*/: break;\n\t\t\t\t\tcase 'verticalresolution' /*case 'VerticalResolution'*/: break;\n\t\t\t\t\tcase 'numberofcopies' /*case 'NumberofCopies'*/: break;\n\t\t\t\t\tcase 'activepane' /*case 'ActivePane'*/: break;\n\t\t\t\t\tcase 'toprowvisible' /*case 'TopRowVisible'*/: break;\n\t\t\t\t\tcase 'leftcolumnvisible' /*case 'LeftColumnVisible'*/: break;\n\t\t\t\t\tcase 'fittopage' /*case 'FitToPage'*/: break;\n\t\t\t\t\tcase 'rangeselection' /*case 'RangeSelection'*/: break;\n\t\t\t\t\tcase 'papersizeindex' /*case 'PaperSizeIndex'*/: break;\n\t\t\t\t\tcase 'pagelayoutzoom' /*case 'PageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'pagebreakzoom' /*case 'PageBreakZoom'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'fitwidth' /*case 'FitWidth'*/: break;\n\t\t\t\t\tcase 'fitheight' /*case 'FitHeight'*/: break;\n\t\t\t\t\tcase 'commentslayout' /*case 'CommentsLayout'*/: break;\n\t\t\t\t\tcase 'zoom' /*case 'Zoom'*/: break;\n\t\t\t\t\tcase 'lefttoright' /*case 'LeftToRight'*/: break;\n\t\t\t\t\tcase 'gridlines' /*case 'Gridlines'*/: break;\n\t\t\t\t\tcase 'allowsort' /*case 'AllowSort'*/: break;\n\t\t\t\t\tcase 'allowfilter' /*case 'AllowFilter'*/: break;\n\t\t\t\t\tcase 'allowinsertrows' /*case 'AllowInsertRows'*/: break;\n\t\t\t\t\tcase 'allowdeleterows' /*case 'AllowDeleteRows'*/: break;\n\t\t\t\t\tcase 'allowinsertcols' /*case 'AllowInsertCols'*/: break;\n\t\t\t\t\tcase 'allowdeletecols' /*case 'AllowDeleteCols'*/: break;\n\t\t\t\t\tcase 'allowinserthyperlinks' /*case 'AllowInsertHyperlinks'*/: break;\n\t\t\t\t\tcase 'allowformatcells' /*case 'AllowFormatCells'*/: break;\n\t\t\t\t\tcase 'allowsizecols' /*case 'AllowSizeCols'*/: break;\n\t\t\t\t\tcase 'allowsizerows' /*case 'AllowSizeRows'*/: break;\n\t\t\t\t\tcase 'nosummaryrowsbelowdetail' /*case 'NoSummaryRowsBelowDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].above = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tabcolorindex' /*case 'TabColorIndex'*/: break;\n\t\t\t\t\tcase 'donotdisplayheadings' /*case 'DoNotDisplayHeadings'*/: break;\n\t\t\t\t\tcase 'showpagelayoutzoom' /*case 'ShowPageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'nosummarycolumnsrightdetail' /*case 'NoSummaryColumnsRightDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].left = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blackandwhite' /*case 'BlackAndWhite'*/: break;\n\t\t\t\t\tcase 'donotdisplayzeros' /*case 'DoNotDisplayZeros'*/: break;\n\t\t\t\t\tcase 'displaypagebreak' /*case 'DisplayPageBreak'*/: break;\n\t\t\t\t\tcase 'rowcolheadings' /*case 'RowColHeadings'*/: break;\n\t\t\t\t\tcase 'donotdisplayoutline' /*case 'DoNotDisplayOutline'*/: break;\n\t\t\t\t\tcase 'noorientation' /*case 'NoOrientation'*/: break;\n\t\t\t\t\tcase 'allowusepivottables' /*case 'AllowUsePivotTables'*/: break;\n\t\t\t\t\tcase 'zeroheight' /*case 'ZeroHeight'*/: break;\n\t\t\t\t\tcase 'viewablerange' /*case 'ViewableRange'*/: break;\n\t\t\t\t\tcase 'selection' /*case 'Selection'*/: break;\n\t\t\t\t\tcase 'protectcontents' /*case 'ProtectContents'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PivotTable */\n\t\t\t\tcase 'pivottable' /*case 'PivotTable'*/: case 'pivotcache' /*case 'PivotCache'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'immediateitemsondrop' /*case 'ImmediateItemsOnDrop'*/: break;\n\t\t\t\t\tcase 'showpagemultipleitemlabel' /*case 'ShowPageMultipleItemLabel'*/: break;\n\t\t\t\t\tcase 'compactrowindent' /*case 'CompactRowIndent'*/: break;\n\t\t\t\t\tcase 'location' /*case 'Location'*/: break;\n\t\t\t\t\tcase 'pivotfield' /*case 'PivotField'*/: break;\n\t\t\t\t\tcase 'orientation' /*case 'Orientation'*/: break;\n\t\t\t\t\tcase 'layoutform' /*case 'LayoutForm'*/: break;\n\t\t\t\t\tcase 'layoutsubtotallocation' /*case 'LayoutSubtotalLocation'*/: break;\n\t\t\t\t\tcase 'layoutcompactrow' /*case 'LayoutCompactRow'*/: break;\n\t\t\t\t\tcase 'position' /*case 'Position'*/: break;\n\t\t\t\t\tcase 'pivotitem' /*case 'PivotItem'*/: break;\n\t\t\t\t\tcase 'datatype' /*case 'DataType'*/: break;\n\t\t\t\t\tcase 'datafield' /*case 'DataField'*/: break;\n\t\t\t\t\tcase 'sourcename' /*case 'SourceName'*/: break;\n\t\t\t\t\tcase 'parentfield' /*case 'ParentField'*/: break;\n\t\t\t\t\tcase 'ptlineitems' /*case 'PTLineItems'*/: break;\n\t\t\t\t\tcase 'ptlineitem' /*case 'PTLineItem'*/: break;\n\t\t\t\t\tcase 'countofsameitems' /*case 'CountOfSameItems'*/: break;\n\t\t\t\t\tcase 'item' /*case 'Item'*/: break;\n\t\t\t\t\tcase 'itemtype' /*case 'ItemType'*/: break;\n\t\t\t\t\tcase 'ptsource' /*case 'PTSource'*/: break;\n\t\t\t\t\tcase 'cacheindex' /*case 'CacheIndex'*/: break;\n\t\t\t\t\tcase 'consolidationreference' /*case 'ConsolidationReference'*/: break;\n\t\t\t\t\tcase 'filename' /*case 'FileName'*/: break;\n\t\t\t\t\tcase 'reference' /*case 'Reference'*/: break;\n\t\t\t\t\tcase 'nocolumngrand' /*case 'NoColumnGrand'*/: break;\n\t\t\t\t\tcase 'norowgrand' /*case 'NoRowGrand'*/: break;\n\t\t\t\t\tcase 'blanklineafteritems' /*case 'BlankLineAfterItems'*/: break;\n\t\t\t\t\tcase 'hidden' /*case 'Hidden'*/: break;\n\t\t\t\t\tcase 'subtotal' /*case 'Subtotal'*/: break;\n\t\t\t\t\tcase 'basefield' /*case 'BaseField'*/: break;\n\t\t\t\t\tcase 'mapchilditems' /*case 'MapChildItems'*/: break;\n\t\t\t\t\tcase 'function' /*case 'Function'*/: break;\n\t\t\t\t\tcase 'refreshonfileopen' /*case 'RefreshOnFileOpen'*/: break;\n\t\t\t\t\tcase 'printsettitles' /*case 'PrintSetTitles'*/: break;\n\t\t\t\t\tcase 'mergelabels' /*case 'MergeLabels'*/: break;\n\t\t\t\t\tcase 'defaultversion' /*case 'DefaultVersion'*/: break;\n\t\t\t\t\tcase 'refreshname' /*case 'RefreshName'*/: break;\n\t\t\t\t\tcase 'refreshdate' /*case 'RefreshDate'*/: break;\n\t\t\t\t\tcase 'refreshdatecopy' /*case 'RefreshDateCopy'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tcase 'versionlastupdate' /*case 'VersionLastUpdate'*/: break;\n\t\t\t\t\tcase 'versionupdateablemin' /*case 'VersionUpdateableMin'*/: break;\n\t\t\t\t\tcase 'versionrefreshablemin' /*case 'VersionRefreshableMin'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PageBreaks */\n\t\t\t\tcase 'pagebreaks' /*case 'PageBreaks'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'colbreaks' /*case 'ColBreaks'*/: break;\n\t\t\t\t\tcase 'colbreak' /*case 'ColBreak'*/: break;\n\t\t\t\t\tcase 'rowbreaks' /*case 'RowBreaks'*/: break;\n\t\t\t\t\tcase 'rowbreak' /*case 'RowBreak'*/: break;\n\t\t\t\t\tcase 'colstart' /*case 'ColStart'*/: break;\n\t\t\t\t\tcase 'colend' /*case 'ColEnd'*/: break;\n\t\t\t\t\tcase 'rowend' /*case 'RowEnd'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* AutoFilter */\n\t\t\t\tcase 'autofilter' /*case 'AutoFilter'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'autofiltercolumn' /*case 'AutoFilterColumn'*/: break;\n\t\t\t\t\tcase 'autofiltercondition' /*case 'AutoFilterCondition'*/: break;\n\t\t\t\t\tcase 'autofilterand' /*case 'AutoFilterAnd'*/: break;\n\t\t\t\t\tcase 'autofilteror' /*case 'AutoFilterOr'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* QueryTable */\n\t\t\t\tcase 'querytable' /*case 'QueryTable'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'id' /*case 'Id'*/: break;\n\t\t\t\t\tcase 'autoformatfont' /*case 'AutoFormatFont'*/: break;\n\t\t\t\t\tcase 'autoformatpattern' /*case 'AutoFormatPattern'*/: break;\n\t\t\t\t\tcase 'querysource' /*case 'QuerySource'*/: break;\n\t\t\t\t\tcase 'querytype' /*case 'QueryType'*/: break;\n\t\t\t\t\tcase 'enableredirections' /*case 'EnableRedirections'*/: break;\n\t\t\t\t\tcase 'refreshedinxl9' /*case 'RefreshedInXl9'*/: break;\n\t\t\t\t\tcase 'urlstring' /*case 'URLString'*/: break;\n\t\t\t\t\tcase 'htmltables' /*case 'HTMLTables'*/: break;\n\t\t\t\t\tcase 'connection' /*case 'Connection'*/: break;\n\t\t\t\t\tcase 'commandtext' /*case 'CommandText'*/: break;\n\t\t\t\t\tcase 'refreshinfo' /*case 'RefreshInfo'*/: break;\n\t\t\t\t\tcase 'notitles' /*case 'NoTitles'*/: break;\n\t\t\t\t\tcase 'nextid' /*case 'NextId'*/: break;\n\t\t\t\t\tcase 'columninfo' /*case 'ColumnInfo'*/: break;\n\t\t\t\t\tcase 'overwritecells' /*case 'OverwriteCells'*/: break;\n\t\t\t\t\tcase 'donotpromptforfile' /*case 'DoNotPromptForFile'*/: break;\n\t\t\t\t\tcase 'textwizardsettings' /*case 'TextWizardSettings'*/: break;\n\t\t\t\t\tcase 'source' /*case 'Source'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'decimal' /*case 'Decimal'*/: break;\n\t\t\t\t\tcase 'thousandseparator' /*case 'ThousandSeparator'*/: break;\n\t\t\t\t\tcase 'trailingminusnumbers' /*case 'TrailingMinusNumbers'*/: break;\n\t\t\t\t\tcase 'formatsettings' /*case 'FormatSettings'*/: break;\n\t\t\t\t\tcase 'fieldtype' /*case 'FieldType'*/: break;\n\t\t\t\t\tcase 'delimiters' /*case 'Delimiters'*/: break;\n\t\t\t\t\tcase 'tab' /*case 'Tab'*/: break;\n\t\t\t\t\tcase 'comma' /*case 'Comma'*/: break;\n\t\t\t\t\tcase 'autoformatname' /*case 'AutoFormatName'*/: break;\n\t\t\t\t\tcase 'versionlastedit' /*case 'VersionLastEdit'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\t\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* MapInfo (schema) */\n\t\t\t\tcase 'mapinfo' /*case 'MapInfo'*/: case 'schema' /*case 'Schema'*/: case 'data' /*case 'data'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'map' /*case 'Map'*/: break;\n\t\t\t\t\tcase 'entry' /*case 'Entry'*/: break;\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'xpath' /*case 'XPath'*/: break;\n\t\t\t\t\tcase 'field' /*case 'Field'*/: break;\n\t\t\t\t\tcase 'xsdtype' /*case 'XSDType'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'aggregate' /*case 'Aggregate'*/: break;\n\t\t\t\t\tcase 'elementtype' /*case 'ElementType'*/: break;\n\t\t\t\t\tcase 'attributetype' /*case 'AttributeType'*/: break;\n\t\t\t\t/* These are from xsd (XML Schema Definition) */\n\t\t\t\t\tcase 'schema' /*case 'schema'*/:\n\t\t\t\t\tcase 'element' /*case 'element'*/:\n\t\t\t\t\tcase 'complextype' /*case 'complexType'*/:\n\t\t\t\t\tcase 'datatype' /*case 'datatype'*/:\n\t\t\t\t\tcase 'all' /*case 'all'*/:\n\t\t\t\t\tcase 'attribute' /*case 'attribute'*/:\n\t\t\t\t\tcase 'extends' /*case 'extends'*/: break;\n\n\t\t\t\t\tcase 'row' /*case 'row'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* SmartTags (can be anything) */\n\t\t\t\tcase 'smarttags' /*case 'SmartTags'*/: break;\n\n\t\t\t\tdefault: seen = false; break;\n\t\t\t}\n\t\t\tif(seen) break;\n\t\t\t/* CustomDocumentProperties */\n\t\t\tif(Rn[3].match(/!\\[CDATA/)) break;\n\t\t\tif(!state[state.length-1][1]) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t\t\tif(state[state.length-1][0]===/*'CustomDocumentProperties'*/'customdocumentproperties') {\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") xlml_set_custprop(Custprops, raw_Rn3, cp, str.slice(pidx, Rn.index));\n\t\t\t\telse { cp = Rn; pidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(opts.WTF) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t}\n\tvar out = ({}/*:any*/);\n\tif(!opts.bookSheets && !opts.bookProps) out.Sheets = sheets;\n\tout.SheetNames = sheetnames;\n\tout.Workbook = Workbook;\n\tout.SSF = dup(table_fmt);\n\tout.Props = Props;\n\tout.Custprops = Custprops;\n\treturn out;\n}\n\nfunction parse_xlml(data/*:RawBytes|string*/, opts)/*:Workbook*/ {\n\tfix_read_opts(opts=opts||{});\n\tswitch(opts.type||\"base64\") {\n\t\tcase \"base64\": return parse_xlml_xml(Base64_decode(data), opts);\n\t\tcase \"binary\": case \"buffer\": case \"file\": return parse_xlml_xml(data, opts);\n\t\tcase \"array\": return parse_xlml_xml(a2s(data), opts);\n\t}\n\t/*:: throw new Error(\"unsupported type \" + opts.type); */\n}\n\n/* TODO */\nfunction write_props_xlml(wb/*:Workbook*/, opts)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\t/* DocumentProperties */\n\tif(wb.Props) o.push(xlml_write_docprops(wb.Props, opts));\n\t/* CustomDocumentProperties */\n\tif(wb.Custprops) o.push(xlml_write_custprops(wb.Props, wb.Custprops, opts));\n\treturn o.join(\"\");\n}\n/* TODO */\nfunction write_wb_xlml(/*::wb, opts*/)/*:string*/ {\n\t/* OfficeDocumentSettings */\n\t/* ExcelWorkbook */\n\treturn \"\";\n}\n/* TODO */\nfunction write_sty_xlml(wb, opts)/*:string*/ {\n\t/* Styles */\n\tvar styles/*:Array<string>*/ = ['<Style ss:ID=\"Default\" ss:Name=\"Normal\"><NumberFormat/></Style>'];\n\topts.cellXfs.forEach(function(xf, id) {\n\t\tvar payload/*:Array<string>*/ = [];\n\t\tpayload.push(writextag('NumberFormat', null, {\"ss:Format\": escapexml(table_fmt[xf.numFmtId])}));\n\n\t\tvar o = /*::(*/{\"ss:ID\": \"s\" + (21+id)}/*:: :any)*/;\n\t\tstyles.push(writextag('Style', payload.join(\"\"), o));\n\t});\n\treturn writextag(\"Styles\", styles.join(\"\"));\n}\nfunction write_name_xlml(n) { return writextag(\"NamedRange\", null, {\"ss:Name\": n.Name, \"ss:RefersTo\":\"=\" + a1_to_rc(n.Ref, {r:0,c:0})}); }\nfunction write_names_xlml(wb/*::, opts*/)/*:string*/ {\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array<any>*/ = wb.Workbook.Names;\n\tvar out/*:Array<string>*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != null) continue;\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn writextag(\"Names\", out.join(\"\"));\n}\nfunction write_ws_xlml_names(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array<any>*/ = wb.Workbook.Names;\n\tvar out/*:Array<string>*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != idx) continue;\n\t\t/*switch(n.Name) {\n\t\t\tcase \"_\": continue;\n\t\t}*/\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn out.join(\"\");\n}\n/* WorksheetOptions */\nfunction write_ws_xlml_wsopts(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tvar o/*:Array<string>*/ = [];\n\t/* NOTE: spec technically allows any order, but stick with implied order */\n\n\t/* FitToPage */\n\t/* DoNotDisplayColHeaders */\n\t/* DoNotDisplayRowHeaders */\n\t/* ViewableRange */\n\t/* Selection */\n\t/* GridlineColor */\n\t/* Name */\n\t/* ExcelWorksheetType */\n\t/* IntlMacro */\n\t/* Unsynced */\n\t/* Selected */\n\t/* CodeName */\n\n\tif(ws['!margins']) {\n\t\to.push(\"<PageSetup>\");\n\t\tif(ws['!margins'].header) o.push(writextag(\"Header\", null, {'x:Margin':ws['!margins'].header}));\n\t\tif(ws['!margins'].footer) o.push(writextag(\"Footer\", null, {'x:Margin':ws['!margins'].footer}));\n\t\to.push(writextag(\"PageMargins\", null, {\n\t\t\t'x:Bottom': ws['!margins'].bottom || \"0.75\",\n\t\t\t'x:Left': ws['!margins'].left || \"0.7\",\n\t\t\t'x:Right': ws['!margins'].right || \"0.7\",\n\t\t\t'x:Top': ws['!margins'].top || \"0.75\"\n\t\t}));\n\t\to.push(\"</PageSetup>\");\n\t}\n\n\t/* PageSetup */\n\t/* DisplayPageBreak */\n\t/* TransitionExpressionEvaluation */\n\t/* TransitionFormulaEntry */\n\t/* Print */\n\t/* Zoom */\n\t/* PageLayoutZoom */\n\t/* PageBreakZoom */\n\t/* ShowPageBreakZoom */\n\t/* DefaultRowHeight */\n\t/* DefaultColumnWidth */\n\t/* StandardWidth */\n\n\tif(wb && wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx]) {\n\t\t/* Visible */\n\t\tif(wb.Workbook.Sheets[idx].Hidden) o.push(writextag(\"Visible\", (wb.Workbook.Sheets[idx].Hidden == 1 ? \"SheetHidden\" : \"SheetVeryHidden\"), {}));\n\t\telse {\n\t\t\t/* Selected */\n\t\t\tfor(var i = 0; i < idx; ++i) if(wb.Workbook.Sheets[i] && !wb.Workbook.Sheets[i].Hidden) break;\n\t\t\tif(i == idx) o.push(\"<Selected/>\");\n\t\t}\n\t}\n\n\t/* LeftColumnVisible */\n\n\tif(((((wb||{}).Workbook||{}).Views||[])[0]||{}).RTL) o.push(\"<DisplayRightToLeft/>\");\n\n\t/* GridlineColorIndex */\n\t/* DisplayFormulas */\n\t/* DoNotDisplayGridlines */\n\t/* DoNotDisplayHeadings */\n\t/* DoNotDisplayOutline */\n\t/* ApplyAutomaticOutlineStyles */\n\t/* NoSummaryRowsBelowDetail */\n\t/* NoSummaryColumnsRightDetail */\n\t/* DoNotDisplayZeros */\n\t/* ActiveRow */\n\t/* ActiveColumn */\n\t/* FilterOn */\n\t/* RangeSelection */\n\t/* TopRowVisible */\n\t/* TopRowBottomPane */\n\t/* LeftColumnRightPane */\n\t/* ActivePane */\n\t/* SplitHorizontal */\n\t/* SplitVertical */\n\t/* FreezePanes */\n\t/* FrozenNoSplit */\n\t/* TabColorIndex */\n\t/* Panes */\n\n\t/* NOTE: Password not supported in XLML Format */\n\tif(ws['!protect']) {\n\t\to.push(writetag(\"ProtectContents\", \"True\"));\n\t\tif(ws['!protect'].objects) o.push(writetag(\"ProtectObjects\", \"True\"));\n\t\tif(ws['!protect'].scenarios) o.push(writetag(\"ProtectScenarios\", \"True\"));\n\t\tif(ws['!protect'].selectLockedCells != null && !ws['!protect'].selectLockedCells) o.push(writetag(\"EnableSelection\", \"NoSelection\"));\n\t\telse if(ws['!protect'].selectUnlockedCells != null && !ws['!protect'].selectUnlockedCells) o.push(writetag(\"EnableSelection\", \"UnlockedCells\"));\n\t[\n\t\t[ \"formatCells\", \"AllowFormatCells\" ],\n\t\t[ \"formatColumns\", \"AllowSizeCols\" ],\n\t\t[ \"formatRows\", \"AllowSizeRows\" ],\n\t\t[ \"insertColumns\", \"AllowInsertCols\" ],\n\t\t[ \"insertRows\", \"AllowInsertRows\" ],\n\t\t[ \"insertHyperlinks\", \"AllowInsertHyperlinks\" ],\n\t\t[ \"deleteColumns\", \"AllowDeleteCols\" ],\n\t\t[ \"deleteRows\", \"AllowDeleteRows\" ],\n\t\t[ \"sort\", \"AllowSort\" ],\n\t\t[ \"autoFilter\", \"AllowFilter\" ],\n\t\t[ \"pivotTables\", \"AllowUsePivotTables\" ]\n\t].forEach(function(x) { if(ws['!protect'][x[0]]) o.push(\"<\"+x[1]+\"/>\"); });\n\t}\n\n\tif(o.length == 0) return \"\";\n\treturn writextag(\"WorksheetOptions\", o.join(\"\"), {xmlns:XLMLNS.x});\n}\nfunction write_ws_xlml_comment(comments/*:Array<any>*/)/*:string*/ {\n\treturn comments.map(function(c) {\n\t\t// TODO: formatted text\n\t\tvar t = xlml_unfixstr(c.t||\"\");\n\t\tvar d =writextag(\"ss:Data\", t, {\"xmlns\":\"http://www.w3.org/TR/REC-html40\"});\n\t\treturn writextag(\"Comment\", d, {\"ss:Author\":c.a});\n\t}).join(\"\");\n}\nfunction write_ws_xlml_cell(cell, ref/*:string*/, ws, opts, idx/*:number*/, wb, addr)/*:string*/{\n\tif(!cell || (cell.v == undefined && cell.f == undefined)) return \"\";\n\n\tvar attr = {};\n\tif(cell.f) attr[\"ss:Formula\"] = \"=\" + escapexml(a1_to_rc(cell.f, addr));\n\tif(cell.F && cell.F.slice(0, ref.length) == ref) {\n\t\tvar end = decode_cell(cell.F.slice(ref.length + 1));\n\t\tattr[\"ss:ArrayRange\"] = \"RC:R\" + (end.r == addr.r ? \"\" : \"[\" + (end.r - addr.r) + \"]\") + \"C\" + (end.c == addr.c ? \"\" : \"[\" + (end.c - addr.c) + \"]\");\n\t}\n\n\tif(cell.l && cell.l.Target) {\n\t\tattr[\"ss:HRef\"] = escapexml(cell.l.Target);\n\t\tif(cell.l.Tooltip) attr[\"x:HRefScreenTip\"] = escapexml(cell.l.Tooltip);\n\t}\n\n\tif(ws['!merges']) {\n\t\tvar marr = ws['!merges'];\n\t\tfor(var mi = 0; mi != marr.length; ++mi) {\n\t\t\tif(marr[mi].s.c != addr.c || marr[mi].s.r != addr.r) continue;\n\t\t\tif(marr[mi].e.c > marr[mi].s.c) attr['ss:MergeAcross'] = marr[mi].e.c - marr[mi].s.c;\n\t\t\tif(marr[mi].e.r > marr[mi].s.r) attr['ss:MergeDown'] = marr[mi].e.r - marr[mi].s.r;\n\t\t}\n\t}\n\n\tvar t = \"\", p = \"\";\n\tswitch(cell.t) {\n\t\tcase 'z': if(!opts.sheetStubs) return \"\"; break;\n\t\tcase 'n': t = 'Number'; p = String(cell.v); break;\n\t\tcase 'b': t = 'Boolean'; p = (cell.v ? \"1\" : \"0\"); break;\n\t\tcase 'e': t = 'Error'; p = BErr[cell.v]; break;\n\t\tcase 'd': t = 'DateTime'; p = new Date(cell.v).toISOString(); if(cell.z == null) cell.z = cell.z || table_fmt[14]; break;\n\t\tcase 's': t = 'String'; p = escapexlml(cell.v||\"\"); break;\n\t}\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tattr[\"ss:StyleID\"] = \"s\" + (21+os);\n\tattr[\"ss:Index\"] = addr.c + 1;\n\tvar _v = (cell.v != null ? p : \"\");\n\tvar m = cell.t == 'z' ? \"\" : ('<Data ss:Type=\"' + t + '\">' + _v + '</Data>');\n\n\tif((cell.c||[]).length > 0) m += write_ws_xlml_comment(cell.c);\n\n\treturn writextag(\"Cell\", m, attr);\n}\nfunction write_ws_xlml_row(R/*:number*/, row)/*:string*/ {\n\tvar o = '<Row ss:Index=\"' + (R+1) + '\"';\n\tif(row) {\n\t\tif(row.hpt && !row.hpx) row.hpx = pt2px(row.hpt);\n\t\tif(row.hpx) o += ' ss:AutoFitHeight=\"0\" ss:Height=\"' + row.hpx + '\"';\n\t\tif(row.hidden) o += ' ss:Hidden=\"1\"';\n\t}\n\treturn o + '>';\n}\n/* TODO */\nfunction write_ws_xlml_table(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws['!ref']) return \"\";\n\tvar range/*:Range*/ = safe_decode_range(ws['!ref']);\n\tvar marr/*:Array<Range>*/ = ws['!merges'] || [], mi = 0;\n\tvar o/*:Array<string>*/ = [];\n\tif(ws['!cols']) ws['!cols'].forEach(function(n, i) {\n\t\tprocess_col(n);\n\t\tvar w = !!n.width;\n\t\tvar p = col_obj_w(i, n);\n\t\tvar k/*:any*/ = {\"ss:Index\":i+1};\n\t\tif(w) k['ss:Width'] = width2px(p.width);\n\t\tif(n.hidden) k['ss:Hidden']=\"1\";\n\t\to.push(writextag(\"Column\",null,k));\n\t});\n\tvar dense = Array.isArray(ws);\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\tvar row = [write_ws_xlml_row(R, (ws['!rows']||[])[R])];\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tvar skip = false;\n\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(skip) continue;\n\t\t\tvar addr = {r:R,c:C};\n\t\t\tvar ref = encode_cell(addr), cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\trow.push(write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr));\n\t\t}\n\t\trow.push(\"</Row>\");\n\t\tif(row.length > 2) o.push(row.join(\"\"));\n\t}\n\treturn o.join(\"\");\n}\nfunction write_ws_xlml(idx/*:number*/, opts, wb/*:Workbook*/)/*:string*/ {\n\tvar o/*:Array<string>*/ = [];\n\tvar s = wb.SheetNames[idx];\n\tvar ws = wb.Sheets[s];\n\n\tvar t/*:string*/ = ws ? write_ws_xlml_names(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"<Names>\" + t + \"</Names>\");\n\n\t/* Table */\n\tt = ws ? write_ws_xlml_table(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"<Table>\" + t + \"</Table>\");\n\n\t/* WorksheetOptions */\n\to.push(write_ws_xlml_wsopts(ws, opts, idx, wb));\n\n\treturn o.join(\"\");\n}\nfunction write_xlml(wb, opts)/*:string*/ {\n\tif(!opts) opts = {};\n\tif(!wb.SSF) wb.SSF = dup(table_fmt);\n\tif(wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t\topts.cellXfs = [];\n\t\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\t}\n\tvar d/*:Array<string>*/ = [];\n\td.push(write_props_xlml(wb, opts));\n\td.push(write_wb_xlml(wb, opts));\n\td.push(\"\");\n\td.push(\"\");\n\tfor(var i = 0; i < wb.SheetNames.length; ++i)\n\t\td.push(writextag(\"Worksheet\", write_ws_xlml(i, opts, wb), {\"ss:Name\":escapexml(wb.SheetNames[i])}));\n\td[2] = write_sty_xlml(wb, opts);\n\td[3] = write_names_xlml(wb, opts);\n\treturn XML_HEADER + writextag(\"Workbook\", d.join(\"\"), {\n\t\t'xmlns':      XLMLNS.ss,\n\t\t'xmlns:o':    XLMLNS.o,\n\t\t'xmlns:x':    XLMLNS.x,\n\t\t'xmlns:ss':   XLMLNS.ss,\n\t\t'xmlns:dt':   XLMLNS.dt,\n\t\t'xmlns:html': XLMLNS.html\n\t});\n}\n/* [MS-OLEDS] 2.3.8 CompObjStream */\nfunction parse_compobj(obj/*:CFBEntry*/) {\n\tvar v = {};\n\tvar o = obj.content;\n\t/*:: if(o == null) return; */\n\n\t/* [MS-OLEDS] 2.3.7 CompObjHeader -- All fields MUST be ignored */\n\to.l = 28;\n\n\tv.AnsiUserType = o.read_shift(0, \"lpstr-ansi\");\n\tv.AnsiClipboardFormat = parse_ClipboardFormatOrAnsiString(o);\n\n\tif(o.length - o.l <= 4) return v;\n\n\tvar m/*:number*/ = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved1 = o.read_shift(0, \"lpstr-ansi\");\n\n\tif(o.length - o.l <= 4) return v;\n\tm = o.read_shift(4);\n\tif(m !== 0x71b239f4) return v;\n\tv.UnicodeClipboardFormat = parse_ClipboardFormatOrUnicodeString(o);\n\n\tm = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved2 = o.read_shift(0, \"lpwstr\");\n}\n\n/*\n\tContinue logic for:\n\t- 2.4.58 Continue          0x003c\n\t- 2.4.59 ContinueBigName   0x043c\n\t- 2.4.60 ContinueFrt       0x0812\n\t- 2.4.61 ContinueFrt11     0x0875\n\t- 2.4.62 ContinueFrt12     0x087f\n*/\nvar CONTINUE_RT = [ 0x003c, 0x043c, 0x0812, 0x0875, 0x087f ];\nfunction slurp(RecordType, R, blob, length/*:number*/, opts)/*:any*/ {\n\tvar l = length;\n\tvar bufs = [];\n\tvar d = blob.slice(blob.l,blob.l+l);\n\tif(opts && opts.enc && opts.enc.insitu && d.length > 0) switch(RecordType) {\n\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809/* BOF */: case 0x002f /* FilePass */: case 0x0195 /* FileLock */: case 0x00e1 /* InterfaceHdr */: case 0x0196 /* RRDInfo */: case 0x0138 /* RRDHead */: case 0x0194 /* UsrExcl */: case 0x000a /* EOF */:\n\t\tbreak;\n\tcase 0x0085 /* BoundSheet8 */:\n\t\tbreak;\n\tdefault:\n\t\topts.enc.insitu(d);\n\t}\n\tbufs.push(d);\n\tblob.l += l;\n\tvar nextrt = __readUInt16LE(blob,blob.l), next = XLSRecordEnum[nextrt];\n\tvar start = 0;\n\twhile(next != null && CONTINUE_RT.indexOf(nextrt) > -1) {\n\t\tl = __readUInt16LE(blob,blob.l+2);\n\t\tstart = blob.l + 4;\n\t\tif(nextrt == 0x0812 /* ContinueFrt */) start += 4;\n\t\telse if(nextrt == 0x0875 || nextrt == 0x087f) {\n\t\t\tstart += 12;\n\t\t}\n\t\td = blob.slice(start,blob.l+4+l);\n\t\tbufs.push(d);\n\t\tblob.l += 4+l;\n\t\tnext = (XLSRecordEnum[nextrt = __readUInt16LE(blob, blob.l)]);\n\t}\n\tvar b = (bconcat(bufs)/*:any*/);\n\tprep_blob(b, 0);\n\tvar ll = 0; b.lens = [];\n\tfor(var j = 0; j < bufs.length; ++j) { b.lens.push(ll); ll += bufs[j].length; }\n\tif(b.length < length) throw \"XLS Record 0x\" + RecordType.toString(16) + \" Truncated: \" + b.length + \" < \" + length;\n\treturn R.f(b, b.length, opts);\n}\n\nfunction safe_format_xf(p/*:any*/, opts/*:ParseOpts*/, date1904/*:?boolean*/) {\n\tif(p.t === 'z') return;\n\tif(!p.XF) return;\n\tvar fmtid = 0;\n\ttry {\n\t\tfmtid = p.z || p.XF.numFmtId || 0;\n\t\tif(opts.cellNF) p.z = table_fmt[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts || opts.cellText !== false) try {\n\t\tif(p.t === 'e') { p.w = p.w || BErr[p.v]; }\n\t\telse if(fmtid === 0 || fmtid == \"General\") {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = p.v.toString(10);\n\t\t\t\telse p.w = SSF_general_num(p.v);\n\t\t\t}\n\t\t\telse p.w = SSF_general(p.v);\n\t\t}\n\t\telse p.w = SSF_format(fmtid,p.v, {date1904:!!date1904, dateNF: opts && opts.dateNF});\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(opts.cellDates && fmtid && p.t == 'n' && fmt_is_date(table_fmt[fmtid] || String(fmtid))) {\n\t\tvar _d = SSF_parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t}\n}\n\nfunction make_cell(val, ixfe, t)/*:Cell*/ {\n\treturn ({v:val, ixfe:ixfe, t:t}/*:any*/);\n}\n\n// 2.3.2\nfunction parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {\n\tvar wb = ({opts:{}}/*:any*/);\n\tvar Sheets = {};\n\tif(DENSE != null && options.dense == null) options.dense = DENSE;\n\tvar out/*:Worksheet*/ = ((options.dense ? [] : {})/*:any*/);\n\tvar Directory = {};\n\tvar range/*:Range*/ = ({}/*:any*/);\n\tvar last_formula = null;\n\tvar sst/*:SST*/ = ([]/*:any*/);\n\tvar cur_sheet = \"\";\n\tvar Preamble = {};\n\tvar lastcell, last_cell = \"\", cc/*:Cell*/, cmnt, rngC, rngR;\n\tvar sharedf = {};\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar temp_val/*:Cell*/;\n\tvar country;\n\tvar XFs = []; /* XF records */\n\tvar palette/*:Array<[number, number, number]>*/ = [];\n\tvar Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false}, Views:[{}] }/*:any*/), wsprops = {};\n\tvar get_rgb = function getrgb(icv/*:number*/)/*:[number, number, number]*/ {\n\t\tif(icv < 8) return XLSIcv[icv];\n\t\tif(icv < 64) return palette[icv-8] || XLSIcv[icv];\n\t\treturn XLSIcv[icv];\n\t};\n\tvar process_cell_style = function pcs(cell, line/*:any*/, options) {\n\t\tvar xfd = line.XF.data;\n\t\tif(!xfd || !xfd.patternType || !options || !options.cellStyles) return;\n\t\tline.s = ({}/*:any*/);\n\t\tline.s.patternType = xfd.patternType;\n\t\tvar t;\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvFore)))) { line.s.fgColor = {rgb:t}; }\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvBack)))) { line.s.bgColor = {rgb:t}; }\n\t};\n\tvar addcell = function addcell(cell/*:any*/, line/*:any*/, options/*:any*/) {\n\t\tif(file_depth > 1) return;\n\t\tif(options.sheetRows && cell.r >= options.sheetRows) return;\n\t\tif(options.cellStyles && line.XF && line.XF.data) process_cell_style(cell, line, options);\n\t\tdelete line.ixfe; delete line.XF;\n\t\tlastcell = cell;\n\t\tlast_cell = encode_cell(cell);\n\t\tif(!range || !range.s || !range.e) range = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\tif(cell.r < range.s.r) range.s.r = cell.r;\n\t\tif(cell.c < range.s.c) range.s.c = cell.c;\n\t\tif(cell.r + 1 > range.e.r) range.e.r = cell.r + 1;\n\t\tif(cell.c + 1 > range.e.c) range.e.c = cell.c + 1;\n\t\tif(options.cellFormula && line.f) {\n\t\t\tfor(var afi = 0; afi < arrayf.length; ++afi) {\n\t\t\t\tif(arrayf[afi][0].s.c > cell.c || arrayf[afi][0].s.r > cell.r) continue;\n\t\t\t\tif(arrayf[afi][0].e.c < cell.c || arrayf[afi][0].e.r < cell.r) continue;\n\t\t\t\tline.F = encode_range(arrayf[afi][0]);\n\t\t\t\tif(arrayf[afi][0].s.c != cell.c || arrayf[afi][0].s.r != cell.r) delete line.f;\n\t\t\t\tif(line.f) line.f = \"\" + stringify_formula(arrayf[afi][1], range, cell, supbooks, opts);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tif(options.dense) {\n\t\t\t\tif(!out[cell.r]) out[cell.r] = [];\n\t\t\t\tout[cell.r][cell.c] = line;\n\t\t\t} else out[last_cell] = line;\n\t\t}\n\t};\n\tvar opts = ({\n\t\tenc: false, // encrypted\n\t\tsbcch: 0, // cch in the preceding SupBook\n\t\tsnames: [], // sheetnames\n\t\tsharedf: sharedf, // shared formulae by address\n\t\tarrayf: arrayf, // array formulae array\n\t\trrtabid: [], // RRTabId\n\t\tlastuser: \"\", // Last User from WriteAccess\n\t\tbiff: 8, // BIFF version\n\t\tcodepage: 0, // CP from CodePage record\n\t\twinlocked: 0, // fLockWn from WinProtect\n\t\tcellStyles: !!options && !!options.cellStyles,\n\t\tWTF: !!options && !!options.wtf\n\t}/*:any*/);\n\tif(options.password) opts.password = options.password;\n\tvar themes;\n\tvar merges/*:Array<Range>*/ = [];\n\tvar objects = [];\n\tvar colinfo/*:Array<ColInfo>*/ = [], rowinfo/*:Array<RowInfo>*/ = [];\n\tvar seencol = false;\n\tvar supbooks = ([]/*:any*/); // 1-indexed, will hold extern names\n\tsupbooks.SheetNames = opts.snames;\n\tsupbooks.sharedf = opts.sharedf;\n\tsupbooks.arrayf = opts.arrayf;\n\tsupbooks.names = [];\n\tsupbooks.XTI = [];\n\tvar last_RT = 0;\n\tvar file_depth = 0; /* TODO: make a real stack */\n\tvar BIFF2Fmt = 0, BIFF2FmtTable/*:Array<string>*/ = [];\n\tvar FilterDatabases = []; /* TODO: sort out supbooks and process elsewhere */\n\tvar last_lbl/*:?DefinedName*/;\n\n\t/* explicit override for some broken writers */\n\topts.codepage = 1200;\n\tset_cp(1200);\n\tvar seen_codepage = false;\n\twhile(blob.l < blob.length - 1) {\n\t\tvar s = blob.l;\n\t\tvar RecordType = blob.read_shift(2);\n\t\tif(RecordType === 0 && last_RT === 0x000a /* EOF */) break;\n\t\tvar length = (blob.l === blob.length ? 0 : blob.read_shift(2));\n\t\tvar R = XLSRecordEnum[RecordType];\n\t\t//console.log(RecordType.toString(16), RecordType, R, blob.l, length, blob.length);\n\t\t//if(!R) console.log(blob.slice(blob.l, blob.l + length));\n\t\tif(R && R.f) {\n\t\t\tif(options.bookSheets) {\n\t\t\t\tif(last_RT === 0x0085 /* BoundSheet8 */ && RecordType !== 0x0085 /* R.n !== 'BoundSheet8' */) break;\n\t\t\t}\n\t\t\tlast_RT = RecordType;\n\t\t\tif(R.r === 2 || R.r == 12) {\n\t\t\t\tvar rt = blob.read_shift(2); length -= 2;\n\t\t\t\tif(!opts.enc && rt !== RecordType && (((rt&0xFF)<<8)|(rt>>8)) !== RecordType) throw new Error(\"rt mismatch: \" + rt + \"!=\" + RecordType);\n\t\t\t\tif(R.r == 12){\n\t\t\t\t\tblob.l += 10; length -= 10;\n\t\t\t\t} // skip FRT\n\t\t\t}\n\t\t\t//console.error(R,blob.l,length,blob.length);\n\t\t\tvar val/*:any*/ = ({}/*:any*/);\n\t\t\tif(RecordType === 0x000a /* EOF */) val = /*::(*/R.f(blob, length, opts)/*:: :any)*/;\n\t\t\telse val = /*::(*/slurp(RecordType, R, blob, length, opts)/*:: :any)*/;\n\t\t\t/*:: val = (val:any); */\n\t\t\tif(file_depth == 0 && [0x0009, 0x0209, 0x0409, 0x0809].indexOf(last_RT) === -1 /* 'BOF' */) continue;\n\t\t\tswitch(RecordType) {\n\t\t\t\tcase 0x0022 /* Date1904 */:\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\twb.opts.Date1904 = Workbook.WBProps.date1904 = val; break;\n\t\t\t\tcase 0x0086 /* WriteProtect */: wb.opts.WriteProtect = true; break;\n\t\t\t\tcase 0x002f /* FilePass */:\n\t\t\t\t\tif(!opts.enc) blob.l = 0;\n\t\t\t\t\topts.enc = val;\n\t\t\t\t\tif(!options.password) throw new Error(\"File is password-protected\");\n\t\t\t\t\tif(val.valid == null) throw new Error(\"Encryption scheme unsupported\");\n\t\t\t\t\tif(!val.valid) throw new Error(\"Password is incorrect\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x005c /* WriteAccess */: opts.lastuser = val; break;\n\t\t\t\tcase 0x0042 /* CodePage */:\n\t\t\t\t\tvar cpval = Number(val);\n\t\t\t\t\t/* overrides based on test cases */\n\t\t\t\t\tswitch(cpval) {\n\t\t\t\t\t\tcase 0x5212: cpval =  1200; break;\n\t\t\t\t\t\tcase 0x8000: cpval = 10000; break;\n\t\t\t\t\t\tcase 0x8001: cpval =  1252; break;\n\t\t\t\t\t}\n\t\t\t\t\tset_cp(opts.codepage = cpval);\n\t\t\t\t\tseen_codepage = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x013d /* RRTabId */: opts.rrtabid = val; break;\n\t\t\t\tcase 0x0019 /* WinProtect */: opts.winlocked = val; break;\n\t\t\t\tcase 0x01b7 /* RefreshAll */: wb.opts[\"RefreshAll\"] = val; break;\n\t\t\t\tcase 0x000c /* CalcCount */: wb.opts[\"CalcCount\"] = val; break;\n\t\t\t\tcase 0x0010 /* CalcDelta */: wb.opts[\"CalcDelta\"] = val; break;\n\t\t\t\tcase 0x0011 /* CalcIter */: wb.opts[\"CalcIter\"] = val; break;\n\t\t\t\tcase 0x000d /* CalcMode */: wb.opts[\"CalcMode\"] = val; break;\n\t\t\t\tcase 0x000e /* CalcPrecision */: wb.opts[\"CalcPrecision\"] = val; break;\n\t\t\t\tcase 0x005f /* CalcSaveRecalc */: wb.opts[\"CalcSaveRecalc\"] = val; break;\n\t\t\t\tcase 0x000f /* CalcRefMode */: opts.CalcRefMode = val; break; // TODO: implement R1C1\n\t\t\t\tcase 0x08a3 /* ForceFullCalculation */: wb.opts.FullCalc = val; break;\n\t\t\t\tcase 0x0081 /* WsBool */:\n\t\t\t\t\tif(val.fDialog) out[\"!type\"] = \"dialog\";\n\t\t\t\t\tif(!val.fBelow) (out[\"!outline\"] || (out[\"!outline\"] = {})).above = true;\n\t\t\t\t\tif(!val.fRight) (out[\"!outline\"] || (out[\"!outline\"] = {})).left = true;\n\t\t\t\t\tbreak; // TODO\n\t\t\t\tcase 0x00e0 /* XF */:\n\t\t\t\t\tXFs.push(val); break;\n\t\t\t\tcase 0x01ae /* SupBook */:\n\t\t\t\t\tsupbooks.push([val]);\n\t\t\t\t\tsupbooks[supbooks.length-1].XTI = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0023: case 0x0223 /* ExternName */:\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0018: case 0x0218 /* Lbl */:\n\t\t\t\t\tlast_lbl = ({\n\t\t\t\t\t\tName: val.Name,\n\t\t\t\t\t\tRef: stringify_formula(val.rgce,range,null,supbooks,opts)\n\t\t\t\t\t}/*:DefinedName*/);\n\t\t\t\t\tif(val.itab > 0) last_lbl.Sheet = val.itab - 1;\n\t\t\t\t\tsupbooks.names.push(last_lbl);\n\t\t\t\t\tif(!supbooks[0]) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tif(val.Name == \"_xlnm._FilterDatabase\" && val.itab > 0)\n\t\t\t\t\t\tif(val.rgce && val.rgce[0] && val.rgce[0][0] && val.rgce[0][0][0] == 'PtgArea3d')\n\t\t\t\t\t\t\tFilterDatabases[val.itab - 1] = { ref: encode_range(val.rgce[0][0][1][2]) };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0016 /* ExternCount */: opts.ExternCount = val; break;\n\t\t\t\tcase 0x0017 /* ExternSheet */:\n\t\t\t\t\tif(supbooks.length == 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val); supbooks.XTI = supbooks.XTI.concat(val); break;\n\t\t\t\tcase 0x0894 /* NameCmt */:\n\t\t\t\t\t/* TODO: search for correct name */\n\t\t\t\t\tif(opts.biff < 8) break;\n\t\t\t\t\tif(last_lbl != null) last_lbl.Comment = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0012 /* Protect */: out[\"!protect\"] = val; break; /* for sheet or book */\n\t\t\t\tcase 0x0013 /* Password */: if(val !== 0 && opts.WTF) console.error(\"Password verifier: \" + val); break;\n\t\t\t\tcase 0x0085 /* BoundSheet8 */: {\n\t\t\t\t\tDirectory[val.pos] = val;\n\t\t\t\t\topts.snames.push(val.name);\n\t\t\t\t} break;\n\t\t\t\tcase 0x000a /* EOF */: {\n\t\t\t\t\tif(--file_depth) break;\n\t\t\t\t\tif(range.e) {\n\t\t\t\t\t\tif(range.e.r > 0 && range.e.c > 0) {\n\t\t\t\t\t\t\trange.e.r--; range.e.c--;\n\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\tif(options.sheetRows && options.sheetRows <= range.e.r) {\n\t\t\t\t\t\t\t\tvar tmpri = range.e.r;\n\t\t\t\t\t\t\t\trange.e.r = options.sheetRows - 1;\n\t\t\t\t\t\t\t\tout[\"!fullref\"] = out[\"!ref\"];\n\t\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\t\trange.e.r = tmpri;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trange.e.r++; range.e.c++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(merges.length > 0) out[\"!merges\"] = merges;\n\t\t\t\t\t\tif(objects.length > 0) out[\"!objects\"] = objects;\n\t\t\t\t\t\tif(colinfo.length > 0) out[\"!cols\"] = colinfo;\n\t\t\t\t\t\tif(rowinfo.length > 0) out[\"!rows\"] = rowinfo;\n\t\t\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t\t\t}\n\t\t\t\t\tif(cur_sheet === \"\") Preamble = out; else Sheets[cur_sheet] = out;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809 /* BOF */: {\n\t\t\t\t\tif(opts.biff === 8) opts.biff = {\n\t\t\t\t\t\t/*::[*/0x0009/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0209/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0409/*::]*/:4\n\t\t\t\t\t}[RecordType] || {\n\t\t\t\t\t\t/*::[*/0x0200/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0300/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0400/*::]*/:4,\n\t\t\t\t\t\t/*::[*/0x0500/*::]*/:5,\n\t\t\t\t\t\t/*::[*/0x0600/*::]*/:8,\n\t\t\t\t\t\t/*::[*/0x0002/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0007/*::]*/:2\n\t\t\t\t\t}[val.BIFFVer] || 8;\n\t\t\t\t\topts.biffguess = val.BIFFVer == 0;\n\t\t\t\t\tif(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); }\n\t\t\t\t\tif(opts.biff == 8 && val.BIFFVer == 0 && val.dt == 16) opts.biff = 2;\n\t\t\t\t\tif(file_depth++) break;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\n\t\t\t\t\tif(opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); }\n\n\t\t\t\t\tif(opts.biff < 5 || val.BIFFVer == 0 && val.dt == 0x1000) {\n\t\t\t\t\t\tif(cur_sheet === \"\") cur_sheet = \"Sheet1\";\n\t\t\t\t\t\trange = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\t\t\t\t\t/* fake BoundSheet8 */\n\t\t\t\t\t\tvar fakebs8 = {pos: blob.l - length, name:cur_sheet};\n\t\t\t\t\t\tDirectory[fakebs8.pos] = fakebs8;\n\t\t\t\t\t\topts.snames.push(cur_sheet);\n\t\t\t\t\t}\n\t\t\t\t\telse cur_sheet = (Directory[s] || {name:\"\"}).name;\n\t\t\t\t\tif(val.dt == 0x20) out[\"!type\"] = \"chart\";\n\t\t\t\t\tif(val.dt == 0x40) out[\"!type\"] = \"macro\";\n\t\t\t\t\tmerges = [];\n\t\t\t\t\tobjects = [];\n\t\t\t\t\topts.arrayf = arrayf = [];\n\t\t\t\t\tcolinfo = []; rowinfo = [];\n\t\t\t\t\tseencol = false;\n\t\t\t\t\twsprops = {Hidden:(Directory[s]||{hs:0}).hs, name:cur_sheet };\n\t\t\t\t} break;\n\t\t\t\tcase 0x0203 /* Number */: case 0x0003 /* BIFF2NUM */: case 0x0002 /* BIFF2INT */: {\n\t\t\t\t\tif(out[\"!type\"] == \"chart\") if(options.dense ? (out[val.r]||[])[val.c]: out[encode_cell({c:val.c, r:val.r})]) ++val.c;\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe]||{}, v:val.val, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0005: case 0x0205 /* BoolErr */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:val.t}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x027e /* RK */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.rknum, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00bd /* MulRk */: {\n\t\t\t\t\tfor(var j = val.c; j <= val.C; ++j) {\n\t\t\t\t\t\tvar ixfe = val.rkrec[j-val.c][0];\n\t\t\t\t\t\ttemp_val= ({ixfe:ixfe, XF:XFs[ixfe], v:val.rkrec[j-val.c][1], t:'n'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0006: case 0x0206: case 0x0406 /* Formula */: {\n\t\t\t\t\tif(val.val == 'String') { last_formula = val; break; }\n\t\t\t\t\ttemp_val = make_cell(val.val, val.cell.ixfe, val.tt);\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\tvar _f = val.formula;\n\t\t\t\t\t\tif(_f && _f[0] && _f[0][0] && _f[0][0][0] == 'PtgExp') {\n\t\t\t\t\t\t\tvar _fr = _f[0][0][1][0], _fc = _f[0][0][1][1];\n\t\t\t\t\t\t\tvar _fe = encode_cell({r:_fr, c:_fc});\n\t\t\t\t\t\t\tif(sharedf[_fe]) temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t\t\telse temp_val.F = ((options.dense ? (out[_fr]||[])[_fc]: out[_fe]) || {}).F;\n\t\t\t\t\t\t} else temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell(val.cell, temp_val, options);\n\t\t\t\t\tlast_formula = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x0007: case 0x0207 /* String */: {\n\t\t\t\t\tif(last_formula) { /* technically always true */\n\t\t\t\t\t\tlast_formula.val = val;\n\t\t\t\t\t\ttemp_val = make_cell(val, last_formula.cell.ixfe, 's');\n\t\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\t\ttemp_val.f = \"\"+stringify_formula(last_formula.formula, range, last_formula.cell, supbooks, opts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell(last_formula.cell, temp_val, options);\n\t\t\t\t\t\tlast_formula = null;\n\t\t\t\t\t} else throw new Error(\"String record expects Formula\");\n\t\t\t\t} break;\n\t\t\t\tcase 0x0021: case 0x0221 /* Array */: {\n\t\t\t\t\tarrayf.push(val);\n\t\t\t\t\tvar _arraystart = encode_cell(val[0].s);\n\t\t\t\t\tcc = options.dense ? (out[val[0].s.r]||[])[val[0].s.c] : out[_arraystart];\n\t\t\t\t\tif(options.cellFormula && cc) {\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tif(!_arraystart || !cc) break;\n\t\t\t\t\t\tcc.f = \"\"+stringify_formula(val[1], range, val[0], supbooks, opts);\n\t\t\t\t\t\tcc.F = encode_range(val[0]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x04bc /* ShrFmla */: {\n\t\t\t\t\tif(!options.cellFormula) break;\n\t\t\t\t\tif(last_cell) {\n\t\t\t\t\t\t/* TODO: capture range */\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tsharedf[encode_cell(last_formula.cell)]= val[0];\n\t\t\t\t\t\tcc = options.dense ? (out[last_formula.cell.r]||[])[last_formula.cell.c] : out[encode_cell(last_formula.cell)];\n\t\t\t\t\t\t(cc||{}).f = \"\"+stringify_formula(val[0], range, lastcell, supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fd /* LabelSst */:\n\t\t\t\t\ttemp_val=make_cell(sst[val.isst].t, val.ixfe, 's');\n\t\t\t\t\tif(sst[val.isst].h) temp_val.h = sst[val.isst].h;\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0201 /* Blank */: if(options.sheetStubs) {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], t:'z'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00be /* MulBlank */: if(options.sheetStubs) {\n\t\t\t\t\tfor(var _j = val.c; _j <= val.C; ++_j) {\n\t\t\t\t\t\tvar _ixfe = val.ixfe[_j-val.c];\n\t\t\t\t\t\ttemp_val= ({ixfe:_ixfe, XF:XFs[_ixfe], t:'z'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:_j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00d6 /* RString */:\n\t\t\t\tcase 0x0204 /* Label */: case 0x0004 /* BIFF2STR */:\n\t\t\t\t\ttemp_val=make_cell(val.val, val.ixfe, 's');\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0x0000: case 0x0200 /* Dimensions */: {\n\t\t\t\t\tif(file_depth === 1) range = val; /* TODO: stack */\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fc /* SST */: {\n\t\t\t\t\tsst = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x041e /* Format */: { /* val = [id, fmt] */\n\t\t\t\t\tif(opts.biff == 4) {\n\t\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val[1];\n\t\t\t\t\t\tfor(var b4idx = 0; b4idx < BIFF2Fmt + 163; ++b4idx) if(table_fmt[b4idx] == val[1]) break;\n\t\t\t\t\t\tif(b4idx >= 163) SSF_load(val[1], BIFF2Fmt + 163);\n\t\t\t\t\t}\n\t\t\t\t\telse SSF_load(val[1], val[0]);\n\t\t\t\t} break;\n\t\t\t\tcase 0x001e /* BIFF2FORMAT */: {\n\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val;\n\t\t\t\t\tfor(var b2idx = 0; b2idx < BIFF2Fmt + 163; ++b2idx) if(table_fmt[b2idx] == val) break;\n\t\t\t\t\tif(b2idx >= 163) SSF_load(val, BIFF2Fmt + 163);\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x00e5 /* MergeCells */: merges = merges.concat(val); break;\n\n\t\t\t\tcase 0x005d /* Obj */: objects[val.cmo[0]] = opts.lastobj = val; break;\n\t\t\t\tcase 0x01b6 /* TxO */: opts.lastobj.TxO = val; break;\n\t\t\t\tcase 0x007f /* ImData */: opts.lastobj.ImData = val; break;\n\n\t\t\t\tcase 0x01b8 /* HLink */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc) cc.l = val[1];\n\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0800 /* HLinkTooltip */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc && cc.l) cc.l.Tooltip = val[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x001c /* Note */: {\n\t\t\t\t\tif(opts.biff <= 5 && opts.biff >= 2) break; /* TODO: BIFF5 */\n\t\t\t\t\tcc = options.dense ? (out[val[0].r]||[])[val[0].c] : out[encode_cell(val[0])];\n\t\t\t\t\tvar noteobj = objects[val[2]];\n\t\t\t\t\tif(!cc) {\n\t\t\t\t\t\tif(options.dense) {\n\t\t\t\t\t\t\tif(!out[val[0].r]) out[val[0].r] = [];\n\t\t\t\t\t\t\tcc = out[val[0].r][val[0].c] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcc = out[encode_cell(val[0])] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trange.e.r = Math.max(range.e.r, val[0].r);\n\t\t\t\t\t\trange.s.r = Math.min(range.s.r, val[0].r);\n\t\t\t\t\t\trange.e.c = Math.max(range.e.c, val[0].c);\n\t\t\t\t\t\trange.s.c = Math.min(range.s.c, val[0].c);\n\t\t\t\t\t}\n\t\t\t\t\tif(!cc.c) cc.c = [];\n\t\t\t\t\tcmnt = {a:val[1],t:noteobj.TxO.t};\n\t\t\t\t\tcc.c.push(cmnt);\n\t\t\t\t} break;\n\t\t\t\tcase 0x087d /* XFExt */: update_xfext(XFs[val.ixfe], val.ext); break;\n\t\t\t\tcase 0x007d /* ColInfo */: {\n\t\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, level: (val.level || 0), hidden: !!(val.flags & 1) };\n\t\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0208 /* Row */: {\n\t\t\t\t\tvar rowobj = {};\n\t\t\t\t\tif(val.level != null) { rowinfo[val.r] = rowobj; rowobj.level = val.level; }\n\t\t\t\t\tif(val.hidden) { rowinfo[val.r] = rowobj; rowobj.hidden = true; }\n\t\t\t\t\tif(val.hpt) {\n\t\t\t\t\t\trowinfo[val.r] = rowobj;\n\t\t\t\t\t\trowobj.hpt = val.hpt; rowobj.hpx = pt2px(val.hpt);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0026 /* LeftMargin */:\n\t\t\t\tcase 0x0027 /* RightMargin */:\n\t\t\t\tcase 0x0028 /* TopMargin */:\n\t\t\t\tcase 0x0029 /* BottomMargin */:\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'][({0x26: \"left\", 0x27:\"right\", 0x28:\"top\", 0x29:\"bottom\"})[RecordType]] = val;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x00a1 /* Setup */: // TODO\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'].header = val.header;\n\t\t\t\t\tout['!margins'].footer = val.footer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x023e /* Window2 */: // TODO\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(val.RTL) Workbook.Views[0].RTL = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0092 /* Palette */: palette = val; break;\n\t\t\t\tcase 0x0896 /* Theme */: themes = val; break;\n\t\t\t\tcase 0x008c /* Country */: country = val; break;\n\t\t\t\tcase 0x01ba /* CodeName */: {\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\tif(!cur_sheet) Workbook.WBProps.CodeName = val || \"ThisWorkbook\";\n\t\t\t\t\telse wsprops.CodeName = val || wsprops.name;\n\t\t\t\t} break;\n\t\t\t}\n\t\t} else {\n\t\t\tif(!R) console.error(\"Missing Info for XLS Record 0x\" + RecordType.toString(16));\n\t\t\tblob.l += length;\n\t\t}\n\t}\n\twb.SheetNames=keys(Directory).sort(function(a,b) { return Number(a) - Number(b); }).map(function(x){return Directory[x].name;});\n\tif(!options.bookSheets) wb.Sheets=Sheets;\n\tif(!wb.SheetNames.length && Preamble[\"!ref\"]) {\n\t\twb.SheetNames.push(\"Sheet1\");\n\t\t/*jshint -W069 */\n\t\tif(wb.Sheets) wb.Sheets[\"Sheet1\"] = Preamble;\n\t\t/*jshint +W069 */\n\t} else wb.Preamble=Preamble;\n\tif(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] = r; });\n\twb.Strings = sst;\n\twb.SSF = dup(table_fmt);\n\tif(opts.enc) wb.Encryption = opts.enc;\n\tif(themes) wb.Themes = themes;\n\twb.Metadata = {};\n\tif(country !== undefined) wb.Metadata.Country = country;\n\tif(supbooks.names.length > 0) Workbook.Names = supbooks.names;\n\twb.Workbook = Workbook;\n\treturn wb;\n}\n\n/* TODO: split props*/\nvar PSCLSID = {\n\tSI: \"e0859ff2f94f6810ab9108002b27b3d9\",\n\tDSI: \"02d5cdd59c2e1b10939708002b2cf9ae\",\n\tUDI: \"05d5cdd59c2e1b10939708002b2cf9ae\"\n};\nfunction parse_xls_props(cfb/*:CFBContainer*/, props, o) {\n\t/* [MS-OSHARED] 2.3.3.2.2 Document Summary Information Property Set */\n\tvar DSI = CFB.find(cfb, '/!DocumentSummaryInformation');\n\tif(DSI && DSI.size > 0) try {\n\t\tvar DocSummary = parse_PropertySetStream(DSI, DocSummaryPIDDSI, PSCLSID.DSI);\n\t\tfor(var d in DocSummary) props[d] = DocSummary[d];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\t/* [MS-OSHARED] 2.3.3.2.1 Summary Information Property Set*/\n\tvar SI = CFB.find(cfb, '/!SummaryInformation');\n\tif(SI && SI.size > 0) try {\n\t\tvar Summary = parse_PropertySetStream(SI, SummaryPIDSI, PSCLSID.SI);\n\t\tfor(var s in Summary) if(props[s] == null) props[s] = Summary[s];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\tif(props.HeadingPairs && props.TitlesOfParts) {\n\t\tload_props_pairs(props.HeadingPairs, props.TitlesOfParts, props, o);\n\t\tdelete props.HeadingPairs; delete props.TitlesOfParts;\n\t}\n}\nfunction write_xls_props(wb/*:Workbook*/, cfb/*:CFBContainer*/) {\n\tvar DSEntries = [], SEntries = [], CEntries = [];\n\tvar i = 0, Keys;\n\tvar DocSummaryRE/*:{[key:string]:string}*/ = evert_key(DocSummaryPIDDSI, \"n\");\n\tvar SummaryRE/*:{[key:string]:string}*/ = evert_key(SummaryPIDSI, \"n\");\n\tif(wb.Props) {\n\t\tKeys = keys(wb.Props);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Props[Keys[i]]]);\n\t}\n\tif(wb.Custprops) {\n\t\tKeys = keys(wb.Custprops);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) if(!Object.prototype.hasOwnProperty.call((wb.Props||{}), Keys[i])) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Custprops[Keys[i]]]);\n\t}\n\tvar CEntries2 = [];\n\tfor(i = 0; i < CEntries.length; ++i) {\n\t\tif(XLSPSSkip.indexOf(CEntries[i][0]) > -1 || PseudoPropsPairs.indexOf(CEntries[i][0]) > -1) continue;\n\t\tif(CEntries[i][1] == null) continue;\n\t\tCEntries2.push(CEntries[i]);\n\t}\n\tif(SEntries.length) CFB.utils.cfb_add(cfb, \"/\\u0005SummaryInformation\", write_PropertySetStream(SEntries, PSCLSID.SI, SummaryRE, SummaryPIDSI));\n\tif(DSEntries.length || CEntries2.length) CFB.utils.cfb_add(cfb, \"/\\u0005DocumentSummaryInformation\", write_PropertySetStream(DSEntries, PSCLSID.DSI, DocSummaryRE, DocSummaryPIDDSI, CEntries2.length ? CEntries2 : null, PSCLSID.UDI));\n}\n\nfunction parse_xlscfb(cfb/*:any*/, options/*:?ParseOpts*/)/*:Workbook*/ {\nif(!options) options = {};\nfix_read_opts(options);\nreset_cp();\nif(options.codepage) set_ansi(options.codepage);\nvar CompObj/*:?CFBEntry*/, WB/*:?any*/;\nif(cfb.FullPaths) {\n\tif(CFB.find(cfb, '/encryption')) throw new Error(\"File is password-protected\");\n\tCompObj = CFB.find(cfb, '!CompObj');\n\tWB = CFB.find(cfb, '/Workbook') || CFB.find(cfb, '/Book');\n} else {\n\tswitch(options.type) {\n\t\tcase 'base64': cfb = s2a(Base64_decode(cfb)); break;\n\t\tcase 'binary': cfb = s2a(cfb); break;\n\t\tcase 'buffer': break;\n\t\tcase 'array': if(!Array.isArray(cfb)) cfb = Array.prototype.slice.call(cfb); break;\n\t}\n\tprep_blob(cfb, 0);\n\tWB = ({content: cfb}/*:any*/);\n}\nvar /*::CompObjP, */WorkbookP/*:: :Workbook = XLSX.utils.book_new(); */;\n\nvar _data/*:?any*/;\nif(CompObj) /*::CompObjP = */parse_compobj(CompObj);\nif(options.bookProps && !options.bookSheets) WorkbookP = ({}/*:any*/);\nelse/*:: if(cfb instanceof CFBContainer) */ {\n\tvar T = has_buf ? 'buffer' : 'array';\n\tif(WB && WB.content) WorkbookP = parse_workbook(WB.content, options);\n\t/* Quattro Pro 7-8 */\n\telse if((_data=CFB.find(cfb, 'PerfectOffice_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Quattro Pro 9 */\n\telse if((_data=CFB.find(cfb, 'NativeContent_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Works 4 for Mac */\n\telse if((_data=CFB.find(cfb, 'MN0')) && _data.content) throw new Error(\"Unsupported Works 4 for Mac file\");\n\telse throw new Error(\"Cannot find Workbook stream\");\n\tif(options.bookVBA && cfb.FullPaths && CFB.find(cfb, '/_VBA_PROJECT_CUR/VBA/dir')) WorkbookP.vbaraw = make_vba_xls(cfb);\n}\n\nvar props = {};\nif(cfb.FullPaths) parse_xls_props(/*::((*/cfb/*:: :any):CFBContainer)*/, props, options);\n\nWorkbookP.Props = WorkbookP.Custprops = props; /* TODO: split up properties */\nif(options.bookFiles) WorkbookP.cfb = cfb;\n/*WorkbookP.CompObjP = CompObjP; // TODO: storage? */\nreturn WorkbookP;\n}\n\n\nfunction write_xlscfb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:CFBContainer*/ {\n\tvar o = opts || {};\n\tvar cfb = CFB.utils.cfb_new({root:\"R\"});\n\tvar wbpath = \"/Workbook\";\n\tswitch(o.bookType || \"xls\") {\n\t\tcase \"xls\": o.bookType = \"biff8\";\n\t\t/* falls through */\n\t\tcase \"xla\": if(!o.bookType) o.bookType = \"xla\";\n\t\t/* falls through */\n\t\tcase \"biff8\": wbpath = \"/Workbook\"; o.biff = 8; break;\n\t\tcase \"biff5\": wbpath = \"/Book\"; o.biff = 5; break;\n\t\tdefault: throw new Error(\"invalid type \" + o.bookType + \" for XLS CFB\");\n\t}\n\tCFB.utils.cfb_add(cfb, wbpath, write_biff_buf(wb, o));\n\tif(o.biff == 8 && (wb.Props || wb.Custprops)) write_xls_props(wb, cfb);\n\t// TODO: SI, DSI, CO\n\tif(o.biff == 8 && wb.vbaraw) fill_vba_xls(cfb, CFB.read(wb.vbaraw, {type: typeof wb.vbaraw == \"string\" ? \"binary\" : \"buffer\"}));\n\treturn cfb;\n}\n/* [MS-XLSB] 2.3 Record Enumeration */\nvar XLSBRecordEnum = {\n\t/*::[*/0x0000/*::]*/: { /* n:\"BrtRowHdr\", */ f:parse_BrtRowHdr },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BrtCellBlank\", */ f:parse_BrtCellBlank },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BrtCellRk\", */ f:parse_BrtCellRk },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BrtCellError\", */ f:parse_BrtCellError },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BrtCellBool\", */ f:parse_BrtCellBool },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BrtCellReal\", */ f:parse_BrtCellReal },\n\t/*::[*/0x0006/*::]*/: { /* n:\"BrtCellSt\", */ f:parse_BrtCellSt },\n\t/*::[*/0x0007/*::]*/: { /* n:\"BrtCellIsst\", */ f:parse_BrtCellIsst },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BrtFmlaString\", */ f:parse_BrtFmlaString },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BrtFmlaNum\", */ f:parse_BrtFmlaNum },\n\t/*::[*/0x000A/*::]*/: { /* n:\"BrtFmlaBool\", */ f:parse_BrtFmlaBool },\n\t/*::[*/0x000B/*::]*/: { /* n:\"BrtFmlaError\", */ f:parse_BrtFmlaError },\n\t/*::[*/0x000C/*::]*/: { /* n:\"BrtShortBlank\", */ f:parse_BrtShortBlank },\n\t/*::[*/0x000D/*::]*/: { /* n:\"BrtShortRk\", */ f:parse_BrtShortRk },\n\t/*::[*/0x000E/*::]*/: { /* n:\"BrtShortError\", */ f:parse_BrtShortError },\n\t/*::[*/0x000F/*::]*/: { /* n:\"BrtShortBool\", */ f:parse_BrtShortBool },\n\t/*::[*/0x0010/*::]*/: { /* n:\"BrtShortReal\", */ f:parse_BrtShortReal },\n\t/*::[*/0x0011/*::]*/: { /* n:\"BrtShortSt\", */ f:parse_BrtShortSt },\n\t/*::[*/0x0012/*::]*/: { /* n:\"BrtShortIsst\", */ f:parse_BrtShortIsst },\n\t/*::[*/0x0013/*::]*/: { /* n:\"BrtSSTItem\", */ f:parse_RichStr },\n\t/*::[*/0x0014/*::]*/: { /* n:\"BrtPCDIMissing\" */ },\n\t/*::[*/0x0015/*::]*/: { /* n:\"BrtPCDINumber\" */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"BrtPCDIBoolean\" */ },\n\t/*::[*/0x0017/*::]*/: { /* n:\"BrtPCDIError\" */ },\n\t/*::[*/0x0018/*::]*/: { /* n:\"BrtPCDIString\" */ },\n\t/*::[*/0x0019/*::]*/: { /* n:\"BrtPCDIDatetime\" */ },\n\t/*::[*/0x001A/*::]*/: { /* n:\"BrtPCDIIndex\" */ },\n\t/*::[*/0x001B/*::]*/: { /* n:\"BrtPCDIAMissing\" */ },\n\t/*::[*/0x001C/*::]*/: { /* n:\"BrtPCDIANumber\" */ },\n\t/*::[*/0x001D/*::]*/: { /* n:\"BrtPCDIABoolean\" */ },\n\t/*::[*/0x001E/*::]*/: { /* n:\"BrtPCDIAError\" */ },\n\t/*::[*/0x001F/*::]*/: { /* n:\"BrtPCDIAString\" */ },\n\t/*::[*/0x0020/*::]*/: { /* n:\"BrtPCDIADatetime\" */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"BrtPCRRecord\" */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"BrtPCRRecordDt\" */ },\n\t/*::[*/0x0023/*::]*/: { /* n:\"BrtFRTBegin\", */ T:1 },\n\t/*::[*/0x0024/*::]*/: { /* n:\"BrtFRTEnd\", */ T:-1 },\n\t/*::[*/0x0025/*::]*/: { /* n:\"BrtACBegin\", */ T:1 },\n\t/*::[*/0x0026/*::]*/: { /* n:\"BrtACEnd\", */ T:-1 },\n\t/*::[*/0x0027/*::]*/: { /* n:\"BrtName\", */ f:parse_BrtName },\n\t/*::[*/0x0028/*::]*/: { /* n:\"BrtIndexRowBlock\" */ },\n\t/*::[*/0x002A/*::]*/: { /* n:\"BrtIndexBlock\" */ },\n\t/*::[*/0x002B/*::]*/: { /* n:\"BrtFont\", */ f:parse_BrtFont },\n\t/*::[*/0x002C/*::]*/: { /* n:\"BrtFmt\", */ f:parse_BrtFmt },\n\t/*::[*/0x002D/*::]*/: { /* n:\"BrtFill\", */ f:parse_BrtFill },\n\t/*::[*/0x002E/*::]*/: { /* n:\"BrtBorder\", */ f:parse_BrtBorder },\n\t/*::[*/0x002F/*::]*/: { /* n:\"BrtXF\", */ f:parse_BrtXF },\n\t/*::[*/0x0030/*::]*/: { /* n:\"BrtStyle\" */ },\n\t/*::[*/0x0031/*::]*/: { /* n:\"BrtCellMeta\", */ f:parse_Int32LE },\n\t/*::[*/0x0032/*::]*/: { /* n:\"BrtValueMeta\" */ },\n\t/*::[*/0x0033/*::]*/: { /* n:\"BrtMdb\" */ f:parse_BrtMdb },\n\t/*::[*/0x0034/*::]*/: { /* n:\"BrtBeginFmd\", */ T:1 },\n\t/*::[*/0x0035/*::]*/: { /* n:\"BrtEndFmd\", */ T:-1 },\n\t/*::[*/0x0036/*::]*/: { /* n:\"BrtBeginMdx\", */ T:1 },\n\t/*::[*/0x0037/*::]*/: { /* n:\"BrtEndMdx\", */ T:-1 },\n\t/*::[*/0x0038/*::]*/: { /* n:\"BrtBeginMdxTuple\", */ T:1 },\n\t/*::[*/0x0039/*::]*/: { /* n:\"BrtEndMdxTuple\", */ T:-1 },\n\t/*::[*/0x003A/*::]*/: { /* n:\"BrtMdxMbrIstr\" */ },\n\t/*::[*/0x003B/*::]*/: { /* n:\"BrtStr\" */ },\n\t/*::[*/0x003C/*::]*/: { /* n:\"BrtColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x003E/*::]*/: { /* n:\"BrtCellRString\", */ f:parse_BrtCellRString },\n\t/*::[*/0x003F/*::]*/: { /* n:\"BrtCalcChainItem$\", */ f:parse_BrtCalcChainItem$ },\n\t/*::[*/0x0040/*::]*/: { /* n:\"BrtDVal\", */ f:parse_BrtDVal },\n\t/*::[*/0x0041/*::]*/: { /* n:\"BrtSxvcellNum\" */ },\n\t/*::[*/0x0042/*::]*/: { /* n:\"BrtSxvcellStr\" */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BrtSxvcellBool\" */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BrtSxvcellErr\" */ },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BrtSxvcellDate\" */ },\n\t/*::[*/0x0046/*::]*/: { /* n:\"BrtSxvcellNil\" */ },\n\t/*::[*/0x0080/*::]*/: { /* n:\"BrtFileVersion\" */ },\n\t/*::[*/0x0081/*::]*/: { /* n:\"BrtBeginSheet\", */ T:1 },\n\t/*::[*/0x0082/*::]*/: { /* n:\"BrtEndSheet\", */ T:-1 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"BrtBeginBook\", */ T:1, f:parsenoop, p:0 },\n\t/*::[*/0x0084/*::]*/: { /* n:\"BrtEndBook\", */ T:-1 },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BrtBeginWsViews\", */ T:1 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"BrtEndWsViews\", */ T:-1 },\n\t/*::[*/0x0087/*::]*/: { /* n:\"BrtBeginBookViews\", */ T:1 },\n\t/*::[*/0x0088/*::]*/: { /* n:\"BrtEndBookViews\", */ T:-1 },\n\t/*::[*/0x0089/*::]*/: { /* n:\"BrtBeginWsView\", */ T:1, f:parse_BrtBeginWsView },\n\t/*::[*/0x008A/*::]*/: { /* n:\"BrtEndWsView\", */ T:-1 },\n\t/*::[*/0x008B/*::]*/: { /* n:\"BrtBeginCsViews\", */ T:1 },\n\t/*::[*/0x008C/*::]*/: { /* n:\"BrtEndCsViews\", */ T:-1 },\n\t/*::[*/0x008D/*::]*/: { /* n:\"BrtBeginCsView\", */ T:1 },\n\t/*::[*/0x008E/*::]*/: { /* n:\"BrtEndCsView\", */ T:-1 },\n\t/*::[*/0x008F/*::]*/: { /* n:\"BrtBeginBundleShs\", */ T:1 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"BrtEndBundleShs\", */ T:-1 },\n\t/*::[*/0x0091/*::]*/: { /* n:\"BrtBeginSheetData\", */ T:1 },\n\t/*::[*/0x0092/*::]*/: { /* n:\"BrtEndSheetData\", */ T:-1 },\n\t/*::[*/0x0093/*::]*/: { /* n:\"BrtWsProp\", */ f:parse_BrtWsProp },\n\t/*::[*/0x0094/*::]*/: { /* n:\"BrtWsDim\", */ f:parse_BrtWsDim, p:16 },\n\t/*::[*/0x0097/*::]*/: { /* n:\"BrtPane\", */ f:parse_BrtPane },\n\t/*::[*/0x0098/*::]*/: { /* n:\"BrtSel\" */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"BrtWbProp\", */ f:parse_BrtWbProp },\n\t/*::[*/0x009A/*::]*/: { /* n:\"BrtWbFactoid\" */ },\n\t/*::[*/0x009B/*::]*/: { /* n:\"BrtFileRecover\" */ },\n\t/*::[*/0x009C/*::]*/: { /* n:\"BrtBundleSh\", */ f:parse_BrtBundleSh },\n\t/*::[*/0x009D/*::]*/: { /* n:\"BrtCalcProp\" */ },\n\t/*::[*/0x009E/*::]*/: { /* n:\"BrtBookView\" */ },\n\t/*::[*/0x009F/*::]*/: { /* n:\"BrtBeginSst\", */ T:1, f:parse_BrtBeginSst },\n\t/*::[*/0x00A0/*::]*/: { /* n:\"BrtEndSst\", */ T:-1 },\n\t/*::[*/0x00A1/*::]*/: { /* n:\"BrtBeginAFilter\", */ T:1, f:parse_UncheckedRfX },\n\t/*::[*/0x00A2/*::]*/: { /* n:\"BrtEndAFilter\", */ T:-1 },\n\t/*::[*/0x00A3/*::]*/: { /* n:\"BrtBeginFilterColumn\", */ T:1 },\n\t/*::[*/0x00A4/*::]*/: { /* n:\"BrtEndFilterColumn\", */ T:-1 },\n\t/*::[*/0x00A5/*::]*/: { /* n:\"BrtBeginFilters\", */ T:1 },\n\t/*::[*/0x00A6/*::]*/: { /* n:\"BrtEndFilters\", */ T:-1 },\n\t/*::[*/0x00A7/*::]*/: { /* n:\"BrtFilter\" */ },\n\t/*::[*/0x00A8/*::]*/: { /* n:\"BrtColorFilter\" */ },\n\t/*::[*/0x00A9/*::]*/: { /* n:\"BrtIconFilter\" */ },\n\t/*::[*/0x00AA/*::]*/: { /* n:\"BrtTop10Filter\" */ },\n\t/*::[*/0x00AB/*::]*/: { /* n:\"BrtDynamicFilter\" */ },\n\t/*::[*/0x00AC/*::]*/: { /* n:\"BrtBeginCustomFilters\", */ T:1 },\n\t/*::[*/0x00AD/*::]*/: { /* n:\"BrtEndCustomFilters\", */ T:-1 },\n\t/*::[*/0x00AE/*::]*/: { /* n:\"BrtCustomFilter\" */ },\n\t/*::[*/0x00AF/*::]*/: { /* n:\"BrtAFilterDateGroupItem\" */ },\n\t/*::[*/0x00B0/*::]*/: { /* n:\"BrtMergeCell\", */ f:parse_BrtMergeCell },\n\t/*::[*/0x00B1/*::]*/: { /* n:\"BrtBeginMergeCells\", */ T:1 },\n\t/*::[*/0x00B2/*::]*/: { /* n:\"BrtEndMergeCells\", */ T:-1 },\n\t/*::[*/0x00B3/*::]*/: { /* n:\"BrtBeginPivotCacheDef\", */ T:1 },\n\t/*::[*/0x00B4/*::]*/: { /* n:\"BrtEndPivotCacheDef\", */ T:-1 },\n\t/*::[*/0x00B5/*::]*/: { /* n:\"BrtBeginPCDFields\", */ T:1 },\n\t/*::[*/0x00B6/*::]*/: { /* n:\"BrtEndPCDFields\", */ T:-1 },\n\t/*::[*/0x00B7/*::]*/: { /* n:\"BrtBeginPCDField\", */ T:1 },\n\t/*::[*/0x00B8/*::]*/: { /* n:\"BrtEndPCDField\", */ T:-1 },\n\t/*::[*/0x00B9/*::]*/: { /* n:\"BrtBeginPCDSource\", */ T:1 },\n\t/*::[*/0x00BA/*::]*/: { /* n:\"BrtEndPCDSource\", */ T:-1 },\n\t/*::[*/0x00BB/*::]*/: { /* n:\"BrtBeginPCDSRange\", */ T:1 },\n\t/*::[*/0x00BC/*::]*/: { /* n:\"BrtEndPCDSRange\", */ T:-1 },\n\t/*::[*/0x00BD/*::]*/: { /* n:\"BrtBeginPCDFAtbl\", */ T:1 },\n\t/*::[*/0x00BE/*::]*/: { /* n:\"BrtEndPCDFAtbl\", */ T:-1 },\n\t/*::[*/0x00BF/*::]*/: { /* n:\"BrtBeginPCDIRun\", */ T:1 },\n\t/*::[*/0x00C0/*::]*/: { /* n:\"BrtEndPCDIRun\", */ T:-1 },\n\t/*::[*/0x00C1/*::]*/: { /* n:\"BrtBeginPivotCacheRecords\", */ T:1 },\n\t/*::[*/0x00C2/*::]*/: { /* n:\"BrtEndPivotCacheRecords\", */ T:-1 },\n\t/*::[*/0x00C3/*::]*/: { /* n:\"BrtBeginPCDHierarchies\", */ T:1 },\n\t/*::[*/0x00C4/*::]*/: { /* n:\"BrtEndPCDHierarchies\", */ T:-1 },\n\t/*::[*/0x00C5/*::]*/: { /* n:\"BrtBeginPCDHierarchy\", */ T:1 },\n\t/*::[*/0x00C6/*::]*/: { /* n:\"BrtEndPCDHierarchy\", */ T:-1 },\n\t/*::[*/0x00C7/*::]*/: { /* n:\"BrtBeginPCDHFieldsUsage\", */ T:1 },\n\t/*::[*/0x00C8/*::]*/: { /* n:\"BrtEndPCDHFieldsUsage\", */ T:-1 },\n\t/*::[*/0x00C9/*::]*/: { /* n:\"BrtBeginExtConnection\", */ T:1 },\n\t/*::[*/0x00CA/*::]*/: { /* n:\"BrtEndExtConnection\", */ T:-1 },\n\t/*::[*/0x00CB/*::]*/: { /* n:\"BrtBeginECDbProps\", */ T:1 },\n\t/*::[*/0x00CC/*::]*/: { /* n:\"BrtEndECDbProps\", */ T:-1 },\n\t/*::[*/0x00CD/*::]*/: { /* n:\"BrtBeginECOlapProps\", */ T:1 },\n\t/*::[*/0x00CE/*::]*/: { /* n:\"BrtEndECOlapProps\", */ T:-1 },\n\t/*::[*/0x00CF/*::]*/: { /* n:\"BrtBeginPCDSConsol\", */ T:1 },\n\t/*::[*/0x00D0/*::]*/: { /* n:\"BrtEndPCDSConsol\", */ T:-1 },\n\t/*::[*/0x00D1/*::]*/: { /* n:\"BrtBeginPCDSCPages\", */ T:1 },\n\t/*::[*/0x00D2/*::]*/: { /* n:\"BrtEndPCDSCPages\", */ T:-1 },\n\t/*::[*/0x00D3/*::]*/: { /* n:\"BrtBeginPCDSCPage\", */ T:1 },\n\t/*::[*/0x00D4/*::]*/: { /* n:\"BrtEndPCDSCPage\", */ T:-1 },\n\t/*::[*/0x00D5/*::]*/: { /* n:\"BrtBeginPCDSCPItem\", */ T:1 },\n\t/*::[*/0x00D6/*::]*/: { /* n:\"BrtEndPCDSCPItem\", */ T:-1 },\n\t/*::[*/0x00D7/*::]*/: { /* n:\"BrtBeginPCDSCSets\", */ T:1 },\n\t/*::[*/0x00D8/*::]*/: { /* n:\"BrtEndPCDSCSets\", */ T:-1 },\n\t/*::[*/0x00D9/*::]*/: { /* n:\"BrtBeginPCDSCSet\", */ T:1 },\n\t/*::[*/0x00DA/*::]*/: { /* n:\"BrtEndPCDSCSet\", */ T:-1 },\n\t/*::[*/0x00DB/*::]*/: { /* n:\"BrtBeginPCDFGroup\", */ T:1 },\n\t/*::[*/0x00DC/*::]*/: { /* n:\"BrtEndPCDFGroup\", */ T:-1 },\n\t/*::[*/0x00DD/*::]*/: { /* n:\"BrtBeginPCDFGItems\", */ T:1 },\n\t/*::[*/0x00DE/*::]*/: { /* n:\"BrtEndPCDFGItems\", */ T:-1 },\n\t/*::[*/0x00DF/*::]*/: { /* n:\"BrtBeginPCDFGRange\", */ T:1 },\n\t/*::[*/0x00E0/*::]*/: { /* n:\"BrtEndPCDFGRange\", */ T:-1 },\n\t/*::[*/0x00E1/*::]*/: { /* n:\"BrtBeginPCDFGDiscrete\", */ T:1 },\n\t/*::[*/0x00E2/*::]*/: { /* n:\"BrtEndPCDFGDiscrete\", */ T:-1 },\n\t/*::[*/0x00E3/*::]*/: { /* n:\"BrtBeginPCDSDTupleCache\", */ T:1 },\n\t/*::[*/0x00E4/*::]*/: { /* n:\"BrtEndPCDSDTupleCache\", */ T:-1 },\n\t/*::[*/0x00E5/*::]*/: { /* n:\"BrtBeginPCDSDTCEntries\", */ T:1 },\n\t/*::[*/0x00E6/*::]*/: { /* n:\"BrtEndPCDSDTCEntries\", */ T:-1 },\n\t/*::[*/0x00E7/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembers\", */ T:1 },\n\t/*::[*/0x00E8/*::]*/: { /* n:\"BrtEndPCDSDTCEMembers\", */ T:-1 },\n\t/*::[*/0x00E9/*::]*/: { /* n:\"BrtBeginPCDSDTCEMember\", */ T:1 },\n\t/*::[*/0x00EA/*::]*/: { /* n:\"BrtEndPCDSDTCEMember\", */ T:-1 },\n\t/*::[*/0x00EB/*::]*/: { /* n:\"BrtBeginPCDSDTCQueries\", */ T:1 },\n\t/*::[*/0x00EC/*::]*/: { /* n:\"BrtEndPCDSDTCQueries\", */ T:-1 },\n\t/*::[*/0x00ED/*::]*/: { /* n:\"BrtBeginPCDSDTCQuery\", */ T:1 },\n\t/*::[*/0x00EE/*::]*/: { /* n:\"BrtEndPCDSDTCQuery\", */ T:-1 },\n\t/*::[*/0x00EF/*::]*/: { /* n:\"BrtBeginPCDSDTCSets\", */ T:1 },\n\t/*::[*/0x00F0/*::]*/: { /* n:\"BrtEndPCDSDTCSets\", */ T:-1 },\n\t/*::[*/0x00F1/*::]*/: { /* n:\"BrtBeginPCDSDTCSet\", */ T:1 },\n\t/*::[*/0x00F2/*::]*/: { /* n:\"BrtEndPCDSDTCSet\", */ T:-1 },\n\t/*::[*/0x00F3/*::]*/: { /* n:\"BrtBeginPCDCalcItems\", */ T:1 },\n\t/*::[*/0x00F4/*::]*/: { /* n:\"BrtEndPCDCalcItems\", */ T:-1 },\n\t/*::[*/0x00F5/*::]*/: { /* n:\"BrtBeginPCDCalcItem\", */ T:1 },\n\t/*::[*/0x00F6/*::]*/: { /* n:\"BrtEndPCDCalcItem\", */ T:-1 },\n\t/*::[*/0x00F7/*::]*/: { /* n:\"BrtBeginPRule\", */ T:1 },\n\t/*::[*/0x00F8/*::]*/: { /* n:\"BrtEndPRule\", */ T:-1 },\n\t/*::[*/0x00F9/*::]*/: { /* n:\"BrtBeginPRFilters\", */ T:1 },\n\t/*::[*/0x00FA/*::]*/: { /* n:\"BrtEndPRFilters\", */ T:-1 },\n\t/*::[*/0x00FB/*::]*/: { /* n:\"BrtBeginPRFilter\", */ T:1 },\n\t/*::[*/0x00FC/*::]*/: { /* n:\"BrtEndPRFilter\", */ T:-1 },\n\t/*::[*/0x00FD/*::]*/: { /* n:\"BrtBeginPNames\", */ T:1 },\n\t/*::[*/0x00FE/*::]*/: { /* n:\"BrtEndPNames\", */ T:-1 },\n\t/*::[*/0x00FF/*::]*/: { /* n:\"BrtBeginPName\", */ T:1 },\n\t/*::[*/0x0100/*::]*/: { /* n:\"BrtEndPName\", */ T:-1 },\n\t/*::[*/0x0101/*::]*/: { /* n:\"BrtBeginPNPairs\", */ T:1 },\n\t/*::[*/0x0102/*::]*/: { /* n:\"BrtEndPNPairs\", */ T:-1 },\n\t/*::[*/0x0103/*::]*/: { /* n:\"BrtBeginPNPair\", */ T:1 },\n\t/*::[*/0x0104/*::]*/: { /* n:\"BrtEndPNPair\", */ T:-1 },\n\t/*::[*/0x0105/*::]*/: { /* n:\"BrtBeginECWebProps\", */ T:1 },\n\t/*::[*/0x0106/*::]*/: { /* n:\"BrtEndECWebProps\", */ T:-1 },\n\t/*::[*/0x0107/*::]*/: { /* n:\"BrtBeginEcWpTables\", */ T:1 },\n\t/*::[*/0x0108/*::]*/: { /* n:\"BrtEndECWPTables\", */ T:-1 },\n\t/*::[*/0x0109/*::]*/: { /* n:\"BrtBeginECParams\", */ T:1 },\n\t/*::[*/0x010A/*::]*/: { /* n:\"BrtEndECParams\", */ T:-1 },\n\t/*::[*/0x010B/*::]*/: { /* n:\"BrtBeginECParam\", */ T:1 },\n\t/*::[*/0x010C/*::]*/: { /* n:\"BrtEndECParam\", */ T:-1 },\n\t/*::[*/0x010D/*::]*/: { /* n:\"BrtBeginPCDKPIs\", */ T:1 },\n\t/*::[*/0x010E/*::]*/: { /* n:\"BrtEndPCDKPIs\", */ T:-1 },\n\t/*::[*/0x010F/*::]*/: { /* n:\"BrtBeginPCDKPI\", */ T:1 },\n\t/*::[*/0x0110/*::]*/: { /* n:\"BrtEndPCDKPI\", */ T:-1 },\n\t/*::[*/0x0111/*::]*/: { /* n:\"BrtBeginDims\", */ T:1 },\n\t/*::[*/0x0112/*::]*/: { /* n:\"BrtEndDims\", */ T:-1 },\n\t/*::[*/0x0113/*::]*/: { /* n:\"BrtBeginDim\", */ T:1 },\n\t/*::[*/0x0114/*::]*/: { /* n:\"BrtEndDim\", */ T:-1 },\n\t/*::[*/0x0115/*::]*/: { /* n:\"BrtIndexPartEnd\" */ },\n\t/*::[*/0x0116/*::]*/: { /* n:\"BrtBeginStyleSheet\", */ T:1 },\n\t/*::[*/0x0117/*::]*/: { /* n:\"BrtEndStyleSheet\", */ T:-1 },\n\t/*::[*/0x0118/*::]*/: { /* n:\"BrtBeginSXView\", */ T:1 },\n\t/*::[*/0x0119/*::]*/: { /* n:\"BrtEndSXVI\", */ T:-1 },\n\t/*::[*/0x011A/*::]*/: { /* n:\"BrtBeginSXVI\", */ T:1 },\n\t/*::[*/0x011B/*::]*/: { /* n:\"BrtBeginSXVIs\", */ T:1 },\n\t/*::[*/0x011C/*::]*/: { /* n:\"BrtEndSXVIs\", */ T:-1 },\n\t/*::[*/0x011D/*::]*/: { /* n:\"BrtBeginSXVD\", */ T:1 },\n\t/*::[*/0x011E/*::]*/: { /* n:\"BrtEndSXVD\", */ T:-1 },\n\t/*::[*/0x011F/*::]*/: { /* n:\"BrtBeginSXVDs\", */ T:1 },\n\t/*::[*/0x0120/*::]*/: { /* n:\"BrtEndSXVDs\", */ T:-1 },\n\t/*::[*/0x0121/*::]*/: { /* n:\"BrtBeginSXPI\", */ T:1 },\n\t/*::[*/0x0122/*::]*/: { /* n:\"BrtEndSXPI\", */ T:-1 },\n\t/*::[*/0x0123/*::]*/: { /* n:\"BrtBeginSXPIs\", */ T:1 },\n\t/*::[*/0x0124/*::]*/: { /* n:\"BrtEndSXPIs\", */ T:-1 },\n\t/*::[*/0x0125/*::]*/: { /* n:\"BrtBeginSXDI\", */ T:1 },\n\t/*::[*/0x0126/*::]*/: { /* n:\"BrtEndSXDI\", */ T:-1 },\n\t/*::[*/0x0127/*::]*/: { /* n:\"BrtBeginSXDIs\", */ T:1 },\n\t/*::[*/0x0128/*::]*/: { /* n:\"BrtEndSXDIs\", */ T:-1 },\n\t/*::[*/0x0129/*::]*/: { /* n:\"BrtBeginSXLI\", */ T:1 },\n\t/*::[*/0x012A/*::]*/: { /* n:\"BrtEndSXLI\", */ T:-1 },\n\t/*::[*/0x012B/*::]*/: { /* n:\"BrtBeginSXLIRws\", */ T:1 },\n\t/*::[*/0x012C/*::]*/: { /* n:\"BrtEndSXLIRws\", */ T:-1 },\n\t/*::[*/0x012D/*::]*/: { /* n:\"BrtBeginSXLICols\", */ T:1 },\n\t/*::[*/0x012E/*::]*/: { /* n:\"BrtEndSXLICols\", */ T:-1 },\n\t/*::[*/0x012F/*::]*/: { /* n:\"BrtBeginSXFormat\", */ T:1 },\n\t/*::[*/0x0130/*::]*/: { /* n:\"BrtEndSXFormat\", */ T:-1 },\n\t/*::[*/0x0131/*::]*/: { /* n:\"BrtBeginSXFormats\", */ T:1 },\n\t/*::[*/0x0132/*::]*/: { /* n:\"BrtEndSxFormats\", */ T:-1 },\n\t/*::[*/0x0133/*::]*/: { /* n:\"BrtBeginSxSelect\", */ T:1 },\n\t/*::[*/0x0134/*::]*/: { /* n:\"BrtEndSxSelect\", */ T:-1 },\n\t/*::[*/0x0135/*::]*/: { /* n:\"BrtBeginISXVDRws\", */ T:1 },\n\t/*::[*/0x0136/*::]*/: { /* n:\"BrtEndISXVDRws\", */ T:-1 },\n\t/*::[*/0x0137/*::]*/: { /* n:\"BrtBeginISXVDCols\", */ T:1 },\n\t/*::[*/0x0138/*::]*/: { /* n:\"BrtEndISXVDCols\", */ T:-1 },\n\t/*::[*/0x0139/*::]*/: { /* n:\"BrtEndSXLocation\", */ T:-1 },\n\t/*::[*/0x013A/*::]*/: { /* n:\"BrtBeginSXLocation\", */ T:1 },\n\t/*::[*/0x013B/*::]*/: { /* n:\"BrtEndSXView\", */ T:-1 },\n\t/*::[*/0x013C/*::]*/: { /* n:\"BrtBeginSXTHs\", */ T:1 },\n\t/*::[*/0x013D/*::]*/: { /* n:\"BrtEndSXTHs\", */ T:-1 },\n\t/*::[*/0x013E/*::]*/: { /* n:\"BrtBeginSXTH\", */ T:1 },\n\t/*::[*/0x013F/*::]*/: { /* n:\"BrtEndSXTH\", */ T:-1 },\n\t/*::[*/0x0140/*::]*/: { /* n:\"BrtBeginISXTHRws\", */ T:1 },\n\t/*::[*/0x0141/*::]*/: { /* n:\"BrtEndISXTHRws\", */ T:-1 },\n\t/*::[*/0x0142/*::]*/: { /* n:\"BrtBeginISXTHCols\", */ T:1 },\n\t/*::[*/0x0143/*::]*/: { /* n:\"BrtEndISXTHCols\", */ T:-1 },\n\t/*::[*/0x0144/*::]*/: { /* n:\"BrtBeginSXTDMPS\", */ T:1 },\n\t/*::[*/0x0145/*::]*/: { /* n:\"BrtEndSXTDMPs\", */ T:-1 },\n\t/*::[*/0x0146/*::]*/: { /* n:\"BrtBeginSXTDMP\", */ T:1 },\n\t/*::[*/0x0147/*::]*/: { /* n:\"BrtEndSXTDMP\", */ T:-1 },\n\t/*::[*/0x0148/*::]*/: { /* n:\"BrtBeginSXTHItems\", */ T:1 },\n\t/*::[*/0x0149/*::]*/: { /* n:\"BrtEndSXTHItems\", */ T:-1 },\n\t/*::[*/0x014A/*::]*/: { /* n:\"BrtBeginSXTHItem\", */ T:1 },\n\t/*::[*/0x014B/*::]*/: { /* n:\"BrtEndSXTHItem\", */ T:-1 },\n\t/*::[*/0x014C/*::]*/: { /* n:\"BrtBeginMetadata\", */ T:1 },\n\t/*::[*/0x014D/*::]*/: { /* n:\"BrtEndMetadata\", */ T:-1 },\n\t/*::[*/0x014E/*::]*/: { /* n:\"BrtBeginEsmdtinfo\", */ T:1 },\n\t/*::[*/0x014F/*::]*/: { /* n:\"BrtMdtinfo\", */ f:parse_BrtMdtinfo },\n\t/*::[*/0x0150/*::]*/: { /* n:\"BrtEndEsmdtinfo\", */ T:-1 },\n\t/*::[*/0x0151/*::]*/: { /* n:\"BrtBeginEsmdb\", */ f:parse_BrtBeginEsmdb, T:1 },\n\t/*::[*/0x0152/*::]*/: { /* n:\"BrtEndEsmdb\", */ T:-1 },\n\t/*::[*/0x0153/*::]*/: { /* n:\"BrtBeginEsfmd\", */ T:1 },\n\t/*::[*/0x0154/*::]*/: { /* n:\"BrtEndEsfmd\", */ T:-1 },\n\t/*::[*/0x0155/*::]*/: { /* n:\"BrtBeginSingleCells\", */ T:1 },\n\t/*::[*/0x0156/*::]*/: { /* n:\"BrtEndSingleCells\", */ T:-1 },\n\t/*::[*/0x0157/*::]*/: { /* n:\"BrtBeginList\", */ T:1 },\n\t/*::[*/0x0158/*::]*/: { /* n:\"BrtEndList\", */ T:-1 },\n\t/*::[*/0x0159/*::]*/: { /* n:\"BrtBeginListCols\", */ T:1 },\n\t/*::[*/0x015A/*::]*/: { /* n:\"BrtEndListCols\", */ T:-1 },\n\t/*::[*/0x015B/*::]*/: { /* n:\"BrtBeginListCol\", */ T:1 },\n\t/*::[*/0x015C/*::]*/: { /* n:\"BrtEndListCol\", */ T:-1 },\n\t/*::[*/0x015D/*::]*/: { /* n:\"BrtBeginListXmlCPr\", */ T:1 },\n\t/*::[*/0x015E/*::]*/: { /* n:\"BrtEndListXmlCPr\", */ T:-1 },\n\t/*::[*/0x015F/*::]*/: { /* n:\"BrtListCCFmla\" */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"BrtListTrFmla\" */ },\n\t/*::[*/0x0161/*::]*/: { /* n:\"BrtBeginExternals\", */ T:1 },\n\t/*::[*/0x0162/*::]*/: { /* n:\"BrtEndExternals\", */ T:-1 },\n\t/*::[*/0x0163/*::]*/: { /* n:\"BrtSupBookSrc\", */ f:parse_RelID},\n\t/*::[*/0x0165/*::]*/: { /* n:\"BrtSupSelf\" */ },\n\t/*::[*/0x0166/*::]*/: { /* n:\"BrtSupSame\" */ },\n\t/*::[*/0x0167/*::]*/: { /* n:\"BrtSupTabs\" */ },\n\t/*::[*/0x0168/*::]*/: { /* n:\"BrtBeginSupBook\", */ T:1 },\n\t/*::[*/0x0169/*::]*/: { /* n:\"BrtPlaceholderName\" */ },\n\t/*::[*/0x016A/*::]*/: { /* n:\"BrtExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x016B/*::]*/: { /* n:\"BrtExternTableStart\" */ },\n\t/*::[*/0x016C/*::]*/: { /* n:\"BrtExternTableEnd\" */ },\n\t/*::[*/0x016E/*::]*/: { /* n:\"BrtExternRowHdr\" */ },\n\t/*::[*/0x016F/*::]*/: { /* n:\"BrtExternCellBlank\" */ },\n\t/*::[*/0x0170/*::]*/: { /* n:\"BrtExternCellReal\" */ },\n\t/*::[*/0x0171/*::]*/: { /* n:\"BrtExternCellBool\" */ },\n\t/*::[*/0x0172/*::]*/: { /* n:\"BrtExternCellError\" */ },\n\t/*::[*/0x0173/*::]*/: { /* n:\"BrtExternCellString\" */ },\n\t/*::[*/0x0174/*::]*/: { /* n:\"BrtBeginEsmdx\", */ T:1 },\n\t/*::[*/0x0175/*::]*/: { /* n:\"BrtEndEsmdx\", */ T:-1 },\n\t/*::[*/0x0176/*::]*/: { /* n:\"BrtBeginMdxSet\", */ T:1 },\n\t/*::[*/0x0177/*::]*/: { /* n:\"BrtEndMdxSet\", */ T:-1 },\n\t/*::[*/0x0178/*::]*/: { /* n:\"BrtBeginMdxMbrProp\", */ T:1 },\n\t/*::[*/0x0179/*::]*/: { /* n:\"BrtEndMdxMbrProp\", */ T:-1 },\n\t/*::[*/0x017A/*::]*/: { /* n:\"BrtBeginMdxKPI\", */ T:1 },\n\t/*::[*/0x017B/*::]*/: { /* n:\"BrtEndMdxKPI\", */ T:-1 },\n\t/*::[*/0x017C/*::]*/: { /* n:\"BrtBeginEsstr\", */ T:1 },\n\t/*::[*/0x017D/*::]*/: { /* n:\"BrtEndEsstr\", */ T:-1 },\n\t/*::[*/0x017E/*::]*/: { /* n:\"BrtBeginPRFItem\", */ T:1 },\n\t/*::[*/0x017F/*::]*/: { /* n:\"BrtEndPRFItem\", */ T:-1 },\n\t/*::[*/0x0180/*::]*/: { /* n:\"BrtBeginPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0181/*::]*/: { /* n:\"BrtEndPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0182/*::]*/: { /* n:\"BrtBeginPivotCacheID\", */ T:1 },\n\t/*::[*/0x0183/*::]*/: { /* n:\"BrtEndPivotCacheID\", */ T:-1 },\n\t/*::[*/0x0184/*::]*/: { /* n:\"BrtBeginISXVIs\", */ T:1 },\n\t/*::[*/0x0185/*::]*/: { /* n:\"BrtEndISXVIs\", */ T:-1 },\n\t/*::[*/0x0186/*::]*/: { /* n:\"BrtBeginColInfos\", */ T:1 },\n\t/*::[*/0x0187/*::]*/: { /* n:\"BrtEndColInfos\", */ T:-1 },\n\t/*::[*/0x0188/*::]*/: { /* n:\"BrtBeginRwBrk\", */ T:1 },\n\t/*::[*/0x0189/*::]*/: { /* n:\"BrtEndRwBrk\", */ T:-1 },\n\t/*::[*/0x018A/*::]*/: { /* n:\"BrtBeginColBrk\", */ T:1 },\n\t/*::[*/0x018B/*::]*/: { /* n:\"BrtEndColBrk\", */ T:-1 },\n\t/*::[*/0x018C/*::]*/: { /* n:\"BrtBrk\" */ },\n\t/*::[*/0x018D/*::]*/: { /* n:\"BrtUserBookView\" */ },\n\t/*::[*/0x018E/*::]*/: { /* n:\"BrtInfo\" */ },\n\t/*::[*/0x018F/*::]*/: { /* n:\"BrtCUsr\" */ },\n\t/*::[*/0x0190/*::]*/: { /* n:\"BrtUsr\" */ },\n\t/*::[*/0x0191/*::]*/: { /* n:\"BrtBeginUsers\", */ T:1 },\n\t/*::[*/0x0193/*::]*/: { /* n:\"BrtEOF\" */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"BrtUCR\" */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"BrtRRInsDel\" */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"BrtRREndInsDel\" */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BrtRRMove\" */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"BrtRREndMove\" */ },\n\t/*::[*/0x0199/*::]*/: { /* n:\"BrtRRChgCell\" */ },\n\t/*::[*/0x019A/*::]*/: { /* n:\"BrtRREndChgCell\" */ },\n\t/*::[*/0x019B/*::]*/: { /* n:\"BrtRRHeader\" */ },\n\t/*::[*/0x019C/*::]*/: { /* n:\"BrtRRUserView\" */ },\n\t/*::[*/0x019D/*::]*/: { /* n:\"BrtRRRenSheet\" */ },\n\t/*::[*/0x019E/*::]*/: { /* n:\"BrtRRInsertSh\" */ },\n\t/*::[*/0x019F/*::]*/: { /* n:\"BrtRRDefName\" */ },\n\t/*::[*/0x01A0/*::]*/: { /* n:\"BrtRRNote\" */ },\n\t/*::[*/0x01A1/*::]*/: { /* n:\"BrtRRConflict\" */ },\n\t/*::[*/0x01A2/*::]*/: { /* n:\"BrtRRTQSIF\" */ },\n\t/*::[*/0x01A3/*::]*/: { /* n:\"BrtRRFormat\" */ },\n\t/*::[*/0x01A4/*::]*/: { /* n:\"BrtRREndFormat\" */ },\n\t/*::[*/0x01A5/*::]*/: { /* n:\"BrtRRAutoFmt\" */ },\n\t/*::[*/0x01A6/*::]*/: { /* n:\"BrtBeginUserShViews\", */ T:1 },\n\t/*::[*/0x01A7/*::]*/: { /* n:\"BrtBeginUserShView\", */ T:1 },\n\t/*::[*/0x01A8/*::]*/: { /* n:\"BrtEndUserShView\", */ T:-1 },\n\t/*::[*/0x01A9/*::]*/: { /* n:\"BrtEndUserShViews\", */ T:-1 },\n\t/*::[*/0x01AA/*::]*/: { /* n:\"BrtArrFmla\", */ f:parse_BrtArrFmla },\n\t/*::[*/0x01AB/*::]*/: { /* n:\"BrtShrFmla\", */ f:parse_BrtShrFmla },\n\t/*::[*/0x01AC/*::]*/: { /* n:\"BrtTable\" */ },\n\t/*::[*/0x01AD/*::]*/: { /* n:\"BrtBeginExtConnections\", */ T:1 },\n\t/*::[*/0x01AE/*::]*/: { /* n:\"BrtEndExtConnections\", */ T:-1 },\n\t/*::[*/0x01AF/*::]*/: { /* n:\"BrtBeginPCDCalcMems\", */ T:1 },\n\t/*::[*/0x01B0/*::]*/: { /* n:\"BrtEndPCDCalcMems\", */ T:-1 },\n\t/*::[*/0x01B1/*::]*/: { /* n:\"BrtBeginPCDCalcMem\", */ T:1 },\n\t/*::[*/0x01B2/*::]*/: { /* n:\"BrtEndPCDCalcMem\", */ T:-1 },\n\t/*::[*/0x01B3/*::]*/: { /* n:\"BrtBeginPCDHGLevels\", */ T:1 },\n\t/*::[*/0x01B4/*::]*/: { /* n:\"BrtEndPCDHGLevels\", */ T:-1 },\n\t/*::[*/0x01B5/*::]*/: { /* n:\"BrtBeginPCDHGLevel\", */ T:1 },\n\t/*::[*/0x01B6/*::]*/: { /* n:\"BrtEndPCDHGLevel\", */ T:-1 },\n\t/*::[*/0x01B7/*::]*/: { /* n:\"BrtBeginPCDHGLGroups\", */ T:1 },\n\t/*::[*/0x01B8/*::]*/: { /* n:\"BrtEndPCDHGLGroups\", */ T:-1 },\n\t/*::[*/0x01B9/*::]*/: { /* n:\"BrtBeginPCDHGLGroup\", */ T:1 },\n\t/*::[*/0x01BA/*::]*/: { /* n:\"BrtEndPCDHGLGroup\", */ T:-1 },\n\t/*::[*/0x01BB/*::]*/: { /* n:\"BrtBeginPCDHGLGMembers\", */ T:1 },\n\t/*::[*/0x01BC/*::]*/: { /* n:\"BrtEndPCDHGLGMembers\", */ T:-1 },\n\t/*::[*/0x01BD/*::]*/: { /* n:\"BrtBeginPCDHGLGMember\", */ T:1 },\n\t/*::[*/0x01BE/*::]*/: { /* n:\"BrtEndPCDHGLGMember\", */ T:-1 },\n\t/*::[*/0x01BF/*::]*/: { /* n:\"BrtBeginQSI\", */ T:1 },\n\t/*::[*/0x01C0/*::]*/: { /* n:\"BrtEndQSI\", */ T:-1 },\n\t/*::[*/0x01C1/*::]*/: { /* n:\"BrtBeginQSIR\", */ T:1 },\n\t/*::[*/0x01C2/*::]*/: { /* n:\"BrtEndQSIR\", */ T:-1 },\n\t/*::[*/0x01C3/*::]*/: { /* n:\"BrtBeginDeletedNames\", */ T:1 },\n\t/*::[*/0x01C4/*::]*/: { /* n:\"BrtEndDeletedNames\", */ T:-1 },\n\t/*::[*/0x01C5/*::]*/: { /* n:\"BrtBeginDeletedName\", */ T:1 },\n\t/*::[*/0x01C6/*::]*/: { /* n:\"BrtEndDeletedName\", */ T:-1 },\n\t/*::[*/0x01C7/*::]*/: { /* n:\"BrtBeginQSIFs\", */ T:1 },\n\t/*::[*/0x01C8/*::]*/: { /* n:\"BrtEndQSIFs\", */ T:-1 },\n\t/*::[*/0x01C9/*::]*/: { /* n:\"BrtBeginQSIF\", */ T:1 },\n\t/*::[*/0x01CA/*::]*/: { /* n:\"BrtEndQSIF\", */ T:-1 },\n\t/*::[*/0x01CB/*::]*/: { /* n:\"BrtBeginAutoSortScope\", */ T:1 },\n\t/*::[*/0x01CC/*::]*/: { /* n:\"BrtEndAutoSortScope\", */ T:-1 },\n\t/*::[*/0x01CD/*::]*/: { /* n:\"BrtBeginConditionalFormatting\", */ T:1 },\n\t/*::[*/0x01CE/*::]*/: { /* n:\"BrtEndConditionalFormatting\", */ T:-1 },\n\t/*::[*/0x01CF/*::]*/: { /* n:\"BrtBeginCFRule\", */ T:1 },\n\t/*::[*/0x01D0/*::]*/: { /* n:\"BrtEndCFRule\", */ T:-1 },\n\t/*::[*/0x01D1/*::]*/: { /* n:\"BrtBeginIconSet\", */ T:1 },\n\t/*::[*/0x01D2/*::]*/: { /* n:\"BrtEndIconSet\", */ T:-1 },\n\t/*::[*/0x01D3/*::]*/: { /* n:\"BrtBeginDatabar\", */ T:1 },\n\t/*::[*/0x01D4/*::]*/: { /* n:\"BrtEndDatabar\", */ T:-1 },\n\t/*::[*/0x01D5/*::]*/: { /* n:\"BrtBeginColorScale\", */ T:1 },\n\t/*::[*/0x01D6/*::]*/: { /* n:\"BrtEndColorScale\", */ T:-1 },\n\t/*::[*/0x01D7/*::]*/: { /* n:\"BrtCFVO\" */ },\n\t/*::[*/0x01D8/*::]*/: { /* n:\"BrtExternValueMeta\" */ },\n\t/*::[*/0x01D9/*::]*/: { /* n:\"BrtBeginColorPalette\", */ T:1 },\n\t/*::[*/0x01DA/*::]*/: { /* n:\"BrtEndColorPalette\", */ T:-1 },\n\t/*::[*/0x01DB/*::]*/: { /* n:\"BrtIndexedColor\" */ },\n\t/*::[*/0x01DC/*::]*/: { /* n:\"BrtMargins\", */ f:parse_BrtMargins },\n\t/*::[*/0x01DD/*::]*/: { /* n:\"BrtPrintOptions\" */ },\n\t/*::[*/0x01DE/*::]*/: { /* n:\"BrtPageSetup\" */ },\n\t/*::[*/0x01DF/*::]*/: { /* n:\"BrtBeginHeaderFooter\", */ T:1 },\n\t/*::[*/0x01E0/*::]*/: { /* n:\"BrtEndHeaderFooter\", */ T:-1 },\n\t/*::[*/0x01E1/*::]*/: { /* n:\"BrtBeginSXCrtFormat\", */ T:1 },\n\t/*::[*/0x01E2/*::]*/: { /* n:\"BrtEndSXCrtFormat\", */ T:-1 },\n\t/*::[*/0x01E3/*::]*/: { /* n:\"BrtBeginSXCrtFormats\", */ T:1 },\n\t/*::[*/0x01E4/*::]*/: { /* n:\"BrtEndSXCrtFormats\", */ T:-1 },\n\t/*::[*/0x01E5/*::]*/: { /* n:\"BrtWsFmtInfo\", */ f:parse_BrtWsFmtInfo },\n\t/*::[*/0x01E6/*::]*/: { /* n:\"BrtBeginMgs\", */ T:1 },\n\t/*::[*/0x01E7/*::]*/: { /* n:\"BrtEndMGs\", */ T:-1 },\n\t/*::[*/0x01E8/*::]*/: { /* n:\"BrtBeginMGMaps\", */ T:1 },\n\t/*::[*/0x01E9/*::]*/: { /* n:\"BrtEndMGMaps\", */ T:-1 },\n\t/*::[*/0x01EA/*::]*/: { /* n:\"BrtBeginMG\", */ T:1 },\n\t/*::[*/0x01EB/*::]*/: { /* n:\"BrtEndMG\", */ T:-1 },\n\t/*::[*/0x01EC/*::]*/: { /* n:\"BrtBeginMap\", */ T:1 },\n\t/*::[*/0x01ED/*::]*/: { /* n:\"BrtEndMap\", */ T:-1 },\n\t/*::[*/0x01EE/*::]*/: { /* n:\"BrtHLink\", */ f:parse_BrtHLink },\n\t/*::[*/0x01EF/*::]*/: { /* n:\"BrtBeginDCon\", */ T:1 },\n\t/*::[*/0x01F0/*::]*/: { /* n:\"BrtEndDCon\", */ T:-1 },\n\t/*::[*/0x01F1/*::]*/: { /* n:\"BrtBeginDRefs\", */ T:1 },\n\t/*::[*/0x01F2/*::]*/: { /* n:\"BrtEndDRefs\", */ T:-1 },\n\t/*::[*/0x01F3/*::]*/: { /* n:\"BrtDRef\" */ },\n\t/*::[*/0x01F4/*::]*/: { /* n:\"BrtBeginScenMan\", */ T:1 },\n\t/*::[*/0x01F5/*::]*/: { /* n:\"BrtEndScenMan\", */ T:-1 },\n\t/*::[*/0x01F6/*::]*/: { /* n:\"BrtBeginSct\", */ T:1 },\n\t/*::[*/0x01F7/*::]*/: { /* n:\"BrtEndSct\", */ T:-1 },\n\t/*::[*/0x01F8/*::]*/: { /* n:\"BrtSlc\" */ },\n\t/*::[*/0x01F9/*::]*/: { /* n:\"BrtBeginDXFs\", */ T:1 },\n\t/*::[*/0x01FA/*::]*/: { /* n:\"BrtEndDXFs\", */ T:-1 },\n\t/*::[*/0x01FB/*::]*/: { /* n:\"BrtDXF\" */ },\n\t/*::[*/0x01FC/*::]*/: { /* n:\"BrtBeginTableStyles\", */ T:1 },\n\t/*::[*/0x01FD/*::]*/: { /* n:\"BrtEndTableStyles\", */ T:-1 },\n\t/*::[*/0x01FE/*::]*/: { /* n:\"BrtBeginTableStyle\", */ T:1 },\n\t/*::[*/0x01FF/*::]*/: { /* n:\"BrtEndTableStyle\", */ T:-1 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"BrtTableStyleElement\" */ },\n\t/*::[*/0x0201/*::]*/: { /* n:\"BrtTableStyleClient\" */ },\n\t/*::[*/0x0202/*::]*/: { /* n:\"BrtBeginVolDeps\", */ T:1 },\n\t/*::[*/0x0203/*::]*/: { /* n:\"BrtEndVolDeps\", */ T:-1 },\n\t/*::[*/0x0204/*::]*/: { /* n:\"BrtBeginVolType\", */ T:1 },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BrtEndVolType\", */ T:-1 },\n\t/*::[*/0x0206/*::]*/: { /* n:\"BrtBeginVolMain\", */ T:1 },\n\t/*::[*/0x0207/*::]*/: { /* n:\"BrtEndVolMain\", */ T:-1 },\n\t/*::[*/0x0208/*::]*/: { /* n:\"BrtBeginVolTopic\", */ T:1 },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BrtEndVolTopic\", */ T:-1 },\n\t/*::[*/0x020A/*::]*/: { /* n:\"BrtVolSubtopic\" */ },\n\t/*::[*/0x020B/*::]*/: { /* n:\"BrtVolRef\" */ },\n\t/*::[*/0x020C/*::]*/: { /* n:\"BrtVolNum\" */ },\n\t/*::[*/0x020D/*::]*/: { /* n:\"BrtVolErr\" */ },\n\t/*::[*/0x020E/*::]*/: { /* n:\"BrtVolStr\" */ },\n\t/*::[*/0x020F/*::]*/: { /* n:\"BrtVolBool\" */ },\n\t/*::[*/0x0210/*::]*/: { /* n:\"BrtBeginCalcChain$\", */ T:1 },\n\t/*::[*/0x0211/*::]*/: { /* n:\"BrtEndCalcChain$\", */ T:-1 },\n\t/*::[*/0x0212/*::]*/: { /* n:\"BrtBeginSortState\", */ T:1 },\n\t/*::[*/0x0213/*::]*/: { /* n:\"BrtEndSortState\", */ T:-1 },\n\t/*::[*/0x0214/*::]*/: { /* n:\"BrtBeginSortCond\", */ T:1 },\n\t/*::[*/0x0215/*::]*/: { /* n:\"BrtEndSortCond\", */ T:-1 },\n\t/*::[*/0x0216/*::]*/: { /* n:\"BrtBookProtection\" */ },\n\t/*::[*/0x0217/*::]*/: { /* n:\"BrtSheetProtection\" */ },\n\t/*::[*/0x0218/*::]*/: { /* n:\"BrtRangeProtection\" */ },\n\t/*::[*/0x0219/*::]*/: { /* n:\"BrtPhoneticInfo\" */ },\n\t/*::[*/0x021A/*::]*/: { /* n:\"BrtBeginECTxtWiz\", */ T:1 },\n\t/*::[*/0x021B/*::]*/: { /* n:\"BrtEndECTxtWiz\", */ T:-1 },\n\t/*::[*/0x021C/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst\", */ T:1 },\n\t/*::[*/0x021D/*::]*/: { /* n:\"BrtEndECTWFldInfoLst\", */ T:-1 },\n\t/*::[*/0x021E/*::]*/: { /* n:\"BrtBeginECTwFldInfo\", */ T:1 },\n\t/*::[*/0x0224/*::]*/: { /* n:\"BrtFileSharing\" */ },\n\t/*::[*/0x0225/*::]*/: { /* n:\"BrtOleSize\" */ },\n\t/*::[*/0x0226/*::]*/: { /* n:\"BrtDrawing\", */ f:parse_RelID },\n\t/*::[*/0x0227/*::]*/: { /* n:\"BrtLegacyDrawing\" */ },\n\t/*::[*/0x0228/*::]*/: { /* n:\"BrtLegacyDrawingHF\" */ },\n\t/*::[*/0x0229/*::]*/: { /* n:\"BrtWebOpt\" */ },\n\t/*::[*/0x022A/*::]*/: { /* n:\"BrtBeginWebPubItems\", */ T:1 },\n\t/*::[*/0x022B/*::]*/: { /* n:\"BrtEndWebPubItems\", */ T:-1 },\n\t/*::[*/0x022C/*::]*/: { /* n:\"BrtBeginWebPubItem\", */ T:1 },\n\t/*::[*/0x022D/*::]*/: { /* n:\"BrtEndWebPubItem\", */ T:-1 },\n\t/*::[*/0x022E/*::]*/: { /* n:\"BrtBeginSXCondFmt\", */ T:1 },\n\t/*::[*/0x022F/*::]*/: { /* n:\"BrtEndSXCondFmt\", */ T:-1 },\n\t/*::[*/0x0230/*::]*/: { /* n:\"BrtBeginSXCondFmts\", */ T:1 },\n\t/*::[*/0x0231/*::]*/: { /* n:\"BrtEndSXCondFmts\", */ T:-1 },\n\t/*::[*/0x0232/*::]*/: { /* n:\"BrtBkHim\" */ },\n\t/*::[*/0x0234/*::]*/: { /* n:\"BrtColor\" */ },\n\t/*::[*/0x0235/*::]*/: { /* n:\"BrtBeginIndexedColors\", */ T:1 },\n\t/*::[*/0x0236/*::]*/: { /* n:\"BrtEndIndexedColors\", */ T:-1 },\n\t/*::[*/0x0239/*::]*/: { /* n:\"BrtBeginMRUColors\", */ T:1 },\n\t/*::[*/0x023A/*::]*/: { /* n:\"BrtEndMRUColors\", */ T:-1 },\n\t/*::[*/0x023C/*::]*/: { /* n:\"BrtMRUColor\" */ },\n\t/*::[*/0x023D/*::]*/: { /* n:\"BrtBeginDVals\", */ T:1 },\n\t/*::[*/0x023E/*::]*/: { /* n:\"BrtEndDVals\", */ T:-1 },\n\t/*::[*/0x0241/*::]*/: { /* n:\"BrtSupNameStart\" */ },\n\t/*::[*/0x0242/*::]*/: { /* n:\"BrtSupNameValueStart\" */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BrtSupNameValueEnd\" */ },\n\t/*::[*/0x0244/*::]*/: { /* n:\"BrtSupNameNum\" */ },\n\t/*::[*/0x0245/*::]*/: { /* n:\"BrtSupNameErr\" */ },\n\t/*::[*/0x0246/*::]*/: { /* n:\"BrtSupNameSt\" */ },\n\t/*::[*/0x0247/*::]*/: { /* n:\"BrtSupNameNil\" */ },\n\t/*::[*/0x0248/*::]*/: { /* n:\"BrtSupNameBool\" */ },\n\t/*::[*/0x0249/*::]*/: { /* n:\"BrtSupNameFmla\" */ },\n\t/*::[*/0x024A/*::]*/: { /* n:\"BrtSupNameBits\" */ },\n\t/*::[*/0x024B/*::]*/: { /* n:\"BrtSupNameEnd\" */ },\n\t/*::[*/0x024C/*::]*/: { /* n:\"BrtEndSupBook\", */ T:-1 },\n\t/*::[*/0x024D/*::]*/: { /* n:\"BrtCellSmartTagProperty\" */ },\n\t/*::[*/0x024E/*::]*/: { /* n:\"BrtBeginCellSmartTag\", */ T:1 },\n\t/*::[*/0x024F/*::]*/: { /* n:\"BrtEndCellSmartTag\", */ T:-1 },\n\t/*::[*/0x0250/*::]*/: { /* n:\"BrtBeginCellSmartTags\", */ T:1 },\n\t/*::[*/0x0251/*::]*/: { /* n:\"BrtEndCellSmartTags\", */ T:-1 },\n\t/*::[*/0x0252/*::]*/: { /* n:\"BrtBeginSmartTags\", */ T:1 },\n\t/*::[*/0x0253/*::]*/: { /* n:\"BrtEndSmartTags\", */ T:-1 },\n\t/*::[*/0x0254/*::]*/: { /* n:\"BrtSmartTagType\" */ },\n\t/*::[*/0x0255/*::]*/: { /* n:\"BrtBeginSmartTagTypes\", */ T:1 },\n\t/*::[*/0x0256/*::]*/: { /* n:\"BrtEndSmartTagTypes\", */ T:-1 },\n\t/*::[*/0x0257/*::]*/: { /* n:\"BrtBeginSXFilters\", */ T:1 },\n\t/*::[*/0x0258/*::]*/: { /* n:\"BrtEndSXFilters\", */ T:-1 },\n\t/*::[*/0x0259/*::]*/: { /* n:\"BrtBeginSXFILTER\", */ T:1 },\n\t/*::[*/0x025A/*::]*/: { /* n:\"BrtEndSXFilter\", */ T:-1 },\n\t/*::[*/0x025B/*::]*/: { /* n:\"BrtBeginFills\", */ T:1 },\n\t/*::[*/0x025C/*::]*/: { /* n:\"BrtEndFills\", */ T:-1 },\n\t/*::[*/0x025D/*::]*/: { /* n:\"BrtBeginCellWatches\", */ T:1 },\n\t/*::[*/0x025E/*::]*/: { /* n:\"BrtEndCellWatches\", */ T:-1 },\n\t/*::[*/0x025F/*::]*/: { /* n:\"BrtCellWatch\" */ },\n\t/*::[*/0x0260/*::]*/: { /* n:\"BrtBeginCRErrs\", */ T:1 },\n\t/*::[*/0x0261/*::]*/: { /* n:\"BrtEndCRErrs\", */ T:-1 },\n\t/*::[*/0x0262/*::]*/: { /* n:\"BrtCrashRecErr\" */ },\n\t/*::[*/0x0263/*::]*/: { /* n:\"BrtBeginFonts\", */ T:1 },\n\t/*::[*/0x0264/*::]*/: { /* n:\"BrtEndFonts\", */ T:-1 },\n\t/*::[*/0x0265/*::]*/: { /* n:\"BrtBeginBorders\", */ T:1 },\n\t/*::[*/0x0266/*::]*/: { /* n:\"BrtEndBorders\", */ T:-1 },\n\t/*::[*/0x0267/*::]*/: { /* n:\"BrtBeginFmts\", */ T:1 },\n\t/*::[*/0x0268/*::]*/: { /* n:\"BrtEndFmts\", */ T:-1 },\n\t/*::[*/0x0269/*::]*/: { /* n:\"BrtBeginCellXFs\", */ T:1 },\n\t/*::[*/0x026A/*::]*/: { /* n:\"BrtEndCellXFs\", */ T:-1 },\n\t/*::[*/0x026B/*::]*/: { /* n:\"BrtBeginStyles\", */ T:1 },\n\t/*::[*/0x026C/*::]*/: { /* n:\"BrtEndStyles\", */ T:-1 },\n\t/*::[*/0x0271/*::]*/: { /* n:\"BrtBigName\" */ },\n\t/*::[*/0x0272/*::]*/: { /* n:\"BrtBeginCellStyleXFs\", */ T:1 },\n\t/*::[*/0x0273/*::]*/: { /* n:\"BrtEndCellStyleXFs\", */ T:-1 },\n\t/*::[*/0x0274/*::]*/: { /* n:\"BrtBeginComments\", */ T:1 },\n\t/*::[*/0x0275/*::]*/: { /* n:\"BrtEndComments\", */ T:-1 },\n\t/*::[*/0x0276/*::]*/: { /* n:\"BrtBeginCommentAuthors\", */ T:1 },\n\t/*::[*/0x0277/*::]*/: { /* n:\"BrtEndCommentAuthors\", */ T:-1 },\n\t/*::[*/0x0278/*::]*/: { /* n:\"BrtCommentAuthor\", */ f:parse_BrtCommentAuthor },\n\t/*::[*/0x0279/*::]*/: { /* n:\"BrtBeginCommentList\", */ T:1 },\n\t/*::[*/0x027A/*::]*/: { /* n:\"BrtEndCommentList\", */ T:-1 },\n\t/*::[*/0x027B/*::]*/: { /* n:\"BrtBeginComment\", */ T:1, f:parse_BrtBeginComment},\n\t/*::[*/0x027C/*::]*/: { /* n:\"BrtEndComment\", */ T:-1 },\n\t/*::[*/0x027D/*::]*/: { /* n:\"BrtCommentText\", */ f:parse_BrtCommentText },\n\t/*::[*/0x027E/*::]*/: { /* n:\"BrtBeginOleObjects\", */ T:1 },\n\t/*::[*/0x027F/*::]*/: { /* n:\"BrtOleObject\" */ },\n\t/*::[*/0x0280/*::]*/: { /* n:\"BrtEndOleObjects\", */ T:-1 },\n\t/*::[*/0x0281/*::]*/: { /* n:\"BrtBeginSxrules\", */ T:1 },\n\t/*::[*/0x0282/*::]*/: { /* n:\"BrtEndSxRules\", */ T:-1 },\n\t/*::[*/0x0283/*::]*/: { /* n:\"BrtBeginActiveXControls\", */ T:1 },\n\t/*::[*/0x0284/*::]*/: { /* n:\"BrtActiveX\" */ },\n\t/*::[*/0x0285/*::]*/: { /* n:\"BrtEndActiveXControls\", */ T:-1 },\n\t/*::[*/0x0286/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembersSortBy\", */ T:1 },\n\t/*::[*/0x0288/*::]*/: { /* n:\"BrtBeginCellIgnoreECs\", */ T:1 },\n\t/*::[*/0x0289/*::]*/: { /* n:\"BrtCellIgnoreEC\" */ },\n\t/*::[*/0x028A/*::]*/: { /* n:\"BrtEndCellIgnoreECs\", */ T:-1 },\n\t/*::[*/0x028B/*::]*/: { /* n:\"BrtCsProp\", */ f:parse_BrtCsProp },\n\t/*::[*/0x028C/*::]*/: { /* n:\"BrtCsPageSetup\" */ },\n\t/*::[*/0x028D/*::]*/: { /* n:\"BrtBeginUserCsViews\", */ T:1 },\n\t/*::[*/0x028E/*::]*/: { /* n:\"BrtEndUserCsViews\", */ T:-1 },\n\t/*::[*/0x028F/*::]*/: { /* n:\"BrtBeginUserCsView\", */ T:1 },\n\t/*::[*/0x0290/*::]*/: { /* n:\"BrtEndUserCsView\", */ T:-1 },\n\t/*::[*/0x0291/*::]*/: { /* n:\"BrtBeginPcdSFCIEntries\", */ T:1 },\n\t/*::[*/0x0292/*::]*/: { /* n:\"BrtEndPCDSFCIEntries\", */ T:-1 },\n\t/*::[*/0x0293/*::]*/: { /* n:\"BrtPCDSFCIEntry\" */ },\n\t/*::[*/0x0294/*::]*/: { /* n:\"BrtBeginListParts\", */ T:1 },\n\t/*::[*/0x0295/*::]*/: { /* n:\"BrtListPart\" */ },\n\t/*::[*/0x0296/*::]*/: { /* n:\"BrtEndListParts\", */ T:-1 },\n\t/*::[*/0x0297/*::]*/: { /* n:\"BrtSheetCalcProp\" */ },\n\t/*::[*/0x0298/*::]*/: { /* n:\"BrtBeginFnGroup\", */ T:1 },\n\t/*::[*/0x0299/*::]*/: { /* n:\"BrtFnGroup\" */ },\n\t/*::[*/0x029A/*::]*/: { /* n:\"BrtEndFnGroup\", */ T:-1 },\n\t/*::[*/0x029B/*::]*/: { /* n:\"BrtSupAddin\" */ },\n\t/*::[*/0x029C/*::]*/: { /* n:\"BrtSXTDMPOrder\" */ },\n\t/*::[*/0x029D/*::]*/: { /* n:\"BrtCsProtection\" */ },\n\t/*::[*/0x029F/*::]*/: { /* n:\"BrtBeginWsSortMap\", */ T:1 },\n\t/*::[*/0x02A0/*::]*/: { /* n:\"BrtEndWsSortMap\", */ T:-1 },\n\t/*::[*/0x02A1/*::]*/: { /* n:\"BrtBeginRRSort\", */ T:1 },\n\t/*::[*/0x02A2/*::]*/: { /* n:\"BrtEndRRSort\", */ T:-1 },\n\t/*::[*/0x02A3/*::]*/: { /* n:\"BrtRRSortItem\" */ },\n\t/*::[*/0x02A4/*::]*/: { /* n:\"BrtFileSharingIso\" */ },\n\t/*::[*/0x02A5/*::]*/: { /* n:\"BrtBookProtectionIso\" */ },\n\t/*::[*/0x02A6/*::]*/: { /* n:\"BrtSheetProtectionIso\" */ },\n\t/*::[*/0x02A7/*::]*/: { /* n:\"BrtCsProtectionIso\" */ },\n\t/*::[*/0x02A8/*::]*/: { /* n:\"BrtRangeProtectionIso\" */ },\n\t/*::[*/0x02A9/*::]*/: { /* n:\"BrtDValList\" */ },\n\t/*::[*/0x0400/*::]*/: { /* n:\"BrtRwDescent\" */ },\n\t/*::[*/0x0401/*::]*/: { /* n:\"BrtKnownFonts\" */ },\n\t/*::[*/0x0402/*::]*/: { /* n:\"BrtBeginSXTupleSet\", */ T:1 },\n\t/*::[*/0x0403/*::]*/: { /* n:\"BrtEndSXTupleSet\", */ T:-1 },\n\t/*::[*/0x0404/*::]*/: { /* n:\"BrtBeginSXTupleSetHeader\", */ T:1 },\n\t/*::[*/0x0405/*::]*/: { /* n:\"BrtEndSXTupleSetHeader\", */ T:-1 },\n\t/*::[*/0x0406/*::]*/: { /* n:\"BrtSXTupleSetHeaderItem\" */ },\n\t/*::[*/0x0407/*::]*/: { /* n:\"BrtBeginSXTupleSetData\", */ T:1 },\n\t/*::[*/0x0408/*::]*/: { /* n:\"BrtEndSXTupleSetData\", */ T:-1 },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BrtBeginSXTupleSetRow\", */ T:1 },\n\t/*::[*/0x040A/*::]*/: { /* n:\"BrtEndSXTupleSetRow\", */ T:-1 },\n\t/*::[*/0x040B/*::]*/: { /* n:\"BrtSXTupleSetRowItem\" */ },\n\t/*::[*/0x040C/*::]*/: { /* n:\"BrtNameExt\" */ },\n\t/*::[*/0x040D/*::]*/: { /* n:\"BrtPCDH14\" */ },\n\t/*::[*/0x040E/*::]*/: { /* n:\"BrtBeginPCDCalcMem14\", */ T:1 },\n\t/*::[*/0x040F/*::]*/: { /* n:\"BrtEndPCDCalcMem14\", */ T:-1 },\n\t/*::[*/0x0410/*::]*/: { /* n:\"BrtSXTH14\" */ },\n\t/*::[*/0x0411/*::]*/: { /* n:\"BrtBeginSparklineGroup\", */ T:1 },\n\t/*::[*/0x0412/*::]*/: { /* n:\"BrtEndSparklineGroup\", */ T:-1 },\n\t/*::[*/0x0413/*::]*/: { /* n:\"BrtSparkline\" */ },\n\t/*::[*/0x0414/*::]*/: { /* n:\"BrtSXDI14\" */ },\n\t/*::[*/0x0415/*::]*/: { /* n:\"BrtWsFmtInfoEx14\" */ },\n\t/*::[*/0x0416/*::]*/: { /* n:\"BrtBeginConditionalFormatting14\", */ T:1 },\n\t/*::[*/0x0417/*::]*/: { /* n:\"BrtEndConditionalFormatting14\", */ T:-1 },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BrtBeginCFRule14\", */ T:1 },\n\t/*::[*/0x0419/*::]*/: { /* n:\"BrtEndCFRule14\", */ T:-1 },\n\t/*::[*/0x041A/*::]*/: { /* n:\"BrtCFVO14\" */ },\n\t/*::[*/0x041B/*::]*/: { /* n:\"BrtBeginDatabar14\", */ T:1 },\n\t/*::[*/0x041C/*::]*/: { /* n:\"BrtBeginIconSet14\", */ T:1 },\n\t/*::[*/0x041D/*::]*/: { /* n:\"BrtDVal14\", */ f: parse_BrtDVal14 },\n\t/*::[*/0x041E/*::]*/: { /* n:\"BrtBeginDVals14\", */ T:1 },\n\t/*::[*/0x041F/*::]*/: { /* n:\"BrtColor14\" */ },\n\t/*::[*/0x0420/*::]*/: { /* n:\"BrtBeginSparklines\", */ T:1 },\n\t/*::[*/0x0421/*::]*/: { /* n:\"BrtEndSparklines\", */ T:-1 },\n\t/*::[*/0x0422/*::]*/: { /* n:\"BrtBeginSparklineGroups\", */ T:1 },\n\t/*::[*/0x0423/*::]*/: { /* n:\"BrtEndSparklineGroups\", */ T:-1 },\n\t/*::[*/0x0425/*::]*/: { /* n:\"BrtSXVD14\" */ },\n\t/*::[*/0x0426/*::]*/: { /* n:\"BrtBeginSXView14\", */ T:1 },\n\t/*::[*/0x0427/*::]*/: { /* n:\"BrtEndSXView14\", */ T:-1 },\n\t/*::[*/0x0428/*::]*/: { /* n:\"BrtBeginSXView16\", */ T:1 },\n\t/*::[*/0x0429/*::]*/: { /* n:\"BrtEndSXView16\", */ T:-1 },\n\t/*::[*/0x042A/*::]*/: { /* n:\"BrtBeginPCD14\", */ T:1 },\n\t/*::[*/0x042B/*::]*/: { /* n:\"BrtEndPCD14\", */ T:-1 },\n\t/*::[*/0x042C/*::]*/: { /* n:\"BrtBeginExtConn14\", */ T:1 },\n\t/*::[*/0x042D/*::]*/: { /* n:\"BrtEndExtConn14\", */ T:-1 },\n\t/*::[*/0x042E/*::]*/: { /* n:\"BrtBeginSlicerCacheIDs\", */ T:1 },\n\t/*::[*/0x042F/*::]*/: { /* n:\"BrtEndSlicerCacheIDs\", */ T:-1 },\n\t/*::[*/0x0430/*::]*/: { /* n:\"BrtBeginSlicerCacheID\", */ T:1 },\n\t/*::[*/0x0431/*::]*/: { /* n:\"BrtEndSlicerCacheID\", */ T:-1 },\n\t/*::[*/0x0433/*::]*/: { /* n:\"BrtBeginSlicerCache\", */ T:1 },\n\t/*::[*/0x0434/*::]*/: { /* n:\"BrtEndSlicerCache\", */ T:-1 },\n\t/*::[*/0x0435/*::]*/: { /* n:\"BrtBeginSlicerCacheDef\", */ T:1 },\n\t/*::[*/0x0436/*::]*/: { /* n:\"BrtEndSlicerCacheDef\", */ T:-1 },\n\t/*::[*/0x0437/*::]*/: { /* n:\"BrtBeginSlicersEx\", */ T:1 },\n\t/*::[*/0x0438/*::]*/: { /* n:\"BrtEndSlicersEx\", */ T:-1 },\n\t/*::[*/0x0439/*::]*/: { /* n:\"BrtBeginSlicerEx\", */ T:1 },\n\t/*::[*/0x043A/*::]*/: { /* n:\"BrtEndSlicerEx\", */ T:-1 },\n\t/*::[*/0x043B/*::]*/: { /* n:\"BrtBeginSlicer\", */ T:1 },\n\t/*::[*/0x043C/*::]*/: { /* n:\"BrtEndSlicer\", */ T:-1 },\n\t/*::[*/0x043D/*::]*/: { /* n:\"BrtSlicerCachePivotTables\" */ },\n\t/*::[*/0x043E/*::]*/: { /* n:\"BrtBeginSlicerCacheOlapImpl\", */ T:1 },\n\t/*::[*/0x043F/*::]*/: { /* n:\"BrtEndSlicerCacheOlapImpl\", */ T:-1 },\n\t/*::[*/0x0440/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelsData\", */ T:1 },\n\t/*::[*/0x0441/*::]*/: { /* n:\"BrtEndSlicerCacheLevelsData\", */ T:-1 },\n\t/*::[*/0x0442/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelData\", */ T:1 },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BrtEndSlicerCacheLevelData\", */ T:-1 },\n\t/*::[*/0x0444/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRanges\", */ T:1 },\n\t/*::[*/0x0445/*::]*/: { /* n:\"BrtEndSlicerCacheSiRanges\", */ T:-1 },\n\t/*::[*/0x0446/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRange\", */ T:1 },\n\t/*::[*/0x0447/*::]*/: { /* n:\"BrtEndSlicerCacheSiRange\", */ T:-1 },\n\t/*::[*/0x0448/*::]*/: { /* n:\"BrtSlicerCacheOlapItem\" */ },\n\t/*::[*/0x0449/*::]*/: { /* n:\"BrtBeginSlicerCacheSelections\", */ T:1 },\n\t/*::[*/0x044A/*::]*/: { /* n:\"BrtSlicerCacheSelection\" */ },\n\t/*::[*/0x044B/*::]*/: { /* n:\"BrtEndSlicerCacheSelections\", */ T:-1 },\n\t/*::[*/0x044C/*::]*/: { /* n:\"BrtBeginSlicerCacheNative\", */ T:1 },\n\t/*::[*/0x044D/*::]*/: { /* n:\"BrtEndSlicerCacheNative\", */ T:-1 },\n\t/*::[*/0x044E/*::]*/: { /* n:\"BrtSlicerCacheNativeItem\" */ },\n\t/*::[*/0x044F/*::]*/: { /* n:\"BrtRangeProtection14\" */ },\n\t/*::[*/0x0450/*::]*/: { /* n:\"BrtRangeProtectionIso14\" */ },\n\t/*::[*/0x0451/*::]*/: { /* n:\"BrtCellIgnoreEC14\" */ },\n\t/*::[*/0x0457/*::]*/: { /* n:\"BrtList14\" */ },\n\t/*::[*/0x0458/*::]*/: { /* n:\"BrtCFIcon\" */ },\n\t/*::[*/0x0459/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x045A/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x045B/*::]*/: { /* n:\"BrtBeginSlicers\", */ T:1 },\n\t/*::[*/0x045C/*::]*/: { /* n:\"BrtEndSlicers\", */ T:-1 },\n\t/*::[*/0x045D/*::]*/: { /* n:\"BrtWbProp14\" */ },\n\t/*::[*/0x045E/*::]*/: { /* n:\"BrtBeginSXEdit\", */ T:1 },\n\t/*::[*/0x045F/*::]*/: { /* n:\"BrtEndSXEdit\", */ T:-1 },\n\t/*::[*/0x0460/*::]*/: { /* n:\"BrtBeginSXEdits\", */ T:1 },\n\t/*::[*/0x0461/*::]*/: { /* n:\"BrtEndSXEdits\", */ T:-1 },\n\t/*::[*/0x0462/*::]*/: { /* n:\"BrtBeginSXChange\", */ T:1 },\n\t/*::[*/0x0463/*::]*/: { /* n:\"BrtEndSXChange\", */ T:-1 },\n\t/*::[*/0x0464/*::]*/: { /* n:\"BrtBeginSXChanges\", */ T:1 },\n\t/*::[*/0x0465/*::]*/: { /* n:\"BrtEndSXChanges\", */ T:-1 },\n\t/*::[*/0x0466/*::]*/: { /* n:\"BrtSXTupleItems\" */ },\n\t/*::[*/0x0468/*::]*/: { /* n:\"BrtBeginSlicerStyle\", */ T:1 },\n\t/*::[*/0x0469/*::]*/: { /* n:\"BrtEndSlicerStyle\", */ T:-1 },\n\t/*::[*/0x046A/*::]*/: { /* n:\"BrtSlicerStyleElement\" */ },\n\t/*::[*/0x046B/*::]*/: { /* n:\"BrtBeginStyleSheetExt14\", */ T:1 },\n\t/*::[*/0x046C/*::]*/: { /* n:\"BrtEndStyleSheetExt14\", */ T:-1 },\n\t/*::[*/0x046D/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheID\", */ T:1 },\n\t/*::[*/0x046E/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheID\", */ T:-1 },\n\t/*::[*/0x046F/*::]*/: { /* n:\"BrtBeginConditionalFormattings\", */ T:1 },\n\t/*::[*/0x0470/*::]*/: { /* n:\"BrtEndConditionalFormattings\", */ T:-1 },\n\t/*::[*/0x0471/*::]*/: { /* n:\"BrtBeginPCDCalcMemExt\", */ T:1 },\n\t/*::[*/0x0472/*::]*/: { /* n:\"BrtEndPCDCalcMemExt\", */ T:-1 },\n\t/*::[*/0x0473/*::]*/: { /* n:\"BrtBeginPCDCalcMemsExt\", */ T:1 },\n\t/*::[*/0x0474/*::]*/: { /* n:\"BrtEndPCDCalcMemsExt\", */ T:-1 },\n\t/*::[*/0x0475/*::]*/: { /* n:\"BrtPCDField14\" */ },\n\t/*::[*/0x0476/*::]*/: { /* n:\"BrtBeginSlicerStyles\", */ T:1 },\n\t/*::[*/0x0477/*::]*/: { /* n:\"BrtEndSlicerStyles\", */ T:-1 },\n\t/*::[*/0x0478/*::]*/: { /* n:\"BrtBeginSlicerStyleElements\", */ T:1 },\n\t/*::[*/0x0479/*::]*/: { /* n:\"BrtEndSlicerStyleElements\", */ T:-1 },\n\t/*::[*/0x047A/*::]*/: { /* n:\"BrtCFRuleExt\" */ },\n\t/*::[*/0x047B/*::]*/: { /* n:\"BrtBeginSXCondFmt14\", */ T:1 },\n\t/*::[*/0x047C/*::]*/: { /* n:\"BrtEndSXCondFmt14\", */ T:-1 },\n\t/*::[*/0x047D/*::]*/: { /* n:\"BrtBeginSXCondFmts14\", */ T:1 },\n\t/*::[*/0x047E/*::]*/: { /* n:\"BrtEndSXCondFmts14\", */ T:-1 },\n\t/*::[*/0x0480/*::]*/: { /* n:\"BrtBeginSortCond14\", */ T:1 },\n\t/*::[*/0x0481/*::]*/: { /* n:\"BrtEndSortCond14\", */ T:-1 },\n\t/*::[*/0x0482/*::]*/: { /* n:\"BrtEndDVals14\", */ T:-1 },\n\t/*::[*/0x0483/*::]*/: { /* n:\"BrtEndIconSet14\", */ T:-1 },\n\t/*::[*/0x0484/*::]*/: { /* n:\"BrtEndDatabar14\", */ T:-1 },\n\t/*::[*/0x0485/*::]*/: { /* n:\"BrtBeginColorScale14\", */ T:1 },\n\t/*::[*/0x0486/*::]*/: { /* n:\"BrtEndColorScale14\", */ T:-1 },\n\t/*::[*/0x0487/*::]*/: { /* n:\"BrtBeginSxrules14\", */ T:1 },\n\t/*::[*/0x0488/*::]*/: { /* n:\"BrtEndSxrules14\", */ T:-1 },\n\t/*::[*/0x0489/*::]*/: { /* n:\"BrtBeginPRule14\", */ T:1 },\n\t/*::[*/0x048A/*::]*/: { /* n:\"BrtEndPRule14\", */ T:-1 },\n\t/*::[*/0x048B/*::]*/: { /* n:\"BrtBeginPRFilters14\", */ T:1 },\n\t/*::[*/0x048C/*::]*/: { /* n:\"BrtEndPRFilters14\", */ T:-1 },\n\t/*::[*/0x048D/*::]*/: { /* n:\"BrtBeginPRFilter14\", */ T:1 },\n\t/*::[*/0x048E/*::]*/: { /* n:\"BrtEndPRFilter14\", */ T:-1 },\n\t/*::[*/0x048F/*::]*/: { /* n:\"BrtBeginPRFItem14\", */ T:1 },\n\t/*::[*/0x0490/*::]*/: { /* n:\"BrtEndPRFItem14\", */ T:-1 },\n\t/*::[*/0x0491/*::]*/: { /* n:\"BrtBeginCellIgnoreECs14\", */ T:1 },\n\t/*::[*/0x0492/*::]*/: { /* n:\"BrtEndCellIgnoreECs14\", */ T:-1 },\n\t/*::[*/0x0493/*::]*/: { /* n:\"BrtDxf14\" */ },\n\t/*::[*/0x0494/*::]*/: { /* n:\"BrtBeginDxF14s\", */ T:1 },\n\t/*::[*/0x0495/*::]*/: { /* n:\"BrtEndDxf14s\", */ T:-1 },\n\t/*::[*/0x0499/*::]*/: { /* n:\"BrtFilter14\" */ },\n\t/*::[*/0x049A/*::]*/: { /* n:\"BrtBeginCustomFilters14\", */ T:1 },\n\t/*::[*/0x049C/*::]*/: { /* n:\"BrtCustomFilter14\" */ },\n\t/*::[*/0x049D/*::]*/: { /* n:\"BrtIconFilter14\" */ },\n\t/*::[*/0x049E/*::]*/: { /* n:\"BrtPivotCacheConnectionName\" */ },\n\t/*::[*/0x0800/*::]*/: { /* n:\"BrtBeginDecoupledPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0801/*::]*/: { /* n:\"BrtEndDecoupledPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0802/*::]*/: { /* n:\"BrtDecoupledPivotCacheID\" */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"BrtBeginPivotTableRefs\", */ T:1 },\n\t/*::[*/0x0804/*::]*/: { /* n:\"BrtEndPivotTableRefs\", */ T:-1 },\n\t/*::[*/0x0805/*::]*/: { /* n:\"BrtPivotTableRef\" */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"BrtSlicerCacheBookPivotTables\" */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"BrtBeginSxvcells\", */ T:1 },\n\t/*::[*/0x0808/*::]*/: { /* n:\"BrtEndSxvcells\", */ T:-1 },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BrtBeginSxRow\", */ T:1 },\n\t/*::[*/0x080A/*::]*/: { /* n:\"BrtEndSxRow\", */ T:-1 },\n\t/*::[*/0x080C/*::]*/: { /* n:\"BrtPcdCalcMem15\" */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"BrtQsi15\" */ },\n\t/*::[*/0x0814/*::]*/: { /* n:\"BrtBeginWebExtensions\", */ T:1 },\n\t/*::[*/0x0815/*::]*/: { /* n:\"BrtEndWebExtensions\", */ T:-1 },\n\t/*::[*/0x0816/*::]*/: { /* n:\"BrtWebExtension\" */ },\n\t/*::[*/0x0817/*::]*/: { /* n:\"BrtAbsPath15\" */ },\n\t/*::[*/0x0818/*::]*/: { /* n:\"BrtBeginPivotTableUISettings\", */ T:1 },\n\t/*::[*/0x0819/*::]*/: { /* n:\"BrtEndPivotTableUISettings\", */ T:-1 },\n\t/*::[*/0x081B/*::]*/: { /* n:\"BrtTableSlicerCacheIDs\" */ },\n\t/*::[*/0x081C/*::]*/: { /* n:\"BrtTableSlicerCacheID\" */ },\n\t/*::[*/0x081D/*::]*/: { /* n:\"BrtBeginTableSlicerCache\", */ T:1 },\n\t/*::[*/0x081E/*::]*/: { /* n:\"BrtEndTableSlicerCache\", */ T:-1 },\n\t/*::[*/0x081F/*::]*/: { /* n:\"BrtSxFilter15\" */ },\n\t/*::[*/0x0820/*::]*/: { /* n:\"BrtBeginTimelineCachePivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0821/*::]*/: { /* n:\"BrtEndTimelineCachePivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0822/*::]*/: { /* n:\"BrtTimelineCachePivotCacheID\" */ },\n\t/*::[*/0x0823/*::]*/: { /* n:\"BrtBeginTimelineCacheIDs\", */ T:1 },\n\t/*::[*/0x0824/*::]*/: { /* n:\"BrtEndTimelineCacheIDs\", */ T:-1 },\n\t/*::[*/0x0825/*::]*/: { /* n:\"BrtBeginTimelineCacheID\", */ T:1 },\n\t/*::[*/0x0826/*::]*/: { /* n:\"BrtEndTimelineCacheID\", */ T:-1 },\n\t/*::[*/0x0827/*::]*/: { /* n:\"BrtBeginTimelinesEx\", */ T:1 },\n\t/*::[*/0x0828/*::]*/: { /* n:\"BrtEndTimelinesEx\", */ T:-1 },\n\t/*::[*/0x0829/*::]*/: { /* n:\"BrtBeginTimelineEx\", */ T:1 },\n\t/*::[*/0x082A/*::]*/: { /* n:\"BrtEndTimelineEx\", */ T:-1 },\n\t/*::[*/0x082B/*::]*/: { /* n:\"BrtWorkBookPr15\" */ },\n\t/*::[*/0x082C/*::]*/: { /* n:\"BrtPCDH15\" */ },\n\t/*::[*/0x082D/*::]*/: { /* n:\"BrtBeginTimelineStyle\", */ T:1 },\n\t/*::[*/0x082E/*::]*/: { /* n:\"BrtEndTimelineStyle\", */ T:-1 },\n\t/*::[*/0x082F/*::]*/: { /* n:\"BrtTimelineStyleElement\" */ },\n\t/*::[*/0x0830/*::]*/: { /* n:\"BrtBeginTimelineStylesheetExt15\", */ T:1 },\n\t/*::[*/0x0831/*::]*/: { /* n:\"BrtEndTimelineStylesheetExt15\", */ T:-1 },\n\t/*::[*/0x0832/*::]*/: { /* n:\"BrtBeginTimelineStyles\", */ T:1 },\n\t/*::[*/0x0833/*::]*/: { /* n:\"BrtEndTimelineStyles\", */ T:-1 },\n\t/*::[*/0x0834/*::]*/: { /* n:\"BrtBeginTimelineStyleElements\", */ T:1 },\n\t/*::[*/0x0835/*::]*/: { /* n:\"BrtEndTimelineStyleElements\", */ T:-1 },\n\t/*::[*/0x0836/*::]*/: { /* n:\"BrtDxf15\" */ },\n\t/*::[*/0x0837/*::]*/: { /* n:\"BrtBeginDxfs15\", */ T:1 },\n\t/*::[*/0x0838/*::]*/: { /* n:\"BrtEndDxfs15\", */ T:-1 },\n\t/*::[*/0x0839/*::]*/: { /* n:\"BrtSlicerCacheHideItemsWithNoData\" */ },\n\t/*::[*/0x083A/*::]*/: { /* n:\"BrtBeginItemUniqueNames\", */ T:1 },\n\t/*::[*/0x083B/*::]*/: { /* n:\"BrtEndItemUniqueNames\", */ T:-1 },\n\t/*::[*/0x083C/*::]*/: { /* n:\"BrtItemUniqueName\" */ },\n\t/*::[*/0x083D/*::]*/: { /* n:\"BrtBeginExtConn15\", */ T:1 },\n\t/*::[*/0x083E/*::]*/: { /* n:\"BrtEndExtConn15\", */ T:-1 },\n\t/*::[*/0x083F/*::]*/: { /* n:\"BrtBeginOledbPr15\", */ T:1 },\n\t/*::[*/0x0840/*::]*/: { /* n:\"BrtEndOledbPr15\", */ T:-1 },\n\t/*::[*/0x0841/*::]*/: { /* n:\"BrtBeginDataFeedPr15\", */ T:1 },\n\t/*::[*/0x0842/*::]*/: { /* n:\"BrtEndDataFeedPr15\", */ T:-1 },\n\t/*::[*/0x0843/*::]*/: { /* n:\"BrtTextPr15\" */ },\n\t/*::[*/0x0844/*::]*/: { /* n:\"BrtRangePr15\" */ },\n\t/*::[*/0x0845/*::]*/: { /* n:\"BrtDbCommand15\" */ },\n\t/*::[*/0x0846/*::]*/: { /* n:\"BrtBeginDbTables15\", */ T:1 },\n\t/*::[*/0x0847/*::]*/: { /* n:\"BrtEndDbTables15\", */ T:-1 },\n\t/*::[*/0x0848/*::]*/: { /* n:\"BrtDbTable15\" */ },\n\t/*::[*/0x0849/*::]*/: { /* n:\"BrtBeginDataModel\", */ T:1 },\n\t/*::[*/0x084A/*::]*/: { /* n:\"BrtEndDataModel\", */ T:-1 },\n\t/*::[*/0x084B/*::]*/: { /* n:\"BrtBeginModelTables\", */ T:1 },\n\t/*::[*/0x084C/*::]*/: { /* n:\"BrtEndModelTables\", */ T:-1 },\n\t/*::[*/0x084D/*::]*/: { /* n:\"BrtModelTable\" */ },\n\t/*::[*/0x084E/*::]*/: { /* n:\"BrtBeginModelRelationships\", */ T:1 },\n\t/*::[*/0x084F/*::]*/: { /* n:\"BrtEndModelRelationships\", */ T:-1 },\n\t/*::[*/0x0850/*::]*/: { /* n:\"BrtModelRelationship\" */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"BrtBeginECTxtWiz15\", */ T:1 },\n\t/*::[*/0x0852/*::]*/: { /* n:\"BrtEndECTxtWiz15\", */ T:-1 },\n\t/*::[*/0x0853/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst15\", */ T:1 },\n\t/*::[*/0x0854/*::]*/: { /* n:\"BrtEndECTWFldInfoLst15\", */ T:-1 },\n\t/*::[*/0x0855/*::]*/: { /* n:\"BrtBeginECTWFldInfo15\", */ T:1 },\n\t/*::[*/0x0856/*::]*/: { /* n:\"BrtFieldListActiveItem\" */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"BrtPivotCacheIdVersion\" */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"BrtSXDI15\" */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"BrtBeginModelTimeGroupings\", */ T:1 },\n\t/*::[*/0x085A/*::]*/: { /* n:\"BrtEndModelTimeGroupings\", */ T:-1 },\n\t/*::[*/0x085B/*::]*/: { /* n:\"BrtBeginModelTimeGrouping\", */ T:1 },\n\t/*::[*/0x085C/*::]*/: { /* n:\"BrtEndModelTimeGrouping\", */ T:-1 },\n\t/*::[*/0x085D/*::]*/: { /* n:\"BrtModelTimeGroupingCalcCol\" */ },\n\t/*::[*/0x0C00/*::]*/: { /* n:\"BrtUid\" */ },\n\t/*::[*/0x0C01/*::]*/: { /* n:\"BrtRevisionPtr\" */ },\n\t/*::[*/0x1000/*::]*/: { /* n:\"BrtBeginDynamicArrayPr\", */ T:1 },\n\t/*::[*/0x1001/*::]*/: { /* n:\"BrtEndDynamicArrayPr\", */ T:-1 },\n\t/*::[*/0x138A/*::]*/: { /* n:\"BrtBeginRichValueBlock\", */ T:1 },\n\t/*::[*/0x138B/*::]*/: { /* n:\"BrtEndRichValueBlock\", */ T:-1 },\n\t/*::[*/0x13D9/*::]*/: { /* n:\"BrtBeginRichFilters\", */ T:1 },\n\t/*::[*/0x13DA/*::]*/: { /* n:\"BrtEndRichFilters\", */ T:-1 },\n\t/*::[*/0x13DB/*::]*/: { /* n:\"BrtRichFilter\" */ },\n\t/*::[*/0x13DC/*::]*/: { /* n:\"BrtBeginRichFilterColumn\", */ T:1 },\n\t/*::[*/0x13DD/*::]*/: { /* n:\"BrtEndRichFilterColumn\", */ T:-1 },\n\t/*::[*/0x13DE/*::]*/: { /* n:\"BrtBeginCustomRichFilters\", */ T:1 },\n\t/*::[*/0x13DF/*::]*/: { /* n:\"BrtEndCustomRichFilters\", */ T:-1 },\n\t/*::[*/0x13E0/*::]*/: { /* n:\"BrtCustomRichFilter\" */ },\n\t/*::[*/0x13E1/*::]*/: { /* n:\"BrtTop10RichFilter\" */ },\n\t/*::[*/0x13E2/*::]*/: { /* n:\"BrtDynamicRichFilter\" */ },\n\t/*::[*/0x13E4/*::]*/: { /* n:\"BrtBeginRichSortCondition\", */ T:1 },\n\t/*::[*/0x13E5/*::]*/: { /* n:\"BrtEndRichSortCondition\", */ T:-1 },\n\t/*::[*/0x13E6/*::]*/: { /* n:\"BrtRichFilterDateGroupItem\" */ },\n\t/*::[*/0x13E7/*::]*/: { /* n:\"BrtBeginCalcFeatures\", */ T:1 },\n\t/*::[*/0x13E8/*::]*/: { /* n:\"BrtEndCalcFeatures\", */ T:-1 },\n\t/*::[*/0x13E9/*::]*/: { /* n:\"BrtCalcFeature\" */ },\n\t/*::[*/0x13EB/*::]*/: { /* n:\"BrtExternalLinksPr\" */ },\n\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n};\n\n/* [MS-XLS] 2.3 Record Enumeration (and other sources) */\nvar XLSRecordEnum = {\n\t/* [MS-XLS] 2.3 Record Enumeration 2021-08-17 */\n\t/*::[*/0x0006/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x000a/*::]*/: { /* n:\"EOF\", */ f:parsenoop2 },\n\t/*::[*/0x000c/*::]*/: { /* n:\"CalcCount\", */ f:parseuint16 }, //\n\t/*::[*/0x000d/*::]*/: { /* n:\"CalcMode\", */ f:parseuint16 }, //\n\t/*::[*/0x000e/*::]*/: { /* n:\"CalcPrecision\", */ f:parsebool }, //\n\t/*::[*/0x000f/*::]*/: { /* n:\"CalcRefMode\", */ f:parsebool }, //\n\t/*::[*/0x0010/*::]*/: { /* n:\"CalcDelta\", */ f:parse_Xnum }, //\n\t/*::[*/0x0011/*::]*/: { /* n:\"CalcIter\", */ f:parsebool }, //\n\t/*::[*/0x0012/*::]*/: { /* n:\"Protect\", */ f:parsebool },\n\t/*::[*/0x0013/*::]*/: { /* n:\"Password\", */ f:parseuint16 },\n\t/*::[*/0x0014/*::]*/: { /* n:\"Header\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0015/*::]*/: { /* n:\"Footer\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0017/*::]*/: { /* n:\"ExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x0018/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0019/*::]*/: { /* n:\"WinProtect\", */ f:parsebool },\n\t/*::[*/0x001a/*::]*/: { /* n:\"VerticalPageBreaks\", */ },\n\t/*::[*/0x001b/*::]*/: { /* n:\"HorizontalPageBreaks\", */ },\n\t/*::[*/0x001c/*::]*/: { /* n:\"Note\", */ f:parse_Note },\n\t/*::[*/0x001d/*::]*/: { /* n:\"Selection\", */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"Date1904\", */ f:parsebool },\n\t/*::[*/0x0023/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0026/*::]*/: { /* n:\"LeftMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0027/*::]*/: { /* n:\"RightMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0028/*::]*/: { /* n:\"TopMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0029/*::]*/: { /* n:\"BottomMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x002a/*::]*/: { /* n:\"PrintRowCol\", */ f:parsebool },\n\t/*::[*/0x002b/*::]*/: { /* n:\"PrintGrid\", */ f:parsebool },\n\t/*::[*/0x002f/*::]*/: { /* n:\"FilePass\", */ f:parse_FilePass },\n\t/*::[*/0x0031/*::]*/: { /* n:\"Font\", */ f:parse_Font },\n\t/*::[*/0x0033/*::]*/: { /* n:\"PrintSize\", */ f:parseuint16 },\n\t/*::[*/0x003c/*::]*/: { /* n:\"Continue\", */ },\n\t/*::[*/0x003d/*::]*/: { /* n:\"Window1\", */ f:parse_Window1 },\n\t/*::[*/0x0040/*::]*/: { /* n:\"Backup\", */ f:parsebool },\n\t/*::[*/0x0041/*::]*/: { /* n:\"Pane\", */ f:parse_Pane },\n\t/*::[*/0x0042/*::]*/: { /* n:\"CodePage\", */ f:parseuint16 },\n\t/*::[*/0x004d/*::]*/: { /* n:\"Pls\", */ },\n\t/*::[*/0x0050/*::]*/: { /* n:\"DCon\", */ },\n\t/*::[*/0x0051/*::]*/: { /* n:\"DConRef\", */ },\n\t/*::[*/0x0052/*::]*/: { /* n:\"DConName\", */ },\n\t/*::[*/0x0055/*::]*/: { /* n:\"DefColWidth\", */ f:parseuint16 },\n\t/*::[*/0x0059/*::]*/: { /* n:\"XCT\", */ },\n\t/*::[*/0x005a/*::]*/: { /* n:\"CRN\", */ },\n\t/*::[*/0x005b/*::]*/: { /* n:\"FileSharing\", */ },\n\t/*::[*/0x005c/*::]*/: { /* n:\"WriteAccess\", */ f:parse_WriteAccess },\n\t/*::[*/0x005d/*::]*/: { /* n:\"Obj\", */ f:parse_Obj },\n\t/*::[*/0x005e/*::]*/: { /* n:\"Uncalced\", */ },\n\t/*::[*/0x005f/*::]*/: { /* n:\"CalcSaveRecalc\", */ f:parsebool }, //\n\t/*::[*/0x0060/*::]*/: { /* n:\"Template\", */ },\n\t/*::[*/0x0061/*::]*/: { /* n:\"Intl\", */ },\n\t/*::[*/0x0063/*::]*/: { /* n:\"ObjProtect\", */ f:parsebool },\n\t/*::[*/0x007d/*::]*/: { /* n:\"ColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x0080/*::]*/: { /* n:\"Guts\", */ f:parse_Guts },\n\t/*::[*/0x0081/*::]*/: { /* n:\"WsBool\", */ f:parse_WsBool },\n\t/*::[*/0x0082/*::]*/: { /* n:\"GridSet\", */ f:parseuint16 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"HCenter\", */ f:parsebool },\n\t/*::[*/0x0084/*::]*/: { /* n:\"VCenter\", */ f:parsebool },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BoundSheet8\", */ f:parse_BoundSheet8 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"WriteProtect\", */ },\n\t/*::[*/0x008c/*::]*/: { /* n:\"Country\", */ f:parse_Country },\n\t/*::[*/0x008d/*::]*/: { /* n:\"HideObj\", */ f:parseuint16 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"Sort\", */ },\n\t/*::[*/0x0092/*::]*/: { /* n:\"Palette\", */ f:parse_Palette },\n\t/*::[*/0x0097/*::]*/: { /* n:\"Sync\", */ },\n\t/*::[*/0x0098/*::]*/: { /* n:\"LPr\", */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"DxGCol\", */ },\n\t/*::[*/0x009a/*::]*/: { /* n:\"FnGroupName\", */ },\n\t/*::[*/0x009b/*::]*/: { /* n:\"FilterMode\", */ },\n\t/*::[*/0x009c/*::]*/: { /* n:\"BuiltInFnGroupCount\", */ f:parseuint16 },\n\t/*::[*/0x009d/*::]*/: { /* n:\"AutoFilterInfo\", */ },\n\t/*::[*/0x009e/*::]*/: { /* n:\"AutoFilter\", */ },\n\t/*::[*/0x00a0/*::]*/: { /* n:\"Scl\", */ f:parse_Scl },\n\t/*::[*/0x00a1/*::]*/: { /* n:\"Setup\", */ f:parse_Setup },\n\t/*::[*/0x00ae/*::]*/: { /* n:\"ScenMan\", */ },\n\t/*::[*/0x00af/*::]*/: { /* n:\"SCENARIO\", */ },\n\t/*::[*/0x00b0/*::]*/: { /* n:\"SxView\", */ },\n\t/*::[*/0x00b1/*::]*/: { /* n:\"Sxvd\", */ },\n\t/*::[*/0x00b2/*::]*/: { /* n:\"SXVI\", */ },\n\t/*::[*/0x00b4/*::]*/: { /* n:\"SxIvd\", */ },\n\t/*::[*/0x00b5/*::]*/: { /* n:\"SXLI\", */ },\n\t/*::[*/0x00b6/*::]*/: { /* n:\"SXPI\", */ },\n\t/*::[*/0x00b8/*::]*/: { /* n:\"DocRoute\", */ },\n\t/*::[*/0x00b9/*::]*/: { /* n:\"RecipName\", */ },\n\t/*::[*/0x00bd/*::]*/: { /* n:\"MulRk\", */ f:parse_MulRk },\n\t/*::[*/0x00be/*::]*/: { /* n:\"MulBlank\", */ f:parse_MulBlank },\n\t/*::[*/0x00c1/*::]*/: { /* n:\"Mms\", */ f:parsenoop2 },\n\t/*::[*/0x00c5/*::]*/: { /* n:\"SXDI\", */ },\n\t/*::[*/0x00c6/*::]*/: { /* n:\"SXDB\", */ },\n\t/*::[*/0x00c7/*::]*/: { /* n:\"SXFDB\", */ },\n\t/*::[*/0x00c8/*::]*/: { /* n:\"SXDBB\", */ },\n\t/*::[*/0x00c9/*::]*/: { /* n:\"SXNum\", */ },\n\t/*::[*/0x00ca/*::]*/: { /* n:\"SxBool\", */ f:parsebool },\n\t/*::[*/0x00cb/*::]*/: { /* n:\"SxErr\", */ },\n\t/*::[*/0x00cc/*::]*/: { /* n:\"SXInt\", */ },\n\t/*::[*/0x00cd/*::]*/: { /* n:\"SXString\", */ },\n\t/*::[*/0x00ce/*::]*/: { /* n:\"SXDtr\", */ },\n\t/*::[*/0x00cf/*::]*/: { /* n:\"SxNil\", */ },\n\t/*::[*/0x00d0/*::]*/: { /* n:\"SXTbl\", */ },\n\t/*::[*/0x00d1/*::]*/: { /* n:\"SXTBRGIITM\", */ },\n\t/*::[*/0x00d2/*::]*/: { /* n:\"SxTbpg\", */ },\n\t/*::[*/0x00d3/*::]*/: { /* n:\"ObProj\", */ },\n\t/*::[*/0x00d5/*::]*/: { /* n:\"SXStreamID\", */ },\n\t/*::[*/0x00d7/*::]*/: { /* n:\"DBCell\", */ },\n\t/*::[*/0x00d8/*::]*/: { /* n:\"SXRng\", */ },\n\t/*::[*/0x00d9/*::]*/: { /* n:\"SxIsxoper\", */ },\n\t/*::[*/0x00da/*::]*/: { /* n:\"BookBool\", */ f:parseuint16 },\n\t/*::[*/0x00dc/*::]*/: { /* n:\"DbOrParamQry\", */ },\n\t/*::[*/0x00dd/*::]*/: { /* n:\"ScenarioProtect\", */ f:parsebool },\n\t/*::[*/0x00de/*::]*/: { /* n:\"OleObjectSize\", */ },\n\t/*::[*/0x00e0/*::]*/: { /* n:\"XF\", */ f:parse_XF },\n\t/*::[*/0x00e1/*::]*/: { /* n:\"InterfaceHdr\", */ f:parse_InterfaceHdr },\n\t/*::[*/0x00e2/*::]*/: { /* n:\"InterfaceEnd\", */ f:parsenoop2 },\n\t/*::[*/0x00e3/*::]*/: { /* n:\"SXVS\", */ },\n\t/*::[*/0x00e5/*::]*/: { /* n:\"MergeCells\", */ f:parse_MergeCells },\n\t/*::[*/0x00e9/*::]*/: { /* n:\"BkHim\", */ },\n\t/*::[*/0x00eb/*::]*/: { /* n:\"MsoDrawingGroup\", */ },\n\t/*::[*/0x00ec/*::]*/: { /* n:\"MsoDrawing\", */ },\n\t/*::[*/0x00ed/*::]*/: { /* n:\"MsoDrawingSelection\", */ },\n\t/*::[*/0x00ef/*::]*/: { /* n:\"PhoneticInfo\", */ },\n\t/*::[*/0x00f0/*::]*/: { /* n:\"SxRule\", */ },\n\t/*::[*/0x00f1/*::]*/: { /* n:\"SXEx\", */ },\n\t/*::[*/0x00f2/*::]*/: { /* n:\"SxFilt\", */ },\n\t/*::[*/0x00f4/*::]*/: { /* n:\"SxDXF\", */ },\n\t/*::[*/0x00f5/*::]*/: { /* n:\"SxItm\", */ },\n\t/*::[*/0x00f6/*::]*/: { /* n:\"SxName\", */ },\n\t/*::[*/0x00f7/*::]*/: { /* n:\"SxSelect\", */ },\n\t/*::[*/0x00f8/*::]*/: { /* n:\"SXPair\", */ },\n\t/*::[*/0x00f9/*::]*/: { /* n:\"SxFmla\", */ },\n\t/*::[*/0x00fb/*::]*/: { /* n:\"SxFormat\", */ },\n\t/*::[*/0x00fc/*::]*/: { /* n:\"SST\", */ f:parse_SST },\n\t/*::[*/0x00fd/*::]*/: { /* n:\"LabelSst\", */ f:parse_LabelSst },\n\t/*::[*/0x00ff/*::]*/: { /* n:\"ExtSST\", */ f:parse_ExtSST },\n\t/*::[*/0x0100/*::]*/: { /* n:\"SXVDEx\", */ },\n\t/*::[*/0x0103/*::]*/: { /* n:\"SXFormula\", */ },\n\t/*::[*/0x0122/*::]*/: { /* n:\"SXDBEx\", */ },\n\t/*::[*/0x0137/*::]*/: { /* n:\"RRDInsDel\", */ },\n\t/*::[*/0x0138/*::]*/: { /* n:\"RRDHead\", */ },\n\t/*::[*/0x013b/*::]*/: { /* n:\"RRDChgCell\", */ },\n\t/*::[*/0x013d/*::]*/: { /* n:\"RRTabId\", */ f:parseuint16a },\n\t/*::[*/0x013e/*::]*/: { /* n:\"RRDRenSheet\", */ },\n\t/*::[*/0x013f/*::]*/: { /* n:\"RRSort\", */ },\n\t/*::[*/0x0140/*::]*/: { /* n:\"RRDMove\", */ },\n\t/*::[*/0x014a/*::]*/: { /* n:\"RRFormat\", */ },\n\t/*::[*/0x014b/*::]*/: { /* n:\"RRAutoFmt\", */ },\n\t/*::[*/0x014d/*::]*/: { /* n:\"RRInsertSh\", */ },\n\t/*::[*/0x014e/*::]*/: { /* n:\"RRDMoveBegin\", */ },\n\t/*::[*/0x014f/*::]*/: { /* n:\"RRDMoveEnd\", */ },\n\t/*::[*/0x0150/*::]*/: { /* n:\"RRDInsDelBegin\", */ },\n\t/*::[*/0x0151/*::]*/: { /* n:\"RRDInsDelEnd\", */ },\n\t/*::[*/0x0152/*::]*/: { /* n:\"RRDConflict\", */ },\n\t/*::[*/0x0153/*::]*/: { /* n:\"RRDDefName\", */ },\n\t/*::[*/0x0154/*::]*/: { /* n:\"RRDRstEtxp\", */ },\n\t/*::[*/0x015f/*::]*/: { /* n:\"LRng\", */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"UsesELFs\", */ f:parsebool },\n\t/*::[*/0x0161/*::]*/: { /* n:\"DSF\", */ f:parsenoop2 },\n\t/*::[*/0x0191/*::]*/: { /* n:\"CUsr\", */ },\n\t/*::[*/0x0192/*::]*/: { /* n:\"CbUsr\", */ },\n\t/*::[*/0x0193/*::]*/: { /* n:\"UsrInfo\", */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"UsrExcl\", */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"FileLock\", */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"RRDInfo\", */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BCUsrs\", */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"UsrChk\", */ },\n\t/*::[*/0x01a9/*::]*/: { /* n:\"UserBView\", */ },\n\t/*::[*/0x01aa/*::]*/: { /* n:\"UserSViewBegin\", */ },\n\t/*::[*/0x01ab/*::]*/: { /* n:\"UserSViewEnd\", */ },\n\t/*::[*/0x01ac/*::]*/: { /* n:\"RRDUserView\", */ },\n\t/*::[*/0x01ad/*::]*/: { /* n:\"Qsi\", */ },\n\t/*::[*/0x01ae/*::]*/: { /* n:\"SupBook\", */ f:parse_SupBook },\n\t/*::[*/0x01af/*::]*/: { /* n:\"Prot4Rev\", */ f:parsebool },\n\t/*::[*/0x01b0/*::]*/: { /* n:\"CondFmt\", */ },\n\t/*::[*/0x01b1/*::]*/: { /* n:\"CF\", */ },\n\t/*::[*/0x01b2/*::]*/: { /* n:\"DVal\", */ },\n\t/*::[*/0x01b5/*::]*/: { /* n:\"DConBin\", */ },\n\t/*::[*/0x01b6/*::]*/: { /* n:\"TxO\", */ f:parse_TxO },\n\t/*::[*/0x01b7/*::]*/: { /* n:\"RefreshAll\", */ f:parsebool }, //\n\t/*::[*/0x01b8/*::]*/: { /* n:\"HLink\", */ f:parse_HLink },\n\t/*::[*/0x01b9/*::]*/: { /* n:\"Lel\", */ },\n\t/*::[*/0x01ba/*::]*/: { /* n:\"CodeName\", */ f:parse_XLUnicodeString },\n\t/*::[*/0x01bb/*::]*/: { /* n:\"SXFDBType\", */ },\n\t/*::[*/0x01bc/*::]*/: { /* n:\"Prot4RevPass\", */ f:parseuint16 },\n\t/*::[*/0x01bd/*::]*/: { /* n:\"ObNoMacros\", */ },\n\t/*::[*/0x01be/*::]*/: { /* n:\"Dv\", */ },\n\t/*::[*/0x01c0/*::]*/: { /* n:\"Excel9File\", */ f:parsenoop2 },\n\t/*::[*/0x01c1/*::]*/: { /* n:\"RecalcId\", */ f:parse_RecalcId, r:2},\n\t/*::[*/0x01c2/*::]*/: { /* n:\"EntExU2\", */ f:parsenoop2 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0201/*::]*/: { /* n:\"Blank\", */ f:parse_Blank },\n\t/*::[*/0x0203/*::]*/: { /* n:\"Number\", */ f:parse_Number },\n\t/*::[*/0x0204/*::]*/: { /* n:\"Label\", */ f:parse_Label },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0207/*::]*/: { /* n:\"String\", */ f:parse_String },\n\t/*::[*/0x0208/*::]*/: { /* n:\"Row\", */ f:parse_Row },\n\t/*::[*/0x020b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0221/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0225/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t/*::[*/0x0236/*::]*/: { /* n:\"Table\", */ },\n\t/*::[*/0x023e/*::]*/: { /* n:\"Window2\", */ f:parse_Window2 },\n\t/*::[*/0x027e/*::]*/: { /* n:\"RK\", */ f:parse_RK },\n\t/*::[*/0x0293/*::]*/: { /* n:\"Style\", */ },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BigName\", */ },\n\t/*::[*/0x041e/*::]*/: { /* n:\"Format\", */ f:parse_Format },\n\t/*::[*/0x043c/*::]*/: { /* n:\"ContinueBigName\", */ },\n\t/*::[*/0x04bc/*::]*/: { /* n:\"ShrFmla\", */ f:parse_ShrFmla },\n\t/*::[*/0x0800/*::]*/: { /* n:\"HLinkTooltip\", */ f:parse_HLinkTooltip },\n\t/*::[*/0x0801/*::]*/: { /* n:\"WebPub\", */ },\n\t/*::[*/0x0802/*::]*/: { /* n:\"QsiSXTag\", */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"DBQueryExt\", */ },\n\t/*::[*/0x0804/*::]*/: { /* n:\"ExtString\", */ },\n\t/*::[*/0x0805/*::]*/: { /* n:\"TxtQry\", */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"Qsir\", */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"Qsif\", */ },\n\t/*::[*/0x0808/*::]*/: { /* n:\"RRDTQSIF\", */ },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x080a/*::]*/: { /* n:\"OleDbConn\", */ },\n\t/*::[*/0x080b/*::]*/: { /* n:\"WOpt\", */ },\n\t/*::[*/0x080c/*::]*/: { /* n:\"SXViewEx\", */ },\n\t/*::[*/0x080d/*::]*/: { /* n:\"SXTH\", */ },\n\t/*::[*/0x080e/*::]*/: { /* n:\"SXPIEx\", */ },\n\t/*::[*/0x080f/*::]*/: { /* n:\"SXVDTEx\", */ },\n\t/*::[*/0x0810/*::]*/: { /* n:\"SXViewEx9\", */ },\n\t/*::[*/0x0812/*::]*/: { /* n:\"ContinueFrt\", */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"RealTimeData\", */ },\n\t/*::[*/0x0850/*::]*/: { /* n:\"ChartFrtInfo\", */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"FrtWrapper\", */ },\n\t/*::[*/0x0852/*::]*/: { /* n:\"StartBlock\", */ },\n\t/*::[*/0x0853/*::]*/: { /* n:\"EndBlock\", */ },\n\t/*::[*/0x0854/*::]*/: { /* n:\"StartObject\", */ },\n\t/*::[*/0x0855/*::]*/: { /* n:\"EndObject\", */ },\n\t/*::[*/0x0856/*::]*/: { /* n:\"CatLab\", */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"YMult\", */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"SXViewLink\", */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"PivotChartBits\", */ },\n\t/*::[*/0x085a/*::]*/: { /* n:\"FrtFontList\", */ },\n\t/*::[*/0x0862/*::]*/: { /* n:\"SheetExt\", */ },\n\t/*::[*/0x0863/*::]*/: { /* n:\"BookExt\", */ r:12},\n\t/*::[*/0x0864/*::]*/: { /* n:\"SXAddl\", */ },\n\t/*::[*/0x0865/*::]*/: { /* n:\"CrErr\", */ },\n\t/*::[*/0x0866/*::]*/: { /* n:\"HFPicture\", */ },\n\t/*::[*/0x0867/*::]*/: { /* n:\"FeatHdr\", */ f:parsenoop2 },\n\t/*::[*/0x0868/*::]*/: { /* n:\"Feat\", */ },\n\t/*::[*/0x086a/*::]*/: { /* n:\"DataLabExt\", */ },\n\t/*::[*/0x086b/*::]*/: { /* n:\"DataLabExtContents\", */ },\n\t/*::[*/0x086c/*::]*/: { /* n:\"CellWatch\", */ },\n\t/*::[*/0x0871/*::]*/: { /* n:\"FeatHdr11\", */ },\n\t/*::[*/0x0872/*::]*/: { /* n:\"Feature11\", */ },\n\t/*::[*/0x0874/*::]*/: { /* n:\"DropDownObjIds\", */ },\n\t/*::[*/0x0875/*::]*/: { /* n:\"ContinueFrt11\", */ },\n\t/*::[*/0x0876/*::]*/: { /* n:\"DConn\", */ },\n\t/*::[*/0x0877/*::]*/: { /* n:\"List12\", */ },\n\t/*::[*/0x0878/*::]*/: { /* n:\"Feature12\", */ },\n\t/*::[*/0x0879/*::]*/: { /* n:\"CondFmt12\", */ },\n\t/*::[*/0x087a/*::]*/: { /* n:\"CF12\", */ },\n\t/*::[*/0x087b/*::]*/: { /* n:\"CFEx\", */ },\n\t/*::[*/0x087c/*::]*/: { /* n:\"XFCRC\", */ f:parse_XFCRC, r:12 },\n\t/*::[*/0x087d/*::]*/: { /* n:\"XFExt\", */ f:parse_XFExt, r:12 },\n\t/*::[*/0x087e/*::]*/: { /* n:\"AutoFilter12\", */ },\n\t/*::[*/0x087f/*::]*/: { /* n:\"ContinueFrt12\", */ },\n\t/*::[*/0x0884/*::]*/: { /* n:\"MDTInfo\", */ },\n\t/*::[*/0x0885/*::]*/: { /* n:\"MDXStr\", */ },\n\t/*::[*/0x0886/*::]*/: { /* n:\"MDXTuple\", */ },\n\t/*::[*/0x0887/*::]*/: { /* n:\"MDXSet\", */ },\n\t/*::[*/0x0888/*::]*/: { /* n:\"MDXProp\", */ },\n\t/*::[*/0x0889/*::]*/: { /* n:\"MDXKPI\", */ },\n\t/*::[*/0x088a/*::]*/: { /* n:\"MDB\", */ },\n\t/*::[*/0x088b/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x088c/*::]*/: { /* n:\"Compat12\", */ f:parsebool, r:12 },\n\t/*::[*/0x088d/*::]*/: { /* n:\"DXF\", */ },\n\t/*::[*/0x088e/*::]*/: { /* n:\"TableStyles\", */ r:12 },\n\t/*::[*/0x088f/*::]*/: { /* n:\"TableStyle\", */ },\n\t/*::[*/0x0890/*::]*/: { /* n:\"TableStyleElement\", */ },\n\t/*::[*/0x0892/*::]*/: { /* n:\"StyleExt\", */ },\n\t/*::[*/0x0893/*::]*/: { /* n:\"NamePublish\", */ },\n\t/*::[*/0x0894/*::]*/: { /* n:\"NameCmt\", */ f:parse_NameCmt, r:12 },\n\t/*::[*/0x0895/*::]*/: { /* n:\"SortData\", */ },\n\t/*::[*/0x0896/*::]*/: { /* n:\"Theme\", */ f:parse_Theme, r:12 },\n\t/*::[*/0x0897/*::]*/: { /* n:\"GUIDTypeLib\", */ },\n\t/*::[*/0x0898/*::]*/: { /* n:\"FnGrp12\", */ },\n\t/*::[*/0x0899/*::]*/: { /* n:\"NameFnGrp12\", */ },\n\t/*::[*/0x089a/*::]*/: { /* n:\"MTRSettings\", */ f:parse_MTRSettings, r:12 },\n\t/*::[*/0x089b/*::]*/: { /* n:\"CompressPictures\", */ f:parsenoop2 },\n\t/*::[*/0x089c/*::]*/: { /* n:\"HeaderFooter\", */ },\n\t/*::[*/0x089d/*::]*/: { /* n:\"CrtLayout12\", */ },\n\t/*::[*/0x089e/*::]*/: { /* n:\"CrtMlFrt\", */ },\n\t/*::[*/0x089f/*::]*/: { /* n:\"CrtMlFrtContinue\", */ },\n\t/*::[*/0x08a3/*::]*/: { /* n:\"ForceFullCalculation\", */ f:parse_ForceFullCalculation },\n\t/*::[*/0x08a4/*::]*/: { /* n:\"ShapePropsStream\", */ },\n\t/*::[*/0x08a5/*::]*/: { /* n:\"TextPropsStream\", */ },\n\t/*::[*/0x08a6/*::]*/: { /* n:\"RichTextStream\", */ },\n\t/*::[*/0x08a7/*::]*/: { /* n:\"CrtLayout12A\", */ },\n\t/*::[*/0x1001/*::]*/: { /* n:\"Units\", */ },\n\t/*::[*/0x1002/*::]*/: { /* n:\"Chart\", */ },\n\t/*::[*/0x1003/*::]*/: { /* n:\"Series\", */ },\n\t/*::[*/0x1006/*::]*/: { /* n:\"DataFormat\", */ },\n\t/*::[*/0x1007/*::]*/: { /* n:\"LineFormat\", */ },\n\t/*::[*/0x1009/*::]*/: { /* n:\"MarkerFormat\", */ },\n\t/*::[*/0x100a/*::]*/: { /* n:\"AreaFormat\", */ },\n\t/*::[*/0x100b/*::]*/: { /* n:\"PieFormat\", */ },\n\t/*::[*/0x100c/*::]*/: { /* n:\"AttachedLabel\", */ },\n\t/*::[*/0x100d/*::]*/: { /* n:\"SeriesText\", */ },\n\t/*::[*/0x1014/*::]*/: { /* n:\"ChartFormat\", */ },\n\t/*::[*/0x1015/*::]*/: { /* n:\"Legend\", */ },\n\t/*::[*/0x1016/*::]*/: { /* n:\"SeriesList\", */ },\n\t/*::[*/0x1017/*::]*/: { /* n:\"Bar\", */ },\n\t/*::[*/0x1018/*::]*/: { /* n:\"Line\", */ },\n\t/*::[*/0x1019/*::]*/: { /* n:\"Pie\", */ },\n\t/*::[*/0x101a/*::]*/: { /* n:\"Area\", */ },\n\t/*::[*/0x101b/*::]*/: { /* n:\"Scatter\", */ },\n\t/*::[*/0x101c/*::]*/: { /* n:\"CrtLine\", */ },\n\t/*::[*/0x101d/*::]*/: { /* n:\"Axis\", */ },\n\t/*::[*/0x101e/*::]*/: { /* n:\"Tick\", */ },\n\t/*::[*/0x101f/*::]*/: { /* n:\"ValueRange\", */ },\n\t/*::[*/0x1020/*::]*/: { /* n:\"CatSerRange\", */ },\n\t/*::[*/0x1021/*::]*/: { /* n:\"AxisLine\", */ },\n\t/*::[*/0x1022/*::]*/: { /* n:\"CrtLink\", */ },\n\t/*::[*/0x1024/*::]*/: { /* n:\"DefaultText\", */ },\n\t/*::[*/0x1025/*::]*/: { /* n:\"Text\", */ },\n\t/*::[*/0x1026/*::]*/: { /* n:\"FontX\", */ f:parseuint16 },\n\t/*::[*/0x1027/*::]*/: { /* n:\"ObjectLink\", */ },\n\t/*::[*/0x1032/*::]*/: { /* n:\"Frame\", */ },\n\t/*::[*/0x1033/*::]*/: { /* n:\"Begin\", */ },\n\t/*::[*/0x1034/*::]*/: { /* n:\"End\", */ },\n\t/*::[*/0x1035/*::]*/: { /* n:\"PlotArea\", */ },\n\t/*::[*/0x103a/*::]*/: { /* n:\"Chart3d\", */ },\n\t/*::[*/0x103c/*::]*/: { /* n:\"PicF\", */ },\n\t/*::[*/0x103d/*::]*/: { /* n:\"DropBar\", */ },\n\t/*::[*/0x103e/*::]*/: { /* n:\"Radar\", */ },\n\t/*::[*/0x103f/*::]*/: { /* n:\"Surf\", */ },\n\t/*::[*/0x1040/*::]*/: { /* n:\"RadarArea\", */ },\n\t/*::[*/0x1041/*::]*/: { /* n:\"AxisParent\", */ },\n\t/*::[*/0x1043/*::]*/: { /* n:\"LegendException\", */ },\n\t/*::[*/0x1044/*::]*/: { /* n:\"ShtProps\", */ f:parse_ShtProps },\n\t/*::[*/0x1045/*::]*/: { /* n:\"SerToCrt\", */ },\n\t/*::[*/0x1046/*::]*/: { /* n:\"AxesUsed\", */ },\n\t/*::[*/0x1048/*::]*/: { /* n:\"SBaseRef\", */ },\n\t/*::[*/0x104a/*::]*/: { /* n:\"SerParent\", */ },\n\t/*::[*/0x104b/*::]*/: { /* n:\"SerAuxTrend\", */ },\n\t/*::[*/0x104e/*::]*/: { /* n:\"IFmtRecord\", */ },\n\t/*::[*/0x104f/*::]*/: { /* n:\"Pos\", */ },\n\t/*::[*/0x1050/*::]*/: { /* n:\"AlRuns\", */ },\n\t/*::[*/0x1051/*::]*/: { /* n:\"BRAI\", */ },\n\t/*::[*/0x105b/*::]*/: { /* n:\"SerAuxErrBar\", */ },\n\t/*::[*/0x105c/*::]*/: { /* n:\"ClrtClient\", */ f:parse_ClrtClient },\n\t/*::[*/0x105d/*::]*/: { /* n:\"SerFmt\", */ },\n\t/*::[*/0x105f/*::]*/: { /* n:\"Chart3DBarShape\", */ },\n\t/*::[*/0x1060/*::]*/: { /* n:\"Fbi\", */ },\n\t/*::[*/0x1061/*::]*/: { /* n:\"BopPop\", */ },\n\t/*::[*/0x1062/*::]*/: { /* n:\"AxcExt\", */ },\n\t/*::[*/0x1063/*::]*/: { /* n:\"Dat\", */ },\n\t/*::[*/0x1064/*::]*/: { /* n:\"PlotGrowth\", */ },\n\t/*::[*/0x1065/*::]*/: { /* n:\"SIIndex\", */ },\n\t/*::[*/0x1066/*::]*/: { /* n:\"GelFrame\", */ },\n\t/*::[*/0x1067/*::]*/: { /* n:\"BopPopCustom\", */ },\n\t/*::[*/0x1068/*::]*/: { /* n:\"Fbi2\", */ },\n\n\t/*::[*/0x0000/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BIFF2BLANK\", */ },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BIFF2INT\", */ f:parse_BIFF2INT },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BIFF2NUM\", */ f:parse_BIFF2NUM },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BIFF2STR\", */ f:parse_BIFF2STR },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0007/*::]*/: { /* n:\"String\", */ f:parse_BIFF2STRING },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BIFF2ROW\", */ },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x000b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"ExternCount\", */ f:parseuint16 },\n\t/*::[*/0x001e/*::]*/: { /* n:\"BIFF2FORMAT\", */ f:parse_BIFF2Format },\n\t/*::[*/0x001f/*::]*/: { /* n:\"BIFF2FMTCNT\", */ }, /* 16-bit cnt of BIFF2FORMAT records */\n\t/*::[*/0x0020/*::]*/: { /* n:\"BIFF2COLINFO\", */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0024/*::]*/: { /* n:\"COLWIDTH\", */ },\n\t/*::[*/0x0025/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t// 0x2c ??\n\t// 0x2d ??\n\t// 0x2e ??\n\t// 0x30 FONTCOUNT: number of fonts\n\t/*::[*/0x0032/*::]*/: { /* n:\"BIFF2FONTXTRA\", */ f:parse_BIFF2FONTXTRA },\n\t// 0x35: INFOOPTS\n\t// 0x36: TABLE (BIFF2 only)\n\t// 0x37: TABLE2 (BIFF2 only)\n\t// 0x38: WNDESK\n\t// 0x39 ??\n\t// 0x3a: BEGINPREF\n\t// 0x3b: ENDPREF\n\t/*::[*/0x003e/*::]*/: { /* n:\"BIFF2WINDOW2\", */ },\n\t// 0x3f ??\n\t// 0x46: SHOWSCROLL\n\t// 0x47: SHOWFORMULA\n\t// 0x48: STATUSBAR\n\t// 0x49: SHORTMENUS\n\t// 0x4A:\n\t// 0x4B:\n\t// 0x4C:\n\t// 0x4E:\n\t// 0x4F:\n\t// 0x58: TOOLBAR (BIFF3)\n\n\t/* - - - */\n\t/*::[*/0x0034/*::]*/: { /* n:\"DDEObjName\", */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BIFF2XF\", */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BIFF2XFINDEX\", */ f:parseuint16 },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BIFF2FONTCLR\", */ },\n\t/*::[*/0x0056/*::]*/: { /* n:\"BIFF4FMTCNT\", */ }, /* 16-bit cnt, similar to BIFF2 */\n\t/*::[*/0x007e/*::]*/: { /* n:\"RK\", */ }, /* Not necessarily same as 0x027e */\n\t/*::[*/0x007f/*::]*/: { /* n:\"ImData\", */ f:parse_ImData },\n\t/*::[*/0x0087/*::]*/: { /* n:\"Addin\", */ },\n\t/*::[*/0x0088/*::]*/: { /* n:\"Edg\", */ },\n\t/*::[*/0x0089/*::]*/: { /* n:\"Pub\", */ },\n\t// 0x8A\n\t// 0x8B LH: alternate menu key flag (BIFF3/4)\n\t// 0x8E\n\t// 0x8F\n\t/*::[*/0x0091/*::]*/: { /* n:\"Sub\", */ },\n\t// 0x93 STYLE\n\t/*::[*/0x0094/*::]*/: { /* n:\"LHRecord\", */ },\n\t/*::[*/0x0095/*::]*/: { /* n:\"LHNGraph\", */ },\n\t/*::[*/0x0096/*::]*/: { /* n:\"Sound\", */ },\n\t// 0xA2 FNPROTO: function prototypes (BIFF4)\n\t// 0xA3\n\t// 0xA8\n\t/*::[*/0x00a9/*::]*/: { /* n:\"CoordList\", */ },\n\t/*::[*/0x00ab/*::]*/: { /* n:\"GCW\", */ },\n\t/*::[*/0x00bc/*::]*/: { /* n:\"ShrFmla\", */ }, /* Not necessarily same as 0x04bc */\n\t/*::[*/0x00bf/*::]*/: { /* n:\"ToolbarHdr\", */ },\n\t/*::[*/0x00c0/*::]*/: { /* n:\"ToolbarEnd\", */ },\n\t/*::[*/0x00c2/*::]*/: { /* n:\"AddMenu\", */ },\n\t/*::[*/0x00c3/*::]*/: { /* n:\"DelMenu\", */ },\n\t/*::[*/0x00d6/*::]*/: { /* n:\"RString\", */ f:parse_RString },\n\t/*::[*/0x00df/*::]*/: { /* n:\"UDDesc\", */ },\n\t/*::[*/0x00ea/*::]*/: { /* n:\"TabIdConf\", */ },\n\t/*::[*/0x0162/*::]*/: { /* n:\"XL5Modify\", */ },\n\t/*::[*/0x01a5/*::]*/: { /* n:\"FileSharing2\", */ },\n\t/*::[*/0x0206/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0218/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0223/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0231/*::]*/: { /* n:\"Font\", */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BIFF3XF\", */ },\n\t/*::[*/0x0406/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BIFF4XF\", */ },\n\t/*::[*/0x086d/*::]*/: { /* n:\"FeatInfo\", */ },\n\t/*::[*/0x0873/*::]*/: { /* n:\"FeatInfo11\", */ },\n\t/*::[*/0x0881/*::]*/: { /* n:\"SXAddl12\", */ },\n\t/*::[*/0x08c0/*::]*/: { /* n:\"AutoWebPub\", */ },\n\t/*::[*/0x08c1/*::]*/: { /* n:\"ListObj\", */ },\n\t/*::[*/0x08c2/*::]*/: { /* n:\"ListField\", */ },\n\t/*::[*/0x08c3/*::]*/: { /* n:\"ListDV\", */ },\n\t/*::[*/0x08c4/*::]*/: { /* n:\"ListCondFmt\", */ },\n\t/*::[*/0x08c5/*::]*/: { /* n:\"ListCF\", */ },\n\t/*::[*/0x08c6/*::]*/: { /* n:\"FMQry\", */ },\n\t/*::[*/0x08c7/*::]*/: { /* n:\"FMSQry\", */ },\n\t/*::[*/0x08c8/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x08c9/*::]*/: { /* n:\"LnExt\", */ },\n\t/*::[*/0x08ca/*::]*/: { /* n:\"MkrExt\", */ },\n\t/*::[*/0x08cb/*::]*/: { /* n:\"CrtCoopt\", */ },\n\t/*::[*/0x08d6/*::]*/: { /* n:\"FRTArchId$\", */ r:12 },\n\n\t/*::[*/0x7262/*::]*/: {}\n};\n\nfunction write_biff_rec(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar t/*:number*/ = type;\n\tif(isNaN(t)) return;\n\tvar len = length || (payload||[]).length || 0;\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, len);\n\tif(/*:: len != null &&*/len > 0 && is_buf(payload)) ba.push(payload);\n}\n\nfunction write_biff_continue(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar len = length || (payload||[]).length || 0;\n\tif(len <= 8224) return write_biff_rec(ba, type, payload, len);\n\tvar t = type;\n\tif(isNaN(t)) return;\n\tvar parts = payload.parts || [], sidx = 0;\n\tvar i = 0, w = 0;\n\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, w);\n\tba.push(payload.slice(i, i + w));\n\ti += w;\n\twhile(i < len) {\n\t\to = ba.next(4);\n\t\to.write_shift(2, 0x3c); // TODO: figure out correct continue type\n\t\tw = 0;\n\t\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\t\to.write_shift(2, w);\n\t\tba.push(payload.slice(i, i+w)); i+= w;\n\t}\n}\n\nfunction write_BIFF2Cell(out, r/*:number*/, c/*:number*/) {\n\tif(!out) out = new_buf(7);\n\tout.write_shift(2, r);\n\tout.write_shift(2, c);\n\tout.write_shift(2, 0);\n\tout.write_shift(1, 0);\n\treturn out;\n}\n\nfunction write_BIFF2BERR(r/*:number*/, c/*:number*/, val, t/*:?string*/) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\twrite_Bes(val, t || 'b', out);\n\treturn out;\n}\n\n/* TODO: codepage, large strings */\nfunction write_BIFF2LABEL(r/*:number*/, c/*:number*/, val) {\n\tvar out = new_buf(8 + 2*val.length);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(1, val.length);\n\tout.write_shift(val.length, val, 'sbcs');\n\treturn out.l < out.length ? out.slice(0, out.l) : out;\n}\n\nfunction write_ws_biff2_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*//*::, opts*/) {\n\tif(cell.v != null) switch(cell.t) {\n\t\tcase 'd': case 'n':\n\t\t\tvar v = cell.t == 'd' ? datenum(parseDate(cell.v)) : cell.v;\n\t\t\tif((v == (v|0)) && (v >= 0) && (v < 65536))\n\t\t\t\twrite_biff_rec(ba, 0x0002, write_BIFF2INT(R, C, v));\n\t\t\telse\n\t\t\t\twrite_biff_rec(ba, 0x0003, write_BIFF2NUM(R,C, v));\n\t\t\treturn;\n\t\tcase 'b': case 'e': write_biff_rec(ba, 0x0005, write_BIFF2BERR(R, C, cell.v, cell.t)); return;\n\t\t/* TODO: codepage, sst */\n\t\tcase 's': case 'str':\n\t\t\twrite_biff_rec(ba, 0x0004, write_BIFF2LABEL(R, C, (cell.v||\"\").slice(0,255)));\n\t\t\treturn;\n\t}\n\twrite_biff_rec(ba, 0x0001, write_BIFF2Cell(null, R, C));\n}\n\nfunction write_ws_biff2(ba/*:BufArray*/, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {\n\tvar dense = Array.isArray(ws);\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref/*:string*/, rr = \"\", cols/*:Array<string>*/ = [];\n\tif(range.e.c > 0xFF || range.e.r > 0x3FFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, 0x3FFF);\n\t\tref = encode_range(range);\n\t}\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff2_cell(ba, cell, R, C, opts);\n\t\t}\n\t}\n}\n\n/* Based on test files */\nfunction write_biff2_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\tvar ba = buf_array();\n\tvar idx = 0;\n\tfor(var i=0;i<wb.SheetNames.length;++i) if(wb.SheetNames[i] == o.sheet) idx=i;\n\tif(idx == 0 && !!o.sheet && wb.SheetNames[0] != o.sheet) throw new Error(\"Sheet not found: \" + o.sheet);\n\twrite_biff_rec(ba, (o.biff == 4 ? 0x0409 : (o.biff == 3 ? 0x0209 : 0x0009)), write_BOF(wb, 0x10, o));\n\t/* ... */\n\twrite_ws_biff2(ba, wb.Sheets[wb.SheetNames[idx]], idx, o, wb);\n\t/* ... */\n\twrite_biff_rec(ba, 0x000A);\n\treturn ba.end();\n}\n\nfunction write_FONTS_biff8(ba, data, opts) {\n\twrite_biff_rec(ba, 0x0031 /* Font */, write_Font({\n\t\tsz:12,\n\t\tcolor: {theme:1},\n\t\tname: \"Arial\",\n\t\tfamily: 2,\n\t\tscheme: \"minor\"\n\t}, opts));\n}\n\n\nfunction write_FMTS_biff8(ba, NF/*:?SSFTable*/, opts) {\n\tif(!NF) return;\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\t/*:: if(!NF) return; */\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) write_biff_rec(ba, 0x041E /* Format */, write_Format(i, NF[i], opts));\n\t});\n}\n\nfunction write_FEAT(ba, ws) {\n\t/* [MS-XLS] 2.4.112 */\n\tvar o = new_buf(19);\n\to.write_shift(4, 0x867); o.write_shift(4, 0); o.write_shift(4, 0);\n\to.write_shift(2, 3); o.write_shift(1, 1); o.write_shift(4, 0);\n\twrite_biff_rec(ba, 0x0867 /* FeatHdr */, o);\n\t/* [MS-XLS] 2.4.111 */\n\to = new_buf(39);\n\to.write_shift(4, 0x868); o.write_shift(4, 0); o.write_shift(4, 0);\n\to.write_shift(2, 3); o.write_shift(1, 0); o.write_shift(4, 0);\n\to.write_shift(2, 1); o.write_shift(4, 4); o.write_shift(2, 0);\n\twrite_Ref8U(safe_decode_range(ws['!ref']||\"A1\"), o);\n\to.write_shift(4, 4);\n\twrite_biff_rec(ba, 0x0868 /* Feat */, o);\n}\n\nfunction write_CELLXFS_biff8(ba, opts) {\n\tfor(var i = 0; i < 16; ++i) write_biff_rec(ba, 0x00e0 /* XF */, write_XF({numFmtId:0, style:true}, 0, opts));\n\topts.cellXfs.forEach(function(c) {\n\t\twrite_biff_rec(ba, 0x00e0 /* XF */, write_XF(c, 0, opts));\n\t});\n}\n\nfunction write_ws_biff8_hlinks(ba/*:BufArray*/, ws) {\n\tfor(var R=0; R<ws['!links'].length; ++R) {\n\t\tvar HL = ws['!links'][R];\n\t\twrite_biff_rec(ba, 0x01b8 /* HLink */, write_HLink(HL));\n\t\tif(HL[1].Tooltip) write_biff_rec(ba, 0x0800 /* HLinkTooltip */, write_HLinkTooltip(HL));\n\t}\n\tdelete ws['!links'];\n}\n\nfunction write_ws_cols_biff8(ba, cols) {\n\tif(!cols) return;\n\tvar cnt = 0;\n\tcols.forEach(function(col, idx) {\n\t\tif(++cnt <= 256 && col) {\n\t\t\twrite_biff_rec(ba, 0x007d /* ColInfo */, write_ColInfo(col_obj_w(idx, col), idx));\n\t\t}\n\t});\n}\n\nfunction write_ws_biff8_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*/, opts) {\n\tvar os = 16 + get_cell_style(opts.cellXfs, cell, opts);\n\tif(cell.v == null && !cell.bf) {\n\t\twrite_biff_rec(ba, 0x0201 /* Blank */, write_XLSCell(R, C, os));\n\t\treturn;\n\t}\n\tif(cell.bf) write_biff_rec(ba, 0x0006 /* Formula */, write_Formula(cell, R, C, opts, os));\n\telse switch(cell.t) {\n\t\tcase 'd': case 'n':\n\t\t\tvar v = cell.t == 'd' ? datenum(parseDate(cell.v)) : cell.v;\n\t\t\t/* TODO: emit RK as appropriate */\n\t\t\twrite_biff_rec(ba, 0x0203 /* Number */, write_Number(R, C, v, os, opts));\n\t\t\tbreak;\n\t\tcase 'b': case 'e':\n\t\t\twrite_biff_rec(ba, 0x0205 /* BoolErr */, write_BoolErr(R, C, cell.v, os, opts, cell.t));\n\t\t\tbreak;\n\t\t/* TODO: codepage, sst */\n\t\tcase 's': case 'str':\n\t\t\tif(opts.bookSST) {\n\t\t\t\tvar isst = get_sst_id(opts.Strings, cell.v, opts.revStrings);\n\t\t\t\twrite_biff_rec(ba, 0x00fd /* LabelSst */, write_LabelSst(R, C, isst, os, opts));\n\t\t\t} else write_biff_rec(ba, 0x0204 /* Label */, write_Label(R, C, (cell.v||\"\").slice(0,255), os, opts));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\twrite_biff_rec(ba, 0x0201 /* Blank */, write_XLSCell(R, C, os));\n\t}\n}\n\n/* [MS-XLS] 2.1.7.20.5 */\nfunction write_ws_biff8(idx/*:number*/, opts, wb/*:Workbook*/) {\n\tvar ba = buf_array();\n\tvar s = wb.SheetNames[idx], ws = wb.Sheets[s] || {};\n\tvar _WB/*:WBWBProps*/ = ((wb||{}).Workbook||{}/*:any*/);\n\tvar _sheet/*:WBWSProp*/ = ((_WB.Sheets||[])[idx]||{}/*:any*/);\n\tvar dense = Array.isArray(ws);\n\tvar b8 = opts.biff == 8;\n\tvar ref/*:string*/, rr = \"\", cols/*:Array<string>*/ = [];\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\");\n\tvar MAX_ROWS = b8 ? 65536 : 16384;\n\tif(range.e.c > 0xFF || range.e.r >= MAX_ROWS) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, MAX_ROWS-1);\n\t}\n\n\twrite_biff_rec(ba, 0x0809, write_BOF(wb, 0x10, opts));\n\t/* [Uncalced] Index */\n\twrite_biff_rec(ba, 0x000d /* CalcMode */, writeuint16(1));\n\twrite_biff_rec(ba, 0x000c /* CalcCount */, writeuint16(100));\n\twrite_biff_rec(ba, 0x000f /* CalcRefMode */, writebool(true));\n\twrite_biff_rec(ba, 0x0011 /* CalcIter */, writebool(false));\n\twrite_biff_rec(ba, 0x0010 /* CalcDelta */, write_Xnum(0.001));\n\twrite_biff_rec(ba, 0x005f /* CalcSaveRecalc */, writebool(true));\n\twrite_biff_rec(ba, 0x002a /* PrintRowCol */, writebool(false));\n\twrite_biff_rec(ba, 0x002b /* PrintGrid */, writebool(false));\n\twrite_biff_rec(ba, 0x0082 /* GridSet */, writeuint16(1));\n\twrite_biff_rec(ba, 0x0080 /* Guts */, write_Guts([0,0]));\n\t/* DefaultRowHeight WsBool [Sync] [LPr] [HorizontalPageBreaks] [VerticalPageBreaks] */\n\t/* Header (string) */\n\t/* Footer (string) */\n\twrite_biff_rec(ba, 0x0083 /* HCenter */, writebool(false));\n\twrite_biff_rec(ba, 0x0084 /* VCenter */, writebool(false));\n\t/* ... */\n\tif(b8) write_ws_cols_biff8(ba, ws[\"!cols\"]);\n\t/* ... */\n\twrite_biff_rec(ba, 0x200, write_Dimensions(range, opts));\n\t/* ... */\n\n\tif(b8) ws['!links'] = [];\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff8_cell(ba, cell, R, C, opts);\n\t\t\tif(b8 && cell.l) ws['!links'].push([ref, cell.l]);\n\t\t}\n\t}\n\tvar cname/*:string*/ = _sheet.CodeName || _sheet.name || s;\n\t/* ... */\n\tif(b8) write_biff_rec(ba, 0x023e /* Window2 */, write_Window2((_WB.Views||[])[0]));\n\t/* ... */\n\tif(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, 0x00e5 /* MergeCells */, write_MergeCells(ws['!merges']));\n\t/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */\n\tif(b8) write_ws_biff8_hlinks(ba, ws);\n\t/* [DVAL] */\n\twrite_biff_rec(ba, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t/* *WebPub *CellWatch [SheetExt] */\n\tif(b8) write_FEAT(ba, ws);\n\t/* *FEAT11 *RECORD12 */\n\twrite_biff_rec(ba, 0x000a /* EOF */);\n\treturn ba.end();\n}\n\n/* [MS-XLS] 2.1.7.20.3 */\nfunction write_biff8_global(wb/*:Workbook*/, bufs, opts/*:WriteOpts*/) {\n\tvar A = buf_array();\n\tvar _WB/*:WBWBProps*/ = ((wb||{}).Workbook||{}/*:any*/);\n\tvar _sheets/*:Array<WBWSProp>*/ = (_WB.Sheets||[]);\n\tvar _wb/*:WBProps*/ = /*::((*/_WB.WBProps||{/*::CodeName:\"ThisWorkbook\"*/}/*:: ):any)*/;\n\tvar b8 = opts.biff == 8, b5 = opts.biff == 5;\n\twrite_biff_rec(A, 0x0809, write_BOF(wb, 0x05, opts));\n\tif(opts.bookType == \"xla\") write_biff_rec(A, 0x0087 /* Addin */);\n\twrite_biff_rec(A, 0x00e1 /* InterfaceHdr */, b8 ? writeuint16(0x04b0) : null);\n\twrite_biff_rec(A, 0x00c1 /* Mms */, writezeroes(2));\n\tif(b5) write_biff_rec(A, 0x00bf /* ToolbarHdr */);\n\tif(b5) write_biff_rec(A, 0x00c0 /* ToolbarEnd */);\n\twrite_biff_rec(A, 0x00e2 /* InterfaceEnd */);\n\twrite_biff_rec(A, 0x005c /* WriteAccess */, write_WriteAccess(\"SheetJS\", opts));\n\t/* [FileSharing] */\n\twrite_biff_rec(A, 0x0042 /* CodePage */, writeuint16(b8 ? 0x04b0 : 0x04E4));\n\t/* *2047 Lel */\n\tif(b8) write_biff_rec(A, 0x0161 /* DSF */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01c0 /* Excel9File */);\n\twrite_biff_rec(A, 0x013d /* RRTabId */, write_RRTabId(wb.SheetNames.length));\n\tif(b8 && wb.vbaraw) write_biff_rec(A, 0x00d3 /* ObProj */);\n\t/* [ObNoMacros] */\n\tif(b8 && wb.vbaraw) {\n\t\tvar cname/*:string*/ = _wb.CodeName || \"ThisWorkbook\";\n\t\twrite_biff_rec(A, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t}\n\twrite_biff_rec(A, 0x009c /* BuiltInFnGroupCount */, writeuint16(0x11));\n\t/* *FnGroupName *FnGrp12 */\n\t/* *Lbl */\n\t/* [OleObjectSize] */\n\twrite_biff_rec(A, 0x0019 /* WinProtect */, writebool(false));\n\twrite_biff_rec(A, 0x0012 /* Protect */, writebool(false));\n\twrite_biff_rec(A, 0x0013 /* Password */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01af /* Prot4Rev */, writebool(false));\n\tif(b8) write_biff_rec(A, 0x01bc /* Prot4RevPass */, writeuint16(0));\n\twrite_biff_rec(A, 0x003d /* Window1 */, write_Window1(opts));\n\twrite_biff_rec(A, 0x0040 /* Backup */, writebool(false));\n\twrite_biff_rec(A, 0x008d /* HideObj */, writeuint16(0));\n\twrite_biff_rec(A, 0x0022 /* Date1904 */, writebool(safe1904(wb)==\"true\"));\n\twrite_biff_rec(A, 0x000e /* CalcPrecision */, writebool(true));\n\tif(b8) write_biff_rec(A, 0x01b7 /* RefreshAll */, writebool(false));\n\twrite_biff_rec(A, 0x00DA /* BookBool */, writeuint16(0));\n\t/* ... */\n\twrite_FONTS_biff8(A, wb, opts);\n\twrite_FMTS_biff8(A, wb.SSF, opts);\n\twrite_CELLXFS_biff8(A, opts);\n\t/* ... */\n\tif(b8) write_biff_rec(A, 0x0160 /* UsesELFs */, writebool(false));\n\tvar a = A.end();\n\n\tvar C = buf_array();\n\t/* METADATA [MTRSettings] [ForceFullCalculation] */\n\tif(b8) write_biff_rec(C, 0x008C, write_Country());\n\t/* *SUPBOOK *LBL *RTD [RecalcId] *HFPicture *MSODRAWINGGROUP */\n\n\t/* BIFF8: [SST *Continue] ExtSST */\n\tif(b8 && opts.Strings) write_biff_continue(C, 0x00FC, write_SST(opts.Strings, opts));\n\n\t/* *WebPub [WOpt] [CrErr] [BookExt] *FeatHdr *DConn [THEME] [CompressPictures] [Compat12] [GUIDTypeLib] */\n\twrite_biff_rec(C, 0x000A /* EOF */);\n\tvar c = C.end();\n\n\tvar B = buf_array();\n\tvar blen = 0, j = 0;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j].length;\n\tvar start = a.length + blen + c.length;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) {\n\t\tvar _sheet/*:WBWSProp*/ = _sheets[j] || ({}/*:any*/);\n\t\twrite_biff_rec(B, 0x0085 /* BoundSheet8 */, write_BoundSheet8({pos:start, hs:_sheet.Hidden||0, dt:0, name:wb.SheetNames[j]}, opts));\n\t\tstart += bufs[j].length;\n\t}\n\t/* 1*BoundSheet8 */\n\tvar b = B.end();\n\tif(blen != b.length) throw new Error(\"BS8 \" + blen + \" != \" + b.length);\n\n\tvar out = [];\n\tif(a.length) out.push(a);\n\tif(b.length) out.push(b);\n\tif(c.length) out.push(c);\n\treturn bconcat(out);\n}\n\n/* [MS-XLS] 2.1.7.20 Workbook Stream */\nfunction write_biff8_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tvar bufs = [];\n\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\to.revssf = evert_num(wb.SSF); o.revssf[wb.SSF[65535]] = 0;\n\t\to.ssf = wb.SSF;\n\t}\n\n\to.Strings = /*::((*/[]/*:: :any):SST)*/; o.Strings.Count = 0; o.Strings.Unique = 0;\n\tfix_write_opts(o);\n\n\to.cellXfs = [];\n\tget_cell_style(o.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) bufs[bufs.length] = write_ws_biff8(i, o, wb);\n\tbufs.unshift(write_biff8_global(wb, bufs, o));\n\treturn bconcat(bufs);\n}\n\nfunction write_biff_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tfor(var i = 0; i <= wb.SheetNames.length; ++i) {\n\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\tif(range.e.c > 255) { // note: 255 is IV\n\t\tif(typeof console != \"undefined\" && console.error) console.error(\"Worksheet '\" + wb.SheetNames[i] + \"' extends beyond column IV (255).  Data may be lost.\");\n\t\t}\n\t}\n\n\tvar o = opts || {};\n\tswitch(o.biff || 2) {\n\t\tcase 8: case 5: return write_biff8_buf(wb, opts);\n\t\tcase 4: case 3: case 2: return write_biff2_buf(wb, opts);\n\t}\n\tthrow new Error(\"invalid type \" + o.bookType + \" for BIFF\");\n}\n/* note: browser DOM element cannot see mso- style attrs, must parse */\nfunction html_to_sheet(str/*:string*/, _opts)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\tstr = str.replace(/<!--.*?-->/g, \"\");\n\tvar mtch/*:any*/ = str.match(/<table/i);\n\tif(!mtch) throw new Error(\"Invalid HTML: could not find <table>\");\n\tvar mtch2/*:any*/ = str.match(/<\\/table/i);\n\tvar i/*:number*/ = mtch.index, j/*:number*/ = mtch2 && mtch2.index || str.length;\n\tvar rows = split_regex(str.slice(i, j), /(:?<tr[^>]*>)/i, \"<tr>\");\n\tvar R = -1, C = 0, RS = 0, CS = 0;\n\tvar range/*:Range*/ = {s:{r:10000000, c:10000000},e:{r:0,c:0}};\n\tvar merges/*:Array<Range>*/ = [];\n\tfor(i = 0; i < rows.length; ++i) {\n\t\tvar row = rows[i].trim();\n\t\tvar hd = row.slice(0,3).toLowerCase();\n\t\tif(hd == \"<tr\") { ++R; if(opts.sheetRows && opts.sheetRows <= R) { --R; break; } C = 0; continue; }\n\t\tif(hd != \"<td\" && hd != \"<th\") continue;\n\t\tvar cells = row.split(/<\\/t[dh]>/i);\n\t\tfor(j = 0; j < cells.length; ++j) {\n\t\t\tvar cell = cells[j].trim();\n\t\t\tif(!cell.match(/<t[dh]/i)) continue;\n\t\t\tvar m = cell, cc = 0;\n\t\t\t/* TODO: parse styles etc */\n\t\t\twhile(m.charAt(0) == \"<\" && (cc = m.indexOf(\">\")) > -1) m = m.slice(cc+1);\n\t\t\tfor(var midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar _merge/*:Range*/ = merges[midx];\n\t\t\t\tif(_merge.s.c == C && _merge.s.r < R && R <= _merge.e.r) { C = _merge.e.c + 1; midx = -1; }\n\t\t\t}\n\t\t\tvar tag = parsexmltag(cell.slice(0, cell.indexOf(\">\")));\n\t\t\tCS = tag.colspan ? +tag.colspan : 1;\n\t\t\tif((RS = +tag.rowspan)>1 || CS>1) merges.push({s:{r:R,c:C},e:{r:R + (RS||1) - 1, c:C + CS - 1}});\n\t\t\tvar _t/*:string*/ = tag.t || tag[\"data-t\"] || \"\";\n\t\t\t/* TODO: generate stub cells */\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tm = htmldecode(m);\n\t\t\tif(range.s.r > R) range.s.r = R; if(range.e.r < R) range.e.r = R;\n\t\t\tif(range.s.c > C) range.s.c = C; if(range.e.c < C) range.e.c = C;\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tvar o/*:Cell*/ = {t:'s', v:m};\n\t\t\tif(opts.raw || !m.trim().length || _t == 's'){}\n\t\t\telse if(m === 'TRUE') o = {t:'b', v:true};\n\t\t\telse if(m === 'FALSE') o = {t:'b', v:false};\n\t\t\telse if(!isNaN(fuzzynum(m))) o = {t:'n', v:fuzzynum(m)};\n\t\t\telse if(!isNaN(fuzzydate(m).getDate())) {\n\t\t\t\to = ({t:'d', v:parseDate(m)}/*:any*/);\n\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t}\n\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = o; }\n\t\t\telse ws[encode_cell({r:R, c:C})] = o;\n\t\t\tC += CS;\n\t\t}\n\t}\n\tws['!ref'] = encode_range(range);\n\tif(merges.length) ws[\"!merges\"] = merges;\n\treturn ws;\n}\nfunction make_html_row(ws/*:Worksheet*/, r/*:Range*/, R/*:number*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar M/*:Array<Range>*/ = (ws['!merges'] ||[]);\n\tvar oo/*:Array<string>*/ = [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar RS = 0, CS = 0;\n\t\tfor(var j = 0; j < M.length; ++j) {\n\t\t\tif(M[j].s.r > R || M[j].s.c > C) continue;\n\t\t\tif(M[j].e.r < R || M[j].e.c < C) continue;\n\t\t\tif(M[j].s.r < R || M[j].s.c < C) { RS = -1; break; }\n\t\t\tRS = M[j].e.r - M[j].s.r + 1; CS = M[j].e.c - M[j].s.c + 1; break;\n\t\t}\n\t\tif(RS < 0) continue;\n\t\tvar coord = encode_cell({r:R,c:C});\n\t\tvar cell = o.dense ? (ws[R]||[])[C] : ws[coord];\n\t\t/* TODO: html entities */\n\t\tvar w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || \"\")) || \"\";\n\t\tvar sp = ({}/*:any*/);\n\t\tif(RS > 1) sp.rowspan = RS;\n\t\tif(CS > 1) sp.colspan = CS;\n\t\tif(o.editable) w = '<span contenteditable=\"true\">' + w + '</span>';\n\t\telse if(cell) {\n\t\t\tsp[\"data-t\"] = cell && cell.t || 'z';\n\t\t\tif(cell.v != null) sp[\"data-v\"] = cell.v;\n\t\t\tif(cell.z != null) sp[\"data-z\"] = cell.z;\n\t\t\tif(cell.l && (cell.l.Target || \"#\").charAt(0) != \"#\") w = '<a href=\"' + cell.l.Target +'\">' + w + '</a>';\n\t\t}\n\t\tsp.id = (o.id || \"sjs\") + \"-\" + coord;\n\t\too.push(writextag('td', w, sp));\n\t}\n\tvar preamble = \"<tr>\";\n\treturn preamble + oo.join(\"\") + \"</tr>\";\n}\n\nvar HTML_BEGIN = '<html><head><meta charset=\"utf-8\"/><title>SheetJS Table Export</title></head><body>';\nvar HTML_END = '</body></html>';\n\nfunction html_to_workbook(str/*:string*/, opts)/*:Workbook*/ {\n\tvar mtch = str.match(/<table[\\s\\S]*?>[\\s\\S]*?<\\/table>/gi);\n\tif(!mtch || mtch.length == 0) throw new Error(\"Invalid HTML: could not find <table>\");\n\tif(mtch.length == 1) return sheet_to_workbook(html_to_sheet(mtch[0], opts), opts);\n\tvar wb = book_new();\n\tmtch.forEach(function(s, idx) { book_append_sheet(wb, html_to_sheet(s, opts), \"Sheet\" + (idx+1)); });\n\treturn wb;\n}\n\nfunction make_html_preamble(ws/*:Worksheet*/, R/*:Range*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar out/*:Array<string>*/ = [];\n\treturn out.join(\"\") + '<table' + (o && o.id ? ' id=\"' + o.id + '\"' : \"\") + '>';\n}\n\nfunction sheet_to_html(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*//*, wb:?Workbook*/)/*:string*/ {\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tvar out/*:Array<string>*/ = [header];\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tout.push(make_html_preamble(ws, r, o));\n\tfor(var R = r.s.r; R <= r.e.r; ++R) out.push(make_html_row(ws, r, R, o));\n\tout.push(\"</table>\" + footer);\n\treturn out.join(\"\");\n}\n\nfunction sheet_add_dom(ws/*:Worksheet*/, table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null) opts.dense = DENSE;\n\tvar or_R = 0, or_C = 0;\n\tif(opts.origin != null) {\n\t\tif(typeof opts.origin == 'number') or_R = opts.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof opts.origin == \"string\" ? decode_cell(opts.origin) : opts.origin;\n\t\t\tor_R = _origin.r; or_C = _origin.c;\n\t\t}\n\t}\n\n\tvar rows/*:HTMLCollection<HTMLTableRowElement>*/ = table.getElementsByTagName('tr');\n\tvar sheetRows = Math.min(opts.sheetRows||10000000, rows.length);\n\tvar range/*:Range*/ = {s:{r:0,c:0},e:{r:or_R,c:or_C}};\n\tif(ws[\"!ref\"]) {\n\t\tvar _range/*:Range*/ = decode_range(ws[\"!ref\"]);\n\t\trange.s.r = Math.min(range.s.r, _range.s.r);\n\t\trange.s.c = Math.min(range.s.c, _range.s.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\tif(or_R == -1) range.e.r = or_R = _range.e.r + 1;\n\t}\n\tvar merges/*:Array<Range>*/ = [], midx = 0;\n\tvar rowinfo/*:Array<RowInfo>*/ = ws[\"!rows\"] || (ws[\"!rows\"] = []);\n\tvar _R = 0, R = 0, _C = 0, C = 0, RS = 0, CS = 0;\n\tif(!ws[\"!cols\"]) ws['!cols'] = [];\n\tfor(; _R < rows.length && R < sheetRows; ++_R) {\n\t\tvar row/*:HTMLTableRowElement*/ = rows[_R];\n\t\tif (is_dom_element_hidden(row)) {\n\t\t\tif (opts.display) continue;\n\t\t\trowinfo[R] = {hidden: true};\n\t\t}\n\t\tvar elts/*:HTMLCollection<HTMLTableCellElement>*/ = (row.children/*:any*/);\n\t\tfor(_C = C = 0; _C < elts.length; ++_C) {\n\t\t\tvar elt/*:HTMLTableCellElement*/ = elts[_C];\n\t\t\tif (opts.display && is_dom_element_hidden(elt)) continue;\n\t\t\tvar v/*:?string*/ = elt.hasAttribute('data-v') ? elt.getAttribute('data-v') : elt.hasAttribute('v') ? elt.getAttribute('v') : htmldecode(elt.innerHTML);\n\t\t\tvar z/*:?string*/ = elt.getAttribute('data-z') || elt.getAttribute('z');\n\t\t\tfor(midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar m/*:Range*/ = merges[midx];\n\t\t\t\tif(m.s.c == C + or_C && m.s.r < R + or_R && R + or_R <= m.e.r) { C = m.e.c+1 - or_C; midx = -1; }\n\t\t\t}\n\t\t\t/* TODO: figure out how to extract nonstandard mso- style */\n\t\t\tCS = +elt.getAttribute(\"colspan\") || 1;\n\t\t\tif( ((RS = (+elt.getAttribute(\"rowspan\") || 1)))>1 || CS>1) merges.push({s:{r:R + or_R,c:C + or_C},e:{r:R + or_R + (RS||1) - 1, c:C + or_C + (CS||1) - 1}});\n\t\t\tvar o/*:Cell*/ = {t:'s', v:v};\n\t\t\tvar _t/*:string*/ = elt.getAttribute(\"data-t\") || elt.getAttribute(\"t\") || \"\";\n\t\t\tif(v != null) {\n\t\t\t\tif(v.length == 0) o.t = _t || 'z';\n\t\t\t\telse if(opts.raw || v.trim().length == 0 || _t == \"s\"){}\n\t\t\t\telse if(v === 'TRUE') o = {t:'b', v:true};\n\t\t\t\telse if(v === 'FALSE') o = {t:'b', v:false};\n\t\t\t\telse if(!isNaN(fuzzynum(v))) o = {t:'n', v:fuzzynum(v)};\n\t\t\t\telse if(!isNaN(fuzzydate(v).getDate())) {\n\t\t\t\t\to = ({t:'d', v:parseDate(v)}/*:any*/);\n\t\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(o.z === undefined && z != null) o.z = z;\n\t\t\t/* The first link is used.  Links are assumed to be fully specified.\n\t\t\t * TODO: The right way to process relative links is to make a new <a> */\n\t\t\tvar l = \"\", Aelts = elt.getElementsByTagName(\"A\");\n\t\t\tif(Aelts && Aelts.length) for(var Aelti = 0; Aelti < Aelts.length; ++Aelti)\tif(Aelts[Aelti].hasAttribute(\"href\")) {\n\t\t\t\tl = Aelts[Aelti].getAttribute(\"href\"); if(l.charAt(0) != \"#\") break;\n\t\t\t}\n\t\t\tif(l && l.charAt(0) != \"#\") o.l = ({ Target: l });\n\t\t\tif(opts.dense) { if(!ws[R + or_R]) ws[R + or_R] = []; ws[R + or_R][C + or_C] = o; }\n\t\t\telse ws[encode_cell({c:C + or_C, r:R + or_R})] = o;\n\t\t\tif(range.e.c < C + or_C) range.e.c = C + or_C;\n\t\t\tC += CS;\n\t\t}\n\t\t++R;\n\t}\n\tif(merges.length) ws['!merges'] = (ws[\"!merges\"] || []).concat(merges);\n\trange.e.r = Math.max(range.e.r, R - 1 + or_R);\n\tws['!ref'] = encode_range(range);\n\tif(R >= sheetRows) ws['!fullref'] = encode_range((range.e.r = rows.length-_R+R-1 + or_R,range)); // We can count the real number of rows to parse but we don't to improve the performance\n\treturn ws;\n}\n\nfunction parse_dom_table(table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\treturn sheet_add_dom(ws, table, _opts);\n}\n\nfunction table_to_book(table/*:HTMLElement*/, opts/*:?any*/)/*:Workbook*/ {\n\treturn sheet_to_workbook(parse_dom_table(table, opts), opts);\n}\n\nfunction is_dom_element_hidden(element/*:HTMLElement*/)/*:boolean*/ {\n\tvar display/*:string*/ = '';\n\tvar get_computed_style/*:?function*/ = get_get_computed_style_function(element);\n\tif(get_computed_style) display = get_computed_style(element).getPropertyValue('display');\n\tif(!display) display = element.style && element.style.display;\n\treturn display === 'none';\n}\n\n/* global getComputedStyle */\nfunction get_get_computed_style_function(element/*:HTMLElement*/)/*:?function*/ {\n\t// The proper getComputedStyle implementation is the one defined in the element window\n\tif(element.ownerDocument.defaultView && typeof element.ownerDocument.defaultView.getComputedStyle === 'function') return element.ownerDocument.defaultView.getComputedStyle;\n\t// If it is not available, try to get one from the global namespace\n\tif(typeof getComputedStyle === 'function') return getComputedStyle;\n\treturn null;\n}\n/* OpenDocument */\nfunction parse_text_p(text/*:string*//*::, tag*/)/*:Array<any>*/ {\n\t/* 6.1.2 White Space Characters */\n\tvar fixed = text\n\t\t.replace(/[\\t\\r\\n]/g, \" \").trim().replace(/ +/g, \" \")\n\t\t.replace(/<text:s\\/>/g,\" \")\n\t\t.replace(/<text:s text:c=\"(\\d+)\"\\/>/g, function($$,$1) { return Array(parseInt($1,10)+1).join(\" \"); })\n\t\t.replace(/<text:tab[^>]*\\/>/g,\"\\t\")\n\t\t.replace(/<text:line-break\\/>/g,\"\\n\");\n\tvar v = unescapexml(fixed.replace(/<[^>]*>/g,\"\"));\n\n\treturn [v];\n}\n\nvar number_formats_ods = {\n\t/* ods name: [short ssf fmt, long ssf fmt] */\n\tday:           [\"d\",   \"dd\"],\n\tmonth:         [\"m\",   \"mm\"],\n\tyear:          [\"y\",   \"yy\"],\n\thours:         [\"h\",   \"hh\"],\n\tminutes:       [\"m\",   \"mm\"],\n\tseconds:       [\"s\",   \"ss\"],\n\t\"am-pm\":       [\"A/P\", \"AM/PM\"],\n\t\"day-of-week\": [\"ddd\", \"dddd\"],\n\tera:           [\"e\",   \"ee\"],\n\t/* there is no native representation of LO \"Q\" format */\n\tquarter:       [\"\\\\Qm\", \"m\\\\\\\"th quarter\\\"\"]\n};\n\n\nfunction parse_content_xml(d/*:string*/, _opts)/*:Workbook*/ {\n\t\tvar opts = _opts || {};\n\t\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\t\tvar str = xlml_normalize(d);\n\t\tvar state/*:Array<any>*/ = [], tmp;\n\t\tvar tag/*:: = {}*/;\n\t\tvar NFtag = {name:\"\"}, NF = \"\", pidx = 0;\n\t\tvar sheetag/*:: = {name:\"\", '名称':\"\"}*/;\n\t\tvar rowtag/*:: = {'行号':\"\"}*/;\n\t\tvar Sheets = {}, SheetNames/*:Array<string>*/ = [];\n\t\tvar ws = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\t\tvar Rn, q/*:: :any = ({t:\"\", v:null, z:null, w:\"\",c:[],}:any)*/;\n\t\tvar ctag = ({value:\"\"}/*:any*/);\n\t\tvar textp = \"\", textpidx = 0, textptag/*:: = {}*/;\n\t\tvar textR = [];\n\t\tvar R = -1, C = -1, range = {s: {r:1000000,c:10000000}, e: {r:0, c:0}};\n\t\tvar row_ol = 0;\n\t\tvar number_format_map = {};\n\t\tvar merges/*:Array<Range>*/ = [], mrange = {}, mR = 0, mC = 0;\n\t\tvar rowinfo/*:Array<RowInfo>*/ = [], rowpeat = 1, colpeat = 1;\n\t\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\t\tvar WB = {Names:[]};\n\t\tvar atag = ({}/*:any*/);\n\t\tvar _Ref/*:[string, string]*/ = [\"\", \"\"];\n\t\tvar comments/*:Array<Comment>*/ = [], comment/*:Comment*/ = ({}/*:any*/);\n\t\tvar creator = \"\", creatoridx = 0;\n\t\tvar isstub = false, intable = false;\n\t\tvar i = 0;\n\t\txlmlregex.lastIndex = 0;\n\t\tstr = str.replace(/<!--([\\s\\S]*?)-->/mg,\"\").replace(/<!DOCTYPE[^\\[]*\\[[^\\]]*\\]>/gm,\"\");\n\t\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3]=Rn[3].replace(/_.*$/,\"\"))) {\n\n\t\t\tcase 'table': case '工作表': // 9.1.2 <table:table>\n\t\t\t\tif(Rn[1]==='/') {\n\t\t\t\t\tif(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);\n\t\t\t\t\telse ws['!ref'] = \"A1:A1\";\n\t\t\t\t\tif(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {\n\t\t\t\t\t\tws['!fullref'] = ws['!ref'];\n\t\t\t\t\t\trange.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tws['!ref'] = encode_range(range);\n\t\t\t\t\t}\n\t\t\t\t\tif(merges.length) ws['!merges'] = merges;\n\t\t\t\t\tif(rowinfo.length) ws[\"!rows\"] = rowinfo;\n\t\t\t\t\tsheetag.name = sheetag['名称'] || sheetag.name;\n\t\t\t\t\tif(typeof JSON !== 'undefined') JSON.stringify(sheetag);\n\t\t\t\t\tSheetNames.push(sheetag.name);\n\t\t\t\t\tSheets[sheetag.name] = ws;\n\t\t\t\t\tintable = false;\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tsheetag = parsexmltag(Rn[0], false);\n\t\t\t\t\tR = C = -1;\n\t\t\t\t\trange.s.r = range.s.c = 10000000; range.e.r = range.e.c = 0;\n\t\t\t\t\tws = opts.dense ? ([]/*:any*/) : ({}/*:any*/); merges = [];\n\t\t\t\t\trowinfo = [];\n\t\t\t\t\tintable = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'table-row-group': // 9.1.9 <table:table-row-group>\n\t\t\t\tif(Rn[1] === \"/\") --row_ol; else ++row_ol;\n\t\t\t\tbreak;\n\t\t\tcase 'table-row': case '行': // 9.1.3 <table:table-row>\n\t\t\t\tif(Rn[1] === '/') { R+=rowpeat; rowpeat = 1; break; }\n\t\t\t\trowtag = parsexmltag(Rn[0], false);\n\t\t\t\tif(rowtag['行号']) R = rowtag['行号'] - 1; else if(R == -1) R = 0;\n\t\t\t\trowpeat = +rowtag['number-rows-repeated'] || 1;\n\t\t\t\t/* TODO: remove magic */\n\t\t\t\tif(rowpeat < 10) for(i = 0; i < rowpeat; ++i) if(row_ol > 0) rowinfo[R + i] = {level: row_ol};\n\t\t\t\tC = -1; break;\n\t\t\tcase 'covered-table-cell': // 9.1.5 <table:covered-table-cell>\n\t\t\t\tif(Rn[1] !== '/') ++C;\n\t\t\t\tif(opts.sheetStubs) {\n\t\t\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = {t:'z'}; }\n\t\t\t\t\telse ws[encode_cell({r:R,c:C})] = {t:'z'};\n\t\t\t\t}\n\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\tbreak; /* stub */\n\t\t\tcase 'table-cell': case '数据':\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) === '/') {\n\t\t\t\t\t++C;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tq = ({t:'z', v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(ctag.formula && opts.cellFormula != false) q.f = ods_to_csf_formula(unescapexml(ctag.formula));\n\t\t\t\t\tif((ctag['数据类型'] || ctag['value-type']) == \"string\") {\n\t\t\t\t\t\tq.t = \"s\"; q.v = unescapexml(ctag['string-value'] || \"\");\n\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\tif(!ws[R]) ws[R] = [];\n\t\t\t\t\t\t\tws[R][C] = q;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tws[encode_cell({r:R,c:C})] = q;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tC+= colpeat-1;\n\t\t\t\t} else if(Rn[1]!=='/') {\n\t\t\t\t\t++C;\n\t\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\t\tcolpeat = 1;\n\t\t\t\t\tvar rptR = rowpeat ? R + rowpeat - 1 : R;\n\t\t\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t\t\t\tif(C < range.s.c) range.s.c = C;\n\t\t\t\t\tif(R < range.s.r) range.s.r = R;\n\t\t\t\t\tif(rptR > range.e.r) range.e.r = rptR;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcomments = []; comment = ({}/*:any*/);\n\t\t\t\t\tq = ({t:ctag['数据类型'] || ctag['value-type'], v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\t\tif(ctag.formula) ctag.formula = unescapexml(ctag.formula);\n\t\t\t\t\t\tif(ctag['number-matrix-columns-spanned'] && ctag['number-matrix-rows-spanned']) {\n\t\t\t\t\t\t\tmR = parseInt(ctag['number-matrix-rows-spanned'],10) || 0;\n\t\t\t\t\t\t\tmC = parseInt(ctag['number-matrix-columns-spanned'],10) || 0;\n\t\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\t\tq.F = encode_range(mrange);\n\t\t\t\t\t\t\tarrayf.push([mrange, q.F]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ctag.formula) q.f = ods_to_csf_formula(ctag.formula);\n\t\t\t\t\t\telse for(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\t\t\tif(R >= arrayf[i][0].s.r && R <= arrayf[i][0].e.r)\n\t\t\t\t\t\t\t\tif(C >= arrayf[i][0].s.c && C <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\t\t\tq.F = arrayf[i][1];\n\t\t\t\t\t}\n\t\t\t\t\tif(ctag['number-columns-spanned'] || ctag['number-rows-spanned']) {\n\t\t\t\t\t\tmR = parseInt(ctag['number-rows-spanned'],10) || 0;\n\t\t\t\t\t\tmC = parseInt(ctag['number-columns-spanned'],10) || 0;\n\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\tmerges.push(mrange);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* 19.675.2 table:number-columns-repeated */\n\t\t\t\t\tif(ctag['number-columns-repeated']) colpeat = parseInt(ctag['number-columns-repeated'], 10);\n\n\t\t\t\t\t/* 19.385 office:value-type */\n\t\t\t\t\tswitch(q.t) {\n\t\t\t\t\t\tcase 'boolean': q.t = 'b'; q.v = parsexmlbool(ctag['boolean-value']); break;\n\t\t\t\t\t\tcase 'float': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'percentage': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'currency': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'date': q.t = 'd'; q.v = parseDate(ctag['date-value']);\n\t\t\t\t\t\t\tif(!opts.cellDates) { q.t = 'n'; q.v = datenum(q.v); }\n\t\t\t\t\t\t\tq.z = 'm/d/yy'; break;\n\t\t\t\t\t\tcase 'time': q.t = 'n'; q.v = parse_isodur(ctag['time-value'])/86400;\n\t\t\t\t\t\t\tif(opts.cellDates) { q.t = 'd'; q.v = numdate(q.v); }\n\t\t\t\t\t\t\tq.z = 'HH:MM:SS'; break;\n\t\t\t\t\t\tcase 'number': q.t = 'n'; q.v = parseFloat(ctag['数据数值']); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(q.t === 'string' || q.t === 'text' || !q.t) {\n\t\t\t\t\t\t\t\tq.t = 's';\n\t\t\t\t\t\t\t\tif(ctag['string-value'] != null) { textp = unescapexml(ctag['string-value']); textR = []; }\n\t\t\t\t\t\t\t} else throw new Error('Unsupported value type ' + q.t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tisstub = false;\n\t\t\t\t\tif(q.t === 's') {\n\t\t\t\t\t\tq.v = textp || '';\n\t\t\t\t\t\tif(textR.length) q.R = textR;\n\t\t\t\t\t\tisstub = textpidx == 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(atag.Target) q.l = atag;\n\t\t\t\t\tif(comments.length > 0) { q.c = comments; comments = []; }\n\t\t\t\t\tif(textp && opts.cellText !== false) q.w = textp;\n\t\t\t\t\tif(isstub) { q.t = \"z\"; delete q.v; }\n\t\t\t\t\tif(!isstub || opts.sheetStubs) {\n\t\t\t\t\t\tif(!(opts.sheetRows && opts.sheetRows <= R)) {\n\t\t\t\t\t\t\tfor(var rpt = 0; rpt < rowpeat; ++rpt) {\n\t\t\t\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!ws[R + rpt]) ws[R + rpt] = [];\n\t\t\t\t\t\t\t\t\tws[R + rpt][C] = rpt == 0 ? q : dup(q);\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[R + rpt][C + colpeat] = dup(q);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tws[encode_cell({r:R + rpt,c:C})] = q;\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[encode_cell({r:R + rpt,c:C + colpeat})] = dup(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(range.e.c <= C) range.e.c = C;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tC += colpeat-1; colpeat = 0;\n\t\t\t\t\tq = {/*:: t:\"\", v:null, z:null, w:\"\",c:[]*/};\n\t\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\t}\n\t\t\t\tatag = ({}/*:any*/);\n\t\t\t\tbreak; // 9.1.4 <table:table-cell>\n\n\t\t\t/* pure state */\n\t\t\tcase 'document': // TODO: <office:document> is the root for FODS\n\t\t\tcase 'document-content': case '电子表格文档': // 3.1.3.2 <office:document-content>\n\t\t\tcase 'spreadsheet': case '主体': // 3.7 <office:spreadsheet>\n\t\t\tcase 'scripts': // 3.12 <office:scripts>\n\t\t\tcase 'styles': // TODO <office:styles>\n\t\t\tcase 'font-face-decls': // 3.14 <office:font-face-decls>\n\t\t\tcase 'master-styles': // 3.15.4 <office:master-styles> -- relevant for FODS\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\n\t\t\tcase 'annotation': // 14.1 <office:annotation>\n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t\tcomment.t = textp;\n\t\t\t\t\tif(textR.length) /*::(*/comment/*:: :any)*/.R = textR;\n\t\t\t\t\tcomment.a = creator;\n\t\t\t\t\tcomments.push(comment);\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {state.push([Rn[3], false]);}\n\t\t\t\tcreator = \"\"; creatoridx = 0;\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'creator': // 4.3.2.7 <dc:creator>\n\t\t\t\tif(Rn[1]==='/') { creator = str.slice(creatoridx,Rn.index); }\n\t\t\t\telse creatoridx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\t/* ignore state */\n\t\t\tcase 'meta': case '元数据': // TODO: <office:meta> <uof:元数据> FODS/UOF\n\t\t\tcase 'settings': // TODO: <office:settings>\n\t\t\tcase 'config-item-set': // TODO: <office:config-item-set>\n\t\t\tcase 'config-item-map-indexed': // TODO: <office:config-item-map-indexed>\n\t\t\tcase 'config-item-map-entry': // TODO: <office:config-item-map-entry>\n\t\t\tcase 'config-item-map-named': // TODO: <office:config-item-map-entry>\n\t\t\tcase 'shapes': // 9.2.8 <table:shapes>\n\t\t\tcase 'frame': // 10.4.2 <draw:frame>\n\t\t\tcase 'text-box': // 10.4.3 <draw:text-box>\n\t\t\tcase 'image': // 10.4.4 <draw:image>\n\t\t\tcase 'data-pilot-tables': // 9.6.2 <table:data-pilot-tables>\n\t\t\tcase 'list-style': // 16.30 <text:list-style>\n\t\t\tcase 'form': // 13.13 <form:form>\n\t\t\tcase 'dde-links': // 9.8 <table:dde-links>\n\t\t\tcase 'event-listeners': // TODO\n\t\t\tcase 'chart': // TODO\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], false]);\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'scientific-number': // TODO: <number:scientific-number>\n\t\t\t\tbreak;\n\t\t\tcase 'currency-symbol': // TODO: <number:currency-symbol>\n\t\t\t\tbreak;\n\t\t\tcase 'currency-style': // TODO: <number:currency-style>\n\t\t\t\tbreak;\n\t\t\tcase 'number-style': // 16.27.2 <number:number-style>\n\t\t\tcase 'percentage-style': // 16.27.9 <number:percentage-style>\n\t\t\tcase 'date-style': // 16.27.10 <number:date-style>\n\t\t\tcase 'time-style': // 16.27.18 <number:time-style>\n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tnumber_format_map[NFtag.name] = NF;\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t} else if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tNF = \"\";\n\t\t\t\t\tNFtag = parsexmltag(Rn[0], false);\n\t\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t\t} break;\n\n\t\t\tcase 'script': break; // 3.13 <office:script>\n\t\t\tcase 'libraries': break; // TODO: <ooo:libraries>\n\t\t\tcase 'automatic-styles': break; // 3.15.3 <office:automatic-styles>\n\n\t\t\tcase 'default-style': // TODO: <style:default-style>\n\t\t\tcase 'page-layout': break; // TODO: <style:page-layout>\n\t\t\tcase 'style': // 16.2 <style:style>\n\t\t\t\tbreak;\n\t\t\tcase 'map': break; // 16.3 <style:map>\n\t\t\tcase 'font-face': break; // 16.21 <style:font-face>\n\n\t\t\tcase 'paragraph-properties': break; // 17.6 <style:paragraph-properties>\n\t\t\tcase 'table-properties': break; // 17.15 <style:table-properties>\n\t\t\tcase 'table-column-properties': break; // 17.16 <style:table-column-properties>\n\t\t\tcase 'table-row-properties': break; // 17.17 <style:table-row-properties>\n\t\t\tcase 'table-cell-properties': break; // 17.18 <style:table-cell-properties>\n\n\t\t\tcase 'number': // 16.27.3 <number:number>\n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'fraction': break; // TODO 16.27.6 <number:fraction>\n\n\t\t\tcase 'day': // 16.27.11 <number:day>\n\t\t\tcase 'month': // 16.27.12 <number:month>\n\t\t\tcase 'year': // 16.27.13 <number:year>\n\t\t\tcase 'era': // 16.27.14 <number:era>\n\t\t\tcase 'day-of-week': // 16.27.15 <number:day-of-week>\n\t\t\tcase 'week-of-year': // 16.27.16 <number:week-of-year>\n\t\t\tcase 'quarter': // 16.27.17 <number:quarter>\n\t\t\tcase 'hours': // 16.27.19 <number:hours>\n\t\t\tcase 'minutes': // 16.27.20 <number:minutes>\n\t\t\tcase 'seconds': // 16.27.21 <number:seconds>\n\t\t\tcase 'am-pm': // 16.27.22 <number:am-pm>\n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'boolean-style': break; // 16.27.23 <number:boolean-style>\n\t\t\tcase 'boolean': break; // 16.27.24 <number:boolean>\n\t\t\tcase 'text-style': break; // 16.27.25 <number:text-style>\n\t\t\tcase 'text': // 16.27.26 <number:text>\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") switch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'number-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\t\tNF += str.slice(pidx, Rn.index);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\tcase 'named-range': // 9.4.12 <table:named-range>\n\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t_Ref = ods_to_csf_3D(tag['cell-range-address']);\n\t\t\t\tvar nrange = ({Name:tag.name, Ref:_Ref[0] + '!' + _Ref[1]}/*:any*/);\n\t\t\t\tif(intable) nrange.Sheet = SheetNames.length;\n\t\t\t\tWB.Names.push(nrange);\n\t\t\t\tbreak;\n\n\t\t\tcase 'text-content': break; // 16.27.27 <number:text-content>\n\t\t\tcase 'text-properties': break; // 16.27.27 <style:text-properties>\n\t\t\tcase 'embedded-text': break; // 16.27.4 <number:embedded-text>\n\n\t\t\tcase 'body': case '电子表格': break; // 3.3 16.9.6 19.726.3\n\n\t\t\tcase 'forms': break; // 12.25.2 13.2\n\t\t\tcase 'table-column': break; // 9.1.6 <table:table-column>\n\t\t\tcase 'table-header-rows': break; // 9.1.7 <table:table-header-rows>\n\t\t\tcase 'table-rows': break; // 9.1.12 <table:table-rows>\n\t\t\t/* TODO: outline levels */\n\t\t\tcase 'table-column-group': break; // 9.1.10 <table:table-column-group>\n\t\t\tcase 'table-header-columns': break; // 9.1.11 <table:table-header-columns>\n\t\t\tcase 'table-columns': break; // 9.1.12 <table:table-columns>\n\n\t\t\tcase 'null-date': break; // 9.4.2 <table:null-date> TODO: date1904\n\n\t\t\tcase 'graphic-properties': break; // 17.21 <style:graphic-properties>\n\t\t\tcase 'calculation-settings': break; // 9.4.1 <table:calculation-settings>\n\t\t\tcase 'named-expressions': break; // 9.4.11 <table:named-expressions>\n\t\t\tcase 'label-range': break; // 9.4.9 <table:label-range>\n\t\t\tcase 'label-ranges': break; // 9.4.10 <table:label-ranges>\n\t\t\tcase 'named-expression': break; // 9.4.13 <table:named-expression>\n\t\t\tcase 'sort': break; // 9.4.19 <table:sort>\n\t\t\tcase 'sort-by': break; // 9.4.20 <table:sort-by>\n\t\t\tcase 'sort-groups': break; // 9.4.22 <table:sort-groups>\n\n\t\t\tcase 'tab': break; // 6.1.4 <text:tab>\n\t\t\tcase 'line-break': break; // 6.1.5 <text:line-break>\n\t\t\tcase 'span': break; // 6.1.7 <text:span>\n\t\t\tcase 'p': case '文本串': // 5.1.3 <text:p>\n\t\t\t\tif(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;\n\t\t\t\tif(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {\n\t\t\t\t\tvar ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);\n\t\t\t\t\ttextp = (textp.length > 0 ? textp + \"\\n\" : \"\") + ptp[0];\n\t\t\t\t} else { textptag = parsexmltag(Rn[0], false); textpidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak; // <text:p>\n\t\t\tcase 's': break; // <text:s>\n\n\t\t\tcase 'database-range': // 9.4.15 <table:database-range>\n\t\t\t\tif(Rn[1]==='/') break;\n\t\t\t\ttry {\n\t\t\t\t\t_Ref = ods_to_csf_3D(parsexmltag(Rn[0])['target-range-address']);\n\t\t\t\t\tSheets[_Ref[0]]['!autofilter'] = { ref:_Ref[1] };\n\t\t\t\t} catch(e) {/* empty */}\n\t\t\t\tbreak;\n\n\t\t\tcase 'date': break; // <*:date>\n\n\t\t\tcase 'object': break; // 10.4.6.2 <draw:object>\n\t\t\tcase 'title': case '标题': break; // <*:title> OR <uof:标题>\n\t\t\tcase 'desc': break; // <*:desc>\n\t\t\tcase 'binary-data': break; // 10.4.5 TODO: b64 blob\n\n\t\t\t/* 9.2 Advanced Tables */\n\t\t\tcase 'table-source': break; // 9.2.6\n\t\t\tcase 'scenario': break; // 9.2.6\n\n\t\t\tcase 'iteration': break; // 9.4.3 <table:iteration>\n\t\t\tcase 'content-validations': break; // 9.4.4 <table:\n\t\t\tcase 'content-validation': break; // 9.4.5 <table:\n\t\t\tcase 'help-message': break; // 9.4.6 <table:\n\t\t\tcase 'error-message': break; // 9.4.7 <table:\n\t\t\tcase 'database-ranges': break; // 9.4.14 <table:database-ranges>\n\t\t\tcase 'filter': break; // 9.5.2 <table:filter>\n\t\t\tcase 'filter-and': break; // 9.5.3 <table:filter-and>\n\t\t\tcase 'filter-or': break; // 9.5.4 <table:filter-or>\n\t\t\tcase 'filter-condition': break; // 9.5.5 <table:filter-condition>\n\n\t\t\tcase 'list-level-style-bullet': break; // 16.31 <text:\n\t\t\tcase 'list-level-style-number': break; // 16.32 <text:\n\t\t\tcase 'list-level-properties': break; // 17.19 <style:\n\n\t\t\t/* 7.3 Document Fields */\n\t\t\tcase 'sender-firstname': // 7.3.6.2\n\t\t\tcase 'sender-lastname': // 7.3.6.3\n\t\t\tcase 'sender-initials': // 7.3.6.4\n\t\t\tcase 'sender-title': // 7.3.6.5\n\t\t\tcase 'sender-position': // 7.3.6.6\n\t\t\tcase 'sender-email': // 7.3.6.7\n\t\t\tcase 'sender-phone-private': // 7.3.6.8\n\t\t\tcase 'sender-fax': // 7.3.6.9\n\t\t\tcase 'sender-company': // 7.3.6.10\n\t\t\tcase 'sender-phone-work': // 7.3.6.11\n\t\t\tcase 'sender-street': // 7.3.6.12\n\t\t\tcase 'sender-city': // 7.3.6.13\n\t\t\tcase 'sender-postal-code': // 7.3.6.14\n\t\t\tcase 'sender-country': // 7.3.6.15\n\t\t\tcase 'sender-state-or-province': // 7.3.6.16\n\t\t\tcase 'author-name': // 7.3.7.1\n\t\t\tcase 'author-initials': // 7.3.7.2\n\t\t\tcase 'chapter': // 7.3.8\n\t\t\tcase 'file-name': // 7.3.9\n\t\t\tcase 'template-name': // 7.3.9\n\t\t\tcase 'sheet-name': // 7.3.9\n\t\t\t\tbreak;\n\n\t\t\tcase 'event-listener':\n\t\t\t\tbreak;\n\t\t\t/* TODO: FODS Properties */\n\t\t\tcase 'initial-creator':\n\t\t\tcase 'creation-date':\n\t\t\tcase 'print-date':\n\t\t\tcase 'generator':\n\t\t\tcase 'document-statistic':\n\t\t\tcase 'user-defined':\n\t\t\tcase 'editing-duration':\n\t\t\tcase 'editing-cycles':\n\t\t\t\tbreak;\n\n\t\t\t/* TODO: FODS Config */\n\t\t\tcase 'config-item':\n\t\t\t\tbreak;\n\n\t\t\t/* TODO: style tokens */\n\t\t\tcase 'page-number': break; // TODO <text:page-number>\n\t\t\tcase 'page-count': break; // TODO <text:page-count>\n\t\t\tcase 'time': break; // TODO <text:time>\n\n\t\t\t/* 9.3 Advanced Table Cells */\n\t\t\tcase 'cell-range-source': break; // 9.3.1 <table:\n\t\t\tcase 'detective': break; // 9.3.2 <table:\n\t\t\tcase 'operation': break; // 9.3.3 <table:\n\t\t\tcase 'highlighted-range': break; // 9.3.4 <table:\n\n\t\t\t/* 9.6 Data Pilot Tables <table: */\n\t\t\tcase 'data-pilot-table': // 9.6.3\n\t\t\tcase 'source-cell-range': // 9.6.5\n\t\t\tcase 'source-service': // 9.6.6\n\t\t\tcase 'data-pilot-field': // 9.6.7\n\t\t\tcase 'data-pilot-level': // 9.6.8\n\t\t\tcase 'data-pilot-subtotals': // 9.6.9\n\t\t\tcase 'data-pilot-subtotal': // 9.6.10\n\t\t\tcase 'data-pilot-members': // 9.6.11\n\t\t\tcase 'data-pilot-member': // 9.6.12\n\t\t\tcase 'data-pilot-display-info': // 9.6.13\n\t\t\tcase 'data-pilot-sort-info': // 9.6.14\n\t\t\tcase 'data-pilot-layout-info': // 9.6.15\n\t\t\tcase 'data-pilot-field-reference': // 9.6.16\n\t\t\tcase 'data-pilot-groups': // 9.6.17\n\t\t\tcase 'data-pilot-group': // 9.6.18\n\t\t\tcase 'data-pilot-group-member': // 9.6.19\n\t\t\t\tbreak;\n\n\t\t\t/* 10.3 Drawing Shapes */\n\t\t\tcase 'rect': // 10.3.2\n\t\t\t\tbreak;\n\n\t\t\t/* 14.6 DDE Connections */\n\t\t\tcase 'dde-connection-decls': // 14.6.2 <text:\n\t\t\tcase 'dde-connection-decl': // 14.6.3 <text:\n\t\t\tcase 'dde-link': // 14.6.4 <table:\n\t\t\tcase 'dde-source': // 14.6.5 <office:\n\t\t\t\tbreak;\n\n\t\t\tcase 'properties': break; // 13.7 <form:properties>\n\t\t\tcase 'property': break; // 13.8 <form:property>\n\n\t\t\tcase 'a': // 6.1.8 hyperlink\n\t\t\t\tif(Rn[1]!== '/') {\n\t\t\t\t\tatag = parsexmltag(Rn[0], false);\n\t\t\t\t\tif(!atag.href) break;\n\t\t\t\t\tatag.Target = unescapexml(atag.href); delete atag.href;\n\t\t\t\t\tif(atag.Target.charAt(0) == \"#\" && atag.Target.indexOf(\".\") > -1) {\n\t\t\t\t\t\t_Ref = ods_to_csf_3D(atag.Target.slice(1));\n\t\t\t\t\t\tatag.Target = \"#\" + _Ref[0] + \"!\" + _Ref[1];\n\t\t\t\t\t} else if(atag.Target.match(/^\\.\\.[\\\\\\/]/)) atag.Target = atag.Target.slice(3);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* non-standard */\n\t\t\tcase 'table-protection': break;\n\t\t\tcase 'data-pilot-grand-total': break; // <table:\n\t\t\tcase 'office-document-common-attrs': break; // bare\n\t\t\tdefault: switch(Rn[2]) {\n\t\t\t\tcase 'dc:':       // TODO: properties\n\t\t\t\tcase 'calcext:':  // ignore undocumented extensions\n\t\t\t\tcase 'loext:':    // ignore undocumented extensions\n\t\t\t\tcase 'ooo:':      // ignore undocumented extensions\n\t\t\t\tcase 'chartooo:': // ignore undocumented extensions\n\t\t\t\tcase 'draw:':     // TODO: drawing\n\t\t\t\tcase 'style:':    // TODO: styles\n\t\t\t\tcase 'chart:':    // TODO: charts\n\t\t\t\tcase 'form:':     // TODO: forms\n\t\t\t\tcase 'uof:':      // TODO: uof\n\t\t\t\tcase '表:':       // TODO: uof\n\t\t\t\tcase '字:':       // TODO: uof\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if(opts.WTF) throw new Error(Rn);\n\t\t\t}\n\t\t}\n\t\tvar out/*:Workbook*/ = ({\n\t\t\tSheets: Sheets,\n\t\t\tSheetNames: SheetNames,\n\t\t\tWorkbook: WB\n\t\t}/*:any*/);\n\t\tif(opts.bookSheets) delete /*::(*/out/*:: :any)*/.Sheets;\n\t\treturn out;\n}\n\nfunction parse_ods(zip/*:ZIPFile*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\topts = opts || ({}/*:any*/);\n\tif(safegetzipfile(zip, 'META-INF/manifest.xml')) parse_manifest(getzipdata(zip, 'META-INF/manifest.xml'), opts);\n\tvar content = getzipstr(zip, 'content.xml');\n\tif(!content) throw new Error(\"Missing content.xml in ODS / UOF file\");\n\tvar wb = parse_content_xml(utf8read(content), opts);\n\tif(safegetzipfile(zip, 'meta.xml')) wb.Props = parse_core_props(getzipdata(zip, 'meta.xml'));\n\treturn wb;\n}\nfunction parse_fods(data/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\treturn parse_content_xml(data, opts);\n}\n\n/* OpenDocument */\nvar write_styles_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {\n\tvar master_styles = [\n\t\t'<office:master-styles>',\n\t\t\t'<style:master-page style:name=\"mp1\" style:page-layout-name=\"mp1\">',\n\t\t\t\t'<style:header/>',\n\t\t\t\t'<style:header-left style:display=\"false\"/>',\n\t\t\t\t'<style:footer/>',\n\t\t\t\t'<style:footer-left style:display=\"false\"/>',\n\t\t\t'</style:master-page>',\n\t\t'</office:master-styles>'\n\t].join(\"\");\n\n\tvar payload = '<office:document-styles ' + wxt_helper({\n\t\t'xmlns:office':   \"urn:oasis:names:tc:opendocument:xmlns:office:1.0\",\n\t\t'xmlns:table':    \"urn:oasis:names:tc:opendocument:xmlns:table:1.0\",\n\t\t'xmlns:style':    \"urn:oasis:names:tc:opendocument:xmlns:style:1.0\",\n\t\t'xmlns:text':     \"urn:oasis:names:tc:opendocument:xmlns:text:1.0\",\n\t\t'xmlns:draw':     \"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\",\n\t\t'xmlns:fo':       \"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\",\n\t\t'xmlns:xlink':    \"http://www.w3.org/1999/xlink\",\n\t\t'xmlns:dc':       \"http://purl.org/dc/elements/1.1/\",\n\t\t'xmlns:number':   \"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\",\n\t\t'xmlns:svg':      \"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\",\n\t\t'xmlns:of':       \"urn:oasis:names:tc:opendocument:xmlns:of:1.2\",\n\t\t'office:version': \"1.2\"\n\t}) + '>' + master_styles + '</office:document-styles>';\n\n\treturn function wso(/*::wb, opts*/) {\n\t\treturn XML_HEADER + payload;\n\t};\n})();\nvar write_content_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {\n\t/* 6.1.2 White Space Characters */\n\tvar write_text_p = function(text/*:string*/)/*:string*/ {\n\t\treturn escapexml(text)\n\t\t\t.replace(/  +/g, function($$){return '<text:s text:c=\"'+$$.length+'\"/>';})\n\t\t\t.replace(/\\t/g, \"<text:tab/>\")\n\t\t\t.replace(/\\n/g, \"</text:p><text:p>\")\n\t\t\t.replace(/^ /, \"<text:s/>\").replace(/ $/, \"<text:s/>\");\n\t};\n\n\tvar null_cell_xml = '          <table:table-cell />\\n';\n\tvar covered_cell_xml = '          <table:covered-table-cell/>\\n';\n\tvar write_ws = function(ws, wb/*:Workbook*/, i/*:number*//*::, opts*/)/*:string*/ {\n\t\t/* Section 9 Tables */\n\t\tvar o/*:Array<string>*/ = [];\n\t\to.push('      <table:table table:name=\"' + escapexml(wb.SheetNames[i]) + '\" table:style-name=\"ta1\">\\n');\n\t\tvar R=0,C=0, range = decode_range(ws['!ref']||\"A1\");\n\t\tvar marr/*:Array<Range>*/ = ws['!merges'] || [], mi = 0;\n\t\tvar dense = Array.isArray(ws);\n\t\tif(ws[\"!cols\"]) {\n\t\t\tfor(C = 0; C <= range.e.c; ++C) o.push('        <table:table-column' + (ws[\"!cols\"][C] ? ' table:style-name=\"co' + ws[\"!cols\"][C].ods + '\"' : '') + '></table:table-column>\\n');\n\t\t}\n\t\tvar H = \"\", ROWS = ws[\"!rows\"]||[];\n\t\tfor(R = 0; R < range.s.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push('        <table:table-row' + H + '></table:table-row>\\n');\n\t\t}\n\t\tfor(; R <= range.e.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push('        <table:table-row' + H + '>\\n');\n\t\t\tfor(C=0; C < range.s.c; ++C) o.push(null_cell_xml);\n\t\t\tfor(; C <= range.e.c; ++C) {\n\t\t\t\tvar skip = false, ct = {}, textp = \"\";\n\t\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\t\tct['table:number-columns-spanned'] = (marr[mi].e.c - marr[mi].s.c + 1);\n\t\t\t\t\tct['table:number-rows-spanned'] =    (marr[mi].e.r - marr[mi].s.r + 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(skip) { o.push(covered_cell_xml); continue; }\n\t\t\t\tvar ref = encode_cell({r:R, c:C}), cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\t\tif(cell && cell.f) {\n\t\t\t\t\tct['table:formula'] = escapexml(csf_to_ods_formula(cell.f));\n\t\t\t\t\tif(cell.F) {\n\t\t\t\t\t\tif(cell.F.slice(0, ref.length) == ref) {\n\t\t\t\t\t\t\tvar _Fref = decode_range(cell.F);\n\t\t\t\t\t\t\tct['table:number-matrix-columns-spanned'] = (_Fref.e.c - _Fref.s.c + 1);\n\t\t\t\t\t\t\tct['table:number-matrix-rows-spanned'] =    (_Fref.e.r - _Fref.s.r + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!cell) { o.push(null_cell_xml); continue; }\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\ttextp = (cell.v ? 'TRUE' : 'FALSE');\n\t\t\t\t\t\tct['office:value-type'] = \"boolean\";\n\t\t\t\t\t\tct['office:boolean-value'] = (cell.v ? 'true' : 'false');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\ttextp = (cell.w||String(cell.v||0));\n\t\t\t\t\t\tct['office:value-type'] = \"float\";\n\t\t\t\t\t\tct['office:value'] = (cell.v||0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 's': case 'str':\n\t\t\t\t\t\ttextp = cell.v == null ? \"\" : cell.v;\n\t\t\t\t\t\tct['office:value-type'] = \"string\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\ttextp = (cell.w||(parseDate(cell.v).toISOString()));\n\t\t\t\t\t\tct['office:value-type'] = \"date\";\n\t\t\t\t\t\tct['office:date-value'] = (parseDate(cell.v).toISOString());\n\t\t\t\t\t\tct['table:style-name'] = \"ce1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//case 'e':\n\t\t\t\t\tdefault: o.push(null_cell_xml); continue;\n\t\t\t\t}\n\t\t\t\tvar text_p = write_text_p(textp);\n\t\t\t\tif(cell.l && cell.l.Target) {\n\t\t\t\t\tvar _tgt = cell.l.Target;\n\t\t\t\t\t_tgt = _tgt.charAt(0) == \"#\" ? \"#\" + csf_to_ods_3D(_tgt.slice(1)) : _tgt;\n\t\t\t\t\t// TODO: choose correct parent path format based on link delimiters\n\t\t\t\t\tif(_tgt.charAt(0) != \"#\" && !_tgt.match(/^\\w+:/)) _tgt = '../' + _tgt;\n\t\t\t\t\ttext_p = writextag('text:a', text_p, {'xlink:href': _tgt.replace(/&/g, \"&amp;\")});\n\t\t\t\t}\n\t\t\t\to.push('          ' + writextag('table:table-cell', writextag('text:p', text_p, {}), ct) + '\\n');\n\t\t\t}\n\t\t\to.push('        </table:table-row>\\n');\n\t\t}\n\t\to.push('      </table:table>\\n');\n\t\treturn o.join(\"\");\n\t};\n\n\tvar write_automatic_styles_ods = function(o/*:Array<string>*/, wb) {\n\t\to.push(' <office:automatic-styles>\\n');\n\n\t\to.push('  <number:date-style style:name=\"N37\" number:automatic-order=\"true\">\\n');\n\t\to.push('   <number:month number:style=\"long\"/>\\n');\n\t\to.push('   <number:text>/</number:text>\\n');\n\t\to.push('   <number:day number:style=\"long\"/>\\n');\n\t\to.push('   <number:text>/</number:text>\\n');\n\t\to.push('   <number:year/>\\n');\n\t\to.push('  </number:date-style>\\n');\n\n\t\t/* column styles */\n\t\tvar cidx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!cols\"]) {\n\t\t\t\tfor(var C = 0; C < ws[\"!cols\"].length; ++C) if(ws[\"!cols\"][C]) {\n\t\t\t\t\tvar colobj = ws[\"!cols\"][C];\n\t\t\t\t\tif(colobj.width == null && colobj.wpx == null && colobj.wch == null) continue;\n\t\t\t\t\tprocess_col(colobj);\n\t\t\t\t\tcolobj.ods = cidx;\n\t\t\t\t\tvar w = ws[\"!cols\"][C].wpx + \"px\";\n\t\t\t\t\to.push('  <style:style style:name=\"co' + cidx + '\" style:family=\"table-column\">\\n');\n\t\t\t\t\to.push('   <style:table-column-properties fo:break-before=\"auto\" style:column-width=\"' + w + '\"/>\\n');\n\t\t\t\t\to.push('  </style:style>\\n');\n\t\t\t\t\t++cidx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* row styles */\n\t\tvar ridx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!rows\"]) {\n\t\t\t\tfor(var R = 0; R < ws[\"!rows\"].length; ++R) if(ws[\"!rows\"][R]) {\n\t\t\t\t\tws[\"!rows\"][R].ods = ridx;\n\t\t\t\t\tvar h = ws[\"!rows\"][R].hpx + \"px\";\n\t\t\t\t\to.push('  <style:style style:name=\"ro' + ridx + '\" style:family=\"table-row\">\\n');\n\t\t\t\t\to.push('   <style:table-row-properties fo:break-before=\"auto\" style:row-height=\"' + h + '\"/>\\n');\n\t\t\t\t\to.push('  </style:style>\\n');\n\t\t\t\t\t++ridx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* table */\n\t\to.push('  <style:style style:name=\"ta1\" style:family=\"table\" style:master-page-name=\"mp1\">\\n');\n\t\to.push('   <style:table-properties table:display=\"true\" style:writing-mode=\"lr-tb\"/>\\n');\n\t\to.push('  </style:style>\\n');\n\n\t\t/* table cells, text */\n\t\to.push('  <style:style style:name=\"ce1\" style:family=\"table-cell\" style:parent-style-name=\"Default\" style:data-style-name=\"N37\"/>\\n');\n\n\t\t/* page-layout */\n\n\t\to.push(' </office:automatic-styles>\\n');\n\t};\n\n\treturn function wcx(wb, opts) {\n\t\tvar o = [XML_HEADER];\n\t\t/* 3.1.3.2 */\n\t\tvar attr = wxt_helper({\n\t\t\t'xmlns:office':       \"urn:oasis:names:tc:opendocument:xmlns:office:1.0\",\n\t\t\t'xmlns:table':        \"urn:oasis:names:tc:opendocument:xmlns:table:1.0\",\n\t\t\t'xmlns:style':        \"urn:oasis:names:tc:opendocument:xmlns:style:1.0\",\n\t\t\t'xmlns:text':         \"urn:oasis:names:tc:opendocument:xmlns:text:1.0\",\n\t\t\t'xmlns:draw':         \"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\",\n\t\t\t'xmlns:fo':           \"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\",\n\t\t\t'xmlns:xlink':        \"http://www.w3.org/1999/xlink\",\n\t\t\t'xmlns:dc':           \"http://purl.org/dc/elements/1.1/\",\n\t\t\t'xmlns:meta':         \"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\",\n\t\t\t'xmlns:number':       \"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\",\n\t\t\t'xmlns:presentation': \"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\",\n\t\t\t'xmlns:svg':          \"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\",\n\t\t\t'xmlns:chart':        \"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\",\n\t\t\t'xmlns:dr3d':         \"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\",\n\t\t\t'xmlns:math':         \"http://www.w3.org/1998/Math/MathML\",\n\t\t\t'xmlns:form':         \"urn:oasis:names:tc:opendocument:xmlns:form:1.0\",\n\t\t\t'xmlns:script':       \"urn:oasis:names:tc:opendocument:xmlns:script:1.0\",\n\t\t\t'xmlns:ooo':          \"http://openoffice.org/2004/office\",\n\t\t\t'xmlns:ooow':         \"http://openoffice.org/2004/writer\",\n\t\t\t'xmlns:oooc':         \"http://openoffice.org/2004/calc\",\n\t\t\t'xmlns:dom':          \"http://www.w3.org/2001/xml-events\",\n\t\t\t'xmlns:xforms':       \"http://www.w3.org/2002/xforms\",\n\t\t\t'xmlns:xsd':          \"http://www.w3.org/2001/XMLSchema\",\n\t\t\t'xmlns:xsi':          \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t'xmlns:sheet':        \"urn:oasis:names:tc:opendocument:sh33tjs:1.0\",\n\t\t\t'xmlns:rpt':          \"http://openoffice.org/2005/report\",\n\t\t\t'xmlns:of':           \"urn:oasis:names:tc:opendocument:xmlns:of:1.2\",\n\t\t\t'xmlns:xhtml':        \"http://www.w3.org/1999/xhtml\",\n\t\t\t'xmlns:grddl':        \"http://www.w3.org/2003/g/data-view#\",\n\t\t\t'xmlns:tableooo':     \"http://openoffice.org/2009/table\",\n\t\t\t'xmlns:drawooo':      \"http://openoffice.org/2010/draw\",\n\t\t\t'xmlns:calcext':      \"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0\",\n\t\t\t'xmlns:loext':        \"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0\",\n\t\t\t'xmlns:field':        \"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\",\n\t\t\t'xmlns:formx':        \"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\",\n\t\t\t'xmlns:css3t':        \"http://www.w3.org/TR/css3-text/\",\n\t\t\t'office:version':     \"1.2\"\n\t\t});\n\n\t\tvar fods = wxt_helper({\n\t\t\t'xmlns:config':    \"urn:oasis:names:tc:opendocument:xmlns:config:1.0\",\n\t\t\t'office:mimetype': \"application/vnd.oasis.opendocument.spreadsheet\"\n\t\t});\n\n\t\tif(opts.bookType == \"fods\") {\n\t\t\to.push('<office:document' + attr + fods + '>\\n');\n\t\t\to.push(write_meta_ods().replace(/office:document-meta/g, \"office:meta\"));\n\t\t\t// TODO: settings (equiv of settings.xml for ODS)\n\t\t} else o.push('<office:document-content' + attr  + '>\\n');\n\t\t// o.push('  <office:scripts/>\\n');\n\t\twrite_automatic_styles_ods(o, wb);\n\t\to.push('  <office:body>\\n');\n\t\to.push('    <office:spreadsheet>\\n');\n\t\tfor(var i = 0; i != wb.SheetNames.length; ++i) o.push(write_ws(wb.Sheets[wb.SheetNames[i]], wb, i, opts));\n\t\to.push('    </office:spreadsheet>\\n');\n\t\to.push('  </office:body>\\n');\n\t\tif(opts.bookType == \"fods\") o.push('</office:document>');\n\t\telse o.push('</office:document-content>');\n\t\treturn o.join(\"\");\n\t};\n})();\n\nfunction write_ods(wb/*:any*/, opts/*:any*/) {\n\tif(opts.bookType == \"fods\") return write_content_ods(wb, opts);\n\n\tvar zip = zip_new();\n\tvar f = \"\";\n\n\tvar manifest/*:Array<Array<string> >*/ = [];\n\tvar rdf/*:Array<[string, string]>*/ = [];\n\n\t/* Part 3 Section 3.3 MIME Media Type */\n\tf = \"mimetype\";\n\tzip_add_file(zip, f, \"application/vnd.oasis.opendocument.spreadsheet\");\n\n\t/* Part 1 Section 2.2 Documents */\n\tf = \"content.xml\";\n\tzip_add_file(zip, f, write_content_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"ContentFile\"]);\n\n\t/* TODO: these are hard-coded styles to satiate excel */\n\tf = \"styles.xml\";\n\tzip_add_file(zip, f, write_styles_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"StylesFile\"]);\n\n\t/* TODO: this is hard-coded to satiate excel */\n\tf = \"meta.xml\";\n\tzip_add_file(zip, f, XML_HEADER + write_meta_ods(/*::wb, opts*/));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"MetadataFile\"]);\n\n\t/* Part 3 Section 6 Metadata Manifest File */\n\tf = \"manifest.rdf\";\n\tzip_add_file(zip, f, write_rdf(rdf/*, opts*/));\n\tmanifest.push([f, \"application/rdf+xml\"]);\n\n\t/* Part 3 Section 4 Manifest File */\n\tf = \"META-INF/manifest.xml\";\n\tzip_add_file(zip, f, write_manifest(manifest/*, opts*/));\n\n\treturn zip;\n}\n\n/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */\nfunction u8_to_dataview(array) {\n  return new DataView(array.buffer, array.byteOffset, array.byteLength);\n}\nfunction u8str(u8) {\n  return typeof TextDecoder != \"undefined\" ? new TextDecoder().decode(u8) : utf8read(a2s(u8));\n}\nfunction stru8(str) {\n  return typeof TextEncoder != \"undefined\" ? new TextEncoder().encode(str) : s2a(utf8write(str));\n}\nfunction u8contains(body, search) {\n  outer:\n    for (var L = 0; L <= body.length - search.length; ++L) {\n      for (var j = 0; j < search.length; ++j)\n        if (body[L + j] != search[j])\n          continue outer;\n      return true;\n    }\n  return false;\n}\nfunction u8concat(u8a) {\n  var len = u8a.reduce(function(acc, x) {\n    return acc + x.length;\n  }, 0);\n  var out = new Uint8Array(len);\n  var off = 0;\n  u8a.forEach(function(u8) {\n    out.set(u8, off);\n    off += u8.length;\n  });\n  return out;\n}\nfunction popcnt(x) {\n  x -= x >> 1 & 1431655765;\n  x = (x & 858993459) + (x >> 2 & 858993459);\n  return (x + (x >> 4) & 252645135) * 16843009 >>> 24;\n}\nfunction readDecimal128LE(buf, offset) {\n  var exp = (buf[offset + 15] & 127) << 7 | buf[offset + 14] >> 1;\n  var mantissa = buf[offset + 14] & 1;\n  for (var j = offset + 13; j >= offset; --j)\n    mantissa = mantissa * 256 + buf[j];\n  return (buf[offset + 15] & 128 ? -mantissa : mantissa) * Math.pow(10, exp - 6176);\n}\nfunction writeDecimal128LE(buf, offset, value) {\n  var exp = Math.floor(value == 0 ? 0 : Math.LOG10E * Math.log(Math.abs(value))) + 6176 - 20;\n  var mantissa = value / Math.pow(10, exp - 6176);\n  buf[offset + 15] |= exp >> 7;\n  buf[offset + 14] |= (exp & 127) << 1;\n  for (var i = 0; mantissa >= 1; ++i, mantissa /= 256)\n    buf[offset + i] = mantissa & 255;\n  buf[offset + 15] |= value >= 0 ? 0 : 128;\n}\nfunction parse_varint49(buf, ptr) {\n  var l = ptr ? ptr[0] : 0;\n  var usz = buf[l] & 127;\n  varint:\n    if (buf[l++] >= 128) {\n      usz |= (buf[l] & 127) << 7;\n      if (buf[l++] < 128)\n        break varint;\n      usz |= (buf[l] & 127) << 14;\n      if (buf[l++] < 128)\n        break varint;\n      usz |= (buf[l] & 127) << 21;\n      if (buf[l++] < 128)\n        break varint;\n      usz += (buf[l] & 127) * Math.pow(2, 28);\n      ++l;\n      if (buf[l++] < 128)\n        break varint;\n      usz += (buf[l] & 127) * Math.pow(2, 35);\n      ++l;\n      if (buf[l++] < 128)\n        break varint;\n      usz += (buf[l] & 127) * Math.pow(2, 42);\n      ++l;\n      if (buf[l++] < 128)\n        break varint;\n    }\n  if (ptr)\n    ptr[0] = l;\n  return usz;\n}\nfunction write_varint49(v) {\n  var usz = new Uint8Array(7);\n  usz[0] = v & 127;\n  var L = 1;\n  sz:\n    if (v > 127) {\n      usz[L - 1] |= 128;\n      usz[L] = v >> 7 & 127;\n      ++L;\n      if (v <= 16383)\n        break sz;\n      usz[L - 1] |= 128;\n      usz[L] = v >> 14 & 127;\n      ++L;\n      if (v <= 2097151)\n        break sz;\n      usz[L - 1] |= 128;\n      usz[L] = v >> 21 & 127;\n      ++L;\n      if (v <= 268435455)\n        break sz;\n      usz[L - 1] |= 128;\n      usz[L] = v / 256 >>> 21 & 127;\n      ++L;\n      if (v <= 34359738367)\n        break sz;\n      usz[L - 1] |= 128;\n      usz[L] = v / 65536 >>> 21 & 127;\n      ++L;\n      if (v <= 4398046511103)\n        break sz;\n      usz[L - 1] |= 128;\n      usz[L] = v / 16777216 >>> 21 & 127;\n      ++L;\n    }\n  return usz.slice(0, L);\n}\nfunction varint_to_i32(buf) {\n  var l = 0, i32 = buf[l] & 127;\n  varint:\n    if (buf[l++] >= 128) {\n      i32 |= (buf[l] & 127) << 7;\n      if (buf[l++] < 128)\n        break varint;\n      i32 |= (buf[l] & 127) << 14;\n      if (buf[l++] < 128)\n        break varint;\n      i32 |= (buf[l] & 127) << 21;\n      if (buf[l++] < 128)\n        break varint;\n      i32 |= (buf[l] & 127) << 28;\n    }\n  return i32;\n}\nfunction parse_shallow(buf) {\n  var out = [], ptr = [0];\n  while (ptr[0] < buf.length) {\n    var off = ptr[0];\n    var num = parse_varint49(buf, ptr);\n    var type = num & 7;\n    num = Math.floor(num / 8);\n    var len = 0;\n    var res;\n    if (num == 0)\n      break;\n    switch (type) {\n      case 0:\n        {\n          var l = ptr[0];\n          while (buf[ptr[0]++] >= 128)\n            ;\n          res = buf.slice(l, ptr[0]);\n        }\n        break;\n      case 5:\n        len = 4;\n        res = buf.slice(ptr[0], ptr[0] + len);\n        ptr[0] += len;\n        break;\n      case 1:\n        len = 8;\n        res = buf.slice(ptr[0], ptr[0] + len);\n        ptr[0] += len;\n        break;\n      case 2:\n        len = parse_varint49(buf, ptr);\n        res = buf.slice(ptr[0], ptr[0] + len);\n        ptr[0] += len;\n        break;\n      case 3:\n      case 4:\n      default:\n        throw new Error(\"PB Type \".concat(type, \" for Field \").concat(num, \" at offset \").concat(off));\n    }\n    var v = { data: res, type: type };\n    if (out[num] == null)\n      out[num] = [v];\n    else\n      out[num].push(v);\n  }\n  return out;\n}\nfunction write_shallow(proto) {\n  var out = [];\n  proto.forEach(function(field, idx) {\n    field.forEach(function(item) {\n      if (!item.data)\n        return;\n      out.push(write_varint49(idx * 8 + item.type));\n      if (item.type == 2)\n        out.push(write_varint49(item.data.length));\n      out.push(item.data);\n    });\n  });\n  return u8concat(out);\n}\nfunction mappa(data, cb) {\n  return (data == null ? void 0 : data.map(function(d) {\n    return cb(d.data);\n  })) || [];\n}\nfunction parse_iwa_file(buf) {\n  var _a;\n  var out = [], ptr = [0];\n  while (ptr[0] < buf.length) {\n    var len = parse_varint49(buf, ptr);\n    var ai = parse_shallow(buf.slice(ptr[0], ptr[0] + len));\n    ptr[0] += len;\n    var res = {\n      id: varint_to_i32(ai[1][0].data),\n      messages: []\n    };\n    ai[2].forEach(function(b) {\n      var mi = parse_shallow(b.data);\n      var fl = varint_to_i32(mi[3][0].data);\n      res.messages.push({\n        meta: mi,\n        data: buf.slice(ptr[0], ptr[0] + fl)\n      });\n      ptr[0] += fl;\n    });\n    if ((_a = ai[3]) == null ? void 0 : _a[0])\n      res.merge = varint_to_i32(ai[3][0].data) >>> 0 > 0;\n    out.push(res);\n  }\n  return out;\n}\nfunction write_iwa_file(ias) {\n  var bufs = [];\n  ias.forEach(function(ia) {\n    var ai = [];\n    ai[1] = [{ data: write_varint49(ia.id), type: 0 }];\n    ai[2] = [];\n    if (ia.merge != null)\n      ai[3] = [{ data: write_varint49(+!!ia.merge), type: 0 }];\n    var midata = [];\n    ia.messages.forEach(function(mi) {\n      midata.push(mi.data);\n      mi.meta[3] = [{ type: 0, data: write_varint49(mi.data.length) }];\n      ai[2].push({ data: write_shallow(mi.meta), type: 2 });\n    });\n    var aipayload = write_shallow(ai);\n    bufs.push(write_varint49(aipayload.length));\n    bufs.push(aipayload);\n    midata.forEach(function(mid) {\n      return bufs.push(mid);\n    });\n  });\n  return u8concat(bufs);\n}\nfunction parse_snappy_chunk(type, buf) {\n  if (type != 0)\n    throw new Error(\"Unexpected Snappy chunk type \".concat(type));\n  var ptr = [0];\n  var usz = parse_varint49(buf, ptr);\n  var chunks = [];\n  while (ptr[0] < buf.length) {\n    var tag = buf[ptr[0]] & 3;\n    if (tag == 0) {\n      var len = buf[ptr[0]++] >> 2;\n      if (len < 60)\n        ++len;\n      else {\n        var c = len - 59;\n        len = buf[ptr[0]];\n        if (c > 1)\n          len |= buf[ptr[0] + 1] << 8;\n        if (c > 2)\n          len |= buf[ptr[0] + 2] << 16;\n        if (c > 3)\n          len |= buf[ptr[0] + 3] << 24;\n        len >>>= 0;\n        len++;\n        ptr[0] += c;\n      }\n      chunks.push(buf.slice(ptr[0], ptr[0] + len));\n      ptr[0] += len;\n      continue;\n    } else {\n      var offset = 0, length = 0;\n      if (tag == 1) {\n        length = (buf[ptr[0]] >> 2 & 7) + 4;\n        offset = (buf[ptr[0]++] & 224) << 3;\n        offset |= buf[ptr[0]++];\n      } else {\n        length = (buf[ptr[0]++] >> 2) + 1;\n        if (tag == 2) {\n          offset = buf[ptr[0]] | buf[ptr[0] + 1] << 8;\n          ptr[0] += 2;\n        } else {\n          offset = (buf[ptr[0]] | buf[ptr[0] + 1] << 8 | buf[ptr[0] + 2] << 16 | buf[ptr[0] + 3] << 24) >>> 0;\n          ptr[0] += 4;\n        }\n      }\n      chunks = [u8concat(chunks)];\n      if (offset == 0)\n        throw new Error(\"Invalid offset 0\");\n      if (offset > chunks[0].length)\n        throw new Error(\"Invalid offset beyond length\");\n      if (length >= offset) {\n        chunks.push(chunks[0].slice(-offset));\n        length -= offset;\n        while (length >= chunks[chunks.length - 1].length) {\n          chunks.push(chunks[chunks.length - 1]);\n          length -= chunks[chunks.length - 1].length;\n        }\n      }\n      chunks.push(chunks[0].slice(-offset, -offset + length));\n    }\n  }\n  var o = u8concat(chunks);\n  if (o.length != usz)\n    throw new Error(\"Unexpected length: \".concat(o.length, \" != \").concat(usz));\n  return o;\n}\nfunction decompress_iwa_file(buf) {\n  var out = [];\n  var l = 0;\n  while (l < buf.length) {\n    var t = buf[l++];\n    var len = buf[l] | buf[l + 1] << 8 | buf[l + 2] << 16;\n    l += 3;\n    out.push(parse_snappy_chunk(t, buf.slice(l, l + len)));\n    l += len;\n  }\n  if (l !== buf.length)\n    throw new Error(\"data is not a valid framed stream!\");\n  return u8concat(out);\n}\nfunction compress_iwa_file(buf) {\n  var out = [];\n  var l = 0;\n  while (l < buf.length) {\n    var c = Math.min(buf.length - l, 268435455);\n    var frame = new Uint8Array(4);\n    out.push(frame);\n    var usz = write_varint49(c);\n    var L = usz.length;\n    out.push(usz);\n    if (c <= 60) {\n      L++;\n      out.push(new Uint8Array([c - 1 << 2]));\n    } else if (c <= 256) {\n      L += 2;\n      out.push(new Uint8Array([240, c - 1 & 255]));\n    } else if (c <= 65536) {\n      L += 3;\n      out.push(new Uint8Array([244, c - 1 & 255, c - 1 >> 8 & 255]));\n    } else if (c <= 16777216) {\n      L += 4;\n      out.push(new Uint8Array([248, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255]));\n    } else if (c <= 4294967296) {\n      L += 5;\n      out.push(new Uint8Array([252, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255, c - 1 >>> 24 & 255]));\n    }\n    out.push(buf.slice(l, l + c));\n    L += c;\n    frame[0] = 0;\n    frame[1] = L & 255;\n    frame[2] = L >> 8 & 255;\n    frame[3] = L >> 16 & 255;\n    l += c;\n  }\n  return u8concat(out);\n}\nfunction parse_old_storage(buf, sst, rsst, v) {\n  var dv = u8_to_dataview(buf);\n  var flags = dv.getUint32(4, true);\n  var data_offset = (v > 1 ? 12 : 8) + popcnt(flags & (v > 1 ? 3470 : 398)) * 4;\n  var ridx = -1, sidx = -1, ieee = NaN, dt = new Date(2001, 0, 1);\n  if (flags & 512) {\n    ridx = dv.getUint32(data_offset, true);\n    data_offset += 4;\n  }\n  data_offset += popcnt(flags & (v > 1 ? 12288 : 4096)) * 4;\n  if (flags & 16) {\n    sidx = dv.getUint32(data_offset, true);\n    data_offset += 4;\n  }\n  if (flags & 32) {\n    ieee = dv.getFloat64(data_offset, true);\n    data_offset += 8;\n  }\n  if (flags & 64) {\n    dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n    data_offset += 8;\n  }\n  var ret;\n  switch (buf[2]) {\n    case 0:\n      break;\n    case 2:\n      ret = { t: \"n\", v: ieee };\n      break;\n    case 3:\n      ret = { t: \"s\", v: sst[sidx] };\n      break;\n    case 5:\n      ret = { t: \"d\", v: dt };\n      break;\n    case 6:\n      ret = { t: \"b\", v: ieee > 0 };\n      break;\n    case 7:\n      ret = { t: \"n\", v: ieee / 86400 };\n      break;\n    case 8:\n      ret = { t: \"e\", v: 0 };\n      break;\n    case 9:\n      {\n        if (ridx > -1)\n          ret = { t: \"s\", v: rsst[ridx] };\n        else if (sidx > -1)\n          ret = { t: \"s\", v: sst[sidx] };\n        else if (!isNaN(ieee))\n          ret = { t: \"n\", v: ieee };\n        else\n          throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n      }\n      break;\n    default:\n      throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n  }\n  return ret;\n}\nfunction parse_new_storage(buf, sst, rsst) {\n  var dv = u8_to_dataview(buf);\n  var flags = dv.getUint32(8, true);\n  var data_offset = 12;\n  var ridx = -1, sidx = -1, d128 = NaN, ieee = NaN, dt = new Date(2001, 0, 1);\n  if (flags & 1) {\n    d128 = readDecimal128LE(buf, data_offset);\n    data_offset += 16;\n  }\n  if (flags & 2) {\n    ieee = dv.getFloat64(data_offset, true);\n    data_offset += 8;\n  }\n  if (flags & 4) {\n    dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n    data_offset += 8;\n  }\n  if (flags & 8) {\n    sidx = dv.getUint32(data_offset, true);\n    data_offset += 4;\n  }\n  if (flags & 16) {\n    ridx = dv.getUint32(data_offset, true);\n    data_offset += 4;\n  }\n  var ret;\n  switch (buf[1]) {\n    case 0:\n      break;\n    case 2:\n      ret = { t: \"n\", v: d128 };\n      break;\n    case 3:\n      ret = { t: \"s\", v: sst[sidx] };\n      break;\n    case 5:\n      ret = { t: \"d\", v: dt };\n      break;\n    case 6:\n      ret = { t: \"b\", v: ieee > 0 };\n      break;\n    case 7:\n      ret = { t: \"n\", v: ieee / 86400 };\n      break;\n    case 8:\n      ret = { t: \"e\", v: 0 };\n      break;\n    case 9:\n      {\n        if (ridx > -1)\n          ret = { t: \"s\", v: rsst[ridx] };\n        else\n          throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n      }\n      break;\n    case 10:\n      ret = { t: \"n\", v: d128 };\n      break;\n    default:\n      throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n  }\n  return ret;\n}\nfunction write_new_storage(cell, sst) {\n  var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n  out[0] = 5;\n  switch (cell.t) {\n    case \"n\":\n      out[1] = 2;\n      writeDecimal128LE(out, l, cell.v);\n      flags |= 1;\n      l += 16;\n      break;\n    case \"b\":\n      out[1] = 6;\n      dv.setFloat64(l, cell.v ? 1 : 0, true);\n      flags |= 2;\n      l += 8;\n      break;\n    case \"s\":\n      if (sst.indexOf(cell.v) == -1)\n        throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n      out[1] = 3;\n      dv.setUint32(l, sst.indexOf(cell.v), true);\n      flags |= 8;\n      l += 4;\n      break;\n    default:\n      throw \"unsupported cell type \" + cell.t;\n  }\n  dv.setUint32(8, flags, true);\n  return out.slice(0, l);\n}\nfunction write_old_storage(cell, sst) {\n  var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n  out[0] = 3;\n  switch (cell.t) {\n    case \"n\":\n      out[2] = 2;\n      dv.setFloat64(l, cell.v, true);\n      flags |= 32;\n      l += 8;\n      break;\n    case \"b\":\n      out[2] = 6;\n      dv.setFloat64(l, cell.v ? 1 : 0, true);\n      flags |= 32;\n      l += 8;\n      break;\n    case \"s\":\n      if (sst.indexOf(cell.v) == -1)\n        throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n      out[2] = 3;\n      dv.setUint32(l, sst.indexOf(cell.v), true);\n      flags |= 16;\n      l += 4;\n      break;\n    default:\n      throw \"unsupported cell type \" + cell.t;\n  }\n  dv.setUint32(4, flags, true);\n  return out.slice(0, l);\n}\nfunction parse_cell_storage(buf, sst, rsst) {\n  switch (buf[0]) {\n    case 0:\n    case 1:\n    case 2:\n    case 3:\n      return parse_old_storage(buf, sst, rsst, buf[0]);\n    case 5:\n      return parse_new_storage(buf, sst, rsst);\n    default:\n      throw new Error(\"Unsupported payload version \".concat(buf[0]));\n  }\n}\nfunction parse_TSP_Reference(buf) {\n  var pb = parse_shallow(buf);\n  return parse_varint49(pb[1][0].data);\n}\nfunction write_TSP_Reference(idx) {\n  var out = [];\n  out[1] = [{ type: 0, data: write_varint49(idx) }];\n  return write_shallow(out);\n}\nfunction parse_TST_TableDataList(M, root) {\n  var pb = parse_shallow(root.data);\n  var type = varint_to_i32(pb[1][0].data);\n  var entries = pb[3];\n  var data = [];\n  (entries || []).forEach(function(entry) {\n    var le = parse_shallow(entry.data);\n    var key = varint_to_i32(le[1][0].data) >>> 0;\n    switch (type) {\n      case 1:\n        data[key] = u8str(le[3][0].data);\n        break;\n      case 8:\n        {\n          var rt = M[parse_TSP_Reference(le[9][0].data)][0];\n          var rtp = parse_shallow(rt.data);\n          var rtpref = M[parse_TSP_Reference(rtp[1][0].data)][0];\n          var mtype = varint_to_i32(rtpref.meta[1][0].data);\n          if (mtype != 2001)\n            throw new Error(\"2000 unexpected reference to \".concat(mtype));\n          var tswpsa = parse_shallow(rtpref.data);\n          data[key] = tswpsa[3].map(function(x) {\n            return u8str(x.data);\n          }).join(\"\");\n        }\n        break;\n    }\n  });\n  return data;\n}\nfunction parse_TST_TileRowInfo(u8, type) {\n  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;\n  var pb = parse_shallow(u8);\n  var R = varint_to_i32(pb[1][0].data) >>> 0;\n  var cnt = varint_to_i32(pb[2][0].data) >>> 0;\n  var wide_offsets = ((_b = (_a = pb[8]) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) && varint_to_i32(pb[8][0].data) > 0 || false;\n  var used_storage_u8, used_storage;\n  if (((_d = (_c = pb[7]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && type != 0) {\n    used_storage_u8 = (_f = (_e = pb[7]) == null ? void 0 : _e[0]) == null ? void 0 : _f.data;\n    used_storage = (_h = (_g = pb[6]) == null ? void 0 : _g[0]) == null ? void 0 : _h.data;\n  } else if (((_j = (_i = pb[4]) == null ? void 0 : _i[0]) == null ? void 0 : _j.data) && type != 1) {\n    used_storage_u8 = (_l = (_k = pb[4]) == null ? void 0 : _k[0]) == null ? void 0 : _l.data;\n    used_storage = (_n = (_m = pb[3]) == null ? void 0 : _m[0]) == null ? void 0 : _n.data;\n  } else\n    throw \"NUMBERS Tile missing \".concat(type, \" cell storage\");\n  var width = wide_offsets ? 4 : 1;\n  var used_storage_offsets = u8_to_dataview(used_storage_u8);\n  var offsets = [];\n  for (var C = 0; C < used_storage_u8.length / 2; ++C) {\n    var off = used_storage_offsets.getUint16(C * 2, true);\n    if (off < 65535)\n      offsets.push([C, off]);\n  }\n  if (offsets.length != cnt)\n    throw \"Expected \".concat(cnt, \" cells, found \").concat(offsets.length);\n  var cells = [];\n  for (C = 0; C < offsets.length - 1; ++C)\n    cells[offsets[C][0]] = used_storage.subarray(offsets[C][1] * width, offsets[C + 1][1] * width);\n  if (offsets.length >= 1)\n    cells[offsets[offsets.length - 1][0]] = used_storage.subarray(offsets[offsets.length - 1][1] * width);\n  return { R: R, cells: cells };\n}\nfunction parse_TST_Tile(M, root) {\n  var _a;\n  var pb = parse_shallow(root.data);\n  var storage = ((_a = pb == null ? void 0 : pb[7]) == null ? void 0 : _a[0]) ? varint_to_i32(pb[7][0].data) >>> 0 > 0 ? 1 : 0 : -1;\n  var ri = mappa(pb[5], function(u8) {\n    return parse_TST_TileRowInfo(u8, storage);\n  });\n  return {\n    nrows: varint_to_i32(pb[4][0].data) >>> 0,\n    data: ri.reduce(function(acc, x) {\n      if (!acc[x.R])\n        acc[x.R] = [];\n      x.cells.forEach(function(cell, C) {\n        if (acc[x.R][C])\n          throw new Error(\"Duplicate cell r=\".concat(x.R, \" c=\").concat(C));\n        acc[x.R][C] = cell;\n      });\n      return acc;\n    }, [])\n  };\n}\nfunction parse_TST_TableModelArchive(M, root, ws) {\n  var _a;\n  var pb = parse_shallow(root.data);\n  var range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } };\n  range.e.r = (varint_to_i32(pb[6][0].data) >>> 0) - 1;\n  if (range.e.r < 0)\n    throw new Error(\"Invalid row varint \".concat(pb[6][0].data));\n  range.e.c = (varint_to_i32(pb[7][0].data) >>> 0) - 1;\n  if (range.e.c < 0)\n    throw new Error(\"Invalid col varint \".concat(pb[7][0].data));\n  ws[\"!ref\"] = encode_range(range);\n  var store = parse_shallow(pb[4][0].data);\n  var sst = parse_TST_TableDataList(M, M[parse_TSP_Reference(store[4][0].data)][0]);\n  var rsst = ((_a = store[17]) == null ? void 0 : _a[0]) ? parse_TST_TableDataList(M, M[parse_TSP_Reference(store[17][0].data)][0]) : [];\n  var tile = parse_shallow(store[3][0].data);\n  var _R = 0;\n  tile[1].forEach(function(t) {\n    var tl = parse_shallow(t.data);\n    var ref = M[parse_TSP_Reference(tl[2][0].data)][0];\n    var mtype = varint_to_i32(ref.meta[1][0].data);\n    if (mtype != 6002)\n      throw new Error(\"6001 unexpected reference to \".concat(mtype));\n    var _tile = parse_TST_Tile(M, ref);\n    _tile.data.forEach(function(row, R) {\n      row.forEach(function(buf, C) {\n        var addr = encode_cell({ r: _R + R, c: C });\n        var res = parse_cell_storage(buf, sst, rsst);\n        if (res)\n          ws[addr] = res;\n      });\n    });\n    _R += _tile.nrows;\n  });\n}\nfunction parse_TST_TableInfoArchive(M, root) {\n  var pb = parse_shallow(root.data);\n  var out = { \"!ref\": \"A1\" };\n  var tableref = M[parse_TSP_Reference(pb[2][0].data)];\n  var mtype = varint_to_i32(tableref[0].meta[1][0].data);\n  if (mtype != 6001)\n    throw new Error(\"6000 unexpected reference to \".concat(mtype));\n  parse_TST_TableModelArchive(M, tableref[0], out);\n  return out;\n}\nfunction parse_TN_SheetArchive(M, root) {\n  var _a;\n  var pb = parse_shallow(root.data);\n  var out = {\n    name: ((_a = pb[1]) == null ? void 0 : _a[0]) ? u8str(pb[1][0].data) : \"\",\n    sheets: []\n  };\n  var shapeoffs = mappa(pb[2], parse_TSP_Reference);\n  shapeoffs.forEach(function(off) {\n    M[off].forEach(function(m) {\n      var mtype = varint_to_i32(m.meta[1][0].data);\n      if (mtype == 6e3)\n        out.sheets.push(parse_TST_TableInfoArchive(M, m));\n    });\n  });\n  return out;\n}\nfunction parse_TN_DocumentArchive(M, root) {\n  var out = book_new();\n  var pb = parse_shallow(root.data);\n  var sheetoffs = mappa(pb[1], parse_TSP_Reference);\n  sheetoffs.forEach(function(off) {\n    M[off].forEach(function(m) {\n      var mtype = varint_to_i32(m.meta[1][0].data);\n      if (mtype == 2) {\n        var root2 = parse_TN_SheetArchive(M, m);\n        root2.sheets.forEach(function(sheet, idx) {\n          book_append_sheet(out, sheet, idx == 0 ? root2.name : root2.name + \"_\" + idx, true);\n        });\n      }\n    });\n  });\n  if (out.SheetNames.length == 0)\n    throw new Error(\"Empty NUMBERS file\");\n  return out;\n}\nfunction parse_numbers_iwa(cfb) {\n  var _a, _b, _c, _d;\n  var M = {}, indices = [];\n  cfb.FullPaths.forEach(function(p) {\n    if (p.match(/\\.iwpv2/))\n      throw new Error(\"Unsupported password protection\");\n  });\n  cfb.FileIndex.forEach(function(s) {\n    if (!s.name.match(/\\.iwa$/))\n      return;\n    var o;\n    try {\n      o = decompress_iwa_file(s.content);\n    } catch (e) {\n      return console.log(\"?? \" + s.content.length + \" \" + (e.message || e));\n    }\n    var packets;\n    try {\n      packets = parse_iwa_file(o);\n    } catch (e) {\n      return console.log(\"## \" + (e.message || e));\n    }\n    packets.forEach(function(packet) {\n      M[packet.id] = packet.messages;\n      indices.push(packet.id);\n    });\n  });\n  if (!indices.length)\n    throw new Error(\"File has no messages\");\n  var docroot = ((_d = (_c = (_b = (_a = M == null ? void 0 : M[1]) == null ? void 0 : _a[0]) == null ? void 0 : _b.meta) == null ? void 0 : _c[1]) == null ? void 0 : _d[0].data) && varint_to_i32(M[1][0].meta[1][0].data) == 1 && M[1][0];\n  if (!docroot)\n    indices.forEach(function(idx) {\n      M[idx].forEach(function(iwam) {\n        var mtype = varint_to_i32(iwam.meta[1][0].data) >>> 0;\n        if (mtype == 1) {\n          if (!docroot)\n            docroot = iwam;\n          else\n            throw new Error(\"Document has multiple roots\");\n        }\n      });\n    });\n  if (!docroot)\n    throw new Error(\"Cannot find Document root\");\n  return parse_TN_DocumentArchive(M, docroot);\n}\nfunction write_tile_row(tri, data, SST) {\n  var _a, _b, _c, _d;\n  if (!((_a = tri[6]) == null ? void 0 : _a[0]) || !((_b = tri[7]) == null ? void 0 : _b[0]))\n    throw \"Mutation only works on post-BNC storages!\";\n  var wide_offsets = ((_d = (_c = tri[8]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && varint_to_i32(tri[8][0].data) > 0 || false;\n  if (wide_offsets)\n    throw \"Math only works with normal offsets\";\n  var cnt = 0;\n  var dv = u8_to_dataview(tri[7][0].data), last_offset = 0, cell_storage = [];\n  var _dv = u8_to_dataview(tri[4][0].data), _last_offset = 0, _cell_storage = [];\n  for (var C = 0; C < data.length; ++C) {\n    if (data[C] == null) {\n      dv.setUint16(C * 2, 65535, true);\n      _dv.setUint16(C * 2, 65535);\n      continue;\n    }\n    dv.setUint16(C * 2, last_offset, true);\n    _dv.setUint16(C * 2, _last_offset, true);\n    var celload, _celload;\n    switch (typeof data[C]) {\n      case \"string\":\n        celload = write_new_storage({ t: \"s\", v: data[C] }, SST);\n        _celload = write_old_storage({ t: \"s\", v: data[C] }, SST);\n        break;\n      case \"number\":\n        celload = write_new_storage({ t: \"n\", v: data[C] }, SST);\n        _celload = write_old_storage({ t: \"n\", v: data[C] }, SST);\n        break;\n      case \"boolean\":\n        celload = write_new_storage({ t: \"b\", v: data[C] }, SST);\n        _celload = write_old_storage({ t: \"b\", v: data[C] }, SST);\n        break;\n      default:\n        throw new Error(\"Unsupported value \" + data[C]);\n    }\n    cell_storage.push(celload);\n    last_offset += celload.length;\n    _cell_storage.push(_celload);\n    _last_offset += _celload.length;\n    ++cnt;\n  }\n  tri[2][0].data = write_varint49(cnt);\n  for (; C < tri[7][0].data.length / 2; ++C) {\n    dv.setUint16(C * 2, 65535, true);\n    _dv.setUint16(C * 2, 65535, true);\n  }\n  tri[6][0].data = u8concat(cell_storage);\n  tri[3][0].data = u8concat(_cell_storage);\n  return cnt;\n}\nfunction write_numbers_iwa(wb, opts) {\n  if (!opts || !opts.numbers)\n    throw new Error(\"Must pass a `numbers` option -- check the README\");\n  var ws = wb.Sheets[wb.SheetNames[0]];\n  if (wb.SheetNames.length > 1)\n    console.error(\"The Numbers writer currently writes only the first table\");\n  var range = decode_range(ws[\"!ref\"]);\n  range.s.r = range.s.c = 0;\n  var trunc = false;\n  if (range.e.c > 9) {\n    trunc = true;\n    range.e.c = 9;\n  }\n  if (range.e.r > 49) {\n    trunc = true;\n    range.e.r = 49;\n  }\n  if (trunc)\n    console.error(\"The Numbers writer is currently limited to \".concat(encode_range(range)));\n  var data = sheet_to_json(ws, { range: range, header: 1 });\n  var SST = [\"~Sh33tJ5~\"];\n  data.forEach(function(row) {\n    return row.forEach(function(cell) {\n      if (typeof cell == \"string\")\n        SST.push(cell);\n    });\n  });\n  var dependents = {};\n  var indices = [];\n  var cfb = CFB.read(opts.numbers, { type: \"base64\" });\n  cfb.FileIndex.map(function(fi, idx) {\n    return [fi, cfb.FullPaths[idx]];\n  }).forEach(function(row) {\n    var fi = row[0], fp = row[1];\n    if (fi.type != 2)\n      return;\n    if (!fi.name.match(/\\.iwa/))\n      return;\n    var old_content = fi.content;\n    var raw1 = decompress_iwa_file(old_content);\n    var x2 = parse_iwa_file(raw1);\n    x2.forEach(function(packet2) {\n      indices.push(packet2.id);\n      dependents[packet2.id] = { deps: [], location: fp, type: varint_to_i32(packet2.messages[0].meta[1][0].data) };\n    });\n  });\n  indices.sort(function(x2, y2) {\n    return x2 - y2;\n  });\n  var indices_varint = indices.filter(function(x2) {\n    return x2 > 1;\n  }).map(function(x2) {\n    return [x2, write_varint49(x2)];\n  });\n  cfb.FileIndex.map(function(fi, idx) {\n    return [fi, cfb.FullPaths[idx]];\n  }).forEach(function(row) {\n    var fi = row[0], fp = row[1];\n    if (!fi.name.match(/\\.iwa/))\n      return;\n    var x2 = parse_iwa_file(decompress_iwa_file(fi.content));\n    x2.forEach(function(ia) {\n      ia.messages.forEach(function(m) {\n        indices_varint.forEach(function(ivi) {\n          if (ia.messages.some(function(mess) {\n            return varint_to_i32(mess.meta[1][0].data) != 11006 && u8contains(mess.data, ivi[1]);\n          })) {\n            dependents[ivi[0]].deps.push(ia.id);\n          }\n        });\n      });\n    });\n  });\n  function get_unique_msgid() {\n    for (var i = 927262; i < 2e6; ++i)\n      if (!dependents[i])\n        return i;\n    throw new Error(\"Too many messages\");\n  }\n  var entry = CFB.find(cfb, dependents[1].location);\n  var x = parse_iwa_file(decompress_iwa_file(entry.content));\n  var docroot;\n  for (var xi = 0; xi < x.length; ++xi) {\n    var packet = x[xi];\n    if (packet.id == 1)\n      docroot = packet;\n  }\n  var sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[1][0].data);\n  entry = CFB.find(cfb, dependents[sheetrootref].location);\n  x = parse_iwa_file(decompress_iwa_file(entry.content));\n  for (xi = 0; xi < x.length; ++xi) {\n    packet = x[xi];\n    if (packet.id == sheetrootref)\n      docroot = packet;\n  }\n  sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n  entry = CFB.find(cfb, dependents[sheetrootref].location);\n  x = parse_iwa_file(decompress_iwa_file(entry.content));\n  for (xi = 0; xi < x.length; ++xi) {\n    packet = x[xi];\n    if (packet.id == sheetrootref)\n      docroot = packet;\n  }\n  sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n  entry = CFB.find(cfb, dependents[sheetrootref].location);\n  x = parse_iwa_file(decompress_iwa_file(entry.content));\n  for (xi = 0; xi < x.length; ++xi) {\n    packet = x[xi];\n    if (packet.id == sheetrootref)\n      docroot = packet;\n  }\n  var pb = parse_shallow(docroot.messages[0].data);\n  {\n    pb[6][0].data = write_varint49(range.e.r + 1);\n    pb[7][0].data = write_varint49(range.e.c + 1);\n    var cruidsref = parse_TSP_Reference(pb[46][0].data);\n    var oldbucket = CFB.find(cfb, dependents[cruidsref].location);\n    var _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n    {\n      for (var j = 0; j < _x.length; ++j) {\n        if (_x[j].id == cruidsref)\n          break;\n      }\n      if (_x[j].id != cruidsref)\n        throw \"Bad ColumnRowUIDMapArchive\";\n      var cruids = parse_shallow(_x[j].messages[0].data);\n      cruids[1] = [];\n      cruids[2] = [], cruids[3] = [];\n      for (var C = 0; C <= range.e.c; ++C) {\n        var uuid = [];\n        uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(C + 420690) }];\n        cruids[1].push({ type: 2, data: write_shallow(uuid) });\n        cruids[2].push({ type: 0, data: write_varint49(C) });\n        cruids[3].push({ type: 0, data: write_varint49(C) });\n      }\n      cruids[4] = [];\n      cruids[5] = [], cruids[6] = [];\n      for (var R = 0; R <= range.e.r; ++R) {\n        uuid = [];\n        uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(R + 726270) }];\n        cruids[4].push({ type: 2, data: write_shallow(uuid) });\n        cruids[5].push({ type: 0, data: write_varint49(R) });\n        cruids[6].push({ type: 0, data: write_varint49(R) });\n      }\n      _x[j].messages[0].data = write_shallow(cruids);\n    }\n    oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n    oldbucket.size = oldbucket.content.length;\n    delete pb[46];\n    var store = parse_shallow(pb[4][0].data);\n    {\n      store[7][0].data = write_varint49(range.e.r + 1);\n      var row_headers = parse_shallow(store[1][0].data);\n      var row_header_ref = parse_TSP_Reference(row_headers[2][0].data);\n      oldbucket = CFB.find(cfb, dependents[row_header_ref].location);\n      _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n      {\n        if (_x[0].id != row_header_ref)\n          throw \"Bad HeaderStorageBucket\";\n        var base_bucket = parse_shallow(_x[0].messages[0].data);\n        for (R = 0; R < data.length; ++R) {\n          var _bucket = parse_shallow(base_bucket[2][0].data);\n          _bucket[1][0].data = write_varint49(R);\n          _bucket[4][0].data = write_varint49(data[R].length);\n          base_bucket[2][R] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n        }\n        _x[0].messages[0].data = write_shallow(base_bucket);\n      }\n      oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n      oldbucket.size = oldbucket.content.length;\n      var col_header_ref = parse_TSP_Reference(store[2][0].data);\n      oldbucket = CFB.find(cfb, dependents[col_header_ref].location);\n      _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n      {\n        if (_x[0].id != col_header_ref)\n          throw \"Bad HeaderStorageBucket\";\n        base_bucket = parse_shallow(_x[0].messages[0].data);\n        for (C = 0; C <= range.e.c; ++C) {\n          _bucket = parse_shallow(base_bucket[2][0].data);\n          _bucket[1][0].data = write_varint49(C);\n          _bucket[4][0].data = write_varint49(range.e.r + 1);\n          base_bucket[2][C] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n        }\n        _x[0].messages[0].data = write_shallow(base_bucket);\n      }\n      oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n      oldbucket.size = oldbucket.content.length;\n      var sstref = parse_TSP_Reference(store[4][0].data);\n      (function() {\n        var sentry = CFB.find(cfb, dependents[sstref].location);\n        var sx = parse_iwa_file(decompress_iwa_file(sentry.content));\n        var sstroot;\n        for (var sxi = 0; sxi < sx.length; ++sxi) {\n          var packet2 = sx[sxi];\n          if (packet2.id == sstref)\n            sstroot = packet2;\n        }\n        var sstdata = parse_shallow(sstroot.messages[0].data);\n        {\n          sstdata[3] = [];\n          var newsst = [];\n          SST.forEach(function(str, i) {\n            newsst[1] = [{ type: 0, data: write_varint49(i) }];\n            newsst[2] = [{ type: 0, data: write_varint49(1) }];\n            newsst[3] = [{ type: 2, data: stru8(str) }];\n            sstdata[3].push({ type: 2, data: write_shallow(newsst) });\n          });\n        }\n        sstroot.messages[0].data = write_shallow(sstdata);\n        var sy = write_iwa_file(sx);\n        var raw32 = compress_iwa_file(sy);\n        sentry.content = raw32;\n        sentry.size = sentry.content.length;\n      })();\n      var tile = parse_shallow(store[3][0].data);\n      {\n        var t = tile[1][0];\n        delete tile[2];\n        var tl = parse_shallow(t.data);\n        {\n          var tileref = parse_TSP_Reference(tl[2][0].data);\n          (function() {\n            var tentry = CFB.find(cfb, dependents[tileref].location);\n            var tx = parse_iwa_file(decompress_iwa_file(tentry.content));\n            var tileroot;\n            for (var sxi = 0; sxi < tx.length; ++sxi) {\n              var packet2 = tx[sxi];\n              if (packet2.id == tileref)\n                tileroot = packet2;\n            }\n            var tiledata = parse_shallow(tileroot.messages[0].data);\n            {\n              delete tiledata[6];\n              delete tile[7];\n              var rowload = new Uint8Array(tiledata[5][0].data);\n              tiledata[5] = [];\n              var cnt = 0;\n              for (var R2 = 0; R2 <= range.e.r; ++R2) {\n                var tilerow = parse_shallow(rowload);\n                cnt += write_tile_row(tilerow, data[R2], SST);\n                tilerow[1][0].data = write_varint49(R2);\n                tiledata[5].push({ data: write_shallow(tilerow), type: 2 });\n              }\n              tiledata[1] = [{ type: 0, data: write_varint49(range.e.c + 1) }];\n              tiledata[2] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n              tiledata[3] = [{ type: 0, data: write_varint49(cnt) }];\n              tiledata[4] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n            }\n            tileroot.messages[0].data = write_shallow(tiledata);\n            var ty = write_iwa_file(tx);\n            var raw32 = compress_iwa_file(ty);\n            tentry.content = raw32;\n            tentry.size = tentry.content.length;\n          })();\n        }\n        t.data = write_shallow(tl);\n      }\n      store[3][0].data = write_shallow(tile);\n    }\n    pb[4][0].data = write_shallow(store);\n  }\n  docroot.messages[0].data = write_shallow(pb);\n  var y = write_iwa_file(x);\n  var raw3 = compress_iwa_file(y);\n  entry.content = raw3;\n  entry.size = entry.content.length;\n  return cfb;\n}\nfunction fix_opts_func(defaults/*:Array<Array<any> >*/)/*:{(o:any):void}*/ {\n\treturn function fix_opts(opts) {\n\t\tfor(var i = 0; i != defaults.length; ++i) {\n\t\t\tvar d = defaults[i];\n\t\t\tif(opts[d[0]] === undefined) opts[d[0]] = d[1];\n\t\t\tif(d[2] === 'n') opts[d[0]] = Number(opts[d[0]]);\n\t\t}\n\t};\n}\n\nfunction fix_read_opts(opts) {\nfix_opts_func([\n\t['cellNF', false], /* emit cell number format string as .z */\n\t['cellHTML', true], /* emit html string as .h */\n\t['cellFormula', true], /* emit formulae as .f */\n\t['cellStyles', false], /* emits style/theme as .s */\n\t['cellText', true], /* emit formatted text as .w */\n\t['cellDates', false], /* emit date cells with type `d` */\n\n\t['sheetStubs', false], /* emit empty cells */\n\t['sheetRows', 0, 'n'], /* read n rows (0 = read all rows) */\n\n\t['bookDeps', false], /* parse calculation chains */\n\t['bookSheets', false], /* only try to get sheet names (no Sheets) */\n\t['bookProps', false], /* only try to get properties (no Sheets) */\n\t['bookFiles', false], /* include raw file structure (keys, files, cfb) */\n\t['bookVBA', false], /* include vba raw data (vbaraw) */\n\n\t['password',''], /* password */\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\n\nfunction fix_write_opts(opts) {\nfix_opts_func([\n\t['cellDates', false], /* write date cells with type `d` */\n\n\t['bookSST', false], /* Generate Shared String Table */\n\n\t['bookType', 'xlsx'], /* Type of workbook (xlsx/m/b) */\n\n\t['compression', false], /* Use file compression */\n\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\nfunction get_sheet_type(n/*:string*/)/*:string*/ {\n\tif(RELS.WS.indexOf(n) > -1) return \"sheet\";\n\tif(RELS.CS && n == RELS.CS) return \"chart\";\n\tif(RELS.DS && n == RELS.DS) return \"dialog\";\n\tif(RELS.MS && n == RELS.MS) return \"macro\";\n\treturn (n && n.length) ? n : \"sheet\";\n}\nfunction safe_parse_wbrels(wbrels, sheets) {\n\tif(!wbrels) return 0;\n\ttry {\n\t\twbrels = sheets.map(function pwbr(w) { if(!w.id) w.id = w.strRelID; return [w.name, wbrels['!id'][w.id].Target, get_sheet_type(wbrels['!id'][w.id].Type)]; });\n\t} catch(e) { return null; }\n\treturn !wbrels || wbrels.length === 0 ? null : wbrels;\n}\n\nfunction safe_parse_sheet(zip, path/*:string*/, relsPath/*:string*/, sheet, idx/*:number*/, sheetRels, sheets, stype/*:string*/, opts, wb, themes, styles) {\n\ttry {\n\t\tsheetRels[sheet]=parse_rels(getzipstr(zip, relsPath, true), path);\n\t\tvar data = getzipdata(zip, path);\n\t\tvar _ws;\n\t\tswitch(stype) {\n\t\t\tcase 'sheet':  _ws = parse_ws(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'chart':  _ws = parse_cs(data, path, idx, opts, sheetRels[sheet], wb, themes, styles);\n\t\t\t\tif(!_ws || !_ws['!drawel']) break;\n\t\t\t\tvar dfile = resolve_path(_ws['!drawel'].Target, path);\n\t\t\t\tvar drelsp = get_rels_path(dfile);\n\t\t\t\tvar draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));\n\t\t\t\tvar chartp = resolve_path(draw, dfile);\n\t\t\t\tvar crelsp = get_rels_path(chartp);\n\t\t\t\t_ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);\n\t\t\t\tbreak;\n\t\t\tcase 'macro':  _ws = parse_ms(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'dialog': _ws = parse_ds(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tdefault: throw new Error(\"Unrecognized sheet type \" + stype);\n\t\t}\n\t\tsheets[sheet] = _ws;\n\n\t\t/* scan rels for comments and threaded comments */\n\t\tvar tcomments = [];\n\t\tif(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {\n\t\t\tvar dfile = \"\";\n\t\t\tif(sheetRels[sheet][n].Type == RELS.CMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\tvar comments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);\n\t\t\t\tif(!comments || !comments.length) return;\n\t\t\t\tsheet_insert_comments(_ws, comments, false);\n\t\t\t}\n\t\t\tif(sheetRels[sheet][n].Type == RELS.TCMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\ttcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile, true), opts));\n\t\t\t}\n\t\t});\n\t\tif(tcomments && tcomments.length) sheet_insert_comments(_ws, tcomments, true, opts.people || []);\n\t} catch(e) { if(opts.WTF) throw e; }\n}\n\nfunction strip_front_slash(x/*:string*/)/*:string*/ { return x.charAt(0) == '/' ? x.slice(1) : x; }\n\nfunction parse_zip(zip/*:ZIP*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tmake_ssf();\n\topts = opts || {};\n\tfix_read_opts(opts);\n\n\t/* OpenDocument Part 3 Section 2.2.1 OpenDocument Package */\n\tif(safegetzipfile(zip, 'META-INF/manifest.xml')) return parse_ods(zip, opts);\n\t/* UOC */\n\tif(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);\n\t/* Numbers */\n\tif(safegetzipfile(zip, 'Index/Document.iwa')) {\n\t\tif(typeof Uint8Array == \"undefined\") throw new Error('NUMBERS file parsing requires Uint8Array support');\n\t\tif(typeof parse_numbers_iwa != \"undefined\") {\n\t\t\tif(zip.FileIndex) return parse_numbers_iwa(zip);\n\t\t\tvar _zip = CFB.utils.cfb_new();\n\t\t\tzipentries(zip).forEach(function(e) { zip_add_file(_zip, e, getzipbin(zip, e)); });\n\t\t\treturn parse_numbers_iwa(_zip);\n\t\t}\n\t\tthrow new Error('Unsupported NUMBERS file');\n\t}\n\tif(!safegetzipfile(zip, '[Content_Types].xml')) {\n\t\tif(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');\n\t\tif(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');\n\t\tthrow new Error('Unsupported ZIP file');\n\t}\n\n\tvar entries = zipentries(zip);\n\tvar dir = parse_ct((getzipstr(zip, '[Content_Types].xml')/*:?any*/));\n\tvar xlsb = false;\n\tvar sheets, binname;\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.xml\";\n\t\tif(getzipdata(zip,binname, true)) dir.workbooks.push(binname);\n\t}\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.bin\";\n\t\tif(!getzipdata(zip,binname,true)) throw new Error(\"Could not find workbook\");\n\t\tdir.workbooks.push(binname);\n\t\txlsb = true;\n\t}\n\tif(dir.workbooks[0].slice(-3) == \"bin\") xlsb = true;\n\n\tvar themes = ({}/*:any*/);\n\tvar styles = ({}/*:any*/);\n\tif(!opts.bookSheets && !opts.bookProps) {\n\t\tstrs = [];\n\t\tif(dir.sst) try { strs=parse_sst(getzipdata(zip, strip_front_slash(dir.sst)), dir.sst, opts); } catch(e) { if(opts.WTF) throw e; }\n\n\t\tif(opts.cellStyles && dir.themes.length) themes = parse_theme(getzipstr(zip, dir.themes[0].replace(/^\\//,''), true)||\"\",dir.themes[0], opts);\n\n\t\tif(dir.style) styles = parse_sty(getzipdata(zip, strip_front_slash(dir.style)), dir.style, themes, opts);\n\t}\n\n\t/*var externbooks = */dir.links.map(function(link) {\n\t\ttry {\n\t\t\tvar rels = parse_rels(getzipstr(zip, get_rels_path(strip_front_slash(link))), link);\n\t\t\treturn parse_xlink(getzipdata(zip, strip_front_slash(link)), rels, link, opts);\n\t\t} catch(e) {}\n\t});\n\n\tvar wb = parse_wb(getzipdata(zip, strip_front_slash(dir.workbooks[0])), dir.workbooks[0], opts);\n\n\tvar props = {}, propdata = \"\";\n\n\tif(dir.coreprops.length) {\n\t\tpropdata = getzipdata(zip, strip_front_slash(dir.coreprops[0]), true);\n\t\tif(propdata) props = parse_core_props(propdata);\n\t\tif(dir.extprops.length !== 0) {\n\t\t\tpropdata = getzipdata(zip, strip_front_slash(dir.extprops[0]), true);\n\t\t\tif(propdata) parse_ext_props(propdata, props, opts);\n\t\t}\n\t}\n\n\tvar custprops = {};\n\tif(!opts.bookSheets || opts.bookProps) {\n\t\tif (dir.custprops.length !== 0) {\n\t\t\tpropdata = getzipstr(zip, strip_front_slash(dir.custprops[0]), true);\n\t\t\tif(propdata) custprops = parse_cust_props(propdata, opts);\n\t\t}\n\t}\n\n\tvar out = ({}/*:any*/);\n\tif(opts.bookSheets || opts.bookProps) {\n\t\tif(wb.Sheets) sheets = wb.Sheets.map(function pluck(x){ return x.name; });\n\t\telse if(props.Worksheets && props.SheetNames.length > 0) sheets=props.SheetNames;\n\t\tif(opts.bookProps) { out.Props = props; out.Custprops = custprops; }\n\t\tif(opts.bookSheets && typeof sheets !== 'undefined') out.SheetNames = sheets;\n\t\tif(opts.bookSheets ? out.SheetNames : opts.bookProps) return out;\n\t}\n\tsheets = {};\n\n\tvar deps = {};\n\tif(opts.bookDeps && dir.calcchain) deps=parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)),dir.calcchain,opts);\n\n\tvar i=0;\n\tvar sheetRels = ({}/*:any*/);\n\tvar path, relsPath;\n\n\t{\n\t\tvar wbsheets = wb.Sheets;\n\t\tprops.Worksheets = wbsheets.length;\n\t\tprops.SheetNames = [];\n\t\tfor(var j = 0; j != wbsheets.length; ++j) {\n\t\t\tprops.SheetNames[j] = wbsheets[j].name;\n\t\t}\n\t}\n\n\tvar wbext = xlsb ? \"bin\" : \"xml\";\n\tvar wbrelsi = dir.workbooks[0].lastIndexOf(\"/\");\n\tvar wbrelsfile = (dir.workbooks[0].slice(0, wbrelsi+1) + \"_rels/\" + dir.workbooks[0].slice(wbrelsi+1) + \".rels\").replace(/^\\//,\"\");\n\tif(!safegetzipfile(zip, wbrelsfile)) wbrelsfile = 'xl/_rels/workbook.' + wbext + '.rels';\n\tvar wbrels = parse_rels(getzipstr(zip, wbrelsfile, true), wbrelsfile.replace(/_rels.*/, \"s5s\"));\n\n\tif((dir.metadata || []).length >= 1) {\n\t\t/* TODO: MDX and other types of metadata */\n\t\topts.xlmeta = parse_xlmeta(getzipdata(zip, strip_front_slash(dir.metadata[0])),dir.metadata[0],opts);\n\t}\n\n\tif((dir.people || []).length >= 1) {\n\t\topts.people = parse_people_xml(getzipdata(zip, strip_front_slash(dir.people[0])),opts);\n\t}\n\n\tif(wbrels) wbrels = safe_parse_wbrels(wbrels, wb.Sheets);\n\n\t/* Numbers iOS hack */\n\tvar nmode = (getzipdata(zip,\"xl/worksheets/sheet.xml\",true))?1:0;\n\twsloop: for(i = 0; i != props.Worksheets; ++i) {\n\t\tvar stype = \"sheet\";\n\t\tif(wbrels && wbrels[i]) {\n\t\t\tpath = 'xl/' + (wbrels[i][1]).replace(/[\\/]?xl\\//, \"\");\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrels[i][1];\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrelsfile.replace(/_rels\\/.*$/,\"\") + wbrels[i][1];\n\t\t\tstype = wbrels[i][2];\n\t\t} else {\n\t\t\tpath = 'xl/worksheets/sheet'+(i+1-nmode)+\".\" + wbext;\n\t\t\tpath = path.replace(/sheet0\\./,\"sheet.\");\n\t\t}\n\t\trelsPath = path.replace(/^(.*)(\\/)([^\\/]*)$/, \"$1/_rels/$3.rels\");\n\t\tif(opts && opts.sheets != null) switch(typeof opts.sheets) {\n\t\t\tcase \"number\": if(i != opts.sheets) continue wsloop; break;\n\t\t\tcase \"string\": if(props.SheetNames[i].toLowerCase() != opts.sheets.toLowerCase()) continue wsloop; break;\n\t\t\tdefault: if(Array.isArray && Array.isArray(opts.sheets)) {\n\t\t\t\tvar snjseen = false;\n\t\t\t\tfor(var snj = 0; snj != opts.sheets.length; ++snj) {\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"number\" && opts.sheets[snj] == i) snjseen=1;\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"string\" && opts.sheets[snj].toLowerCase() == props.SheetNames[i].toLowerCase()) snjseen = 1;\n\t\t\t\t}\n\t\t\t\tif(!snjseen) continue wsloop;\n\t\t\t}\n\t\t}\n\t\tsafe_parse_sheet(zip, path, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles);\n\t}\n\n\tout = ({\n\t\tDirectory: dir,\n\t\tWorkbook: wb,\n\t\tProps: props,\n\t\tCustprops: custprops,\n\t\tDeps: deps,\n\t\tSheets: sheets,\n\t\tSheetNames: props.SheetNames,\n\t\tStrings: strs,\n\t\tStyles: styles,\n\t\tThemes: themes,\n\t\tSSF: dup(table_fmt)\n\t}/*:any*/);\n\tif(opts && opts.bookFiles) {\n\t\tif(zip.files) {\n\t\t\tout.keys = entries;\n\t\t\tout.files = zip.files;\n\t\t} else {\n\t\t\tout.keys = [];\n\t\t\tout.files = {};\n\t\t\tzip.FullPaths.forEach(function(p, idx) {\n\t\t\t\tp = p.replace(/^Root Entry[\\/]/, \"\");\n\t\t\t\tout.keys.push(p);\n\t\t\t\tout.files[p] = zip.FileIndex[idx];\n\t\t\t});\n\t\t}\n\t}\n\tif(opts && opts.bookVBA) {\n\t\tif(dir.vba.length > 0) out.vbaraw = getzipdata(zip,strip_front_slash(dir.vba[0]),true);\n\t\telse if(dir.defaults && dir.defaults.bin === CT_VBA) out.vbaraw = getzipdata(zip, 'xl/vbaProject.bin',true);\n\t}\n\treturn out;\n}\n\n/* [MS-OFFCRYPTO] 2.1.1 */\nfunction parse_xlsxcfb(cfb, _opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tvar f = 'Workbook', data = CFB.find(cfb, f);\n\ttry {\n\tf = '/!DataSpaces/Version';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var version = */parse_DataSpaceVersionInfo(data.content);\n\n\t/* 2.3.4.1 */\n\tf = '/!DataSpaces/DataSpaceMap';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar dsm = parse_DataSpaceMap(data.content);\n\tif(dsm.length !== 1 || dsm[0].comps.length !== 1 || dsm[0].comps[0].t !== 0 || dsm[0].name !== \"StrongEncryptionDataSpace\" || dsm[0].comps[0].v !== \"EncryptedPackage\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.2 */\n\tf = '/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar seds = parse_DataSpaceDefinition(data.content);\n\tif(seds.length != 1 || seds[0] != \"StrongEncryptionTransform\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.3 */\n\tf = '/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var hdr = */parse_Primary(data.content);\n\t} catch(e) {}\n\n\tf = '/EncryptionInfo';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar einfo = parse_EncryptionInfo(data.content);\n\n\t/* 2.3.4.4 */\n\tf = '/EncryptedPackage';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\n/*global decrypt_agile */\n/*:: declare var decrypt_agile:any; */\n\tif(einfo[0] == 0x04 && typeof decrypt_agile !== 'undefined') return decrypt_agile(einfo[1], data.content, opts.password || \"\", opts);\n/*global decrypt_std76 */\n/*:: declare var decrypt_std76:any; */\n\tif(einfo[0] == 0x02 && typeof decrypt_std76 !== 'undefined') return decrypt_std76(einfo[1], data.content, opts.password || \"\", opts);\n\tthrow new Error(\"File is password-protected\");\n}\n\nfunction write_zip(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\tif(opts.bookType == \"ods\") return write_ods(wb, opts);\n\tif(opts.bookType == \"numbers\") return write_numbers_iwa(wb, opts);\n\tif(opts.bookType == \"xlsb\") return write_zip_xlsxb(wb, opts);\n\treturn write_zip_xlsx(wb, opts);\n}\n\n/* XLSX and XLSB writing are very similar.  Originally they were unified in one\n   export function.  This is horrible for tree shaking in the common case (most\n   applications need to export files in one format) so this function supports\n   both formats while write_zip_xlsx only handles XLSX */\nfunction write_zip_xlsxb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = opts.bookType == \"xlsb\" ? \"bin\" : \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws(rId-1, f, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_cmnt(comments, cf, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst(opts.Strings, f, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb(wb, f, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty(wb, f, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta(f));\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction write_zip_xlsx(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tvar people = [\"SheetJ5\"];\n\topts.tcid = 0;\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws_xml(rId-1, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tvar needtc = false;\n\t\t\t\tcomments.forEach(function(carr) {\n\t\t\t\t\tcarr[1].forEach(function(c) { if(c.T == true) needtc = true; });\n\t\t\t\t});\n\t\t\t\tif(needtc) {\n\t\t\t\t\tcf = \"xl/threadedComments/threadedComment\" + rId + \".\" + wbext;\n\t\t\t\t\tzip_add_file(zip, cf, write_tcmnt_xml(comments, people, opts));\n\t\t\t\t\tct.threadedcomments.push(cf);\n\t\t\t\t\tadd_rels(wsrels, -1, \"../threadedComments/threadedComment\" + rId + \".\" + wbext, RELS.TCMNT);\n\t\t\t\t}\n\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_comments_xml(comments, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst_xml(opts.Strings, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb_xml(wb, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty_xml(wb, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta_xml());\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tif(people.length > 1) {\n\t\tf = \"xl/persons/person.xml\";\n\t\tzip_add_file(zip, f, write_people_xml(people, opts));\n\t\tct.people.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"persons/person.xml\", RELS.PEOPLE);\n\t}\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction firstbyte(f/*:RawData*/,o/*:?TypeOpts*/)/*:Array<number>*/ {\n\tvar x = \"\";\n\tswitch((o||{}).type || \"base64\") {\n\t\tcase 'buffer': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tcase 'base64': x = Base64_decode(f.slice(0,12)); break;\n\t\tcase 'binary': x = f; break;\n\t\tcase 'array':  return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tdefault: throw new Error(\"Unrecognized type \" + (o && o.type || \"undefined\"));\n\t}\n\treturn [x.charCodeAt(0), x.charCodeAt(1), x.charCodeAt(2), x.charCodeAt(3), x.charCodeAt(4), x.charCodeAt(5), x.charCodeAt(6), x.charCodeAt(7)];\n}\n\nfunction read_cfb(cfb/*:CFBContainer*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tif(CFB.find(cfb, \"EncryptedPackage\")) return parse_xlsxcfb(cfb, opts);\n\treturn parse_xlscfb(cfb, opts);\n}\n\nfunction read_zip(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar zip, d = data;\n\tvar o = opts||{};\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tzip = zip_read(d, o);\n\treturn parse_zip(zip, o);\n}\n\nfunction read_plaintext(data/*:string*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar i = 0;\n\tmain: while(i < data.length) switch(data.charCodeAt(i)) {\n\t\tcase 0x0A: case 0x0D: case 0x20: ++i; break;\n\t\tcase 0x3C: return parse_xlml(data.slice(i),o);\n\t\tdefault: break main;\n\t}\n\treturn PRN.to_workbook(data, o);\n}\n\nfunction read_plaintext_raw(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar str = \"\", bytes = firstbyte(data, o);\n\tswitch(o.type) {\n\t\tcase 'base64': str = Base64_decode(data); break;\n\t\tcase 'binary': str = data; break;\n\t\tcase 'buffer': str = data.toString('binary'); break;\n\t\tcase 'array': str = cc2str(data); break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str);\n\to.type = \"binary\";\n\treturn read_plaintext(str, o);\n}\n\nfunction read_utf16(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar d = data;\n\tif(o.type == 'base64') d = Base64_decode(d);\n\td = $cptable.utils.decode(1200, d.slice(2), 'str');\n\to.type = \"binary\";\n\treturn read_plaintext(d, o);\n}\n\nfunction bstrify(data/*:string*/)/*:string*/ {\n\treturn !data.match(/[^\\x00-\\x7F]/) ? data : utf8write(data);\n}\n\nfunction read_prn(data, d, o, str) {\n\tif(str) { o.type = \"string\"; return PRN.to_workbook(data, o); }\n\treturn PRN.to_workbook(d, o);\n}\n\nfunction readSync(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\treset_cp();\n\tvar o = opts||{};\n\tif(typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), (o = dup(o), o.type = \"array\", o));\n\tif(typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && !o.type) o.type = typeof Deno !== \"undefined\" ? \"buffer\" : \"array\";\n\tvar d = data, n = [0,0,0,0], str = false;\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\t_ssfopts = {};\n\tif(o.dateNF) _ssfopts.dateNF = o.dateNF;\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tif(o.type == \"file\") { o.type = has_buf ? \"buffer\" : \"binary\"; d = read_binary(data); if(typeof Uint8Array !== 'undefined' && !has_buf) o.type = \"array\"; }\n\tif(o.type == \"string\") { str = true; o.type = \"binary\"; o.codepage = 65001; d = bstrify(data); }\n\tif(o.type == 'array' && typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && typeof ArrayBuffer !== 'undefined') {\n\t\t// $FlowIgnore\n\t\tvar ab=new ArrayBuffer(3), vu=new Uint8Array(ab); vu.foo=\"bar\";\n\t\t// $FlowIgnore\n\t\tif(!vu.foo) {o=dup(o); o.type='array'; return readSync(ab2a(d), o);}\n\t}\n\tswitch((n = firstbyte(d, o))[0]) {\n\t\tcase 0xD0: if(n[1] === 0xCF && n[2] === 0x11 && n[3] === 0xE0 && n[4] === 0xA1 && n[5] === 0xB1 && n[6] === 0x1A && n[7] === 0xE1) return read_cfb(CFB.read(d, o), o); break;\n\t\tcase 0x09: if(n[1] <= 0x08) return parse_xlscfb(d, o); break;\n\t\tcase 0x3C: return parse_xlml(d, o);\n\t\tcase 0x49:\n\t\t\tif(n[1] === 0x49 && n[2] === 0x2a && n[3] === 0x00) throw new Error(\"TIFF Image File is not a spreadsheet\");\n\t\t\tif(n[1] === 0x44) return read_wb_ID(d, o);\n\t\t\tbreak;\n\t\tcase 0x54: if(n[1] === 0x41 && n[2] === 0x42 && n[3] === 0x4C) return DIF.to_workbook(d, o); break;\n\t\tcase 0x50: return (n[1] === 0x4B && n[2] < 0x09 && n[3] < 0x09) ? read_zip(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xEF: return n[3] === 0x3C ? parse_xlml(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xFF:\n\t\t\tif(n[1] === 0xFE) { return read_utf16(d, o); }\n\t\t\telse if(n[1] === 0x00 && n[2] === 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\tbreak;\n\t\tcase 0x00:\n\t\t\tif(n[1] === 0x00) {\n\t\t\t\tif(n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\t\tif(n[2] === 0x00 && (n[3] === 0x08 || n[3] === 0x09)) return WK_.to_workbook(d, o);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 0x03: case 0x83: case 0x8B: case 0x8C: return DBF.to_workbook(d, o);\n\t\tcase 0x7B: if(n[1] === 0x5C && n[2] === 0x72 && n[3] === 0x74) return RTF.to_workbook(d, o); break;\n\t\tcase 0x0A: case 0x0D: case 0x20: return read_plaintext_raw(d, o);\n\t\tcase 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error(\"PNG Image File is not a spreadsheet\"); break;\n\t}\n\tif(DBF_SUPPORTED_VERSIONS.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);\n\treturn read_prn(data, d, o, str);\n}\n\nfunction readFileSync(filename/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar o = opts||{}; o.type = 'file';\n\treturn readSync(filename, o);\n}\nfunction write_cfb_ctr(cfb/*:CFBContainer*/, o/*:WriteOpts*/)/*:any*/ {\n\tswitch(o.type) {\n\t\tcase \"base64\": case \"binary\": break;\n\t\tcase \"buffer\": case \"array\": o.type = \"\"; break;\n\t\tcase \"file\": return write_dl(o.file, CFB.write(cfb, {type:has_buf ? 'buffer' : \"\"}));\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\treturn CFB.write(cfb, o);\n}\n\n/*:: declare var encrypt_agile:any; */\nfunction write_zip_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_typeXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip_xlsx(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_denouement(z/*:any*/, o/*:?WriteOpts*/)/*:any*/ {\n\tvar oopts = {};\n\tvar ftype = has_buf ? \"nodebuffer\" : (typeof Uint8Array !== \"undefined\" ? \"array\" : \"string\");\n\tif(o.compression) oopts.compression = 'DEFLATE';\n\tif(o.password) oopts.type = ftype;\n\telse switch(o.type) {\n\t\tcase \"base64\": oopts.type = \"base64\"; break;\n\t\tcase \"binary\": oopts.type = \"string\"; break;\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tcase \"buffer\":\n\t\tcase \"file\": oopts.type = ftype; break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tvar out = z.FullPaths ? CFB.write(z, {fileType:\"zip\", type: /*::(*/{\"nodebuffer\": \"buffer\", \"string\": \"binary\"}/*:: :any)*/[oopts.type] || oopts.type, compression: !!o.compression}) : z.generate(oopts);\n\tif(typeof Deno !== \"undefined\") {\n\t\tif(typeof out == \"string\") {\n\t\t\tif(o.type == \"binary\" || o.type == \"base64\") return out;\n\t\t\tout = new Uint8Array(s2ab(out));\n\t\t}\n\t}\n/*jshint -W083 */\n\tif(o.password && typeof encrypt_agile !== 'undefined') return write_cfb_ctr(encrypt_agile(out, o.password), o); // eslint-disable-line no-undef\n/*jshint +W083 */\n\tif(o.type === \"file\") return write_dl(o.file, out);\n\treturn o.type == \"string\" ? utf8read(/*::(*/out/*:: :any)*/) : out;\n}\n\nfunction write_cfb_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = opts||{};\n\tvar cfb/*:CFBContainer*/ = write_xlscfb(wb, o);\n\treturn write_cfb_ctr(cfb, o);\n}\n\nfunction write_string_type(out/*:string*/, opts/*:WriteOpts*/, bom/*:?string*/)/*:any*/ {\n\tif(!bom) bom = \"\";\n\tvar o = bom + out;\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(utf8write(o));\n\t\tcase \"binary\": return utf8write(o);\n\t\tcase \"string\": return out;\n\t\tcase \"file\": return write_dl(opts.file, o, 'utf8');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(o, 'utf8');\n\t\t\telse if(typeof TextEncoder !== \"undefined\") return new TextEncoder().encode(o);\n\t\t\telse return write_string_type(o, {type:'binary'}).split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\nfunction write_stxt_type(out/*:string*/, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(out);\n\t\tcase \"binary\": return out;\n\t\tcase \"string\": return out; /* override in sheet_to_txt */\n\t\tcase \"file\": return write_dl(opts.file, out, 'binary');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(out, 'binary');\n\t\t\telse return out.split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\n/* TODO: test consistency */\nfunction write_binary_type(out, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"string\":\n\t\tcase \"base64\":\n\t\tcase \"binary\":\n\t\t\tvar bstr = \"\";\n\t\t\t// $FlowIgnore\n\t\t\tfor(var i = 0; i < out.length; ++i) bstr += String.fromCharCode(out[i]);\n\t\t\treturn opts.type == 'base64' ? Base64_encode(bstr) : opts.type == 'string' ? utf8read(bstr) : bstr;\n\t\tcase \"file\": return write_dl(opts.file, out);\n\t\tcase \"buffer\": return out;\n\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t}\n}\n\nfunction writeSyncXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSyncXLSX(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\treturn write_zip_typeXLSX(wb, o);\n}\n\nfunction writeSync(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSync(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\tvar idx = 0;\n\tif(o.sheet) {\n\t\tif(typeof o.sheet == \"number\") idx = o.sheet;\n\t\telse idx = wb.SheetNames.indexOf(o.sheet);\n\t\tif(!wb.SheetNames[idx]) throw new Error(\"Sheet not found: \" + o.sheet + \" : \" + (typeof o.sheet));\n\t}\n\tswitch(o.bookType || 'xlsb') {\n\t\tcase 'xml':\n\t\tcase 'xlml': return write_string_type(write_xlml(wb, o), o);\n\t\tcase 'slk':\n\t\tcase 'sylk': return write_string_type(SYLK.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'htm':\n\t\tcase 'html': return write_string_type(sheet_to_html(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'txt': return write_stxt_type(sheet_to_txt(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'csv': return write_string_type(sheet_to_csv(wb.Sheets[wb.SheetNames[idx]], o), o, \"\\ufeff\");\n\t\tcase 'dif': return write_string_type(DIF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'dbf': return write_binary_type(DBF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'prn': return write_string_type(PRN.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'rtf': return write_string_type(RTF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'eth': return write_string_type(ETH.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'fods': return write_string_type(write_ods(wb, o), o);\n\t\tcase 'wk1': return write_binary_type(WK_.sheet_to_wk1(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'wk3': return write_binary_type(WK_.book_to_wk3(wb, o), o);\n\t\tcase 'biff2': if(!o.biff) o.biff = 2; /* falls through */\n\t\tcase 'biff3': if(!o.biff) o.biff = 3; /* falls through */\n\t\tcase 'biff4': if(!o.biff) o.biff = 4; return write_binary_type(write_biff_buf(wb, o), o);\n\t\tcase 'biff5': if(!o.biff) o.biff = 5; /* falls through */\n\t\tcase 'biff8':\n\t\tcase 'xla':\n\t\tcase 'xls': if(!o.biff) o.biff = 8; return write_cfb_type(wb, o);\n\t\tcase 'xlsx':\n\t\tcase 'xlsm':\n\t\tcase 'xlam':\n\t\tcase 'xlsb':\n\t\tcase 'numbers':\n\t\tcase 'ods': return write_zip_type(wb, o);\n\t\tdefault: throw new Error (\"Unrecognized bookType |\" + o.bookType + \"|\");\n\t}\n}\n\nfunction resolve_book_type(o/*:WriteFileOpts*/) {\n\tif(o.bookType) return;\n\tvar _BT = {\n\t\t\"xls\": \"biff8\",\n\t\t\"htm\": \"html\",\n\t\t\"slk\": \"sylk\",\n\t\t\"socialcalc\": \"eth\",\n\t\t\"Sh33tJS\": \"WTF\"\n\t};\n\tvar ext = o.file.slice(o.file.lastIndexOf(\".\")).toLowerCase();\n\tif(ext.match(/^\\.[a-z]+$/)) o.bookType = ext.slice(1);\n\to.bookType = _BT[o.bookType] || o.bookType;\n}\n\nfunction writeFileSync(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSync(wb, o);\n}\n\nfunction writeFileSyncXLSX(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSyncXLSX(wb, o);\n}\n\n\nfunction writeFileAsync(filename/*:string*/, wb/*:Workbook*/, opts/*:?WriteFileOpts*/, cb/*:?(e?:ErrnoError)=>void*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\to.type = 'buffer';\n\tvar _cb = cb; if(!(_cb instanceof Function)) _cb = (opts/*:any*/);\n\treturn _fs.writeFile(filename, writeSync(wb, o), _cb);\n}\n/*::\ntype MJRObject = {\n\trow: any;\n\tisempty: boolean;\n};\n*/\nfunction make_json_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array<string>*/, header/*:number*/, hdr/*:Array<any>*/, dense/*:boolean*/, o/*:Sheet2JSONOpts*/)/*:MJRObject*/ {\n\tvar rr = encode_row(R);\n\tvar defval = o.defval, raw = o.raw || !Object.prototype.hasOwnProperty.call(o, \"raw\");\n\tvar isempty = true;\n\tvar row/*:any*/ = (header === 1) ? [] : {};\n\tif(header !== 1) {\n\t\tif(Object.defineProperty) try { Object.defineProperty(row, '__rowNum__', {value:R, enumerable:false}); } catch(e) { row.__rowNum__ = R; }\n\t\telse row.__rowNum__ = R;\n\t}\n\tif(!dense || sheet[R]) for (var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar val = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tif(val === undefined || val.t === undefined) {\n\t\t\tif(defval === undefined) continue;\n\t\t\tif(hdr[C] != null) { row[hdr[C]] = defval; }\n\t\t\tcontinue;\n\t\t}\n\t\tvar v = val.v;\n\t\tswitch(val.t){\n\t\t\tcase 'z': if(v == null) break; continue;\n\t\t\tcase 'e': v = (v == 0 ? null : void 0); break;\n\t\t\tcase 's': case 'd': case 'b': case 'n': break;\n\t\t\tdefault: throw new Error('unrecognized type ' + val.t);\n\t\t}\n\t\tif(hdr[C] != null) {\n\t\t\tif(v == null) {\n\t\t\t\tif(val.t == \"e\" && v === null) row[hdr[C]] = null;\n\t\t\t\telse if(defval !== undefined) row[hdr[C]] = defval;\n\t\t\t\telse if(raw && v === null) row[hdr[C]] = null;\n\t\t\t\telse continue;\n\t\t\t} else {\n\t\t\t\trow[hdr[C]] = raw && (val.t !== \"n\" || (val.t === \"n\" && o.rawNumbers !== false)) ? v : format_cell(val,v,o);\n\t\t\t}\n\t\t\tif(v != null) isempty = false;\n\t\t}\n\t}\n\treturn { row: row, isempty: isempty };\n}\n\n\nfunction sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array<any>*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\telse if(o.header == null) header = 0;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array<string>*/ = [];\n\tvar out/*:Array<any>*/ = [];\n\tvar outi = 0, counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tfor (R = r.s.r + offset; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row.row;\n\t}\n\tout.length = outi;\n\treturn out;\n}\n\nvar qreg = /\"/g;\nfunction make_csv_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array<string>*/, fs/*:number*/, rs/*:number*/, FS/*:string*/, o/*:Sheet2CSVOpts*/)/*:?string*/ {\n\tvar isempty = true;\n\tvar row/*:Array<string>*/ = [], txt = \"\", rr = encode_row(R);\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tif (!cols[C]) continue;\n\t\tvar val = o.dense ? (sheet[R]||[])[C]: sheet[cols[C] + rr];\n\t\tif(val == null) txt = \"\";\n\t\telse if(val.v != null) {\n\t\t\tisempty = false;\n\t\t\ttxt = ''+(o.rawNumbers && val.t == \"n\" ? val.v : format_cell(val, null, o));\n\t\t\tfor(var i = 0, cc = 0; i !== txt.length; ++i) if((cc = txt.charCodeAt(i)) === fs || cc === rs || cc === 34 || o.forceQuotes) {txt = \"\\\"\" + txt.replace(qreg, '\"\"') + \"\\\"\"; break; }\n\t\t\tif(txt == \"ID\") txt = '\"ID\"';\n\t\t} else if(val.f != null && !val.F) {\n\t\t\tisempty = false;\n\t\t\ttxt = '=' + val.f; if(txt.indexOf(\",\") >= 0) txt = '\"' + txt.replace(qreg, '\"\"') + '\"';\n\t\t} else txt = \"\";\n\t\t/* NOTE: Excel CSV does not support array formulae */\n\t\trow.push(txt);\n\t}\n\tif(o.blankrows === false && isempty) return null;\n\treturn row.join(FS);\n}\n\nfunction sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ {\n\tvar out/*:Array<string>*/ = [];\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) return \"\";\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row = \"\", cols/*:Array<string>*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar w = 0;\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\trow = make_csv_row(sheet, r, R, cols, fs, rs, FS, o);\n\t\tif(row == null) { continue; }\n\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\tif(row || (o.blankrows !== false)) out.push((w++ ? RS : \"\") + row);\n\t}\n\tdelete o.dense;\n\treturn out.join(\"\");\n}\n\nfunction sheet_to_txt(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tif(!opts) opts = {}; opts.FS = \"\\t\"; opts.RS = \"\\n\";\n\tvar s = sheet_to_csv(sheet, opts);\n\tif(typeof $cptable == 'undefined' || opts.type == 'string') return s;\n\tvar o = $cptable.utils.encode(1200, s, 'str');\n\treturn String.fromCharCode(255) + String.fromCharCode(254) + o;\n}\n\nfunction sheet_to_formulae(sheet/*:Worksheet*/)/*:Array<string>*/ {\n\tvar y = \"\", x, val=\"\";\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar r = safe_decode_range(sheet['!ref']), rr = \"\", cols/*:Array<string>*/ = [], C;\n\tvar cmds/*:Array<string>*/ = [];\n\tvar dense = Array.isArray(sheet);\n\tfor(C = r.s.c; C <= r.e.c; ++C) cols[C] = encode_col(C);\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\ty = cols[C] + rr;\n\t\t\tx = dense ? (sheet[R]||[])[C] : sheet[y];\n\t\t\tval = \"\";\n\t\t\tif(x === undefined) continue;\n\t\t\telse if(x.F != null) {\n\t\t\t\ty = x.F;\n\t\t\t\tif(!x.f) continue;\n\t\t\t\tval = x.f;\n\t\t\t\tif(y.indexOf(\":\") == -1) y = y + \":\" + y;\n\t\t\t}\n\t\t\tif(x.f != null) val = x.f;\n\t\t\telse if(x.t == 'z') continue;\n\t\t\telse if(x.t == 'n' && x.v != null) val = \"\" + x.v;\n\t\t\telse if(x.t == 'b') val = x.v ? \"TRUE\" : \"FALSE\";\n\t\t\telse if(x.w !== undefined) val = \"'\" + x.w;\n\t\t\telse if(x.v === undefined) continue;\n\t\t\telse if(x.t == 's') val = \"'\" + x.v;\n\t\t\telse val = \"\"+x.v;\n\t\t\tcmds[cmds.length] = y + \"=\" + val;\n\t\t}\n\t}\n\treturn cmds;\n}\n\nfunction sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tvar offset = +!o.skipHeader;\n\tvar ws/*:Worksheet*/ = _ws || ({}/*:any*/);\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t}\n\tvar cell/*:Cell*/;\n\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:_C, r:_R + js.length - 1 + offset}}/*:any*/);\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) { _R = _range.e.r + 1; range.e.r = _R + js.length - 1 + offset; }\n\t} else {\n\t\tif(_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; }\n\t}\n\tvar hdr/*:Array<string>*/ = o.header || [], C = 0;\n\n\tjs.forEach(function (JS, R/*:number*/) {\n\t\tkeys(JS).forEach(function(k) {\n\t\t\tif((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;\n\t\t\tvar v = JS[k];\n\t\t\tvar t = 'z';\n\t\t\tvar z = \"\";\n\t\t\tvar ref = encode_cell({c:_C + C,r:_R + R + offset});\n\t\t\tcell = ws_get_cell_stub(ws, ref);\n\t\t\tif(v && typeof v === 'object' && !(v instanceof Date)){\n\t\t\t\tws[ref] = v;\n\t\t\t} else {\n\t\t\t\tif(typeof v == 'number') t = 'n';\n\t\t\t\telse if(typeof v == 'boolean') t = 'b';\n\t\t\t\telse if(typeof v == 'string') t = 's';\n\t\t\t\telse if(v instanceof Date) {\n\t\t\t\t\tt = 'd';\n\t\t\t\t\tif(!o.cellDates) { t = 'n'; v = datenum(v); }\n\t\t\t\t\tz = (o.dateNF || table_fmt[14]);\n\t\t\t\t}\n\t\t\t\telse if(v === null && o.nullError) { t = 'e'; v = 0; }\n\t\t\t\tif(!cell) ws[ref] = cell = ({t:t, v:v}/*:any*/);\n\t\t\t\telse {\n\t\t\t\t\tcell.t = t; cell.v = v;\n\t\t\t\t\tdelete cell.w; delete cell.R;\n\t\t\t\t\tif(z) cell.z = z;\n\t\t\t\t}\n\t\t\t\tif(z) cell.z = z;\n\t\t\t}\n\t\t});\n\t});\n\trange.e.c = Math.max(range.e.c, _C + hdr.length - 1);\n\tvar __R = encode_row(_R);\n\tif(offset) for(C = 0; C < hdr.length; ++C) ws[encode_col(C + _C) + __R] = {t:'s', v:hdr[C]};\n\tws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction json_to_sheet(js/*:Array<any>*/, opts)/*:Worksheet*/ { return sheet_add_json(null, js, opts); }\n\n/* get cell, creating a stub if necessary */\nfunction ws_get_cell_stub(ws/*:Worksheet*/, R, C/*:?number*/)/*:Cell*/ {\n\t/* A1 cell address */\n\tif(typeof R == \"string\") {\n\t\t/* dense */\n\t\tif(Array.isArray(ws)) {\n\t\t\tvar RC = decode_cell(R);\n\t\t\tif(!ws[RC.r]) ws[RC.r] = [];\n\t\t\treturn ws[RC.r][RC.c] || (ws[RC.r][RC.c] = {t:'z'});\n\t\t}\n\t\treturn ws[R] || (ws[R] = {t:'z'});\n\t}\n\t/* cell address object */\n\tif(typeof R != \"number\") return ws_get_cell_stub(ws, encode_cell(R));\n\t/* R and C are 0-based indices */\n\treturn ws_get_cell_stub(ws, encode_cell({r:R,c:C||0}));\n}\n\n/* find sheet index for given name / validate index */\nfunction wb_sheet_idx(wb/*:Workbook*/, sh/*:number|string*/) {\n\tif(typeof sh == \"number\") {\n\t\tif(sh >= 0 && wb.SheetNames.length > sh) return sh;\n\t\tthrow new Error(\"Cannot find sheet # \" + sh);\n\t} else if(typeof sh == \"string\") {\n\t\tvar idx = wb.SheetNames.indexOf(sh);\n\t\tif(idx > -1) return idx;\n\t\tthrow new Error(\"Cannot find sheet name |\" + sh + \"|\");\n\t} else throw new Error(\"Cannot find sheet |\" + sh + \"|\");\n}\n\n/* simple blank workbook object */\nfunction book_new()/*:Workbook*/ {\n\treturn { SheetNames: [], Sheets: {} };\n}\n\n/* add a worksheet to the end of a given workbook */\nfunction book_append_sheet(wb/*:Workbook*/, ws/*:Worksheet*/, name/*:?string*/, roll/*:?boolean*/)/*:string*/ {\n\tvar i = 1;\n\tif(!name) for(; i <= 0xFFFF; ++i, name = undefined) if(wb.SheetNames.indexOf(name = \"Sheet\" + i) == -1) break;\n\tif(!name || wb.SheetNames.length >= 0xFFFF) throw new Error(\"Too many worksheets\");\n\tif(roll && wb.SheetNames.indexOf(name) >= 0) {\n\t\tvar m = name.match(/(^.*?)(\\d+)$/);\n\t\ti = m && +m[2] || 0;\n\t\tvar root = m && m[1] || name;\n\t\tfor(++i; i <= 0xFFFF; ++i) if(wb.SheetNames.indexOf(name = root + i) == -1) break;\n\t}\n\tcheck_ws_name(name);\n\tif(wb.SheetNames.indexOf(name) >= 0) throw new Error(\"Worksheet with name |\" + name + \"| already exists!\");\n\n\twb.SheetNames.push(name);\n\twb.Sheets[name] = ws;\n\treturn name;\n}\n\n/* set sheet visibility (visible/hidden/very hidden) */\nfunction book_set_sheet_visibility(wb/*:Workbook*/, sh/*:number|string*/, vis/*:number*/) {\n\tif(!wb.Workbook) wb.Workbook = {};\n\tif(!wb.Workbook.Sheets) wb.Workbook.Sheets = [];\n\n\tvar idx = wb_sheet_idx(wb, sh);\n\t// $FlowIgnore\n\tif(!wb.Workbook.Sheets[idx]) wb.Workbook.Sheets[idx] = {};\n\n\tswitch(vis) {\n\t\tcase 0: case 1: case 2: break;\n\t\tdefault: throw new Error(\"Bad sheet visibility setting \" + vis);\n\t}\n\t// $FlowIgnore\n\twb.Workbook.Sheets[idx].Hidden = vis;\n}\n\n/* set number format */\nfunction cell_set_number_format(cell/*:Cell*/, fmt/*:string|number*/) {\n\tcell.z = fmt;\n\treturn cell;\n}\n\n/* set cell hyperlink */\nfunction cell_set_hyperlink(cell/*:Cell*/, target/*:string*/, tooltip/*:?string*/) {\n\tif(!target) {\n\t\tdelete cell.l;\n\t} else {\n\t\tcell.l = ({ Target: target }/*:Hyperlink*/);\n\t\tif(tooltip) cell.l.Tooltip = tooltip;\n\t}\n\treturn cell;\n}\nfunction cell_set_internal_link(cell/*:Cell*/, range/*:string*/, tooltip/*:?string*/) { return cell_set_hyperlink(cell, \"#\" + range, tooltip); }\n\n/* add to cell comments */\nfunction cell_add_comment(cell/*:Cell*/, text/*:string*/, author/*:?string*/) {\n\tif(!cell.c) cell.c = [];\n\tcell.c.push({t:text, a:author||\"SheetJS\"});\n}\n\n/* set array formula and flush related cells */\nfunction sheet_set_array_formula(ws/*:Worksheet*/, range, formula/*:string*/, dynamic/*:boolean*/) {\n\tvar rng = typeof range != \"string\" ? range : safe_decode_range(range);\n\tvar rngstr = typeof range == \"string\" ? range : encode_range(range);\n\tfor(var R = rng.s.r; R <= rng.e.r; ++R) for(var C = rng.s.c; C <= rng.e.c; ++C) {\n\t\tvar cell = ws_get_cell_stub(ws, R, C);\n\t\tcell.t = 'n';\n\t\tcell.F = rngstr;\n\t\tdelete cell.v;\n\t\tif(R == rng.s.r && C == rng.s.c) {\n\t\t\tcell.f = formula;\n\t\t\tif(dynamic) cell.D = true;\n\t\t}\n\t}\n\treturn ws;\n}\n\nvar utils/*:any*/ = {\n\tencode_col: encode_col,\n\tencode_row: encode_row,\n\tencode_cell: encode_cell,\n\tencode_range: encode_range,\n\tdecode_col: decode_col,\n\tdecode_row: decode_row,\n\tsplit_cell: split_cell,\n\tdecode_cell: decode_cell,\n\tdecode_range: decode_range,\n\tformat_cell: format_cell,\n\tsheet_add_aoa: sheet_add_aoa,\n\tsheet_add_json: sheet_add_json,\n\tsheet_add_dom: sheet_add_dom,\n\taoa_to_sheet: aoa_to_sheet,\n\tjson_to_sheet: json_to_sheet,\n\ttable_to_sheet: parse_dom_table,\n\ttable_to_book: table_to_book,\n\tsheet_to_csv: sheet_to_csv,\n\tsheet_to_txt: sheet_to_txt,\n\tsheet_to_json: sheet_to_json,\n\tsheet_to_html: sheet_to_html,\n\tsheet_to_formulae: sheet_to_formulae,\n\tsheet_to_row_object_array: sheet_to_json,\n\tsheet_get_cell: ws_get_cell_stub,\n\tbook_new: book_new,\n\tbook_append_sheet: book_append_sheet,\n\tbook_set_sheet_visibility: book_set_sheet_visibility,\n\tcell_set_number_format: cell_set_number_format,\n\tcell_set_hyperlink: cell_set_hyperlink,\n\tcell_set_internal_link: cell_set_internal_link,\n\tcell_add_comment: cell_add_comment,\n\tsheet_set_array_formula: sheet_set_array_formula,\n\tconsts: {\n\t\tSHEET_VISIBLE: 0,\n\t\tSHEET_HIDDEN: 1,\n\t\tSHEET_VERY_HIDDEN: 2\n\t}\n};\n\nvar _Readable;\nfunction set_readable(R) { _Readable = R; }\n\nfunction write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable();\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row/*:?string*/ = \"\", cols/*:Array<string>*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array<RowInfo>*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar R = r.s.r;\n\tvar BOM = false, w = 0;\n\tstream._read = function() {\n\t\tif(!BOM) { BOM = true; return stream.push(\"\\uFEFF\"); }\n\t\twhile(R <= r.e.r) {\n\t\t\t++R;\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\trow = make_csv_row(sheet, r, R-1, cols, fs, rs, FS, o);\n\t\t\tif(row != null) {\n\t\t\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\t\t\tif(row || (o.blankrows !== false)) return stream.push((w++ ? RS : \"\") + row);\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nfunction write_html_stream(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*/) {\n\tvar stream = _Readable();\n\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tstream.push(header);\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tstream.push(make_html_preamble(ws, r, o));\n\tvar R = r.s.r;\n\tvar end = false;\n\tstream._read = function() {\n\t\tif(R > r.e.r) {\n\t\t\tif(!end) { end = true; stream.push(\"</table>\" + footer); }\n\t\t\treturn stream.push(null);\n\t\t}\n\t\twhile(R <= r.e.r) {\n\t\t\tstream.push(make_html_row(ws, r, R, o));\n\t\t\t++R;\n\t\t\tbreak;\n\t\t}\n\t};\n\treturn stream;\n}\n\nfunction write_json_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable({objectMode:true});\n\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array<any>*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array<string>*/ = [];\n\tvar counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array<RowInfo>*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tR = r.s.r + offset;\n\tstream._read = function() {\n\t\twhile(R <= r.e.r) {\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\t\t++R;\n\t\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) {\n\t\t\t\tstream.push(row.row);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nvar __stream = {\n\tto_json: write_json_stream,\n\tto_html: write_html_stream,\n\tto_csv: write_csv_stream,\n  set_readable: set_readable\n};\nexport const version = XLSX.version;\nexport {\n\tparse_xlscfb,\n\tparse_zip,\n\treadSync as read,\n\treadFileSync as readFile,\n\treadFileSync,\n\twriteSync as write,\n\twriteFileSync as writeFile,\n\twriteFileSync,\n\twriteFileAsync,\n\twriteSyncXLSX as writeXLSX,\n\twriteFileSyncXLSX as writeFileXLSX,\n\tutils,\n\t__stream as stream,\n\tSSF,\n\tCFB\n};\n","import * as XLSX from 'xlsx'\n\n//Convert XLSX to CSV\nexport async function xlsxToCsv(xlsxFile, options = {}) {\n\n  //NOTE: Tried first to generate a stream using XLSX.stream.to_csv, however,\n  //Papaparse was struggling to consume it. There seems to be an open issue\n  //related to it here https://github.com/mholt/PapaParse/issues/998, which is\n  //present in Papaparse v5.4.1, which is the latest version at the time of\n  //writing this comment. Did not have luck using v5.3.2 either, but could be\n  //that I was doing something wrong. The attempt was to import Readbale from\n  //Node stream, and set that using XLSX.stream.set_readable(Readable), and then\n  //pass it to Papaparse using Papa.parse(papa.NODE_STREAM_INPUT, options) and\n  //piping that into the stream. However, it kept running into an error can't\n  //read property stream from null. I don't think it is possible to import/use\n  //Node streams in the browser. And PapaParse doesn't support ReadableStream\n  //yet, see https://github.com/mholt/PapaParse/issues/550.\n  //So for now sticking to direct conversion to a CSV data blob. This has a\n  //high chance of failing for large XLSX files though, as basically the whole\n  //content is read into browser memory.\n  //References:\n  // https://www.npmjs.com/package/xlsx\n  // https://github.com/mholt/PapaParse/issues/524\n  // https://github.com/mholt/PapaParse/issues/550\n  // https://github.com/mholt/PapaParse/issues/998\n  // https://developer.mozilla.org/en-US/docs/Web/API/Streams_API\n\n  //Load XLSX file and create CSV data\n  const data = await xlsxFile.arrayBuffer()\n  const workbook = XLSX.read(data, options)\n  const sheetname = workbook.SheetNames[0]\n  const worksheet = workbook.Sheets[sheetname]\n  const csv = XLSX.utils.sheet_to_csv(worksheet)\n\n  //Return the CSV\n  return csv\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Learner} from '@/models/learner.model.js'\n\n/**\n * Cohort learners API service\n */\nexport class CohortLearnersApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/cohorts'\n  itemKey = 'learner'\n  itemsKey = 'learners'\n  ModelClass = Learner\n\n  /**\n   * Query\n   */\n  query(cohortId, params, options) {\n    return super.query(params, options, `/${cohortId}/learners`)\n  }\n\n  /**\n   * Add learners to cohort\n   */\n  addLearners(cohortId, learnerIds) {\n    return this\n      .post(`/${cohortId}/learners/add`, {learnerIds})\n  }\n\n  /**\n   * Remove learners from cohort\n   */\n  removeLearners(cohortId, learnerIds) {\n    return this\n      .post(`/${cohortId}/learners/remove`, {learnerIds})\n  }\n\n  /**\n   * Download CSV of learners\n   */\n  downloadCsv(cohortId, params) {\n    this.openUrl(`/${cohortId}/learners/csv`, params)\n  }\n}\n\n//Export singleton instance\nexport const cohortLearnersApi = new CohortLearnersApi()\n","import {cohortLearnersApi} from '@/api/cohort-learners.api.js'\nimport {idOnly} from '@/helpers/object.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Cohort learner addition composable\n */\nexport function useCohortLearnerAddition(cohort) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Status flag\n  const isAddingLearners = ref(false)\n\n  //Add learners to cohort\n  const addLearnersToCohort = async learnerIds => {\n\n    //Must have cohort\n    if (!cohort.value) {\n      throw new Error(`Must have cohort reference`)\n    }\n\n    //No learners to add\n    if (learnerIds.length === 0) {\n      throw new Error(`No learners to add`)\n    }\n\n    //Ensure ID only\n    learnerIds = learnerIds.map(idOnly)\n\n    //Toggle flag\n    isAddingLearners.value = true\n    const s = learnerIds.length > 1 ? 's' : ''\n\n    //Update\n    try {\n      await cohortLearnersApi.addLearners(cohort.value.id, learnerIds)\n      setFlashSuccess(`Learner${s} added to cohort`)\n    }\n    catch (error) {\n      setFlashFailure(`Failed to add learner${s} to cohort`)\n      processError(error)\n      throw error\n    }\n    finally {\n      isAddingLearners.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isAddingLearners,\n    addLearnersToCohort,\n  }\n}\n","import {levenshteinDistance} from '@/helpers/string.js'\nimport {computed} from 'vue'\n\n//Helper to normalize a column to value format\nconst getColumnValue = column => column\n  .toLowerCase()\n  .trim()\n  .replace(/[^a-z0-9]/g, '_')\n  .replace(/_+/g, '_')\n\n//Label regex creator\nconst normalizeLabel = label => label\n  .toLowerCase()\n  .trim()\n  .replace(/[^a-z0-9]/g, '')\n\n/**\n * Suggested field options composable\n */\nexport function useSuggestedFieldOptions(fieldOptions, columns, hasHeader) {\n\n  //Get suggested option\n  const getSuggestedOption = column => {\n\n    //Not using header, don't suggest\n    if (!hasHeader.value) {\n      return null\n    }\n\n    //Find value match, e.g. first_name, last_name, email\n    const value = getColumnValue(column)\n    const valueMatch = fieldOptions.value.find(option => option.value === value)\n    if (valueMatch) {\n      return valueMatch\n    }\n\n    //Find label match, e.g. First name, Last name, Email, Custom field\n    const label = normalizeLabel(column)\n    const labelMatch = fieldOptions.value.find(option => normalizeLabel(option.label) === label)\n    if (labelMatch) {\n      return labelMatch\n    }\n\n    //Find best match\n    const bestMatch = fieldOptions.value.reduce((acc, option) => {\n      const distance = levenshteinDistance(label, normalizeLabel(option.label))\n      if (distance < acc.distance) {\n        return {option, distance}\n      }\n      return acc\n    }, {option: null, distance: Infinity})\n\n    //Found a sensible match?\n    if (bestMatch && bestMatch.distance < label.length / 3) {\n      return bestMatch.option\n    }\n\n    //No match\n    return null\n  }\n\n  //Suggested options map\n  const suggestedOptions = computed(() => columns.value.map(getSuggestedOption))\n\n  //Expose\n  return {\n    suggestedOptions,\n    getSuggestedOption,\n  }\n}\n","import Papa from 'papaparse'\nimport {ref, computed, watch} from 'vue'\n\n/**\n * CSV preview composable\n */\nexport function useCsvPreview(csvData, hasHeader) {\n\n  //Refs for preview\n  const previewer = ref(null)\n  const previewResults = ref(null)\n  const previewError = ref(null)\n  const isLoadingPreview = ref(false)\n\n  //Preview columns and rows\n  const previewData = computed(() => previewResults.value?.data || [])\n  const previewColumns = computed(() => {\n    if (hasHeader.value && previewData.value.length > 0) {\n      return previewData.value[0].map((value, index) => value || `Column ${index + 1}`)\n    }\n    else if (previewData.value.length > 0) {\n      return previewData.value[0].map((value, index) => `Column ${index + 1}`)\n    }\n    return []\n  })\n  const previewRows = computed(() => {\n    if (hasHeader.value && previewData.value.length > 0) {\n      return previewData.value.slice(1)\n    }\n    return previewData.value\n  })\n\n  //Preview CSV file\n  const previewCsvData = async () => {\n\n    //Reset refs\n    previewResults.value = null\n    previewError.value = null\n\n    //No file\n    if (!csvData.value) {\n      return\n    }\n\n    //Invalid data\n    if (typeof csvData.value !== 'string' && !(csvData.value instanceof File)) {\n      throw new Error('Unexpected format for CSV data')\n    }\n\n    //Mark as loading\n    isLoadingPreview.value = true\n\n    //Preview CSV file\n    previewer.value = Papa.parse(csvData.value, {\n      preview: 11, //Extra line for potential header\n      skipEmptyLines: 'greedy',\n      complete: results => {\n        previewResults.value = results\n        isLoadingPreview.value = false\n      },\n      error: error => previewError.value = error,\n    })\n  }\n\n  //Auto preview on changes in CSV data\n  watch(csvData, previewCsvData, {immediate: true})\n\n  /**\n   * Expose interface\n   */\n  return {\n    previewCsvData,\n    previewResults,\n    previewData,\n    previewColumns,\n    previewRows,\n    previewError,\n  }\n}\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CohortAddLearnersInitialStep from '@/components/cohorts/CohortAddLearnersInitialStep.vue'\nimport CohortAddLearnersPreviewStep from '@/components/cohorts/CohortAddLearnersPreviewStep.vue'\nimport CohortAddLearnersMapColumnsStep from '@/components/cohorts/CohortAddLearnersMapColumnsStep.vue'\nimport CohortAddLearnersImportStep from '@/components/cohorts/CohortAddLearnersImportStep.vue'\nimport CreateMetadataFieldModal from '@/components/settings/metadatafields/CreateMetadataFieldModal.vue'\nimport {cohortAddLearnersFlowSteps} from '@/constants/cohorts.js'\nimport {userFieldOptionsForCsv} from '@/constants/user.js'\nimport {fileTypes} from '@/constants/file-types.js'\nimport {Cohort} from '@/models/cohort.model.js'\nimport {setValueAtIndex} from '@/helpers/array.js'\nimport {xlsxToCsv} from '@/helpers/csv.js'\nimport {useCohortLearnerAddition} from '@/composables/use-cohort-learner-addition.js'\nimport {useMetadataFieldOptions} from '@/composables/use-metadata-field-options.js'\nimport {useSuggestedFieldOptions} from '@/composables/use-suggested-field-options.js'\nimport {useLocalStorage} from '@/composables/use-local-storage.js'\nimport {useCsvPreview} from '@/composables/use-csv-preview.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {toRefs, ref, watch, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'confirm',\n])\nconst props = defineProps({\n  cohort: {\n    type: Cohort,\n    required: true,\n  },\n  preloadedCsvFile: {\n    type: File,\n    default: null,\n  },\n})\n\n//Get props\nconst {cohort, preloadedCsvFile} = toRefs(props)\n\n//Mutable refs\nconst csvFile = ref(preloadedCsvFile.value)\nconst learnersToAdd = ref([])\nconst hasHeader = ref(false)\nconst mappedOptions = ref([])\n\n//Ref updaters\nconst setCsvFile = file => csvFile.value = file\nconst setLearnersToAdd = learners => learnersToAdd.value = learners\nconst setHasHeader = header => hasHeader.value = header\nconst setMappedOption = (index, value) => {\n\n  //Clearing value\n  if (!value) {\n    mappedOptions.value = setValueAtIndex(mappedOptions.value, index, null)\n    return\n  }\n\n  //Clear any existing mapping to avoid double mappings\n  const existing = mappedOptions.value.findIndex(option => option?.value === value)\n  if (existing !== -1) {\n    mappedOptions.value = setValueAtIndex(mappedOptions.value, existing, null)\n  }\n\n  //Find option\n  const option = fieldOptions.value.find(option => option.value === value)\n\n  //Update selected options\n  mappedOptions.value = mappedOptions.value.map((current, i) => {\n    if (i === index) {\n      return option\n    }\n    if (current === value) {\n      return null\n    }\n    return current\n  })\n}\n\n//Dynamic steps\nconst dynamicSteps = computed(() => {\n  if (learnersToAdd.value.length) {\n    return [\n      {\n        key: cohortAddLearnersFlowSteps.INITIAL,\n        label: 'Add learners',\n        icon: 'group_add',\n      },\n    ]\n  }\n  return [\n    {\n      key: cohortAddLearnersFlowSteps.INITIAL,\n      label: 'Choose file',\n      icon: 'description',\n    },\n    {\n      key: cohortAddLearnersFlowSteps.PREVIEW,\n      label: 'Preview',\n      icon: 'search',\n    },\n    {\n      key: cohortAddLearnersFlowSteps.MAP_COLUMNS,\n      label: 'Map columns',\n      icon: 'table',\n    },\n    {\n      key: cohortAddLearnersFlowSteps.IMPORT,\n      label: 'Import',\n      icon: 'upload',\n    },\n  ]\n})\n\n//Step management\nconst {\n  steps,\n  activeStep,\n  goToStep,\n  goToFirstStep,\n  goToNextStep,\n  goToPrevStep,\n  isGoingBack,\n} = useSteps(dynamicSteps)\n\n//CSV data\nconst isProcessingCsvFile = ref(false)\nconst csvData = ref(null)\n\n//Watch CSV file for changes\nwatch(csvFile, async () => {\n  if (csvFile.value) {\n\n    //Flag as processing\n    isProcessingCsvFile.value = true\n\n    //Convert Excel file to CSV data\n    if (csvFile.value.type === fileTypes.XLSX) {\n      csvData.value = await xlsxToCsv(csvFile.value)\n    }\n\n    //CSV files can stay as is and will be streamed\n    else {\n      csvData.value = csvFile.value\n    }\n\n    //Go to the second step\n    goToStep(cohortAddLearnersFlowSteps.PREVIEW)\n  }\n}, {immediate: true})\n\n//CSV preview\nconst {\n  previewRows,\n  previewColumns,\n  previewError,\n  isLoadingPreview,\n} = useCsvPreview(csvData, hasHeader)\n\n//Field options\nconst {\n  fieldOptions,\n  addMetadataField,\n} = useMetadataFieldOptions(userFieldOptionsForCsv)\n\n//Suggested options\nconst {\n  suggestedOptions,\n} = useSuggestedFieldOptions(fieldOptions, previewColumns, hasHeader)\n\n//Watch columns for changes\nwatch(previewColumns, () => {\n  mappedOptions.value = previewColumns.value.map(() => null)\n})\n\n//Metadata field creation\nconst {\n  isValue: isShowingMetadataFieldModal,\n  setTrue: showMetadataFieldModal,\n  setFalse: hideMetadataFieldModal,\n} = useValueToggle()\n\n//Handlers\nconst indexForNewMetadataField = ref(null)\nconst createMetadataFieldForIndex = index => {\n  indexForNewMetadataField.value = index\n  showMetadataFieldModal()\n}\nconst cancelMetadataFieldCreation = () => {\n  indexForNewMetadataField.value = null\n  hideMetadataFieldModal()\n}\nconst processMetadataFieldCreation = metadataField => {\n  addMetadataField(metadataField)\n  if (indexForNewMetadataField.value !== null) {\n    setMappedOption(indexForNewMetadataField.value, metadataField.id)\n  }\n  cancelMetadataFieldCreation()\n}\n\n//Learner addition\nconst {\n  isAddingLearners,\n  addLearnersToCohort,\n} = useCohortLearnerAddition(cohort)\n\n//Store mapped options in local storage for a future rainy day\nconst {setInLocalStorage} = useLocalStorage()\n\n//Continue from upload step\nconst continueFromUploadStep = async () => {\n  if (learnersToAdd.value.length > 0) {\n    await addLearnersToCohort(learnersToAdd.value)\n    emit('confirm')\n  }\n  else {\n    goToNextStep()\n  }\n}\n\n//Continue from column mapping step\nconst continueFromColumnMappingStep = () => {\n  setInLocalStorage('csvLearnerMappings', mappedOptions.value.map(option => option?.value))\n  goToNextStep()\n}\n\n//Clear file and start over\nconst clearFileAndStartOver = () => {\n  setCsvFile(null)\n  goToFirstStep()\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    @close=\"$emit('cancel')\"\n  >\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-going-back=\"isGoingBack\"\n      centered-step-indicator\n    >\n      <CohortAddLearnersInitialStep\n        v-if=\"activeStep.key === cohortAddLearnersFlowSteps.INITIAL\"\n        :csv-file=\"csvFile\"\n        :learners=\"learnersToAdd\"\n        :is-busy=\"isAddingLearners || isProcessingCsvFile\"\n        @update-csv-file=\"setCsvFile($event.csvFile)\"\n        @update-learners=\"setLearnersToAdd($event.learners)\"\n        @cancel=\"$emit('cancel')\"\n        @continue=\"continueFromUploadStep()\"\n      />\n      <CohortAddLearnersPreviewStep\n        v-else-if=\"activeStep.key === cohortAddLearnersFlowSteps.PREVIEW\"\n        :has-header=\"hasHeader\"\n        :preview-rows=\"previewRows\"\n        :preview-columns=\"previewColumns\"\n        :preview-error=\"previewError\"\n        :is-loading-preview=\"isLoadingPreview\"\n        @update-csv-file=\"setCsvFile($event.csvFile)\"\n        @update-has-header=\"setHasHeader($event.hasHeader)\"\n        @cancel=\"$emit('cancel')\"\n        @continue=\"goToNextStep()\"\n        @back=\"goToPrevStep()\"\n      />\n      <CohortAddLearnersMapColumnsStep\n        v-else-if=\"activeStep.key === cohortAddLearnersFlowSteps.MAP_COLUMNS\"\n        :rows=\"previewRows\"\n        :columns=\"previewColumns\"\n        :has-header=\"hasHeader\"\n        :field-options=\"fieldOptions\"\n        :mapped-options=\"mappedOptions\"\n        :suggested-options=\"suggestedOptions\"\n        @create-metadata-field=\"createMetadataFieldForIndex($event.index)\"\n        @update-mapped-option=\"setMappedOption($event.index, $event.value)\"\n        @cancel=\"$emit('cancel')\"\n        @continue=\"continueFromColumnMappingStep()\"\n        @back=\"goToPrevStep()\"\n      />\n      <CohortAddLearnersImportStep\n        v-else-if=\"activeStep.key === cohortAddLearnersFlowSteps.IMPORT\"\n        :cohort=\"cohort\"\n        :csv-data=\"csvData\"\n        :has-header=\"hasHeader\"\n        :mapped-options=\"mappedOptions\"\n        @cancel=\"$emit('cancel')\"\n        @confirm=\"$emit('confirm')\"\n        @reset=\"clearFileAndStartOver()\"\n      />\n    </Flow>\n\n    <CreateMetadataFieldModal\n      :is-open=\"isShowingMetadataFieldModal\"\n      @close=\"hideMetadataFieldModal()\"\n      @created=\"processMetadataFieldCreation($event.metadataField)\"\n    />\n  </SidePanel>\n</template>\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport DeliveryMethodsFilter from '@/components/shared/filters/DeliveryMethodsFilter.vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    @clear=\"resetFilter()\"\n  >\n    <DeliveryMethodsFilter\n      :value=\"activeFilter.deliveryMethods\"\n      @input=\"changeFilter('deliveryMethods', $event.value)\"\n    />\n  </FiltersDropdownPanel>\n</template>\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {cohortLearnersApi} from '@/api/cohort-learners.api.js'\n\n/**\n * Cohort learner removal wrapper composable\n */\nexport function useCohortLearnerRemoval(cohort) {\n\n  //Use item removal\n  const {\n    itemsToRemove: learnersToRemove,\n    numItemsToRemove: numLearnersToRemove,\n    hasItemsToRemove: hasLearnersToRemove,\n    isRemovingItems: isRemovingLearners,\n    setItemsToRemove: setLearnersToRemove,\n    clearItemsToRemove: clearLearnersToRemove,\n    removeItems: removeLearnersFromCohort,\n  } = useItemRemoval({\n    noun: 'learner',\n    successMessage: 'Removed %% from cohort',\n    failureMessage: 'Failed to remove %% from cohort',\n    removeManyById: ids => {\n\n      //Must have cohort\n      if (!cohort.value?.id) {\n        throw new Error(`Must have cohort reference with ID`)\n      }\n\n      //Call API\n      return cohortLearnersApi.removeLearners(cohort.value.id, ids)\n    },\n  })\n\n  //Expose interface\n  return {\n    learnersToRemove,\n    numLearnersToRemove,\n    hasLearnersToRemove,\n    isRemovingLearners,\n    setLearnersToRemove,\n    clearLearnersToRemove,\n    removeLearnersFromCohort,\n  }\n}\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport ConfirmCohortLearnerRemovalModal from '@/components/cohorts/ConfirmCohortLearnerRemovalModal.vue'\nimport CohortImportErrorsModal from '@/components/cohorts/modals/CohortImportErrorsModal.vue'\nimport CohortLearnerActionsMenu from '@/components/cohorts/CohortLearnerActionsMenu.vue'\nimport CohortLearnersFilter from '@/components/cohorts/CohortLearnersFilter.vue'\nimport {Cohort} from '@/models/cohort.model.js'\nimport {cohortLearnersApi} from '@/api/cohort-learners.api.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useCohortLearnerRemoval} from '@/composables/use-cohort-learner-removal.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {toRefs, ref, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'add-learners',\n  'remove-learners',\n  'total-learners-changed',\n])\nconst props = defineProps({\n  cohort: {\n    type: Cohort,\n    required: true,\n  },\n})\n\n//Get refs\nconst {cohort} = toRefs(props)\n\n//Querying\nconst {\n  items: learners,\n  total: totalLearners,\n  loadItems: loadLearners,\n  loadItemsForPage: loadLearnersForPage,\n  reloadItems: reloadLearners,\n  isLoadingItems: isLoadingLearners,\n  sort,\n  filter,\n  numActiveFilters,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  clearSearch,\n  changeFilter,\n  resetFilter,\n  getQueryParams,\n} = useQuerying({\n  handler: (...args) => cohortLearnersApi.query(cohort.value.id, ...args),\n  filter: {\n    deliveryMethods: [],\n  },\n  sort: 'displayName',\n  key: 'cohortLearnersOverview',\n})\n\n//Errors modal\nconst {\n  isValue: isUploadErrorsModalOpen,\n  setTrue: showUploadErrorsModal,\n  setFalse: hideUploadErrorsModal,\n} = useValueToggle()\n\n//Item selection\nconst selectedLearners = ref([])\nconst {\n  toggleAllItems: toggleAllLearners,\n  toggleItem: toggleLearner,\n  numSelectedItems: numSelectedLearners,\n  hasSelectedItems: hasSelectedLearners,\n  unselectAllItems: unselectAllLearners,\n} = useItemSelection(learners, selectedLearners)\n\n//Learner removal\nconst {\n  learnersToRemove,\n  hasLearnersToRemove,\n  isRemovingLearners,\n  setLearnersToRemove,\n  clearLearnersToRemove,\n  removeLearnersFromCohort,\n} = useCohortLearnerRemoval(cohort)\n\n//Learner removal handling\nconst cancelLearnerRemoval = () => {\n  clearLearnersToRemove()\n}\nconst confirmLearnerRemoval = async () => {\n  try {\n    await removeLearnersFromCohort()\n    reloadLearners()\n    unselectAllLearners()\n    cancelLearnerRemoval()\n  }\n  catch {\n    //handled by useCohortLearnerRemoval\n  }\n}\n\n//Navigation\nconst {goToViewLearner} = useNavigation()\n\n//Other learner actions\nconst addLearners = () => emit('add-learners')\nconst downloadLearners = () => cohortLearnersApi.downloadCsv(cohort.value.id, getQueryParams())\n\n//Expose public methods\ndefineExpose({\n  reloadLearners: () => {\n    reloadLearners()\n    unselectAllLearners()\n  },\n})\n\n//Update total learners in cohort\nwatch(totalLearners, () => {\n  emit('total-learners-changed', {totalLearners: totalLearners.value})\n})\n\n//Load learners\nloadLearners()\n</script>\n\n<template>\n  <OverviewTableHeader>\n    <template #search>\n      <SearchInput\n        @clear-search=\"clearSearch()\"\n        @search=\"changeSearch($event.searchTerm)\"\n      />\n    </template>\n    <template #filters>\n      <CohortLearnersFilter\n        :active-filter=\"filter\"\n        :num-active-filters=\"numActiveFilters\"\n        @change-filter=\"changeFilter($event.value)\"\n        @reset-filter=\"resetFilter()\"\n      />\n    </template>\n    <template #actions>\n      <Tooltip text=\"Last learners import had errors, click to view\">\n        <Icon\n          v-if=\"cohort.hasImportErrors\"\n          color=\"danger\"\n          icon=\"error\"\n          @click=\"showUploadErrorsModal()\"\n        />\n      </Tooltip>\n      <DownloadButton\n        :is-disabled=\"learners.length === 0\"\n        @click=\"downloadLearners()\"\n      />\n      <ActionButton\n        v-if=\"!cohort.isDynamic\"\n        type=\"primary\"\n        label=\"Add learners\"\n        icon=\"group_add\"\n        @click=\"addLearners()\"\n      />\n    </template>\n  </OverviewTableHeader>\n\n  <OverviewTable\n    :items=\"learners\"\n    :items-per-page=\"itemsPerPage\"\n    :current-page=\"currentPage\"\n    :total-items=\"totalLearners\"\n    :selected-items=\"selectedLearners\"\n    :is-loading=\"isLoadingLearners\"\n    :can-select-items=\"!cohort.isDynamic\"\n    @load-page=\"loadLearnersForPage($event.page)\"\n    @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n    @toggle-item=\"toggleLearner($event.item)\"\n    @toggle-all-items=\"toggleAllLearners()\"\n  >\n    <template #headerRow>\n      <TableHeaderCell\n        :class=\"$style.name\"\n        is-sortable\n        sort-prop=\"displayName\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Name\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.deliveryMethods\">\n        Delivery methods\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.dateAdded\"\n        is-sortable\n        sort-prop=\"dateAdded\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Date added\n      </TableHeaderCell>\n    </template>\n\n    <template #row=\"{item: learner}\">\n      <TableCell\n        :class=\"$style.name\"\n        is-clickable\n        @click=\"goToViewLearner(learner.id, $event)\"\n      >\n        <strong>\n          <UserName :user=\"learner\" />\n        </strong>\n      </TableCell>\n      <TableCell :class=\"$style.deliveryMethods\">\n        <AddressType\n          :type=\"learner.deliveryMethods\"\n          show-other\n          show-unknown\n        />\n      </TableCell>\n      <TableCell :class=\"$style.dateAdded\">\n        <DateTime\n          :date=\"learner.dateAdded\"\n          :format=\"dateFormats.DATE_AND_TIME\"\n        />\n      </TableCell>\n    </template>\n\n    <template #itemActions=\"{item: learner}\">\n      <CohortLearnerActionsMenu\n        :can-remove=\"!cohort.isDynamic\"\n        @manage=\"goToViewLearner(learner.id, $event)\"\n        @remove=\"setLearnersToRemove(learner)\"\n      />\n    </template>\n\n    <template\n      v-if=\"!cohort.isDynamic\"\n      #bulkActions\n    >\n      <BulkActionsBar\n        v-if=\"hasSelectedLearners\"\n        item-type=\"learner\"\n        :num-selected=\"numSelectedLearners\"\n        @clear-selection=\"unselectAllLearners()\"\n      >\n        <BulkAction\n          label=\"Remove\"\n          icon=\"delete\"\n          is-icon-outlined\n          @click=\"setLearnersToRemove(selectedLearners)\"\n        />\n      </BulkActionsBar>\n    </template>\n  </OverviewTable>\n\n  <ConfirmCohortLearnerRemovalModal\n    :cohort=\"cohort\"\n    :learners=\"learnersToRemove\"\n    :is-open=\"hasLearnersToRemove\"\n    :is-removing=\"isRemovingLearners\"\n    @close=\"cancelLearnerRemoval()\"\n    @confirm=\"confirmLearnerRemoval()\"\n  />\n\n  <CohortImportErrorsModal\n    :is-open=\"isUploadErrorsModalOpen\"\n    :cohort=\"cohort\"\n    @close=\"hideUploadErrorsModal()\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 3;\n}\n.deliveryMethods {\n  flex: 2;\n}\n.dateAdded {\n  flex: 1;\n  min-width: 12rem;\n}\n</style>\n","<script setup>\nimport IconCircle from '@/components/shared/icons/IconCircle.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  icon: {\n    type: String,\n    default: 'description',\n  },\n  action: {\n    type: String,\n    required: true,\n  },\n  actor: {\n    type: [String, Object],\n    default: '',\n  },\n  timestamp: {\n    type: [Object, String],\n    default: '',\n  },\n})\n\n//Check if user object provided\nconst {actor} = toRefs(props)\nconst isUser = computed(() => typeof actor.value === 'object')\n</script>\n\n<template>\n  <div :class=\"$style.lineItem\">\n    <div :class=\"$style.icon\">\n      <IconCircle\n        :icon=\"icon\"\n        size=\"m\"\n        type=\"primary\"\n      />\n    </div>\n    <div :class=\"$style.contents\">\n      <div\n        v-if=\"timestamp\"\n        :class=\"$style.timestamp\"\n      >\n        <DateTime\n          :date=\"timestamp\"\n          :format=\"dateFormats.DATE_AND_TIME\"\n        />\n      </div>\n      <div>\n        <slot>\n          <strong>{{ action }}</strong>\n          <span v-if=\"actor\">\n            <span :class=\"$style.by\"> by </span>\n            <strong>\n              <UserName\n                v-if=\"isUser\"\n                :user=\"actor\"\n                show-id-if-nameless\n              />\n              <span v-else>{{ actor }}</span>\n            </strong>\n          </span>\n        </slot>\n      </div>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.lineItem {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  & + & {\n    margin-top: 2rem;\n    &:before {\n      content: '';\n      position: absolute;\n      display: block;\n      left: 21px;\n      top: -30px;\n      height: 27px;\n      width: 2px;\n      background: var(--color-borders);\n    }\n  }\n}\n.contents {\n  display: flex;\n  flex-direction: column;\n}\n.timestamp {\n  color: var(--color-text-muted);\n}\n.by {\n  color: var(--color-text-muted);\n}\n</style>\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport {cohortLogEventOptions} from '@/constants/cohorts.js'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Type\">\n      <PillButtonList\n        :value=\"activeFilter.event\"\n        :options=\"cohortLogEventOptions\"\n        can-reset\n        @input=\"changeFilter('event', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Date range\">\n      <DateInput\n        :value=\"activeFilter.createdAt\"\n        is-range\n        @input=\"changeFilter('createdAt', $event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","import {useDebounceFn, useScroll} from '@vueuse/core'\n\n/**\n * Use infinite scroll composable\n *\n * NOTE: The one from @vueuse/core is not working as expected, as it is throwing\n * an error about `onMounted` being called outside of a component lifecycle,\n * despite this clearly not being the case. So created this simple custom\n * version instead.\n */\nexport function useInfiniteScroll(element, fn, distance = 10) {\n\n  //Create scroll handler\n  const onScroll = useDebounceFn((event) => {\n    const {scrollTop, clientHeight, scrollHeight} = event.target.scrollingElement\n    if (scrollTop + clientHeight + distance >= scrollHeight) {\n      fn()\n    }\n  }, 50)\n\n  //Use scroll handler\n  useScroll(element, {onScroll})\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {cohortLogEventOptions} from '@/constants/cohorts.js'\nimport {getOptionLabel} from '@/helpers/options.js'\n\n/**\n * Cohort log model\n */\nexport class CohortLog extends BaseModel {\n\n  /**\n   * Human readable action based on event enum\n   */\n  get action() {\n    return getOptionLabel(cohortLogEventOptions, this.event)\n  }\n\n  /**\n   * Icon representation based on event enum\n   */\n  get icon() {\n    return getOptionLabel(cohortLogEventOptions, this.event, 'icon')\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {CohortLog} from '@/models/cohort-log.model.js'\n\n/**\n * Cohort logs API service\n */\nexport class CohortLogsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/cohorts'\n  itemKey = 'cohortLog'\n  itemsKey = 'cohortLogs'\n  ModelClass = CohortLog\n\n  /**\n   * Query\n   */\n  query(cohortId, params, options) {\n    return super.query(params, options, `/${cohortId}/logs`)\n  }\n\n  /**\n   * Download CSV of logs\n   */\n  downloadCsv(cohortId, params) {\n    this.openUrl(`/${cohortId}/logs/csv`, params)\n  }\n}\n\n//Export singleton instance\nexport const cohortLogsApi = new CohortLogsApi()\n","<script setup>\nimport ActivityLineItem from '@/components/shared/other/ActivityLineItem.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport CohortLogsFilter from './CohortLogsFilter.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {Cohort} from '@/models/cohort.model.js'\nimport {useInfiniteScroll} from '@/composables/use-infinite-scroll.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {cohortLogsApi} from '@/api/cohort-logs.api.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  cohort: {\n    type: Cohort,\n    required: true,\n  },\n})\n\n//Get cohort\nconst {cohort} = toRefs(props)\n\n//Querying\nconst {\n  items: logs,\n  loadItems: loadLogs,\n  loadMoreItemsThrottled: loadMoreLogs,\n  isLoadingItems: isLoadingLogs,\n  filter,\n  numActiveFilters,\n  changeFilter,\n  resetFilter,\n  changeSearch,\n  clearSearch,\n  getQueryParams,\n} = useQuerying({\n  handler: (...args) => cohortLogsApi.query(cohort.value.id, ...args),\n  filter: {\n    event: null,\n    createdAt: null,\n  },\n  sort: '-createdAt',\n  limit: 100,\n  key: 'cohortLogs',\n})\n\n//Infinite scroll\nuseInfiniteScroll(window, loadMoreLogs)\n\n//Log actions\nconst downloadLogs = () => cohortLogsApi.downloadCsv(cohort.value.id, getQueryParams())\n\n//Load logs\nloadLogs()\n</script>\n\n<template>\n  <div>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          @clear-search=\"clearSearch()\"\n          @search=\"changeSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #filters>\n        <CohortLogsFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"resetFilter()\"\n        />\n      </template>\n      <template #actions>\n        <DownloadButton\n          :is-disabled=\"logs.length === 0\"\n          @click=\"downloadLogs()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <Spinner\n      v-if=\"isLoadingLogs\"\n      is-block\n    />\n\n    <ActivityLineItem\n      v-for=\"log in logs\"\n      :key=\"log.id\"\n      :icon=\"log.icon\"\n      :action=\"log.action\"\n      :actor=\"log.user || log.integration || 'System'\"\n      :timestamp=\"log.createdAt\"\n    />\n  </div>\n</template>\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport TimezoneSelectInput from '@/components/shared/form/TimezoneSelectInput.vue'\nimport {useCohortValidation} from '@/composables/use-cohort-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  cohort: {\n    type: Object,\n    default: null,\n  },\n  isBusy: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {model, cohort} = toRefs(props)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Validation\nconst {uniqueName, isCheckingCohortExists} = useCohortValidation(cohort)\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Name'),\n    uniqueName,\n  },\n}, model, {$autoDirty: true})\n\n//Save\nconst confirm = () => {\n  if (!$v.value.$invalid && !$v.value.$pending) {\n    emit('confirm', model.value)\n  }\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Cohort\"\n        icon=\"edit\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n\n    <PageBlock header=\"Edit cohort details\">\n      <FormField\n        label=\"Name\"\n        :errors=\"$v.name.$errors\"\n      >\n        <TextInput\n          :value=\"model.name\"\n          placeholder=\"Enter cohort name\"\n          :has-error=\"$v.name.$error && !$v.name.$pending\"\n          :has-spinner=\"isCheckingCohortExists\"\n          test-id=\"cohortNameInput\"\n          required\n          @input=\"updateModel({name: $event.value})\"\n        />\n      </FormField>\n      <FormField\n        label=\"Preferred timezone\"\n        is-optional\n      >\n        <TimezoneSelectInput\n          position=\"top\"\n          test-id=\"cohortTimezoneInput\"\n          :value=\"model.preferredTimezone\"\n          @input=\"updateModel({preferredTimezone: $event.value})\"\n          @dirty=\"$v.$touch()\"\n        />\n      </FormField>\n    </PageBlock>\n    <CancelConfirmBar\n      :is-disabled-confirm=\"isBusy || $v.$invalid || $v.name.$pending || !$v.$dirty\"\n      :has-spinner-confirm=\"isBusy\"\n      label-confirm=\"Save\"\n      @cancel=\"$emit('close')\"\n      @confirm=\"confirm()\"\n    />\n  </SidePanel>\n</template>\n","import {cohortsApi} from '@/api/cohorts.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, unref, watch} from 'vue'\n\n/**\n * Cohort editing composable\n */\nexport function useCohortEditing(cohort, model) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Store relevant model keys\n  const keys = model.value ? Object.keys(model.value) : []\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Cohort update\n  const isUpdatingCohort = ref(false)\n  const updateCohort = async (model) => {\n\n    //Unref model\n    model = unref(model)\n\n    //Must have cohort\n    if (!cohort.value) {\n      throw new Error(`Must have cohort reference`)\n    }\n\n    //Must have data to update with\n    if (Object.keys(model).length === 0) {\n      throw new Error(`No model data to update cohort with`)\n    }\n\n    //Toggle flag\n    isUpdatingCohort.value = true\n\n    //Extract data for update\n    const {id} = cohort.value\n    const data = {...model}\n\n    //Update\n    try {\n      const updated = await cohortsApi.updateById(id, data)\n      cohort.value = updated\n      setFlashSuccess('Cohort updated')\n    }\n    catch (error) {\n      setFlashFailure('Failed to update cohort')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingCohort.value = false\n    }\n  }\n\n  //Watch cohort for changes and update initial model values accordingly\n  watch(cohort, () => {\n    if (cohort.value && model.value) {\n      keys.forEach(key => model.value[key] = cohort.value[key])\n    }\n  }, {immediate: true})\n\n  //Expose interface\n  return {\n    updateModel,\n    updateCohort,\n    isUpdatingCohort,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport Timezone from '@/components/shared/transform/Timezone.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport CohortEditRulesPanel from '@/components/cohorts/CohortEditRulesPanel.vue'\nimport CohortAddLearnersPanel from '@/components/cohorts/CohortAddLearnersPanel.vue'\nimport CohortLearnersOverview from '@/components/cohorts/CohortLearnersOverview.vue'\nimport CohortLogsOverview from '@/components/cohorts/CohortLogsOverview.vue'\nimport CohortIcon from '@/components/cohorts/CohortIcon.vue'\nimport CohortEditDetailsPanel from '@/components/cohorts/CohortEditDetailsPanel.vue'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useCohortEditing} from '@/composables/use-cohort-editing.js'\nimport {useCohortCsvFile} from '@/composables/use-cohort-csv-file.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {ref, watch, onMounted} from 'vue'\n\n//Get route and router\nconst {route, router} = useRouting()\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Cohorts')\n\n//Cohort refs\nconst cohort = ref(null)\nconst isLoading = ref(true)\n\n//Component refs\nconst learnersOverview = ref(null)\nconst reloadLearners = () => learnersOverview.value?.reloadLearners()\n\n//Cohort loader\nconst loadCohort = () => cohortsApi\n  .findById(route.params.id)\n  .then(item => cohort.value = item)\n  .catch(() => router.replace({name: 'cohorts-overview'}))\n  .finally(() => isLoading.value = false)\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {label: 'Learners', key: 'learners'},\n  {label: 'Activity', key: 'logs'},\n])\n\n//Edit states management\nconst {\n  isValue: isShowingEditCohort,\n  setTrue: showEditCohort,\n  setFalse: hideEditCohort,\n} = useValueToggle()\nconst {\n  isValue: isShowingEditRules,\n  setTrue: editRules,\n  setFalse: cancelEditRules,\n} = useValueToggle()\nconst {\n  isValue: isShowingAddLearnersPanel,\n  setTrue: showAddLearnersPanel,\n  setFalse: hideAddLearnersPanel,\n} = useValueToggle()\n\n//Get refs\nconst model = ref({name: '', preferredTimezone: null})\n\n//Editing\nconst {\n  updateModel,\n  updateCohort,\n  isUpdatingCohort,\n} = useCohortEditing(cohort, model)\n\n//Confirm edit cohort\nconst confirmEditCohort = async (data, options) => {\n  try {\n    await updateCohort(data, options)\n    hideEditCohort()\n    cancelEditRules()\n    if (cohort.value.isDynamic && data.rulesets) {\n      setTimeout(() => {\n        reloadLearners()\n      }, 500)\n    }\n  }\n  catch {\n    //handled by useCohortEditing\n  }\n}\n\n//CSV file management\nconst {csvFile, clearCsvFile} = useCohortCsvFile(cohort)\n\n//Learner addition handling\nconst cancelLearnerAddition = () => {\n  hideAddLearnersPanel()\n  clearCsvFile()\n}\nconst confirmLearnerAddition = () => {\n  cancelLearnerAddition()\n  reloadLearners()\n  loadCohort()\n}\n\n//Navigation\nconst {goToSchedulesOverviewForCohort} = useNavigation()\n\n//Check if we have a CSV file in memory from the cohort create flow\nwatch(csvFile, () => {\n  if (csvFile.value) {\n    showAddLearnersPanel()\n  }\n})\n\n//Load cohort on mount\nonMounted(loadCohort)\n</script>\n\n<template>\n  <PageWrapper>\n    <PageBlock v-if=\"cohort\">\n      <template #header>\n        <PageBlockHeader :header=\"cohort.name\">\n          <template\n            v-if=\"cohort.numLearners > 0\"\n            #subheaderText\n          >\n            This cohort contains\n            <Inflect\n              text=\"learner\"\n              :count=\"cohort.numLearners\"\n              include-count\n            />\n          </template>\n          <template\n            v-else\n            #subheaderText\n          >\n            This cohort does not contain any learners yet\n          </template>\n          <template #headerIcons>\n            <CohortIcon :cohort=\"cohort\" />\n          </template>\n\n          <template #aside>\n            <ActionButton\n              label=\"Edit\"\n              type=\"secondary\"\n              is-slim\n              @click=\"showEditCohort()\"\n            />\n            <ActionButton\n              v-if=\"cohort.isDynamic\"\n              label=\"Rules\"\n              type=\"secondary\"\n              :count=\"cohort.numRules\"\n              is-slim\n              @click=\"editRules()\"\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <InfoCardsGrid cols=\"4\">\n        <InfoCard\n          label=\"Status\"\n          :value=\"cohort.isActive ? 'Active' : 'Inactive'\"\n          :status=\"cohort.status\"\n        />\n        <InfoCard\n          label=\"Preferred timezone\"\n          :is-muted=\"!cohort.preferredTimezone\"\n          is-compact\n        >\n          <Timezone\n            :timezone=\"cohort.preferredTimezone\"\n            empty-label=\"Not selected\"\n          />\n        </InfoCard>\n        <InfoCard\n          label=\"# of schedules\"\n          :value=\"cohort.numSchedules\"\n        >\n          <template #aside>\n            <ActionButton\n              v-if=\"cohort.numSchedules > 0\"\n              type=\"link\"\n              label=\"View schedules\"\n              @click=\"goToSchedulesOverviewForCohort(cohort.id, $event)\"\n            />\n          </template>\n        </InfoCard>\n        <InfoCard\n          label=\"# of learners\"\n          :value=\"cohort.numLearners\"\n        />\n      </InfoCardsGrid>\n    </PageBlock>\n\n    <PageBlock v-if=\"cohort\">\n      <TabNavigation\n        :tabs=\"tabs\"\n        :active-tab=\"activeTab\"\n        @change-tab=\"setActiveTab($event.tab)\"\n      />\n\n      <CohortLearnersOverview\n        v-if=\"activeTab.key === 'learners'\"\n        ref=\"learnersOverview\"\n        :cohort=\"cohort\"\n        @add-learners=\"showAddLearnersPanel()\"\n        @total-learners-changed=\"cohort.numLearners = $event.totalLearners\"\n      />\n\n      <CohortLogsOverview\n        v-else-if=\"activeTab.key === 'logs'\"\n        :cohort=\"cohort\"\n      />\n    </PageBlock>\n\n    <template #sidePanels>\n      <CohortEditRulesPanel\n        v-if=\"isShowingEditRules\"\n        :cohort=\"cohort\"\n        :is-updating=\"isUpdatingCohort\"\n        @cancel=\"cancelEditRules()\"\n        @confirm=\"confirmEditCohort($event)\"\n      />\n\n      <CohortAddLearnersPanel\n        v-if=\"isShowingAddLearnersPanel\"\n        :cohort=\"cohort\"\n        :preloaded-csv-file=\"csvFile\"\n        @cancel=\"cancelLearnerAddition()\"\n        @confirm=\"confirmLearnerAddition()\"\n      />\n      <CohortEditDetailsPanel\n        v-if=\"isShowingEditCohort\"\n        :model=\"model\"\n        :cohort=\"cohort\"\n        :is-busy=\"isUpdatingCohort\"\n        @update=\"updateModel($event.data)\"\n        @confirm=\"confirmEditCohort($event)\"\n        @close=\"hideEditCohort()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Tag model\n */\nexport class Tag extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'sell'\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Tag} from '@/models/tag.model.js'\n\n/**\n * Global tags API service\n */\nexport class GlobalTagsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/global_tags'\n  itemKey = 'tag'\n  itemsKey = 'tags'\n  ModelClass = Tag\n}\n\n//Export singleton instance\nexport const globalTagsApi = new GlobalTagsApi()\n","import {globalTagsApi} from '@/api/global-tags.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDataStore} from '@/store/data.store.js'\nimport {storeToRefs} from 'pinia'\nimport {ref} from 'vue'\n\n/**\n * Global tags composable\n */\nexport function useGlobalTags() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get store\n  const store = useDataStore()\n  const {globalTags} = storeToRefs(store)\n  const {setGlobalTags} = store\n\n  //Loading flag\n  const isLoadingGlobalTags = ref(false)\n\n  //Load global tags\n  const loadGlobalTags = async force => {\n\n    //Already loaded, we don't need to load again unless forcing to reload\n    if (globalTags.value.length > 0 && !force) {\n      return\n    }\n\n    //Already loading\n    if (isLoadingGlobalTags.value) {\n      return\n    }\n\n    //Load tags\n    try {\n      isLoadingGlobalTags.value = true\n      const data = await globalTagsApi.query()\n      setGlobalTags(data.tags)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingGlobalTags.value = false\n    }\n  }\n\n  //Clear tags\n  const clearGlobalTags = () => setGlobalTags([])\n\n  //Expose interface\n  return {\n    globalTags,\n    isLoadingGlobalTags,\n    loadGlobalTags,\n    clearGlobalTags,\n  }\n}\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {useGlobalTags} from '@/composables/use-global-tags.js'\nimport {toRefs, computed, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\nconst props = defineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n  organizationTags: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Get refs\nconst {activeFilter, organizationTags} = toRefs(props)\n\n//Load global tags\n//NOTE: We can't load organization tags here as those requests will 401 when\n//the user is unauthenticated, so we append those to the distributions metadata\n//and feed them into this component instead\nconst {globalTags, loadGlobalTags} = useGlobalTags()\n\n//Selected global and org tags\nconst selectedGlobalTags = computed(() => activeFilter.value.selectedTags\n  .filter(id => globalTags.value.some(globalTag => globalTag.id === id))\n)\nconst selectedOrgTags = computed(() => activeFilter.value.selectedTags\n  .filter(id => organizationTags.value.some(orgTag => orgTag.id === id))\n)\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n\n//Helpers to toggle tags\nconst updateGlobalTags = globalTagValues => {\n  changeFilter('selectedTags', [...selectedOrgTags.value, ...globalTagValues])\n}\nconst updateOrgTags = orgTagValues => {\n  changeFilter('selectedTags', [...selectedGlobalTags.value, ...orgTagValues])\n}\n\n//Load tags\nonMounted(loadGlobalTags)\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    test-id=\"courseCatalogFiltersDropdown\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField\n      v-if=\"globalTags.length > 0\"\n      label=\"Topics\"\n    >\n      <PillButtonList\n        :value=\"selectedGlobalTags\"\n        :options=\"globalTags\"\n        value-prop=\"id\"\n        is-multi-select\n        @input=\"updateGlobalTags($event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"organizationTags.length > 0\"\n      label=\"Tags\"\n    >\n      <PillButtonList\n        :value=\"selectedOrgTags\"\n        :options=\"organizationTags\"\n        value-prop=\"id\"\n        is-multi-select\n        @input=\"updateOrgTags($event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */\n\nconst {\n  entries,\n  setPrototypeOf,\n  isFrozen,\n  getPrototypeOf,\n  getOwnPropertyDescriptor\n} = Object;\nlet {\n  freeze,\n  seal,\n  create\n} = Object; // eslint-disable-line import/no-mutable-exports\nlet {\n  apply,\n  construct\n} = typeof Reflect !== 'undefined' && Reflect;\nif (!freeze) {\n  freeze = function freeze(x) {\n    return x;\n  };\n}\nif (!seal) {\n  seal = function seal(x) {\n    return x;\n  };\n}\nif (!apply) {\n  apply = function apply(fun, thisValue, args) {\n    return fun.apply(thisValue, args);\n  };\n}\nif (!construct) {\n  construct = function construct(Func, args) {\n    return new Func(...args);\n  };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n  return function (thisArg) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n    return apply(func, thisArg, args);\n  };\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(func) {\n  return function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n    return construct(func, args);\n  };\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\nfunction addToSet(set, array) {\n  let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n  if (setPrototypeOf) {\n    // Make 'in' and truthy checks like Boolean(set.constructor)\n    // independent of any properties defined on Object.prototype.\n    // Prevent prototype setters from intercepting set as a this value.\n    setPrototypeOf(set, null);\n  }\n  let l = array.length;\n  while (l--) {\n    let element = array[l];\n    if (typeof element === 'string') {\n      const lcElement = transformCaseFunc(element);\n      if (lcElement !== element) {\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\n        if (!isFrozen(array)) {\n          array[l] = lcElement;\n        }\n        element = lcElement;\n      }\n    }\n    set[element] = true;\n  }\n  return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\nfunction cleanArray(array) {\n  for (let index = 0; index < array.length; index++) {\n    const isPropertyExist = objectHasOwnProperty(array, index);\n    if (!isPropertyExist) {\n      array[index] = null;\n    }\n  }\n  return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\nfunction clone(object) {\n  const newObject = create(null);\n  for (const [property, value] of entries(object)) {\n    const isPropertyExist = objectHasOwnProperty(object, property);\n    if (isPropertyExist) {\n      if (Array.isArray(value)) {\n        newObject[property] = cleanArray(value);\n      } else if (value && typeof value === 'object' && value.constructor === Object) {\n        newObject[property] = clone(value);\n      } else {\n        newObject[property] = value;\n      }\n    }\n  }\n  return newObject;\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n  while (object !== null) {\n    const desc = getOwnPropertyDescriptor(object, prop);\n    if (desc) {\n      if (desc.get) {\n        return unapply(desc.get);\n      }\n      if (typeof desc.value === 'function') {\n        return unapply(desc.value);\n      }\n    }\n    object = getPrototypeOf(object);\n  }\n  function fallbackValue() {\n    return null;\n  }\n  return fallbackValue;\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n// SVG\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n// eslint-disable-next-line unicorn/better-regex\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  MUSTACHE_EXPR: MUSTACHE_EXPR,\n  ERB_EXPR: ERB_EXPR,\n  TMPLIT_EXPR: TMPLIT_EXPR,\n  DATA_ATTR: DATA_ATTR,\n  ARIA_ATTR: ARIA_ATTR,\n  IS_ALLOWED_URI: IS_ALLOWED_URI,\n  IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n  ATTR_WHITESPACE: ATTR_WHITESPACE,\n  DOCTYPE_NAME: DOCTYPE_NAME,\n  CUSTOM_ELEMENT: CUSTOM_ELEMENT\n});\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n  element: 1,\n  attribute: 2,\n  text: 3,\n  cdataSection: 4,\n  entityReference: 5,\n  // Deprecated\n  entityNode: 6,\n  // Deprecated\n  progressingInstruction: 7,\n  comment: 8,\n  document: 9,\n  documentType: 10,\n  documentFragment: 11,\n  notation: 12 // Deprecated\n};\nconst getGlobal = function getGlobal() {\n  return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n  if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n    return null;\n  }\n\n  // Allow the callers to control the unique policy name\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n  // Policy creation with duplicate names throws in Trusted Types.\n  let suffix = null;\n  const ATTR_NAME = 'data-tt-policy-suffix';\n  if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n    suffix = purifyHostElement.getAttribute(ATTR_NAME);\n  }\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n  try {\n    return trustedTypes.createPolicy(policyName, {\n      createHTML(html) {\n        return html;\n      },\n      createScriptURL(scriptUrl) {\n        return scriptUrl;\n      }\n    });\n  } catch (_) {\n    // Policy creation failed (most likely another DOMPurify script has\n    // already run). Skip creating the policy, as this will only cause errors\n    // if TT are enforced.\n    console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n    return null;\n  }\n};\nfunction createDOMPurify() {\n  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n  const DOMPurify = root => createDOMPurify(root);\n\n  /**\n   * Version label, exposed for easier checks\n   * if DOMPurify is up to date or not\n   */\n  DOMPurify.version = '3.1.7';\n\n  /**\n   * Array of elements that DOMPurify removed during sanitation.\n   * Empty if nothing was removed.\n   */\n  DOMPurify.removed = [];\n  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\n    // Not running in a browser, provide a factory function\n    // so that you can pass your own Window\n    DOMPurify.isSupported = false;\n    return DOMPurify;\n  }\n  let {\n    document\n  } = window;\n  const originalDocument = document;\n  const currentScript = originalDocument.currentScript;\n  const {\n    DocumentFragment,\n    HTMLTemplateElement,\n    Node,\n    Element,\n    NodeFilter,\n    NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n    HTMLFormElement,\n    DOMParser,\n    trustedTypes\n  } = window;\n  const ElementPrototype = Element.prototype;\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n  const remove = lookupGetter(ElementPrototype, 'remove');\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n  // As per issue #47, the web-components registry is inherited by a\n  // new document created via createHTMLDocument. As per the spec\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n  // a new empty registry is used when creating a template contents owner\n  // document, so we use that as our parent document to ensure nothing\n  // is inherited.\n  if (typeof HTMLTemplateElement === 'function') {\n    const template = document.createElement('template');\n    if (template.content && template.content.ownerDocument) {\n      document = template.content.ownerDocument;\n    }\n  }\n  let trustedTypesPolicy;\n  let emptyHTML = '';\n  const {\n    implementation,\n    createNodeIterator,\n    createDocumentFragment,\n    getElementsByTagName\n  } = document;\n  const {\n    importNode\n  } = originalDocument;\n  let hooks = {};\n\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n  const {\n    MUSTACHE_EXPR,\n    ERB_EXPR,\n    TMPLIT_EXPR,\n    DATA_ATTR,\n    ARIA_ATTR,\n    IS_SCRIPT_OR_DATA,\n    ATTR_WHITESPACE,\n    CUSTOM_ELEMENT\n  } = EXPRESSIONS;\n  let {\n    IS_ALLOWED_URI: IS_ALLOWED_URI$1\n  } = EXPRESSIONS;\n\n  /**\n   * We consider the elements and attributes below to be safe. Ideally\n   * don't add any new ones but feel free to remove unwanted ones.\n   */\n\n  /* allowed element names */\n  let ALLOWED_TAGS = null;\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n  /* Allowed attribute names */\n  let ALLOWED_ATTR = null;\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n  /*\n   * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n   * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n   * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n   * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n   */\n  let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n    tagNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    attributeNameCheck: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: null\n    },\n    allowCustomizedBuiltInElements: {\n      writable: true,\n      configurable: false,\n      enumerable: true,\n      value: false\n    }\n  }));\n\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n  let FORBID_TAGS = null;\n\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n  let FORBID_ATTR = null;\n\n  /* Decide if ARIA attributes are okay */\n  let ALLOW_ARIA_ATTR = true;\n\n  /* Decide if custom data attributes are okay */\n  let ALLOW_DATA_ATTR = true;\n\n  /* Decide if unknown protocols are okay */\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n  /* Decide if self-closing tags in attributes are allowed.\n   * Usually removed due to a mXSS issue in jQuery 3.0 */\n  let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n  /* Output should be safe for common template engines.\n   * This means, DOMPurify removes data attributes, mustaches and ERB\n   */\n  let SAFE_FOR_TEMPLATES = false;\n\n  /* Output should be safe even for XML used within HTML and alike.\n   * This means, DOMPurify removes comments when containing risky content.\n   */\n  let SAFE_FOR_XML = true;\n\n  /* Decide if document with <html>... should be returned */\n  let WHOLE_DOCUMENT = false;\n\n  /* Track whether config is already set on this instance of DOMPurify. */\n  let SET_CONFIG = false;\n\n  /* Decide if all elements (e.g. style, script) must be children of\n   * document.body. By default, browsers might move them to document.head */\n  let FORCE_BODY = false;\n\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n   * string (or a TrustedHTML object if Trusted Types are supported).\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n   */\n  let RETURN_DOM = false;\n\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\n  let RETURN_DOM_FRAGMENT = false;\n\n  /* Try to return a Trusted Type object instead of a string, return a string in\n   * case Trusted Types are not supported  */\n  let RETURN_TRUSTED_TYPE = false;\n\n  /* Output should be free from DOM clobbering attacks?\n   * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n   */\n  let SANITIZE_DOM = true;\n\n  /* Achieve full DOM Clobbering protection by isolating the namespace of named\n   * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n   *\n   * HTML/DOM spec rules that enable DOM Clobbering:\n   *   - Named Access on Window (§7.3.3)\n   *   - DOM Tree Accessors (§3.1.5)\n   *   - Form Element Parent-Child Relations (§4.10.3)\n   *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n   *   - HTMLCollection (§4.2.10.2)\n   *\n   * Namespace isolation is implemented by prefixing `id` and `name` attributes\n   * with a constant string, i.e., `user-content-`\n   */\n  let SANITIZE_NAMED_PROPS = false;\n  const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n  /* Keep element content when removing element? */\n  let KEEP_CONTENT = true;\n\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n   * of importing it into a new Document and returning a sanitized copy */\n  let IN_PLACE = false;\n\n  /* Allow usage of profiles like html, svg and mathMl */\n  let USE_PROFILES = {};\n\n  /* Tags to ignore content of when KEEP_CONTENT is true */\n  let FORBID_CONTENTS = null;\n  const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n  /* Tags that are safe for data: URIs */\n  let DATA_URI_TAGS = null;\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n  /* Attributes safe for values like \"javascript:\" */\n  let URI_SAFE_ATTRIBUTES = null;\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n  /* Document namespace */\n  let NAMESPACE = HTML_NAMESPACE;\n  let IS_EMPTY_INPUT = false;\n\n  /* Allowed XHTML+XML namespaces */\n  let ALLOWED_NAMESPACES = null;\n  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n  /* Parsing of strict XHTML documents */\n  let PARSER_MEDIA_TYPE = null;\n  const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n  const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n  let transformCaseFunc = null;\n\n  /* Keep a reference to config to pass to hooks */\n  let CONFIG = null;\n\n  /* Ideally, do not touch anything below this line */\n  /* ______________________________________________ */\n\n  const formElement = document.createElement('form');\n  const isRegexOrFunction = function isRegexOrFunction(testValue) {\n    return testValue instanceof RegExp || testValue instanceof Function;\n  };\n\n  /**\n   * _parseConfig\n   *\n   * @param  {Object} cfg optional config literal\n   */\n  // eslint-disable-next-line complexity\n  const _parseConfig = function _parseConfig() {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    if (CONFIG && CONFIG === cfg) {\n      return;\n    }\n\n    /* Shield configuration object from tampering */\n    if (!cfg || typeof cfg !== 'object') {\n      cfg = {};\n    }\n\n    /* Shield configuration object from prototype pollution */\n    cfg = clone(cfg);\n    PARSER_MEDIA_TYPE =\n    // eslint-disable-next-line unicorn/prefer-includes\n    SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n    // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n    transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n    /* Set configuration parameters */\n    ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n    ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n    ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n    URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n    // eslint-disable-line indent\n    cfg.ADD_URI_SAFE_ATTR,\n    // eslint-disable-line indent\n    transformCaseFunc // eslint-disable-line indent\n    ) // eslint-disable-line indent\n    : DEFAULT_URI_SAFE_ATTRIBUTES;\n    DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n    // eslint-disable-line indent\n    cfg.ADD_DATA_URI_TAGS,\n    // eslint-disable-line indent\n    transformCaseFunc // eslint-disable-line indent\n    ) // eslint-disable-line indent\n    : DEFAULT_DATA_URI_TAGS;\n    FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n    FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n    FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n    USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n    ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n    SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n    SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\n    IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n    NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n    CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n    if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n    }\n    if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n      CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n    }\n    if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n      CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n    }\n    if (SAFE_FOR_TEMPLATES) {\n      ALLOW_DATA_ATTR = false;\n    }\n    if (RETURN_DOM_FRAGMENT) {\n      RETURN_DOM = true;\n    }\n\n    /* Parse profile info */\n    if (USE_PROFILES) {\n      ALLOWED_TAGS = addToSet({}, text);\n      ALLOWED_ATTR = [];\n      if (USE_PROFILES.html === true) {\n        addToSet(ALLOWED_TAGS, html$1);\n        addToSet(ALLOWED_ATTR, html);\n      }\n      if (USE_PROFILES.svg === true) {\n        addToSet(ALLOWED_TAGS, svg$1);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.svgFilters === true) {\n        addToSet(ALLOWED_TAGS, svgFilters);\n        addToSet(ALLOWED_ATTR, svg);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n      if (USE_PROFILES.mathMl === true) {\n        addToSet(ALLOWED_TAGS, mathMl$1);\n        addToSet(ALLOWED_ATTR, mathMl);\n        addToSet(ALLOWED_ATTR, xml);\n      }\n    }\n\n    /* Merge configuration parameters */\n    if (cfg.ADD_TAGS) {\n      if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n        ALLOWED_TAGS = clone(ALLOWED_TAGS);\n      }\n      addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n    }\n    if (cfg.ADD_ATTR) {\n      if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n        ALLOWED_ATTR = clone(ALLOWED_ATTR);\n      }\n      addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n    }\n    if (cfg.ADD_URI_SAFE_ATTR) {\n      addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n    }\n    if (cfg.FORBID_CONTENTS) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n      addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n    }\n\n    /* Add #text in case KEEP_CONTENT is set to true */\n    if (KEEP_CONTENT) {\n      ALLOWED_TAGS['#text'] = true;\n    }\n\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n    if (WHOLE_DOCUMENT) {\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n    }\n\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n    if (ALLOWED_TAGS.table) {\n      addToSet(ALLOWED_TAGS, ['tbody']);\n      delete FORBID_TAGS.tbody;\n    }\n    if (cfg.TRUSTED_TYPES_POLICY) {\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n      }\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n        throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n      }\n\n      // Overwrite existing TrustedTypes policy.\n      trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n      // Sign local variables required by `sanitize`.\n      emptyHTML = trustedTypesPolicy.createHTML('');\n    } else {\n      // Uninitialized policy, attempt to initialize the internal dompurify policy.\n      if (trustedTypesPolicy === undefined) {\n        trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n      }\n\n      // If creating the internal policy succeeded sign internal variables.\n      if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n        emptyHTML = trustedTypesPolicy.createHTML('');\n      }\n    }\n\n    // Prevent further manipulation of configuration.\n    // Not available in IE8, Safari 5, etc.\n    if (freeze) {\n      freeze(cfg);\n    }\n    CONFIG = cfg;\n  };\n  const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n  const HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n\n  // Certain elements are allowed in both SVG and HTML\n  // namespace. We need to specify them explicitly\n  // so that they don't get erroneously deleted from\n  // HTML namespace.\n  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n  /* Keep track of all possible SVG and MathML tags\n   * so that we can perform the namespace checks\n   * correctly. */\n  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n  /**\n   * @param  {Element} element a DOM element whose namespace is being checked\n   * @returns {boolean} Return false if the element has a\n   *  namespace that a spec-compliant parser would never\n   *  return. Return true otherwise.\n   */\n  const _checkValidNamespace = function _checkValidNamespace(element) {\n    let parent = getParentNode(element);\n\n    // In JSDOM, if we're inside shadow DOM, then parentNode\n    // can be null. We just simulate parent in this case.\n    if (!parent || !parent.tagName) {\n      parent = {\n        namespaceURI: NAMESPACE,\n        tagName: 'template'\n      };\n    }\n    const tagName = stringToLowerCase(element.tagName);\n    const parentTagName = stringToLowerCase(parent.tagName);\n    if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return false;\n    }\n    if (element.namespaceURI === SVG_NAMESPACE) {\n      // The only way to switch from HTML namespace to SVG\n      // is via <svg>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'svg';\n      }\n\n      // The only way to switch from MathML to SVG is via`\n      // svg if parent is either <annotation-xml> or MathML\n      // text integration points.\n      if (parent.namespaceURI === MATHML_NAMESPACE) {\n        return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n      }\n\n      // We only allow elements that are defined in SVG\n      // spec. All others are disallowed in SVG namespace.\n      return Boolean(ALL_SVG_TAGS[tagName]);\n    }\n    if (element.namespaceURI === MATHML_NAMESPACE) {\n      // The only way to switch from HTML namespace to MathML\n      // is via <math>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'math';\n      }\n\n      // The only way to switch from SVG to MathML is via\n      // <math> and HTML integration points\n      if (parent.namespaceURI === SVG_NAMESPACE) {\n        return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n      }\n\n      // We only allow elements that are defined in MathML\n      // spec. All others are disallowed in MathML namespace.\n      return Boolean(ALL_MATHML_TAGS[tagName]);\n    }\n    if (element.namespaceURI === HTML_NAMESPACE) {\n      // The only way to switch from SVG to HTML is via\n      // HTML integration points, and from MathML to HTML\n      // is via MathML text integration points\n      if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n        return false;\n      }\n      if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n        return false;\n      }\n\n      // We disallow tags that are specific for MathML\n      // or SVG and should never appear in HTML namespace\n      return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n    }\n\n    // For XHTML and XML documents that support custom namespaces\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return true;\n    }\n\n    // The code should never reach this place (this means\n    // that the element somehow got namespace that is not\n    // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n    // Return false just in case.\n    return false;\n  };\n\n  /**\n   * _forceRemove\n   *\n   * @param  {Node} node a DOM node\n   */\n  const _forceRemove = function _forceRemove(node) {\n    arrayPush(DOMPurify.removed, {\n      element: node\n    });\n    try {\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\n      getParentNode(node).removeChild(node);\n    } catch (_) {\n      remove(node);\n    }\n  };\n\n  /**\n   * _removeAttribute\n   *\n   * @param  {String} name an Attribute name\n   * @param  {Node} node a DOM node\n   */\n  const _removeAttribute = function _removeAttribute(name, node) {\n    try {\n      arrayPush(DOMPurify.removed, {\n        attribute: node.getAttributeNode(name),\n        from: node\n      });\n    } catch (_) {\n      arrayPush(DOMPurify.removed, {\n        attribute: null,\n        from: node\n      });\n    }\n    node.removeAttribute(name);\n\n    // We void attribute values for unremovable \"is\"\" attributes\n    if (name === 'is' && !ALLOWED_ATTR[name]) {\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n        try {\n          _forceRemove(node);\n        } catch (_) {}\n      } else {\n        try {\n          node.setAttribute(name, '');\n        } catch (_) {}\n      }\n    }\n  };\n\n  /**\n   * _initDocument\n   *\n   * @param  {String} dirty a string of dirty markup\n   * @return {Document} a DOM, filled with the dirty markup\n   */\n  const _initDocument = function _initDocument(dirty) {\n    /* Create a HTML document */\n    let doc = null;\n    let leadingWhitespace = null;\n    if (FORCE_BODY) {\n      dirty = '<remove></remove>' + dirty;\n    } else {\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n      leadingWhitespace = matches && matches[0];\n    }\n    if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n      // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n      dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n    }\n    const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n    /*\n     * Use the DOMParser API by default, fallback later if needs be\n     * DOMParser not work for svg when has multiple root element.\n     */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      try {\n        doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n      } catch (_) {}\n    }\n\n    /* Use createHTMLDocument in case DOMParser is not available */\n    if (!doc || !doc.documentElement) {\n      doc = implementation.createDocument(NAMESPACE, 'template', null);\n      try {\n        doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n      } catch (_) {\n        // Syntax error if dirtyPayload is invalid xml\n      }\n    }\n    const body = doc.body || doc.documentElement;\n    if (dirty && leadingWhitespace) {\n      body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n    }\n\n    /* Work on whole document or just its body */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n    }\n    return WHOLE_DOCUMENT ? doc.documentElement : body;\n  };\n\n  /**\n   * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n   *\n   * @param  {Node} root The root element or node to start traversing on.\n   * @return {NodeIterator} The created NodeIterator\n   */\n  const _createNodeIterator = function _createNodeIterator(root) {\n    return createNodeIterator.call(root.ownerDocument || root, root,\n    // eslint-disable-next-line no-bitwise\n    NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n  };\n\n  /**\n   * _isClobbered\n   *\n   * @param  {Node} elm element to check for clobbering attacks\n   * @return {Boolean} true if clobbered, false if safe\n   */\n  const _isClobbered = function _isClobbered(elm) {\n    return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n  };\n\n  /**\n   * Checks whether the given object is a DOM node.\n   *\n   * @param  {Node} object object to check whether it's a DOM node\n   * @return {Boolean} true is object is a DOM node\n   */\n  const _isNode = function _isNode(object) {\n    return typeof Node === 'function' && object instanceof Node;\n  };\n\n  /**\n   * _executeHook\n   * Execute user configurable hooks\n   *\n   * @param  {String} entryPoint  Name of the hook's entry point\n   * @param  {Node} currentNode node to work on with the hook\n   * @param  {Object} data additional hook parameters\n   */\n  const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n    if (!hooks[entryPoint]) {\n      return;\n    }\n    arrayForEach(hooks[entryPoint], hook => {\n      hook.call(DOMPurify, currentNode, data, CONFIG);\n    });\n  };\n\n  /**\n   * _sanitizeElements\n   *\n   * @protect nodeName\n   * @protect textContent\n   * @protect removeChild\n   *\n   * @param   {Node} currentNode to check for permission to exist\n   * @return  {Boolean} true if node was killed, false if left alive\n   */\n  const _sanitizeElements = function _sanitizeElements(currentNode) {\n    let content = null;\n\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeElements', currentNode, null);\n\n    /* Check if element is clobbered or can clobber */\n    if (_isClobbered(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Now let's check the element's type and name */\n    const tagName = transformCaseFunc(currentNode.nodeName);\n\n    /* Execute a hook if present */\n    _executeHook('uponSanitizeElement', currentNode, {\n      tagName,\n      allowedTags: ALLOWED_TAGS\n    });\n\n    /* Detect mXSS attempts abusing namespace confusion */\n    if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove any occurrence of processing instructions */\n    if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove any kind of possibly harmful comments */\n    if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove element if anything forbids its presence */\n    if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n      /* Check if we have a custom element to handle */\n      if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n          return false;\n        }\n        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n          return false;\n        }\n      }\n\n      /* Keep content except for bad-listed elements */\n      if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n        const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n        const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n        if (childNodes && parentNode) {\n          const childCount = childNodes.length;\n          for (let i = childCount - 1; i >= 0; --i) {\n            const childClone = cloneNode(childNodes[i], true);\n            childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n            parentNode.insertBefore(childClone, getNextSibling(currentNode));\n          }\n        }\n      }\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Check whether element has a valid namespace */\n    if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Make sure that older browsers don't get fallback-tag mXSS */\n    if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Sanitize element content to be template-safe */\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n      /* Get the element's text content */\n      content = currentNode.textContent;\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n        content = stringReplace(content, expr, ' ');\n      });\n      if (currentNode.textContent !== content) {\n        arrayPush(DOMPurify.removed, {\n          element: currentNode.cloneNode()\n        });\n        currentNode.textContent = content;\n      }\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeElements', currentNode, null);\n    return false;\n  };\n\n  /**\n   * _isValidAttribute\n   *\n   * @param  {string} lcTag Lowercase tag name of containing element.\n   * @param  {string} lcName Lowercase attribute name.\n   * @param  {string} value Attribute value.\n   * @return {Boolean} Returns true if `value` is valid, otherwise false.\n   */\n  // eslint-disable-next-line complexity\n  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n    /* Make sure attribute cannot clobber */\n    if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n      return false;\n    }\n\n    /* Allow valid data-* attributes: At least one character after \"-\"\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n        We don't need to check the value; it's always URI safe. */\n    if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n      if (\n      // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n      // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n      // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n      _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n      // Alternative, second condition checks if it's an `is`-attribute, AND\n      // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n      lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n        return false;\n      }\n      /* Check value is safe. First, is attr inert? If so, is safe */\n    } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n      return false;\n    } else ;\n    return true;\n  };\n\n  /**\n   * _isBasicCustomElement\n   * checks if at least one dash is included in tagName, and it's not the first char\n   * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n   *\n   * @param {string} tagName name of the tag of the node to sanitize\n   * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n   */\n  const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n    return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n  };\n\n  /**\n   * _sanitizeAttributes\n   *\n   * @protect attributes\n   * @protect nodeName\n   * @protect removeAttribute\n   * @protect setAttribute\n   *\n   * @param  {Node} currentNode to sanitize\n   */\n  const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeAttributes', currentNode, null);\n    const {\n      attributes\n    } = currentNode;\n\n    /* Check if we have attributes; if not we might have a text node */\n    if (!attributes) {\n      return;\n    }\n    const hookEvent = {\n      attrName: '',\n      attrValue: '',\n      keepAttr: true,\n      allowedAttributes: ALLOWED_ATTR\n    };\n    let l = attributes.length;\n\n    /* Go backwards over all attributes; safely remove bad ones */\n    while (l--) {\n      const attr = attributes[l];\n      const {\n        name,\n        namespaceURI,\n        value: attrValue\n      } = attr;\n      const lcName = transformCaseFunc(name);\n      let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n      /* Execute a hook if present */\n      hookEvent.attrName = lcName;\n      hookEvent.attrValue = value;\n      hookEvent.keepAttr = true;\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n      _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n      value = hookEvent.attrValue;\n\n      /* Did the hooks approve of the attribute? */\n      if (hookEvent.forceKeepAttr) {\n        continue;\n      }\n\n      /* Remove attribute */\n      _removeAttribute(name, currentNode);\n\n      /* Did the hooks approve of the attribute? */\n      if (!hookEvent.keepAttr) {\n        continue;\n      }\n\n      /* Work around a security issue in jQuery 3.0 */\n      if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Sanitize attribute content to be template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n          value = stringReplace(value, expr, ' ');\n        });\n      }\n\n      /* Is `value` valid for this attribute? */\n      const lcTag = transformCaseFunc(currentNode.nodeName);\n      if (!_isValidAttribute(lcTag, lcName, value)) {\n        continue;\n      }\n\n      /* Full DOM Clobbering protection via namespace isolation,\n       * Prefix id and name attributes with `user-content-`\n       */\n      if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n        // Remove the attribute with this value\n        _removeAttribute(name, currentNode);\n\n        // Prefix the value and later re-create the attribute with the sanitized value\n        value = SANITIZE_NAMED_PROPS_PREFIX + value;\n      }\n\n      /* Work around a security issue with comments inside attributes */\n      if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Handle attributes that require Trusted Types */\n      if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n        if (namespaceURI) ; else {\n          switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n            case 'TrustedHTML':\n              {\n                value = trustedTypesPolicy.createHTML(value);\n                break;\n              }\n            case 'TrustedScriptURL':\n              {\n                value = trustedTypesPolicy.createScriptURL(value);\n                break;\n              }\n          }\n        }\n      }\n\n      /* Handle invalid data-* attribute set by try-catching it */\n      try {\n        if (namespaceURI) {\n          currentNode.setAttributeNS(namespaceURI, name, value);\n        } else {\n          /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n          currentNode.setAttribute(name, value);\n        }\n        if (_isClobbered(currentNode)) {\n          _forceRemove(currentNode);\n        } else {\n          arrayPop(DOMPurify.removed);\n        }\n      } catch (_) {}\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeAttributes', currentNode, null);\n  };\n\n  /**\n   * _sanitizeShadowDOM\n   *\n   * @param  {DocumentFragment} fragment to iterate over recursively\n   */\n  const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n    let shadowNode = null;\n    const shadowIterator = _createNodeIterator(fragment);\n\n    /* Execute a hook if present */\n    _executeHook('beforeSanitizeShadowDOM', fragment, null);\n    while (shadowNode = shadowIterator.nextNode()) {\n      /* Execute a hook if present */\n      _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n      /* Sanitize tags and elements */\n      if (_sanitizeElements(shadowNode)) {\n        continue;\n      }\n\n      /* Deep shadow DOM detected */\n      if (shadowNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(shadowNode.content);\n      }\n\n      /* Check attributes, sanitize if necessary */\n      _sanitizeAttributes(shadowNode);\n    }\n\n    /* Execute a hook if present */\n    _executeHook('afterSanitizeShadowDOM', fragment, null);\n  };\n\n  /**\n   * Sanitize\n   * Public method providing core sanitation functionality\n   *\n   * @param {String|Node} dirty string or DOM node\n   * @param {Object} cfg object\n   */\n  // eslint-disable-next-line complexity\n  DOMPurify.sanitize = function (dirty) {\n    let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    let body = null;\n    let importedNode = null;\n    let currentNode = null;\n    let returnNode = null;\n    /* Make sure we have a string to sanitize.\n      DO NOT return early, as this will return the wrong type if\n      the user has requested a DOM object rather than a string */\n    IS_EMPTY_INPUT = !dirty;\n    if (IS_EMPTY_INPUT) {\n      dirty = '<!-->';\n    }\n\n    /* Stringify, in case dirty is an object */\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\n      if (typeof dirty.toString === 'function') {\n        dirty = dirty.toString();\n        if (typeof dirty !== 'string') {\n          throw typeErrorCreate('dirty is not a string, aborting');\n        }\n      } else {\n        throw typeErrorCreate('toString is not a function');\n      }\n    }\n\n    /* Return dirty HTML if DOMPurify cannot run */\n    if (!DOMPurify.isSupported) {\n      return dirty;\n    }\n\n    /* Assign config vars */\n    if (!SET_CONFIG) {\n      _parseConfig(cfg);\n    }\n\n    /* Clean up removed elements */\n    DOMPurify.removed = [];\n\n    /* Check if dirty is correctly typed for IN_PLACE */\n    if (typeof dirty === 'string') {\n      IN_PLACE = false;\n    }\n    if (IN_PLACE) {\n      /* Do some early pre-sanitization to avoid unsafe root nodes */\n      if (dirty.nodeName) {\n        const tagName = transformCaseFunc(dirty.nodeName);\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n          throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n        }\n      }\n    } else if (dirty instanceof Node) {\n      /* If dirty is a DOM element, append to an empty document to avoid\n         elements being stripped by the parser */\n      body = _initDocument('<!---->');\n      importedNode = body.ownerDocument.importNode(dirty, true);\n      if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n        /* Node is already a body, use as is */\n        body = importedNode;\n      } else if (importedNode.nodeName === 'HTML') {\n        body = importedNode;\n      } else {\n        // eslint-disable-next-line unicorn/prefer-dom-node-append\n        body.appendChild(importedNode);\n      }\n    } else {\n      /* Exit directly if we have nothing to do */\n      if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n      // eslint-disable-next-line unicorn/prefer-includes\n      dirty.indexOf('<') === -1) {\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n      }\n\n      /* Initialize the document to work on */\n      body = _initDocument(dirty);\n\n      /* Check we have a DOM node from the data */\n      if (!body) {\n        return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n      }\n    }\n\n    /* Remove first element node (ours) if FORCE_BODY is set */\n    if (body && FORCE_BODY) {\n      _forceRemove(body.firstChild);\n    }\n\n    /* Get node iterator */\n    const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n    /* Now start iterating over the created document */\n    while (currentNode = nodeIterator.nextNode()) {\n      /* Sanitize tags and elements */\n      if (_sanitizeElements(currentNode)) {\n        continue;\n      }\n\n      /* Shadow DOM detected, sanitize it */\n      if (currentNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(currentNode.content);\n      }\n\n      /* Check attributes, sanitize if necessary */\n      _sanitizeAttributes(currentNode);\n    }\n\n    /* If we sanitized `dirty` in-place, return it. */\n    if (IN_PLACE) {\n      return dirty;\n    }\n\n    /* Return sanitized string or DOM */\n    if (RETURN_DOM) {\n      if (RETURN_DOM_FRAGMENT) {\n        returnNode = createDocumentFragment.call(body.ownerDocument);\n        while (body.firstChild) {\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\n          returnNode.appendChild(body.firstChild);\n        }\n      } else {\n        returnNode = body;\n      }\n      if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n        /*\n          AdoptNode() is not used because internal state is not reset\n          (e.g. the past names map of a HTMLFormElement), this is safe\n          in theory but we would rather not risk another attack vector.\n          The state that is cloned by importNode() is explicitly defined\n          by the specs.\n        */\n        returnNode = importNode.call(originalDocument, returnNode, true);\n      }\n      return returnNode;\n    }\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n    /* Serialize doctype if allowed */\n    if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n      serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n    }\n\n    /* Sanitize final string template-safe */\n    if (SAFE_FOR_TEMPLATES) {\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n        serializedHTML = stringReplace(serializedHTML, expr, ' ');\n      });\n    }\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n  };\n\n  /**\n   * Public method to set the configuration once\n   * setConfig\n   *\n   * @param {Object} cfg configuration object\n   */\n  DOMPurify.setConfig = function () {\n    let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    _parseConfig(cfg);\n    SET_CONFIG = true;\n  };\n\n  /**\n   * Public method to remove the configuration\n   * clearConfig\n   *\n   */\n  DOMPurify.clearConfig = function () {\n    CONFIG = null;\n    SET_CONFIG = false;\n  };\n\n  /**\n   * Public method to check if an attribute value is valid.\n   * Uses last set config, if any. Otherwise, uses config defaults.\n   * isValidAttribute\n   *\n   * @param  {String} tag Tag name of containing element.\n   * @param  {String} attr Attribute name.\n   * @param  {String} value Attribute value.\n   * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n   */\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\n    /* Initialize shared config vars if necessary. */\n    if (!CONFIG) {\n      _parseConfig({});\n    }\n    const lcTag = transformCaseFunc(tag);\n    const lcName = transformCaseFunc(attr);\n    return _isValidAttribute(lcTag, lcName, value);\n  };\n\n  /**\n   * AddHook\n   * Public method to add DOMPurify hooks\n   *\n   * @param {String} entryPoint entry point for the hook to add\n   * @param {Function} hookFunction function to execute\n   */\n  DOMPurify.addHook = function (entryPoint, hookFunction) {\n    if (typeof hookFunction !== 'function') {\n      return;\n    }\n    hooks[entryPoint] = hooks[entryPoint] || [];\n    arrayPush(hooks[entryPoint], hookFunction);\n  };\n\n  /**\n   * RemoveHook\n   * Public method to remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if more are present)\n   *\n   * @param {String} entryPoint entry point for the hook to remove\n   * @return {Function} removed(popped) hook\n   */\n  DOMPurify.removeHook = function (entryPoint) {\n    if (hooks[entryPoint]) {\n      return arrayPop(hooks[entryPoint]);\n    }\n  };\n\n  /**\n   * RemoveHooks\n   * Public method to remove all DOMPurify hooks at a given entryPoint\n   *\n   * @param  {String} entryPoint entry point for the hooks to remove\n   */\n  DOMPurify.removeHooks = function (entryPoint) {\n    if (hooks[entryPoint]) {\n      hooks[entryPoint] = [];\n    }\n  };\n\n  /**\n   * RemoveAllHooks\n   * Public method to remove all DOMPurify hooks\n   */\n  DOMPurify.removeAllHooks = function () {\n    hooks = {};\n  };\n  return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n","/**\n * marked v14.1.3 - a markdown parser\n * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n/**\n * Gets the original marked default options.\n */\nfunction _getDefaults() {\n    return {\n        async: false,\n        breaks: false,\n        extensions: null,\n        gfm: true,\n        hooks: null,\n        pedantic: false,\n        renderer: null,\n        silent: false,\n        tokenizer: null,\n        walkTokens: null,\n    };\n}\nlet _defaults = _getDefaults();\nfunction changeDefaults(newDefaults) {\n    _defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;',\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape$1(html, encode) {\n    if (encode) {\n        if (escapeTest.test(html)) {\n            return html.replace(escapeReplace, getEscapeReplacement);\n        }\n    }\n    else {\n        if (escapeTestNoEncode.test(html)) {\n            return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n        }\n    }\n    return html;\n}\nconst caret = /(^|[^\\[])\\^/g;\nfunction edit(regex, opt) {\n    let source = typeof regex === 'string' ? regex : regex.source;\n    opt = opt || '';\n    const obj = {\n        replace: (name, val) => {\n            let valSource = typeof val === 'string' ? val : val.source;\n            valSource = valSource.replace(caret, '$1');\n            source = source.replace(name, valSource);\n            return obj;\n        },\n        getRegex: () => {\n            return new RegExp(source, opt);\n        },\n    };\n    return obj;\n}\nfunction cleanUrl(href) {\n    try {\n        href = encodeURI(href).replace(/%25/g, '%');\n    }\n    catch {\n        return null;\n    }\n    return href;\n}\nconst noopTest = { exec: () => null };\nfunction splitCells(tableRow, count) {\n    // ensure that every cell-delimiting pipe has a space\n    // before it to distinguish it from an escaped pipe\n    const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n        let escaped = false;\n        let curr = offset;\n        while (--curr >= 0 && str[curr] === '\\\\')\n            escaped = !escaped;\n        if (escaped) {\n            // odd number of slashes means | is escaped\n            // so we leave it alone\n            return '|';\n        }\n        else {\n            // add space before unescaped |\n            return ' |';\n        }\n    }), cells = row.split(/ \\|/);\n    let i = 0;\n    // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n    if (!cells[0].trim()) {\n        cells.shift();\n    }\n    if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n        cells.pop();\n    }\n    if (count) {\n        if (cells.length > count) {\n            cells.splice(count);\n        }\n        else {\n            while (cells.length < count)\n                cells.push('');\n        }\n    }\n    for (; i < cells.length; i++) {\n        // leading or trailing whitespace is ignored per the gfm spec\n        cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n    }\n    return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n    const l = str.length;\n    if (l === 0) {\n        return '';\n    }\n    // Length of suffix matching the invert condition.\n    let suffLen = 0;\n    // Step left until we fail to match the invert condition.\n    while (suffLen < l) {\n        const currChar = str.charAt(l - suffLen - 1);\n        if (currChar === c && !invert) {\n            suffLen++;\n        }\n        else if (currChar !== c && invert) {\n            suffLen++;\n        }\n        else {\n            break;\n        }\n    }\n    return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n    if (str.indexOf(b[1]) === -1) {\n        return -1;\n    }\n    let level = 0;\n    for (let i = 0; i < str.length; i++) {\n        if (str[i] === '\\\\') {\n            i++;\n        }\n        else if (str[i] === b[0]) {\n            level++;\n        }\n        else if (str[i] === b[1]) {\n            level--;\n            if (level < 0) {\n                return i;\n            }\n        }\n    }\n    return -1;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n    const href = link.href;\n    const title = link.title ? escape$1(link.title) : null;\n    const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n    if (cap[0].charAt(0) !== '!') {\n        lexer.state.inLink = true;\n        const token = {\n            type: 'link',\n            raw,\n            href,\n            title,\n            text,\n            tokens: lexer.inlineTokens(text),\n        };\n        lexer.state.inLink = false;\n        return token;\n    }\n    return {\n        type: 'image',\n        raw,\n        href,\n        title,\n        text: escape$1(text),\n    };\n}\nfunction indentCodeCompensation(raw, text) {\n    const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n    if (matchIndentToCode === null) {\n        return text;\n    }\n    const indentToCode = matchIndentToCode[1];\n    return text\n        .split('\\n')\n        .map(node => {\n        const matchIndentInNode = node.match(/^\\s+/);\n        if (matchIndentInNode === null) {\n            return node;\n        }\n        const [indentInNode] = matchIndentInNode;\n        if (indentInNode.length >= indentToCode.length) {\n            return node.slice(indentToCode.length);\n        }\n        return node;\n    })\n        .join('\\n');\n}\n/**\n * Tokenizer\n */\nclass _Tokenizer {\n    options;\n    rules; // set by the lexer\n    lexer; // set by the lexer\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    space(src) {\n        const cap = this.rules.block.newline.exec(src);\n        if (cap && cap[0].length > 0) {\n            return {\n                type: 'space',\n                raw: cap[0],\n            };\n        }\n    }\n    code(src) {\n        const cap = this.rules.block.code.exec(src);\n        if (cap) {\n            const text = cap[0].replace(/^(?: {1,4}| {0,3}\\t)/gm, '');\n            return {\n                type: 'code',\n                raw: cap[0],\n                codeBlockStyle: 'indented',\n                text: !this.options.pedantic\n                    ? rtrim(text, '\\n')\n                    : text,\n            };\n        }\n    }\n    fences(src) {\n        const cap = this.rules.block.fences.exec(src);\n        if (cap) {\n            const raw = cap[0];\n            const text = indentCodeCompensation(raw, cap[3] || '');\n            return {\n                type: 'code',\n                raw,\n                lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n                text,\n            };\n        }\n    }\n    heading(src) {\n        const cap = this.rules.block.heading.exec(src);\n        if (cap) {\n            let text = cap[2].trim();\n            // remove trailing #s\n            if (/#$/.test(text)) {\n                const trimmed = rtrim(text, '#');\n                if (this.options.pedantic) {\n                    text = trimmed.trim();\n                }\n                else if (!trimmed || / $/.test(trimmed)) {\n                    // CommonMark requires space before trailing #s\n                    text = trimmed.trim();\n                }\n            }\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[1].length,\n                text,\n                tokens: this.lexer.inline(text),\n            };\n        }\n    }\n    hr(src) {\n        const cap = this.rules.block.hr.exec(src);\n        if (cap) {\n            return {\n                type: 'hr',\n                raw: rtrim(cap[0], '\\n'),\n            };\n        }\n    }\n    blockquote(src) {\n        const cap = this.rules.block.blockquote.exec(src);\n        if (cap) {\n            let lines = rtrim(cap[0], '\\n').split('\\n');\n            let raw = '';\n            let text = '';\n            const tokens = [];\n            while (lines.length > 0) {\n                let inBlockquote = false;\n                const currentLines = [];\n                let i;\n                for (i = 0; i < lines.length; i++) {\n                    // get lines up to a continuation\n                    if (/^ {0,3}>/.test(lines[i])) {\n                        currentLines.push(lines[i]);\n                        inBlockquote = true;\n                    }\n                    else if (!inBlockquote) {\n                        currentLines.push(lines[i]);\n                    }\n                    else {\n                        break;\n                    }\n                }\n                lines = lines.slice(i);\n                const currentRaw = currentLines.join('\\n');\n                const currentText = currentRaw\n                    // precede setext continuation with 4 spaces so it isn't a setext\n                    .replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g, '\\n    $1')\n                    .replace(/^ {0,3}>[ \\t]?/gm, '');\n                raw = raw ? `${raw}\\n${currentRaw}` : currentRaw;\n                text = text ? `${text}\\n${currentText}` : currentText;\n                // parse blockquote lines as top level tokens\n                // merge paragraphs if this is a continuation\n                const top = this.lexer.state.top;\n                this.lexer.state.top = true;\n                this.lexer.blockTokens(currentText, tokens, true);\n                this.lexer.state.top = top;\n                // if there is no continuation then we are done\n                if (lines.length === 0) {\n                    break;\n                }\n                const lastToken = tokens[tokens.length - 1];\n                if (lastToken?.type === 'code') {\n                    // blockquote continuation cannot be preceded by a code block\n                    break;\n                }\n                else if (lastToken?.type === 'blockquote') {\n                    // include continuation in nested blockquote\n                    const oldToken = lastToken;\n                    const newText = oldToken.raw + '\\n' + lines.join('\\n');\n                    const newToken = this.blockquote(newText);\n                    tokens[tokens.length - 1] = newToken;\n                    raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;\n                    text = text.substring(0, text.length - oldToken.text.length) + newToken.text;\n                    break;\n                }\n                else if (lastToken?.type === 'list') {\n                    // include continuation in nested list\n                    const oldToken = lastToken;\n                    const newText = oldToken.raw + '\\n' + lines.join('\\n');\n                    const newToken = this.list(newText);\n                    tokens[tokens.length - 1] = newToken;\n                    raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;\n                    text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;\n                    lines = newText.substring(tokens[tokens.length - 1].raw.length).split('\\n');\n                    continue;\n                }\n            }\n            return {\n                type: 'blockquote',\n                raw,\n                tokens,\n                text,\n            };\n        }\n    }\n    list(src) {\n        let cap = this.rules.block.list.exec(src);\n        if (cap) {\n            let bull = cap[1].trim();\n            const isordered = bull.length > 1;\n            const list = {\n                type: 'list',\n                raw: '',\n                ordered: isordered,\n                start: isordered ? +bull.slice(0, -1) : '',\n                loose: false,\n                items: [],\n            };\n            bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n            if (this.options.pedantic) {\n                bull = isordered ? bull : '[*+-]';\n            }\n            // Get next list item\n            const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n            let endsWithBlankLine = false;\n            // Check if current bullet point can start a new List Item\n            while (src) {\n                let endEarly = false;\n                let raw = '';\n                let itemContents = '';\n                if (!(cap = itemRegex.exec(src))) {\n                    break;\n                }\n                if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n                    break;\n                }\n                raw = cap[0];\n                src = src.substring(raw.length);\n                let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n                let nextLine = src.split('\\n', 1)[0];\n                let blankLine = !line.trim();\n                let indent = 0;\n                if (this.options.pedantic) {\n                    indent = 2;\n                    itemContents = line.trimStart();\n                }\n                else if (blankLine) {\n                    indent = cap[1].length + 1;\n                }\n                else {\n                    indent = cap[2].search(/[^ ]/); // Find first non-space char\n                    indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n                    itemContents = line.slice(indent);\n                    indent += cap[1].length;\n                }\n                if (blankLine && /^[ \\t]*$/.test(nextLine)) { // Items begin with at most one blank line\n                    raw += nextLine + '\\n';\n                    src = src.substring(nextLine.length + 1);\n                    endEarly = true;\n                }\n                if (!endEarly) {\n                    const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n                    const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n                    const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n                    const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n                    const htmlBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}<[a-z].*>`, 'i');\n                    // Check if following lines should be included in List Item\n                    while (src) {\n                        const rawLine = src.split('\\n', 1)[0];\n                        let nextLineWithoutTabs;\n                        nextLine = rawLine;\n                        // Re-align to follow commonmark nesting rules\n                        if (this.options.pedantic) {\n                            nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, '  ');\n                            nextLineWithoutTabs = nextLine;\n                        }\n                        else {\n                            nextLineWithoutTabs = nextLine.replace(/\\t/g, '    ');\n                        }\n                        // End list item if found code fences\n                        if (fencesBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new heading\n                        if (headingBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of html block\n                        if (htmlBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new bullet\n                        if (nextBulletRegex.test(nextLine)) {\n                            break;\n                        }\n                        // Horizontal rule found\n                        if (hrRegex.test(nextLine)) {\n                            break;\n                        }\n                        if (nextLineWithoutTabs.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n                            itemContents += '\\n' + nextLineWithoutTabs.slice(indent);\n                        }\n                        else {\n                            // not enough indentation\n                            if (blankLine) {\n                                break;\n                            }\n                            // paragraph continuation unless last line was a different block level element\n                            if (line.replace(/\\t/g, '    ').search(/[^ ]/) >= 4) { // indented code block\n                                break;\n                            }\n                            if (fencesBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (headingBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (hrRegex.test(line)) {\n                                break;\n                            }\n                            itemContents += '\\n' + nextLine;\n                        }\n                        if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n                            blankLine = true;\n                        }\n                        raw += rawLine + '\\n';\n                        src = src.substring(rawLine.length + 1);\n                        line = nextLineWithoutTabs.slice(indent);\n                    }\n                }\n                if (!list.loose) {\n                    // If the previous item ended with a blank line, the list is loose\n                    if (endsWithBlankLine) {\n                        list.loose = true;\n                    }\n                    else if (/\\n[ \\t]*\\n[ \\t]*$/.test(raw)) {\n                        endsWithBlankLine = true;\n                    }\n                }\n                let istask = null;\n                let ischecked;\n                // Check for task list items\n                if (this.options.gfm) {\n                    istask = /^\\[[ xX]\\] /.exec(itemContents);\n                    if (istask) {\n                        ischecked = istask[0] !== '[ ] ';\n                        itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n                    }\n                }\n                list.items.push({\n                    type: 'list_item',\n                    raw,\n                    task: !!istask,\n                    checked: ischecked,\n                    loose: false,\n                    text: itemContents,\n                    tokens: [],\n                });\n                list.raw += raw;\n            }\n            // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n            list.items[list.items.length - 1].raw = list.items[list.items.length - 1].raw.trimEnd();\n            list.items[list.items.length - 1].text = list.items[list.items.length - 1].text.trimEnd();\n            list.raw = list.raw.trimEnd();\n            // Item child tokens handled here at end because we needed to have the final item to trim it first\n            for (let i = 0; i < list.items.length; i++) {\n                this.lexer.state.top = false;\n                list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n                if (!list.loose) {\n                    // Check if list should be loose\n                    const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n                    const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n                    list.loose = hasMultipleLineBreaks;\n                }\n            }\n            // Set all items to loose if list is loose\n            if (list.loose) {\n                for (let i = 0; i < list.items.length; i++) {\n                    list.items[i].loose = true;\n                }\n            }\n            return list;\n        }\n    }\n    html(src) {\n        const cap = this.rules.block.html.exec(src);\n        if (cap) {\n            const token = {\n                type: 'html',\n                block: true,\n                raw: cap[0],\n                pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n                text: cap[0],\n            };\n            return token;\n        }\n    }\n    def(src) {\n        const cap = this.rules.block.def.exec(src);\n        if (cap) {\n            const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n            const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n            const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n            return {\n                type: 'def',\n                tag,\n                raw: cap[0],\n                href,\n                title,\n            };\n        }\n    }\n    table(src) {\n        const cap = this.rules.block.table.exec(src);\n        if (!cap) {\n            return;\n        }\n        if (!/[:|]/.test(cap[2])) {\n            // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n            return;\n        }\n        const headers = splitCells(cap[1]);\n        const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n        const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n        const item = {\n            type: 'table',\n            raw: cap[0],\n            header: [],\n            align: [],\n            rows: [],\n        };\n        if (headers.length !== aligns.length) {\n            // header and align columns must be equal, rows can be different.\n            return;\n        }\n        for (const align of aligns) {\n            if (/^ *-+: *$/.test(align)) {\n                item.align.push('right');\n            }\n            else if (/^ *:-+: *$/.test(align)) {\n                item.align.push('center');\n            }\n            else if (/^ *:-+ *$/.test(align)) {\n                item.align.push('left');\n            }\n            else {\n                item.align.push(null);\n            }\n        }\n        for (let i = 0; i < headers.length; i++) {\n            item.header.push({\n                text: headers[i],\n                tokens: this.lexer.inline(headers[i]),\n                header: true,\n                align: item.align[i],\n            });\n        }\n        for (const row of rows) {\n            item.rows.push(splitCells(row, item.header.length).map((cell, i) => {\n                return {\n                    text: cell,\n                    tokens: this.lexer.inline(cell),\n                    header: false,\n                    align: item.align[i],\n                };\n            }));\n        }\n        return item;\n    }\n    lheading(src) {\n        const cap = this.rules.block.lheading.exec(src);\n        if (cap) {\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[2].charAt(0) === '=' ? 1 : 2,\n                text: cap[1],\n                tokens: this.lexer.inline(cap[1]),\n            };\n        }\n    }\n    paragraph(src) {\n        const cap = this.rules.block.paragraph.exec(src);\n        if (cap) {\n            const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n                ? cap[1].slice(0, -1)\n                : cap[1];\n            return {\n                type: 'paragraph',\n                raw: cap[0],\n                text,\n                tokens: this.lexer.inline(text),\n            };\n        }\n    }\n    text(src) {\n        const cap = this.rules.block.text.exec(src);\n        if (cap) {\n            return {\n                type: 'text',\n                raw: cap[0],\n                text: cap[0],\n                tokens: this.lexer.inline(cap[0]),\n            };\n        }\n    }\n    escape(src) {\n        const cap = this.rules.inline.escape.exec(src);\n        if (cap) {\n            return {\n                type: 'escape',\n                raw: cap[0],\n                text: escape$1(cap[1]),\n            };\n        }\n    }\n    tag(src) {\n        const cap = this.rules.inline.tag.exec(src);\n        if (cap) {\n            if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {\n                this.lexer.state.inLink = true;\n            }\n            else if (this.lexer.state.inLink && /^<\\/a>/i.test(cap[0])) {\n                this.lexer.state.inLink = false;\n            }\n            if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = true;\n            }\n            else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = false;\n            }\n            return {\n                type: 'html',\n                raw: cap[0],\n                inLink: this.lexer.state.inLink,\n                inRawBlock: this.lexer.state.inRawBlock,\n                block: false,\n                text: cap[0],\n            };\n        }\n    }\n    link(src) {\n        const cap = this.rules.inline.link.exec(src);\n        if (cap) {\n            const trimmedUrl = cap[2].trim();\n            if (!this.options.pedantic && /^</.test(trimmedUrl)) {\n                // commonmark requires matching angle brackets\n                if (!(/>$/.test(trimmedUrl))) {\n                    return;\n                }\n                // ending angle bracket cannot be escaped\n                const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n                if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n                    return;\n                }\n            }\n            else {\n                // find closing parenthesis\n                const lastParenIndex = findClosingBracket(cap[2], '()');\n                if (lastParenIndex > -1) {\n                    const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n                    const linkLen = start + cap[1].length + lastParenIndex;\n                    cap[2] = cap[2].substring(0, lastParenIndex);\n                    cap[0] = cap[0].substring(0, linkLen).trim();\n                    cap[3] = '';\n                }\n            }\n            let href = cap[2];\n            let title = '';\n            if (this.options.pedantic) {\n                // split pedantic href and title\n                const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n                if (link) {\n                    href = link[1];\n                    title = link[3];\n                }\n            }\n            else {\n                title = cap[3] ? cap[3].slice(1, -1) : '';\n            }\n            href = href.trim();\n            if (/^</.test(href)) {\n                if (this.options.pedantic && !(/>$/.test(trimmedUrl))) {\n                    // pedantic allows starting angle bracket without ending angle bracket\n                    href = href.slice(1);\n                }\n                else {\n                    href = href.slice(1, -1);\n                }\n            }\n            return outputLink(cap, {\n                href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n                title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title,\n            }, cap[0], this.lexer);\n        }\n    }\n    reflink(src, links) {\n        let cap;\n        if ((cap = this.rules.inline.reflink.exec(src))\n            || (cap = this.rules.inline.nolink.exec(src))) {\n            const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n            const link = links[linkString.toLowerCase()];\n            if (!link) {\n                const text = cap[0].charAt(0);\n                return {\n                    type: 'text',\n                    raw: text,\n                    text,\n                };\n            }\n            return outputLink(cap, link, cap[0], this.lexer);\n        }\n    }\n    emStrong(src, maskedSrc, prevChar = '') {\n        let match = this.rules.inline.emStrongLDelim.exec(src);\n        if (!match)\n            return;\n        // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n        if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u))\n            return;\n        const nextChar = match[1] || match[2] || '';\n        if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n            // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n            const lLength = [...match[0]].length - 1;\n            let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n            const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n            endReg.lastIndex = 0;\n            // Clip maskedSrc to same section of string as src (move to lexer?)\n            maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n            while ((match = endReg.exec(maskedSrc)) != null) {\n                rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n                if (!rDelim)\n                    continue; // skip single * in __abc*abc__\n                rLength = [...rDelim].length;\n                if (match[3] || match[4]) { // found another Left Delim\n                    delimTotal += rLength;\n                    continue;\n                }\n                else if (match[5] || match[6]) { // either Left or Right Delim\n                    if (lLength % 3 && !((lLength + rLength) % 3)) {\n                        midDelimTotal += rLength;\n                        continue; // CommonMark Emphasis Rules 9-10\n                    }\n                }\n                delimTotal -= rLength;\n                if (delimTotal > 0)\n                    continue; // Haven't found enough closing delimiters\n                // Remove extra characters. *a*** -> *a*\n                rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n                // char length can be >1 for unicode characters;\n                const lastCharLength = [...match[0]][0].length;\n                const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n                // Create `em` if smallest delimiter has odd char count. *a***\n                if (Math.min(lLength, rLength) % 2) {\n                    const text = raw.slice(1, -1);\n                    return {\n                        type: 'em',\n                        raw,\n                        text,\n                        tokens: this.lexer.inlineTokens(text),\n                    };\n                }\n                // Create 'strong' if smallest delimiter has even char count. **a***\n                const text = raw.slice(2, -2);\n                return {\n                    type: 'strong',\n                    raw,\n                    text,\n                    tokens: this.lexer.inlineTokens(text),\n                };\n            }\n        }\n    }\n    codespan(src) {\n        const cap = this.rules.inline.code.exec(src);\n        if (cap) {\n            let text = cap[2].replace(/\\n/g, ' ');\n            const hasNonSpaceChars = /[^ ]/.test(text);\n            const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n            if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n                text = text.substring(1, text.length - 1);\n            }\n            text = escape$1(text, true);\n            return {\n                type: 'codespan',\n                raw: cap[0],\n                text,\n            };\n        }\n    }\n    br(src) {\n        const cap = this.rules.inline.br.exec(src);\n        if (cap) {\n            return {\n                type: 'br',\n                raw: cap[0],\n            };\n        }\n    }\n    del(src) {\n        const cap = this.rules.inline.del.exec(src);\n        if (cap) {\n            return {\n                type: 'del',\n                raw: cap[0],\n                text: cap[2],\n                tokens: this.lexer.inlineTokens(cap[2]),\n            };\n        }\n    }\n    autolink(src) {\n        const cap = this.rules.inline.autolink.exec(src);\n        if (cap) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[1]);\n                href = 'mailto:' + text;\n            }\n            else {\n                text = escape$1(cap[1]);\n                href = text;\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text,\n                    },\n                ],\n            };\n        }\n    }\n    url(src) {\n        let cap;\n        if (cap = this.rules.inline.url.exec(src)) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[0]);\n                href = 'mailto:' + text;\n            }\n            else {\n                // do extended autolink path validation\n                let prevCapZero;\n                do {\n                    prevCapZero = cap[0];\n                    cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n                } while (prevCapZero !== cap[0]);\n                text = escape$1(cap[0]);\n                if (cap[1] === 'www.') {\n                    href = 'http://' + cap[0];\n                }\n                else {\n                    href = cap[0];\n                }\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text,\n                    },\n                ],\n            };\n        }\n    }\n    inlineText(src) {\n        const cap = this.rules.inline.text.exec(src);\n        if (cap) {\n            let text;\n            if (this.lexer.state.inRawBlock) {\n                text = cap[0];\n            }\n            else {\n                text = escape$1(cap[0]);\n            }\n            return {\n                type: 'text',\n                raw: cap[0],\n                text,\n            };\n        }\n    }\n}\n\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?:[ \\t]*(?:\\n|$))+/;\nconst blockCode = /^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/)\n    .replace(/bull/g, bullet) // lists can interrupt\n    .replace(/blockCode/g, /(?: {4}| {0,3}\\t)/) // indented code blocks can interrupt\n    .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n    .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n    .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt\n    .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n    .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/)\n    .replace('label', _blockLabel)\n    .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n    .getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/)\n    .replace(/bull/g, bullet)\n    .getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n    + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n    + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n    + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n    + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title'\n    + '|tr|track|ul';\nconst _comment = /<!--(?:-?>|[\\s\\S]*?(?:-->|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n    + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n    + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n    + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n    + '|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)' // (4)\n    + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)' // (5)\n    + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (6)\n    + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (7) open tag\n    + '|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \\t]*)+\\\\n|$)' // (7) closing tag\n    + ')', 'i')\n    .replace('comment', _comment)\n    .replace('tag', _tag)\n    .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst paragraph = edit(_paragraph)\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n    .replace('|table', '')\n    .replace('blockquote', ' {0,3}>')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n    .replace('paragraph', paragraph)\n    .getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n    blockquote,\n    code: blockCode,\n    def,\n    fences,\n    heading,\n    hr,\n    html,\n    lheading,\n    list,\n    newline,\n    paragraph,\n    table: noopTest,\n    text: blockText,\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n    + ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n    + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('blockquote', ' {0,3}>')\n    .replace('code', '(?: {4}| {0,3}\\t)[^\\\\n]')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockGfm = {\n    ...blockNormal,\n    table: gfmTable,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n        .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n        .replace('table', gfmTable) // interrupt paragraphs with table\n        .replace('blockquote', ' {0,3}>')\n        .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n        .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n        .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n        .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n        .getRegex(),\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n    ...blockNormal,\n    html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)'\n        + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n        + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n        .replace('comment', _comment)\n        .replace(/tag/g, '(?!(?:'\n        + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n        + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n        + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n        .getRegex(),\n    def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n    heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n    fences: noopTest, // fences not supported\n    lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' *#{1,6} *[^\\n]')\n        .replace('lheading', lheading)\n        .replace('|table', '')\n        .replace('blockquote', ' {0,3}>')\n        .replace('|fences', '')\n        .replace('|list', '')\n        .replace('|html', '')\n        .replace('|tag', '')\n        .getRegex(),\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/;\n// list of unicode punctuation marks, plus any missing characters from CommonMark spec\nconst _punctuation = '\\\\p{P}\\\\p{S}';\nconst punctuation = edit(/^((?![*_])[\\spunctuation])/, 'u')\n    .replace(/punctuation/g, _punctuation).getRegex();\n// sequences em should skip over [title](link), `code`, <html>\nconst blockSkip = /\\[[^[\\]]*?\\]\\((?:\\\\.|[^\\\\\\(\\)]|\\((?:\\\\.|[^\\\\\\(\\)])*\\))*\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n    + '|[^*]+(?=[^*])' // Consume to delim\n    + '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n    + '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n    + '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n    + '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n    + '|[^_]+(?=[^_])' // Consume to delim\n    + '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n    + '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n    + '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n    + '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n    + '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n    .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n    .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n    .getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>') // CDATA section\n    .replace('comment', _inlineComment)\n    .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/)\n    .replace('label', _inlineLabel)\n    .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/)\n    .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n    .getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n    .replace('label', _inlineLabel)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n    .replace('reflink', reflink)\n    .replace('nolink', nolink)\n    .getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n    _backpedal: noopTest, // only used for GFM url\n    anyPunctuation,\n    autolink,\n    blockSkip,\n    br,\n    code: inlineCode,\n    del: noopTest,\n    emStrongLDelim,\n    emStrongRDelimAst,\n    emStrongRDelimUnd,\n    escape,\n    link,\n    nolink,\n    punctuation,\n    reflink,\n    reflinkSearch,\n    tag,\n    text: inlineText,\n    url: noopTest,\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n    ...inlineNormal,\n    link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n        .replace('label', _inlineLabel)\n        .getRegex(),\n    reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n        .replace('label', _inlineLabel)\n        .getRegex(),\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n    ...inlineNormal,\n    escape: edit(escape).replace('])', '~|])').getRegex(),\n    url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i')\n        .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n        .getRegex(),\n    _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n    del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n    text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/,\n};\n/**\n * GFM + Line Breaks Inline Grammar\n */\nconst inlineBreaks = {\n    ...inlineGfm,\n    br: edit(br).replace('{2,}', '*').getRegex(),\n    text: edit(inlineGfm.text)\n        .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n        .replace(/\\{2,\\}/g, '*')\n        .getRegex(),\n};\n/**\n * exports\n */\nconst block = {\n    normal: blockNormal,\n    gfm: blockGfm,\n    pedantic: blockPedantic,\n};\nconst inline = {\n    normal: inlineNormal,\n    gfm: inlineGfm,\n    breaks: inlineBreaks,\n    pedantic: inlinePedantic,\n};\n\n/**\n * Block Lexer\n */\nclass _Lexer {\n    tokens;\n    options;\n    state;\n    tokenizer;\n    inlineQueue;\n    constructor(options) {\n        // TokenList cannot be created in one go\n        this.tokens = [];\n        this.tokens.links = Object.create(null);\n        this.options = options || _defaults;\n        this.options.tokenizer = this.options.tokenizer || new _Tokenizer();\n        this.tokenizer = this.options.tokenizer;\n        this.tokenizer.options = this.options;\n        this.tokenizer.lexer = this;\n        this.inlineQueue = [];\n        this.state = {\n            inLink: false,\n            inRawBlock: false,\n            top: true,\n        };\n        const rules = {\n            block: block.normal,\n            inline: inline.normal,\n        };\n        if (this.options.pedantic) {\n            rules.block = block.pedantic;\n            rules.inline = inline.pedantic;\n        }\n        else if (this.options.gfm) {\n            rules.block = block.gfm;\n            if (this.options.breaks) {\n                rules.inline = inline.breaks;\n            }\n            else {\n                rules.inline = inline.gfm;\n            }\n        }\n        this.tokenizer.rules = rules;\n    }\n    /**\n     * Expose Rules\n     */\n    static get rules() {\n        return {\n            block,\n            inline,\n        };\n    }\n    /**\n     * Static Lex Method\n     */\n    static lex(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.lex(src);\n    }\n    /**\n     * Static Lex Inline Method\n     */\n    static lexInline(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.inlineTokens(src);\n    }\n    /**\n     * Preprocessing\n     */\n    lex(src) {\n        src = src\n            .replace(/\\r\\n|\\r/g, '\\n');\n        this.blockTokens(src, this.tokens);\n        for (let i = 0; i < this.inlineQueue.length; i++) {\n            const next = this.inlineQueue[i];\n            this.inlineTokens(next.src, next.tokens);\n        }\n        this.inlineQueue = [];\n        return this.tokens;\n    }\n    blockTokens(src, tokens = [], lastParagraphClipped = false) {\n        if (this.options.pedantic) {\n            src = src.replace(/\\t/g, '    ').replace(/^ +$/gm, '');\n        }\n        let token;\n        let lastToken;\n        let cutSrc;\n        while (src) {\n            if (this.options.extensions\n                && this.options.extensions.block\n                && this.options.extensions.block.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // newline\n            if (token = this.tokenizer.space(src)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.length === 1 && tokens.length > 0) {\n                    // if there's a single \\n as a spacer, it's terminating the last line,\n                    // so move it there so that we don't get unnecessary paragraph tags\n                    tokens[tokens.length - 1].raw += '\\n';\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.code(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                // An indented code block cannot interrupt a paragraph.\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // fences\n            if (token = this.tokenizer.fences(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // heading\n            if (token = this.tokenizer.heading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // hr\n            if (token = this.tokenizer.hr(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // blockquote\n            if (token = this.tokenizer.blockquote(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // list\n            if (token = this.tokenizer.list(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // html\n            if (token = this.tokenizer.html(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // def\n            if (token = this.tokenizer.def(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.raw;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else if (!this.tokens.links[token.tag]) {\n                    this.tokens.links[token.tag] = {\n                        href: token.href,\n                        title: token.title,\n                    };\n                }\n                continue;\n            }\n            // table (gfm)\n            if (token = this.tokenizer.table(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // lheading\n            if (token = this.tokenizer.lheading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // top-level paragraph\n            // prevent paragraph consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startBlock) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startBlock.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n                lastToken = tokens[tokens.length - 1];\n                if (lastParagraphClipped && lastToken?.type === 'paragraph') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                lastParagraphClipped = (cutSrc.length !== src.length);\n                src = src.substring(token.raw.length);\n                continue;\n            }\n            // text\n            if (token = this.tokenizer.text(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        this.state.top = true;\n        return tokens;\n    }\n    inline(src, tokens = []) {\n        this.inlineQueue.push({ src, tokens });\n        return tokens;\n    }\n    /**\n     * Lexing/Compiling\n     */\n    inlineTokens(src, tokens = []) {\n        let token, lastToken, cutSrc;\n        // String with links masked to avoid interference with em and strong\n        let maskedSrc = src;\n        let match;\n        let keepPrevChar, prevChar;\n        // Mask out reflinks\n        if (this.tokens.links) {\n            const links = Object.keys(this.tokens.links);\n            if (links.length > 0) {\n                while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n                    if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n                        maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n                    }\n                }\n            }\n        }\n        // Mask out other blocks\n        while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n        }\n        // Mask out escaped characters\n        while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n        }\n        while (src) {\n            if (!keepPrevChar) {\n                prevChar = '';\n            }\n            keepPrevChar = false;\n            // extensions\n            if (this.options.extensions\n                && this.options.extensions.inline\n                && this.options.extensions.inline.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // escape\n            if (token = this.tokenizer.escape(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // tag\n            if (token = this.tokenizer.tag(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // link\n            if (token = this.tokenizer.link(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // reflink, nolink\n            if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // em & strong\n            if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.codespan(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // br\n            if (token = this.tokenizer.br(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // del (gfm)\n            if (token = this.tokenizer.del(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // autolink\n            if (token = this.tokenizer.autolink(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // url (gfm)\n            if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // text\n            // prevent inlineText consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startInline) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startInline.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (token = this.tokenizer.inlineText(cutSrc)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n                    prevChar = token.raw.slice(-1);\n                }\n                keepPrevChar = true;\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        return tokens;\n    }\n}\n\n/**\n * Renderer\n */\nclass _Renderer {\n    options;\n    parser; // set by the parser\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    space(token) {\n        return '';\n    }\n    code({ text, lang, escaped }) {\n        const langString = (lang || '').match(/^\\S*/)?.[0];\n        const code = text.replace(/\\n$/, '') + '\\n';\n        if (!langString) {\n            return '<pre><code>'\n                + (escaped ? code : escape$1(code, true))\n                + '</code></pre>\\n';\n        }\n        return '<pre><code class=\"language-'\n            + escape$1(langString)\n            + '\">'\n            + (escaped ? code : escape$1(code, true))\n            + '</code></pre>\\n';\n    }\n    blockquote({ tokens }) {\n        const body = this.parser.parse(tokens);\n        return `<blockquote>\\n${body}</blockquote>\\n`;\n    }\n    html({ text }) {\n        return text;\n    }\n    heading({ tokens, depth }) {\n        return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>\\n`;\n    }\n    hr(token) {\n        return '<hr>\\n';\n    }\n    list(token) {\n        const ordered = token.ordered;\n        const start = token.start;\n        let body = '';\n        for (let j = 0; j < token.items.length; j++) {\n            const item = token.items[j];\n            body += this.listitem(item);\n        }\n        const type = ordered ? 'ol' : 'ul';\n        const startAttr = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n        return '<' + type + startAttr + '>\\n' + body + '</' + type + '>\\n';\n    }\n    listitem(item) {\n        let itemBody = '';\n        if (item.task) {\n            const checkbox = this.checkbox({ checked: !!item.checked });\n            if (item.loose) {\n                if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n                    item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n                    if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n                        item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n                    }\n                }\n                else {\n                    item.tokens.unshift({\n                        type: 'text',\n                        raw: checkbox + ' ',\n                        text: checkbox + ' ',\n                    });\n                }\n            }\n            else {\n                itemBody += checkbox + ' ';\n            }\n        }\n        itemBody += this.parser.parse(item.tokens, !!item.loose);\n        return `<li>${itemBody}</li>\\n`;\n    }\n    checkbox({ checked }) {\n        return '<input '\n            + (checked ? 'checked=\"\" ' : '')\n            + 'disabled=\"\" type=\"checkbox\">';\n    }\n    paragraph({ tokens }) {\n        return `<p>${this.parser.parseInline(tokens)}</p>\\n`;\n    }\n    table(token) {\n        let header = '';\n        // header\n        let cell = '';\n        for (let j = 0; j < token.header.length; j++) {\n            cell += this.tablecell(token.header[j]);\n        }\n        header += this.tablerow({ text: cell });\n        let body = '';\n        for (let j = 0; j < token.rows.length; j++) {\n            const row = token.rows[j];\n            cell = '';\n            for (let k = 0; k < row.length; k++) {\n                cell += this.tablecell(row[k]);\n            }\n            body += this.tablerow({ text: cell });\n        }\n        if (body)\n            body = `<tbody>${body}</tbody>`;\n        return '<table>\\n'\n            + '<thead>\\n'\n            + header\n            + '</thead>\\n'\n            + body\n            + '</table>\\n';\n    }\n    tablerow({ text }) {\n        return `<tr>\\n${text}</tr>\\n`;\n    }\n    tablecell(token) {\n        const content = this.parser.parseInline(token.tokens);\n        const type = token.header ? 'th' : 'td';\n        const tag = token.align\n            ? `<${type} align=\"${token.align}\">`\n            : `<${type}>`;\n        return tag + content + `</${type}>\\n`;\n    }\n    /**\n     * span level renderer\n     */\n    strong({ tokens }) {\n        return `<strong>${this.parser.parseInline(tokens)}</strong>`;\n    }\n    em({ tokens }) {\n        return `<em>${this.parser.parseInline(tokens)}</em>`;\n    }\n    codespan({ text }) {\n        return `<code>${text}</code>`;\n    }\n    br(token) {\n        return '<br>';\n    }\n    del({ tokens }) {\n        return `<del>${this.parser.parseInline(tokens)}</del>`;\n    }\n    link({ href, title, tokens }) {\n        const text = this.parser.parseInline(tokens);\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = '<a href=\"' + href + '\"';\n        if (title) {\n            out += ' title=\"' + title + '\"';\n        }\n        out += '>' + text + '</a>';\n        return out;\n    }\n    image({ href, title, text }) {\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = `<img src=\"${href}\" alt=\"${text}\"`;\n        if (title) {\n            out += ` title=\"${title}\"`;\n        }\n        out += '>';\n        return out;\n    }\n    text(token) {\n        return 'tokens' in token && token.tokens ? this.parser.parseInline(token.tokens) : token.text;\n    }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass _TextRenderer {\n    // no need for block level renderers\n    strong({ text }) {\n        return text;\n    }\n    em({ text }) {\n        return text;\n    }\n    codespan({ text }) {\n        return text;\n    }\n    del({ text }) {\n        return text;\n    }\n    html({ text }) {\n        return text;\n    }\n    text({ text }) {\n        return text;\n    }\n    link({ text }) {\n        return '' + text;\n    }\n    image({ text }) {\n        return '' + text;\n    }\n    br() {\n        return '';\n    }\n}\n\n/**\n * Parsing & Compiling\n */\nclass _Parser {\n    options;\n    renderer;\n    textRenderer;\n    constructor(options) {\n        this.options = options || _defaults;\n        this.options.renderer = this.options.renderer || new _Renderer();\n        this.renderer = this.options.renderer;\n        this.renderer.options = this.options;\n        this.renderer.parser = this;\n        this.textRenderer = new _TextRenderer();\n    }\n    /**\n     * Static Parse Method\n     */\n    static parse(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parse(tokens);\n    }\n    /**\n     * Static Parse Inline Method\n     */\n    static parseInline(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parseInline(tokens);\n    }\n    /**\n     * Parse Loop\n     */\n    parse(tokens, top = true) {\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const anyToken = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[anyToken.type]) {\n                const genericToken = anyToken;\n                const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);\n                if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(genericToken.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            const token = anyToken;\n            switch (token.type) {\n                case 'space': {\n                    out += this.renderer.space(token);\n                    continue;\n                }\n                case 'hr': {\n                    out += this.renderer.hr(token);\n                    continue;\n                }\n                case 'heading': {\n                    out += this.renderer.heading(token);\n                    continue;\n                }\n                case 'code': {\n                    out += this.renderer.code(token);\n                    continue;\n                }\n                case 'table': {\n                    out += this.renderer.table(token);\n                    continue;\n                }\n                case 'blockquote': {\n                    out += this.renderer.blockquote(token);\n                    continue;\n                }\n                case 'list': {\n                    out += this.renderer.list(token);\n                    continue;\n                }\n                case 'html': {\n                    out += this.renderer.html(token);\n                    continue;\n                }\n                case 'paragraph': {\n                    out += this.renderer.paragraph(token);\n                    continue;\n                }\n                case 'text': {\n                    let textToken = token;\n                    let body = this.renderer.text(textToken);\n                    while (i + 1 < tokens.length && tokens[i + 1].type === 'text') {\n                        textToken = tokens[++i];\n                        body += '\\n' + this.renderer.text(textToken);\n                    }\n                    if (top) {\n                        out += this.renderer.paragraph({\n                            type: 'paragraph',\n                            raw: body,\n                            text: body,\n                            tokens: [{ type: 'text', raw: body, text: body }],\n                        });\n                    }\n                    else {\n                        out += body;\n                    }\n                    continue;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n    /**\n     * Parse Inline Tokens\n     */\n    parseInline(tokens, renderer) {\n        renderer = renderer || this.renderer;\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const anyToken = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[anyToken.type]) {\n                const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);\n                if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(anyToken.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            const token = anyToken;\n            switch (token.type) {\n                case 'escape': {\n                    out += renderer.text(token);\n                    break;\n                }\n                case 'html': {\n                    out += renderer.html(token);\n                    break;\n                }\n                case 'link': {\n                    out += renderer.link(token);\n                    break;\n                }\n                case 'image': {\n                    out += renderer.image(token);\n                    break;\n                }\n                case 'strong': {\n                    out += renderer.strong(token);\n                    break;\n                }\n                case 'em': {\n                    out += renderer.em(token);\n                    break;\n                }\n                case 'codespan': {\n                    out += renderer.codespan(token);\n                    break;\n                }\n                case 'br': {\n                    out += renderer.br(token);\n                    break;\n                }\n                case 'del': {\n                    out += renderer.del(token);\n                    break;\n                }\n                case 'text': {\n                    out += renderer.text(token);\n                    break;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n}\n\nclass _Hooks {\n    options;\n    block;\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    static passThroughHooks = new Set([\n        'preprocess',\n        'postprocess',\n        'processAllTokens',\n    ]);\n    /**\n     * Process markdown before marked\n     */\n    preprocess(markdown) {\n        return markdown;\n    }\n    /**\n     * Process HTML after marked is finished\n     */\n    postprocess(html) {\n        return html;\n    }\n    /**\n     * Process all tokens before walk tokens\n     */\n    processAllTokens(tokens) {\n        return tokens;\n    }\n    /**\n     * Provide function to tokenize markdown\n     */\n    provideLexer() {\n        return this.block ? _Lexer.lex : _Lexer.lexInline;\n    }\n    /**\n     * Provide function to parse tokens\n     */\n    provideParser() {\n        return this.block ? _Parser.parse : _Parser.parseInline;\n    }\n}\n\nclass Marked {\n    defaults = _getDefaults();\n    options = this.setOptions;\n    parse = this.parseMarkdown(true);\n    parseInline = this.parseMarkdown(false);\n    Parser = _Parser;\n    Renderer = _Renderer;\n    TextRenderer = _TextRenderer;\n    Lexer = _Lexer;\n    Tokenizer = _Tokenizer;\n    Hooks = _Hooks;\n    constructor(...args) {\n        this.use(...args);\n    }\n    /**\n     * Run callback for every token\n     */\n    walkTokens(tokens, callback) {\n        let values = [];\n        for (const token of tokens) {\n            values = values.concat(callback.call(this, token));\n            switch (token.type) {\n                case 'table': {\n                    const tableToken = token;\n                    for (const cell of tableToken.header) {\n                        values = values.concat(this.walkTokens(cell.tokens, callback));\n                    }\n                    for (const row of tableToken.rows) {\n                        for (const cell of row) {\n                            values = values.concat(this.walkTokens(cell.tokens, callback));\n                        }\n                    }\n                    break;\n                }\n                case 'list': {\n                    const listToken = token;\n                    values = values.concat(this.walkTokens(listToken.items, callback));\n                    break;\n                }\n                default: {\n                    const genericToken = token;\n                    if (this.defaults.extensions?.childTokens?.[genericToken.type]) {\n                        this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {\n                            const tokens = genericToken[childTokens].flat(Infinity);\n                            values = values.concat(this.walkTokens(tokens, callback));\n                        });\n                    }\n                    else if (genericToken.tokens) {\n                        values = values.concat(this.walkTokens(genericToken.tokens, callback));\n                    }\n                }\n            }\n        }\n        return values;\n    }\n    use(...args) {\n        const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };\n        args.forEach((pack) => {\n            // copy options to new object\n            const opts = { ...pack };\n            // set async to true if it was set to true before\n            opts.async = this.defaults.async || opts.async || false;\n            // ==-- Parse \"addon\" extensions --== //\n            if (pack.extensions) {\n                pack.extensions.forEach((ext) => {\n                    if (!ext.name) {\n                        throw new Error('extension name required');\n                    }\n                    if ('renderer' in ext) { // Renderer extensions\n                        const prevRenderer = extensions.renderers[ext.name];\n                        if (prevRenderer) {\n                            // Replace extension with func to run new extension but fall back if false\n                            extensions.renderers[ext.name] = function (...args) {\n                                let ret = ext.renderer.apply(this, args);\n                                if (ret === false) {\n                                    ret = prevRenderer.apply(this, args);\n                                }\n                                return ret;\n                            };\n                        }\n                        else {\n                            extensions.renderers[ext.name] = ext.renderer;\n                        }\n                    }\n                    if ('tokenizer' in ext) { // Tokenizer Extensions\n                        if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n                            throw new Error(\"extension level must be 'block' or 'inline'\");\n                        }\n                        const extLevel = extensions[ext.level];\n                        if (extLevel) {\n                            extLevel.unshift(ext.tokenizer);\n                        }\n                        else {\n                            extensions[ext.level] = [ext.tokenizer];\n                        }\n                        if (ext.start) { // Function to check for start of token\n                            if (ext.level === 'block') {\n                                if (extensions.startBlock) {\n                                    extensions.startBlock.push(ext.start);\n                                }\n                                else {\n                                    extensions.startBlock = [ext.start];\n                                }\n                            }\n                            else if (ext.level === 'inline') {\n                                if (extensions.startInline) {\n                                    extensions.startInline.push(ext.start);\n                                }\n                                else {\n                                    extensions.startInline = [ext.start];\n                                }\n                            }\n                        }\n                    }\n                    if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n                        extensions.childTokens[ext.name] = ext.childTokens;\n                    }\n                });\n                opts.extensions = extensions;\n            }\n            // ==-- Parse \"overwrite\" extensions --== //\n            if (pack.renderer) {\n                const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n                for (const prop in pack.renderer) {\n                    if (!(prop in renderer)) {\n                        throw new Error(`renderer '${prop}' does not exist`);\n                    }\n                    if (['options', 'parser'].includes(prop)) {\n                        // ignore options property\n                        continue;\n                    }\n                    const rendererProp = prop;\n                    const rendererFunc = pack.renderer[rendererProp];\n                    const prevRenderer = renderer[rendererProp];\n                    // Replace renderer with func to run extension, but fall back if false\n                    renderer[rendererProp] = (...args) => {\n                        let ret = rendererFunc.apply(renderer, args);\n                        if (ret === false) {\n                            ret = prevRenderer.apply(renderer, args);\n                        }\n                        return ret || '';\n                    };\n                }\n                opts.renderer = renderer;\n            }\n            if (pack.tokenizer) {\n                const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n                for (const prop in pack.tokenizer) {\n                    if (!(prop in tokenizer)) {\n                        throw new Error(`tokenizer '${prop}' does not exist`);\n                    }\n                    if (['options', 'rules', 'lexer'].includes(prop)) {\n                        // ignore options, rules, and lexer properties\n                        continue;\n                    }\n                    const tokenizerProp = prop;\n                    const tokenizerFunc = pack.tokenizer[tokenizerProp];\n                    const prevTokenizer = tokenizer[tokenizerProp];\n                    // Replace tokenizer with func to run extension, but fall back if false\n                    // @ts-expect-error cannot type tokenizer function dynamically\n                    tokenizer[tokenizerProp] = (...args) => {\n                        let ret = tokenizerFunc.apply(tokenizer, args);\n                        if (ret === false) {\n                            ret = prevTokenizer.apply(tokenizer, args);\n                        }\n                        return ret;\n                    };\n                }\n                opts.tokenizer = tokenizer;\n            }\n            // ==-- Parse Hooks extensions --== //\n            if (pack.hooks) {\n                const hooks = this.defaults.hooks || new _Hooks();\n                for (const prop in pack.hooks) {\n                    if (!(prop in hooks)) {\n                        throw new Error(`hook '${prop}' does not exist`);\n                    }\n                    if (['options', 'block'].includes(prop)) {\n                        // ignore options and block properties\n                        continue;\n                    }\n                    const hooksProp = prop;\n                    const hooksFunc = pack.hooks[hooksProp];\n                    const prevHook = hooks[hooksProp];\n                    if (_Hooks.passThroughHooks.has(prop)) {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (arg) => {\n                            if (this.defaults.async) {\n                                return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n                                    return prevHook.call(hooks, ret);\n                                });\n                            }\n                            const ret = hooksFunc.call(hooks, arg);\n                            return prevHook.call(hooks, ret);\n                        };\n                    }\n                    else {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (...args) => {\n                            let ret = hooksFunc.apply(hooks, args);\n                            if (ret === false) {\n                                ret = prevHook.apply(hooks, args);\n                            }\n                            return ret;\n                        };\n                    }\n                }\n                opts.hooks = hooks;\n            }\n            // ==-- Parse WalkTokens extensions --== //\n            if (pack.walkTokens) {\n                const walkTokens = this.defaults.walkTokens;\n                const packWalktokens = pack.walkTokens;\n                opts.walkTokens = function (token) {\n                    let values = [];\n                    values.push(packWalktokens.call(this, token));\n                    if (walkTokens) {\n                        values = values.concat(walkTokens.call(this, token));\n                    }\n                    return values;\n                };\n            }\n            this.defaults = { ...this.defaults, ...opts };\n        });\n        return this;\n    }\n    setOptions(opt) {\n        this.defaults = { ...this.defaults, ...opt };\n        return this;\n    }\n    lexer(src, options) {\n        return _Lexer.lex(src, options ?? this.defaults);\n    }\n    parser(tokens, options) {\n        return _Parser.parse(tokens, options ?? this.defaults);\n    }\n    parseMarkdown(blockType) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const parse = (src, options) => {\n            const origOpt = { ...options };\n            const opt = { ...this.defaults, ...origOpt };\n            const throwError = this.onError(!!opt.silent, !!opt.async);\n            // throw error if an extension set async to true but parse was called with async: false\n            if (this.defaults.async === true && origOpt.async === false) {\n                return throwError(new Error('marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.'));\n            }\n            // throw error in case of non string input\n            if (typeof src === 'undefined' || src === null) {\n                return throwError(new Error('marked(): input parameter is undefined or null'));\n            }\n            if (typeof src !== 'string') {\n                return throwError(new Error('marked(): input parameter is of type '\n                    + Object.prototype.toString.call(src) + ', string expected'));\n            }\n            if (opt.hooks) {\n                opt.hooks.options = opt;\n                opt.hooks.block = blockType;\n            }\n            const lexer = opt.hooks ? opt.hooks.provideLexer() : (blockType ? _Lexer.lex : _Lexer.lexInline);\n            const parser = opt.hooks ? opt.hooks.provideParser() : (blockType ? _Parser.parse : _Parser.parseInline);\n            if (opt.async) {\n                return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n                    .then(src => lexer(src, opt))\n                    .then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens)\n                    .then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n                    .then(tokens => parser(tokens, opt))\n                    .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n                    .catch(throwError);\n            }\n            try {\n                if (opt.hooks) {\n                    src = opt.hooks.preprocess(src);\n                }\n                let tokens = lexer(src, opt);\n                if (opt.hooks) {\n                    tokens = opt.hooks.processAllTokens(tokens);\n                }\n                if (opt.walkTokens) {\n                    this.walkTokens(tokens, opt.walkTokens);\n                }\n                let html = parser(tokens, opt);\n                if (opt.hooks) {\n                    html = opt.hooks.postprocess(html);\n                }\n                return html;\n            }\n            catch (e) {\n                return throwError(e);\n            }\n        };\n        return parse;\n    }\n    onError(silent, async) {\n        return (e) => {\n            e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n            if (silent) {\n                const msg = '<p>An error occurred:</p><pre>'\n                    + escape$1(e.message + '', true)\n                    + '</pre>';\n                if (async) {\n                    return Promise.resolve(msg);\n                }\n                return msg;\n            }\n            if (async) {\n                return Promise.reject(e);\n            }\n            throw e;\n        };\n    }\n}\n\nconst markedInstance = new Marked();\nfunction marked(src, opt) {\n    return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n    marked.setOptions = function (options) {\n        markedInstance.setOptions(options);\n        marked.defaults = markedInstance.defaults;\n        changeDefaults(marked.defaults);\n        return marked;\n    };\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = _defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n    markedInstance.use(...args);\n    marked.defaults = markedInstance.defaults;\n    changeDefaults(marked.defaults);\n    return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n    return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = _Parser.parse;\nconst lexer = _Lexer.lex;\n\nexport { _Hooks as Hooks, _Lexer as Lexer, Marked, _Parser as Parser, _Renderer as Renderer, _TextRenderer as TextRenderer, _Tokenizer as Tokenizer, _defaults as defaults, _getDefaults as getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n//# sourceMappingURL=marked.esm.js.map\n","\n//Default allowed tags for HTML sanitization\nexport const defaultAllowedTags = [\n  'p',\n  'a',\n  'br',\n  'div',\n  'span',\n  'small',\n  'strong',\n  'em',\n  'hr',\n  'ul',\n  'ol',\n  'li',\n]\n","<script setup>\nimport DOMPurify from 'dompurify'\nimport {marked} from 'marked'\nimport {defaultAllowedTags} from '@/constants/html.js'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  content: {\n    type: String,\n    default: '',\n  },\n  allowedTags: {\n    type: Array,\n    default: () => defaultAllowedTags,\n  },\n})\n\n//Markdown\nconst {content, allowedTags} = toRefs(props)\nconst sanitized = computed(() => DOMPurify.sanitize(content.value, {\n  USE_PROFILES: {html: true},\n  ALLOWED_TAGS: allowedTags.value,\n}))\nconst markdown = computed(() => marked.parse(sanitized.value.replace(/\\n/g, '  \\n')))\n</script>\n\n<template>\n  <!-- eslint-disable vue/no-v-html -->\n  <div\n    :class=\"$style.markdown\"\n    v-html=\"markdown\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.markdown {\n  &:not(:first-child) {\n    margin-top: 1rem;\n  }\n  p + p, p + ul, p + ol,\n  ul + ul, ul + p, ul + ol,\n  ol + ol, ol + p, ol + ul\n  {\n    margin-top: 1rem;\n  }\n  ol, ul {\n    margin-left: 1rem;\n    li {\n      margin-left: 0.5rem;\n    }\n  }\n  ul {\n    list-style: disc;\n  }\n  ol {\n    list-style: decimal;\n  }\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Course catalog API service\n */\nexport class CourseCatalogApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/course_catalog'\n\n  /**\n   * Query (not using model collection conversion)\n   */\n  query(params, options, path = '/') {\n    return this\n      .get(path, params, options)\n  }\n\n  /**\n   * Find by ID (not using model conversion)\n   */\n  findById(id, params) {\n    if (!id) {\n      throw new Error('Missing ID')\n    }\n    return this\n      .get(`${id}`, params)\n  }\n}\n\n//Export singleton instance\nexport const courseCatalogApi = new CourseCatalogApi()\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport CourseImage from '@/components/courses/CourseImage.vue'\nimport CourseCatalogFilters from '@/components/course_catalog/CourseCatalogFilters.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport Tag from '@/components/shared/core/Tag.vue'\nimport {courseCatalogApi} from '@/api/course-catalog.api.js'\nimport {openUrl} from '@/helpers/url.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {ref, computed, onMounted, watch} from 'vue'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Course catalog')\n\n//Composables\nconst {routeParams} = useRouting()\nconst {goToCourseCatalogView} = useNavigation()\n\n//Refs\nconst organization = ref({})\nconst schedules = ref([])\nconst search = ref(undefined)\nconst isLoading = ref(true)\n\n//Filtering\nconst filter = ref({selectedTags: []})\nconst numActiveFilters = computed(() => filter.value.selectedTags.length)\nconst changeFilter = newFilter => filter.value = newFilter\nconst resetFilter = () => filter.value = {selectedTags: []}\n\n//Load data from API\nconst loadData = async () => {\n\n  //Toggle loading state\n  isLoading.value = true\n\n  //Get data from API\n  const data = await courseCatalogApi.query({\n    orgSlug: routeParams.value.orgSlug,\n    search: search.value,\n    selectedTags: filter.value.selectedTags,\n  })\n\n  //Set data\n  organization.value = data.meta.organization\n  schedules.value = data.distributions\n  isLoading.value = false\n}\n\n//Load data when search term or filter changes\nwatch(search, loadData)\nwatch(filter, loadData)\n\n//Load data when page is mounted\nonMounted(loadData)\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          :search-term=\"search\"\n          @search=\"search = $event.searchTerm\"\n          @clear-search=\"search = ''\"\n        />\n      </template>\n      <template #filters>\n        <CourseCatalogFilters\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          :organization-tags=\"organization?.tags\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"resetFilter()\"\n        />\n      </template>\n    </OverviewTableHeader>\n    <Spinner v-if=\"isLoading\" />\n    <div\n      v-else-if=\"schedules.length > 0\"\n      :class=\"$style.grid\"\n    >\n      <div\n        v-for=\"(schedule, index) in schedules\"\n        :key=\"index\"\n        :class=\"$style.card\"\n        :test-id=\"`courseCard-${schedule.course.id}`\"\n      >\n        <FlexColumn\n          :gap=\"0.5\"\n          :class=\"$style.body\"\n        >\n          <div :class=\"$style.banner\">\n            <CourseImage :src=\"schedule.course.signedUrl\" />\n          </div>\n\n          <h5>{{ schedule.course.name }}</h5>\n          <FlexRow\n            :gap=\"0.5\"\n            wrap\n          >\n            <Tag\n              v-for=\"(tag, i) in schedule.course.tags\"\n              :key=\"i\"\n              :label=\"tag.label\"\n            />\n          </FlexRow>\n\n          <div :class=\"$style.description\">\n            <Markdown :content=\"schedule.course.description\" />\n          </div>\n        </FlexColumn>\n\n        <div :class=\"$style.buttons\">\n          <ActionButton\n            type=\"secondary\"\n            label=\"Course details\"\n            :test-id=\"`courseDetails-${schedule.course.id}`\"\n            is-block\n            @click=\"goToCourseCatalogView(organization.slug, schedule.id)\"\n          />\n          <ActionButton\n            type=\"primary\"\n            label=\"Quick enroll\"\n            :test-id=\"`quickEnroll-${schedule.course.id}`\"\n            is-block\n            @click=\"openUrl(`/distributions/${schedule.id}/register`)\"\n          />\n        </div>\n      </div>\n    </div>\n    <PageBlock\n      v-else\n      header=\"Hey there!\"\n    >\n      <p>\n        Looks like {{ organization.name }}'s classroom doesn't have any published courses yet<span v-if=\"filter.selectedTags.length > 0 || search\"> with the selected topics, tags or search term</span>.\n      </p>\n      <p>\n        If you think this is an error, please reach out to the classroom administrator.\n      </p>\n    </PageBlock>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.grid {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1rem;\n}\n.card {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n  background: var(--color-white);\n  border: 1px solid var(--color-borders);\n  border-radius: var(--border-radius-m);\n  padding: 1rem;\n  flex: 1;\n  @media (min-width: 920px) {\n    flex: 0 0 calc(50% - 0.5rem);\n  }\n  @media (min-width: 1240px) {\n    flex: 0 0 calc(33.333% - 0.667rem);\n  }\n  @media (min-width: 1575px) {\n    flex: 0 0 calc(25% - 0.75rem);\n  }\n}\n.body {\n  flex: 1;\n}\n.description {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  max-height: 124px;\n  display: -webkit-box;\n  -webkit-line-clamp: 5;\n  -webkit-box-orient: vertical;\n}\n.banner {\n  max-height: 248px; /* 16:9 aspect ratio vs the flex width */\n  margin-bottom: 1rem;\n  overflow: hidden;\n  background: var(--color-white);\n  border-radius: var(--border-radius-m);\n}\n.buttons {\n  display: flex;\n  gap: 1rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport IconLabel from '@/components/shared/icons/IconLabel.vue'\nimport Tag from '@/components/shared/core/Tag.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport CourseImage from '@/components/courses/CourseImage.vue'\nimport {courseCatalogApi} from '@/api/course-catalog.api.js'\nimport {openUrl} from '@/helpers/url.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {ref, onMounted} from 'vue'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Course catalog')\n\n//Composables\nconst {routeParams} = useRouting()\nconst {goToCourseCatalogOverview} = useNavigation()\n\n//Refs\nconst distribution = ref({})\nconst course = ref({})\nconst isLoading = ref(true)\n\n//Load data from API\nconst loadData = async () => {\n\n  //Try to find a valid schedule\n  try {\n\n    //Load data\n    const data = await courseCatalogApi.findById(routeParams.value.distributionId, {\n      orgSlug: routeParams.value.orgSlug,\n    })\n\n    //Set refs\n    distribution.value = data.distribution\n    course.value = data.course\n    isLoading.value = false\n  }\n  catch {\n    goToCourseCatalogOverview(routeParams.value.orgSlug)\n  }\n}\n\n//Load data when page is mounted\nonMounted(loadData)\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoading\" />\n    <PageBlock v-else>\n      <div :class=\"$style.columns\">\n        <div :class=\"$style.details\">\n          <h2>{{ course.name }}</h2>\n          <FlexRow :gap=\"0.5\">\n            <Tag\n              v-for=\"(tag, index) in course.tags\"\n              :key=\"index\"\n              :label=\"tag.label\"\n            />\n          </FlexRow>\n          <Markdown :content=\"course.description\" />\n\n          <ButtonBar :class=\"$style.buttonBar\">\n            <ActionButton\n              type=\"primary\"\n              label=\"Enroll\"\n              test-id=\"enrollButtonMobile\"\n              @click=\"openUrl(`/distributions/${distribution.id}/register`)\"\n            />\n          </ButtonBar>\n        </div>\n        <div :class=\"$style.enroll\">\n          <div\n            v-if=\"course.signedUrl\"\n            :class=\"$style.banner\"\n          >\n            <CourseImage\n              :src=\"course.signedUrl\"\n              is-contained\n            />\n          </div>\n          <h5>This course includes:</h5>\n          <FlexColumn>\n            <IconLabel icon=\"description\">\n              <Inflect\n                :count=\"course.numLessons\"\n                text=\"lesson\"\n                include-count\n              />\n            </IconLabel>\n            <IconLabel icon=\"task\">\n              <Inflect\n                :count=\"course.numQuestions\"\n                text=\"question\"\n                include-count\n              />\n            </IconLabel>\n            <Divider :has-margin=\"false\" />\n            <IconLabel\n              icon=\"schedule\"\n              :label=\"distribution.deliveryTimeOptions\"\n            />\n            <IconLabel\n              v-if=\"!distribution.binge && !distribution.isCustomByStep && !distribution.isRelativeByStep\"\n              icon=\"date_range\"\n              :label=\"distribution.deliveryDays\"\n            />\n\n            <ActionButton\n              type=\"primary\"\n              label=\"Enroll\"\n              test-id=\"enrollButton\"\n              is-block\n              @click=\"openUrl(`/distributions/${distribution.id}/register`)\"\n            />\n          </FlexColumn>\n        </div>\n      </div>\n    </PageBlock>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.columns {\n  display: flex;\n  flex-direction: column;\n  gap: 2rem;\n  @media (min-width: 1140px) {\n    flex-direction: row;\n  }\n}\n.details {\n  flex: 1;\n  order: 2;\n  @media (min-width: 1140px) {\n    order: 1;\n    .buttonBar {\n      display: none;\n    }\n  }\n}\n.enroll {\n  flex: 0 0 440px;\n  background: var(--bg-panels);\n  border-radius: var(--border-radius-m);\n  padding: 1rem;\n  order: 1;\n  @media (min-width: 1140px) {\n    order: 2;\n  }\n}\n.banner {\n  max-height: 248px; /* 16:9 aspect ratio vs the flex width */\n  margin-bottom: 2rem;\n  overflow: hidden;\n  background: var(--color-white);\n  border-radius: var(--border-radius-m);\n}\n</style>\n","<template>\n  <div :class=\"$style.sideBySide\">\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.sideBySide {\n  @media (min-width: 768px) {\n    display: flex;\n    align-items: flex-start;\n    justify-content: space-between;\n    gap: 1rem;\n    &:not(:first-child) {\n      margin-top: 1.25rem;\n    }\n    & > * {\n      flex: 1;\n      margin-top: 0 !important;\n    }\n  }\n}\n</style>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {ref, onMounted} from 'vue'\n\n//Environment\nconst {isLocal, isDev, isQa} = useEnv()\n\n//Render after a short delay to allow any page animations to complete first\nconst isRendered = ref(false)\nonMounted(() => setTimeout(() => isRendered.value = true, 500))\n\n//Visibility toggle\nconst devToolsPanel = ref(null)\nconst devToolsToggle = ref(null)\nconst {\n  isVisible,\n  toggle,\n} = useVisibilityToggle(devToolsPanel, devToolsToggle)\n</script>\n\n<template>\n  <TransitionFadeIn>\n    <div\n      v-if=\"(isLocal || isDev || isQa) && isRendered\"\n      :class=\"{\n        [$style.wrapper]: true,\n        [$style.open]: isVisible,\n      }\"\n    >\n      <div\n        ref=\"devToolsToggle\"\n        test-id=\"devToolsToggle\"\n        :class=\"$style.trigger\"\n        @click=\"toggle()\"\n      >\n        <Icon\n          icon=\"auto_fix_high\"\n          size=\"s\"\n        />\n      </div>\n      <h5 :class=\"$style.header\">\n        Dev tools\n      </h5>\n      <div\n        ref=\"devToolsPanel\"\n        :class=\"$style.content\"\n        alignment=\"right\"\n      >\n        <slot />\n      </div>\n    </div>\n  </TransitionFadeIn>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  position: fixed;\n  top: 70px;\n  right: -300px;\n  padding: 0.5rem;\n  padding-right: 0;\n  width: 300px;\n  transition: all var(--transition-cubic);\n  background: var(--color-blue); /* Intentionally not bg-status-info to be more visible */\n  border-radius: 0 0 0 var(--border-radius-m);\n  &.open {\n    right: 0;\n    box-shadow: 0 0 20px rgba(0,0,0,0.2);\n    .trigger {\n      &:hover {\n        background: var(--color-blue);\n        box-shadow: none;\n      }\n    }\n  }\n}\n.trigger {\n  position: absolute;\n  top: 0;\n  left: -40px;\n  padding: 1rem;\n  padding-right: 0.25rem;\n  border-radius: 40px 0 0 40px;\n  color: var(--color-white);\n  transition: all var(--transition-cubic-fast);\n  cursor: pointer;\n  background: var(--color-blue); /* Intentionally not bg-status-info to be more visible */\n  &:hover {\n    background: var(--color-blue-dark);\n    box-shadow: var(--box-shadow-strong);\n  }\n}\n.header {\n  margin: 0;\n  height: 40px;\n  line-height: 40px;\n  color: var(--color-white);\n}\n.content {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n  justify-content: center;\n  margin-top: 0.5rem;\n  padding: 1rem;\n  background: var(--color-white);\n  border-radius: var(--border-radius-m) 0 0 var(--border-radius-m);\n}\n</style>\n","<script setup>\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CloseButton from '@/components/shared/buttons/CloseButton.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {ref} from 'vue'\n\n//Props\ndefineProps({\n  header: {\n    type: String,\n    default: 'Example',\n  },\n  buttonLabel: {\n    type: String,\n    default: 'See example',\n  },\n})\n\n//Example dropdown opening and closing\nconst example = ref(null)\nconst {\n  isVisible,\n  toggle,\n  hide,\n} = useVisibilityToggle(example)\n</script>\n\n<template>\n  <DropdownWrapper ref=\"example\">\n    <ActionButton\n      type=\"link\"\n      :label=\"buttonLabel\"\n      @click=\"toggle()\"\n    />\n    <DropdownPanel\n      :is-visible=\"isVisible\"\n      :class=\"$style.dropdown\"\n      alignment=\"right\"\n    >\n      <div :class=\"$style.header\">\n        <h5>{{ header }}</h5>\n        <CloseButton @click=\"hide()\" />\n      </div>\n      <div :class=\"$style.content\">\n        <slot />\n      </div>\n    </DropdownPanel>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.header {\n  display: flex;\n  justify-content: space-between;\n  gap: 1rem;\n  padding-bottom: 1rem;\n}\n.dropdown {\n  margin-top: 0;\n  width: max-content;\n  min-width: 300px;\n  max-width: 450px;\n}\n.content {\n  font-weight: 400;\n}\n</style>\n","import {languages, languageOptions} from '@/constants/languages.js'\nimport {fileTypes} from '@/constants/file-types.js'\n\n//AI course creation flow steps\nexport const aiCourseCreationFlowSteps = {\n  DESCRIBE: 'describe',\n  REVIEW: 'review',\n  OUTLINE: 'outline',\n  TRANSLATE: 'translate',\n  GENERATE: 'generate',\n}\n\n//AI course creation methods\nexport const aiCourseCreationMethods = {\n  BUILD: 'build',\n  BUILD_FOR_MARKETING: 'buildForMarketing',\n  TRANSLATE: 'translate',\n  MODIFY: 'modify',\n}\n\n//AI suggestion types\nexport const aiSuggestionTypes = {\n  OBJECTIVE: 'objective',\n  KNOWLEDGE: 'knowledge',\n}\n\n//AI task types\nexport const aiTaskTypes = {\n  COURSE_GENERATION: 'course_generation',\n  COURSE_TRANSLATION: 'course_translation',\n  COURSE_MODIFICATION: 'course_modification',\n  QUESTION_MODIFICATION: 'question_modification',\n  OUTLINE_GENERATION: 'outline_generation',\n}\n\n//AI task statuses\nexport const aiTaskStatuses = {\n  INIT: 'init',\n  WAITING: 'waiting',\n  PLANNING: 'planning',\n  ANALYZING: 'analyzing',\n  GENERATING: 'generating',\n  CREATING: 'creating',\n  DONE: 'done',\n  ERROR: 'error',\n  OVERLOADED: 'overloaded',\n  WAITING_FOR_REVIEW: 'waiting_for_review',\n}\n\n//Supported source material file types\nexport const aiSourceMaterialFileTypes = [\n  fileTypes.TXT,\n  fileTypes.PDF,\n  fileTypes.DOCX,\n  fileTypes.PPTX,\n  fileTypes.JPG,\n  fileTypes.PNG,\n  fileTypes.ZIP,\n]\n\n//AI course generation supported languages\nexport const aiCourseCreationLanguageOptions = languageOptions.\n  filter(option => [\n    languages.ARABIC,\n    languages.BENGALI,\n    // languages.CHINESE,\n    // languages.SIMPLIFIED_CHINESE,\n    languages.CZECH,\n    languages.DUTCH,\n    languages.ENGLISH,\n    languages.FRENCH,\n    languages.FRENCH_CANADIAN,\n    languages.GERMAN,\n    languages.GUJARATI,\n    languages.HINDI,\n    languages.HUNGARIAN,\n    languages.INDONESIAN,\n    languages.ITALIAN,\n    languages.JAPANESE,\n    languages.JAVANESE,\n    languages.KOREAN,\n    languages.MALAY,\n    languages.MARATHI,\n    languages.PERSIAN,\n    languages.POLISH,\n    languages.PORTUGUESE,\n    languages.PUNJABI,\n    languages.ROMANIAN,\n    languages.RUSSIAN,\n    languages.SLOVAK,\n    languages.SPANISH,\n    languages.TAMIL,\n    languages.TELUGU,\n    languages.THAI,\n    languages.TURKISH,\n    languages.UKRANIAN,\n    languages.URDU,\n    languages.VIETNAMESE,\n  ].includes(option.value))\n","import {BaseModel} from '@/models/base.model.js'\nimport {aiTaskTypes} from '@/constants/ai.js'\n\n/**\n * LLM task model\n */\nexport class LLMTask extends BaseModel {\n\n  //Helpers to check the LLM task type\n  get isCourseGeneration() {\n    return this.taskType === aiTaskTypes.COURSE_GENERATION\n  }\n  get isCourseTranslation() {\n    return this.taskType === aiTaskTypes.COURSE_TRANSLATION\n  }\n  get isCourseModification() {\n    return this.taskType === aiTaskTypes.COURSE_MODIFICATION\n  }\n  get isQuestionModification() {\n    return this.taskType === aiTaskTypes.QUESTION_MODIFICATION\n  }\n  get isOutlineGeneration() {\n    return this.taskType === aiTaskTypes.OUTLINE_GENERATION\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {LLMTask} from '@/models/llm-task.model.js'\n/**\n * LLM services API service\n */\nexport class LLMServicesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/llm_services'\n  itemsKey = 'tasks'\n  ModelClass = LLMTask\n\n  /**************************************************************************\n   * Course generation\n   ***/\n\n  /**\n   * Build a new course\n   */\n  build(data) {\n    return this\n      .post('/course_generation', data)\n      .then(json => this.toModelCollection(json))\n  }\n\n  /**\n   * Translate an existing course\n   */\n  translate(data) {\n    return this\n      .post('/course_translation', data)\n      .then(json => this.toModelCollection(json))\n  }\n\n  /**\n   * Modify an existing course\n   */\n  modify(data) {\n    return this\n      .post('/course_modification', data)\n      .then(json => this.toModelCollection(json))\n  }\n\n  /**\n   * Generate outline\n   */\n  generateOutline(data) {\n    return this\n      .post('/outline_generation', data)\n      .then(json => this.toModelCollection(json))\n  }\n\n  /**************************************************************************\n   * Helper endpoints\n   ***/\n\n  /**\n   * Generate AI suggestions\n   */\n  async generateSuggestions(data, type) {\n    return this\n      .post('/suggestions_generation', {\n        ...data,\n        suggestionsType: type,\n      })\n      .then(data => data.suggestions)\n  }\n\n  /**\n   * Regenerate substep\n   *\n   * NOTE: Back end defaults trainingType to initially provided trainingType\n   * value or 'skill builing' if not provided\n  */\n  async regenerateSubstep(substepId, substepType, trainingType = null) {\n    return this\n      .post('/question_modification', {\n        substepId,\n        trainingType,\n        questionType: substepType,\n      })\n      .then(data => data.tasks[0])\n  }\n\n  /**\n   * Optimize substep (for length)\n  */\n  async optimizeSubstep(substepId) {\n    return this\n      .post('/length_modification', {substepId})\n      .then(data => data.tasks[0])\n  }\n\n  /**\n   * Upload document from URL\n   */\n  uploadUrlDocument(url) {\n    return this\n      .post(`/upload_url_document`, {url})\n  }\n\n  /**\n   * Uploads source file and returns document ID\n   */\n  uploadDocument(file, controller) {\n    return this\n      .upload(`/upload_document`, {file}, {\n        signal: controller?.signal,\n      })\n  }\n\n  /**\n   * Remove document\n   */\n  removeDocument(documentId) {\n    return this\n      .delete(`/remove_document/${documentId}`)\n  }\n\n  /**\n   * Get document status\n   */\n  getDocumentStatus(documentId) {\n    return this.get(`/document_status/${documentId}`)\n  }\n}\n\n//Export singleton instance\nexport const llmServicesApi = new LLMServicesApi()\n","import {computed} from 'vue'\n\n/**\n * Composable with helpers to work with model refs\n */\nexport function useModelRefs(model) {\n\n  //Computed refs for each model prop\n  const refs = {}\n  for (const key in model.value) {\n    refs[key] = computed({\n      get: () => model.value[key],\n      set: value => model.value[key] = value,\n    })\n  }\n\n  //Expose refs\n  return {\n    ...refs,\n  }\n}\n","import {useDebounceFn} from '@vueuse/core'\nimport {watch} from 'vue'\n\n/**\n * Apply debounced watcher to toggle a flag based on a condition\n */\nexport function useToggleDebounced(flag, ref, conditionFn, delay = 0) {\n\n  //Toggle flag if condition is met\n  const toggle = () => {\n    if (conditionFn()) {\n      flag.value = true\n    }\n  }\n\n  //Toggle debounced\n  const toggleDebounced = useDebounceFn(toggle, delay)\n\n  //Apply watcher\n  watch(ref, toggleDebounced)\n}\n","\n/**\n * Delay composable\n */\nexport function useDelay(defaultDelay = 1000) {\n\n  //Async delay helper\n  const delay = (ms = defaultDelay) => new Promise(resolve => setTimeout(resolve, ms))\n\n  //Return delay function\n  return {\n    delay,\n  }\n}\n","import {useDelay} from '@/composables/use-delay.js'\nimport {llmServicesApi} from '@/api/llm-services.api.js'\nimport {ref} from 'vue'\n\n/**\n * Document status composable\n */\nexport function useDocumentStatus() {\n\n  //Delay helper\n  const {delay} = useDelay()\n\n  //Refs\n  const documentStatus = ref('')\n  const documentMessage = ref('')\n  const documentCharacterCount = ref(0)\n  const isCancelled = ref(false)\n\n  //Reset document status\n  const resetDocumentStatus = () => {\n    documentStatus.value = ''\n    documentMessage.value = ''\n    isCancelled.value = false\n  }\n\n  //Check document status\n  const checkDocumentStatus = async (documentId, attempt = 1) => {\n\n    //No document ID\n    if (!documentId) {\n      throw new Error(`No document ID provided`)\n    }\n\n    //Cancelled\n    if (isCancelled.value) {\n      throw new Error(`Cancelled`)\n    }\n\n    //Fail if max attempts reached\n    if (attempt > 240) {\n      throw new Error(`Processing this document has timed out`)\n    }\n\n    //Get processing status\n    const data = await llmServicesApi.getDocumentStatus(documentId)\n\n    //Update status\n    documentStatus.value = data.status\n    documentMessage.value = data.message\n\n    //Update character count if given\n    if (data.characterCount) {\n      documentCharacterCount.value = data.characterCount\n    }\n\n    //Check if processing is done\n    if (data.status === 'uploaded') {\n      return data\n    }\n\n    //Check if processing has errored\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Document processing failed')\n    }\n\n    //Delay and call recursively\n    await delay()\n    return await checkDocumentStatus(documentId, attempt + 1)\n  }\n\n  //Cancel checking document status\n  const cancelCheckingDocumentStatus = () => {\n    isCancelled.value = true\n    documentStatus.value = 'cancelled'\n    documentMessage.value = 'Cancelled'\n  }\n\n  //Expose interface\n  return {\n    documentStatus,\n    documentMessage,\n    documentCharacterCount,\n    checkDocumentStatus,\n    resetDocumentStatus,\n    cancelCheckingDocumentStatus,\n  }\n}\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {useDocumentStatus} from '@/composables/use-document-status.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, watchEffect} from 'vue'\n\n/**\n * AI URL document upload composable\n */\nexport function useAIUrlDocumentUpload() {\n\n  //Source URL helper refs\n  const isProcessingSourceUrl = ref(false)\n  const isCancelled = ref(false)\n  const sourceUrlMessage = ref('')\n  const sourceUrlStatus = ref('')\n  const sourceUrlSuccess = ref(false)\n  const sourceUrlError = ref(null)\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Document status\n  const {\n    documentStatus,\n    documentMessage,\n    checkDocumentStatus,\n    resetDocumentStatus,\n    cancelCheckingDocumentStatus,\n  } = useDocumentStatus()\n\n  //Update source URL status based on document status\n  watchEffect(() => sourceUrlStatus.value = documentStatus.value)\n  watchEffect(() => sourceUrlMessage.value = documentMessage.value)\n\n  //Upload document from source URL\n  const uploadDocumentFromUrl = async sourceUrl => {\n\n    //Reset refs\n    isCancelled.value = false\n    sourceUrlError.value = ''\n    sourceUrlStatus.value = ''\n    sourceUrlMessage.value = ''\n\n    //Reset document status\n    resetDocumentStatus()\n\n    //Validate source URL\n    if (!sourceUrl.startsWith('https://') || sourceUrl.length <= 15) {\n      sourceUrlError.value = 'Invalid website link'\n      throw new Error('Invalid website link')\n    }\n\n    //Process\n    try {\n\n      //Start processing\n      isProcessingSourceUrl.value = true\n\n      //Send request\n      const data = await llmServicesApi.uploadUrlDocument(sourceUrl)\n\n      //Check status\n      const status = await checkDocumentStatus(data.documentId)\n\n      //Append character count to document data, as this is only returned\n      //with the task status, after the task has completed text exraction.\n      data.characterCount = status.characterCount\n\n      //Clear source URL value\n      sourceUrlSuccess.value = true\n      return data\n    }\n    catch (error) {\n\n      //We cancelled out of here\n      if (isCancelled.value) {\n        sourceUrlStatus.value = 'cancelled'\n        sourceUrlMessage.value = 'Cancelled'\n      }\n      else {\n        sourceUrlError.value = error\n        sourceUrlStatus.value = 'error'\n        sourceUrlMessage.value = 'Error processing website link'\n      }\n\n      //Must rethrow to avoid success handling\n      processError(error)\n      throw error\n    }\n    finally {\n      isProcessingSourceUrl.value = false\n    }\n  }\n\n  //Cancel source URL extraction\n  const cancelSourceUrlProcessing = () => {\n    isCancelled.value = true\n    isProcessingSourceUrl.value = false\n\n    //Cancel document status check\n    cancelCheckingDocumentStatus()\n  }\n\n  //Expose interface\n  return {\n    uploadDocumentFromUrl,\n    isProcessingSourceUrl,\n    sourceUrlMessage,\n    sourceUrlStatus,\n    sourceUrlError,\n    cancelSourceUrlProcessing,\n  }\n}\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {useFileUploadState} from '@/composables/use-file-upload-state.js'\nimport {useFakeProgress} from '@/composables/use-fake-progress.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDelay} from '@/composables/use-delay.js'\nimport {ref, watchEffect} from 'vue'\n\n/**\n * AI document upload composable\n */\nexport function useAIDocumentUpload(file) {\n\n  //Must initialize with file\n  if (!(file instanceof File)) {\n    throw new Error(`Please provide a File object`)\n  }\n\n  //Composables\n  const {delay} = useDelay()\n  const {processError} = useErrorHandling()\n\n  //Fake progress\n  const {\n    progress: uploadProgress,\n    startProgress,\n    setProgress,\n  } = useFakeProgress({\n    min: 0,\n    max: 0.99,\n    targetDuration: Math.max(file.size / 50, 10000),\n  })\n\n  //Upload status\n  const isUploading = ref(false)\n  const isUploadFinished = ref(false)\n  const uploadMessage = ref('')\n  const uploadStatus = ref('')\n  const uploadSuccess = ref(false)\n  const uploadError = ref(null)\n\n  //Abort upload controller\n  const controller = new AbortController()\n  const abortUpload = () => {\n    if (isUploading.value) {\n      controller.abort()\n    }\n  }\n\n  //File upload state management\n  const {updateFileUploadState} = useFileUploadState(file)\n\n  //Update state as needed\n  watchEffect(() => {\n    updateFileUploadState({\n      controller,\n      isUploading: isUploading.value,\n      isUploadFinished: isUploadFinished.value,\n      uploadProgress: uploadProgress.value,\n      uploadMessage: uploadMessage.value,\n      uploadStatus: uploadStatus.value,\n      uploadSuccess: uploadSuccess.value,\n      uploadError: uploadError.value,\n    })\n  })\n\n  //Upload document\n  const uploadDocument = async () => {\n\n    //Update uploading state\n    isUploading.value = true\n    uploadMessage.value = 'Uploading...'\n\n    //Upload file and return document ID\n    return await llmServicesApi.uploadDocument(file, controller)\n  }\n\n  //Wrapper to upload and process image\n  const upload = async () => {\n\n    //Force the consumer of this composable to use it only once per file\n    if (isUploading.value || isUploadFinished.value) {\n      throw new Error(`Upload already in progress/finished. Please initialize a new upload with useAIDocumentUpload(file) to upload additional files.`)\n    }\n\n    //Start progress\n    startProgress()\n\n    //Wrap in try block\n    try {\n\n      //Upload document\n      const data = await uploadDocument()\n      setProgress(1)\n\n      //Successful upload\n      uploadSuccess.value = true\n      return data\n    }\n    catch (error) {\n      uploadError.value = error\n      uploadStatus.value = 'error'\n      uploadMessage.value = 'Error uploading file'\n      processError(error)\n      throw error\n    }\n    finally {\n      setProgress(1)\n      await delay(250) //Delay a bit so the user can see the final upload message\n      isUploading.value = false\n      isUploadFinished.value = true\n    }\n  }\n\n  //Expose interface\n  return {\n    upload,\n    abortUpload,\n    isUploading,\n    isUploadFinished,\n    uploadProgress,\n    uploadMessage,\n    uploadStatus,\n    uploadError,\n  }\n}\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {aiSuggestionTypes} from '@/constants/ai.js'\nimport {flatArrayToOptions} from '@/helpers/options.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {computed, ref, watch} from 'vue'\n\n/**\n * AI suggestions composable\n */\nexport function useAISuggestions(type, sourceData) {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const suggestions = ref([])\n  const isLoadingSuggestions = ref(false)\n  const isErrorLoadingSuggestions = ref(false)\n\n  //Relevant keys for data depend on type\n  const keys = computed(() => {\n    if (type === aiSuggestionTypes.OBJECTIVE) {\n      return ['topic', 'audience']\n    }\n    else if (type === aiSuggestionTypes.KNOWLEDGE) {\n      return ['topic', 'audience', 'objective']\n    }\n    return []\n  })\n\n  //Load suggestions\n  const loadSuggestions = async (attempt = 1) => {\n\n    //Avoid loading again when already loading, unless new attempt\n    if (isLoadingSuggestions.value && attempt === 1) {\n      return\n    }\n\n    //Reset flags\n    isErrorLoadingSuggestions.value = true\n    isLoadingSuggestions.value = true\n\n    //Load now\n    try {\n      const data = {}\n      for (const key of keys.value) {\n        data[key] = sourceData[key].value\n        if (!data[key]) {\n          return\n        }\n      }\n      const array = await llmServicesApi.generateSuggestions(data, type)\n      suggestions.value = flatArrayToOptions(array.slice(0, 3))\n    }\n    catch (error) {\n      if (attempt < 3) {\n        return loadSuggestions(++attempt)\n      }\n      isErrorLoadingSuggestions.value = true\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingSuggestions.value = false\n    }\n  }\n\n  //Debounced loader\n  const loadDebounced = useDebounceFn(loadSuggestions, 500)\n\n  //Reload suggestions when refs change\n  const refs = keys.value.map(key => sourceData[key])\n  watch(refs, values => {\n    if (values.every(value => !!value)) {\n      loadDebounced()\n    }\n  })\n\n  //Expose interface\n  return {\n    suggestions,\n    isLoadingSuggestions,\n    isErrorLoadingSuggestions,\n    loadSuggestions,\n  }\n}\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageFiller from '@/components/shared/page/PageFiller.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport FileSelect from '@/components/shared/file/FileSelect.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Number from '@/components/shared/transform/Number.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport ExternalLink from '@/components/shared/links/ExternalLink.vue'\nimport DevTools from '@/components/shared/dev/DevTools.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport RegenerateButton from '@/components/shared/buttons/RegenerateButton.vue'\nimport Suggestions from '@/components/shared/form/Suggestions.vue'\nimport ExampleDropdown from '@/components/shared/dropdown/ExampleDropdown.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport {\n  courseTrainingTypes,\n  courseTrainingTypeOptions,\n  courseExpertiseLevels,\n  courseExpertiseLevelOptions,\n  courseLengthOptions,\n  characterLimits\n} from '@/constants/courses.js'\nimport {\n  aiSuggestionTypes,\n  aiCourseCreationLanguageOptions,\n  aiSourceMaterialFileTypes\n} from '@/constants/ai.js'\nimport {pickRandom} from '@/helpers/random.js'\nimport {llmServicesApi} from '@/api/llm-services.api.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useModelRefs} from '@/composables/use-model-refs.js'\nimport {useToggleDebounced} from '@/composables/use-toggle-debounced.js'\nimport {useAIUrlDocumentUpload} from '@/composables/use-ai-url-document-upload.js'\nimport {useAIDocumentUpload} from '@/composables/use-ai-document-upload.js'\nimport {useAISuggestions} from '@/composables/use-ai-suggestions.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useDebounceFn} from '@vueuse/core'\nimport {toRefs, ref, computed, watch, nextTick} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'cancel',\n  'continue',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isForMarketing: {\n    type: Boolean,\n    default: false,\n  },\n  isQueueingOutlineGeneration: {\n    type: Boolean,\n    default: false,\n  },\n  isQueueingCourseGeneration: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {\n  model,\n  isForMarketing,\n  isQueueingOutlineGeneration,\n  isQueueingCourseGeneration,\n} = toRefs(props)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Source URL extraction\nconst sourceUrl = ref('')\nconst {\n  uploadDocumentFromUrl,\n  isProcessingSourceUrl,\n  sourceUrlError,\n  cancelSourceUrlProcessing,\n} = useAIUrlDocumentUpload()\n\n//Update source URL\nconst updateSourceUrl = url => {\n  sourceUrl.value = url\n  sourceUrlError.value = ''\n}\n\n//Process URL\nconst processUrl = async () => {\n\n  //Check if already have this URL\n  if (model.value.documents.some(d => d.url === sourceUrl.value)) {\n    sourceUrl.value = ''\n    return\n  }\n\n  //Process\n  try {\n    const document = await uploadDocumentFromUrl(sourceUrl.value)\n    updateModel({documents: [...model.value.documents, document]})\n    nextTick(() => sourceUrl.value = '')\n  }\n  catch {\n    //Handled by composable\n  }\n}\n\n//Get model refs for debounced toggling of next form sections\nconst {\n  topic,\n  trainingType,\n  audience,\n  expertise,\n  expertiseCustom,\n  objective,\n  knowledge,\n  numLessons,\n  targetLanguage,\n  documents,\n} = useModelRefs(model)\n\n//Split documents by file/URL\nconst fileDocs = computed(() => documents.value.filter(d => d.fileName))\nconst urlDocs = computed(() => documents.value.filter(d => d.url))\n\n//Flags to indicate visibility of form sections\nconst isCustomExpertise = computed(() => expertise.value === courseExpertiseLevels.CUSTOM)\nconst hasExpertise = computed(() => expertise.value && (!isCustomExpertise.value || expertiseCustom.value))\nconst showAudience = ref(topic.value && trainingType.value)\nconst showObjective = ref(audience.value && hasExpertise.value)\nconst showKnowledge = ref(objective.value)\nconst showLessons = ref(knowledge.value)\nconst showUpload = ref(numLessons.value && targetLanguage.value)\nconst showEmail = computed(() => isForMarketing.value && showUpload.value)\n\n//These toggles will show the next form section to the user once they have filled out the previous one\n//A longer delay is applied for text fields, to avoid jarring the user while they are still typing\nuseToggleDebounced(showAudience, topic, () => topic.value && trainingType.value, 1000)\nuseToggleDebounced(showAudience, trainingType, () => topic.value && trainingType.value, 250)\nuseToggleDebounced(showObjective, audience, () => audience.value && hasExpertise.value, 1000)\nuseToggleDebounced(showObjective, hasExpertise, () => audience.value && hasExpertise.value && isCustomExpertise.value, 1000)\nuseToggleDebounced(showObjective, hasExpertise, () => audience.value && hasExpertise.value && !isCustomExpertise.value, 250)\nuseToggleDebounced(showKnowledge, objective, () => objective.value, 1000)\nuseToggleDebounced(showLessons, knowledge, () => knowledge.value, 1000)\nuseToggleDebounced(showUpload, numLessons, () => numLessons.value && targetLanguage.value, 250)\nuseToggleDebounced(showUpload, targetLanguage, () => numLessons.value && targetLanguage.value, 250)\n\n//Show filler at bottom of page\nconst showFiller = computed(() => !isForMarketing.value && !showUpload.value)\n\n//Scroll to bottom of page each time a new section is shown\nconst {scrollToBottom} = usePage()\nconst scrollToBottomDebounced = useDebounceFn(scrollToBottom, 250)\nconst isTestFill = ref(false)\nwatch([\n  showAudience,\n  showObjective,\n  showKnowledge,\n  showLessons,\n  showUpload,\n  showEmail,\n], () => {\n  if (!isTestFill.value) {\n    scrollToBottomDebounced('smooth')\n  }\n})\n\n//Validation\nconst {required, requiredIf, email, maxLength} = useValidators()\nconst rules = {\n  topic: {required: required('Topic')},\n  trainingType: {required: required('Training type')},\n  audience: {required: required('Target audience')},\n  expertise: {required: required('Expertise level')},\n  expertiseCustom: {required: requiredIf('Custom expertise level', () => expertise.value === courseExpertiseLevels.CUSTOM)},\n  objective: {required: required('Desired outcome')},\n  knowledge: {required: required('Knowledge components ')},\n  numLessons: {required: required('Number of lessons')},\n  targetLanguage: {required: required('Primary language')},\n  sourceText: {maxLength: maxLength(characterLimits.SOURCE_TEXT)},\n}\nif (isForMarketing.value) {\n  rules.email = {email, required: required('Your email')}\n}\nconst $v = useVuelidate(rules, model, {$autoDirty: true})\n\n//AI suggestions\nconst {\n  suggestions: objectiveSuggestions,\n  loadSuggestions: loadObjectiveSuggestions,\n  isLoadingSuggestions: isLoadingObjectiveSuggestions,\n} = useAISuggestions(aiSuggestionTypes.OBJECTIVE, {topic, audience})\nconst {\n  suggestions: knowledgeSuggestions,\n  loadSuggestions: loadKnowledgeSuggestions,\n  isLoadingSuggestions: isLoadingKnowledgeSuggestions,\n} = useAISuggestions(aiSuggestionTypes.KNOWLEDGE, {topic, audience, objective})\n\n//Check if over total source material char count limit\nconst docCharCount = computed(() => documents.value.reduce((total, doc) => total + (doc.characterCount || 0), 0))\nconst totalCharCount = computed(() => docCharCount.value + model.value.sourceText.length)\nconst isOverSourceMaterialLimit = computed(() => totalCharCount.value > characterLimits.SOURCE_MATERIAL_TOTAL)\n\n//File upload refs\nconst fileSelect = ref(null)\nconst uploadQueue = ref([])\nconst currentUpload = ref(null)\nconst isUploading = computed(() => !!currentUpload.value || uploadQueue.value.length > 0)\nconst maxNumFiles = ref(isForMarketing.value ? 5 : 0)\n\n//Add files to upload queue\nconst addFilesToQueue = files => {\n  uploadQueue.value = [...uploadQueue.value, ...files]\n  uploadNextFileInQueue()\n}\n\n//Remove file from upload queue\nconst removeFileFromQueue = file => {\n  uploadQueue.value = uploadQueue.value.filter(f => f !== file)\n}\n\n//Cancel file upload (aborts any upload in flight)\nconst cancelFileUpload = file => {\n  if (currentUpload.value?.file === file) {\n    currentUpload.value.abortUpload()\n  }\n  removeFileFromQueue(file)\n}\n\n//Upload a file\nconst uploadFile = async file => {\n  try {\n\n    //Ensure file not already uploaded\n    if (model.value.documents.some(d => d.fileName === file.name)) {\n      fileSelect.value.removeFile(file)\n      return\n    }\n\n    //Check max number of files\n    if (maxNumFiles.value && fileDocs.value.length >= maxNumFiles.value) {\n      fileSelect.value.removeFile(file)\n      return\n    }\n\n    //Use document upload and set current upload\n    const {upload, abortUpload} = useAIDocumentUpload(file)\n    currentUpload.value = {file, abortUpload}\n\n    //Upload file and update model on success\n    const document = await upload()\n    updateModel({documents: [...model.value.documents, document]})\n\n    //Remove from the file selector\n    nextTick(() => fileSelect.value.removeFile(file))\n  }\n  catch {\n    //Handled by file details component and useAIDocumentUpload composable\n  }\n  finally {\n    currentUpload.value = null\n    uploadNextFileInQueue()\n  }\n}\n\n//Upload next file in queue\nconst uploadNextFileInQueue = () => {\n  if (currentUpload.value) {\n    return\n  }\n  if (uploadQueue.value.length === 0) {\n    return\n  }\n  const file = uploadQueue.value.shift()\n  uploadFile(file)\n}\n\n//Remove uploaded document\nconst removeDocument = async document => {\n\n  //Remove from model\n  updateModel({documents: model.value.documents.filter(d => d !== document)})\n  if (!document.documentId) {\n    return\n  }\n\n  //Remove from server\n  try {\n    await llmServicesApi.removeDocument(document.documentId)\n  }\n  catch {\n    //Allow to fail silently\n  }\n}\n\n//Dev tools\nconst testFillOutForm = () => {\n  isTestFill.value = true\n  const audience = pickRandom([\n    'Project managers',\n    'Team leads',\n    'Scrum masters',\n    'Product owners',\n    'Business analysts',\n  ])\n  updateModel({\n    topic: topic.value || pickRandom([\n      'Project management',\n      'Leadership',\n      'Team building',\n      'Conflict resolution',\n    ]),\n    trainingType: pickRandom(courseTrainingTypeOptions).value,\n    audience,\n    expertise: pickRandom(\n      courseExpertiseLevelOptions.filter(o => o.value !== courseExpertiseLevels.CUSTOM)\n    ).value,\n    objective: `${audience} can apply strategies to lead productive meetings.`,\n    knowledge: `${audience} need to know when to schedule meetings, how to prepare by building an agenda, strategies to conduct a meeting, and how to follow-up after a meeting to ensure deliverables.`,\n    numLessons: 3,\n  })\n  setTimeout(() => scrollToBottom(), 950)\n}\n\n//Hide dev tools before going to next step\nconst hideDevTools = ref(false)\nconst continueToNextStep = () => {\n  hideDevTools.value = true\n  nextTick(() => emit('continue'))\n}\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader header=\"To begin using the AI course builder, please describe your course by answering the following questions\" />\n\n    <TransitionGroup\n      :enter-active-class=\"$style.from\"\n      :leave-active-class=\"$style.from\"\n      :enter-from-class=\"$style.to\"\n      :leave-to-class=\"$style.to\"\n    >\n      <PageBlock\n        key=\"topic\"\n        header=\"What is this course about?\"\n        is-required\n      >\n        <template #headerAside>\n          <ExampleDropdown\n            header=\"Recommendations\"\n            button-label=\"Recommendations\"\n          >\n            <p>What each training type should be used for:</p>\n            <ul>\n              <li><strong>Awareness building</strong>: Introduce new concepts and ideas.</li>\n              <li><strong>Reinforcement</strong>: Strengthen existing knowledge.</li>\n              <li><strong>Skill building</strong>: Develop practical abilities.</li>\n              <li><strong>Product training</strong>: Educate learners about products.</li>\n              <li><strong>Onboarding</strong>: Integrate and onboard new employees.</li>\n              <li><strong>Compliance</strong>: Ensure regulatory adherence.</li>\n              <!-- <li><strong>Knowledge checks</strong>: Assess information retention.</li> -->\n            </ul>\n          </ExampleDropdown>\n        </template>\n\n        <FormField\n          label=\"Describe the course topic\"\n          :errors=\"$v.topic.$errors\"\n        >\n          <TextInput\n            test-id=\"topic\"\n            :focus-on-mount=\"!isForMarketing\"\n            :value=\"model.topic\"\n            :has-error=\"$v.topic.$error\"\n            is-multiline\n            placeholder=\"Type course topic here\"\n            @input=\"updateModel({topic: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          label=\"Choose the training type\"\n          :errors=\"$v.trainingType.$errors\"\n          is-half-width\n        >\n          <SelectInput\n            required\n            test-id=\"trainingType\"\n            placeholder=\"Select training type\"\n            :options=\"courseTrainingTypeOptions\"\n            :value=\"model.trainingType\"\n            :has-error=\"$v.trainingType.$error\"\n            @input=\"updateModel({trainingType: $event.value})\"\n          />\n        </FormField>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showAudience\"\n        key=\"audience\"\n        header=\"Who is the target audience for this course?\"\n        is-required\n      >\n        <FormField\n          label=\"Audience\"\n          :errors=\"$v.audience.$errors\"\n        >\n          <TextInput\n            test-id=\"audience\"\n            :value=\"model.audience\"\n            :has-error=\"$v.audience.$error\"\n            is-multiline\n            placeholder=\"E.g. Project managers\"\n            @input=\"updateModel({audience: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          label=\"Expertise level\"\n          is-half-width\n          :errors=\"$v.expertise.$errors\"\n        >\n          <SelectInput\n            test-id=\"expertise\"\n            placeholder=\"Select expertise level\"\n            :options=\"courseExpertiseLevelOptions\"\n            :value=\"model.expertise\"\n            :has-error=\"$v.expertise.$error\"\n            @input=\"updateModel({expertise: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          v-if=\"model.expertise === courseExpertiseLevels.CUSTOM\"\n          label=\"Describe the audience's knowledge level on the course topic\"\n          :errors=\"$v.expertiseCustom.$errors\"\n        >\n          <TextInput\n            test-id=\"expertiseCustom\"\n            :value=\"model.expertiseCustom\"\n            :has-error=\"$v.expertiseCustom.$error\"\n            is-multiline\n            placeholder=\"E.g. Mid-level project manager with limited AI knowledge, looking to boost efficiency with AI.\"\n            @input=\"updateModel({expertiseCustom: $event.value})\"\n          />\n        </FormField>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showObjective\"\n        key=\"objective\"\n        header=\"What specific action or behavior do you want your learners to demonstrate by the end of this course?\"\n        is-required\n      >\n        <template #headerAside>\n          <ExampleDropdown>\n            <p>Project managers can apply strategies to lead productive meetings.</p>\n          </ExampleDropdown>\n        </template>\n\n        <FormField\n          label=\"Describe the desired outcome\"\n          :errors=\"$v.objective.$errors\"\n        >\n          <TextInput\n            test-id=\"objective\"\n            :value=\"model.objective\"\n            :has-error=\"$v.objective.$error\"\n            placeholder=\"Start typing here\"\n            is-multiline\n            @input=\"updateModel({objective: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          v-if=\"objectiveSuggestions.length > 0 || isLoadingObjectiveSuggestions\"\n          label=\"AI suggestions:\"\n          is-muted\n        >\n          <Spinner\n            v-if=\"isLoadingObjectiveSuggestions\"\n            test-id=\"objectiveSuggestionsSpinner\"\n          />\n          <Suggestions\n            v-else\n            test-id=\"objectiveSuggestions\"\n            :options=\"objectiveSuggestions\"\n            @input=\"updateModel({objective: $event.value})\"\n          />\n\n          <template #aside>\n            <RegenerateButton\n              test-id=\"regenerateObjectiveSuggestions\"\n              :is-disabled=\"isLoadingObjectiveSuggestions\"\n              @click=\"loadObjectiveSuggestions()\"\n            />\n          </template>\n        </FormField>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showKnowledge\"\n        key=\"knowledge\"\n        header=\"What knowledge do your learners need to have to demonstrate that behavior?\"\n        is-required\n      >\n        <template #headerAside>\n          <ExampleDropdown>\n            <p>Project managers need to know when to schedule meetings, how to prepare by building an agenda, strategies to conduct a meeting, and how to follow-up after a meeting to ensure deliverables.</p>\n          </ExampleDropdown>\n        </template>\n\n        <FormField\n          label=\"Describe the necessary knowledge components\"\n          :errors=\"$v.knowledge.$errors\"\n        >\n          <TextInput\n            test-id=\"knowledge\"\n            :value=\"model.knowledge\"\n            :has-error=\"$v.knowledge.$error\"\n            placeholder=\"Start typing here\"\n            is-multiline\n            @input=\"updateModel({knowledge: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          v-if=\"knowledgeSuggestions.length > 0 || isLoadingKnowledgeSuggestions\"\n          label=\"AI suggestions:\"\n          is-muted\n        >\n          <Spinner\n            v-if=\"isLoadingKnowledgeSuggestions\"\n            test-id=\"knowledgeSuggestionsSpinner\"\n          />\n          <Suggestions\n            v-else\n            test-id=\"knowledgeSuggestions\"\n            :options=\"knowledgeSuggestions\"\n            @input=\"updateModel({knowledge: $event.value})\"\n          />\n\n          <template #aside>\n            <RegenerateButton\n              test-id=\"regenerateKnowledgeSuggestions\"\n              :is-disabled=\"isLoadingKnowledgeSuggestions\"\n              @click=\"loadKnowledgeSuggestions()\"\n            />\n          </template>\n        </FormField>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showLessons\"\n        key=\"lessons\"\n        header=\"Choose the course length and language\"\n        is-required\n      >\n        <template #headerAside>\n          <ExampleDropdown\n            header=\"Recommendations\"\n            button-label=\"Recommendations\"\n          >\n            <ul unordered-list>\n              <li>3-4 lessons are best for reinforcement, knowledge checks, awareness building</li>\n              <li>5-6 lessons are best for skill-building, product training, and compliance courses</li>\n              <li>7-10 lessons are best for onboarding, spaced reinforcement, or training + application</li>\n            </ul>\n          </ExampleDropdown>\n        </template>\n\n        <SideBySide>\n          <FormField\n            label=\"Number of lessons\"\n            :errors=\"$v.numLessons.$errors\"\n          >\n            <SelectInput\n              required\n              test-id=\"numLessons\"\n              placeholder=\"Recommended 5-7\"\n              :options=\"courseLengthOptions\"\n              :value=\"model.numLessons\"\n              :has-error=\"$v.numLessons.$error\"\n              @input=\"updateModel({numLessons: $event.value})\"\n            />\n          </FormField>\n\n          <FormField\n            label=\"Primary language for this course\"\n            :errors=\"$v.targetLanguage.$errors\"\n            message=\"You can always add more translations with AI later\"\n          >\n            <SelectInput\n              required\n              test-id=\"targetLanguage\"\n              placeholder=\"Select language\"\n              :options=\"aiCourseCreationLanguageOptions\"\n              :value=\"model.targetLanguage\"\n              :has-error=\"$v.targetLanguage.$error\"\n              @input=\"updateModel({targetLanguage: $event.value})\"\n            />\n          </FormField>\n        </SideBySide>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showUpload\"\n        key=\"upload\"\n        header=\"Share any content you want to use as source material to create this course\"\n      >\n        <FormField\n          v-if=\"!maxNumFiles || fileDocs.length < maxNumFiles\"\n          label=\"Upload any relevant material\"\n          :sub-label=\"isForMarketing ? 'You can upload a maximum of 5 documents. Please choose your uploads carefully to make the most of your trial experience.' : ''\"\n          is-optional\n        >\n          <template #aside>\n            <ExampleDropdown\n              v-if=\"model.trainingType\"\n              header=\"Recommendations\"\n              button-label=\"Recommendations\"\n            >\n              <ul v-if=\"model.trainingType === courseTrainingTypes.AWARENESS_BUILDING\">\n                <li>Infographics</li>\n                <li>Articles and blog posts</li>\n                <li>Case studies</li>\n                <li>Industry reports</li>\n                <li>Newsletters</li>\n                <li>Webinar PowerPoints</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.REINFORCEMENT\">\n                <li>Workshop or Webinar PowerPoints</li>\n                <li>Infographics</li>\n                <li>Quizzes and assessments</li>\n                <li>Meeting materials</li>\n                <li>Learning modules SCORM files</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.SKILL_BUILDING\">\n                <li>Step-by-step guides</li>\n                <li>Workshop PowerPoints or PDFs</li>\n                <li>Learning modules SCORM files</li>\n                <li>Articles</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.PRODUCT_TRAINING\">\n                <li>Product manuals</li>\n                <li>Job aids</li>\n                <li>FAQs</li>\n                <li>Troubleshooting guides</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.ONBOARDING\">\n                <li>Company whitepaper</li>\n                <li>About us page</li>\n                <li>Employee handbook</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.COMPLIANCE\">\n                <li>Company policy and procedure documents</li>\n                <li>Training videos</li>\n                <li>Learning modules SCORM files</li>\n                <li>Industry guidelines</li>\n                <li>Regulatory documents</li>\n              </ul>\n              <ul v-else-if=\"model.trainingType === courseTrainingTypes.KNOWLEDGE_CHECKS\">\n                <li>Quiz SCORM files</li>\n                <li>\n                  Original Course content\n                  <ul unordered-list>\n                    <li>Learning Modules SCORM files</li>\n                    <li>Arist course PDF</li>\n                    <li>Curriculum outline</li>\n                    <li>In-person training PowerPoint or script</li>\n                  </ul>\n                </li>\n              </ul>\n            </ExampleDropdown>\n          </template>\n\n          <FileSelect\n            ref=\"fileSelect\"\n            :allowed-file-types=\"aiSourceMaterialFileTypes\"\n            allow-multiple\n            max-file-size=\"50MB\"\n            :max-num-files=\"maxNumFiles\"\n            help-text=\"Upload source materials for your course. The AI will process these during course generation.\"\n            @appended-files=\"addFilesToQueue($event.files)\"\n            @removed-file=\"cancelFileUpload($event.file)\"\n          />\n        </FormField>\n\n        <FormField\n          v-if=\"fileDocs.length > 0\"\n          label=\"Uploaded material\"\n        >\n          <FlexColumn :with-gap=\"false\">\n            <FlexRow\n              v-for=\"document in fileDocs\"\n              :key=\"document.documentId\"\n            >\n              <TextLink\n                :text=\"document.fileName\"\n                :is-clickable=\"false\"\n              />\n              <Tooltip text=\"Remove file\">\n                <RemoveButton\n                  icon=\"close\"\n                  @click=\"removeDocument(document)\"\n                />\n              </Tooltip>\n            </FlexRow>\n          </FlexColumn>\n        </FormField>\n\n        <FormField\n          label=\"Provide a website link\"\n          :error=\"sourceUrlError\"\n          is-optional\n        >\n          <TextInput\n            test-id=\"sourceUrl\"\n            type=\"url\"\n            placeholder=\"Paste link to website here\"\n            :value=\"sourceUrl\"\n            :has-error=\"!!sourceUrlError\"\n            :has-spinner=\"isProcessingSourceUrl\"\n            :is-disabled=\"isProcessingSourceUrl\"\n            select-on-focus\n            @input=\"updateSourceUrl($event.value)\"\n          />\n\n          <ActionButton\n            v-if=\"isProcessingSourceUrl\"\n            type=\"secondary\"\n            label=\"Cancel\"\n            @click=\"cancelSourceUrlProcessing()\"\n          />\n          <ActionButton\n            v-else\n            type=\"secondary\"\n            label=\"Add website\"\n            :is-disabled=\"!sourceUrl || isProcessingSourceUrl || isQueueingCourseGeneration || isQueueingOutlineGeneration\"\n            @click=\"processUrl()\"\n          />\n        </FormField>\n\n        <FormField\n          v-if=\"urlDocs.length > 0\"\n          label=\"Websites to use\"\n        >\n          <FlexColumn :with-gap=\"false\">\n            <FlexRow\n              v-for=\"(document, index) in urlDocs\"\n              :key=\"document.documentId\"\n            >\n              <ExternalLink\n                :url=\"document.url\"\n              />\n              <Tooltip text=\"Remove website\">\n                <RemoveButton\n                  :test-id=\"`removeDocument_${index}`\"\n                  icon=\"close\"\n                  @click=\"removeDocument(document)\"\n                />\n              </Tooltip>\n            </FlexRow>\n          </FlexColumn>\n        </FormField>\n\n        <FormField\n          label=\"Enter text manually\"\n          is-optional\n        >\n          <TextInput\n            test-id=\"sourceText\"\n            :value=\"model.sourceText\"\n            :has-error=\"$v.sourceText.$error\"\n            placeholder=\"Enter source material text\"\n            is-multiline\n            :character-limit=\"characterLimits.SOURCE_TEXT\"\n            @input=\"updateModel({sourceText: $event.value})\"\n          />\n        </FormField>\n\n        <FormField\n          label=\"Source material usage\"\n          help=\"When enabled, the AI will generate course content exclusively considering the information from the source material you provide, without referring to online sources.\"\n        >\n          <Toggle\n            test-id=\"useProvidedSourceMaterialOnly\"\n            label=\"Keep AI focused on only the materials I've provided above\"\n            :is-checked=\"model.useProvidedSourceMaterialOnly\"\n            :is-disabled=\"!model.sourceText && model.documents.length === 0\"\n            @click=\"updateModel({useProvidedSourceMaterialOnly: !model.useProvidedSourceMaterialOnly})\"\n          />\n        </FormField>\n\n        <Alert\n          v-if=\"isOverSourceMaterialLimit\"\n          type=\"danger\"\n        >\n          The total character count of all source material (<Number\n            :number=\"totalCharCount\"\n            :options=\"{maximumFractionDigits: 0}\"\n          />) exceeds the maximum limit of <Number\n            :number=\"characterLimits.SOURCE_MATERIAL_TOTAL\"\n            :options=\"{maximumFractionDigits: 0}\"\n          />. Please remove some content to proceed.\n        </Alert>\n      </PageBlock>\n\n      <PageBlock\n        v-if=\"showEmail\"\n        key=\"email\"\n        header=\"Enter your work email to receive your course\"\n        is-required\n      >\n        <FormField\n          label=\"Work email\"\n          :errors=\"$v.email.$errors\"\n        >\n          <TextInput\n            test-id=\"email\"\n            :value=\"model.email\"\n            :has-error=\"$v.email.$error\"\n            placeholder=\"example@arist.co\"\n            @input=\"updateModel({email: $event.value})\"\n          />\n        </FormField>\n      </PageBlock>\n    </TransitionGroup>\n\n    <PageFiller :height=\"showFiller ? 200 : 0\" />\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"!isForMarketing\"\n        :label-confirm=\"isForMarketing ? 'Generate your course' : 'Continue'\"\n        :is-disabled-confirm=\"$v.$invalid || isUploading || isProcessingSourceUrl || isQueueingCourseGeneration || isQueueingOutlineGeneration || isOverSourceMaterialLimit\"\n        :has-spinner-confirm=\"isQueueingCourseGeneration || isQueueingOutlineGeneration\"\n        @confirm=\"continueToNextStep()\"\n        @cancel=\"$emit('cancel')\"\n      />\n    </template>\n\n    <DevTools v-if=\"!hideDevTools\">\n      <ActionButton\n        type=\"secondary\"\n        icon=\"notes\"\n        label=\"Fill out form\"\n        @click=\"testFillOutForm()\"\n      />\n    </DevTools>\n  </FlowStep>\n</template>\n\n<style module lang=\"scss\">\n.from {\n  transition: all var(--transition-cubic);\n}\n.to {\n  transform: scale(0.75) translateY(-5rem);\n  opacity: 0;\n}\n</style>\n","<script setup>\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  text: {\n    type: String,\n    default: '',\n  },\n  limit: {\n    type: Number,\n    default: 0,\n  },\n  breakSpaces: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Composables\nconst {text, limit} = toRefs(props)\nconst limitedText = computed(() => {\n  if (limit.value) {\n    const limited = text.value.slice(0, limit.value)\n    if (limited.length < text.value.length) {\n      return `${limited}...`\n    }\n    return limited\n  }\n  return text.value\n})\n</script>\n\n<template>\n  <div :class=\"$style.text\">\n    <span :class=\"$style.breakSpaces\">{{ limitedText }}</span>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.text {\n  &:not(:first-child) {\n    margin-top: 1rem;\n  }\n}\n.breakSpaces {\n  white-space: pre-wrap;\n  word-wrap: break-word;\n  word-break: break-all;\n  overflow-wrap: break-word;\n  hyphens: auto;\n}\n</style>\n","<script setup>\nimport FlexColumn from '@/components//shared/core/FlexColumn.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport SummaryBlock from '@/components/shared/page/SummaryBlock.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport ExternalLink from '@/components/shared/links/ExternalLink.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport ShowMoreLink from '@/components/shared/links/ShowMoreLink.vue'\nimport FormattedText from '@/components/shared/transform/FormattedText.vue'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {openUrl} from '@/helpers/url.js'\nimport {aiCourseCreationLanguageOptions} from '@/constants/ai.js'\nimport {\n  courseTrainingTypeOptions,\n  courseExpertiseLevelOptions\n} from '@/constants/courses.js'\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  data: {\n    type: Object,\n    required: true,\n  },\n  header: {\n    type: String,\n    default: 'Prompts used to generate course',\n  },\n  showOutline: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {data} = toRefs(props)\n\n//Split documents into files and URLs\nconst fileDocs = computed(() => data.value?.documents?.filter(d => d.fileName) || [])\nconst urlDocs = computed(() => data.value?.documents?.filter(d => d.url) || [])\n\n//Show/hide additional text\nconst {\n  isValue: isShowingText,\n  setTrue: renderText,\n} = useValueToggle()\n</script>\n\n<template>\n  <PageBlock :header=\"header\">\n    <template #headerAside>\n      <slot name=\"headerAside\" />\n    </template>\n    <SummaryBlock\n      v-if=\"data.courseName\"\n      label=\"Original course\"\n    >\n      {{ data.courseName }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.revisionFocus\"\n      label=\"What should this new course focus on?\"\n    >\n      {{ data.revisionFocus }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.topic\"\n      label=\"What is this course about?\"\n    >\n      {{ data.topic }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.trainingType\"\n      label=\"Type of course\"\n    >\n      <LabelValue\n        :value=\"data.trainingType\"\n        :options=\"courseTrainingTypeOptions\"\n      />\n    </SummaryBlock>\n\n    <SummaryBlock\n      v-if=\"data.audience\"\n      label=\"Who is the target audience for the course?\"\n    >\n      {{ data.audience }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.expertise || data.expertiseCustom\"\n      label=\"What is their expertise level?\"\n    >\n      <span v-if=\"data.expertiseCustom\">\n        {{ data.expertiseCustom }}\n        <br><small text-muted>(custom)</small>\n      </span>\n      <LabelValue\n        v-else\n        :value=\"data.expertise\"\n        :options=\"courseExpertiseLevelOptions\"\n      />\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.objective\"\n      label=\"What specific behavior should learners demonstrate at the end of this course?\"\n    >\n      {{ data.objective }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.knowledge\"\n      label=\"What knowledge components do they need to have?\"\n    >\n      {{ data.knowledge }}\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.numLessons\"\n      label=\"How long should this course be?\"\n    >\n      {{ data.numLessons }} lessons\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.targetLanguage\"\n      label=\"Course language\"\n    >\n      <LabelValue\n        :value=\"data.targetLanguage\"\n        :options=\"aiCourseCreationLanguageOptions\"\n      />\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"fileDocs.length > 0\"\n      label=\"Files used\"\n    >\n      <FlexColumn with-small-gap>\n        <TextLink\n          v-for=\"document in fileDocs\"\n          :key=\"document.documentId\"\n          :text=\"document.fileName\"\n          :is-clickable=\"false\"\n        />\n      </FlexColumn>\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"urlDocs.length > 0\"\n      label=\"Websites used\"\n    >\n      <FlexColumn with-small-gap>\n        <ExternalLink\n          v-for=\"document in urlDocs\"\n          :key=\"document.documentId\"\n          :url=\"document.url\"\n          @click.prevent=\"openUrl(document.url, null, true)\"\n        />\n      </FlexColumn>\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"data.sourceText\"\n      label=\"Additional content used\"\n    >\n      <ShowMoreLink\n        v-if=\"!isShowingText\"\n        test-id=\"showAdditionalContent\"\n        text=\"Show additional content\"\n        @click=\"renderText()\"\n      />\n      <FormattedText\n        v-else\n        :text=\"data.sourceText\"\n        :limit=\"2500\"\n        break-spaces\n      />\n    </SummaryBlock>\n    <SummaryBlock\n      v-if=\"showOutline && data.outline\"\n      label=\"Course outline\"\n    >\n      <FormattedText\n        :text=\"data.outline\"\n        break-spaces\n      />\n    </SummaryBlock>\n  </PageBlock>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {LLMTask} from '@/models/llm-task.model.js'\n\n/**\n * LLM tasks API service\n */\nexport class LLMTasksApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/llm_tasks'\n  itemKey = 'llmTask'\n  itemsKey = 'llmTasks'\n  ModelClass = LLMTask\n\n  /**\n   * Update the outline of an outline generation task\n   */\n  updateOutline(id, outline) {\n    return this.patch(`/${id}/update_outline`, {outline})\n  }\n}\n\n//Export singleton instance\nexport const llmTasksApi = new LLMTasksApi()\n","import {useFakeProgress} from '@/composables/use-fake-progress.js'\nimport {computed, reactive, watchEffect} from 'vue'\n\n/**\n * Status progress composable\n */\nexport function useStatusProgress(steps, status, extraOptions = {}) {\n\n  //Refs\n  const step = computed(() => steps.find(s => s.status === status.value))\n  const stepIndex = computed(() => step.value ? steps.indexOf(step.value) : 0)\n  const stepNo = computed(() => step.value ? stepIndex.value + 1 : 0)\n  const numSteps = computed(() => steps.length)\n  const min = computed(() => step.value?.progress || (stepNo.value / numSteps.value))\n  const max = computed(() => steps[stepIndex.value + 1]?.progress || 1)\n\n  //Make options for fake progress composable reactive\n  const options = reactive({\n    frequency: 1000,\n    targetDuration: 10000,\n    ...extraOptions,\n    min: min.value,\n    max: max.value,\n  })\n\n  //Update them when min/max values change\n  watchEffect(() => {\n    options.min = min.value\n    options.max = max.value\n  })\n\n  //Progress will be stepped between status steps, with fake increments in between\n  const {progress, resetProgress, startProgress, stopProgress} = useFakeProgress(options)\n  const isComplete = computed(() => progress.value === 1)\n\n  //Expose interface\n  return {\n    step,\n    stepNo,\n    numSteps,\n    progress,\n    startProgress,\n    stopProgress,\n    resetProgress,\n    isComplete,\n  }\n}\n","import {llmTasksApi} from '@/api/llm-tasks.api.js'\nimport {aiTaskStatuses, aiTaskTypes} from '@/constants/ai.js'\nimport {useStatusProgress} from '@/composables/use-status-progress.js'\nimport {onUnmounted, computed, ref, watchEffect} from 'vue'\n\n/**\n * AI task status composable\n */\nexport function useAiTaskStatus(task, options = {}) {\n\n  //Extract options\n  const {\n    targetDuration = 1 * 60 * 1000, //How long the total task is expected to last\n    interval = 5000, //How often to update the status\n    autoStartChecking = true, //Whether to start checking the status immediately\n    resultTimeout = 1000 * 60 * 2, //How long to wait for the result before timing out\n  } = options\n\n  //Status and result refs\n  const status = computed(() => task.value?.status)\n  const type = computed(() => task.value?.taskType)\n  const result = computed(() => task.value?.result)\n  const error = computed(() => result.value?.error)\n  const courseId = computed(() => task.value?.courseId)\n\n  //TODO: Once https://linear.app/arist/issue/DEV-14966/ai-creator-overloaded-status is resolved, restore the last\n  //changes to this code and don't rely on error value to detect overloaded status.\n  const isOverloaded = computed(() => status.value === aiTaskStatuses.OVERLOADED || error.value?.match(/overloaded/i))\n  const isError = computed(() => status.value === aiTaskStatuses.ERROR && !isOverloaded.value)\n\n  //Get status progress\n  const {\n    progress,\n    startProgress,\n    stopProgress,\n    resetProgress,\n    isComplete,\n  } = useStatusProgress([\n    {\n      //Started processing\n      status: aiTaskStatuses.INIT,\n      progress: 0.01,\n    },\n    {\n      //Waiting in job queue\n      status: aiTaskStatuses.WAITING,\n      progress: 0.02,\n    },\n    {\n      //Overloaded\n      status: aiTaskStatuses.OVERLOADED,\n      progress: 0.03,\n    },\n    {\n      //Making LLM calls to set up context\n      status: aiTaskStatuses.PLANNING,\n      progress: 0.10,\n    },\n    {\n      //Processing source material\n      status: aiTaskStatuses.ANALYZING,\n      progress: 0.25,\n    },\n    {\n      //Making LLM calls to get the result\n      status: aiTaskStatuses.GENERATING,\n      progress: 0.45,\n    },\n    {\n      //Creating entries in database\n      status: aiTaskStatuses.CREATING,\n      progress: 0.97,\n    },\n    {\n      //Ready for review\n      status: aiTaskStatuses.WAITING_FOR_REVIEW,\n      progress: 1,\n    },\n    {\n      //Done\n      status: aiTaskStatuses.DONE,\n      progress: 1,\n    },\n    {\n      //Error\n      status: aiTaskStatuses.ERROR,\n      progress: 1,\n    },\n  ], status, {\n    targetDuration,\n    autoStart: autoStartChecking,\n  })\n\n  //Check if busy\n  const isBusy = computed(() => !isComplete.value && !isError.value && !isOverloaded.value)\n\n  //Check status\n  const checkStatus = async () => {\n\n    //No task ID\n    if (!task.value?.id) {\n      return\n    }\n\n    //Update task\n    try {\n      task.value = await llmTasksApi.findById(task.value.id)\n    }\n    catch (error) {\n      if (error.status === 404) {\n        stopCheckingStatus()\n        Object.assign(task.value, {\n          status: aiTaskStatuses.ERROR,\n          result: {error: 'Task not found'},\n        })\n      }\n    }\n  }\n\n  //Start/stop checking status\n  const checkInterval = ref(null)\n  const startCheckingStatus = () => {\n    if (interval > 500) {\n      setTimeout(() => checkStatus(), 250) //Quick initial check\n    }\n    checkInterval.value = setInterval(() => checkStatus(), interval)\n  }\n  const stopCheckingStatus = () => {\n    clearInterval(checkInterval.value)\n  }\n\n  //Start checking status immediately\n  if (autoStartChecking) {\n    startCheckingStatus()\n  }\n\n  //Stop when finished\n  watchEffect(() => {\n    if (isComplete.value || isError.value) {\n      stopCheckingStatus()\n    }\n  })\n\n  //Stop on unmount\n  onUnmounted(stopCheckingStatus)\n\n  //Result promise\n  const getResultPromise = () => new Promise((resolve, reject) => {\n\n    //Create timeout\n    const taskTimeout = setTimeout(() => {\n      stopCheckingStatus()\n      reject('Task timed out')\n    }, resultTimeout)\n\n    //Watch result value\n    watchEffect(() => {\n      if (status.value === aiTaskStatuses.ERROR) {\n        clearTimeout(taskTimeout)\n        stopCheckingStatus()\n        reject(result.value?.error || 'An unknown error occurred')\n      }\n      else if (status.value === aiTaskStatuses.DONE) {\n        clearTimeout(taskTimeout)\n        stopCheckingStatus()\n        resolve(result.value)\n      }\n    })\n  })\n\n  //Header and subheader text based on status\n  const headerText = computed(() => {\n    switch (task.value?.status) {\n      case aiTaskStatuses.INIT:\n        return 'Getting things ready…'\n      case aiTaskStatuses.WAITING:\n        return 'Waiting in queue…'\n      case aiTaskStatuses.PLANNING:\n        return 'Planning out your course…'\n      case aiTaskStatuses.ANALYZING:\n        return 'Reviewing source material…'\n      case aiTaskStatuses.GENERATING:\n        if (type.value === aiTaskTypes.COURSE_MODIFICATION) {\n          return 'Modifying course structure and content…'\n        }\n        else if (type.value === aiTaskTypes.COURSE_TRANSLATION) {\n          return 'Translating course content…'\n        }\n        return 'Building your course…'\n      case aiTaskStatuses.CREATING:\n        return 'Adding final touches…'\n      case aiTaskStatuses.DONE:\n        return 'Your course is ready'\n      case aiTaskStatuses.ERROR:\n        return 'An error occurred'\n      case aiTaskStatuses.OVERLOADED:\n        return 'Server is overloaded'\n      case aiTaskStatuses.WAITING_FOR_REVIEW:\n        return 'Waiting for review'\n      default:\n        return 'Unknown status'\n    }\n  })\n  const subheaderText = computed(() => {\n    switch (task.value?.status) {\n      case aiTaskStatuses.INIT:\n        return 'Getting everything ready to build your course'\n      case aiTaskStatuses.WAITING:\n        return 'Course generation will begin shortly'\n      case aiTaskStatuses.PLANNING:\n        return 'Reviewing your needs before we begin'\n      case aiTaskStatuses.ANALYZING:\n        return 'Gathering key insights from your sources'\n      case aiTaskStatuses.GENERATING:\n        return 'Crafting and structuring your content'\n      case aiTaskStatuses.CREATING:\n        return 'Saving everything for you to review and edit'\n      case aiTaskStatuses.DONE:\n        return 'Course is ready for you to review and edit'\n      case aiTaskStatuses.ERROR:\n        return 'Something went wrong while generating your course'\n      case aiTaskStatuses.OVERLOADED:\n        return 'Please try again later'\n      case aiTaskStatuses.WAITING_FOR_REVIEW:\n        return 'Please review the outline of your course'\n      default:\n        return 'Reticulating splines'\n    }\n  })\n\n  //Expose interface\n  return {\n    progress,\n    courseId,\n    error,\n    result,\n    isBusy,\n    isComplete,\n    isError,\n    isOverloaded,\n    headerText,\n    subheaderText,\n    startCheckingStatus,\n    stopCheckingStatus,\n    getResultPromise,\n    startProgress,\n    stopProgress,\n    resetProgress,\n  }\n}\n","import {ref} from 'vue'\n\n/**\n * Saving flags composable\n */\nexport function useSavingFlags() {\n\n  //Ref\n  const isSaving = ref(false)\n  const isSaved = ref(false)\n\n  //Toggle saving\n  const toggleSaving = () => {\n    isSaved.value = false\n    isSaving.value = true\n  }\n\n  //Toggle saved flag (will automatically revert back after 100ms)\n  const toggleSaved = () => {\n    isSaving.value = false\n    isSaved.value = true\n    setTimeout(() => isSaved.value = false, 100)\n  }\n\n  //Clear both flags\n  const clearSavingFlags = () => {\n    isSaving.value = false\n    isSaved.value = false\n  }\n\n  //Saved flag\n  return {\n    isSaved,\n    isSaving,\n    toggleSaved,\n    toggleSaving,\n    clearSavingFlags,\n  }\n}\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CourseGenerationErrorModal from '@/components/courses/modals/CourseGenerationErrorModal.vue'\nimport CourseGenerationDelayedModal from '@/components/courses/modals/CourseGenerationDelayedModal.vue'\nimport {LLMTask} from '@/models/llm-task.model.js'\nimport {llmTasksApi} from '@/api/llm-tasks.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useSavingFlags} from '@/composables/use-saving-flags.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref, toRefs, watch, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'back',\n  'retry',\n  'cancel',\n  'continue',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  outlineGenerationTask: {\n    type: LLMTask,\n    required: true,\n  },\n  isQueueingCourseGeneration: {\n    type: Boolean,\n    default: false,\n  },\n  canGoBack: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs and model updater\nconst {model, outlineGenerationTask} = toRefs(props)\nconst updateModel = data => emit('update', {data})\n\n//Saved indicator\nconst {\n  isSaved,\n  isSaving,\n  toggleSaved,\n  toggleSaving,\n  clearSavingFlags,\n} = useSavingFlags()\n\n//Update task in background\nconst updateTaskInBackground = useDebounceFn(async () => {\n  try {\n    toggleSaving()\n    await llmTasksApi.updateOutline(outlineGenerationTask.value.id, model.value.outline)\n    toggleSaved()\n  }\n  catch (error) {\n    //User's will most likely continue and generate the course immediately\n    console.error(error)\n    clearSavingFlags()\n  }\n}, 1000)\n\n//Update outline helper\nconst updateOutline = async outline => {\n  updateModel({outline})\n  updateTaskInBackground()\n}\n\n//Writable task ref needed for useAiTaskStatus\nconst task = ref(outlineGenerationTask.value)\n\n//Task status handling\nconst {\n  isBusy,\n  isError,\n  isOverloaded,\n  isComplete,\n  result,\n} = useAiTaskStatus(task, {\n  targetDuration: 10 * 1000, // Fixed 10 second duration for outline generation\n})\n\n//Update model with outline if result becomes available,\n//taking care not to overwrite the outline if it's already set\nwatchEffect(() => {\n  if (result.value?.outline && !model.value.outline) {\n    updateModel({\n      outline: result.value.outline,\n      outlineTaskId: outlineGenerationTask.value.id,\n    })\n  }\n})\n\n//Show flash message when outline completes\nconst {setFlashSuccess} = useFlashMessages()\nwatch(isComplete, () => {\n  if (isComplete.value) {\n    setFlashSuccess('Outline generated')\n  }\n})\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  outline: {required: required('Outline')},\n}, model, {$autoDirty: true})\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader header=\"Refine your course outline\" />\n\n    <PageBlock\n      header=\"Course outline\"\n      :subheader=\"isBusy ? '' : 'Changes are saved automatically, you can exit and return here anytime.'\"\n    >\n      <template v-if=\"isBusy\">\n        <p>Hang tight! Your course outline is being generated and will be ready shortly.</p>\n        <ProgressBar is-indeterminate />\n        <ActionButton\n          type=\"link\"\n          icon=\"logout\"\n          label=\"Exit this page while the outline is being generated\"\n          @click=\"$emit('cancel')\"\n        />\n      </template>\n\n      <FormField\n        v-else\n        :errors=\"$v.outline.$errors\"\n      >\n        <TextInput\n          test-id=\"outline\"\n          :value=\"model.outline\"\n          :has-error=\"$v.outline.$error\"\n          is-multiline\n          auto-expands\n          @input=\"updateOutline($event.value)\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        :can-go-back=\"canGoBack && !isBusy\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSaving\"\n        label-confirm=\"Generate course\"\n        :is-disabled-confirm=\"$v.$invalid || isBusy || isQueueingCourseGeneration\"\n        :has-spinner-confirm=\"isQueueingCourseGeneration\"\n        @confirm=\"$emit('continue')\"\n        @cancel=\"$emit('cancel')\"\n        @back=\"$emit('back')\"\n      />\n    </template>\n\n    <CourseGenerationErrorModal\n      :is-open=\"isError\"\n      object=\"outline\"\n      @cancel=\"$emit('cancel')\"\n      @retry=\"$emit('retry')\"\n    />\n    <CourseGenerationDelayedModal\n      :is-open=\"isOverloaded\"\n      object=\"outline\"\n      @cancel=\"$emit('cancel')\"\n    />\n  </FlowStep>\n</template>\n","<template>\n  <div :class=\"$style.wrapper\">\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n}\n</style>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport StatusIconLabels from '@/components/shared/core/StatusIconLabels.vue'\nimport StatusIconLabel from '@/components/shared/core/StatusIconLabel.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CourseGenerationErrorModal from '@/components/courses/modals/CourseGenerationErrorModal.vue'\nimport CourseGenerationDelayedModal from '@/components/courses/modals/CourseGenerationDelayedModal.vue'\nimport {statuses} from '@/constants/statuses.js'\nimport {LLMTask} from '@/models/llm-task.model.js'\nimport {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {ref, toRefs, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'retry',\n  'complete',\n])\nconst props = defineProps({\n  courseGenerationTask: {\n    type: LLMTask,\n    required: true,\n  },\n  isForMarketing: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Flash messages\nconst {setFlashSuccess} = useFlashMessages()\n\n//Writable task ref needed for useAiTaskStatus\nconst {courseGenerationTask} = toRefs(props)\nconst task = ref(courseGenerationTask.value)\n\n//Tasks status handling\nconst {\n  courseId,\n  isComplete,\n  isError,\n  isOverloaded,\n  headerText,\n  subheaderText,\n} = useAiTaskStatus(task, {\n  targetDuration: (task.value.parameters?.numLessons || 5) * 30 * 1000,\n})\n\n//Emit event when complete without errors\nwatchEffect(() => {\n  if (isComplete.value && !isError.value && !isOverloaded.value) {\n    setFlashSuccess('Course generation complete')\n    setTimeout(() => {\n      if (courseId.value) {\n        emit('complete', {courseId: courseId.value})\n      }\n      else {\n        emit('cancel')\n      }\n    }, 1000)\n  }\n})\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader\n      :header=\"headerText\"\n      :subheader=\"subheaderText\"\n    >\n      <ProgressBar is-indeterminate />\n    </PageHeader>\n\n    <StatusIconLabels :class=\"$style.status\">\n      <StatusIconLabel\n        :status=\"statuses.SUCCESS\"\n        label=\"Describe your course\"\n      />\n      <StatusIconLabel\n        v-if=\"!isForMarketing\"\n        :status=\"statuses.SUCCESS\"\n        label=\"Review details\"\n      />\n      <StatusIconLabel\n        v-if=\"!isForMarketing\"\n        :status=\"statuses.SUCCESS\"\n        label=\"Refine outline\"\n      />\n      <StatusIconLabel\n        :status=\"isError ? statuses.DANGER : statuses.SUCCESS\"\n        :status-icon=\"isError ? 'error' : 'check_circle'\"\n        label=\"Generating course\"\n        :has-spinner=\"!isComplete\"\n      />\n      <StatusIconLabel\n        v-if=\"!isForMarketing\"\n        label=\"Verify course\"\n        :has-spinner=\"isComplete\"\n      />\n    </StatusIconLabels>\n\n    <ActionButton\n      v-if=\"!isForMarketing\"\n      type=\"link\"\n      icon=\"logout\"\n      label=\"Exit this page while the course is being generated\"\n      @click=\"$emit('cancel')\"\n    />\n\n    <CourseGenerationErrorModal\n      :is-open=\"isError\"\n      @cancel=\"$emit('cancel')\"\n      @retry=\"$emit('retry')\"\n    />\n    <CourseGenerationDelayedModal\n      :is-open=\"isOverloaded\"\n      @cancel=\"$emit('cancel')\"\n    />\n  </FlowStep>\n</template>\n\n<style module lang=\"scss\">\n.status {\n  margin-top: -1rem;\n  margin-bottom: 2rem;\n}\n</style>\n","import {llmTasksApi} from '@/api/llm-tasks.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, watchEffect} from 'vue'\n\n/**\n * AI task loader\n */\nexport function useAiTaskLoader(llmTaskId) {\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isLoadingLlmTask = ref(false)\n  const llmTask = ref(null)\n\n  //Load LLM task\n  const loadLlmTask = async () => {\n    try {\n      isLoadingLlmTask.value = true\n      llmTask.value = await llmTasksApi.findById(llmTaskId.value)\n    }\n    catch (error) {\n      setFlashFailure('Could not load AI task, please check back later')\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingLlmTask.value = false\n    }\n  }\n\n  //Load LLM task when ID changes\n  watchEffect(() => {\n    if (llmTaskId.value) {\n      loadLlmTask()\n    }\n  })\n\n  //Expose interface\n  return {\n    llmTask,\n    isLoadingLlmTask,\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {isOverCharacterLimit} from '@/helpers/string.js'\nimport {characterLimits} from '@/constants/courses.js'\n\n/**\n * Course substep answer model\n */\nexport class CourseSubstepAnswer extends BaseModel {\n\n  //Defaults\n  choice = ''\n  response = ''\n  isCorrect = false\n  isNew = false\n\n  /**\n   * Check if we have validation errors\n   *\n   * NOTE: This ignores the combined character count for substep body + answer\n   * choices, as this is already handled in the substep model. Furthermore,\n   * this is a function here instead of a computed prop, so that the parent\n   * substep can call it with the isMultiSelect flag.\n   */\n  hasValidationErrors(isMultiSelect) {\n\n    //Must have choice\n    if (!this.choice) {\n      return true\n    }\n\n    //Unles multi select, must have a response\n    if (!isMultiSelect && !this.response) {\n      return true\n    }\n\n    //Check character count for response\n    if (isOverCharacterLimit(this.response, characterLimits.SUBSTEP_RESPONSE)) {\n      return true\n    }\n\n    //All good\n    return false\n  }\n\n  /**\n   * Check if we have content\n   */\n  hasContent(isMultiSelect) {\n\n    //Must have choice\n    if (this.choice) {\n\n      //Must have response if not multi select\n      if (isMultiSelect || this.response) {\n        return true\n      }\n    }\n\n    //No content\n    return false\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {CourseSubstepAnswer} from '@/models/course-substep-answer.model.js'\nimport {getOptionLabel} from '@/helpers/options.js'\nimport {\n  getCharacterCount,\n  isOverCharacterLimit,\n  toUpperCaseFirst\n} from '@/helpers/string.js'\nimport {\n  substepTypes,\n  substepTypeOptions,\n  characterLimits\n} from '@/constants/courses.js'\nimport {DateTime} from 'luxon'\nimport {v4 as generateUuid} from 'uuid'\n\n/**\n * Course substep model\n */\nexport class CourseSubstep extends BaseModel {\n\n  //JSON key map\n  static jsonKeyMap = {\n    multiselect: 'isMultiSelect',\n  }\n\n  //Sub models\n  static subModels = {\n    answers: [CourseSubstepAnswer],\n  }\n\n  //Defaults\n  name = ''\n  body = ''\n  response = ''\n  successResponse = ''\n  failureResponse = ''\n  aiEvaluatedExampleAnswer = ''\n  ratingStart = 0\n  ratingEnd = 10\n  isNew = false\n  isBaselineConfidenceLift = false\n  trashedAt = null\n\n  //Type name\n  get typeName() {\n    return getOptionLabel(substepTypeOptions, this.substepType)\n  }\n\n  //Display name\n  get displayName() {\n    if (this.isBaselineConfidenceLift) {\n      return 'Baseline confidence lift'\n    }\n    else if (this.isFollowUpConfidenceLift) {\n      return 'Follow-up confidence lift'\n    }\n    return toUpperCaseFirst(this.typeName)\n  }\n\n  //Display name for prompt\n  get promptDisplayName() {\n    if (this.isBaselineConfidenceLift) {\n      return 'Baseline confidence lift prompt'\n    }\n    else if (this.isFollowupConfidenceLift) {\n      return 'Follow-up confidence lift prompt'\n    }\n    else if (this.isPassive) {\n      return ''\n    }\n    return 'Question prompt'\n  }\n\n  //Simple display name\n  get plainDisplayName() {\n    if (this.isBaselineConfidenceLift) {\n      return 'baseline confidence lift'\n    }\n    else if (this.isFollowupConfidenceLift) {\n      return 'follow-up confidence lift'\n    }\n    else if (this.isPassive) {\n      return 'body'\n    }\n    return 'question'\n  }\n\n  //Check if substep is activation\n  get isActivation() {\n    return this.substepType === substepTypes.ACTIVATION\n  }\n\n  //Check if substep is a multiple choice question\n  get isMultipleChoice() {\n    return this.substepType === substepTypes.CHOICE\n  }\n\n  //Check if substep is a written answer question\n  get isWrittenAnswer() {\n    return this.substepType === substepTypes.WRITTEN_ANSWER\n  }\n\n  //Check if substep is an AI evaluated question\n  get isAiEvaluated() {\n    return this.substepType === substepTypes.AI_EVALUATED\n  }\n\n  //Check if substep is a rating question\n  get isRating() {\n    return this.substepType === substepTypes.RATING\n  }\n\n  //Check if substep is a confidence lift question\n  get isConfidenceLift() {\n    return this.substepType === substepTypes.CONFIDENCE_LIFT\n  }\n\n  //Check if substep is a NPS survey question\n  get isNpsSurvey() {\n    return this.substepType === substepTypes.NPS_SURVEY\n  }\n\n  //Check if substep is a learner sentiment question\n  get isLearnerSentiment() {\n    return this.substepType === substepTypes.LEARNER_SENTIMENT\n  }\n\n  //Check if substep is a passive substep\n  get isPassive() {\n    return this.substepType === substepTypes.PASSIVE\n  }\n\n  //Check if substep is a rating type question\n  get isRatingType() {\n    return (\n      this.isRating ||\n      this.isConfidenceLift ||\n      this.isNpsSurvey ||\n      this.isLearnerSentiment\n    )\n  }\n\n  //Check if substep is a survey\n  get isSurvey() {\n    return (\n      this.isConfidenceLift ||\n      this.isNpsSurvey ||\n      this.isLearnerSentiment\n    )\n  }\n\n  //Check if substep is a question type\n  get isQuestion() {\n    return (\n      this.isMultipleChoice ||\n      this.isWrittenAnswer ||\n      this.isAiEvaluated ||\n      this.isRating\n    )\n  }\n\n  //Check if substep is removed\n  get isRemoved() {\n    return Boolean(this.trashedAt)\n  }\n\n  //Check if we're follow-up confidence lift\n  get isFollowUpConfidenceLift() {\n    return this.isConfidenceLift && !this.isBaselineConfidenceLift\n  }\n  set isFollowUpConfidenceLift(value) { /* NOOP */}\n\n  //Combined character count for this substep\n  get combinedCharacterCount() {\n    const {body, answers} = this\n    return getCharacterCount(body, ...answers.map(answer => answer.choice))\n  }\n\n  //Ccombined character limit for this substep\n  get combinedCaracterLimit() {\n    if (this.isQuestion || this.isSurvey) {\n      if (this.isMultipleChoice && this.isMultiSelect) {\n        return characterLimits.SUBSTEP_COMBINED_MULTI_SELECT\n      }\n      else {\n        return characterLimits.SUBSTEP_COMBINED_SINGLE_SELECT\n      }\n    }\n    return characterLimits.SUBSTEP_BODY\n  }\n\n  //Check if over combined character count limit\n  get isOverCombinedCharacterLimit() {\n    return this.combinedCharacterCount > this.combinedCaracterLimit\n  }\n\n  //Number of answers\n  get numAnswers() {\n    return this.answers.length\n  }\n\n  //Number of correct answers\n  get numCorrectAnswers() {\n    return this.answers.filter(answer => answer.isCorrect).length\n  }\n\n  //Check if we have enough correct answers. Only applies to multi select multiple choice types\n  get hasEnoughCorrectAnswers() {\n    if (this.isMultipleChoice && this.isMultiSelect) {\n      return this.numCorrectAnswers > 1\n    }\n    return true\n  }\n\n  //Check if we have validation errors\n  get hasValidationErrors() {\n\n    //Get data\n    const {\n      body,\n      combinedCharacterCount,\n      combinedCaracterLimit,\n      isAiEvaluated,\n      isMultipleChoice,\n      isMultiSelect,\n      isActivation,\n      isPassive,\n      answers,\n      response,\n      successResponse,\n      failureResponse,\n      aiEvaluatedExampleAnswer,\n      hasEnoughCorrectAnswers,\n    } = this\n\n    //Activation substep is optional and validation of it is not\n    //handled here\n    if (isActivation) {\n      return false\n    }\n\n    //Must have required fields\n    if (!body) {\n      return true\n    }\n\n    //Combined body/answer prompts character count must be within limit\n    if (combinedCharacterCount > combinedCaracterLimit) {\n      return true\n    }\n\n    //Multiple choice\n    if (isMultipleChoice) {\n      if (answers.length < 2) {\n        return true\n      }\n      if (answers.some(answer => answer.hasValidationErrors(isMultiSelect))) {\n        return true\n      }\n      if (!hasEnoughCorrectAnswers) {\n        return true\n      }\n      if (isMultiSelect) {\n        if (!successResponse || !failureResponse) {\n          return true\n        }\n        if (\n          isOverCharacterLimit(successResponse, characterLimits.SUBSTEP_RESPONSE) ||\n          isOverCharacterLimit(failureResponse, characterLimits.SUBSTEP_RESPONSE)\n        ) {\n          return true\n        }\n      }\n    }\n\n    //AI evaluated requires success/failure responses\n    else if (isAiEvaluated) {\n      if (!successResponse || !failureResponse || !aiEvaluatedExampleAnswer) {\n        return true\n      }\n      if (\n        isOverCharacterLimit(successResponse, characterLimits.SUBSTEP_RESPONSE) ||\n        isOverCharacterLimit(failureResponse, characterLimits.SUBSTEP_RESPONSE)\n      ) {\n        return true\n      }\n    }\n\n    //Single response\n    else if (!isPassive) {\n      if (!response) {\n        return true\n      }\n      if (isOverCharacterLimit(response, characterLimits.SUBSTEP_RESPONSE)) {\n        return true\n      }\n    }\n\n    //All good\n    return false\n  }\n\n  /**\n   * Check if we have any content\n   */\n  get hasContent() {\n\n    //Get data\n    const {\n      body,\n      isMultipleChoice,\n      isMultiSelect,\n      isAiEvaluated,\n      isPassive,\n      answers,\n      response,\n      successResponse,\n      failureResponse,\n      aiEvaluatedExampleAnswer,\n    } = this\n\n    //Check for content\n    if (body) {\n      return true\n    }\n    if (isMultipleChoice) {\n      if (isMultiSelect && (successResponse || failureResponse)) {\n        return true\n      }\n      if (answers.some(answer => answer.hasContent(isMultiSelect))) {\n        return true\n      }\n    }\n    else if (isAiEvaluated) {\n      if (successResponse || failureResponse || aiEvaluatedExampleAnswer) {\n        return true\n      }\n    }\n    else if (!isPassive && response) {\n      return true\n    }\n\n    //No content\n    return false\n  }\n\n  /**\n   * Copy substep (like clone, but clears ID etc)\n   */\n  copy(data = {}) {\n\n    //Create clone first\n    const copy = this.clone()\n\n    //Remove ID, sort order and name\n    copy.id = null\n    copy.sortOrder = null\n    copy.name = ''\n\n    //Set any passed in data now with a shallow assignment\n    if (data && Object.keys(data).length) {\n      Object.assign(copy, data)\n    }\n\n    //Return copy\n    return copy\n  }\n\n  /**\n   * Mark trashed\n   */\n  markTrashed() {\n    this.trashedAt = DateTime.now()\n  }\n\n  /**\n   * Get modified data (used for question optimization and regeneration)\n   */\n  getModifiedData(appendToSubstep = null) {\n\n    //Helper to append content\n    const append = (a, b) => [a, b].filter(Boolean).join('\\n\\n')\n\n    //Construct data\n    const data = {}\n    data.body = append(appendToSubstep?.body, this.body)\n    data.response = append(appendToSubstep?.response, this.response)\n    data.successResponse = append(appendToSubstep?.successResponse, this.successResponse)\n    data.failureResponse = append(appendToSubstep?.failureResponse, this.failureResponse)\n    data.aiEvaluatedExampleAnswer = append(appendToSubstep?.aiEvaluatedExampleAnswer, this.aiEvaluatedExampleAnswer)\n    data.answers = this.answers.map((answer, i) => answer.clone({\n      choice: append(appendToSubstep?.answers[i].choice, answer.choice),\n      response: append(appendToSubstep?.answers[i].response, answer.response),\n    }))\n\n    //Return\n    return data\n  }\n\n  /**\n   * From JSON conversion\n   */\n  fromJson(json) {\n\n    //Multiple choice?\n    if (json.substepType === substepTypes.CHOICE) {\n\n      //Ensure there are some choices\n      if (!json.choices?.length) {\n        json.choices = Array(4).fill('', 0)\n      }\n\n      //Ensure there are matching responses\n      if (json.responses?.length !== json.choices.length) {\n        json.responses = Array(json.choices.length).fill('', 0)\n      }\n\n      //Multiselect (multiple correct answers possible)\n      if (json.multiselect) {\n        if (!Array.isArray(json.correctIndices)) {\n          json.correctIndices = []\n        }\n      }\n\n      //Single correct answer\n      else {\n        if (typeof json.correctIndex === 'number' && json.correctIndex > -1) {\n          json.correctIndices = [json.correctIndex]\n        }\n        else {\n          json.correctIndices = []\n        }\n      }\n\n      //Convert to answer objects\n      json.answers = json.choices.map((choice, i) => ({\n        choice,\n        response: json.responses[i] || '',\n        isCorrect: json.correctIndices.includes(i),\n      }))\n    }\n\n    //AI evaluated\n    else if (json.substepType === substepTypes.AI_EVALUATED) {\n      json.successResponse = json.successResponse || ''\n      json.failureResponse = json.failureResponse || ''\n      json.aiEvaluatedExampleAnswer = json.aiEvaluatedExampleAnswer || ''\n      json.response = ''\n      json.answers = []\n    }\n\n    //Single response\n    else {\n      json.response = (json.responses && json.responses[0]) ? json.responses[0] : ''\n      json.answers = []\n    }\n\n    //Remove unused data now\n    delete json.correctIndex\n    delete json.correctIndices\n    delete json.choices\n    delete json.responses\n\n    //Run through parent method now\n    super.fromJson(json)\n  }\n\n  /**\n   * Convert to JSON\n   */\n  toJson(data = {}) {\n\n    //Prepare JSON\n    const json = {\n      id: this.id,\n      stepId: this.stepId,\n      name: this.name?.trim() || generateUuid(),\n      body: this.body?.trim() || '',\n      substepType: this.substepType,\n      trashedAt: this.trashedAt?.toISO(),\n      ...data,\n    }\n\n    //Rating type, include rating range\n    if (this.isRatingType) {\n      json.ratingStart = this.ratingStart\n      json.ratingEnd = this.ratingEnd\n    }\n\n    //Multiple choice\n    if (this.isMultipleChoice) {\n\n      //Extract choices/responses\n      json.choices = this.answers.map(answer => answer.choice?.trim() || '')\n      json.responses = this.answers.map(answer => answer.response?.trim() || '')\n\n      //Add correct index/indices\n      if (this.isMultiSelect) {\n        json.multiselect = true\n        json.successResponse = this.successResponse?.trim() || ''\n        json.failureResponse = this.failureResponse?.trim() || ''\n        json.correctIndex = null\n        json.correctIndices = this.answers\n          .map((answer, i) => answer.isCorrect ? i : null)\n          .filter(i => i !== null)\n      }\n      else {\n        const correctIndex = this.answers.findIndex(answer => answer.isCorrect)\n        json.multiselect = false\n        json.successResponse = ''\n        json.failureResponse = ''\n        json.correctIndex = (correctIndex > -1) ? correctIndex : null\n        json.correctIndices = []\n      }\n    }\n    else if (this.isAiEvaluated) {\n      json.successResponse = this.successResponse?.trim() || ''\n      json.failureResponse = this.failureResponse?.trim() || ''\n      json.aiEvaluatedExampleAnswer = this.aiEvaluatedExampleAnswer?.trim() || ''\n      json.responses = []\n    }\n    else if (this.response) {\n      json.responses = [this.response.trim()]\n    }\n\n    //Confidence lift\n    if (this.isConfidenceLift) {\n      json.isBaselineConfidenceLift = this.isBaselineConfidenceLift\n      json.isFollowUpConfidenceLift = !this.isBaselineConfidenceLift\n    }\n\n    //Return JSON\n    return json\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {stepTypes, substepTypes, characterLimits} from '@/constants/courses.js'\nimport {DateTime} from 'luxon'\n\n/**\n * Course step model\n */\nexport class CourseStep extends BaseModel {\n\n  //Submodels\n  static subModels = {\n    substeps: [CourseSubstep],\n  }\n\n  //Defaults\n  name = ''\n  stepType = stepTypes.NORMAL\n  isNew = false\n  trashedAt = null\n  videoKey = ''\n  videoTitle = ''\n  videoUrl = ''\n  videoUrlTitle = ''\n  videoUrlDescription = ''\n  videoUrlDomain = ''\n\n  //Display name\n  get displayName() {\n    if (this.name) {\n      return this.name\n    }\n    return `(Unnamed)`\n  }\n\n  //Check if this is a lesson\n  get isLesson() {\n    return (this.stepType === stepTypes.NORMAL && !this.isBlank)\n  }\n\n  //Check if this is the activation message\n  get isActivation() {\n    return (this.stepType === stepTypes.ACTIVATION)\n  }\n\n  //Reference to passive substep\n  get passiveSubstep() {\n    return this.substeps\n      .find(substep => substep.isPassive && !substep.isRemoved)\n  }\n\n  //Survey substeps\n  get surveySubsteps() {\n    return this.substeps\n      .filter(substep => substep.isSurvey && !substep.isRemoved)\n  }\n\n  //Reference to confidence lift substep\n  get confidenceLiftSubstep() {\n    return this.surveySubsteps\n      .find(substep => substep.isConfidenceLift && !substep.isRemoved)\n  }\n\n  //Reference to NPS survey substep\n  get npsSurveySubstep() {\n    return this.surveySubsteps\n      .find(substep => substep.isNpsSurvey && !substep.isRemoved)\n  }\n\n  //Reference to learner sentiment substep\n  get learnerSentimentSubstep() {\n    return this.surveySubsteps\n      .find(substep => substep.isLearnerSentiment && !substep.isRemoved)\n  }\n\n  //Check if lesson contains a confidence lift substep\n  get hasConfidenceLift() {\n    return this.surveySubsteps\n      .some(substep => substep.isConfidenceLift && !substep.isRemoved)\n  }\n\n  //Check if lesson contains a baseline confidence lift substep\n  get hasBaselineConfidenceLift() {\n    return this.surveySubsteps\n      .some(substep => substep.isBaselineConfidenceLift && !substep.isRemoved)\n  }\n\n  //Check if lesson contains a baseline confidence lift substep\n  get hasFollowUpConfidenceLift() {\n    return this.surveySubsteps\n      .some(substep => substep.isFollowUpConfidenceLift && !substep.isRemoved)\n  }\n\n  //Check if lesson contains a NPS survey substep\n  get hasNpsSurvey() {\n    return this.surveySubsteps\n      .some(substep => substep.isNpsSurvey && !substep.isRemoved)\n  }\n\n  //Check if lesson contains a learner sentiment substep\n  get hasLearnerSentiment() {\n    return this.surveySubsteps\n      .some(substep => substep.isLearnerSentiment && !substep.isRemoved)\n  }\n\n  //Check if step is removed\n  get isRemoved() {\n    return Boolean(this.trashedAt)\n  }\n\n  //Question substeps\n  get questions() {\n    return this.substeps\n      .filter(substep => substep.isQuestion && !substep.isRemoved)\n  }\n\n  //Has questions check\n  get hasQuestions() {\n    return this.questions.length > 0\n  }\n\n  //First question\n  get firstQuestion() {\n    return this.questions[0]\n  }\n\n  get hasVideoUrlMetadata() {\n    return !!this.videoUrl && (!!this.videoUrlTitle || !!this.videoUrlDescription || !!this.imageKey || !!this.videoUrlDomain)\n  }\n\n  //Check if we have validation errors\n  get hasValidationErrors() {\n\n    //Get data\n    const {\n      name,\n      videoUrl,\n      substeps,\n    } = this\n\n    //Name must be within character limit\n    if (!name || name.length > characterLimits.STEP_NAME) {\n      return true\n    }\n\n    if (videoUrl?.length && !this.hasVideoUrlMetadata) {\n      return true\n    }\n\n    //Check substeps\n    return substeps\n      .filter(substep => !substep.isRemoved)\n      .some(substep => substep.hasValidationErrors)\n  }\n\n  //Check if step has any new substeps\n  get hasNewSubsteps() {\n    return this.substeps.some(substep => substep.isNew)\n  }\n\n  //Check if we have content\n  get hasContent() {\n\n    //Check if passive substep has content\n    return this.passiveSubstep?.hasContent\n  }\n\n  /**\n   * Copy step (like clone, but clears ID etc)\n   */\n  copy(data = {}) {\n\n    //Create clone first\n    const copy = this.clone()\n\n    //Remove ID and sort order\n    copy.id = null\n    copy.sortOrder = null\n\n    //Copy substeps independently\n    copy.substeps = this.substeps\n      .filter(substep => !substep.isRemoved && !substep.isSurvey)\n      .map(substep => substep.copy())\n\n    //Set any passed in data now with a shallow assignment\n    if (data && Object.keys(data).length) {\n      Object.assign(copy, data)\n    }\n\n    //Return copy\n    return copy\n  }\n\n  /**\n   * Mark trashed\n   */\n  markTrashed() {\n    this.trashedAt = DateTime.now()\n    this.substeps\n      .filter(substep => !substep.isSurvey)\n      .forEach(substep => substep.markTrashed())\n  }\n\n  /**\n   * From JSON conversion\n   */\n  fromJson(json) {\n\n    //Ensure substeps array\n    if (!Array.isArray(json.substeps)) {\n      json.substeps = []\n    }\n\n    //Ensure there's always a passive substep for non-activation steps\n    if (\n      json.stepType !== stepTypes.ACTIVATION &&\n        !json.substeps.some(substep => substep.substepType === substepTypes.PASSIVE)\n    ) {\n      json.substeps.unshift({\n        substepType: substepTypes.PASSIVE,\n      })\n    }\n\n    if (json.thumbnailTime) {\n      json.thumbnailTime = parseFloat(json.thumbnailTime)\n    }\n\n    //Run through parent method now\n    super.fromJson(json)\n  }\n\n  /**\n   * Convert to JSON\n   */\n  toJson(data = {}) {\n    return {\n      id: this.id,\n      name: this.name?.trim() || '',\n      stepType: this.stepType,\n      videoKey: this.videoKey,\n      imageKey: this.imageKey,\n      trashedAt: this.trashedAt?.toISO(),\n      videoTitle: this.videoTitle,\n      videoUrl: this.videoUrl,\n      videoUrlTitle: this.videoUrlTitle,\n      videoUrlDescription: this.videoUrlDescription,\n      videoUrlDomain: this.videoUrlDomain,\n      thumbnailTime: this.thumbnailTime,\n      substepsAttributes: this.substeps.map((substep, j) => substep.toJson({\n        stepId: this.id,\n        sortOrder: j + 1,\n      })),\n      ...data,\n    }\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Schedule model\n */\nexport class Schedule extends BaseModel {\n\n  //Icon for search results\n  get icon() {\n    return 'schedule'\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {CourseStep} from '@/models/course-step.model.js'\nimport {Schedule} from '@/models/schedule.model.js'\nimport {stepTypes, substepTypes} from '@/constants/courses.js'\nimport {languages} from '@/constants/languages.js'\n\n/**\n * Course model\n */\nexport class Course extends BaseModel {\n\n  //JSON key map\n  static jsonKeyMap = {\n    locale: 'language',\n    externalCourseId: 'externalId',\n  }\n\n  //Submodels\n  static subModels = {\n    steps: [CourseStep],\n    distributions: [Schedule],\n    citations: [],\n  }\n\n  //Defaults\n  name = ''\n  imageKey = ''\n  videoKey = ''\n  description = ''\n  language = languages.ENGLISH\n  author = ''\n  tagIds = []\n  externalId = '' //Not an actual UUID, just a string\n  isNudge = false\n  contentTypeId = null\n  folderId = null\n  hasUnsavedChanges = false\n\n  //Flag for identification\n  get isCourse() {\n    return true\n  }\n\n  //Check if course is editable\n  get isEditable() {\n\n    //Cannot edit archived courses\n    if (this.isArchived) {\n      return false\n    }\n\n    //Cannot edit locked or HBR courses\n    if (this.isLocked || this.isHbr) {\n      return false\n    }\n\n    //Otherwise editable\n    return true\n  }\n\n  //Icon for search results\n  get icon() {\n    return 'article'\n  }\n\n  //Display name\n  get displayName() {\n    if (this.name) {\n      return this.name\n    }\n    return `(Unnamed)`\n  }\n\n  //Ignore validations\n  get ignoreValidations() {\n    return Boolean(this.isDraft || this.isTemplate)\n  }\n\n  //Can schedule\n  get canSchedule() {\n    return Boolean(\n      !this.isTemplate &&\n      !this.isArchived && (\n        this.hasSchedules || !this.hasValidationErrors\n      ))\n  }\n\n  //Has schedules check\n  get hasSchedules() {\n    return this.distributions.length > 0\n  }\n\n  //Lessons\n  get lessons() {\n    return this.steps.filter(step => step.isLesson && !step.isRemoved)\n  }\n\n  //Number of lessons\n  get numLessons() {\n    return this.lessons.length\n  }\n\n  //First lesson\n  get firstLesson() {\n    return this.lessons[0]\n  }\n\n  //Last lesson\n  get lastLesson() {\n    return this.lessons[this.lessons.length - 1]\n  }\n\n  //Has confidence lift check\n  get hasConfidenceLift() {\n    return this.lessons.some(lesson => lesson.hasConfidenceLift)\n  }\n\n  //Validation errors tracking\n  get hasValidationErrors() {\n    return this.steps\n      .filter(step => !step.isRemoved)\n      .some(step => step.hasValidationErrors)\n  }\n\n  //Check if course has any new steps or substeps\n  get hasNewStepsOrSubsteps() {\n    return this.steps.some(step => step.isNew || step.hasNewSubsteps)\n  }\n\n  //Course status\n  get status() {\n    if (this.isPublished) {\n      return 'published'\n    }\n    if (this.isDraft) {\n      return 'draft'\n    }\n    if (this.isTemplate) {\n      return 'template'\n    }\n    if (this.isArchived) {\n      return 'archived'\n    }\n    return 'other'\n  }\n\n  /**\n   * Initialize model from JSON\n   */\n  fromJson(json) {\n\n    //Ensure steps array\n    if (!Array.isArray(json.steps)) {\n      json.steps = []\n    }\n\n    //Ensure there is always an activation step\n    if (!json.steps.some(step => step.stepType === stepTypes.ACTIVATION)) {\n      json.steps.unshift({\n        stepType: stepTypes.ACTIVATION,\n        name: 'Activation message',\n        substeps: [\n          {\n            name: 'Activation message',\n            substepType: substepTypes.ACTIVATION,\n            body: '',\n          },\n        ],\n      })\n    }\n\n    //If this is a nudge, ensure there is always a normal step with passive substep\n    if (json.isNudge && !json.steps.some(step => step.stepType === stepTypes.NORMAL)) {\n      json.steps.push({\n        stepType: stepTypes.NORMAL,\n        name: 'Nudge',\n        substeps: [\n          {\n            name: 'Nudge',\n            substepType: substepTypes.PASSIVE,\n            body: '',\n          },\n        ],\n      })\n    }\n\n    //Run through parent method now\n    super.fromJson(json)\n  }\n\n  /**\n   * To JSON conversion\n   */\n  toJson(data = {}) {\n    return {\n      name: this.name,\n      imageKey: this.imageKey,\n      description: this.description,\n      locale: this.language,\n      author: this.author,\n      tagIds: this.tagIds,\n      externalCourseId: this.externalId || null, //Must be null if empty\n      contentTypeId: this.contentTypeId,\n      folderId: this.folderId,\n      isNudge: this.isNudge,\n      isPassingValidations: !this.hasValidationErrors,\n      requiresReview: this.requiresReview,\n      stepsAttributes: this.steps.map((step, i) => step.toJson({sortOrder: i + 1})),\n      citations: this.citations,\n      ...data,\n    }\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Course} from '@/models/course.model.js'\n\n/**\n * Courses API service\n */\nexport class CoursesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/courses'\n  itemKey = 'course'\n  itemsKey = 'courses'\n  ModelClass = Course\n\n  /**\n   * Toggle favorite\n   */\n  toggleFavorite(courseId, isFavorite) {\n    return this\n      .post(`/${courseId}/toggle_favorite`, {course: {isFavorite}})\n  }\n\n  /**\n   * Archive course\n   */\n  archiveCourse(courseId) {\n    return this\n      .post(`/${courseId}/archive`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Restore course\n   */\n  restoreCourse(courseId) {\n    return this\n      .post(`/${courseId}/restore`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Clone course\n   */\n  cloneCourse(courseId) {\n    return this\n      .post(`/${courseId}/clone_course`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Create template from course\n   */\n  createTemplateFromCourse(courseId) {\n    return this\n      .post(`/${courseId}/create_template`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Email course\n   */\n  emailCourse(courseId, format) {\n    return this\n      .post(`/${courseId}/email`, {format})\n  }\n\n  /**\n   * Organize course into a folder\n   */\n  organizeCourse(courseId, folderId) {\n    return this\n      .post(`/${courseId}/organize`, {course: {folderId}})\n  }\n\n  /**\n   * Request dedicated SMS address\n   */\n  requestDedicatedSmsAddress(courseId) {\n    return this\n      .post(`/${courseId}/request_dedicated_sms_address`)\n      .then(data => data.address)\n  }\n\n  /**\n   * Enable dedicated SMS address\n   */\n  enableDedicatedSmsAddress(courseId) {\n    return this\n      .post(`/${courseId}/enable_dedicated_sms_address`)\n      .then(data => data.address)\n  }\n\n  /**\n   * Preview course\n   */\n  previewCourse(courseId, data) {\n    return this\n      .post(`/${courseId}/preview_course`, data)\n      .then(data => data.enrollment)\n  }\n\n  /**\n   * Fetch missing address count for passed users/cohorts and preferred address type\n   */\n  missingAddressCount(params) {\n    return this\n      .get(`/missing_address_count`, params)\n  }\n\n  /**\n   * Determine if preview enrollments are processing\n   */\n  previewEnrollmentsAreProcessing(courseId) {\n    return this\n      .get(`/${courseId}/preview_enrollments_are_processing`)\n  }\n}\n\n//Export singleton instance\nexport const coursesApi = new CoursesApi()\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {aiCourseCreationMethods} from '@/constants/ai.js'\nimport {languages} from '@/constants/languages.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n//API method helper\nconst callApiMethod = (method, ...args) => {\n  switch (method) {\n    case aiCourseCreationMethods.BUILD:\n    case aiCourseCreationMethods.BUILD_FOR_MARKETING:\n      return llmServicesApi.build(...args)\n    case aiCourseCreationMethods.TRANSLATE:\n      return llmServicesApi.translate(...args)\n    case aiCourseCreationMethods.MODIFY:\n      return llmServicesApi.modify(...args)\n    default:\n      throw new Error('Unsupported method')\n  }\n}\n\n/**\n * Course creation composable for AI flows\n */\nexport function useAICourseCreation(method, folderId) {\n\n  //Must specify a method\n  if (!method) {\n    throw new Error('Method must be specified')\n  }\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Models depend on method\n  const models = {\n    [aiCourseCreationMethods.BUILD]: {\n      folderId: folderId?.value,\n      topic: '',\n      trainingType: null,\n      audience: '',\n      expertise: null,\n      expertiseCustom: '',\n      objective: '',\n      knowledge: '',\n      numLessons: null,\n      targetLanguage: languages.ENGLISH,\n      sourceText: '',\n      documents: [],\n      outline: '',\n      useProvidedSourceMaterialOnly: false,\n    },\n    [aiCourseCreationMethods.BUILD_FOR_MARKETING]: {\n      isForMarketing: true,\n      email: '',\n      topic: '',\n      trainingType: null,\n      audience: '',\n      expertise: null,\n      expertiseCustom: '',\n      objective: '',\n      knowledge: '',\n      numLessons: null,\n      targetLanguage: languages.ENGLISH,\n      sourceText: '',\n      documents: [],\n      outline: '',\n    },\n    [aiCourseCreationMethods.TRANSLATE]: {\n      sourceCourseId: null,\n      folderId: folderId?.value,\n      targetLanguages: [],\n    },\n    [aiCourseCreationMethods.MODIFY]: {\n      sourceCourseId: null,\n      folderId: folderId?.value,\n      audience: '',\n      objective: '',\n      revisionFocus: '',\n    },\n  }\n\n  //Model for creation\n  const model = ref(models[method])\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Queue outline generation\n  const isQueueingOutlineGeneration = ref(false)\n  const queueOutlineGeneration = async () => {\n\n    //Extract data\n    const data = {...model.value}\n\n    //Toggle flag\n    isQueueingOutlineGeneration.value = true\n\n    //Create\n    try {\n      return await llmServicesApi.generateOutline(data)\n    }\n    catch (error) {\n      console.error(error) //TODO process error, feed to Sentry etc.\n      setFlashFailure('Error generating outline')\n    }\n    finally {\n      isQueueingOutlineGeneration.value = false\n    }\n  }\n\n  //Queue task\n  const isQueueingCourseGeneration = ref(false)\n  const queueCourseGeneration = async () => {\n\n    //Extract data\n    const data = {...model.value}\n\n    //Toggle flag\n    isQueueingCourseGeneration.value = true\n\n    //Create\n    try {\n      //NOTE: Not using a success flash message here, as the user is redirected\n      //to the generation status page, which in itself is kind of a success message\n      return await callApiMethod(method, data)\n    }\n    catch (error) {\n      setFlashFailure('Error generating course')\n      processError(error)\n      throw error\n    }\n    finally {\n      isQueueingCourseGeneration.value = false\n    }\n  }\n\n  //Move created course into given folder\n  const moveCourseToFolder = async courseId => {\n    if (folderId?.value) {\n      await coursesApi.organizeCourse(courseId, folderId.value)\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    updateModel,\n    isQueueingCourseGeneration,\n    queueCourseGeneration,\n    isQueueingOutlineGeneration,\n    queueOutlineGeneration,\n    moveCourseToFolder,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CourseAIBuildDescribeStep from '@/components/courses/ai/CourseAIBuildDescribeStep.vue'\nimport CourseAIBuildReviewStep from '@/components/courses/ai/CourseAIBuildReviewStep.vue'\nimport CourseAIBuildOutlineStep from '@/components/courses/ai/CourseAIBuildOutlineStep.vue'\nimport CourseAIBuildGenerateStep from '@/components/courses/ai/CourseAIBuildGenerateStep.vue'\nimport {aiCourseCreationMethods, aiCourseCreationFlowSteps} from '@/constants/ai.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useAiTaskLoader} from '@/composables/use-ai-task-loader.js'\nimport {useAICourseCreation} from '@/composables/use-ai-course-creation.js'\nimport {ref, watch} from 'vue'\n\n//Routing\nconst {queryParams} = useRouting()\nconst folderId = ref(queryParams.value.folderId)\nconst llmTaskId = ref(queryParams.value.llmTaskId)\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Build courses with AI')\n\n//Step management\nconst {\n  steps,\n  activeStep,\n  checkStepActive,\n  goToStep,\n  goToFirstStep,\n  goToNextStep,\n  goToPrevStep,\n  isGoingBack,\n} = useSteps([\n  {\n    key: aiCourseCreationFlowSteps.DESCRIBE,\n    label: 'Describe your course',\n    icon: 'description',\n    route: {\n      name: 'course-ai-build.describe',\n    },\n  },\n  {\n    key: aiCourseCreationFlowSteps.REVIEW,\n    label: 'Review details',\n    icon: 'manage_search',\n    route: {\n      name: 'course-ai-build.review',\n    },\n  },\n  {\n    key: aiCourseCreationFlowSteps.OUTLINE,\n    label: 'Refine outline',\n    icon: 'edit_note',\n    route: {\n      allowEntry: true,\n      name: 'course-ai-build.outline',\n    },\n  },\n  {\n    key: aiCourseCreationFlowSteps.GENERATE,\n    label: 'Generate course',\n    icon: 'auto_awesome',\n    route: {\n      allowEntry: true,\n      name: 'course-ai-build.generate',\n    },\n  },\n])\n\n//Navigation\nconst {\n  goToCoursesOverview,\n  goToEditCourse,\n} = useNavigation()\n\n//Use AI course creation\nconst {\n  model,\n  updateModel,\n  isQueueingCourseGeneration,\n  queueCourseGeneration,\n  isQueueingOutlineGeneration,\n  queueOutlineGeneration,\n  moveCourseToFolder,\n} = useAICourseCreation(aiCourseCreationMethods.BUILD, folderId)\n\n//AI task refs\nconst {isLoadingLlmTask, llmTask} = useAiTaskLoader(llmTaskId)\nconst courseGenerationTask = ref(null)\nconst outlineGenerationTask = ref(null)\nconst canGoBackFromOutlineStep = ref(false)\n\n//Step navigation\nconst continueFromDescribeStep = () => goToNextStep()\nconst continueFromReviewStep = async () => {\n  try {\n    const data = await queueOutlineGeneration()\n    outlineGenerationTask.value = data.tasks[0]\n    canGoBackFromOutlineStep.value = true\n    goToNextStep()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst continueFromOutlineStep = async () => {\n  try {\n    const data = await queueCourseGeneration()\n    courseGenerationTask.value = data.tasks[0]\n    goToNextStep()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst goBackFromOutlineStep = () => {\n  outlineGenerationTask.value = null\n  goToPrevStep()\n}\n\n//Watch LLM task and go to the right step if one is loaded\nwatch(llmTask, () => {\n  if (llmTask.value) {\n\n    //Update model with task parameters\n    updateModel(llmTask.value.parameters)\n\n    //Go to the right step\n    if (llmTask.value.isCourseGeneration) {\n      courseGenerationTask.value = llmTask.value\n      goToStep(aiCourseCreationFlowSteps.GENERATE)\n    }\n    else if (llmTask.value.isOutlineGeneration) {\n      outlineGenerationTask.value = llmTask.value\n      goToStep(aiCourseCreationFlowSteps.OUTLINE)\n    }\n  }\n}, {immediate: true})\n\n//Ensure we're redirected to the right step if we're in the middle of generation\nwatch(activeStep, () => {\n  if (activeStep.value !== aiCourseCreationFlowSteps.GENERATE && courseGenerationTask.value) {\n    goToStep(aiCourseCreationFlowSteps.GENERATE)\n  }\n  else if (activeStep.value !== aiCourseCreationFlowSteps.OUTLINE && outlineGenerationTask.value) {\n    goToStep(aiCourseCreationFlowSteps.OUTLINE)\n  }\n})\n\n//Completion of course creation\nconst complete = courseId => {\n  moveCourseToFolder(courseId)\n  goToEditCourse(courseId)\n}\n</script>\n\n<template>\n  <PageWrapper limited-width>\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-going-back=\"isGoingBack\"\n      :is-loading=\"isLoadingLlmTask\"\n    >\n      <CourseAIBuildDescribeStep\n        v-if=\"checkStepActive(aiCourseCreationFlowSteps.DESCRIBE)\"\n        :model=\"model\"\n        @update=\"updateModel($event.data)\"\n        @cancel=\"goToCoursesOverview()\"\n        @continue=\"continueFromDescribeStep()\"\n      />\n      <CourseAIBuildReviewStep\n        v-else-if=\"checkStepActive(aiCourseCreationFlowSteps.REVIEW)\"\n        :model=\"model\"\n        :is-queueing-outline-generation=\"isQueueingOutlineGeneration\"\n        @back=\"goToPrevStep()\"\n        @cancel=\"goToCoursesOverview()\"\n        @continue=\"continueFromReviewStep()\"\n      />\n      <CourseAIBuildOutlineStep\n        v-else-if=\"checkStepActive(aiCourseCreationFlowSteps.OUTLINE)\"\n        :model=\"model\"\n        :outline-generation-task=\"outlineGenerationTask\"\n        :is-queueing-course-generation=\"isQueueingCourseGeneration\"\n        :can-go-back=\"canGoBackFromOutlineStep\"\n        @update=\"updateModel($event.data)\"\n        @back=\"goBackFromOutlineStep()\"\n        @cancel=\"goToCoursesOverview()\"\n        @retry=\"goToFirstStep()\"\n        @continue=\"continueFromOutlineStep()\"\n      />\n      <CourseAIBuildGenerateStep\n        v-else-if=\"checkStepActive(aiCourseCreationFlowSteps.GENERATE)\"\n        :course-generation-task=\"courseGenerationTask\"\n        @cancel=\"goToCoursesOverview()\"\n        @retry=\"goToFirstStep()\"\n        @complete=\"complete($event.courseId)\"\n      />\n    </Flow>\n  </PageWrapper>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {toRefs, computed, onMounted} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\nconst props = defineProps({\n  courses: {\n    type: Array,\n    default: () => [],\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n  autoLoad: {\n    type: Boolean,\n    default: false,\n  },\n  queryParams: {\n    type: Object,\n    default: () => ({}),\n  },\n})\n\n//Get refs\nconst {courses, isLoading, autoLoad, queryParams} = toRefs(props)\n\n//Batched course querying, defaults to querying all courses into the selector\nconst {\n  items: autoLoadedCourses,\n  loadItemsBatched: loadCourses,\n  isLoadingItems,\n} = useQuerying({\n  handler: (...args) => coursesApi.query(...args),\n  filter: queryParams.value,\n  limit: 100,\n  sort: queryParams.value?.sort || '-updatedAt',\n  fields: [\n    'id',\n    'name',\n    'isNudge',\n    'isPassingValidations',\n  ],\n})\n\n//Course options to use in select input\nconst courseOptions = computed(() => autoLoad.value ? autoLoadedCourses.value : courses.value)\n\n//Computed refs\nconst isLoadingWithoutOptions = computed(() => (isLoading.value || isAutoLoading.value) && !courseOptions.value.length)\nconst isAutoLoading = computed(() => isLoadingItems.value && autoLoad.value)\nconst placeholder = computed(() => {\n  if (isLoadingWithoutOptions.value) {\n    return 'Loading courses...'\n  }\n  else if (courseOptions.value.length) {\n    return 'Select or type course name'\n  }\n  return 'No courses available'\n})\n\n//Load courses on mount if autoLoad is true\nonMounted(() => {\n  if (autoLoad.value) {\n    loadCourses()\n  }\n})\n</script>\n\n<template>\n  <SelectInput\n    v-bind=\"$attrs\"\n    value-prop=\"id\"\n    label-prop=\"name\"\n    :has-spinner=\"isLoadingWithoutOptions\"\n    :placeholder=\"placeholder\"\n    :options=\"courseOptions\"\n    is-flexible\n    @input=\"$emit('input', $event)\"\n  >\n    <template #option=\"option\">\n      <slot\n        name=\"option\"\n        v-bind=\"option\"\n      >\n        <span>{{ option.name }}</span>\n        <small\n          v-if=\"option.isNudge\"\n          text-muted\n        >(nudge)</small>\n      </slot>\n    </template>\n  </SelectInput>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport CourseSelectInput from '@/components/shared/form/CourseSelectInput.vue'\nimport {aiCourseCreationLanguageOptions} from '@/constants/ai.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'continue',\n  'update',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isQueueingCourseGeneration: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Update model values\nconst {model} = toRefs(props)\nconst updateModel = data => emit('update', {data})\n\n//Pre-selected course provided in route params\nconst {queryParams} = useRouting()\nupdateModel({sourceCourseId: queryParams.value.courseId || null})\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  sourceCourseId: {required: required('Course')},\n  targetLanguages: {required: required('At least one language')},\n}, model, {\n  $autoDirty: true,\n})\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader header=\"Select the languages for AI translation of a specific course\" />\n    <PageBlock\n      header=\"Select course to translate\"\n      is-required\n    >\n      <FormField\n        label=\"Course name\"\n        :errors=\"$v.sourceCourseId.$errors\"\n      >\n        <CourseSelectInput\n          auto-load\n          test-id=\"existingCourse\"\n          :query-params=\"{sort: '-updatedAt'}\"\n          :value=\"model.sourceCourseId\"\n          :has-error=\"$v.sourceCourseId.$error\"\n          @input=\"updateModel({sourceCourseId: $event.value})\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Languages\"\n        :errors=\"$v.targetLanguages.$errors\"\n        message=\"Max 3 languages\"\n      >\n        <SelectInput\n          required\n          test-id=\"targetLanguages\"\n          placeholder=\"Select languages\"\n          :has-error=\"$v.targetLanguages.$error\"\n          :options=\"aiCourseCreationLanguageOptions\"\n          :value=\"model.targetLanguages\"\n          :max=\"3\"\n          is-multi-select\n          @input=\"updateModel({targetLanguages: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        label-confirm=\"Generate\"\n        :is-disabled-confirm=\"$v.$invalid\"\n        :has-spinner-confirm=\"isQueueingCourseGeneration\"\n        @confirm=\"$emit('continue')\"\n        @cancel=\"$emit('cancel')\"\n      />\n    </template>\n  </FlowStep>\n</template>\n","import {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {computed, ref, reactive} from 'vue'\n\n/**\n * AI task statuses composable (wrapper to handle multiple tasks at once)\n */\nexport function useAiTaskStatuses(tasks) {\n\n  //Tasks\n  //NOTE: Avoid using Array as root value for reactive() as it cannot be tracked in watch() or watchEffect(). Use ref() instead. This is a Vue-2-only limitation.\n  const taskStatuses = ref([])\n\n  //Set up composables for each task\n  for (const taskInstance of tasks.value) {\n    const task = ref(taskInstance)\n    const {status, progress, courseId, isComplete, isError} = useAiTaskStatus(task)\n    const taskStatus = reactive({\n      task,\n      status,\n      progress,\n      courseId,\n      isComplete,\n      isError,\n    })\n    taskStatuses.value.push(taskStatus)\n  }\n\n  //Cumulative progress\n  const progressSum = computed(() => taskStatuses.value.reduce((total, task) => total + task.progress, 0))\n  const progress = computed(() => progressSum.value / tasks.value.length)\n  const isComplete = computed(() => taskStatuses.value.every(task => task.isComplete))\n  const isError = computed(() => taskStatuses.value.every(task => task.isError))\n  const hasSomeErrors = computed(() => taskStatuses.value.some(task => task.isError))\n  const courseIds = computed(() => taskStatuses.value.map(task => task.courseId))\n\n  //Expose interface\n  return {\n    taskStatuses,\n    progress,\n    courseIds,\n    isComplete,\n    isError,\n    hasSomeErrors,\n  }\n}\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport StatusIconLabels from '@/components/shared/core/StatusIconLabels.vue'\nimport StatusIconLabel from '@/components/shared/core/StatusIconLabel.vue'\nimport LanguageName from '@/components/shared/transform/LanguageName.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CourseGenerationErrorModal from '@/components/courses/modals/CourseGenerationErrorModal.vue'\nimport CourseGenerationDelayedModal from '@/components/courses/modals/CourseGenerationDelayedModal.vue'\nimport {useAiTaskStatuses} from '@/composables/use-ai-task-statuses.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {statuses} from '@/constants/statuses.js'\nimport {toRefs, computed, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'retry',\n  'complete',\n])\nconst props = defineProps({\n  courseGenerationTasks: {\n    type: Array,\n    required: true,\n  },\n})\n\n//Flash messages\nconst {setFlashSuccess} = useFlashMessages()\n\n//Tasks status handling\nconst {courseGenerationTasks} = toRefs(props)\nconst hasMultiple = computed(() => courseGenerationTasks.value.length > 1)\nconst {\n  courseIds,\n  isComplete,\n  isError,\n  hasSomeErrors,\n  isOverloaded,\n  taskStatuses,\n} = useAiTaskStatuses(courseGenerationTasks)\n\n//Combined tasks array\nconst combinedTasksArray = computed(() => courseGenerationTasks.value.map(task => {\n  const taskStatus = taskStatuses.value\n    .find(taskStatus => taskStatus.task?.id === task.id)\n  return {\n    id: task.id,\n    isComplete: taskStatus?.isComplete || false,\n    isError: taskStatus?.isError || false,\n    language: task.parameters.targetLanguage,\n    status: taskStatus?.isError ? statuses.DANGER : (taskStatus?.isComplete ? statuses.SUCCESS : null),\n    statusIcon: taskStatus?.isError ? 'error' : (taskStatus?.isComplete ? 'check_circle' : ''),\n  }\n}))\n\n//Emit event when complete\nwatchEffect(() => {\n  if (isComplete.value && !hasSomeErrors.value) {\n    setFlashSuccess('Course translations complete')\n    setTimeout(() => {\n      emit('complete', {courseIds: courseIds.value})\n    }, 1000)\n  }\n})\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader\n      header=\"Translating course content...\"\n      subheader=\"This can take up to two minutes per language to complete\"\n    >\n      <ProgressBar is-indeterminate />\n    </PageHeader>\n    <StatusIconLabels :class=\"$style.status\">\n      <StatusIconLabel\n        :status=\"statuses.SUCCESS\"\n        label=\"Select languages\"\n      />\n      <StatusIconLabel\n        v-for=\"task in combinedTasksArray\"\n        :key=\"task.id\"\n        :status=\"task.status\"\n        :status-icon=\"task.statusIcon\"\n        :has-spinner=\"!task.isComplete\"\n      >\n        Translating course to <LanguageName :language=\"task.language\" />\n      </StatusIconLabel>\n      <StatusIconLabel\n        :label=\"`Verify course${hasMultiple ? 's' : ''}`\"\n        :has-spinner=\"isComplete\"\n      />\n    </StatusIconLabels>\n\n    <ActionButton\n      type=\"link\"\n      icon=\"logout\"\n      label=\"Exit this page while the course is being translated\"\n      @click=\"$emit('cancel')\"\n    />\n\n    <CourseGenerationErrorModal\n      :is-open=\"isError || hasSomeErrors\"\n      verb=\"translating\"\n      @cancel=\"$emit('cancel')\"\n      @retry=\"$emit('retry')\"\n    />\n    <CourseGenerationDelayedModal\n      :is-open=\"isOverloaded\"\n      @cancel=\"$emit('cancel')\"\n    />\n  </FlowStep>\n</template>\n\n<style module lang=\"scss\">\n.status {\n  margin-top: -1rem;\n  margin-bottom: 2rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CourseAITranslateSelectLanguagesStep from '@/components/courses/ai/CourseAITranslateSelectLanguagesStep.vue'\nimport CourseAITranslateGenerateStep from '@/components/courses/ai/CourseAITranslateGenerateStep.vue'\nimport {aiCourseCreationMethods, aiCourseCreationFlowSteps} from '@/constants/ai.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useAiTaskLoader} from '@/composables/use-ai-task-loader.js'\nimport {useAICourseCreation} from '@/composables/use-ai-course-creation.js'\nimport {ref, watch, watchEffect} from 'vue'\n\n//Routing\nconst {queryParams} = useRouting()\nconst folderId = ref(queryParams.value.folderId)\nconst llmTaskId = ref(queryParams.value.llmTaskId)\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Translate courses with AI')\n\n//Step management\nconst {\n  steps,\n  activeStep,\n  checkStepActive,\n  goToFirstStep,\n  goToLastStep,\n  goToNextStep,\n} = useSteps([\n  {\n    key: aiCourseCreationFlowSteps.TRANSLATE,\n    label: 'Select languages',\n    icon: 'translate',\n    route: {\n      name: 'course-ai-translate.select-language',\n    },\n  },\n  {\n    key: aiCourseCreationFlowSteps.GENERATE,\n    label: 'Translate course',\n    icon: 'auto_awesome',\n    route: {\n      allowEntry: true,\n      name: 'course-ai-translate.generate',\n    },\n  },\n])\n\n//Navigation\nconst {\n  goToCoursesOverview,\n} = useNavigation()\n\n//Use AI course creation\nconst {\n  model,\n  updateModel,\n  isQueueingCourseGeneration,\n  queueCourseGeneration,\n  moveCourseToFolder,\n} = useAICourseCreation(aiCourseCreationMethods.TRANSLATE, folderId)\n\n//Course generation tasks\nconst {isLoadingLlmTask, llmTask} = useAiTaskLoader(llmTaskId)\nconst courseGenerationTasks = ref([])\n\n//Step navigation\nconst continueFromTranslateStep = async () => {\n  try {\n    const data = await queueCourseGeneration()\n    courseGenerationTasks.value = data.tasks\n    goToNextStep()\n  }\n  catch {\n    //Handled by composable\n  }\n}\n\n//Watch LLM tasks and go to generate step if one is loaded\nwatchEffect(() => {\n  if (llmTask.value) {\n    courseGenerationTasks.value = [llmTask.value]\n    goToLastStep()\n  }\n})\n\n//Watch active step, and ensure we're redirected to the generate step if we're\n//in the middle of generation\nwatch(activeStep, () => {\n  if (activeStep.value !== aiCourseCreationFlowSteps.GENERATE && courseGenerationTasks.value.length > 0) {\n    goToLastStep()\n  }\n})\n\n//Completion of course creation\nconst complete = courseIds => {\n  for (const courseId of courseIds) {\n    moveCourseToFolder(courseId)\n  }\n  goToCoursesOverview()\n}\n</script>\n\n<template>\n  <PageWrapper limited-width>\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-loading=\"isLoadingLlmTask\"\n    >\n      <CourseAITranslateSelectLanguagesStep\n        v-if=\"checkStepActive(aiCourseCreationFlowSteps.TRANSLATE)\"\n        :model=\"model\"\n        :is-queueing-course-generation=\"isQueueingCourseGeneration\"\n        @update=\"updateModel($event.data)\"\n        @continue=\"continueFromTranslateStep()\"\n        @cancel=\"goToCoursesOverview()\"\n      />\n      <CourseAITranslateGenerateStep\n        v-else-if=\"checkStepActive(aiCourseCreationFlowSteps.GENERATE)\"\n        :course-generation-tasks=\"courseGenerationTasks\"\n        @cancel=\"goToCoursesOverview()\"\n        @retry=\"goToFirstStep()\"\n        @complete=\"complete($event.courseIds)\"\n      />\n    </Flow>\n  </PageWrapper>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport CourseSelectInput from '@/components/shared/form/CourseSelectInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport RegenerateButton from '@/components/shared/buttons/RegenerateButton.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Suggestions from '@/components/shared/form/Suggestions.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport DevTools from '@/components/shared/dev/DevTools.vue'\nimport {aiSuggestionTypes} from '@/constants/ai.js'\nimport {pickRandom} from '@/helpers/random.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {useAISuggestions} from '@/composables/use-ai-suggestions.js'\nimport {useModelRefs} from '@/composables/use-model-refs.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, ref, computed, nextTick, onMounted} from 'vue'\n\n// Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'continue',\n  'update',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  isQueueingCourseGeneration: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Update model values\nconst {model, isQueueingCourseGeneration} = toRefs(props)\nconst updateModel = data => emit('update', {data})\n\n//Extract specific model refs\nconst {audience, sourceCourseId} = useModelRefs(model)\n\n//Track course to use name in AI suggestions\nconst {\n  items: courses,\n  loadItemsBatched: loadCourses,\n  isLoadingItems: isLoadingCourses,\n} = useQuerying({\n  handler: (...args) => coursesApi.query(...args),\n  limit: 100,\n  sort: '-updatedAt',\n  fields: [\n    'id',\n    'name',\n    'isNudge',\n    'isPassingValidations',\n  ],\n})\nconst course = computed(() => courses.value.find(c => c.id === sourceCourseId.value))\nconst topic = computed(() => course.value?.name || '')\n\n//Pre-selected course provided in route params\nconst {queryParams} = useRouting()\nupdateModel({sourceCourseId: queryParams.value.courseId || null})\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  sourceCourseId: {required: required('Course')},\n  audience: {required: required('Target audience')},\n  objective: {required: required('Desired outcome')},\n  revisionFocus: {required: required('Focus')},\n}, model, {\n  $autoDirty: true,\n})\n\n//AI suggestions\nconst {\n  suggestions: objectiveSuggestions,\n  loadSuggestions: loadObjectiveSuggestions,\n  isLoadingSuggestions: isLoadingObjectiveSuggestions,\n} = useAISuggestions(aiSuggestionTypes.OBJECTIVE, {topic, audience})\n\n//Dev tools\nconst {scrollToBottom} = usePage()\nconst testFillOutForm = () => {\n  const course = pickRandom(courses.value)\n  const audience = pickRandom([\n    'Project managers',\n    'Team leads',\n    'Scrum masters',\n    'Product owners',\n    'Business analysts',\n  ])\n  updateModel({\n    sourceCourseId: course.id,\n    audience,\n    objective: `${audience} can apply strategies to lead productive meetings.`,\n    revisionFocus: `This course should focus on ${audience} and their unique challenges.`,\n  })\n  setTimeout(() => scrollToBottom(), 150)\n}\n\n//Hide dev tools before going to next step\nconst hideDevTools = ref(false)\nconst continueToNextStep = () => {\n  hideDevTools.value = true\n  nextTick(() => emit('continue'))\n}\n\nonMounted(loadCourses)\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader header=\"Create a new version of an existing course using AI\" />\n    <PageBlock\n      header=\"Select course to modify\"\n      is-required\n    >\n      <FormField :errors=\"$v.sourceCourseId.$errors\">\n        <CourseSelectInput\n          test-id=\"existingCourse\"\n          :courses=\"courses\"\n          :is-loading=\"isLoadingCourses\"\n          :value=\"model.sourceCourseId\"\n          :has-error=\"$v.sourceCourseId.$error\"\n          @input=\"updateModel({sourceCourseId: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      header=\"Who is the target audience for this course?\"\n      is-required\n    >\n      <FormField :errors=\"$v.audience.$errors\">\n        <TextInput\n          test-id=\"targetAudience\"\n          :value=\"model.audience\"\n          :has-error=\"$v.audience.$error\"\n          is-multiline\n          placeholder=\"Describe the audience for this new version\"\n          @input=\"updateModel({audience: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      header=\"What specific action or behavior do you want your learners to demonstrate by the end of this course?\"\n      is-required\n    >\n      <FormField :errors=\"$v.objective.$errors\">\n        <TextInput\n          test-id=\"desiredOutcome\"\n          :value=\"model.objective\"\n          :has-error=\"$v.objective.$error\"\n          placeholder=\"Describe the desired outcome\"\n          is-multiline\n          @input=\"updateModel({objective: $event.value})\"\n        />\n      </FormField>\n\n      <FormField\n        v-if=\"objectiveSuggestions.length > 0 || isLoadingObjectiveSuggestions\"\n        label=\"AI suggestions:\"\n        is-muted\n      >\n        <Spinner\n          v-if=\"isLoadingObjectiveSuggestions\"\n          test-id=\"suggestionsSpinner\"\n        />\n        <Suggestions\n          v-else\n          test-id=\"objectiveSuggestions\"\n          :options=\"objectiveSuggestions\"\n          @input=\"updateModel({objective: $event.value})\"\n        />\n\n        <template #aside>\n          <RegenerateButton\n            :is-disabled=\"isLoadingObjectiveSuggestions\"\n            @click=\"loadObjectiveSuggestions()\"\n          />\n        </template>\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      header=\"What should the new course version focus on?\"\n      is-required\n    >\n      <FormField :errors=\"$v.revisionFocus.$errors\">\n        <TextInput\n          test-id=\"revisionFocus\"\n          :value=\"model.revisionFocus\"\n          :has-error=\"$v.revisionFocus.$error\"\n          placeholder=\"Explain how this course should be different, listing desired content focus or modifications\"\n          is-multiline\n          @input=\"updateModel({revisionFocus: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        label-confirm=\"Generate\"\n        :is-disabled-confirm=\"$v.$invalid\"\n        :has-spinner-confirm=\"isQueueingCourseGeneration\"\n        @confirm=\"continueToNextStep()\"\n        @cancel=\"$emit('cancel')\"\n      />\n    </template>\n\n    <DevTools v-if=\"!hideDevTools\">\n      <ActionButton\n        type=\"secondary\"\n        icon=\"notes\"\n        label=\"Fill out form\"\n        @click=\"testFillOutForm()\"\n      />\n    </DevTools>\n  </FlowStep>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport PageHeader from '@/components/shared/page/PageHeader.vue'\nimport StatusIconLabels from '@/components/shared/core/StatusIconLabels.vue'\nimport StatusIconLabel from '@/components/shared/core/StatusIconLabel.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CourseGenerationErrorModal from '@/components/courses/modals/CourseGenerationErrorModal.vue'\nimport CourseGenerationDelayedModal from '@/components/courses/modals/CourseGenerationDelayedModal.vue'\nimport {statuses} from '@/constants/statuses.js'\nimport {LLMTask} from '@/models/llm-task.model.js'\nimport {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {toRefs, ref, watchEffect} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'cancel',\n  'retry',\n  'complete',\n])\nconst props = defineProps({\n  courseGenerationTask: {\n    type: LLMTask,\n    required: true,\n  },\n})\n\n//Flash messages\nconst {setFlashSuccess} = useFlashMessages()\n\n//Writable task ref needed for useAiTaskStatus\nconst {courseGenerationTask} = toRefs(props)\nconst task = ref(courseGenerationTask.value)\n\n//Tasks status handling\nconst {\n  courseId,\n  isComplete,\n  isError,\n  isOverloaded,\n  headerText,\n  subheaderText,\n} = useAiTaskStatus(task)\n\n//Emit event when complete without errors\nwatchEffect(() => {\n  if (isComplete.value && !isError.value && !isOverloaded.value) {\n    setFlashSuccess('Course generation complete')\n    setTimeout(() => {\n      emit('complete', {courseId: courseId.value})\n    }, 1000)\n  }\n})\n</script>\n\n<template>\n  <FlowStep>\n    <PageHeader\n      :header=\"headerText\"\n      :subheader=\"subheaderText\"\n    >\n      <ProgressBar is-indeterminate />\n    </PageHeader>\n\n    <StatusIconLabels :class=\"$style.status\">\n      <StatusIconLabel\n        :status=\"statuses.SUCCESS\"\n        label=\"Describe your course\"\n      />\n      <StatusIconLabel\n        :status=\"isError ? statuses.DANGER : statuses.SUCCESS\"\n        :status-icon=\"isError ? 'error' : 'check_circle'\"\n        label=\"Modifying course\"\n        :has-spinner=\"!isComplete\"\n      />\n      <StatusIconLabel\n        label=\"Verify course\"\n        :has-spinner=\"isComplete\"\n      />\n    </StatusIconLabels>\n\n    <ActionButton\n      type=\"link\"\n      icon=\"logout\"\n      label=\"Exit this page while the course is being generated\"\n      @click=\"$emit('cancel')\"\n    />\n\n    <CourseGenerationErrorModal\n      :is-open=\"isError\"\n      @cancel=\"$emit('cancel')\"\n      @retry=\"$emit('retry')\"\n    />\n    <CourseGenerationDelayedModal\n      :is-open=\"isOverloaded\"\n      @cancel=\"$emit('cancel')\"\n    />\n  </FlowStep>\n</template>\n\n<style module lang=\"scss\">\n.status {\n  margin-top: -1rem;\n  margin-bottom: 2rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CourseAIModifyDescribeStep from '@/components/courses/ai/CourseAIModifyDescribeStep.vue'\nimport CourseAIModifyGenerateStep from '@/components/courses/ai/CourseAIModifyGenerateStep.vue'\nimport {aiCourseCreationMethods, aiCourseCreationFlowSteps} from '@/constants/ai.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useAiTaskLoader} from '@/composables/use-ai-task-loader.js'\nimport {useAICourseCreation} from '@/composables/use-ai-course-creation.js'\nimport {ref, watch, watchEffect} from 'vue'\n\n//Routing\nconst {queryParams} = useRouting()\nconst folderId = ref(queryParams.value.folderId)\nconst llmTaskId = ref(queryParams.value.llmTaskId)\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Modify courses with AI')\n\n//Step management\nconst {\n  steps,\n  activeStep,\n  checkStepActive,\n  goToFirstStep,\n  goToLastStep,\n  goToNextStep,\n} = useSteps([\n  {\n    key: aiCourseCreationFlowSteps.DESCRIBE,\n    label: 'Describe your course',\n    icon: 'edit_note',\n    route: {\n      name: 'course-ai-modify.describe',\n    },\n  },\n  {\n    key: aiCourseCreationFlowSteps.GENERATE,\n    label: 'Generate course',\n    icon: 'auto_awesome',\n    route: {\n      allowEntry: true,\n      name: 'course-ai-modify.generate',\n    },\n  },\n])\n\n//Navigation\nconst {\n  goToCoursesOverview,\n  goToEditCourse,\n} = useNavigation()\n\n//Use AI course creation\nconst {\n  model,\n  updateModel,\n  isQueueingCourseGeneration,\n  queueCourseGeneration,\n  moveCourseToFolder,\n} = useAICourseCreation(aiCourseCreationMethods.MODIFY, folderId)\n\n//Course generation tasks\nconst {isLoadingLlmTask, llmTask} = useAiTaskLoader(llmTaskId)\nconst courseGenerationTask = ref(null)\n\n//Step navigation\nconst continueFromDescribeStep = async () => {\n  try {\n    const data = await queueCourseGeneration()\n    courseGenerationTask.value = data.tasks[0]\n    goToNextStep()\n  }\n  catch {\n    //Handled by composable\n  }\n}\n\n//Watch LLM tasks and go to generate step if one is loaded\nwatchEffect(() => {\n  if (llmTask.value) {\n    courseGenerationTask.value = llmTask.value\n    goToLastStep()\n  }\n})\n\n//Watch active step, and ensure we're redirected to the generate step if we're\n//in the middle of generation\nwatch(activeStep, () => {\n  if (activeStep.value !== aiCourseCreationFlowSteps.GENERATE && courseGenerationTask.value) {\n    goToLastStep()\n  }\n})\n\n//Completion of course creation\nconst complete = courseId => {\n  moveCourseToFolder(courseId)\n  goToEditCourse(courseId)\n}\n</script>\n\n<template>\n  <PageWrapper limited-width>\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-loading=\"isLoadingLlmTask\"\n    >\n      <CourseAIModifyDescribeStep\n        v-if=\"checkStepActive(aiCourseCreationFlowSteps.DESCRIBE)\"\n        :model=\"model\"\n        :is-queueing-course-generation=\"isQueueingCourseGeneration\"\n        @continue=\"continueFromDescribeStep()\"\n        @cancel=\"goToCoursesOverview()\"\n        @update=\"updateModel($event.data)\"\n      />\n      <CourseAIModifyGenerateStep\n        v-else-if=\"checkStepActive(aiCourseCreationFlowSteps.GENERATE)\"\n        :course-generation-task=\"courseGenerationTask\"\n        @cancel=\"goToCoursesOverview()\"\n        @retry=\"goToFirstStep()\"\n        @complete=\"complete($event.courseId)\"\n      />\n    </Flow>\n  </PageWrapper>\n</template>\n","import {BaseApi} from '@/api/base.api.js'\nimport {createFormData} from '@/helpers/object.js'\nimport {replaceUnicode} from '@/helpers/string.js'\n\n/**\n * Video API service\n */\nexport class VideoApi extends BaseApi {\n\n  //Props\n  basePath = '/'\n\n  /**\n   * Prepare for video upload\n   */\n  prepareUpload(videoKey) {\n    return this.post('/vue_image_upload', {\n      destKey: videoKey,\n    })\n  }\n\n  /**\n   * Upload video\n   */\n  uploadVideo(file, config, controller) {\n\n    //Extract config\n    const {filename, fields, url} = config\n\n    //Create new form data based on fields and append file with correct name\n    const formData = createFormData(fields)\n    formData.append('file', file, filename)\n\n    //Upload\n    return this.upload(url, formData, {\n      signal: controller?.signal,\n    })\n  }\n\n  /**\n   * Generate signed URL for existing video key\n   */\n  async generateSignedUrl(videoKey) {\n\n    //Get data\n    const data = await this.post('/generate_presigned_url_for_vue_image_url', {\n      image_key: videoKey,\n    })\n\n    //Return URL (the JSON parse converts unicode characters)\n    return replaceUnicode(data.presigned_url)\n  }\n\n  /**\n   * Generate signed URL for video upload\n   */\n  async generateSignedUrlForUpload(tempBucketFilename, videoKey) {\n\n    //Get data\n    const data = await this.post('/generate_presigned_url_for_image_upload', {\n      file_name: tempBucketFilename,\n      dest_key: videoKey,\n    })\n\n    //Return URL (the JSON parse converts unicode characters)\n    return replaceUnicode(data.presigned_url)\n  }\n\n  /**\n   * Process video\n   */\n  async processVideo(tempBucketFilename) {\n    const data = this.post('/process_video', {key: tempBucketFilename})\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Video processing failed')\n    }\n    return data\n  }\n\n  /**\n   * Get video processing status\n   */\n  async getVideoProcessingStatus(videoKey) {\n    const data = this.get(`/video_status/${videoKey}`)\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Video processing failed')\n    }\n    return data\n  }\n\n  /**\n   * Extract thumbnail from video\n   */\n\n  async extractThumbnail(videoKey, time, duration) {\n    return this.post(`/extract_thumbnail/${videoKey}`, {\n      time,\n      duration,\n    })\n  }\n\n  //Santize file name\n  sanitizeFileName(name, maxlength = 24) {\n\n    //Clean up and split into parts\n    const parts = name\n      .replace(/[^a-z0-9.]/gi, '_')\n      .toLowerCase()\n      .split('.')\n\n    //Get extension and shorten base if needed, removing any extra dots\n    const ext = parts.pop()\n    const base = parts.join('_').substring(0, maxlength - ext.length - 1)\n\n    //Combine with extension again\n    return `${base}.${ext}`\n  }\n}\n\n//Export singleton instance\nexport const videoApi = new VideoApi()\n","import {videoApi} from '@/api/video.api.js'\nimport {computed, onUnmounted, unref} from 'vue'\nimport {computedAsync} from '@vueuse/core'\n\n/**\n * Video source composable\n */\nexport function useVideoSource(src, isVideoKey) {\n\n  //Check what type of data we have gotten\n  const isFile = computed(() => src.value instanceof File)\n  isVideoKey = unref(isVideoKey)\n\n  //Video preview computed ref\n  const videoSrc = computedAsync(async () => {\n    if (!src.value) {\n      return null\n    }\n    if (isFile.value) {\n      return URL.createObjectURL(src.value)\n    }\n    if (isVideoKey) {\n      return await videoApi.generateSignedUrl(src.value)\n    }\n    return src.value\n  }, null)\n\n  //Revoke object URL on unmount\n  onUnmounted(() => {\n    if (isFile.value) {\n      URL.revokeObjectURL(videoSrc.value)\n    }\n  })\n\n  //Expose interface\n  return {\n    videoSrc,\n  }\n}\n","import {loadVideoMetadata} from '@/helpers/file.js'\nimport {useVideoSource} from '@/composables/use-video-source'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed, watchEffect} from 'vue'\n\n/**\n * Video composable\n */\nexport function useVideo(src, isVideoKey) {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Video refs\n  const video = ref(null)\n  const isLoading = ref(true)\n  const videoWidth = computed(() => video.value?.videoWidth)\n  const videoHeight = computed(() => video.value?.videoHeight)\n  const videoDuration = computed(() => video.value?.duration)\n  const videoRatio = computed(() => {\n    if (video.value) {\n      return videoHeight.value / videoWidth.value\n    }\n    return 0\n  })\n\n  //Determine video source (input could be a File, video key, or URL)\n  const {videoSrc} = useVideoSource(src, isVideoKey)\n\n  //Load video from source\n  watchEffect(async () => {\n    if (videoSrc.value) {\n      try {\n        video.value = await loadVideoMetadata(videoSrc.value)\n      }\n      catch (error) {\n        processError(error)\n      }\n      finally {\n        isLoading.value = false\n      }\n    }\n  })\n\n  // Expose interface\n  return {\n    video,\n    isLoading,\n    videoWidth,\n    videoHeight,\n    videoDuration,\n    videoRatio,\n    loadVideoMetadata,\n  }\n}\n","<script setup>\nimport TransitionFadeIn from '@/components/shared/transitions/TransitionFadeIn.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {useVideo} from '@/composables/use-video.js'\nimport {useImage} from '@/composables/use-image.js'\nimport {ref, toRefs, watchEffect, onUpdated, computed, nextTick} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'is-loading',\n])\nconst props = defineProps({\n  src: {\n    type: [String, File],\n    required: true,\n  },\n  isVideoKey: {\n    type: Boolean,\n    default: false,\n  },\n  maxHeight: {\n    type: Number,\n    default: 0,\n  },\n  canControl: {\n    type: Boolean,\n    default: true,\n  },\n  imageKey: {\n    type: String,\n    default: '',\n  },\n})\n\n//Get refs\nconst {src, isVideoKey, maxHeight, imageKey} = toRefs(props)\n\n//Composables\nconst {isLoading, video, videoRatio, videoWidth, videoDuration} = useVideo(src, isVideoKey)\nconst {image} = useImage(imageKey, true)\n\n//Refs\nconst videoElement = ref(null)\nconst card = ref(null)\nconst cardWidth = ref(0)\nconst cardHeight = computed(() => Math.min(\n  cardWidth.value * videoRatio.value,\n  maxHeight.value ? maxHeight.value : Infinity\n))\n\n//Monitor card width\nonUpdated(() => {\n  nextTick(() => {\n    setTimeout(() => {\n      const newWidth = card.value?.clientWidth || 0\n      if (newWidth !== cardWidth.value) {\n        cardWidth.value = newWidth\n      }\n    }, 100)\n  })\n})\n\n//Emit loading state\nwatchEffect(() => emit('is-loading', {isLoading: isLoading.value, videoDuration: videoDuration.value}))\n\n//Expose video element ref\ndefineExpose({\n  videoElement,\n})\n</script>\n\n<template>\n  <div\n    v-if=\"src\"\n    ref=\"card\"\n    :class=\"{\n      [$style.card]: true,\n    }\"\n    :style=\"{\n      height: `${cardHeight}px`,\n      maxWidth: `${videoWidth}px`,\n    }\"\n  >\n    <Spinner v-if=\"!video || isLoading\" />\n    <TransitionFadeIn>\n      <video\n        v-if=\"video\"\n        ref=\"videoElement\"\n        :controls=\"canControl\"\n        preload=\"metadata\"\n        :poster=\"image ? image.src : ''\"\n        :class=\"{\n          [$style.video]: true,\n          [$style.restricted]: maxHeight > 0,\n        }\"\n        :style=\"{\n          maxWidth: `${videoWidth}px`,\n          maxHeight: maxHeight ? `${maxHeight}px` : 'none',\n        }\"\n      ><source :src=\"video.src\"></video>\n    </TransitionFadeIn>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.card {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  width: 100%;\n  margin: 0 auto;\n  min-height: 24px;\n  overflow: hidden;\n}\n.video {\n  width: 100%;\n  height: auto;\n  max-height: 100%;\n  object-fit: contain;\n  &.restricted {\n    max-height: 200px;\n  }\n}\n</style>\n","import {imageApi} from '@/api/image.api.js'\nimport {useFileUploadState} from '@/composables/use-file-upload-state.js'\nimport {useFakeProgress} from '@/composables/use-fake-progress.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDelay} from '@/composables/use-delay.js'\nimport {useUuid} from '@/composables/use-uuid.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {ref, computed, watchEffect} from 'vue'\n\n/**\n * Image upload composable\n */\nexport function useImageUpload(file) {\n\n  //Must initialize with file\n  if (!(file instanceof File)) {\n    throw new Error(`Please provide a File object`)\n  }\n\n  //Composables\n  const {generateUuid, getTestUuid} = useUuid()\n  const {processError} = useErrorHandling()\n  const {isTest} = useEnv()\n  const {delay} = useDelay(1000)\n\n  //Fake progress\n  const {\n    progress: uploadProgress,\n    startProgress,\n    setProgress,\n  } = useFakeProgress({\n    min: 0,\n    max: 0.99,\n    targetDuration: file.size / 25,\n  })\n\n  //Store prepared parameters\n  const url = ref(null)\n  const fields = ref(null)\n  const bucket = ref(null)\n  const imageKey = ref(null)\n\n  //Refs\n  const filename = ref('')\n  const signedUrl = ref('')\n\n  //Upload status\n  const isUploading = ref(false)\n  const isUploadFinished = ref(false)\n  const uploadMessage = ref('')\n  const uploadStatus = ref('')\n  const uploadSuccess = ref(false)\n  const uploadError = ref(null)\n\n  //Abort upload controller\n  const controller = new AbortController()\n  const abortUpload = () => {\n    if (isUploading.value) {\n      controller.abort()\n    }\n  }\n\n  //File upload state management\n  const {updateFileUploadState} = useFileUploadState(file)\n\n  //Update state as needed\n  watchEffect(() => {\n    updateFileUploadState({\n      controller,\n      isUploading: isUploading.value,\n      isUploadFinished: isUploadFinished.value,\n      uploadProgress: uploadProgress.value,\n      uploadMessage: uploadMessage.value,\n      uploadStatus: uploadStatus.value,\n      uploadSuccess: uploadSuccess.value,\n      uploadError: uploadError.value,\n    })\n  })\n\n  //Computed refs\n  const tempBucketFilename = computed(() => {\n    if (fields.value && filename.value) {\n      return fields.value.key.replace('${filename}', filename.value)\n    }\n    return ''\n  })\n\n  //Generate image key\n  const generateImageKey = () => {\n    imageKey.value =\n      isTest.value ?\n        getTestUuid('imageUpload') :\n        generateUuid()\n  }\n\n  //Prepare for image upload\n  const prepareForUpload = async () => {\n\n    //Fetch data\n    const data = await imageApi.prepareUpload(imageKey.value)\n\n    //Extract and store relevant data\n    url.value = data.post.url\n    fields.value = data.post.fields\n    bucket.value = data.bucket\n  }\n\n  //Upload image to temp bucket\n  const uploadToTempBucket = async () => {\n\n    //Check if we have everything we need\n    if (!url.value || !fields.value || !bucket.value || !imageKey.value) {\n      throw new Error(`Missing parameters for image upload`)\n    }\n\n    //Update uploading state\n    isUploading.value = true\n    uploadMessage.value = 'Uploading image...'\n\n    //Sanitize filename\n    filename.value = imageApi.sanitizeFileName(file.name)\n\n    //Upload file\n    await imageApi.uploadImage(file, {\n      url: url.value,\n      fields: fields.value,\n      filename: filename.value,\n    }, controller)\n  }\n\n  //Generate signed URL\n  const generateSignedUrl = async () => {\n    signedUrl.value = await imageApi\n      .generateSignedUrlForUpload(tempBucketFilename.value, imageKey.value)\n  }\n\n  //Process image\n  const processImage = async () => {\n    const data = await imageApi.processImage(tempBucketFilename.value)\n    uploadStatus.value = data.status\n    uploadMessage.value = data.message || 'Processing image...'\n  }\n\n  //Check image processing status\n  const checkProcessingStatus = async (attempt = 1) => {\n\n    //Fail if max attempts reached\n    if (attempt > 60) {\n      throw new Error(`Processing this image has timed out`)\n    }\n\n    //Get processing status\n    const data = await imageApi.getImageProcessingStatus(imageKey.value)\n\n    //Update status\n    uploadStatus.value = data.status\n    uploadMessage.value = data.message\n\n    //Check if processing is done\n    if (data.status === 'finished') {\n      return true\n    }\n\n    //Check if processing has errored\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Image processing failed')\n    }\n\n    //Delay and call recursively\n    await delay()\n    await checkProcessingStatus(attempt + 1)\n  }\n\n  //Wrapper to upload and process image\n  const upload = async () => {\n\n    //Must ensure resetUpload() is called before uploading the next file\n    //This is to force the consumer of this composable to think about processing\n    //of multiple files and ensure we don't accidentally cause unwanted side effects\n    if (isUploading.value || isUploadFinished.value) {\n      throw new Error(`Upload already in progress/finished. Please initialize a new upload with useImageUpload(file) to upload additional images.`)\n    }\n\n    //Start progress and generate image key\n    startProgress()\n    generateImageKey()\n\n    //Wrap in try block\n    try {\n\n      //Prepare for upload, and upload to temp bucket\n      await prepareForUpload()\n      await uploadToTempBucket()\n      setProgress(0.40)\n\n      //Get signed url and tell server to process image\n      await Promise.all([\n        generateSignedUrl(),\n        processImage(),\n      ])\n      setProgress(0.65)\n\n      //Check processing status\n      await checkProcessingStatus()\n\n      //Successful upload\n      uploadSuccess.value = true\n      return imageKey.value\n    }\n    catch (error) {\n      uploadError.value = error\n      uploadStatus.value = 'error'\n      uploadMessage.value = 'Error uploading image'\n      processError(error)\n      throw error\n    }\n    finally {\n      setProgress(1)\n      await delay(250)\n      isUploading.value = false\n      isUploadFinished.value = true\n    }\n  }\n\n  //Expose interface\n  return {\n    upload,\n    abortUpload,\n    imageKey,\n    isUploading,\n    isUploadFinished,\n    uploadProgress,\n    uploadMessage,\n    uploadStatus,\n    uploadError,\n    filename,\n  }\n}\n","import {videoApi} from '@/api/video.api.js'\nimport {useFileUploadState} from '@/composables/use-file-upload-state.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useFakeProgress} from '@/composables/use-fake-progress.js'\nimport {useDelay} from '@/composables/use-delay.js'\nimport {useUuid} from '@/composables/use-uuid.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {ref, computed, watchEffect} from 'vue'\n\n/**\n * Video upload composable\n */\nexport function useVideoUpload(file) {\n\n  //Must initialize with file\n  if (!(file instanceof File)) {\n    throw new Error(`Please provide a File object`)\n  }\n\n  //Composables\n  const {generateUuid, getTestUuid} = useUuid()\n  const {processError} = useErrorHandling()\n  const {isTest} = useEnv()\n  const {delay} = useDelay(2000)\n\n  //Fake progress\n  const {\n    progress: uploadProgress,\n    startProgress,\n    setProgress,\n  } = useFakeProgress({\n    min: 0,\n    max: 0.99,\n    targetDuration: file.size / 25,\n  })\n\n  //Store prepared parameters\n  const url = ref(null)\n  const fields = ref(null)\n  const bucket = ref(null)\n  const videoKey = ref(null)\n  const previewKey = ref(null)\n\n  //Refs\n  const filename = ref('')\n  const signedUrl = ref('')\n\n  //Upload status\n  const isUploading = ref(false)\n  const isUploadFinished = ref(false)\n  const uploadMessage = ref('')\n  const uploadStatus = ref('')\n  const uploadSuccess = ref(false)\n  const uploadError = ref(null)\n\n  //Abort upload controller\n  const controller = new AbortController()\n  const abortUpload = () => {\n    if (isUploading.value) {\n      controller.abort()\n    }\n  }\n\n  //File upload state management\n  const {updateFileUploadState} = useFileUploadState(file)\n\n  //Update state as needed\n  watchEffect(() => {\n    updateFileUploadState({\n      controller,\n      isUploading: isUploading.value,\n      isUploadFinished: isUploadFinished.value,\n      uploadProgress: uploadProgress.value,\n      uploadMessage: uploadMessage.value,\n      uploadStatus: uploadStatus.value,\n      uploadSuccess: uploadSuccess.value,\n      uploadError: uploadError.value,\n    })\n  })\n\n  //Computed refs\n  const tempBucketFilename = computed(() => {\n    if (fields.value && filename.value) {\n      return fields.value.key.replace('${filename}', filename.value)\n    }\n    return ''\n  })\n\n  //Generate video key\n  const generateVideoKey = () => {\n    videoKey.value =\n        isTest.value ?\n          getTestUuid('videoUpload') :\n          generateUuid()\n  }\n\n  //Prepare for video upload\n  const prepareForUpload = async () => {\n\n    //Fetch data\n    const data = await videoApi.prepareUpload(videoKey.value)\n\n    //Extract and store relevant data\n    url.value = data.post.url\n    fields.value = data.post.fields\n    bucket.value = data.bucket\n  }\n\n  //Upload video to temp bucket\n  const uploadToTempBucket = async () => {\n\n    //Check if we have everything we need\n    if (!url.value || !fields.value || !bucket.value || !videoKey.value) {\n      throw new Error(`Missing parameters for video upload`)\n    }\n\n    //Update uploading state\n    isUploading.value = true\n    uploadMessage.value = 'Uploading video...'\n\n    //Sanitize filename\n    filename.value = videoApi.sanitizeFileName(file.name)\n\n    //Upload file\n    await videoApi.uploadVideo(file, {\n      url: url.value,\n      fields: fields.value,\n      filename: filename.value,\n    }, controller)\n  }\n\n  //Generate signed URL\n  const generateSignedUrl = async () => {\n    signedUrl.value = await videoApi\n      .generateSignedUrlForUpload(tempBucketFilename.value, videoKey.value)\n  }\n\n  //Process video\n  const processVideo = async () => {\n    const data = await videoApi.processVideo(tempBucketFilename.value)\n    uploadStatus.value = data.status\n    uploadMessage.value = data.message || 'Processing video...'\n  }\n\n  //Check video processing status\n  const checkProcessingStatus = async (attempt = 1) => {\n\n    //Fail if max attempts reached\n    //This corresponds to 15 minutes, as delay between checks is 2 seconds\n    if (attempt > 450) {\n      throw new Error(`Processing this video has timed out`)\n    }\n\n    //Get processing status\n    const data = await videoApi.getVideoProcessingStatus(videoKey.value)\n\n    //Update status\n    uploadStatus.value = data.status\n    uploadMessage.value = data.message\n\n    //Check if processing is done\n    if (data.status === 'finished') {\n      previewKey.value = data.preview_key\n      return true\n    }\n\n    //Check if processing has errored\n    if (data.status === 'error') {\n      throw new Error(data.message || 'Video processing failed')\n    }\n\n    //Delay and call recursively\n    await delay()\n    await checkProcessingStatus(attempt + 1)\n  }\n\n  //Wrapper to upload and process video\n  const upload = async () => {\n    //Must ensure resetUpload() is called before uploading the next file\n    //This is to force the consumer of this composable to think about processing\n    //of multiple files and ensure we don't accidentally cause unwanted side effects\n    if (isUploading.value || isUploadFinished.value) {\n      throw new Error(`Upload already in progress/finished. Please initialize a new upload with useVideoUpload(file) to upload additional videos.`)\n    }\n\n    //Start progress and generate video key\n    startProgress()\n    generateVideoKey()\n\n    //Wrap in try block\n    try {\n\n      //Prepare for upload, and upload to temp bucket\n      await prepareForUpload()\n      await uploadToTempBucket()\n      setProgress(0.40)\n\n      //Get signed url and tell server to process video\n      await Promise.all([\n        generateSignedUrl(),\n        processVideo(),\n      ])\n      setProgress(0.65)\n\n      //Check processing status\n      await checkProcessingStatus()\n\n      //Successful upload\n      uploadSuccess.value = true\n      return {videoKey: videoKey.value, previewKey: previewKey.value}\n    }\n    catch (error) {\n      uploadError.value = error\n      uploadStatus.value = 'error'\n      uploadMessage.value = 'Error uploading video'\n      processError(error)\n      throw error\n    }\n    finally {\n      setProgress(1)\n      await delay(250)\n      isUploading.value = false\n      isUploadFinished.value = true\n    }\n\n  }\n\n  //Expose interface\n  return {\n    upload,\n    abortUpload,\n    videoKey,\n    isUploading,\n    isUploadFinished,\n    uploadProgress,\n    uploadMessage,\n    uploadStatus,\n    uploadError,\n    filename,\n  }\n}\n","<script setup>\nimport MediaFileSelect from '@/components/shared/file/MediaFileSelect.vue'\nimport ImageCard from '@/components/shared/image/ImageCard.vue'\nimport VideoCard from '@/components/shared/video/VideoCard.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {videoFileTypes} from '@/constants/file-types.js'\nimport {useImageUpload} from '@/composables/use-image-upload.js'\nimport {useVideoUpload} from '@/composables/use-video-upload.js'\nimport {ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'is-uploading',\n  'dirty',\n])\ndefineProps({\n  imageKey: {\n    type: String,\n    default: '',\n  },\n  videoKey: {\n    type: String,\n    default: '',\n  },\n  restrictedHeight: {\n    type: Boolean,\n    default: false,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Loading state\nconst isLoading = ref(false)\n\n//Process image\nconst processImage = async file => {\n\n  //Use image upload composable (as instance)\n  const {upload} = useImageUpload(file)\n\n  //Upload file\n  try {\n    emit('is-uploading', {isUploading: true})\n    const imageKey = await upload()\n    emit('input', {imageKey})\n    emit('dirty')\n  }\n  catch {\n    //Handled by file preview component\n  }\n  finally {\n    emit('is-uploading', {isUploading: false})\n  }\n}\n\n//Process video\nconst processVideo = async file => {\n\n  //Use video upload composable (as instance)\n  const {upload} = useVideoUpload(file)\n\n  //Upload files (thumbnail and video itself)\n  try {\n    emit('is-uploading', {isUploading: true})\n    const response = await upload()\n    const {videoKey, previewKey} = response\n    emit('input', {videoKey, imageKey: previewKey})\n    emit('dirty')\n  }\n  catch {\n    //Handled by file preview component\n  }\n  finally {\n    emit('is-uploading', {isUploading: false})\n  }\n}\n\n//Process files\nconst processFile = file => {\n\n  //No file/canceled\n  if (!file) {\n    emit('input', {\n      imageKey: '',\n      videoKey: '',\n      thumbnailTime: 0,\n    })\n    emit('dirty')\n    return\n  }\n\n  //Check what type of file we're uploading\n  if (videoFileTypes.includes(file.type)) {\n    processVideo(file)\n  }\n  else {\n    processImage(file)\n  }\n}\n\nconst clearUpload = () => {\n  emit('input', {\n    imageKey: '',\n    videoKey: '',\n    thumbnailTime: 0,\n  })\n  emit('dirty')\n}\n\n</script>\n\n<template>\n  <div :class=\"$style.wrapper\">\n    <div\n      v-if=\"imageKey || videoKey\"\n      :class=\"$style.existing\"\n    >\n      <div :class=\"$style.buttonContainer\">\n        <ActionButton\n          v-if=\"!isLoading\"\n          type=\"text\"\n          icon=\"close\"\n          is-danger\n          :is-disabled=\"isDisabled\"\n          @click=\"clearUpload()\"\n        >\n          <template #label>\n            Change or remove {{ videoKey ? 'video' : 'image' }}\n          </template>\n        </ActionButton>\n      </div>\n      <VideoCard\n        v-if=\"videoKey\"\n        :src=\"videoKey\"\n        :image-key=\"imageKey\"\n        is-video-key\n        @is-loading=\"isLoading = $event.isLoading\"\n      />\n      <ImageCard\n        v-else\n        :src=\"imageKey\"\n        is-image-key\n        :is-animated=\"false\"\n        :max-height=\"restrictedHeight ? 200 : 0\"\n        @is-loading=\"isLoading = $event.isLoading\"\n      />\n      <slot\n        name=\"underCard\"\n        :is-loading=\"isLoading\"\n      />\n    </div>\n    <MediaFileSelect\n      v-else\n      v-bind=\"$attrs\"\n      :is-disabled=\"isDisabled\"\n      :allow-multiple=\"false\"\n      @files=\"processFile($event.files[0])\"\n    />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  flex: 1;\n}\n.existing {\n  display: flex;\n  flex-direction: column;\n}\n.buttonContainer {\n  display: flex;\n  justify-content: flex-end;\n  margin-bottom: 0.5rem;\n}\n</style>\n","import {coursesApi} from '@/api/courses.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed} from 'vue'\n\n/**\n * Dedicated SMS address composable\n */\nexport function useDedicatedSmsAddress(course) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isRequestingDedicatedSmsAddress = ref(false)\n  const isEnablingDedicatedSmsAddress = ref(false)\n\n  //Computed\n  const preferredSmsAddress = computed(() => course?.value?.preferredSmsAddress)\n  const dedicatedSmsAddress = computed(() => course?.value?.dedicatedSmsAddress)\n  const hasPreferredSmsAddress = computed(() => !!preferredSmsAddress.value)\n  const hasDedicatedSmsAddress = computed(() => !!dedicatedSmsAddress.value)\n  const isDedicatedSmsAddressEnabled = computed(() => dedicatedSmsAddress.value?.isEnabled)\n\n  //Request dedicated SMS address\n  const requestDedicatedSmsAddress = async () => {\n\n    //Must have course ref\n    if (!course?.value) {\n      throw new Error(`Must have course ref`)\n    }\n\n    //Flag as requesting\n    isRequestingDedicatedSmsAddress.value = true\n    try {\n\n      //Request dedicated SMS number\n      const address = await coursesApi.requestDedicatedSmsAddress(course.value.id)\n      setFlashSuccess(`Dedicated SMS number reserved`)\n\n      //Update on course and return address\n      course.value.dedicatedSmsAddress = address\n      return address\n    }\n    catch (error) {\n      setFlashFailure(`Failed to request dedicated SMS number`)\n      processError(error)\n      throw error\n    }\n    finally {\n      isRequestingDedicatedSmsAddress.value = false\n    }\n  }\n\n  //Enable dedicated SMS number\n  const enableDedicatedSmsAddress = async () => {\n\n    //Must have course ref\n    if (!course?.value) {\n      throw new Error(`Must have course ref`)\n    }\n\n    //Flag as enabling\n    isEnablingDedicatedSmsAddress.value = true\n    try {\n\n      //Enable dedicated SMS number\n      const address = await coursesApi.enableDedicatedSmsAddress(course.value.id)\n      setFlashSuccess(`Dedicated SMS address enabled`)\n\n      //Update on course and return address\n      course.value.dedicatedSmsAddress = address\n      return address\n    }\n    catch (error) {\n      setFlashFailure(`Failed to enable dedicated SMS number`)\n      processError(error)\n      throw error\n    }\n    finally {\n      isEnablingDedicatedSmsAddress.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    preferredSmsAddress,\n    dedicatedSmsAddress,\n    hasPreferredSmsAddress,\n    hasDedicatedSmsAddress,\n    isDedicatedSmsAddressEnabled,\n    isRequestingDedicatedSmsAddress,\n    isEnablingDedicatedSmsAddress,\n    requestDedicatedSmsAddress,\n    enableDedicatedSmsAddress,\n  }\n}\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useDedicatedSmsAddress} from '@/composables/use-dedicated-sms-address.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  course: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get props\nconst {course} = toRefs(props)\n\n//Current user\nconst {isSuperAdmin} = useCurrentUser()\n\n//Dedicated SMS number handling\nconst {\n  preferredSmsAddress,\n  dedicatedSmsAddress,\n  hasPreferredSmsAddress,\n  hasDedicatedSmsAddress,\n  isDedicatedSmsAddressEnabled,\n  requestDedicatedSmsAddress,\n  enableDedicatedSmsAddress,\n  isRequestingDedicatedSmsAddress,\n  isEnablingDedicatedSmsAddress,\n} = useDedicatedSmsAddress(course)\n</script>\n\n<template>\n  <FormField\n    is-list\n    :label=\"hasPreferredSmsAddress ? 'Preferred SMS number' : 'Dedicated SMS number'\"\n  >\n    <p v-if=\"hasDedicatedSmsAddress\">\n      {{ dedicatedSmsAddress.displayValue }}\n      <small\n        v-if=\"!isDedicatedSmsAddressEnabled\"\n        text-muted\n      >(not yet enabled)</small>\n    </p>\n    <p v-else-if=\"hasPreferredSmsAddress\">\n      {{ preferredSmsAddress.displayValue }}\n    </p>\n\n    <Alert\n      v-if=\"hasDedicatedSmsAddress && isDedicatedSmsAddressEnabled\"\n      text=\"Dedicated SMS number is enabled. All new enrollments will be sent from this number.\"\n      type=\"success\"\n    />\n    <Alert\n      v-else-if=\"hasDedicatedSmsAddress\"\n      text=\"This number is pending verification. We'll update you once it’s approved so you can deliver your courses with the dedicated number.\"\n      type=\"warning\"\n    />\n\n    <ButtonBar>\n      <ActionButton\n        v-if=\"!hasDedicatedSmsAddress\"\n        label=\"Request dedicated toll free number\"\n        icon=\"add_call\"\n        type=\"link\"\n        :is-disabled=\"isRequestingDedicatedSmsAddress\"\n        @click=\"requestDedicatedSmsAddress()\"\n      />\n      <ActionButton\n        v-else-if=\"hasDedicatedSmsAddress && !isDedicatedSmsAddressEnabled && isSuperAdmin\"\n        label=\"Enable dedicated toll free number\"\n        icon=\"phone_callback\"\n        type=\"link\"\n        :is-disabled=\"isEnablingDedicatedSmsAddress\"\n        @click=\"enableDedicatedSmsAddress()\"\n      />\n      <Spinner v-if=\"isRequestingDedicatedSmsAddress || isEnablingDedicatedSmsAddress\" />\n    </ButtonBar>\n  </FormField>\n</template>\n","<script setup>\nimport ImageCard from '@/components/shared/image/ImageCard.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {openUrl} from '@/helpers/url.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  imageSrc: {\n    type: String,\n    default: '',\n  },\n  title: {\n    type: String,\n    default: '',\n  },\n  description: {\n    type: String,\n    default: '',\n  },\n  domain: {\n    type: String,\n    default: '',\n  },\n  url: {\n    type: String,\n    default: '',\n  },\n  width: {\n    type: String,\n    default: '300px',\n  },\n})\n\n//Get refs\nconst {url} = toRefs(props)\n\n//Open URL\nconst handleClick = () => openUrl(url.value, null, true)\n</script>\n\n<template>\n  <div :class=\"$style.container\">\n    <div\n      :class=\"$style.wrapper\"\n      :style=\"{width: width}\"\n      @click=\"handleClick()\"\n    >\n      <ImageCard\n        v-if=\"imageSrc\"\n        :src=\"imageSrc\"\n        is-image-key\n        :is-rounded=\"false\"\n      />\n      <div\n        v-else\n        :class=\"$style.placeholder\"\n      >\n        <Icon\n          icon=\"preview_off\"\n          color=\"muted\"\n          size=\"l\"\n        />\n      </div>\n      <div :class=\"$style.info\">\n        <h5 :class=\"$style.title\">\n          {{ title }}\n        </h5>\n        <small\n          :class=\"$style.domain\"\n          is-text-muted\n        >\n          {{ domain }}\n        </small>\n      </div>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  display: flex;\n  justify-content: center;\n  margin-bottom: 1rem;\n}\n\n.wrapper {\n  display: flex;\n  border-radius: var(--border-radius-m);\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n  background-color: var(--bg-panels);\n  cursor: pointer;\n}\n\n.placeholder {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: var(--bg-panels);\n  height: 200px;\n}\n\n.info {\n  padding: 1rem;\n}\n\n.title {\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  text-overflow: ellipsis;\n}\n\n.domain {\n  overflow: hidden;\n  display: -webkit-box;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 1;\n}\n</style>\n","import {videoApi} from '@/api/video.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Composable to extract thumbnail from video based on time and duration\n */\nexport function useThumbnailExtraction() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isLoading = ref(false)\n\n  //Extract thumbnail from video\n  const extractThumbnail = async (videoKey, time, duration) => {\n    isLoading.value = true\n    try {\n      const response = await videoApi.extractThumbnail(videoKey, time, duration)\n      setFlashSuccess('Thumbnail updated successfully')\n      return response.image_key\n    }\n    catch (error) {\n      setFlashFailure(error.message || 'Failed to extract thumbnail')\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoading.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isLoading,\n    extractThumbnail,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport {useThumbnailExtraction} from '@/composables/use-thumbnail-extraction.js'\nimport VideoCard from '@/components/shared/video/VideoCard.vue'\nimport {ref, toRefs, watchEffect} from 'vue'\n\nconst emit = defineEmits([\n  'open',\n  'close',\n  'save',\n])\n\nconst props = defineProps({\n  videoKey: {\n    type: String,\n    default: '',\n  },\n  imageKey: {\n    type: String,\n    default: '',\n  },\n  thumbnailTime: {\n    type: Number,\n    default: 0,\n  },\n})\n\nconst {videoKey, thumbnailTime} = toRefs(props)\n\nconst {extractThumbnail, isLoading: isExtractingThumbnail} = useThumbnailExtraction()\n\nconst currentTime = ref(thumbnailTime.value)\nconst videoElement = ref(null)\nconst barPosition = ref(0)\nconst videoCard = ref(null)\nconst videoDuration = ref(0)\nconst isLoading = ref(false)\nconst isVideoReady = ref(false)\n\nconst updateVideoTime = () => {\n  if (videoElement.value && videoDuration.value) {\n    videoElement.value.currentTime = (barPosition.value / 100) * videoDuration.value\n    currentTime.value = videoElement.value.currentTime\n    barPosition.value = (currentTime.value / videoDuration.value) * 100\n  }\n}\n\nconst setInitialVideoTime = () => {\n  if (videoElement.value && videoDuration.value && thumbnailTime.value) {\n    videoElement.value.currentTime = thumbnailTime.value\n    currentTime.value = thumbnailTime.value\n    barPosition.value = (thumbnailTime.value / videoDuration.value) * 100\n  }\n}\n\nconst handleMouseMove = event => {\n  const rect = videoElement.value.getBoundingClientRect()\n  const x = event.clientX - rect.left\n  const newBarPosition = Math.min(Math.max(x / rect.width * 100, 0), 100)\n  barPosition.value = newBarPosition\n  updateVideoTime()\n}\n\nconst handleMouseUp = () => {\n  document.removeEventListener('mousemove', handleMouseMove)\n  document.removeEventListener('mouseup', handleMouseUp)\n}\n\nconst handleMouseDown = event => {\n  handleMouseMove(event)\n  document.addEventListener('mousemove', handleMouseMove)\n  document.addEventListener('mouseup', handleMouseUp)\n}\n\nconst getVideoElementRef = event => {\n  if (event.isLoading) {\n    isLoading.value = true\n  }\n  else {\n    videoElement.value = videoCard.value.videoElement\n    videoDuration.value = event.videoDuration\n    isLoading.value = false\n    isVideoReady.value = true\n  }\n}\n\nconst updateThumbnail = async () => {\n  const imageKey = await extractThumbnail(videoKey.value, currentTime.value, videoDuration.value)\n  emit('save', {imageKey, thumbnailTime: currentTime.value})\n}\n\nwatchEffect(() => {\n  if (isVideoReady.value && !isLoading.value) {\n    setInitialVideoTime()\n  }\n})\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Select thumbnail\"\n    @close=\"$emit('close')\"\n  >\n    <div :class=\"$style.body\">\n      <div :class=\"$style.videoContainer\">\n        <VideoCard\n          ref=\"videoCard\"\n          :src=\"videoKey\"\n          :can-control=\"false\"\n          is-video-key\n          :image-key=\"imageKey\"\n          @is-loading=\"getVideoElementRef($event)\"\n        />\n        <div\n          :class=\"$style.videoOverlay\"\n          @mousedown=\"handleMouseDown\"\n        >\n          <div\n            :class=\"{\n              [$style.thumbnailBar]: true,\n              [$style.loading]: isLoading || !videoElement,\n            }\"\n            :style=\"{ left: `${barPosition}%` }\"\n          />\n        </div>\n      </div>\n    </div>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isExtractingThumbnail || isLoading || !videoElement\"\n        :has-spinner-confirm=\"isExtractingThumbnail\"\n        label-confirm=\"Select\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"updateThumbnail()\"\n      />\n    </template>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.body {\n  display: flex;\n  justify-content: center;\n}\n\n.videoContainer {\n  position: relative;\n  width: fit-content;\n}\n\n.videoOverlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  cursor: ew-resize;\n}\n\n.thumbnailBar {\n  position: absolute;\n  top: 0;\n  width: 2px;\n  height: 100%;\n  background-color: red;\n  cursor: ew-resize;\n  &.loading {\n    display: none;\n  }\n}\n</style>\n","import {coursesApi} from '@/api/courses.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Course validation composable\n */\nexport function useCourseValidation(existingCourse) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingCourseExists = ref(false)\n\n  //Check if course exists by given properties\n  const checkCourseExists = data => {\n    try {\n      isCheckingCourseExists.value = true\n      return coursesApi.checkExists({\n        ...data,\n        excludeId: existingCourse?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingCourseExists.value = false\n    }\n  }\n\n  //Debounced check for course existence\n  const checkCourseExistsDebounced = useDebounceFn(checkCourseExists, 500)\n\n  //Unique course name validator\n  const uniqueName = asyncValidator(\n    'A course with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      const exists = await checkCourseExistsDebounced({name})\n      return !exists\n    }\n  )\n\n  //Unique external ID validator\n  const uniqueExternalId = asyncValidator(\n    'A course with this external ID already exists',\n    async externalId => {\n      if (!externalId) {\n        return true\n      }\n      const exists = await checkCourseExistsDebounced({externalId})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkCourseExists,\n    checkCourseExistsDebounced,\n    isCheckingCourseExists,\n    uniqueName,\n    uniqueExternalId,\n  }\n}\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * ContentType model\n */\nexport class ContentType extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {ContentType} from '@/models/content-type.model.js'\n\n/**\n * Content types API service\n */\nexport class ContentTypesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/content_types'\n  itemsKey = 'contentTypes'\n  ModelClass = ContentType\n}\n\n//Export singleton instance\nexport const contentTypesApi = new ContentTypesApi()\n","import {contentTypesApi} from '@/api/content-types.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDataStore} from '@/store/data.store.js'\nimport {storeToRefs} from 'pinia'\nimport {ref} from 'vue'\n\n/**\n * Content types composable\n */\nexport function useContentTypes() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get store\n  const store = useDataStore()\n  const {contentTypes} = storeToRefs(store)\n  const {setContentTypes} = store\n\n  //Loading flag\n  const isLoadingContentTypes = ref(false)\n\n  //Load content types\n  const loadContentTypes = async (force) => {\n\n    //Already loaded, we don't need to load again unless forcing to reload\n    if (contentTypes.value.length > 0 && !force) {\n      return\n    }\n\n    //Already loading\n    if (isLoadingContentTypes.value) {\n      return\n    }\n\n    //Load content types\n    try {\n      isLoadingContentTypes.value = true\n      const data = await contentTypesApi.query()\n      setContentTypes(data.contentTypes)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingContentTypes.value = false\n    }\n  }\n\n  //Clear content types\n  const clearContentTypes = () => setContentTypes([])\n\n  //Expose interface\n  return {\n    contentTypes,\n    isLoadingContentTypes,\n    loadContentTypes,\n    clearContentTypes,\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Tag} from '@/models/tag.model.js'\n\n/**\n * Tags API service\n */\nexport class TagsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/tags'\n  itemKey = 'tag'\n  itemsKey = 'tags'\n  ModelClass = Tag\n}\n\n//Export singleton instance\nexport const tagsApi = new TagsApi()\n","import {tagsApi} from '@/api/tags.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useDataStore} from '@/store/data.store.js'\nimport {storeToRefs} from 'pinia'\nimport {ref} from 'vue'\n\n/**\n * Organization tags composable\n */\nexport function useOrganizationTags(includeGlobal = true) {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get store\n  const store = useDataStore()\n  const {organizationTags} = storeToRefs(store)\n  const {setOrganizationTags} = store\n\n  //Loading flag\n  const isLoadingOrganizationTags = ref(false)\n\n  //Load organization tags\n  const loadOrganizationTags = async () => {\n\n    //Already loading\n    if (isLoadingOrganizationTags.value) {\n      return\n    }\n\n    //Load tags\n    try {\n      isLoadingOrganizationTags.value = true\n      const data = await tagsApi.query({includeGlobal})\n      setOrganizationTags(data.tags)\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingOrganizationTags.value = false\n    }\n  }\n\n  //Clear tags\n  const clearOrganizationTags = () => setOrganizationTags([])\n\n  //Expose interface\n  return {\n    organizationTags,\n    isLoadingOrganizationTags,\n    loadOrganizationTags,\n    clearOrganizationTags,\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Urls API service\n */\nexport class UrlsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/urls'\n\n  /**\n   * Fetch url metadata\n   */\n  fetchVideoUrlMetadata(url) {\n    return this\n      .post(`/fetch_video_url_metadata`, {url})\n      .then(data => data.metadata)\n  }\n}\n\n//Export singleton instance\nexport const urlsApi = new UrlsApi()\n","import {urlsApi} from '@/api/urls.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Composable to expose Url metadata helper\n */\nexport function useVideoUrlMetadata() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isLoading = ref(false)\n  const error = ref('')\n  const hasError = ref(false)\n\n  //Get test ID helper\n  const fetchVideoUrlMetadata = async (url) => {\n    isLoading.value = true\n    error.value = ''\n    hasError.value = false\n    try {\n      return await urlsApi.fetchVideoUrlMetadata(url)\n    }\n    catch (err) {\n      error.value = err.message\n      hasError.value = true\n      processError(err)\n      throw err\n    }\n    finally {\n      isLoading.value = false\n    }\n  }\n\n  //Reset\n  const reset = () =>{\n    error.value = ''\n    hasError.value = false\n    isLoading.value = false\n  }\n\n  //Expose interface\n  return {\n    isLoading,\n    error,\n    hasError,\n    fetchVideoUrlMetadata,\n    reset,\n  }\n}\n","import {useValidators} from '@/composables/use-validators.js'\n\n/**\n * Composable for video URL validation\n */\nexport function useVideoUrlValidation() {\n\n  //Composables\n  const {withMessage} = useValidators()\n\n  //Check if the video URL is valid\n  const isValidVideoUrl = hasError => {\n    return withMessage(\n      'We couldn\\'t retrieve data from the video URL you provided. Please check that the URL is correct and the video is publicly accessible.',\n      value => {\n        if (value?.length > 0) {\n          return hasError.value === false\n        }\n        return true\n      }\n    )\n  }\n\n  //Expose interface\n  return {\n    isValidVideoUrl,\n  }\n}\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport MediaInput from '@/components/shared/form/MediaInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ViewPromptsButton from '@/components/courses/editor/ViewPromptsButton.vue'\nimport ViewReferencesButton from '@/components/courses/editor/ViewReferencesButton.vue'\nimport DedicatedSmsAddressField from '@/components/courses/editor/DedicatedSmsAddressField.vue'\nimport MediaUrlPreviewCard from '@/components/shared/file/MediaUrlPreviewCard.vue'\nimport SelectThumbnailModal from '@/components/shared/video/SelectThumbnailModal.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport {courseLanguageOptions, characterLimits} from '@/constants/courses.js'\nimport {imageFileTypes, videoFileTypes} from '@/constants/file-types.js'\nimport {Course} from '@/models/course.model.js'\nimport {useCourseValidation} from '@/composables/use-course-validation.js'\nimport {useContentTypes} from '@/composables/use-content-types.js'\nimport {useOrganizationTags} from '@/composables/use-organization-tags.js'\nimport {useVideoUrlMetadata} from '@/composables/use-video-url-metadata.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useVideoUrlValidation} from '@/composables/use-video-url-validation.js'\nimport {validateFileSizeByType, validateVideoFileDuration} from '@/helpers/file.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed, onMounted, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'back',\n  'continue',\n  'view-prompts',\n  'view-references',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    default: null,\n  },\n  model: {\n    type: Course,\n    required: true,\n  },\n  isCreateFlow: {\n    type: Boolean,\n    default: false,\n  },\n  isSaved: {\n    type: Boolean,\n    default: false,\n  },\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n  isSavingDraft: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {course, model} = toRefs(props)\n\n//Model updater\nconst updateModel = (data) => emit('update', {data})\n\n//Activation message handling\nconst steps = computed(() => model.value.steps)\nconst activationStep = computed(() => steps.value.find(step => step.isActivation))\nconst activationSubstep = computed(() => activationStep.value?.substeps[0])\nconst activationSubstepBody = computed(() => activationSubstep.value?.body)\nconst updateActivationMessage = (body) => {\n  activationSubstep.value.body = body\n  updateModel({steps: [...steps.value]})\n}\n\n//Video URL metadata handling\nconst {\n  fetchVideoUrlMetadata,\n  hasError: hasVideoUrlError,\n  reset: clearVideoUrlError,\n  isLoading: isLoadingUrlMetadata,\n} = useVideoUrlMetadata()\n\n//Media input handling\nconst mediaOptions = ref([\n  {label: 'Upload content', value: true},\n  {label: 'Link to an external video or gif', value: false},\n])\nconst isMediaUpload = ref(!activationStep.value.videoUrl?.length)\nconst isUploadingMedia = ref(false)\n\n//Validation (for detail page & prevention of navigation mainly)\nconst {uniqueName, uniqueExternalId, isCheckingCourseExists} = useCourseValidation(course)\nconst {isValidVideoUrl} = useVideoUrlValidation()\nconst {required, characterCount} = useValidators()\nconst $v = useVuelidate(\n  {\n    activationStep: {\n      videoUrl: {\n        valid: isValidVideoUrl(hasVideoUrlError),\n      },\n    },\n    model: {\n      name: {\n        required: required('Name'),\n        uniqueName,\n      },\n      description: {},\n      language: {required: required('Language')},\n      contentTypeId: {required: required('Content type')},\n      author: {required: required('Author name')},\n      externalId: {uniqueExternalId},\n    },\n    activationSubstep: {\n      body: {\n        characterCount: characterCount(activationSubstepBody, characterLimits.ACTIVATION_MESSAGE),\n      },\n    },\n  },\n  {model, activationStep, activationSubstep}\n)\n\n//Update the activation step data\nconst updateStep = data => {\n\n  //Update the step\n  Object.assign(activationStep.value, data)\n\n  //The image key is shared between the passive substep and the course image key\n  const modelData = {steps: [...steps.value]}\n  if ('imageKey' in data) {\n    modelData.imageKey = data.imageKey\n  }\n\n  //Update the model now\n  updateModel(modelData)\n}\n\n//Custom file size validation for media input\nconst validateFileSize =  async file => {\n  validateFileSizeByType(file, '5MB', imageFileTypes)\n  validateFileSizeByType(file, '500MB', videoFileTypes)\n  await validateVideoFileDuration(file, 900)\n}\nconst extractMetadata = async (event) => {\n  clearVideoUrlError()\n  clearVideoMetadata()\n  updateStep({videoUrl: event.value})\n  const {videoUrl} = activationStep.value\n  if ($v.value.activationStep.videoUrl.$error || !videoUrl) {\n    return\n  }\n  try {\n    const response = await fetchVideoUrlMetadata(videoUrl)\n    updateStep({\n      videoUrlTitle: response.title,\n      videoUrlDescription: response.description,\n      imageKey: response.image,\n      videoUrlDomain: response.domain,\n    })\n  }\n  catch {\n    //Handled by useVideoUrlMetadata\n  }\n}\nconst clearVideoMetadata = () => {\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n  })\n}\nconst toggleMediaUploadType = (event) => {\n  isMediaUpload.value = event.value\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n    videoKey: '',\n    thumbnailTime: 0,\n  })\n}\n//Thumbnail modal state\nconst {\n  isValue: isShowingThumbnailModal,\n  setTrue: showThumbnailModal,\n  setFalse: hideThumbnailModal,\n} = useValueToggle()\n\n//Save thumbnail\nconst saveThumbnail = async (event) => {\n  updateStep(event)\n  hideThumbnailModal()\n}\n\n//Tags and content types\nconst {organizationTags, loadOrganizationTags, isLoadingOrganizationTags} = useOrganizationTags()\nconst {contentTypes, loadContentTypes, isLoadingContentTypes} = useContentTypes()\n\n//Load tags and content types\nonMounted(async () => {\n  loadOrganizationTags()\n  loadContentTypes()\n  if (activationStep.value.videoUrl && !activationStep.value.hasVideoUrlMetadata) {\n    await extractMetadata({value: activationStep.value.videoUrl})\n    $v.value.activationStep.videoUrl?.$touch()\n  }\n})\n</script>\n\n<template>\n  <FlowStep\n    sticky-footer\n    limited-width\n  >\n    <PageBlock\n      key=\"details\"\n      header=\"Basic details\"\n    >\n      <template #headerAside>\n        <ViewPromptsButton\n          v-if=\"model.aiPrompts\"\n          @click=\"$emit('view-prompts')\"\n        />\n        <ViewReferencesButton @click=\"$emit('view-references')\" />\n      </template>\n      <FormField\n        label=\"Course name\"\n        is-required\n        :errors=\"$v.model.name.$errors\"\n      >\n        <TextInput\n          required\n          focus-on-mount\n          :value=\"model.name\"\n          :has-error=\"$v.model.name.$error && !$v.model.name.$pending\"\n          :has-spinner=\"isCheckingCourseExists\"\n          placeholder=\"Type course name\"\n          test-id=\"name\"\n          @input=\"updateModel({name: $event.value})\"\n          @dirty=\"$v.model.name?.$touch()\"\n        />\n      </FormField>\n      <FormField\n        label=\"Course media\"\n        :message=\"\n          !isMediaUpload\n            ? 'Important recommendations: The only supported external sources are YouTube, Vimeo, Loom, and Giphy links. To ensure the best experience for learners, double-check that your link is set to public sharing, as private links may display only a logo instead of the video preview. Note that for SMS delivery, videos may not preview in activation messages, even if the contact is saved.'\n            : ''\n        \"\n      >\n        <FlexColumn>\n          <RadioButtonList\n            name=\"imageOrLink\"\n            :value=\"isMediaUpload\"\n            is-inline\n            :options=\"mediaOptions\"\n            @input=\"toggleMediaUploadType($event)\"\n          />\n          <FormField\n            v-if=\"isMediaUpload\"\n            :message=\"\n              activationStep.videoKey\n                ? 'Video recommendations: Keep your videos under 5 minutes for the best learning experience. Videos will appear as clickable previews above the activation message, accessible to all viewers. Note that for SMS delivery, videos may not preview in activation messages, even if the contact is saved.'\n                : ''\n            \"\n          >\n            <MediaInput\n              :image-key=\"activationStep.imageKey\"\n              :video-key=\"activationStep.videoKey\"\n              custom-details-text=\"Max file size is 5MB for images and 500MB or 15 minutes for videos\"\n              :custom-file-validator=\"validateFileSize\"\n              restricted-height\n              @input=\"updateStep($event)\"\n              @is-uploading=\"isUploadingMedia = $event.isUploading\"\n            >\n              <template\n                v-if=\"activationStep.videoKey\"\n                #underCard\n              >\n                <FormField label=\"Video title\">\n                  <template #aside>\n                    <ActionButton\n                      :is-disabled=\"isUploadingMedia\"\n                      type=\"text\"\n                      is-icon-outlined\n                      icon=\"add_photo_alternate\"\n                      label=\"Select thumbnail\"\n                      @click=\"showThumbnailModal()\"\n                    />\n                  </template>\n                  <TextInput\n                    :value=\"activationStep.videoTitle\"\n                    :ignore-character-limit=\"model.ignoreValidations\"\n                    :character-limit=\"characterLimits.STEP_TITLE\"\n                    @input=\"updateStep({ videoTitle: $event.value })\"\n                  />\n                </FormField>\n              </template>\n            </MediaInput>\n          </FormField>\n          <template v-else>\n            <MediaUrlPreviewCard\n              v-if=\"activationStep.hasVideoUrlMetadata\"\n              :image-src=\"activationStep.imageKey\"\n              :title=\"activationStep.videoUrlTitle\"\n              :description=\"activationStep.videoUrlDescription\"\n              :domain=\"activationStep.videoUrlDomain\"\n              :url=\"activationStep.videoUrl\"\n            />\n            <FormField :errors=\"$v.activationStep.videoUrl.$errors\">\n              <TextInput\n                :value=\"activationStep.videoUrl\"\n                :debounce=\"500\"\n                :is-disabled=\"isLoadingUrlMetadata\"\n                :has-spinner=\"isLoadingUrlMetadata\"\n                :has-error=\"$v.activationStep.videoUrl.$error\"\n                @input=\"extractMetadata($event)\"\n                @dirty=\"$v.activationStep.videoUrl.$touch()\"\n              />\n            </FormField>\n          </template>\n        </FlexColumn>\n      </FormField>\n\n      <FormField\n        label=\"Course description\"\n        is-optional\n      >\n        <TextInput\n          :value=\"model.description\"\n          is-multiline\n          show-emoji-picker\n          placeholder=\"Summarize the course content and objectives\"\n          test-id=\"description\"\n          @input=\"updateModel({description: $event.value})\"\n          @dirty=\"$v.model.description?.$touch()\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      key=\"other\"\n      header=\"Other details\"\n    >\n      <FormField\n        label=\"Activation message\"\n        :errors=\"$v.activationSubstep.body.$errors\"\n        is-optional\n      >\n        <TextInput\n          :value=\"activationSubstep.body\"\n          is-multiline\n          show-emoji-picker\n          :ignore-character-limit=\"model.ignoreValidations\"\n          :character-limit=\"characterLimits.ACTIVATION_MESSAGE\"\n          :has-error=\"$v.activationSubstep.body.$error\"\n          placeholder=\"Introduce the course to learners (this will be the first message they receive)\"\n          test-id=\"activationMessage\"\n          @input=\"updateActivationMessage($event.value)\"\n          @dirty=\"$v.activationSubstep.body?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Author name\"\n        is-required\n        :errors=\"$v.model.author.$errors\"\n      >\n        <TextInput\n          :value=\"model.author\"\n          required\n          :has-error=\"$v.model.author.$error\"\n          placeholder=\"Type course author name\"\n          test-id=\"authorName\"\n          @input=\"updateModel({author: $event.value})\"\n          @dirty=\"$v.model.author?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Course language\"\n        sub-label=\"You can always add more translations with AI later\"\n        :errors=\"$v.model.language.$errors\"\n      >\n        <SelectInput\n          required\n          placeholder=\"Select language\"\n          :options=\"courseLanguageOptions\"\n          :value=\"model.language\"\n          :has-error=\"$v.model.language.$error\"\n          test-id=\"language\"\n          @input=\"updateModel({language: $event.value})\"\n          @dirty=\"$v.model.language?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Topic tags\"\n        sub-label=\"Used for filtering (max 3)\"\n        is-optional\n      >\n        <SelectInput\n          value-prop=\"id\"\n          label-prop=\"label\"\n          :has-spinner=\"isLoadingOrganizationTags\"\n          :placeholder=\"isLoadingOrganizationTags ? 'Loading tags...' : 'Select up to 3 topic tags'\"\n          :options=\"organizationTags\"\n          :value=\"model.tagIds\"\n          :max=\"3\"\n          is-multi-select\n          test-id=\"topicTags\"\n          @input=\"updateModel({tagIds: $event.value})\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"External ID\"\n        sub-label=\"For syncing with external learning systems\"\n        :errors=\"$v.model.externalId.$errors\"\n        is-optional\n      >\n        <TextInput\n          :value=\"model.externalId\"\n          :has-error=\"$v.model.externalId.$error && !$v.model.externalId.$pending\"\n          :has-spinner=\"isCheckingCourseExists\"\n          test-id=\"externalId\"\n          @input=\"updateModel({externalId: $event.value})\"\n          @dirty=\"$v.model.externalId?.$touch()\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      key=\"delivery\"\n      header=\"Delivery options\"\n    >\n      <FormField\n        label=\"Content type\"\n        sub-label=\"Required by carrier\"\n        is-required\n        :errors=\"$v.model.contentTypeId.$errors\"\n      >\n        <SelectInput\n          value-prop=\"id\"\n          label-prop=\"label\"\n          :has-spinner=\"isLoadingContentTypes\"\n          :has-error=\"$v.model.contentTypeId.$error\"\n          :placeholder=\"isLoadingContentTypes ? 'Loading content types...' : 'Select content type'\"\n          :options=\"contentTypes\"\n          :value=\"model.contentTypeId\"\n          test-id=\"contentType\"\n          @input=\"updateModel({contentTypeId: $event.value})\"\n          @dirty=\"$v.model.contentTypeId?.$touch()\"\n        />\n      </FormField>\n\n      <DedicatedSmsAddressField\n        v-if=\"!isCreateFlow && !model.isTemplate\"\n        :course=\"course\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-go-back=\"true\"\n        label-confirm=\"Save and continue\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingDraft\"\n        :is-disabled-confirm=\"(isSaving && !isSavingDraft) || $v.$invalid || isUploadingMedia\"\n        :has-spinner-confirm=\"isSaving && !isSavingDraft\"\n        @confirm=\"$emit('continue')\"\n        @back=\"$emit('back')\"\n      />\n    </template>\n    <SelectThumbnailModal\n      :is-open=\"isShowingThumbnailModal\"\n      :video-key=\"activationStep.videoKey\"\n      :image-key=\"activationStep.imageKey\"\n      :thumbnail-time=\"activationStep.thumbnailTime\"\n      @close=\"hideThumbnailModal()\"\n      @save=\"saveThumbnail($event)\"\n    />\n  </FlowStep>\n</template>\n","var rn = Object.defineProperty;\nvar Ne = Object.getOwnPropertySymbols;\nvar vt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable;\nvar mt = (t, e, n) => e in t ? rn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, fe = (t, e) => {\n  for (var n in e || (e = {}))\n    vt.call(e, n) && mt(t, n, e[n]);\n  if (Ne)\n    for (var n of Ne(e))\n      bt.call(e, n) && mt(t, n, e[n]);\n  return t;\n};\nvar Ve = (t, e) => {\n  var n = {};\n  for (var o in t)\n    vt.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);\n  if (t != null && Ne)\n    for (var o of Ne(t))\n      e.indexOf(o) < 0 && bt.call(t, o) && (n[o] = t[o]);\n  return n;\n};\nimport { getCurrentInstance as ft, unref as U, watch as an, onUnmounted as ln, onMounted as sn, nextTick as Yt, isRef as $e, defineComponent as un, computed as yt, toRefs as cn, ref as fn, reactive as dn, h as hn, isProxy as pn } from \"vue\";\nconst Bt = \"[vue-draggable-plus]: \";\nfunction gn(t) {\n  console.warn(Bt + t);\n}\nfunction mn(t) {\n  console.error(Bt + t);\n}\nfunction wt(t, e, n) {\n  return n >= 0 && n < t.length && t.splice(n, 0, t.splice(e, 1)[0]), t;\n}\nfunction vn(t) {\n  return t.replace(/-(\\w)/g, (e, n) => n ? n.toUpperCase() : \"\");\n}\nfunction bn(t) {\n  return Object.keys(t).reduce((e, n) => (typeof t[n] != \"undefined\" && (e[vn(n)] = t[n]), e), {});\n}\nfunction Et(t, e) {\n  return Array.isArray(t) && t.splice(e, 1), t;\n}\nfunction St(t, e, n) {\n  return Array.isArray(t) && t.splice(e, 0, n), t;\n}\nfunction yn(t) {\n  return typeof t == \"undefined\";\n}\nfunction wn(t) {\n  return typeof t == \"string\";\n}\nfunction Dt(t, e, n) {\n  const o = t.children[n];\n  t.insertBefore(e, o);\n}\nfunction qe(t) {\n  t.parentNode && t.parentNode.removeChild(t);\n}\nfunction En(t, e = document) {\n  var o;\n  let n = null;\n  return typeof (e == null ? void 0 : e.querySelector) == \"function\" ? n = (o = e == null ? void 0 : e.querySelector) == null ? void 0 : o.call(e, t) : n = document.querySelector(t), n || gn(`Element not found: ${t}`), n;\n}\nfunction Sn(t, e, n = null) {\n  return function(...o) {\n    return t.apply(n, o), e.apply(n, o);\n  };\n}\nfunction Dn(t, e) {\n  const n = fe({}, t);\n  return Object.keys(e).forEach((o) => {\n    n[o] ? n[o] = Sn(t[o], e[o]) : n[o] = e[o];\n  }), n;\n}\nfunction _n(t) {\n  return t instanceof HTMLElement;\n}\nfunction _t(t, e) {\n  Object.keys(t).forEach((n) => {\n    e(n, t[n]);\n  });\n}\nfunction Tn(t) {\n  return t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && // uppercase letter\n  (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97);\n}\nconst Cn = Object.assign;\n/**!\n * Sortable 1.15.2\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction Tt(t, e) {\n  var n = Object.keys(t);\n  if (Object.getOwnPropertySymbols) {\n    var o = Object.getOwnPropertySymbols(t);\n    e && (o = o.filter(function(r) {\n      return Object.getOwnPropertyDescriptor(t, r).enumerable;\n    })), n.push.apply(n, o);\n  }\n  return n;\n}\nfunction te(t) {\n  for (var e = 1; e < arguments.length; e++) {\n    var n = arguments[e] != null ? arguments[e] : {};\n    e % 2 ? Tt(Object(n), !0).forEach(function(o) {\n      On(t, o, n[o]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Tt(Object(n)).forEach(function(o) {\n      Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));\n    });\n  }\n  return t;\n}\nfunction Xe(t) {\n  \"@babel/helpers - typeof\";\n  return typeof Symbol == \"function\" && typeof Symbol.iterator == \"symbol\" ? Xe = function(e) {\n    return typeof e;\n  } : Xe = function(e) {\n    return e && typeof Symbol == \"function\" && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n  }, Xe(t);\n}\nfunction On(t, e, n) {\n  return e in t ? Object.defineProperty(t, e, {\n    value: n,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : t[e] = n, t;\n}\nfunction re() {\n  return re = Object.assign || function(t) {\n    for (var e = 1; e < arguments.length; e++) {\n      var n = arguments[e];\n      for (var o in n)\n        Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);\n    }\n    return t;\n  }, re.apply(this, arguments);\n}\nfunction In(t, e) {\n  if (t == null)\n    return {};\n  var n = {}, o = Object.keys(t), r, i;\n  for (i = 0; i < o.length; i++)\n    r = o[i], !(e.indexOf(r) >= 0) && (n[r] = t[r]);\n  return n;\n}\nfunction An(t, e) {\n  if (t == null)\n    return {};\n  var n = In(t, e), o, r;\n  if (Object.getOwnPropertySymbols) {\n    var i = Object.getOwnPropertySymbols(t);\n    for (r = 0; r < i.length; r++)\n      o = i[r], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (n[o] = t[o]);\n  }\n  return n;\n}\nvar xn = \"1.15.2\";\nfunction oe(t) {\n  if (typeof window != \"undefined\" && window.navigator)\n    return !!/* @__PURE__ */ navigator.userAgent.match(t);\n}\nvar ie = oe(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i), Ae = oe(/Edge/i), Ct = oe(/firefox/i), _e = oe(/safari/i) && !oe(/chrome/i) && !oe(/android/i), kt = oe(/iP(ad|od|hone)/i), Ht = oe(/chrome/i) && oe(/android/i), Lt = {\n  capture: !1,\n  passive: !1\n};\nfunction D(t, e, n) {\n  t.addEventListener(e, n, !ie && Lt);\n}\nfunction S(t, e, n) {\n  t.removeEventListener(e, n, !ie && Lt);\n}\nfunction Le(t, e) {\n  if (e) {\n    if (e[0] === \">\" && (e = e.substring(1)), t)\n      try {\n        if (t.matches)\n          return t.matches(e);\n        if (t.msMatchesSelector)\n          return t.msMatchesSelector(e);\n        if (t.webkitMatchesSelector)\n          return t.webkitMatchesSelector(e);\n      } catch (n) {\n        return !1;\n      }\n    return !1;\n  }\n}\nfunction Nn(t) {\n  return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;\n}\nfunction Z(t, e, n, o) {\n  if (t) {\n    n = n || document;\n    do {\n      if (e != null && (e[0] === \">\" ? t.parentNode === n && Le(t, e) : Le(t, e)) || o && t === n)\n        return t;\n      if (t === n)\n        break;\n    } while (t = Nn(t));\n  }\n  return null;\n}\nvar Ot = /\\s+/g;\nfunction V(t, e, n) {\n  if (t && e)\n    if (t.classList)\n      t.classList[n ? \"add\" : \"remove\"](e);\n    else {\n      var o = (\" \" + t.className + \" \").replace(Ot, \" \").replace(\" \" + e + \" \", \" \");\n      t.className = (o + (n ? \" \" + e : \"\")).replace(Ot, \" \");\n    }\n}\nfunction h(t, e, n) {\n  var o = t && t.style;\n  if (o) {\n    if (n === void 0)\n      return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(t, \"\") : t.currentStyle && (n = t.currentStyle), e === void 0 ? n : n[e];\n    !(e in o) && e.indexOf(\"webkit\") === -1 && (e = \"-webkit-\" + e), o[e] = n + (typeof n == \"string\" ? \"\" : \"px\");\n  }\n}\nfunction ye(t, e) {\n  var n = \"\";\n  if (typeof t == \"string\")\n    n = t;\n  else\n    do {\n      var o = h(t, \"transform\");\n      o && o !== \"none\" && (n = o + \" \" + n);\n    } while (!e && (t = t.parentNode));\n  var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  return r && new r(n);\n}\nfunction Wt(t, e, n) {\n  if (t) {\n    var o = t.getElementsByTagName(e), r = 0, i = o.length;\n    if (n)\n      for (; r < i; r++)\n        n(o[r], r);\n    return o;\n  }\n  return [];\n}\nfunction ee() {\n  var t = document.scrollingElement;\n  return t || document.documentElement;\n}\nfunction M(t, e, n, o, r) {\n  if (!(!t.getBoundingClientRect && t !== window)) {\n    var i, a, l, s, u, d, f;\n    if (t !== window && t.parentNode && t !== ee() ? (i = t.getBoundingClientRect(), a = i.top, l = i.left, s = i.bottom, u = i.right, d = i.height, f = i.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !ie))\n      do\n        if (r && r.getBoundingClientRect && (h(r, \"transform\") !== \"none\" || n && h(r, \"position\") !== \"static\")) {\n          var m = r.getBoundingClientRect();\n          a -= m.top + parseInt(h(r, \"border-top-width\")), l -= m.left + parseInt(h(r, \"border-left-width\")), s = a + i.height, u = l + i.width;\n          break;\n        }\n      while (r = r.parentNode);\n    if (o && t !== window) {\n      var y = ye(r || t), b = y && y.a, E = y && y.d;\n      y && (a /= E, l /= b, f /= b, d /= E, s = a + d, u = l + f);\n    }\n    return {\n      top: a,\n      left: l,\n      bottom: s,\n      right: u,\n      width: f,\n      height: d\n    };\n  }\n}\nfunction It(t, e, n) {\n  for (var o = ue(t, !0), r = M(t)[e]; o; ) {\n    var i = M(o)[n], a = void 0;\n    if (a = r >= i, !a)\n      return o;\n    if (o === ee())\n      break;\n    o = ue(o, !1);\n  }\n  return !1;\n}\nfunction we(t, e, n, o) {\n  for (var r = 0, i = 0, a = t.children; i < a.length; ) {\n    if (a[i].style.display !== \"none\" && a[i] !== p.ghost && (o || a[i] !== p.dragged) && Z(a[i], n.draggable, t, !1)) {\n      if (r === e)\n        return a[i];\n      r++;\n    }\n    i++;\n  }\n  return null;\n}\nfunction dt(t, e) {\n  for (var n = t.lastElementChild; n && (n === p.ghost || h(n, \"display\") === \"none\" || e && !Le(n, e)); )\n    n = n.previousElementSibling;\n  return n || null;\n}\nfunction K(t, e) {\n  var n = 0;\n  if (!t || !t.parentNode)\n    return -1;\n  for (; t = t.previousElementSibling; )\n    t.nodeName.toUpperCase() !== \"TEMPLATE\" && t !== p.clone && (!e || Le(t, e)) && n++;\n  return n;\n}\nfunction At(t) {\n  var e = 0, n = 0, o = ee();\n  if (t)\n    do {\n      var r = ye(t), i = r.a, a = r.d;\n      e += t.scrollLeft * i, n += t.scrollTop * a;\n    } while (t !== o && (t = t.parentNode));\n  return [e, n];\n}\nfunction Pn(t, e) {\n  for (var n in t)\n    if (t.hasOwnProperty(n)) {\n      for (var o in e)\n        if (e.hasOwnProperty(o) && e[o] === t[n][o])\n          return Number(n);\n    }\n  return -1;\n}\nfunction ue(t, e) {\n  if (!t || !t.getBoundingClientRect)\n    return ee();\n  var n = t, o = !1;\n  do\n    if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {\n      var r = h(n);\n      if (n.clientWidth < n.scrollWidth && (r.overflowX == \"auto\" || r.overflowX == \"scroll\") || n.clientHeight < n.scrollHeight && (r.overflowY == \"auto\" || r.overflowY == \"scroll\")) {\n        if (!n.getBoundingClientRect || n === document.body)\n          return ee();\n        if (o || e)\n          return n;\n        o = !0;\n      }\n    }\n  while (n = n.parentNode);\n  return ee();\n}\nfunction Mn(t, e) {\n  if (t && e)\n    for (var n in e)\n      e.hasOwnProperty(n) && (t[n] = e[n]);\n  return t;\n}\nfunction Ke(t, e) {\n  return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);\n}\nvar Te;\nfunction Gt(t, e) {\n  return function() {\n    if (!Te) {\n      var n = arguments, o = this;\n      n.length === 1 ? t.call(o, n[0]) : t.apply(o, n), Te = setTimeout(function() {\n        Te = void 0;\n      }, e);\n    }\n  };\n}\nfunction Fn() {\n  clearTimeout(Te), Te = void 0;\n}\nfunction jt(t, e, n) {\n  t.scrollLeft += e, t.scrollTop += n;\n}\nfunction zt(t) {\n  var e = window.Polymer, n = window.jQuery || window.Zepto;\n  return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);\n}\nfunction Ut(t, e, n) {\n  var o = {};\n  return Array.from(t.children).forEach(function(r) {\n    var i, a, l, s;\n    if (!(!Z(r, e.draggable, t, !1) || r.animated || r === n)) {\n      var u = M(r);\n      o.left = Math.min((i = o.left) !== null && i !== void 0 ? i : 1 / 0, u.left), o.top = Math.min((a = o.top) !== null && a !== void 0 ? a : 1 / 0, u.top), o.right = Math.max((l = o.right) !== null && l !== void 0 ? l : -1 / 0, u.right), o.bottom = Math.max((s = o.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);\n    }\n  }), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;\n}\nvar q = \"Sortable\" + (/* @__PURE__ */ new Date()).getTime();\nfunction Rn() {\n  var t = [], e;\n  return {\n    captureAnimationState: function() {\n      if (t = [], !!this.options.animation) {\n        var o = [].slice.call(this.el.children);\n        o.forEach(function(r) {\n          if (!(h(r, \"display\") === \"none\" || r === p.ghost)) {\n            t.push({\n              target: r,\n              rect: M(r)\n            });\n            var i = te({}, t[t.length - 1].rect);\n            if (r.thisAnimationDuration) {\n              var a = ye(r, !0);\n              a && (i.top -= a.f, i.left -= a.e);\n            }\n            r.fromRect = i;\n          }\n        });\n      }\n    },\n    addAnimationState: function(o) {\n      t.push(o);\n    },\n    removeAnimationState: function(o) {\n      t.splice(Pn(t, {\n        target: o\n      }), 1);\n    },\n    animateAll: function(o) {\n      var r = this;\n      if (!this.options.animation) {\n        clearTimeout(e), typeof o == \"function\" && o();\n        return;\n      }\n      var i = !1, a = 0;\n      t.forEach(function(l) {\n        var s = 0, u = l.target, d = u.fromRect, f = M(u), m = u.prevFromRect, y = u.prevToRect, b = l.rect, E = ye(u, !0);\n        E && (f.top -= E.f, f.left -= E.e), u.toRect = f, u.thisAnimationDuration && Ke(m, f) && !Ke(d, f) && // Make sure animatingRect is on line between toRect & fromRect\n        (b.top - f.top) / (b.left - f.left) === (d.top - f.top) / (d.left - f.left) && (s = Yn(b, m, y, r.options)), Ke(f, d) || (u.prevFromRect = d, u.prevToRect = f, s || (s = r.options.animation), r.animate(u, b, f, s)), s && (i = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {\n          u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;\n        }, s), u.thisAnimationDuration = s);\n      }), clearTimeout(e), i ? e = setTimeout(function() {\n        typeof o == \"function\" && o();\n      }, a) : typeof o == \"function\" && o(), t = [];\n    },\n    animate: function(o, r, i, a) {\n      if (a) {\n        h(o, \"transition\", \"\"), h(o, \"transform\", \"\");\n        var l = ye(this.el), s = l && l.a, u = l && l.d, d = (r.left - i.left) / (s || 1), f = (r.top - i.top) / (u || 1);\n        o.animatingX = !!d, o.animatingY = !!f, h(o, \"transform\", \"translate3d(\" + d + \"px,\" + f + \"px,0)\"), this.forRepaintDummy = Xn(o), h(o, \"transition\", \"transform \" + a + \"ms\" + (this.options.easing ? \" \" + this.options.easing : \"\")), h(o, \"transform\", \"translate3d(0,0,0)\"), typeof o.animated == \"number\" && clearTimeout(o.animated), o.animated = setTimeout(function() {\n          h(o, \"transition\", \"\"), h(o, \"transform\", \"\"), o.animated = !1, o.animatingX = !1, o.animatingY = !1;\n        }, a);\n      }\n    }\n  };\n}\nfunction Xn(t) {\n  return t.offsetWidth;\n}\nfunction Yn(t, e, n, o) {\n  return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * o.animation;\n}\nvar ge = [], Je = {\n  initializeByDefault: !0\n}, xe = {\n  mount: function(e) {\n    for (var n in Je)\n      Je.hasOwnProperty(n) && !(n in e) && (e[n] = Je[n]);\n    ge.forEach(function(o) {\n      if (o.pluginName === e.pluginName)\n        throw \"Sortable: Cannot mount plugin \".concat(e.pluginName, \" more than once\");\n    }), ge.push(e);\n  },\n  pluginEvent: function(e, n, o) {\n    var r = this;\n    this.eventCanceled = !1, o.cancel = function() {\n      r.eventCanceled = !0;\n    };\n    var i = e + \"Global\";\n    ge.forEach(function(a) {\n      n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](te({\n        sortable: n\n      }, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](te({\n        sortable: n\n      }, o)));\n    });\n  },\n  initializePlugins: function(e, n, o, r) {\n    ge.forEach(function(l) {\n      var s = l.pluginName;\n      if (!(!e.options[s] && !l.initializeByDefault)) {\n        var u = new l(e, n, e.options);\n        u.sortable = e, u.options = e.options, e[s] = u, re(o, u.defaults);\n      }\n    });\n    for (var i in e.options)\n      if (e.options.hasOwnProperty(i)) {\n        var a = this.modifyOption(e, i, e.options[i]);\n        typeof a != \"undefined\" && (e.options[i] = a);\n      }\n  },\n  getEventProperties: function(e, n) {\n    var o = {};\n    return ge.forEach(function(r) {\n      typeof r.eventProperties == \"function\" && re(o, r.eventProperties.call(n[r.pluginName], e));\n    }), o;\n  },\n  modifyOption: function(e, n, o) {\n    var r;\n    return ge.forEach(function(i) {\n      e[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == \"function\" && (r = i.optionListeners[n].call(e[i.pluginName], o));\n    }), r;\n  }\n};\nfunction Bn(t) {\n  var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, l = t.fromEl, s = t.oldIndex, u = t.newIndex, d = t.oldDraggableIndex, f = t.newDraggableIndex, m = t.originalEvent, y = t.putSortable, b = t.extraEventProperties;\n  if (e = e || n && n[q], !!e) {\n    var E, k = e.options, H = \"on\" + o.charAt(0).toUpperCase() + o.substr(1);\n    window.CustomEvent && !ie && !Ae ? E = new CustomEvent(o, {\n      bubbles: !0,\n      cancelable: !0\n    }) : (E = document.createEvent(\"Event\"), E.initEvent(o, !0, !0)), E.to = a || n, E.from = l || n, E.item = r || n, E.clone = i, E.oldIndex = s, E.newIndex = u, E.oldDraggableIndex = d, E.newDraggableIndex = f, E.originalEvent = m, E.pullMode = y ? y.lastPutMode : void 0;\n    var F = te(te({}, b), xe.getEventProperties(o, e));\n    for (var x in F)\n      E[x] = F[x];\n    n && n.dispatchEvent(E), k[H] && k[H].call(e, E);\n  }\n}\nvar kn = [\"evt\"], G = function(e, n) {\n  var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = An(o, kn);\n  xe.pluginEvent.bind(p)(e, n, te({\n    dragEl: c,\n    parentEl: A,\n    ghostEl: g,\n    rootEl: T,\n    nextEl: pe,\n    lastDownEl: Ye,\n    cloneEl: O,\n    cloneHidden: se,\n    dragStarted: Ee,\n    putSortable: R,\n    activeSortable: p.active,\n    originalEvent: r,\n    oldIndex: be,\n    oldDraggableIndex: Ce,\n    newIndex: $,\n    newDraggableIndex: le,\n    hideGhostForTarget: Kt,\n    unhideGhostForTarget: Jt,\n    cloneNowHidden: function() {\n      se = !0;\n    },\n    cloneNowShown: function() {\n      se = !1;\n    },\n    dispatchSortableEvent: function(l) {\n      W({\n        sortable: n,\n        name: l,\n        originalEvent: r\n      });\n    }\n  }, i));\n};\nfunction W(t) {\n  Bn(te({\n    putSortable: R,\n    cloneEl: O,\n    targetEl: c,\n    rootEl: T,\n    oldIndex: be,\n    oldDraggableIndex: Ce,\n    newIndex: $,\n    newDraggableIndex: le\n  }, t));\n}\nvar c, A, g, T, pe, Ye, O, se, be, $, Ce, le, Pe, R, ve = !1, We = !1, Ge = [], de, J, Ze, Qe, xt, Nt, Ee, me, Oe, Ie = !1, Me = !1, Be, B, et = [], at = !1, je = [], Ue = typeof document != \"undefined\", Fe = kt, Pt = Ae || ie ? \"cssFloat\" : \"float\", Hn = Ue && !Ht && !kt && \"draggable\" in document.createElement(\"div\"), Vt = function() {\n  if (Ue) {\n    if (ie)\n      return !1;\n    var t = document.createElement(\"x\");\n    return t.style.cssText = \"pointer-events:auto\", t.style.pointerEvents === \"auto\";\n  }\n}(), $t = function(e, n) {\n  var o = h(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), i = we(e, 0, n), a = we(e, 1, n), l = i && h(i), s = a && h(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + M(i).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + M(a).width;\n  if (o.display === \"flex\")\n    return o.flexDirection === \"column\" || o.flexDirection === \"column-reverse\" ? \"vertical\" : \"horizontal\";\n  if (o.display === \"grid\")\n    return o.gridTemplateColumns.split(\" \").length <= 1 ? \"vertical\" : \"horizontal\";\n  if (i && l.float && l.float !== \"none\") {\n    var f = l.float === \"left\" ? \"left\" : \"right\";\n    return a && (s.clear === \"both\" || s.clear === f) ? \"vertical\" : \"horizontal\";\n  }\n  return i && (l.display === \"block\" || l.display === \"flex\" || l.display === \"table\" || l.display === \"grid\" || u >= r && o[Pt] === \"none\" || a && o[Pt] === \"none\" && u + d > r) ? \"vertical\" : \"horizontal\";\n}, Ln = function(e, n, o) {\n  var r = o ? e.left : e.top, i = o ? e.right : e.bottom, a = o ? e.width : e.height, l = o ? n.left : n.top, s = o ? n.right : n.bottom, u = o ? n.width : n.height;\n  return r === l || i === s || r + a / 2 === l + u / 2;\n}, Wn = function(e, n) {\n  var o;\n  return Ge.some(function(r) {\n    var i = r[q].options.emptyInsertThreshold;\n    if (!(!i || dt(r))) {\n      var a = M(r), l = e >= a.left - i && e <= a.right + i, s = n >= a.top - i && n <= a.bottom + i;\n      if (l && s)\n        return o = r;\n    }\n  }), o;\n}, qt = function(e) {\n  function n(i, a) {\n    return function(l, s, u, d) {\n      var f = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;\n      if (i == null && (a || f))\n        return !0;\n      if (i == null || i === !1)\n        return !1;\n      if (a && i === \"clone\")\n        return i;\n      if (typeof i == \"function\")\n        return n(i(l, s, u, d), a)(l, s, u, d);\n      var m = (a ? l : s).options.group.name;\n      return i === !0 || typeof i == \"string\" && i === m || i.join && i.indexOf(m) > -1;\n    };\n  }\n  var o = {}, r = e.group;\n  (!r || Xe(r) != \"object\") && (r = {\n    name: r\n  }), o.name = r.name, o.checkPull = n(r.pull, !0), o.checkPut = n(r.put), o.revertClone = r.revertClone, e.group = o;\n}, Kt = function() {\n  !Vt && g && h(g, \"display\", \"none\");\n}, Jt = function() {\n  !Vt && g && h(g, \"display\", \"\");\n};\nUe && !Ht && document.addEventListener(\"click\", function(t) {\n  if (We)\n    return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), We = !1, !1;\n}, !0);\nvar he = function(e) {\n  if (c) {\n    e = e.touches ? e.touches[0] : e;\n    var n = Wn(e.clientX, e.clientY);\n    if (n) {\n      var o = {};\n      for (var r in e)\n        e.hasOwnProperty(r) && (o[r] = e[r]);\n      o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[q]._onDragOver(o);\n    }\n  }\n}, Gn = function(e) {\n  c && c.parentNode[q]._isOutsideThisEl(e.target);\n};\nfunction p(t, e) {\n  if (!(t && t.nodeType && t.nodeType === 1))\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(t));\n  this.el = t, this.options = e = re({}, e), t[q] = this;\n  var n = {\n    group: null,\n    sort: !0,\n    disabled: !1,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(t.nodeName) ? \">li\" : \">*\",\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: !1,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: !0,\n    direction: function() {\n      return $t(t, this.options);\n    },\n    ghostClass: \"sortable-ghost\",\n    chosenClass: \"sortable-chosen\",\n    dragClass: \"sortable-drag\",\n    ignore: \"a, img\",\n    filter: null,\n    preventOnFilter: !0,\n    animation: 0,\n    easing: null,\n    setData: function(a, l) {\n      a.setData(\"Text\", l.textContent);\n    },\n    dropBubble: !1,\n    dragoverBubble: !1,\n    dataIdAttr: \"data-id\",\n    delay: 0,\n    delayOnTouchOnly: !1,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: !1,\n    fallbackClass: \"sortable-fallback\",\n    fallbackOnBody: !1,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    supportPointer: p.supportPointer !== !1 && \"PointerEvent\" in window && !_e,\n    emptyInsertThreshold: 5\n  };\n  xe.initializePlugins(this, t, n);\n  for (var o in n)\n    !(o in e) && (e[o] = n[o]);\n  qt(e);\n  for (var r in this)\n    r.charAt(0) === \"_\" && typeof this[r] == \"function\" && (this[r] = this[r].bind(this));\n  this.nativeDraggable = e.forceFallback ? !1 : Hn, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? D(t, \"pointerdown\", this._onTapStart) : (D(t, \"mousedown\", this._onTapStart), D(t, \"touchstart\", this._onTapStart)), this.nativeDraggable && (D(t, \"dragover\", this), D(t, \"dragenter\", this)), Ge.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), re(this, Rn());\n}\np.prototype = /** @lends Sortable.prototype */\n{\n  constructor: p,\n  _isOutsideThisEl: function(e) {\n    !this.el.contains(e) && e !== this.el && (me = null);\n  },\n  _getDirection: function(e, n) {\n    return typeof this.options.direction == \"function\" ? this.options.direction.call(this, e, n, c) : this.options.direction;\n  },\n  _onTapStart: function(e) {\n    if (e.cancelable) {\n      var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === \"touch\" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, d = r.filter;\n      if (Jn(o), !c && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && _e && s && s.tagName.toUpperCase() === \"SELECT\") && (s = Z(s, r.draggable, o, !1), !(s && s.animated) && Ye !== s)) {\n        if (be = K(s), Ce = K(s, r.draggable), typeof d == \"function\") {\n          if (d.call(this, e, s, this)) {\n            W({\n              sortable: n,\n              rootEl: u,\n              name: \"filter\",\n              targetEl: s,\n              toEl: o,\n              fromEl: o\n            }), G(\"filter\", n, {\n              evt: e\n            }), i && e.cancelable && e.preventDefault();\n            return;\n          }\n        } else if (d && (d = d.split(\",\").some(function(f) {\n          if (f = Z(u, f.trim(), o, !1), f)\n            return W({\n              sortable: n,\n              rootEl: f,\n              name: \"filter\",\n              targetEl: s,\n              fromEl: o,\n              toEl: o\n            }), G(\"filter\", n, {\n              evt: e\n            }), !0;\n        }), d)) {\n          i && e.cancelable && e.preventDefault();\n          return;\n        }\n        r.handle && !Z(u, r.handle, o, !1) || this._prepareDragStart(e, l, s);\n      }\n    }\n  },\n  _prepareDragStart: function(e, n, o) {\n    var r = this, i = r.el, a = r.options, l = i.ownerDocument, s;\n    if (o && !c && o.parentNode === i) {\n      var u = M(o);\n      if (T = i, c = o, A = c.parentNode, pe = c.nextSibling, Ye = o, Pe = a.group, p.dragged = c, de = {\n        target: c,\n        clientX: (n || e).clientX,\n        clientY: (n || e).clientY\n      }, xt = de.clientX - u.left, Nt = de.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, c.style[\"will-change\"] = \"all\", s = function() {\n        if (G(\"delayEnded\", r, {\n          evt: e\n        }), p.eventCanceled) {\n          r._onDrop();\n          return;\n        }\n        r._disableDelayedDragEvents(), !Ct && r.nativeDraggable && (c.draggable = !0), r._triggerDragStart(e, n), W({\n          sortable: r,\n          name: \"choose\",\n          originalEvent: e\n        }), V(c, a.chosenClass, !0);\n      }, a.ignore.split(\",\").forEach(function(d) {\n        Wt(c, d.trim(), tt);\n      }), D(l, \"dragover\", he), D(l, \"mousemove\", he), D(l, \"touchmove\", he), D(l, \"mouseup\", r._onDrop), D(l, \"touchend\", r._onDrop), D(l, \"touchcancel\", r._onDrop), Ct && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), G(\"delayStart\", this, {\n        evt: e\n      }), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(Ae || ie))) {\n        if (p.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        D(l, \"mouseup\", r._disableDelayedDrag), D(l, \"touchend\", r._disableDelayedDrag), D(l, \"touchcancel\", r._disableDelayedDrag), D(l, \"mousemove\", r._delayedDragTouchMoveHandler), D(l, \"touchmove\", r._delayedDragTouchMoveHandler), a.supportPointer && D(l, \"pointermove\", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);\n      } else\n        s();\n    }\n  },\n  _delayedDragTouchMoveHandler: function(e) {\n    var n = e.touches ? e.touches[0] : e;\n    Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();\n  },\n  _disableDelayedDrag: function() {\n    c && tt(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function() {\n    var e = this.el.ownerDocument;\n    S(e, \"mouseup\", this._disableDelayedDrag), S(e, \"touchend\", this._disableDelayedDrag), S(e, \"touchcancel\", this._disableDelayedDrag), S(e, \"mousemove\", this._delayedDragTouchMoveHandler), S(e, \"touchmove\", this._delayedDragTouchMoveHandler), S(e, \"pointermove\", this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function(e, n) {\n    n = n || e.pointerType == \"touch\" && e, !this.nativeDraggable || n ? this.options.supportPointer ? D(document, \"pointermove\", this._onTouchMove) : n ? D(document, \"touchmove\", this._onTouchMove) : D(document, \"mousemove\", this._onTouchMove) : (D(c, \"dragend\", this), D(T, \"dragstart\", this._onDragStart));\n    try {\n      document.selection ? ke(function() {\n        document.selection.empty();\n      }) : window.getSelection().removeAllRanges();\n    } catch (o) {\n    }\n  },\n  _dragStarted: function(e, n) {\n    if (ve = !1, T && c) {\n      G(\"dragStarted\", this, {\n        evt: n\n      }), this.nativeDraggable && D(document, \"dragover\", Gn);\n      var o = this.options;\n      !e && V(c, o.dragClass, !1), V(c, o.ghostClass, !0), p.active = this, e && this._appendGhost(), W({\n        sortable: this,\n        name: \"start\",\n        originalEvent: n\n      });\n    } else\n      this._nulling();\n  },\n  _emulateDragOver: function() {\n    if (J) {\n      this._lastX = J.clientX, this._lastY = J.clientY, Kt();\n      for (var e = document.elementFromPoint(J.clientX, J.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(J.clientX, J.clientY), e !== n); )\n        n = e;\n      if (c.parentNode[q]._isOutsideThisEl(e), n)\n        do {\n          if (n[q]) {\n            var o = void 0;\n            if (o = n[q]._onDragOver({\n              clientX: J.clientX,\n              clientY: J.clientY,\n              target: e,\n              rootEl: n\n            }), o && !this.options.dragoverBubble)\n              break;\n          }\n          e = n;\n        } while (n = n.parentNode);\n      Jt();\n    }\n  },\n  _onTouchMove: function(e) {\n    if (de) {\n      var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = g && ye(g, !0), l = g && a && a.a, s = g && a && a.d, u = Fe && B && At(B), d = (i.clientX - de.clientX + r.x) / (l || 1) + (u ? u[0] - et[0] : 0) / (l || 1), f = (i.clientY - de.clientY + r.y) / (s || 1) + (u ? u[1] - et[1] : 0) / (s || 1);\n      if (!p.active && !ve) {\n        if (o && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < o)\n          return;\n        this._onDragStart(e, !0);\n      }\n      if (g) {\n        a ? (a.e += d - (Ze || 0), a.f += f - (Qe || 0)) : a = {\n          a: 1,\n          b: 0,\n          c: 0,\n          d: 1,\n          e: d,\n          f\n        };\n        var m = \"matrix(\".concat(a.a, \",\").concat(a.b, \",\").concat(a.c, \",\").concat(a.d, \",\").concat(a.e, \",\").concat(a.f, \")\");\n        h(g, \"webkitTransform\", m), h(g, \"mozTransform\", m), h(g, \"msTransform\", m), h(g, \"transform\", m), Ze = d, Qe = f, J = i;\n      }\n      e.cancelable && e.preventDefault();\n    }\n  },\n  _appendGhost: function() {\n    if (!g) {\n      var e = this.options.fallbackOnBody ? document.body : T, n = M(c, !0, Fe, !0, e), o = this.options;\n      if (Fe) {\n        for (B = e; h(B, \"position\") === \"static\" && h(B, \"transform\") === \"none\" && B !== document; )\n          B = B.parentNode;\n        B !== document.body && B !== document.documentElement ? (B === document && (B = ee()), n.top += B.scrollTop, n.left += B.scrollLeft) : B = ee(), et = At(B);\n      }\n      g = c.cloneNode(!0), V(g, o.ghostClass, !1), V(g, o.fallbackClass, !0), V(g, o.dragClass, !0), h(g, \"transition\", \"\"), h(g, \"transform\", \"\"), h(g, \"box-sizing\", \"border-box\"), h(g, \"margin\", 0), h(g, \"top\", n.top), h(g, \"left\", n.left), h(g, \"width\", n.width), h(g, \"height\", n.height), h(g, \"opacity\", \"0.8\"), h(g, \"position\", Fe ? \"absolute\" : \"fixed\"), h(g, \"zIndex\", \"100000\"), h(g, \"pointerEvents\", \"none\"), p.ghost = g, e.appendChild(g), h(g, \"transform-origin\", xt / parseInt(g.style.width) * 100 + \"% \" + Nt / parseInt(g.style.height) * 100 + \"%\");\n    }\n  },\n  _onDragStart: function(e, n) {\n    var o = this, r = e.dataTransfer, i = o.options;\n    if (G(\"dragStart\", this, {\n      evt: e\n    }), p.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    G(\"setupClone\", this), p.eventCanceled || (O = zt(c), O.removeAttribute(\"id\"), O.draggable = !1, O.style[\"will-change\"] = \"\", this._hideClone(), V(O, this.options.chosenClass, !1), p.clone = O), o.cloneId = ke(function() {\n      G(\"clone\", o), !p.eventCanceled && (o.options.removeCloneOnHide || T.insertBefore(O, c), o._hideClone(), W({\n        sortable: o,\n        name: \"clone\"\n      }));\n    }), !n && V(c, i.dragClass, !0), n ? (We = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (S(document, \"mouseup\", o._onDrop), S(document, \"touchend\", o._onDrop), S(document, \"touchcancel\", o._onDrop), r && (r.effectAllowed = \"move\", i.setData && i.setData.call(o, r, c)), D(document, \"drop\", o), h(c, \"transform\", \"translateZ(0)\")), ve = !0, o._dragStartId = ke(o._dragStarted.bind(o, n, e)), D(document, \"selectstart\", o), Ee = !0, _e && h(document.body, \"user-select\", \"none\");\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function(e) {\n    var n = this.el, o = e.target, r, i, a, l = this.options, s = l.group, u = p.active, d = Pe === s, f = l.sort, m = R || u, y, b = this, E = !1;\n    if (at)\n      return;\n    function k(ce, nn) {\n      G(ce, b, te({\n        evt: e,\n        isOwner: d,\n        axis: y ? \"vertical\" : \"horizontal\",\n        revert: a,\n        dragRect: r,\n        targetRect: i,\n        canSort: f,\n        fromSortable: m,\n        target: o,\n        completed: F,\n        onMove: function(gt, on) {\n          return Re(T, n, c, r, gt, M(gt), e, on);\n        },\n        changed: x\n      }, nn));\n    }\n    function H() {\n      k(\"dragOverAnimationCapture\"), b.captureAnimationState(), b !== m && m.captureAnimationState();\n    }\n    function F(ce) {\n      return k(\"dragOverCompleted\", {\n        insertion: ce\n      }), ce && (d ? u._hideClone() : u._showClone(b), b !== m && (V(c, R ? R.options.ghostClass : u.options.ghostClass, !1), V(c, l.ghostClass, !0)), R !== b && b !== p.active ? R = b : b === p.active && R && (R = null), m === b && (b._ignoreWhileAnimating = o), b.animateAll(function() {\n        k(\"dragOverAnimationComplete\"), b._ignoreWhileAnimating = null;\n      }), b !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (o === c && !c.animated || o === n && !o.animated) && (me = null), !l.dragoverBubble && !e.rootEl && o !== document && (c.parentNode[q]._isOutsideThisEl(e.target), !ce && he(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), E = !0;\n    }\n    function x() {\n      $ = K(c), le = K(c, l.draggable), W({\n        sortable: b,\n        name: \"change\",\n        toEl: n,\n        newIndex: $,\n        newDraggableIndex: le,\n        originalEvent: e\n      });\n    }\n    if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = Z(o, l.draggable, n, !0), k(\"dragOver\"), p.eventCanceled)\n      return E;\n    if (c.contains(e.target) || o.animated && o.animatingX && o.animatingY || b._ignoreWhileAnimating === o)\n      return F(!1);\n    if (We = !1, u && !l.disabled && (d ? f || (a = A !== T) : R === this || (this.lastPutMode = Pe.checkPull(this, u, c, e)) && s.checkPut(this, u, c, e))) {\n      if (y = this._getDirection(e, o) === \"vertical\", r = M(c), k(\"dragOverValid\"), p.eventCanceled)\n        return E;\n      if (a)\n        return A = T, H(), this._hideClone(), k(\"revert\"), p.eventCanceled || (pe ? T.insertBefore(c, pe) : T.appendChild(c)), F(!0);\n      var L = dt(n, l.draggable);\n      if (!L || Vn(e, y, this) && !L.animated) {\n        if (L === c)\n          return F(!1);\n        if (L && n === e.target && (o = L), o && (i = M(o)), Re(T, n, c, r, o, i, e, !!o) !== !1)\n          return H(), L && L.nextSibling ? n.insertBefore(c, L.nextSibling) : n.appendChild(c), A = n, x(), F(!0);\n      } else if (L && Un(e, y, this)) {\n        var ne = we(n, 0, l, !0);\n        if (ne === c)\n          return F(!1);\n        if (o = ne, i = M(o), Re(T, n, c, r, o, i, e, !1) !== !1)\n          return H(), n.insertBefore(c, ne), A = n, x(), F(!0);\n      } else if (o.parentNode === n) {\n        i = M(o);\n        var j = 0, Q, v = c.parentNode !== n, w = !Ln(c.animated && c.toRect || r, o.animated && o.toRect || i, y), N = y ? \"top\" : \"left\", I = It(o, \"top\", \"top\") || It(c, \"top\", \"top\"), _ = I ? I.scrollTop : void 0;\n        me !== o && (Q = i[N], Ie = !1, Me = !w && l.invertSwap || v), j = $n(e, o, i, y, w ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Me, me === o);\n        var C;\n        if (j !== 0) {\n          var X = K(c);\n          do\n            X -= j, C = A.children[X];\n          while (C && (h(C, \"display\") === \"none\" || C === g));\n        }\n        if (j === 0 || C === o)\n          return F(!1);\n        me = o, Oe = j;\n        var Y = o.nextElementSibling, z = !1;\n        z = j === 1;\n        var ae = Re(T, n, c, r, o, i, e, z);\n        if (ae !== !1)\n          return (ae === 1 || ae === -1) && (z = ae === 1), at = !0, setTimeout(zn, 30), H(), z && !Y ? n.appendChild(c) : o.parentNode.insertBefore(c, z ? Y : o), I && jt(I, 0, _ - I.scrollTop), A = c.parentNode, Q !== void 0 && !Me && (Be = Math.abs(Q - M(o)[N])), x(), F(!0);\n      }\n      if (n.contains(c))\n        return F(!1);\n    }\n    return !1;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function() {\n    S(document, \"mousemove\", this._onTouchMove), S(document, \"touchmove\", this._onTouchMove), S(document, \"pointermove\", this._onTouchMove), S(document, \"dragover\", he), S(document, \"mousemove\", he), S(document, \"touchmove\", he);\n  },\n  _offUpEvents: function() {\n    var e = this.el.ownerDocument;\n    S(e, \"mouseup\", this._onDrop), S(e, \"touchend\", this._onDrop), S(e, \"pointerup\", this._onDrop), S(e, \"touchcancel\", this._onDrop), S(document, \"selectstart\", this);\n  },\n  _onDrop: function(e) {\n    var n = this.el, o = this.options;\n    if ($ = K(c), le = K(c, o.draggable), G(\"drop\", this, {\n      evt: e\n    }), A = c && c.parentNode, $ = K(c), le = K(c, o.draggable), p.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    ve = !1, Me = !1, Ie = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), lt(this.cloneId), lt(this._dragStartId), this.nativeDraggable && (S(document, \"drop\", this), S(n, \"dragstart\", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), _e && h(document.body, \"user-select\", \"\"), h(c, \"transform\", \"\"), e && (Ee && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), g && g.parentNode && g.parentNode.removeChild(g), (T === A || R && R.lastPutMode !== \"clone\") && O && O.parentNode && O.parentNode.removeChild(O), c && (this.nativeDraggable && S(c, \"dragend\", this), tt(c), c.style[\"will-change\"] = \"\", Ee && !ve && V(c, R ? R.options.ghostClass : this.options.ghostClass, !1), V(c, this.options.chosenClass, !1), W({\n      sortable: this,\n      name: \"unchoose\",\n      toEl: A,\n      newIndex: null,\n      newDraggableIndex: null,\n      originalEvent: e\n    }), T !== A ? ($ >= 0 && (W({\n      rootEl: A,\n      name: \"add\",\n      toEl: A,\n      fromEl: T,\n      originalEvent: e\n    }), W({\n      sortable: this,\n      name: \"remove\",\n      toEl: A,\n      originalEvent: e\n    }), W({\n      rootEl: A,\n      name: \"sort\",\n      toEl: A,\n      fromEl: T,\n      originalEvent: e\n    }), W({\n      sortable: this,\n      name: \"sort\",\n      toEl: A,\n      originalEvent: e\n    })), R && R.save()) : $ !== be && $ >= 0 && (W({\n      sortable: this,\n      name: \"update\",\n      toEl: A,\n      originalEvent: e\n    }), W({\n      sortable: this,\n      name: \"sort\",\n      toEl: A,\n      originalEvent: e\n    })), p.active && (($ == null || $ === -1) && ($ = be, le = Ce), W({\n      sortable: this,\n      name: \"end\",\n      toEl: A,\n      originalEvent: e\n    }), this.save()))), this._nulling();\n  },\n  _nulling: function() {\n    G(\"nulling\", this), T = c = A = g = pe = O = Ye = se = de = J = Ee = $ = le = be = Ce = me = Oe = R = Pe = p.dragged = p.ghost = p.clone = p.active = null, je.forEach(function(e) {\n      e.checked = !0;\n    }), je.length = Ze = Qe = 0;\n  },\n  handleEvent: function(e) {\n    switch (e.type) {\n      case \"drop\":\n      case \"dragend\":\n        this._onDrop(e);\n        break;\n      case \"dragenter\":\n      case \"dragover\":\n        c && (this._onDragOver(e), jn(e));\n        break;\n      case \"selectstart\":\n        e.preventDefault();\n        break;\n    }\n  },\n  /**\n   * Serializes the item into an array of string.\n   * @returns {String[]}\n   */\n  toArray: function() {\n    for (var e = [], n, o = this.el.children, r = 0, i = o.length, a = this.options; r < i; r++)\n      n = o[r], Z(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || Kn(n));\n    return e;\n  },\n  /**\n   * Sorts the elements according to the array.\n   * @param  {String[]}  order  order of the items\n   */\n  sort: function(e, n) {\n    var o = {}, r = this.el;\n    this.toArray().forEach(function(i, a) {\n      var l = r.children[a];\n      Z(l, this.options.draggable, r, !1) && (o[i] = l);\n    }, this), n && this.captureAnimationState(), e.forEach(function(i) {\n      o[i] && (r.removeChild(o[i]), r.appendChild(o[i]));\n    }), n && this.animateAll();\n  },\n  /**\n   * Save the current sorting\n   */\n  save: function() {\n    var e = this.options.store;\n    e && e.set && e.set(this);\n  },\n  /**\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n   * @param   {HTMLElement}  el\n   * @param   {String}       [selector]  default: `options.draggable`\n   * @returns {HTMLElement|null}\n   */\n  closest: function(e, n) {\n    return Z(e, n || this.options.draggable, this.el, !1);\n  },\n  /**\n   * Set/get option\n   * @param   {string} name\n   * @param   {*}      [value]\n   * @returns {*}\n   */\n  option: function(e, n) {\n    var o = this.options;\n    if (n === void 0)\n      return o[e];\n    var r = xe.modifyOption(this, e, n);\n    typeof r != \"undefined\" ? o[e] = r : o[e] = n, e === \"group\" && qt(o);\n  },\n  /**\n   * Destroy\n   */\n  destroy: function() {\n    G(\"destroy\", this);\n    var e = this.el;\n    e[q] = null, S(e, \"mousedown\", this._onTapStart), S(e, \"touchstart\", this._onTapStart), S(e, \"pointerdown\", this._onTapStart), this.nativeDraggable && (S(e, \"dragover\", this), S(e, \"dragenter\", this)), Array.prototype.forEach.call(e.querySelectorAll(\"[draggable]\"), function(n) {\n      n.removeAttribute(\"draggable\");\n    }), this._onDrop(), this._disableDelayedDragEvents(), Ge.splice(Ge.indexOf(this.el), 1), this.el = e = null;\n  },\n  _hideClone: function() {\n    if (!se) {\n      if (G(\"hideClone\", this), p.eventCanceled)\n        return;\n      h(O, \"display\", \"none\"), this.options.removeCloneOnHide && O.parentNode && O.parentNode.removeChild(O), se = !0;\n    }\n  },\n  _showClone: function(e) {\n    if (e.lastPutMode !== \"clone\") {\n      this._hideClone();\n      return;\n    }\n    if (se) {\n      if (G(\"showClone\", this), p.eventCanceled)\n        return;\n      c.parentNode == T && !this.options.group.revertClone ? T.insertBefore(O, c) : pe ? T.insertBefore(O, pe) : T.appendChild(O), this.options.group.revertClone && this.animate(c, O), h(O, \"display\", \"\"), se = !1;\n    }\n  }\n};\nfunction jn(t) {\n  t.dataTransfer && (t.dataTransfer.dropEffect = \"move\"), t.cancelable && t.preventDefault();\n}\nfunction Re(t, e, n, o, r, i, a, l) {\n  var s, u = t[q], d = u.options.onMove, f;\n  return window.CustomEvent && !ie && !Ae ? s = new CustomEvent(\"move\", {\n    bubbles: !0,\n    cancelable: !0\n  }) : (s = document.createEvent(\"Event\"), s.initEvent(\"move\", !0, !0)), s.to = e, s.from = t, s.dragged = n, s.draggedRect = o, s.related = r || e, s.relatedRect = i || M(e), s.willInsertAfter = l, s.originalEvent = a, t.dispatchEvent(s), d && (f = d.call(u, s, a)), f;\n}\nfunction tt(t) {\n  t.draggable = !1;\n}\nfunction zn() {\n  at = !1;\n}\nfunction Un(t, e, n) {\n  var o = M(we(n.el, 0, n.options, !0)), r = Ut(n.el, n.options, g), i = 10;\n  return e ? t.clientX < r.left - i || t.clientY < o.top && t.clientX < o.right : t.clientY < r.top - i || t.clientY < o.bottom && t.clientX < o.left;\n}\nfunction Vn(t, e, n) {\n  var o = M(dt(n.el, n.options.draggable)), r = Ut(n.el, n.options, g), i = 10;\n  return e ? t.clientX > r.right + i || t.clientY > o.bottom && t.clientX > o.left : t.clientY > r.bottom + i || t.clientX > o.right && t.clientY > o.top;\n}\nfunction $n(t, e, n, o, r, i, a, l) {\n  var s = o ? t.clientY : t.clientX, u = o ? n.height : n.width, d = o ? n.top : n.left, f = o ? n.bottom : n.right, m = !1;\n  if (!a) {\n    if (l && Be < u * r) {\n      if (!Ie && (Oe === 1 ? s > d + u * i / 2 : s < f - u * i / 2) && (Ie = !0), Ie)\n        m = !0;\n      else if (Oe === 1 ? s < d + Be : s > f - Be)\n        return -Oe;\n    } else if (s > d + u * (1 - r) / 2 && s < f - u * (1 - r) / 2)\n      return qn(e);\n  }\n  return m = m || a, m && (s < d + u * i / 2 || s > f - u * i / 2) ? s > d + u / 2 ? 1 : -1 : 0;\n}\nfunction qn(t) {\n  return K(c) < K(t) ? 1 : -1;\n}\nfunction Kn(t) {\n  for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )\n    o += e.charCodeAt(n);\n  return o.toString(36);\n}\nfunction Jn(t) {\n  je.length = 0;\n  for (var e = t.getElementsByTagName(\"input\"), n = e.length; n--; ) {\n    var o = e[n];\n    o.checked && je.push(o);\n  }\n}\nfunction ke(t) {\n  return setTimeout(t, 0);\n}\nfunction lt(t) {\n  return clearTimeout(t);\n}\nUe && D(document, \"touchmove\", function(t) {\n  (p.active || ve) && t.cancelable && t.preventDefault();\n});\np.utils = {\n  on: D,\n  off: S,\n  css: h,\n  find: Wt,\n  is: function(e, n) {\n    return !!Z(e, n, e, !1);\n  },\n  extend: Mn,\n  throttle: Gt,\n  closest: Z,\n  toggleClass: V,\n  clone: zt,\n  index: K,\n  nextTick: ke,\n  cancelNextTick: lt,\n  detectDirection: $t,\n  getChild: we\n};\np.get = function(t) {\n  return t[q];\n};\np.mount = function() {\n  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)\n    e[n] = arguments[n];\n  e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {\n    if (!o.prototype || !o.prototype.constructor)\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(o));\n    o.utils && (p.utils = te(te({}, p.utils), o.utils)), xe.mount(o);\n  });\n};\np.create = function(t, e) {\n  return new p(t, e);\n};\np.version = xn;\nvar P = [], Se, st, ut = !1, nt, ot, ze, De;\nfunction Zn() {\n  function t() {\n    this.defaults = {\n      scroll: !0,\n      forceAutoScrollFallback: !1,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: !0\n    };\n    for (var e in this)\n      e.charAt(0) === \"_\" && typeof this[e] == \"function\" && (this[e] = this[e].bind(this));\n  }\n  return t.prototype = {\n    dragStarted: function(n) {\n      var o = n.originalEvent;\n      this.sortable.nativeDraggable ? D(document, \"dragover\", this._handleAutoScroll) : this.options.supportPointer ? D(document, \"pointermove\", this._handleFallbackAutoScroll) : o.touches ? D(document, \"touchmove\", this._handleFallbackAutoScroll) : D(document, \"mousemove\", this._handleFallbackAutoScroll);\n    },\n    dragOverCompleted: function(n) {\n      var o = n.originalEvent;\n      !this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);\n    },\n    drop: function() {\n      this.sortable.nativeDraggable ? S(document, \"dragover\", this._handleAutoScroll) : (S(document, \"pointermove\", this._handleFallbackAutoScroll), S(document, \"touchmove\", this._handleFallbackAutoScroll), S(document, \"mousemove\", this._handleFallbackAutoScroll)), Mt(), He(), Fn();\n    },\n    nulling: function() {\n      ze = st = Se = ut = De = nt = ot = null, P.length = 0;\n    },\n    _handleFallbackAutoScroll: function(n) {\n      this._handleAutoScroll(n, !0);\n    },\n    _handleAutoScroll: function(n, o) {\n      var r = this, i = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(i, a);\n      if (ze = n, o || this.options.forceAutoScrollFallback || Ae || ie || _e) {\n        rt(n, this.options, l, o);\n        var s = ue(l, !0);\n        ut && (!De || i !== nt || a !== ot) && (De && Mt(), De = setInterval(function() {\n          var u = ue(document.elementFromPoint(i, a), !0);\n          u !== s && (s = u, He()), rt(n, r.options, u, o);\n        }, 10), nt = i, ot = a);\n      } else {\n        if (!this.options.bubbleScroll || ue(l, !0) === ee()) {\n          He();\n          return;\n        }\n        rt(n, this.options, ue(l, !1), !1);\n      }\n    }\n  }, re(t, {\n    pluginName: \"scroll\",\n    initializeByDefault: !0\n  });\n}\nfunction He() {\n  P.forEach(function(t) {\n    clearInterval(t.pid);\n  }), P = [];\n}\nfunction Mt() {\n  clearInterval(De);\n}\nvar rt = Gt(function(t, e, n, o) {\n  if (e.scroll) {\n    var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = ee(), u = !1, d;\n    st !== n && (st = n, He(), Se = e.scroll, d = e.scrollFn, Se === !0 && (Se = ue(n, !0)));\n    var f = 0, m = Se;\n    do {\n      var y = m, b = M(y), E = b.top, k = b.bottom, H = b.left, F = b.right, x = b.width, L = b.height, ne = void 0, j = void 0, Q = y.scrollWidth, v = y.scrollHeight, w = h(y), N = y.scrollLeft, I = y.scrollTop;\n      y === s ? (ne = x < Q && (w.overflowX === \"auto\" || w.overflowX === \"scroll\" || w.overflowX === \"visible\"), j = L < v && (w.overflowY === \"auto\" || w.overflowY === \"scroll\" || w.overflowY === \"visible\")) : (ne = x < Q && (w.overflowX === \"auto\" || w.overflowX === \"scroll\"), j = L < v && (w.overflowY === \"auto\" || w.overflowY === \"scroll\"));\n      var _ = ne && (Math.abs(F - r) <= a && N + x < Q) - (Math.abs(H - r) <= a && !!N), C = j && (Math.abs(k - i) <= a && I + L < v) - (Math.abs(E - i) <= a && !!I);\n      if (!P[f])\n        for (var X = 0; X <= f; X++)\n          P[X] || (P[X] = {});\n      (P[f].vx != _ || P[f].vy != C || P[f].el !== y) && (P[f].el = y, P[f].vx = _, P[f].vy = C, clearInterval(P[f].pid), (_ != 0 || C != 0) && (u = !0, P[f].pid = setInterval(function() {\n        o && this.layer === 0 && p.active._onTouchMove(ze);\n        var Y = P[this.layer].vy ? P[this.layer].vy * l : 0, z = P[this.layer].vx ? P[this.layer].vx * l : 0;\n        typeof d == \"function\" && d.call(p.dragged.parentNode[q], z, Y, t, ze, P[this.layer].el) !== \"continue\" || jt(P[this.layer].el, z, Y);\n      }.bind({\n        layer: f\n      }), 24))), f++;\n    } while (e.bubbleScroll && m !== s && (m = ue(m, !1)));\n    ut = u;\n  }\n}, 30), Zt = function(e) {\n  var n = e.originalEvent, o = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;\n  if (n) {\n    var u = o || i;\n    l();\n    var d = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(d.clientX, d.clientY);\n    s(), u && !u.el.contains(f) && (a(\"spill\"), this.onSpill({\n      dragEl: r,\n      putSortable: o\n    }));\n  }\n};\nfunction ht() {\n}\nht.prototype = {\n  startIndex: null,\n  dragStart: function(e) {\n    var n = e.oldDraggableIndex;\n    this.startIndex = n;\n  },\n  onSpill: function(e) {\n    var n = e.dragEl, o = e.putSortable;\n    this.sortable.captureAnimationState(), o && o.captureAnimationState();\n    var r = we(this.sortable.el, this.startIndex, this.options);\n    r ? this.sortable.el.insertBefore(n, r) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();\n  },\n  drop: Zt\n};\nre(ht, {\n  pluginName: \"revertOnSpill\"\n});\nfunction pt() {\n}\npt.prototype = {\n  onSpill: function(e) {\n    var n = e.dragEl, o = e.putSortable, r = o || this.sortable;\n    r.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), r.animateAll();\n  },\n  drop: Zt\n};\nre(pt, {\n  pluginName: \"removeOnSpill\"\n});\np.mount(new Zn());\np.mount(pt, ht);\nfunction Qn(t) {\n  return t == null ? t : JSON.parse(JSON.stringify(t));\n}\nfunction eo(t) {\n  ft() && ln(t);\n}\nfunction to(t) {\n  ft() ? sn(t) : Yt(t);\n}\nlet Qt = null, en = null;\nfunction Ft(t = null, e = null) {\n  Qt = t, en = e;\n}\nfunction no() {\n  return {\n    data: Qt,\n    clonedData: en\n  };\n}\nconst Rt = Symbol(\"cloneElement\");\nfunction tn(...t) {\n  var j, Q;\n  const e = (j = ft()) == null ? void 0 : j.proxy;\n  let n = null;\n  const o = t[0];\n  let [, r, i] = t;\n  Array.isArray(U(r)) || (i = r, r = null);\n  let a = null;\n  const {\n    immediate: l = !0,\n    clone: s = Qn,\n    customUpdate: u\n  } = (Q = U(i)) != null ? Q : {};\n  function d(v) {\n    var X;\n    const { from: w, oldIndex: N, item: I } = v;\n    n = Array.from(w.childNodes);\n    const _ = U((X = U(r)) == null ? void 0 : X[N]), C = s(_);\n    Ft(_, C), I[Rt] = C;\n  }\n  function f(v) {\n    const w = v.item[Rt];\n    if (!yn(w)) {\n      if (qe(v.item), $e(r)) {\n        const N = [...U(r)];\n        r.value = St(N, v.newDraggableIndex, w);\n        return;\n      }\n      St(U(r), v.newDraggableIndex, w);\n    }\n  }\n  function m(v) {\n    const { from: w, item: N, oldIndex: I, oldDraggableIndex: _, pullMode: C, clone: X } = v;\n    if (Dt(w, N, I), C === \"clone\") {\n      qe(X);\n      return;\n    }\n    if ($e(r)) {\n      const Y = [...U(r)];\n      r.value = Et(Y, _);\n      return;\n    }\n    Et(U(r), _);\n  }\n  function y(v) {\n    if (u) {\n      u(v);\n      return;\n    }\n    const { from: w, item: N, oldIndex: I, newIndex: _ } = v;\n    if (qe(N), Dt(w, N, I), $e(r)) {\n      const C = [...U(r)];\n      r.value = wt(C, I, _);\n      return;\n    }\n    wt(U(r), I, _);\n  }\n  function b(v) {\n    const { newIndex: w, oldIndex: N, from: I, to: _ } = v;\n    let C = null;\n    const X = w === N && I === _;\n    try {\n      if (X) {\n        let Y = null;\n        n == null || n.some((z, ae) => {\n          if (Y && (n == null ? void 0 : n.length) !== _.childNodes.length)\n            return I.insertBefore(Y, z.nextSibling), !0;\n          const ce = _.childNodes[ae];\n          Y = _ == null ? void 0 : _.replaceChild(z, ce);\n        });\n      }\n    } catch (Y) {\n      C = Y;\n    } finally {\n      n = null;\n    }\n    Yt(() => {\n      if (Ft(), C)\n        throw C;\n    });\n  }\n  const E = {\n    onUpdate: y,\n    onStart: d,\n    onAdd: f,\n    onRemove: m,\n    onEnd: b\n  };\n  function k(v) {\n    const w = U(o);\n    return v || (v = wn(w) ? En(w, e == null ? void 0 : e.$el) : w), v && !_n(v) && (v = v.$el), v || mn(\"Root element not found\"), v;\n  }\n  function H() {\n    var I;\n    const _ = (I = U(i)) != null ? I : {}, { immediate: v, clone: w } = _, N = Ve(_, [\"immediate\", \"clone\"]);\n    return _t(N, (C, X) => {\n      Tn(C) && (N[C] = (Y, ...z) => {\n        const ae = no();\n        return Cn(Y, ae), X(Y, ...z);\n      });\n    }), Dn(\n      r === null ? {} : E,\n      N\n    );\n  }\n  const F = (v) => {\n    v = k(v), a && x.destroy(), a = new p(v, H());\n  };\n  an(\n    () => i,\n    () => {\n      a && _t(H(), (v, w) => {\n        a == null || a.option(v, w);\n      });\n    },\n    { deep: !0 }\n  );\n  const x = {\n    option: (v, w) => a == null ? void 0 : a.option(v, w),\n    destroy: () => {\n      a == null || a.destroy(), a = null;\n    },\n    save: () => a == null ? void 0 : a.save(),\n    toArray: () => a == null ? void 0 : a.toArray(),\n    closest: (...v) => a == null ? void 0 : a.closest(...v)\n  }, L = () => x == null ? void 0 : x.option(\"disabled\", !0), ne = () => x == null ? void 0 : x.option(\"disabled\", !1);\n  return to(() => {\n    l && F();\n  }), eo(x.destroy), fe({ start: F, pause: L, resume: ne }, x);\n}\nconst ct = [\n  \"update\",\n  \"start\",\n  \"add\",\n  \"remove\",\n  \"choose\",\n  \"unchoose\",\n  \"end\",\n  \"sort\",\n  \"filter\",\n  \"clone\",\n  \"move\",\n  \"change\"\n], oo = [\n  \"clone\",\n  \"animation\",\n  \"ghostClass\",\n  \"group\",\n  \"sort\",\n  \"disabled\",\n  \"store\",\n  \"handle\",\n  \"draggable\",\n  \"swapThreshold\",\n  \"invertSwap\",\n  \"invertedSwapThreshold\",\n  \"removeCloneOnHide\",\n  \"direction\",\n  \"chosenClass\",\n  \"dragClass\",\n  \"ignore\",\n  \"filter\",\n  \"preventOnFilter\",\n  \"easing\",\n  \"setData\",\n  \"dropBubble\",\n  \"dragoverBubble\",\n  \"dataIdAttr\",\n  \"delay\",\n  \"delayOnTouchOnly\",\n  \"touchStartThreshold\",\n  \"forceFallback\",\n  \"fallbackClass\",\n  \"fallbackOnBody\",\n  \"fallbackTolerance\",\n  \"fallbackOffset\",\n  \"supportPointer\",\n  \"emptyInsertThreshold\",\n  \"scroll\",\n  \"forceAutoScrollFallback\",\n  \"scrollSensitivity\",\n  \"scrollSpeed\",\n  \"bubbleScroll\",\n  \"modelValue\",\n  \"tag\",\n  \"target\",\n  \"customUpdate\",\n  ...ct.map((t) => `on${t.replace(/^\\S/, (e) => e.toUpperCase())}`)\n], lo = un({\n  name: \"VueDraggable\",\n  model: {\n    prop: \"modelValue\",\n    event: \"update:modelValue\"\n  },\n  props: oo,\n  emits: [\"update:modelValue\", ...ct],\n  setup(t, { slots: e, emit: n, expose: o, attrs: r }) {\n    const i = ct.reduce((d, f) => {\n      const m = `on${f.replace(/^\\S/, (y) => y.toUpperCase())}`;\n      return d[m] = (...y) => n(f, ...y), d;\n    }, {}), a = yt(() => {\n      const y = cn(t), { modelValue: d } = y, f = Ve(y, [\"modelValue\"]), m = Object.entries(f).reduce((b, [E, k]) => {\n        const H = U(k);\n        return H !== void 0 && (b[E] = H), b;\n      }, {});\n      return fe(fe({}, i), bn(fe(fe({}, r), m)));\n    }), l = yt({\n      get: () => t.modelValue,\n      set: (d) => n(\"update:modelValue\", d)\n    }), s = fn(), u = dn(\n      tn(t.target || s, l, a)\n    );\n    return o(u), () => {\n      var d;\n      return hn(t.tag || \"div\", { ref: s }, (d = e == null ? void 0 : e.default) == null ? void 0 : d.call(e, u));\n    };\n  }\n}), Xt = {\n  mounted: \"mounted\",\n  unmounted: \"unmounted\"\n}, it = /* @__PURE__ */ new WeakMap(), so = {\n  [Xt.mounted](t, e) {\n    const n = pn(e.value) ? [e.value] : e.value, [o, r] = n, i = tn(t, o, r);\n    it.set(t, i.destroy);\n  },\n  [Xt.unmounted](t) {\n    var e;\n    (e = it.get(t)) == null || e(), it.delete(t);\n  }\n};\nexport {\n  lo as VueDraggable,\n  tn as useDraggable,\n  so as vDraggable\n};\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport IconTile from '@/components/shared/icons/IconTile.vue'\nimport DragHandle from '@/components/shared/core/DragHandle.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'show',\n])\nconst props = defineProps({\n  label: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  isIconOutlined: {\n    type: Boolean,\n    default: false,\n  },\n  isDraggable: {\n    type: Boolean,\n    default: false,\n  },\n  isParentDraggable: {\n    type: Boolean,\n    default: false,\n  },\n  isSecondary: {\n    type: Boolean,\n    default: false,\n  },\n  isHighlight: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n  isClickable: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {isClickable} = toRefs(props)\n\n//Handle click\nconst handleClick = event => {\n  if (isClickable.value) {\n    emit('show', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    :class=\"$style.item\"\n    :test-id=\"testId\"\n  >\n    <DragHandle\n      v-if=\"isDraggable\"\n      :test-id=\"`${testId}_dragHandle`\"\n    />\n    <div\n      v-else-if=\"isParentDraggable\"\n      :class=\"$style.dragHandleSpacer\"\n    />\n    <div\n      :class=\"{\n        [$style.main]: true,\n        [$style.clickable]: isClickable,\n      }\"\n      @click=\"handleClick($event)\"\n    >\n      <IconTile :is-highlight=\"isHighlight\">\n        <Icon\n          :icon=\"icon\"\n          color=\"primaryMuted\"\n          size=\"m\"\n          :is-outlined=\"isIconOutlined\"\n          is-default\n        />\n      </IconTile>\n      <span\n        :class=\"{\n          [$style.label]: true,\n          [$style.secondary]: isSecondary,\n        }\"\n      >\n        <slot name=\"label\">\n          {{ label }}\n        </slot>\n      </span>\n    </div>\n    <div :class=\"$style.actions\">\n      <slot name=\"actions\" />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.item, .main {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n.main {\n  flex: 1;\n}\n.main.clickable, .main.clickable > * {\n  cursor: pointer !important;\n}\n.label {\n  flex: 1;\n  font-weight: var(--font-weight-bold);\n  cursor: default;\n  text-overflow: ellipsis;\n\n  /* To break up obnoxiously long words */\n  overflow-wrap: break-word;\n  inline-size: 160px;\n\n  /* For non webkit browsers, it does not seem possible to have a multi-line\n  text limitation with ellipsis */\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  &.secondary {\n    font-weight: var(--font-weight-normal);\n    font-size: var(--font-size-s);\n    color: var(--color-text-muted);\n  }\n}\n.actions {\n  width: 36px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  &:empty {\n    display: none;\n  }\n}\n.dragHandleSpacer {\n  width: var(--drag-handle-width);\n}\n</style>\n","import {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {computed} from 'vue'\n\n/**\n * Course content checks\n */\nexport function useCourseContentChecks(model) {\n\n  //Settings\n  const {\n    isConfidenceLiftEnabled,\n    isLearnerSentimentEnabled,\n    isNpsSurveyEnabled,\n    isRatingQuestionEnabled,\n  } = useCurrentOrganization()\n\n  //Check what we have\n  const relevantSteps = computed(() => model.value.steps.filter(step => step.isLesson && !step.isRemoved))\n  const hasConfidenceLift = computed(() => relevantSteps.value.some(step => step.hasConfidenceLift))\n  const hasNpsSurvey = computed(() => relevantSteps.value.some(step => step.hasNpsSurvey))\n  const hasLearnerSentiment = computed(() => relevantSteps.value.some(step => step.hasLearnerSentiment))\n\n  //Check what we can add\n  const canAddConfidenceLift = computed(() => isConfidenceLiftEnabled.value && !hasConfidenceLift.value)\n  const canAddNpsSurvey = computed(() => isNpsSurveyEnabled.value && !hasNpsSurvey.value)\n  const canAddLearnerSentiment = computed(() => isLearnerSentimentEnabled.value && !hasLearnerSentiment.value)\n  const canAddSurveyType = computed(() => canAddConfidenceLift.value || canAddNpsSurvey.value || canAddLearnerSentiment.value)\n  const canAddRatingQuestion = computed(() => isRatingQuestionEnabled.value)\n\n  //Expose\n  return {\n    isConfidenceLiftEnabled,\n    isLearnerSentimentEnabled,\n    isNpsSurveyEnabled,\n    isRatingQuestionEnabled,\n    hasConfidenceLift,\n    hasNpsSurvey,\n    hasLearnerSentiment,\n    canAddConfidenceLift,\n    canAddNpsSurvey,\n    canAddLearnerSentiment,\n    canAddSurveyType,\n    canAddRatingQuestion,\n  }\n}\n","<script setup>\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport ListItemsContainer from '@/components/shared/search/ListItemsContainer.vue'\nimport ListItem from '@/components/shared/search/ListItem.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {useCourseContentChecks} from '@/composables/use-course-content-checks.js'\nimport {substepTypes} from '@/constants/courses.js'\nimport {Course} from '@/models/course.model.js'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'add-step',\n  'add-substep',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n})\n\n//Dropdown toggling\nconst addContentPanel = ref(null)\nconst addContentToggle = ref(null)\nconst {\n  isVisible,\n  toggle,\n  hide,\n} = useVisibilityToggle(addContentPanel, [addContentToggle])\n\n//Check what we can add\nconst {course} = toRefs(props)\nconst {\n  canAddConfidenceLift,\n  canAddNpsSurvey,\n  canAddLearnerSentiment,\n  canAddSurveyType,\n} = useCourseContentChecks(course)\n\n//Handlers\nconst create = () => {\n  if (canAddSurveyType.value) {\n    toggle()\n  }\n  else {\n    addStep()\n  }\n}\nconst addStep = () => {\n  emit('add-step')\n  hide()\n}\nconst addSubstep = (type) => {\n  emit('add-substep', {type})\n  hide()\n}\n</script>\n\n<template>\n  <DropdownWrapper :class=\"$style.wrapper\">\n    <CreateButton\n      ref=\"addContentToggle\"\n      is-block\n      label=\"Add content\"\n      v-bind=\"$attrs\"\n      @click=\"create()\"\n    />\n    <DropdownPanel\n      v-bind=\"$attrs\"\n      ref=\"addContentPanel\"\n      :is-visible=\"isVisible\"\n      alignment=\"center\"\n      :class=\"$style.dropdown\"\n    >\n      <ListItemsContainer>\n        <ListItem\n          icon=\"dictionary\"\n          label=\"Lesson\"\n          @click=\"addStep()\"\n        />\n        <ListItem\n          v-if=\"canAddConfidenceLift\"\n          icon=\"rocket_launch\"\n          label=\"Confidence lift survey\"\n          @click=\"addSubstep(substepTypes.CONFIDENCE_LIFT)\"\n        />\n        <ListItem\n          v-if=\"canAddNpsSurvey\"\n          icon=\"campaign\"\n          label=\"NPS survey\"\n          @click=\"addSubstep(substepTypes.NPS_SURVEY)\"\n        />\n        <ListItem\n          v-if=\"canAddLearnerSentiment\"\n          icon=\"sentiment_calm\"\n          label=\"Learner sentiment\"\n          @click=\"addSubstep(substepTypes.LEARNER_SENTIMENT)\"\n        />\n      </ListItemsContainer>\n    </DropdownPanel>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  width: 100%;\n}\n</style>\n","<script setup>\nimport {VueDraggable} from 'vue-draggable-plus'\nimport PageOutline from '@/components/shared/page/PageOutline.vue'\nimport PageOutlineBlock from '@/components/shared/page/PageOutlineBlock.vue'\nimport PageOutlineBlockItem from '@/components/shared/page/PageOutlineBlockItem.vue'\nimport CourseStepActionsMenu from '@/components/courses/CourseStepActionsMenu.vue'\nimport ValidationErrorsIcon from '@/components/courses/editor/ValidationErrorsIcon.vue'\nimport AddContentSelector from '@/components/courses/editor/AddContentSelector.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport {toUpperCaseFirst, toCamelCase} from '@/helpers/string.js'\nimport {Course} from '@/models/course.model.js'\nimport {CourseStep} from '@/models/course-step.model.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'add-step',\n  'copy-step',\n  'remove-step',\n  'reorder-step',\n  'reorder-steps',\n  'view-step',\n  'add-substep',\n  'remove-substep',\n  'view-substep',\n  'move-substep',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    default: null,\n  },\n  highlightedStep: {\n    type: CourseStep,\n    default: null,\n  },\n  isEditable: {\n    type: Boolean,\n    default: false,\n  },\n  isReorderable: {\n    type: Boolean,\n    default: false,\n  },\n  showValidationErrors: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Extract data\nconst {course} = toRefs(props)\nconst activationStep = computed(() => course.value.steps.find(step => step.isActivation))\nconst relevantSteps = computed(() => course.value.steps.filter(step => step.isLesson && !step.isRemoved))\n\n//Draggable model requires a setter\nconst draggableSteps = computed({\n  get: () => relevantSteps.value,\n  set: steps => emit('reorder-steps', {steps: [activationStep.value, ...steps]}),\n})\n\n//Accept drop events for substeps that are being dragged onto the lesson\nconst onDrop = (step, event) => {\n\n  //Can only drop on lessons\n  if (!step.isLesson) {\n    return\n  }\n\n  //Get substep ID from event\n  const substepId = event.dataTransfer.getData('substepId')\n  if (!substepId) {\n    return\n  }\n\n  //Find the substep\n  const substep = relevantSteps.value\n    .flatMap(step => step.substeps)\n    .find(substep => substep.id === substepId)\n\n  //Not found/invalid\n  if (!substep) {\n    return\n  }\n\n  //Emit\n  emit('move-substep', {step, substep})\n}\n</script>\n\n<template>\n  <PageOutline\n    header=\"Outline\"\n    v-bind=\"$attrs\"\n  >\n    <AddContentSelector\n      v-if=\"isEditable\"\n      :course=\"course\"\n      @add-step=\"$emit('add-step')\"\n      @add-substep=\"$emit('add-substep', $event)\"\n    />\n\n    <VueDraggable\n      v-model=\"draggableSteps\"\n      handle=\".drag-handle\"\n      :animation=\"250\"\n      :disabled=\"!isEditable || !isReorderable\"\n      :class=\"$style.dragContainer\"\n    >\n      <PageOutlineBlock\n        v-for=\"(step, i) in relevantSteps\"\n        :key=\"step.id || i\"\n        :is-highlight=\"highlightedStep === step\"\n        ondragenter=\"this.classList.toggle('dragTarget')\"\n        ondragleave=\"this.classList.toggle('dragTarget')\"\n        @drop=\"onDrop(step, $event)\"\n      >\n        <PageOutlineBlockItem\n          icon=\"dictionary\"\n          :is-highlight=\"highlightedStep === step\"\n          :is-draggable=\"isEditable\"\n          is-clickable\n          :test-id=\"`courseOutlineStep_${i + 1}`\"\n          @show=\"$emit('view-step', {step})\"\n        >\n          <template #label>\n            <template v-if=\"showValidationErrors && step.hasValidationErrors\">\n              <ValidationErrorsIcon\n                size=\"xs\"\n                is-inline\n              />\n              <span>&nbsp;</span>\n            </template>\n            {{ step.displayName }}\n          </template>\n          <template\n            v-if=\"isEditable\"\n            #actions\n          >\n            <CourseStepActionsMenu\n              :step=\"step\"\n              :step-index=\"i\"\n              test-id=\"courseOutlineStepActionsMenu\"\n              :is-flipped=\"i >= 2 && i >= (relevantSteps.length - 2)\"\n              can-remove\n              @copy=\"() => $emit('copy-step', {step})\"\n              @remove=\"() => $emit('remove-step', {step})\"\n            />\n          </template>\n        </PageOutlineBlockItem>\n\n        <PageOutlineBlockItem\n          v-for=\"(substep, j) in step.surveySubsteps\"\n          :key=\"j\"\n          icon=\"subdirectory_arrow_right\"\n          is-secondary\n          is-clickable\n          is-parent-draggable\n          :test-id=\"`courseOutlineSubstep${toUpperCaseFirst(toCamelCase(substep.displayName))}_${i + 1}`\"\n          :is-highlight=\"highlightedStep === step\"\n          @show=\"$emit('view-substep', {step, substep})\"\n        >\n          <template #label>\n            <ValidationErrorsIcon\n              v-if=\"showValidationErrors && substep.hasValidationErrors\"\n              size=\"xs\"\n              is-inline\n            />\n            {{ substep.displayName }}\n          </template>\n          <template\n            v-if=\"isEditable\"\n            #actions\n          >\n            <RemoveButton\n              icon=\"close\"\n              :test-id=\"`removeSubstep${toUpperCaseFirst(toCamelCase(substep.displayName))}_${i + 1}`\"\n              @click=\"$emit('remove-substep', {step, substep})\"\n            />\n          </template>\n        </PageOutlineBlockItem>\n      </PageOutlineBlock>\n    </VueDraggable>\n  </PageOutline>\n</template>\n\n<style module lang=\"scss\">\n.dragContainer {\n  display: flex;\n  flex-direction: column;\n  overflow-y: scroll;\n  min-height: 224px;\n  -ms-overflow-style: none;\n  scrollbar-width: none;\n  &::-webkit-scrollbar {\n    display: none;\n  }\n}\n</style>\n\n<style>\n/* Not ideal to have to use native events and global styles, but there is currently\n no practical way to apply a hover effect on an element when dragging something over it */\n.dragTarget {\n  background: #f9fafa;\n}\n</style>\n","<script setup>\nimport ChevronButton from '@/components/shared/buttons/ChevronButton.vue'\nimport ValidationErrorsIcon from '@/components/courses/editor/ValidationErrorsIcon.vue'\nimport {toRefs} from 'vue'\n\n//Emits and Props\nconst emit = defineEmits([\n  'toggle',\n])\nconst props = defineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  isSmall: {\n    type: Boolean,\n    default: false,\n  },\n  isCollapsed: {\n    type: Boolean,\n    default: false,\n  },\n  canCollapse: {\n    type: Boolean,\n    default: true,\n  },\n  hasErrors: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Only collapse if enabled\nconst {canCollapse} = toRefs(props)\nconst toggle = event => {\n  if (canCollapse.value) {\n    emit('toggle', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    :class=\"$style.container\"\n    @click=\"toggle($event)\"\n  >\n    <div :class=\"$style.left\">\n      <slot name=\"iconsLeft\" />\n      <ValidationErrorsIcon v-if=\"hasErrors\" />\n\n      <component\n        :is=\"isSmall ? 'h5' : 'h4'\"\n        :class=\"{\n          [$style.header]: true,\n          [$style.errors]: hasErrors,\n        }\"\n      >\n        <slot>{{ header }}</slot>\n      </component>\n    </div>\n    <div :class=\"$style.right\">\n      <slot name=\"iconsRight\" />\n      <ChevronButton\n        v-if=\"canCollapse\"\n        :is-collapsed=\"isCollapsed\"\n        @click.stop=\"toggle($event)\"\n      />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container, .left, .right {\n  display: flex;\n  align-items: center;\n  gap: 0.25rem;\n  margin-right: -0.5rem;\n}\n.container {\n  justify-content: space-between;\n  width: 100%;\n  cursor: pointer;\n}\n.left {\n  justify-content: flex-start;\n}\n.right {\n  justify-content: flex-end;\n}\n.header {\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 1;\n  text-overflow: ellipsis;\n  margin: 0.25rem 0;\n  &.errors {\n    margin-left: 0.5rem;\n  }\n}\n</style>\n","<script setup>\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {toRefs, computed} from 'vue'\n\n//Props\nconst props = defineProps({\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n})\n\n//Dynamic name\nconst {substep, substepIndex} = toRefs(props)\nconst name = computed(() => {\n  if (substep.value.isPassive) {\n    return 'Body'\n  }\n  else if (substep.value.isQuestion && substepIndex.value > -1) {\n    return `Question ${substepIndex.value + 1} – ${substep.value.displayName}`\n  }\n  return substep.value.displayName\n})\n</script>\n\n<template>\n  <span>{{ name }}</span>\n</template>\n","<script setup>\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport RegenerateButton from '@/components/shared/buttons/RegenerateButton.vue'\nimport GenerateButton from '@/components/shared/buttons/GenerateButton.vue'\nimport OptimizeButton from '@/components/shared/buttons/OptimizeButton.vue'\nimport {substepTypes} from '@/constants/courses.js'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'optimize',\n  'generate',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  canOptimize: {\n    type: Boolean,\n    default: false,\n  },\n  canGenerate: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Dynamic label\nconst {substep} = toRefs(props)\n\n//Updater\nconst updateSubstep = data => emit('update', data)\n\n//Validation\nconst {required, combinedCharacterCount} = useValidators()\nconst $v = useVuelidate({\n  substep: {\n    body: {\n      required: required('Prompt'),\n      characterCount: combinedCharacterCount(substep),\n    },\n  },\n}, {substep})\n\n//Mark dirty if substep has any content\nif (substep.value.hasContent) {\n  $v.value.$touch()\n}\n</script>\n\n<template>\n  <FlexColumn :with-gap=\"false\">\n    <FormField\n      :label=\"substep.promptDisplayName\"\n      :errors=\"$v.substep.body.$errors\"\n      is-required\n    >\n      <template #aside>\n        <OptimizeButton\n          v-if=\"canOptimize\"\n          :is-disabled=\"isDisabled\"\n          :test-id=\"`optimizeSubstep_${stepIndex + 1}_${substepIndex + 1}`\"\n          label=\"Optimize length\"\n          @click=\"$emit('optimize')\"\n        />\n        <template v-if=\"canGenerate\">\n          <RegenerateButton\n            v-if=\"substep.id && substep.hasContent\"\n            :test-id=\"`regenerateSubstep_${stepIndex + 1}_${substepIndex + 1}`\"\n            :is-disabled=\"isDisabled\"\n            label=\"Regenerate question\"\n            @click=\"$emit('generate')\"\n          />\n          <GenerateButton\n            v-else\n            :test-id=\"`generateSubstep_${stepIndex + 1}_${substepIndex + 1}`\"\n            :is-disabled=\"!substep.id || isDisabled\"\n            @click=\"$emit('generate')\"\n          />\n        </template>\n      </template>\n\n      <template\n        v-if=\"substep.isRatingType\"\n        #subLabel\n      >\n        Default text (always included):\n        <strong>Reply with a number from 0-10</strong>\n      </template>\n\n      <TextInput\n        :value=\"substep.body\"\n        :character-limit=\"substep.combinedCaracterLimit\"\n        :manual-character-count=\"substep.combinedCharacterCount\"\n        :ignore-character-limit=\"course.ignoreValidations\"\n        :has-error=\"$v.substep.body.$error\"\n        :is-disabled=\"isDisabled\"\n        :test-id=\"`substepPrompt_${stepIndex + 1}_${substepIndex + 1}`\"\n        is-multiline\n        no-max-height\n        show-emoji-picker\n        @input=\"updateSubstep({body: $event.value})\"\n        @dirty=\"$v.substep.body.$touch()\"\n      />\n    </FormField>\n\n    <FormField v-if=\"substep.isWrittenAnswer || substep.isAiEvaluated\">\n      <CheckBox\n        :is-checked=\"substep.isAiEvaluated\"\n        label=\"This open-ended question has a correct answer\"\n        sub-label=\"Use AI to check alignment with the expected answer and answer appropriately\"\n        @click=\"updateSubstep({\n          substepType: substep.isAiEvaluated ?\n            substepTypes.WRITTEN_ANSWER :\n            substepTypes.AI_EVALUATED\n        })\"\n      />\n    </FormField>\n  </FlexColumn>\n</template>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport DragHandle from '@/components/shared/core/DragHandle.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport {characterLimits} from '@/constants/courses.js'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {CourseSubstepAnswer} from '@/models/course-substep-answer.model.js'\nimport {useAlphabet} from '@/composables/use-alphabet.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'update',\n  'remove',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  answer: {\n    type: CourseSubstepAnswer,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n  answerIndex: {\n    type: Number,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  canRemove: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {course, substep, answer, answerIndex} = toRefs(props)\n\n//Determine letter\nconst {getAlphabetLetterForIndex} = useAlphabet(course.value.language)\nconst letter = computed(() => getAlphabetLetterForIndex(answerIndex.value))\n\n//Validation\nconst {required, requiredIf, characterCount, combinedCharacterCount} = useValidators()\nconst $v = useVuelidate({\n  answer: {\n    choice: {\n      required: required('Question'),\n      characterCount: combinedCharacterCount(substep),\n    },\n    response: {\n      required: requiredIf('Response', () => !substep.value.isMultiSelect),\n      characterCount: characterCount(answer.value.response, characterLimits.SUBSTEP_RESPONSE),\n    },\n  },\n}, {answer})\n\n//Mark dirty if answer has any content\nif (answer.value.hasContent(substep.value.isMultiSelect)) {\n  $v.value.$touch()\n}\n</script>\n\n<template>\n  <div :class=\"$style.container\">\n    <DragHandle\n      :class=\"$style.dragHandle\"\n      :is-disabled=\"isDisabled\"\n    />\n\n    <div :class=\"$style.main\">\n      <FormField\n        :label=\"`(${letter})`\"\n        :errors=\"$v.answer.choice.$errors\"\n        is-required\n      >\n        <template #aside>\n          <RemoveButton\n            v-if=\"canRemove\"\n            :test-id=\"`removeSubstepMCAnswer_${stepIndex + 1}_${substepIndex + 1}_${answerIndex + 1}`\"\n            :is-disabled=\"isDisabled\"\n            @click=\"$emit('remove')\"\n          />\n        </template>\n        <TextInput\n          :value=\"answer.choice\"\n          :character-limit=\"substep.combinedCaracterLimit\"\n          :manual-character-count=\"substep.combinedCharacterCount\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :has-error=\"$v.answer.choice.$error\"\n          :is-disabled=\"isDisabled\"\n          :test-id=\"`substepMCAnswerChoice_${stepIndex + 1}_${substepIndex + 1}_${answerIndex + 1}`\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          @input=\"$emit('update', {choice: $event.value})\"\n          @dirty=\"$v.answer.choice.$touch()\"\n        />\n      </FormField>\n      <FormField\n        v-if=\"!substep.isMultiSelect\"\n        label=\"Response to learner\"\n        :errors=\"$v.answer.response.$errors\"\n        is-required\n      >\n        <TextInput\n          :value=\"answer.response\"\n          :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :has-error=\"$v.answer.response.$error\"\n          :is-disabled=\"isDisabled\"\n          :test-id=\"`substepMCAnswerResponse_${stepIndex + 1}_${substepIndex + 1}_${answerIndex + 1}`\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          @input=\"$emit('update', {response: $event.value})\"\n          @dirty=\"$v.answer.response.$touch()\"\n        />\n      </FormField>\n\n      <FormField>\n        <CheckBox\n          label=\"Correct answer\"\n          :is-checked=\"answer.isCorrect\"\n          :is-disabled=\"isDisabled\"\n          :test-id=\"`substepMCAnswerCorrect_${stepIndex + 1}_${substepIndex + 1}_${answerIndex + 1}`\"\n          @click=\"$emit('update', {isCorrect: !answer.isCorrect})\"\n        />\n      </FormField>\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  padding: 1rem;\n  background: white;\n  border: 1px solid var(--color-borders-light);\n  border-radius: var(--border-radius-m);\n}\n.main {\n  flex: 1;\n}\n.dragHandle {\n  margin-left: -0.5rem;\n  margin-top: -0.5rem;\n}\n</style>\n","<script setup>\nimport {VueDraggable} from 'vue-draggable-plus'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport MultipleChoiceAnswerBlock from '@/components/courses/editor/MultipleChoiceAnswerBlock.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {CourseSubstepAnswer} from '@/models/course-substep-answer.model.js'\nimport {characterLimits} from '@/constants/courses.js'\nimport {useAlphabet} from '@/composables/use-alphabet.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {course, substep} = toRefs(props)\nconst {alphabetLength} = useAlphabet(course.value.language)\nconst answers = computed(() => substep.value.answers)\nconst canAddAnswer = computed(() => alphabetLength.value > answers.value.length)\n\n//Updaters\nconst updateSubstep = data => emit('update', data)\nconst updateAnswers = (newAnswers = answers.value) => updateSubstep({answers: [...newAnswers]})\n\n//Toggle this being a question with multiple correct answers\nconst toggleMultiSelect = () => {\n  const correctIndex = substep.value.answers.findIndex(answer => answer.isCorrect)\n  substep.value.answers.forEach((answer, i) => answer.isCorrect = (correctIndex === i))\n  updateSubstep({\n    answers: [...answers.value],\n    isMultiSelect: !substep.value.isMultiSelect,\n  })\n}\n\n//Add an answer\nconst addAnswer = () => {\n  const answer = CourseSubstepAnswer.createFrom({isNew: true})\n  updateAnswers([...answers.value, answer])\n}\n\n//Remove an answer\nconst removeAnswer = answer => {\n  updateAnswers(answers.value.filter(other => other !== answer))\n}\n\n//Update an answer\nconst updateAnswer = (answer, data) => {\n\n  //Non multi select, must have only one correct answer\n  if (data.isCorrect && !substep.value.isMultiSelect) {\n    substep.value.answers.forEach(answer => answer.isCorrect = false)\n  }\n\n  //Update answer with given data\n  Object.assign(answer, data)\n\n  //Update answers\n  updateAnswers()\n}\n\n//Validation\nconst {requiredIf, characterCount} = useValidators()\nconst $v = useVuelidate({\n  substep: {\n    successResponse: {\n      required: requiredIf('Response', () => substep.value.isMultiSelect),\n      characterCount: characterCount(\n        substep.value.successResponse,\n        characterLimits.SUBSTEP_RESPONSE\n      ),\n    },\n    failureResponse: {\n      required: requiredIf('Response', () => substep.value.isMultiSelect),\n      characterCount: characterCount(\n        substep.value.failureResponse,\n        characterLimits.SUBSTEP_RESPONSE\n      ),\n    },\n  },\n}, {substep})\n\n//Mark dirty if substep has any content\nif (substep.value.hasContent) {\n  $v.value.$touch()\n}\n\n//Draggable model requires a setter\nconst draggableAnswers = computed({\n  get: () => answers.value,\n  set: answers => updateAnswers(answers),\n})\n</script>\n\n<template>\n  <FlexColumn :with-gap=\"false\">\n    <FormField\n      :error=\"!substep.hasEnoughCorrectAnswers ?\n        `Please select ${substep.isMultiSelect ?\n          'two or more correct answers' :\n          'at least one correct answer'}` : ''\"\n    >\n      <CheckBox\n        :is-checked=\"substep.isMultiSelect\"\n        :is-disabled=\"isDisabled\"\n        :has-error=\"!substep.hasEnoughCorrectAnswers\"\n        label=\"Multiple correct answers\"\n        sub-label=\"Check the box next to all correct answers\"\n        @click=\"toggleMultiSelect()\"\n      />\n    </FormField>\n\n    <Divider />\n\n    <FormField label=\"Answers\" />\n\n    <VueDraggable\n      v-model=\"draggableAnswers\"\n      handle=\".drag-handle\"\n      group=\"responses\"\n      :animation=\"250\"\n      :disabled=\"isDisabled\"\n      flex-column-container\n    >\n      <MultipleChoiceAnswerBlock\n        v-for=\"(answer, index) in answers\"\n        :key=\"index\"\n        :course=\"course\"\n        :substep=\"substep\"\n        :answer=\"answer\"\n        :step-index=\"stepIndex\"\n        :substep-index=\"substepIndex\"\n        :answer-index=\"index\"\n        :is-disabled=\"isDisabled\"\n        :can-remove=\"answers.length > 2\"\n        @update=\"updateAnswer(answer, $event)\"\n        @remove=\"removeAnswer(answer)\"\n      />\n    </VueDraggable>\n\n    <div :class=\"$style.addAnswer\">\n      <ActionButton\n        v-if=\"canAddAnswer\"\n        :test-id=\"`addSubstepMCAnswer_${stepIndex + 1}_${substepIndex + 1}`\"\n        :is-disabled=\"isDisabled\"\n        icon=\"add_circle\"\n        type=\"link\"\n        label=\"Add answer\"\n        @click=\"addAnswer()\"\n      />\n    </div>\n\n    <template v-if=\"substep.isMultiSelect\">\n      <FormField\n        label=\"Response to learners who answer with all options correctly\"\n        :errors=\"$v.substep.successResponse.$errors\"\n        is-required\n      >\n        <TextInput\n          :value=\"substep.successResponse\"\n          :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :is-disabled=\"isDisabled\"\n          :has-error=\"$v.substep.successResponse.$error\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          @input=\"updateSubstep({successResponse: $event.value})\"\n          @dirty=\"$v.substep.successResponse.$touch()\"\n        />\n      </FormField>\n      <FormField\n        label=\"Response to learners who answer partially or fully incorrectly\"\n        :errors=\"$v.substep.failureResponse.$errors\"\n        is-required\n      >\n        <TextInput\n          :value=\"substep.failureResponse\"\n          :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :is-disabled=\"isDisabled\"\n          :has-error=\"$v.substep.failureResponse.$error\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          @input=\"updateSubstep({failureResponse: $event.value})\"\n          @dirty=\"$v.substep.failureResponse.$touch()\"\n        />\n      </FormField>\n    </template>\n  </FlexColumn>\n</template>\n\n<style module lang=\"scss\">\n.addAnswer {\n  padding-top: 1rem;\n  display: flex;\n  justify-content: center;\n}\n</style>\n","<script setup>\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {characterLimits} from '@/constants/courses.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {course, substep} = toRefs(props)\n\n//Updater\nconst updateSubstep = data => emit('update', data)\n\n//Validation\nconst {required, characterCount} = useValidators()\nconst $v = useVuelidate({\n  substep: {\n    aiEvaluatedExampleAnswer: {\n      required: required('Example answer'),\n    },\n    successResponse: {\n      required: required('Response'),\n      characterCount: characterCount(\n        substep.value.successResponse,\n        characterLimits.SUBSTEP_RESPONSE\n      ),\n    },\n    failureResponse: {\n      required: required('Response'),\n      characterCount: characterCount(\n        substep.value.failureResponse,\n        characterLimits.SUBSTEP_RESPONSE\n      ),\n    },\n  },\n}, {substep})\n\n//Mark dirty if substep has any content\nif (substep.value.hasContent) {\n  $v.value.$touch()\n}\n</script>\n\n<template>\n  <FlexColumn :with-gap=\"false\">\n    <FormField\n      label=\"Example of a correct answer\"\n      :errors=\"$v.substep.aiEvaluatedExampleAnswer.$errors\"\n      is-required\n    >\n      <TextInput\n        :value=\"substep.aiEvaluatedExampleAnswer\"\n        :is-disabled=\"isDisabled\"\n        :has-error=\"$v.substep.aiEvaluatedExampleAnswer.$error\"\n        is-multiline\n        no-max-height\n        show-emoji-picker\n        @input=\"updateSubstep({aiEvaluatedExampleAnswer: $event.value})\"\n        @dirty=\"$v.substep.aiEvaluatedExampleAnswer.$touch()\"\n      />\n    </FormField>\n    <FormField\n      label=\"Response to learners who answer correctly\"\n      :errors=\"$v.substep.successResponse.$errors\"\n      is-required\n    >\n      <TextInput\n        :value=\"substep.successResponse\"\n        :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n        :ignore-character-limit=\"course.ignoreValidations\"\n        :is-disabled=\"isDisabled\"\n        :has-error=\"$v.substep.successResponse.$error\"\n        is-multiline\n        no-max-height\n        show-emoji-picker\n        @input=\"updateSubstep({successResponse: $event.value})\"\n        @dirty=\"$v.substep.successResponse.$touch()\"\n      />\n    </FormField>\n    <FormField\n      label=\"Response to learners who answer incorrectly\"\n      :errors=\"$v.substep.failureResponse.$errors\"\n      is-required\n    >\n      <TextInput\n        :value=\"substep.failureResponse\"\n        :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n        :ignore-character-limit=\"course.ignoreValidations\"\n        :is-disabled=\"isDisabled\"\n        :has-error=\"$v.substep.failureResponse.$error\"\n        is-multiline\n        no-max-height\n        show-emoji-picker\n        @input=\"updateSubstep({failureResponse: $event.value})\"\n        @dirty=\"$v.substep.failureResponse.$touch()\"\n      />\n    </FormField>\n  </FlexColumn>\n</template>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {characterLimits} from '@/constants/courses.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'update',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {substep} = toRefs(props)\n\n//Validation\nconst {required, characterCount} = useValidators()\nconst $v = useVuelidate({\n  substep: {\n    response: {\n      required: required('Response'),\n      characterCount: characterCount(\n        substep.value.response,\n        characterLimits.SUBSTEP_RESPONSE\n      ),\n    },\n  },\n}, {substep})\n\n//Mark dirty if substep has any content\nif (substep.value.hasContent) {\n  $v.value.$touch()\n}\n</script>\n\n<template>\n  <FormField\n    label=\"Response to learner\"\n    :errors=\"$v.substep.response.$errors\"\n    is-required\n  >\n    <TextInput\n      :value=\"substep.response\"\n      :character-limit=\"characterLimits.SUBSTEP_RESPONSE\"\n      :ignore-character-limit=\"course.ignoreValidations\"\n      :has-error=\"$v.substep.response.$error\"\n      :is-disabled=\"isDisabled\"\n      :test-id=\"`substepSingleResponse_${stepIndex + 1}_${substepIndex + 1}`\"\n      is-multiline\n      no-max-height\n      show-emoji-picker\n      @input=\"$emit('update', {response: $event.value})\"\n      @dirty=\"$v.substep.response.$touch()\"\n    />\n  </FormField>\n</template>\n","import {ref, unref} from 'vue'\n\n/**\n * Composable to create collapsible toggles\n */\nexport function useCollapsible(isInitiallyCollapsed = true) {\n\n  //Create refs\n  const isCollapsed = ref(unref(isInitiallyCollapsed))\n  const afterCollapseHook = ref(null)\n  const afterExpandHook = ref(null)\n  const beforeCollapseHook = ref(null)\n  const beforeExpandHook = ref(null)\n\n  //Hooks\n  const onCollapse = fn => afterCollapseHook.value = fn\n  const onExpand = fn => afterExpandHook.value = fn\n  const beforeCollapse = fn => beforeCollapseHook.value = fn\n  const beforeExpand = fn => beforeExpandHook.value = fn\n\n  //Helper to call a hook\n  const callHook = hook => {\n    if (hook.value) {\n      return hook.value()\n    }\n  }\n\n  //Collapse handler\n  const collapse = () => {\n    if (callHook(beforeCollapseHook) === false) {\n      return\n    }\n    isCollapsed.value = true\n    callHook(afterCollapseHook)\n  }\n\n  //Expand handler\n  const expand = () => {\n    if (callHook(beforeExpandHook) === false) {\n      return\n    }\n    isCollapsed.value = false\n    callHook(afterExpandHook)\n  }\n\n  //Toggle\n  const toggle = (event) => {\n    if (event) {\n      event.isHandled = true\n    }\n    if (isCollapsed.value) {\n      expand()\n    }\n    else {\n      collapse()\n    }\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    isCollapsed,\n\n    //Functions\n    expand,\n    collapse,\n    toggle,\n    onExpand,\n    onCollapse,\n    beforeCollapse,\n    beforeExpand,\n  }\n}\n","<script setup>\nimport PagePanel from '@/components/shared/page/PagePanel.vue'\nimport CourseSubstepHeader from '@/components/courses/editor/CourseSubstepHeader.vue'\nimport SubstepPrompt from '@/components/courses/editor/SubstepPrompt.vue'\nimport SubstepMultipleChoice from '@/components/courses/editor/SubstepMultipleChoice.vue'\nimport SubstepAiEvaluated from '@/components/courses/editor/SubstepAiEvaluated.vue'\nimport SubstepSingleResponse from '@/components/courses/editor/SubstepSingleResponse.vue'\nimport CourseSubstepInfoAlert from '@/components/courses/CourseSubstepInfoAlert.vue'\nimport {useCollapsible} from '@/composables/use-collapsible.js'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {toRefs, ref, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'copy',\n  'update',\n  'remove',\n  'optimize',\n  'generate',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  model: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n})\n\n//Get refs\nconst {substep} = toRefs(props)\n\n//Composables\nconst {isCollapsed, expand, toggle} = useCollapsible()\nconst {scrollIntoView} = useScrollIntoView()\n\n//Component to use\nconst SubstepComponent = computed(() => {\n  if (substep.value.isMultipleChoice) {\n    return SubstepMultipleChoice\n  }\n  if (substep.value.isAiEvaluated) {\n    return SubstepAiEvaluated\n  }\n  return SubstepSingleResponse\n})\n\n//Focus on substep block\nconst block = ref(null)\nconst focus = () => {\n  expand()\n  setTimeout(() => {\n    scrollIntoView(block)\n  }, 50)\n}\n\n//Expose to parent\ndefineExpose({\n  focus,\n})\n</script>\n\n<template>\n  <PagePanel\n    ref=\"block\"\n    :test-id=\"`substepBlock_${stepIndex + 1}_${substepIndex + 1}`\"\n  >\n    <CourseSubstepHeader\n      :substep=\"substep\"\n      :step-index=\"stepIndex\"\n      :substep-index=\"substepIndex\"\n      :is-collapsed=\"isCollapsed\"\n      v-bind=\"$attrs\"\n      @toggle=\"toggle()\"\n      @copy=\"$emit('copy')\"\n      @remove=\"$emit('remove')\"\n    />\n\n    <template v-if=\"!isCollapsed\">\n      <CourseSubstepInfoAlert :substep=\"substep\" />\n\n      <SubstepPrompt\n        :course=\"course\"\n        :substep=\"substep\"\n        :step-index=\"stepIndex\"\n        :substep-index=\"substepIndex\"\n        :can-optimize=\"substep.isOverCombinedCharacterLimit\"\n        :can-generate=\"substep.isQuestion\"\n        @update=\"$emit('update', $event)\"\n        @generate=\"$emit('generate')\"\n        @optimize=\"$emit('optimize')\"\n      />\n\n      <component\n        :is=\"SubstepComponent\"\n        :course=\"course\"\n        :substep=\"substep\"\n        :step-index=\"stepIndex\"\n        :substep-index=\"substepIndex\"\n        @update=\"$emit('update', $event)\"\n      />\n    </template>\n  </PagePanel>\n</template>\n","<script setup>\nimport DropdownWrapper from '@/components/shared/dropdown/DropdownWrapper.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport ListItemsContainer from '@/components/shared/search/ListItemsContainer.vue'\nimport ListItem from '@/components/shared/search/ListItem.vue'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {useCourseContentChecks} from '@/composables/use-course-content-checks.js'\nimport {substepTypes} from '@/constants/courses.js'\nimport {Course} from '@/models/course.model.js'\nimport {ref, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'add-substep',\n])\nconst props = defineProps({\n  model: {\n    type: Course,\n    required: true,\n  },\n})\n\n//Dropdown toggling\nconst addContentPanel = ref(null)\nconst addContentToggle = ref(null)\nconst {\n  isVisible,\n  toggle,\n  hide,\n} = useVisibilityToggle(addContentPanel, [addContentToggle])\n\n//Check what we can add\nconst {model} = toRefs(props)\nconst {\n  // canAddConfidenceLift,\n  // canAddNpsSurvey,\n  // canAddLearnerSentiment,\n  // canAddSurveyType,\n  canAddRatingQuestion,\n} = useCourseContentChecks(model)\n\n//Handler\nconst addSubstep = (type) => {\n  emit('add-substep', {type})\n  hide()\n}\n</script>\n\n<template>\n  <DropdownWrapper :class=\"$style.wrapper\">\n    <CreateButton\n      ref=\"addContentToggle\"\n      test-id=\"addQuestion\"\n      is-block\n      label=\"Add question\"\n      v-bind=\"$attrs\"\n      @click=\"toggle()\"\n    />\n    <DropdownPanel\n      v-bind=\"$attrs\"\n      ref=\"addContentPanel\"\n      :class=\"$style.dropdown\"\n      :is-visible=\"isVisible\"\n      alignment=\"center\"\n      show-above\n    >\n      <ListItemsContainer>\n        <ListItem\n          icon=\"library_add_check\"\n          label=\"Multiple choice question\"\n          @click=\"addSubstep(substepTypes.CHOICE)\"\n        />\n        <ListItem\n          icon=\"edit_note\"\n          label=\"Open-ended question\"\n          @click=\"addSubstep(substepTypes.WRITTEN_ANSWER)\"\n        />\n        <ListItem\n          v-if=\"canAddRatingQuestion\"\n          icon=\"pin\"\n          label=\"Custom rating question\"\n          @click=\"addSubstep(substepTypes.RATING)\"\n        />\n        <!-- <Divider v-if=\"canAddSurveyType\" />\n        <ListItem\n          v-if=\"canAddConfidenceLift\"\n          icon=\"rocket_launch\"\n          label=\"Confidence lift survey\"\n          @click=\"addSubstep(substepTypes.CONFIDENCE_LIFT)\"\n        />\n        <ListItem\n          v-if=\"canAddNpsSurvey\"\n          icon=\"campaign\"\n          label=\"NPS survey\"\n          @click=\"addSubstep(substepTypes.NPS_SURVEY)\"\n        />\n        <ListItem\n          v-if=\"canAddLearnerSentiment\"\n          icon=\"sentiment_calm\"\n          label=\"Learner sentiment\"\n          @click=\"addSubstep(substepTypes.LEARNER_SENTIMENT)\"\n        /> -->\n      </ListItemsContainer>\n    </DropdownPanel>\n  </DropdownWrapper>\n</template>\n\n<style module lang=\"scss\">\n.wrapper {\n  margin-top: 1rem;\n}\n.dropdown {\n  width: max-content;\n}\n</style>\n","<script setup>\nimport Alert from '@/components/shared/core/Alert.vue'\nimport {CourseStep} from '@/models/course-step.model.js'\nimport {characterLimits} from '@/constants/courses.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  step: {\n    type: CourseStep,\n    required: true,\n  },\n})\n\n//Get refs\nconst {step} = toRefs(props)\nconst passiveSubstep = computed(() => step.value.passiveSubstep)\n\n//First question that we need to check for character count can be\n//a confidence lift substep, so check for that one first if present.\nconst firstQuestion = computed(() => step.value.confidenceLiftSubstep || step.value.firstQuestion)\n\n//Recommended character limit for WhatsApp\nconst characterLimit = computed(() => {\n\n  //Initialize\n  let max = characterLimits.WHATSAPP_MESSAGE\n\n  //Check if we need to adjust for question type\n  if (firstQuestion.value) {\n    if (firstQuestion.value.isMultipleChoice) {\n      max -= (8 + firstQuestion.value.numAnswers * 4)\n    }\n    else if (firstQuestion.value.isRatingType) {\n      max -= 40\n    }\n    else {\n      max -= 20\n    }\n  }\n\n  //Round down to nearest number ending in 0\n  return Math.floor(max / 10) * 10\n})\n\n//Check if we should show the warning\nconst showWarning = computed (() => (\n  (\n    (passiveSubstep.value?.combinedCharacterCount || 0) +\n    (firstQuestion.value?.combinedCharacterCount || 0)\n  ) > characterLimit.value\n)\n)\n</script>\n\n<template>\n  <Alert\n    v-if=\"showWarning\"\n    :text=\"`If you plan to deliver this course over WhatsApp, we recommend you keep the ${firstQuestion ? 'lesson body and first question\\'s prompt combined' : 'message'} length under ${characterLimit} characters so that images send properly.`\"\n    type=\"warning\"\n  />\n</template>\n","<script setup>\nimport {VueDraggable} from 'vue-draggable-plus'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport CourseStepHeader from '@/components/courses/editor/CourseStepHeader.vue'\nimport CourseSubstepBlock from '@/components/courses/editor/CourseSubstepBlock.vue'\nimport AddQuestionSelector from '@/components/courses/editor/AddQuestionSelector.vue'\nimport WhatsappAlert from '@/components/courses/editor/WhatsappAlert.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport MediaInput from '@/components/shared/form/MediaInput.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport MediaUrlPreviewCard from '@/components/shared/file/MediaUrlPreviewCard.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport OptimizeButton from '@/components/shared/buttons/OptimizeButton.vue'\nimport Dropzone from '@/components/shared/core/Dropzone.vue'\nimport SelectThumbnailModal from '@/components/shared/video/SelectThumbnailModal.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseStep} from '@/models/course-step.model.js'\nimport {characterLimits} from '@/constants/courses.js'\nimport {imageFileTypes, videoFileTypes} from '@/constants/file-types.js'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\nimport {useCollapsible} from '@/composables/use-collapsible.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVideoUrlMetadata} from '@/composables/use-video-url-metadata.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useVideoUrlValidation} from '@/composables/use-video-url-validation.js'\nimport {validateFileSizeByType, validateVideoFileDuration} from '@/helpers/file.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useElementVisibility} from '@vueuse/core'\nimport {toRefs, ref, computed, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'copy-step',\n  'update-step',\n  'remove-step',\n  'add-substep',\n  'copy-substep',\n  'move-substep',\n  'update-substep',\n  'remove-substep',\n  'optimize-substep',\n  'generate-substep',\n  'visibility-changed',\n  'is-uploading-media',\n  'start-dragging-questions',\n  'stop-dragging-questions',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  model: {\n    type: Course,\n    required: true,\n  },\n  step: {\n    type: CourseStep,\n    required: true,\n  },\n  stepIndex: {\n    type: Number,\n    default: -1,\n  },\n  canRemove: {\n    type: Boolean,\n    default: false,\n  },\n  isDraggingQuestions: {\n    type: Boolean,\n    default: false,\n  },\n  isActionable: {\n    type: Boolean,\n    default: true,\n  },\n  isDraggable: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Get refs\nconst {course, step} = toRefs(props)\nconst passiveSubstep = computed(() => step.value.passiveSubstep)\nconst surveySubsteps = computed(() =>\n  step.value.surveySubsteps.filter(substep => !substep.isBaselineConfidenceLift)\n)\n\n//General composables\n//NOTE: Per product requirements, no longer collapsing headers for lessons\n//for now, but keeping the logic in place for future use. Simply remove\n//false from the line below, and :can-collapse=\"false\" from the template\n//to re-enable collapsing.\nconst {isCollapsed, toggle, expand} = useCollapsible(false)\nconst {scrollIntoView} = useScrollIntoView()\n\n//Custom file size validation for media input\nconst validateFileSize = async file => {\n  validateFileSizeByType(file, '5MB', imageFileTypes)\n  validateFileSizeByType(file, '500MB', videoFileTypes)\n  await validateVideoFileDuration(file, 900)\n}\n\n//Handlers\nconst updateStep = data => emit('update-step', {data})\nconst updateSubstep = (substep, data) => emit('update-substep', {substep, data})\nconst addSubstep = type => {\n  emit('add-substep', {type})\n  setTimeout(() => focusOnLastQuestion(), 50)\n}\nconst copySubstep = substep => {\n  emit('copy-substep', {substep})\n  setTimeout(() => focusOnLastQuestion(), 50)\n}\n\n//Draggable model requires a setter\nconst draggableSubsteps = computed({\n  get: () => step.value.questions,\n  set: questions => {\n    //Need to append other non-question substeps here as well, otherwise they get lost.\n    //The correct order will be determined by the sanitizeSteps helper before saving.\n    //NOTE: Have to check for non-question substeps, as someone could be dragging a\n    //question into another step, which would cause it to be duplicated.\n    const otherSubsteps = step.value.substeps.filter(substep => !substep.isQuestion)\n    const substeps = [...otherSubsteps, ...questions]\n    updateStep({substeps})\n  },\n})\n\n//Substep drag and drop handling to allow dropping on outline\nconst startDragSubstep = (substep, event) => {\n  event.dataTransfer.dropEffect = 'move'\n  event.dataTransfer.effectAllowed = 'move'\n  event.dataTransfer.setData('substepId', substep.id)\n}\n\n//Drop handler for lessons without questions (this is not captured by VueDraggable)\nconst onDrop = event => {\n\n  //Get substep ID from event\n  const substepId = event.dataTransfer.getData('substepId')\n  if (!substepId) {\n    return\n  }\n\n  //Find the substep\n  const substep = course.value.lessons\n    .flatMap(lesson => lesson.substeps)\n    .find(substep => substep.id === substepId)\n\n  //Not found/invalid\n  if (!substep) {\n    return\n  }\n\n  //Emit\n  emit('move-substep', {substep})\n}\n\n//Block refs\nconst stepBlock = ref(null)\nconst substepBlocks = ref([])\nconst surveySubstepBlocks = ref([])\nconst baselineConfidenceBlock = ref(null)\nconst mediaOptions = ref([\n  {label: 'Upload content', value: true},\n  {label: 'Link to an external video or gif', value: false},\n])\nconst isMediaUpload = ref(!step.value.videoUrl?.length)\n\n//Check if block is visible\nconst isVisible = useElementVisibility(stepBlock)\n\n//Focus on current step block\nconst focus = () => {\n  expand()\n  setTimeout(() => scrollIntoView(stepBlock), 50)\n}\n\n//Focus on substep\nconst focusOnSubstep = substep => {\n  expand()\n  setTimeout(() => {\n    if (!substep) {\n      return\n    }\n    else if (substep.isSurvey) {\n      if (substep.isBaselineConfidenceLift) {\n        baselineConfidenceBlock.value?.focus()\n        return\n      }\n      const i = step.value.surveySubsteps.findIndex(s => s === substep)\n      surveySubstepBlocks.value[i]?.focus()\n    }\n    else {\n      const i = step.value.questions.findIndex(s => s.id === substep.id)\n      substepBlocks.value[i]?.focus()\n    }\n  }, 50)\n}\n\n//Focus on last question\nconst focusOnLastQuestion = () => {\n  expand()\n  setTimeout(() => {\n    const i = step.value.questions.length - 1\n    substepBlocks.value[i]?.focus()\n  }, 50)\n}\n\n//Expose to parent\ndefineExpose({\n  expand,\n  focus,\n  focusOnSubstep,\n  isVisible,\n})\n\n//Video URL metadata handling\nconst {\n  fetchVideoUrlMetadata,\n  hasError: hasVideoUrlError,\n  reset: clearVideoUrlError,\n  isLoading: isLoadingUrlMetadata,\n} = useVideoUrlMetadata()\n\n//Validation\nconst {isValidVideoUrl} = useVideoUrlValidation()\nconst {required, characterCount, combinedCharacterCount} = useValidators()\nconst rules = computed(() => {\n  return {\n    step: {\n      name: {\n        required: required('Lesson name'),\n        characterCount: characterCount(step.value.name, characterLimits.STEP_NAME),\n      },\n      videoUrl: {\n        valid: isValidVideoUrl(hasVideoUrlError),\n      },\n    },\n    passiveSubstep: {\n      body: {\n        required: required('Body'),\n        characterCount: combinedCharacterCount(passiveSubstep),\n      },\n    },\n  }\n})\nconst $v = useVuelidate(rules, {step, passiveSubstep})\n\n//Mark dirty if step has any content\nif (step.value.hasContent) {\n  $v.value.$touch()\n}\n\n//Extract video metadata\nconst extractMetadata = async event => {\n\n  //Clear error and metadata\n  clearVideoUrlError()\n  clearVideoMetadata()\n\n  //Update the step\n  updateStep({videoUrl: event.value})\n\n  //Check if valid\n  const {videoUrl} = step.value\n  if ($v.value.step.videoUrl.$error || !videoUrl) {\n    return\n  }\n\n  //Extract metadata\n  try {\n    const data = await fetchVideoUrlMetadata(videoUrl)\n    updateStep({\n      videoUrlTitle: data.title,\n      videoUrlDescription: data.description,\n      imageKey: data.image,\n      videoUrlDomain: data.domain,\n    })\n  }\n  catch {\n    //Handled by useVideoUrlMetadata\n  }\n}\n\n//Clear metadata\nconst clearVideoMetadata = () => {\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n  })\n}\n\n//Toggle media upload type\nconst toggleMediaUploadType = (event) => {\n  isMediaUpload.value = event.value\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n    videoKey: '',\n    thumbnailTime: 0,\n  })\n}\n\n//Thumbnail modal state\nconst {\n  isValue: isShowingThumbnailModal,\n  setTrue: showThumbnailModal,\n  setFalse: hideThumbnailModal,\n} = useValueToggle()\n\n//Save thumbnail\nconst saveThumbnail = async (event) => {\n  updateStep(event)\n  hideThumbnailModal()\n}\n\n//Extract video metadata on mount\nonMounted(async () => {\n  if (step.value.videoUrl && !step.value.hasVideoUrlMetadata) {\n    await extractMetadata({value: step.value.videoUrl})\n    $v.value.step.videoUrl.$touch()\n  }\n})\n</script>\n\n<template>\n  <PageBlock\n    ref=\"stepBlock\"\n    is-compact\n    :is-collapsed=\"isCollapsed && false\"\n  >\n    <template #header>\n      <CourseStepHeader\n        :step=\"step\"\n        :step-index=\"stepIndex\"\n        :is-collapsed=\"isCollapsed\"\n        :is-actionable=\"isActionable\"\n        :can-remove=\"canRemove\"\n        :can-collapse=\"false\"\n        @copy=\"$emit('copy-step')\"\n        @remove=\"$emit('remove-step')\"\n        @toggle=\"toggle()\"\n      />\n    </template>\n\n    <template v-if=\"!isCollapsed\">\n      <FormField\n        is-required\n        label=\"Lesson name\"\n        :errors=\"$v.step.name.$errors\"\n      >\n        <TextInput\n          :value=\"step.name\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :has-error=\"$v.step.name.$error\"\n          :character-limit=\"characterLimits.STEP_NAME\"\n          :test-id=\"`lessonName_${stepIndex + 1}`\"\n          @input=\"updateStep({name: $event.value})\"\n          @dirty=\"$v.step.name.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Lesson media\"\n        :message=\"\n          !isMediaUpload\n            ? 'Important recommendations: The only supported external sources are YouTube, Vimeo, Loom, and Giphy links. To ensure the best experience for learners, double-check that your link is set to public sharing, as private links may display only a logo instead of the video preview. Note that for SMS delivery, videos best preview when sent from a saved contact.'\n            : ''\n        \"\n      >\n        <FlexColumn>\n          <RadioButtonList\n            name=\"imageOrLink\"\n            :value=\"isMediaUpload\"\n            is-inline\n            :options=\"mediaOptions\"\n            @input=\"toggleMediaUploadType($event)\"\n          />\n          <FormField\n            v-if=\"isMediaUpload\"\n            :message=\"\n              step.videoKey\n                ? 'Video recommendations: Keep your videos under 5 minutes for the best learning experience. Videos will appear as clickable previews above the lesson, accessible to all viewers. Note that for SMS delivery, videos best preview when sent from a saved contact.'\n                : ''\n            \"\n          >\n            <MediaInput\n              :image-key=\"step.imageKey\"\n              :video-key=\"step.videoKey\"\n              custom-details-text=\"Max file size is 5MB for images and 500MB or 15 minutes for videos\"\n              :custom-file-validator=\"validateFileSize\"\n              restricted-height\n              @input=\"updateStep($event)\"\n              @is-uploading=\"$emit('is-uploading-media', $event)\"\n            >\n              <template\n                v-if=\"step.videoKey\"\n                #underCard=\"{ isLoading }\"\n              >\n                <FormField label=\"Video title\">\n                  <template #aside>\n                    <ActionButton\n                      :is-disabled=\"isLoading\"\n                      type=\"text\"\n                      is-icon-outlined\n                      icon=\"add_photo_alternate\"\n                      label=\"Select thumbnail\"\n                      @click=\"showThumbnailModal()\"\n                    />\n                  </template>\n                  <TextInput\n                    :value=\"step.videoTitle\"\n                    :ignore-character-limit=\"course.ignoreValidations\"\n                    :character-limit=\"characterLimits.STEP_TITLE\"\n                    @input=\"updateStep({videoTitle: $event.value})\"\n                  />\n                </FormField>\n              </template>\n            </MediaInput>\n          </FormField>\n          <template v-else>\n            <MediaUrlPreviewCard\n              v-if=\"step.hasVideoUrlMetadata\"\n              :image-src=\"step.imageKey\"\n              :title=\"step.videoUrlTitle\"\n              :description=\"step.videoUrlDescription\"\n              :domain=\"step.videoUrlDomain\"\n              :url=\"step.videoUrl\"\n            />\n            <FormField :errors=\"$v.step.videoUrl.$errors\">\n              <TextInput\n                :value=\"step.videoUrl\"\n                :debounce=\"500\"\n                :is-disabled=\"isLoadingUrlMetadata\"\n                :has-spinner=\"isLoadingUrlMetadata\"\n                :has-error=\"$v.step.videoUrl.$error\"\n                @input=\"extractMetadata($event)\"\n                @dirty=\"$v.step.videoUrl.$touch()\"\n              />\n            </FormField>\n          </template>\n        </FlexColumn>\n      </FormField>\n\n      <FormField\n        v-if=\"step.passiveSubstep\"\n        is-required\n        label=\"Body\"\n        :errors=\"$v.passiveSubstep.body.$errors\"\n      >\n        <TextInput\n          :value=\"step.passiveSubstep.body\"\n          :ignore-character-limit=\"course.ignoreValidations\"\n          :character-limit=\"step.passiveSubstep.combinedCaracterLimit\"\n          :manual-character-count=\"step.passiveSubstep.combinedCharacterCount\"\n          :has-error=\"$v.passiveSubstep.body.$error\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          :test-id=\"`lessonBody_${stepIndex + 1}`\"\n          @input=\"updateSubstep(step.passiveSubstep, {body: $event.value})\"\n          @dirty=\"$v.passiveSubstep.body.$touch()\"\n        />\n\n        <template\n          v-if=\"$v.passiveSubstep.body.characterCount.$invalid\"\n          #aside\n        >\n          <OptimizeButton\n            label=\"Optimize length\"\n            @click=\"$emit('optimize-substep', {substep: step.passiveSubstep})\"\n          />\n        </template>\n      </FormField>\n\n      <WhatsappAlert :step=\"step\" />\n\n      <FormField label=\"Questions\" />\n\n      <FlexColumn v-if=\"step.hasBaselineConfidenceLift\">\n        <CourseSubstepBlock\n          ref=\"baselineConfidenceBlock\"\n          :course=\"course\"\n          :model=\"model\"\n          :substep=\"step.confidenceLiftSubstep\"\n          :is-actionable=\"isActionable\"\n          can-remove\n          @update=\"updateSubstep(step.confidenceLiftSubstep, $event)\"\n          @remove=\"$emit('remove-substep', {substep: step.confidenceLiftSubstep})\"\n          @optimize=\"$emit('optimize-substep', {substep: step.confidenceLiftSubstep})\"\n        />\n      </FlexColumn>\n\n      <VueDraggable\n        v-if=\"isDraggingQuestions && !step.hasQuestions\"\n        group=\"substeps\"\n      >\n        <Dropzone\n          ondragenter=\"this.classList.toggle('dragTarget')\"\n          ondragleave=\"this.classList.toggle('dragTarget')\"\n          @drop=\"onDrop($event)\"\n        >\n          <strong>Drop question here to move it to this lesson</strong>\n        </Dropzone>\n      </VueDraggable>\n\n      <VueDraggable\n        v-model=\"draggableSubsteps\"\n        handle=\".drag-handle\"\n        group=\"substeps\"\n        :clone=\"substep => substep.clone()\"\n        :animation=\"250\"\n        flex-column-container\n        @start=\"$emit('start-dragging-questions')\"\n        @end=\"$emit('stop-dragging-questions')\"\n      >\n        <CourseSubstepBlock\n          v-for=\"(substep, i) in step.questions\"\n          ref=\"substepBlocks\"\n          :key=\"i\"\n          :course=\"course\"\n          :model=\"model\"\n          :step-index=\"stepIndex\"\n          :substep-index=\"i\"\n          :substep=\"substep\"\n          :is-draggable=\"isDraggable\"\n          :is-actionable=\"isActionable\"\n          can-copy\n          can-remove\n          @copy=\"copySubstep(substep)\"\n          @update=\"updateSubstep(substep, $event)\"\n          @dragstart=\"startDragSubstep(substep, $event)\"\n          @remove=\"$emit('remove-substep', {substep})\"\n          @optimize=\"$emit('optimize-substep', {substep})\"\n          @generate=\"$emit('generate-substep', {substep})\"\n        />\n      </VueDraggable>\n\n      <FlexColumn>\n        <CourseSubstepBlock\n          v-for=\"(substep, j) in surveySubsteps\"\n          :key=\"j\"\n          ref=\"surveySubstepBlocks\"\n          :course=\"course\"\n          :model=\"model\"\n          :substep=\"substep\"\n          :is-actionable=\"isActionable\"\n          can-remove\n          @update=\"updateSubstep(substep, $event)\"\n          @remove=\"$emit('remove-substep', {substep})\"\n          @optimize=\"$emit('optimize-substep', {substep})\"\n        />\n      </FlexColumn>\n\n      <AddQuestionSelector\n        v-if=\"isActionable\"\n        :model=\"model\"\n        @add-substep=\"addSubstep($event.type)\"\n      />\n    </template>\n\n    <SelectThumbnailModal\n      :is-open=\"isShowingThumbnailModal\"\n      :video-key=\"step.videoKey\"\n      :image-key=\"step.imageKey\"\n      :thumbnail-time=\"step.thumbnailTime\"\n      @close=\"hideThumbnailModal()\"\n      @save=\"saveThumbnail($event)\"\n    />\n  </PageBlock>\n</template>\n\n<style module lang=\"scss\">\n.container {\n  display: flex;\n  flex-direction: column;\n  gap: 1.5rem;\n  width: 100%;\n  border-radius: var(--border-radius-m);\n  border: 1px solid var(--color-borders-light);\n  padding: 1rem;\n  background-color: var(--color-white);\n}\n</style>\n\n<style>\n/* Not ideal to have to use native events and global styles, but there is currently\n no practical way to apply a hover effect on an element when dragging something over it */\n.dragTarget {\n  background: #f9fafa;\n}\n</style>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport {toUpperCaseFirst} from '@/helpers/string.js'\nimport {useAlphabet} from '@/composables/use-alphabet.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'retry',\n  'append',\n  'replace',\n])\nconst props = defineProps({\n  substep: {\n    type: CourseSubstep,\n    default: null,\n  },\n  modifiedSubstep: {\n    type: CourseSubstep,\n    default: null,\n  },\n  language: {\n    type: String,\n    default: 'en',\n  },\n  progress: {\n    type: Number,\n    default: 0,\n  },\n  isInProgress: {\n    type: Boolean,\n    default: false,\n  },\n  hasError: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Letter helper\nconst {language} = toRefs(props)\nconst {getAlphabetLetterForIndex} = useAlphabet(language.value)\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    close-on-key\n    :class=\"{\n      [$style.modal]: true,\n      [$style.withContent]: modifiedSubstep,\n    }\"\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <slot name=\"alerts\" />\n\n    <template v-if=\"isInProgress\">\n      <ProgressBar\n        :progress=\"progress\"\n        show-label\n      />\n      <p>\n        <slot name=\"progressText\" />\n      </p>\n    </template>\n\n    <template v-else-if=\"modifiedSubstep\">\n      <FormField :label=\"toUpperCaseFirst(substep.plainDisplayName)\">\n        <TextInput\n          test-id=\"modifiedSubstepBody\"\n          :value=\"modifiedSubstep.body\"\n          is-multiline\n          is-readonly\n          no-max-height\n        />\n      </FormField>\n\n      <template v-if=\"substep.isAiEvaluated\">\n        <FormField label=\"Example of a correct answer\">\n          <TextInput\n            test-id=\"modifiedSubstepAiEvaluatedExampleAnswer\"\n            :value=\"modifiedSubstep.aiEvaluatedExampleAnswer\"\n            is-multiline\n            is-readonly\n            no-max-height\n          />\n        </FormField>\n        <FormField label=\"Response to learners who answer correctly\">\n          <TextInput\n            test-id=\"modifiedSubstepAiEvaluatedSuccessResponse\"\n            :value=\"modifiedSubstep.successResponse\"\n            is-multiline\n            is-readonly\n            no-max-height\n          />\n        </FormField>\n        <FormField label=\"Response to learners who answer incorrectly\">\n          <TextInput\n            test-id=\"modifiedSubstepAiEvaluatedFailureResponse\"\n            :value=\"modifiedSubstep.failureResponse\"\n            is-multiline\n            is-readonly\n            no-max-height\n          />\n        </FormField>\n      </template>\n\n      <template v-else-if=\"substep.isMultipleChoice\">\n        <div\n          v-for=\"(answer, index) in modifiedSubstep.answers\"\n          :key=\"index\"\n          :class=\"$style.answer\"\n        >\n          <FormField :label=\"`(${getAlphabetLetterForIndex(index)})`\">\n            <TextInput\n              :test-id=\"`modifiedSubstepAnswerChoice_${index}`\"\n              :value=\"answer.choice\"\n              is-multiline\n              is-readonly\n              no-max-height\n            />\n          </FormField>\n          <FormField\n            v-if=\"!substep.isMultiSelect\"\n            label=\"Response to learner\"\n          >\n            <TextInput\n              :test-id=\"`modifiedSubstepAnswerResponse_${index}`\"\n              :value=\"answer.response\"\n              is-multiline\n              is-readonly\n              no-max-height\n            />\n          </FormField>\n        </div>\n\n        <template v-if=\"substep.isMultiSelect\">\n          <FormField label=\"Response to learners who answer with all options correctly\">\n            <TextInput\n              test-id=\"modifiedSubstepSuccessResponse\"\n              :value=\"modifiedSubstep.successResponse\"\n              is-multiline\n              is-readonly\n              no-max-height\n            />\n          </FormField>\n          <FormField label=\"Response to learners who answer partially or fully incorrectly\">\n            <TextInput\n              :test-id=\"`modifiedSubstepFailureResponse`\"\n              :value=\"modifiedSubstep.failureResponse\"\n              is-multiline\n              is-readonly\n              no-max-height\n            />\n          </FormField>\n        </template>\n      </template>\n\n      <FormField\n        v-else-if=\"!substep.isPassive\"\n        label=\"Response to learner\"\n      >\n        <TextInput\n          test-id=\"modifiedSubstepResponse\"\n          :value=\"modifiedSubstep.response\"\n          is-multiline\n          is-readonly\n          no-max-height\n        />\n      </FormField>\n    </template>\n\n    <template #footer>\n      <ButtonBar v-if=\"modifiedSubstep\">\n        <template #left>\n          <ActionButton\n            type=\"secondary\"\n            label=\"Cancel\"\n            @click=\"$emit('close')\"\n          />\n        </template>\n        <template #right>\n          <ActionButton\n            type=\"secondary\"\n            is-icon-outlined\n            label=\"Paste below existing content\"\n            @click=\"$emit('append')\"\n          />\n          <ActionButton\n            type=\"primary\"\n            is-icon-outlined\n            label=\"Replace existing content\"\n            @click=\"$emit('replace')\"\n          />\n        </template>\n      </ButtonBar>\n      <ButtonBar v-else>\n        <template #right>\n          <ActionButton\n            type=\"secondary\"\n            label=\"Cancel\"\n            @click=\"$emit('close')\"\n          />\n          <ActionButton\n            v-if=\"hasError\"\n            type=\"primary\"\n            label=\"Retry\"\n            @click=\"$emit('retry')\"\n          />\n        </template>\n      </ButtonBar>\n    </template>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.modal {\n  &.withContent {\n    width: fit-content;\n    min-width: 600px;\n    max-width: 960px;\n  }\n}\n.answer {\n  margin-top: 1rem;\n}\n</style>\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Course substep optimization composable\n */\nexport function useCourseSubstepOptimization(substep) {\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Task result and status composables\n  const task = ref(null)\n  const {\n    progress,\n    startProgress,\n    resetProgress,\n    startCheckingStatus,\n    stopCheckingStatus,\n    getResultPromise,\n  } = useAiTaskStatus(task, {\n    interval: 2500,\n    targetDuration: 30 * 1000,\n    autoStartChecking: false,\n  })\n\n  //Refs\n  const optimizedSubstep = ref(null)\n  const isOptimizing = ref(true)\n  const hasError = ref(false)\n\n  //Reset\n  const reset = () => {\n\n    //Reset progress and stop checking status\n    resetProgress()\n    startProgress()\n    stopCheckingStatus()\n\n    //Reset flags and refs\n    task.value = null\n    isOptimizing.value = false\n    hasError.value = false\n    optimizedSubstep.value = null\n  }\n\n  //Optimize substep\n  const optimizeSubstep = async () => {\n    try {\n\n      //Reset\n      reset()\n\n      //Run task\n      isOptimizing.value = true\n      task.value = await llmServicesApi.optimizeSubstep(substep.value.id)\n\n      //Start checking status now\n      startCheckingStatus()\n\n      //Wait for result and create substep from result\n      const result = await getResultPromise()\n\n      //Set after a timeout, to allow progress bar to visibly reach 100%\n      setTimeout(() => {\n        isOptimizing.value = false\n        optimizedSubstep.value = CourseSubstep.createFrom(result)\n      }, 750)\n    }\n    catch (error) {\n\n      //If we reset the optimization already, just ignore the timeout error\n      if (!isOptimizing.value) {\n        return\n      }\n\n      //Process error\n      setFlashFailure('Failed to optimize, please try again')\n      processError(error)\n      hasError.value = true\n      isOptimizing.value = false\n      throw error\n    }\n  }\n\n  //Expose interface\n  return {\n    optimizeSubstep,\n    optimizedSubstep,\n    isOptimizing,\n    hasError,\n    progress,\n    reset,\n  }\n}\n","<script setup>\nimport ModifySubstepBaseModal from '@/components/courses/modals/ModifySubstepBaseModal.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport {useCourseSubstepOptimization} from '@/composables/use-course-substep-optimization.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'append',\n  'replace',\n])\nconst props = defineProps({\n  substep: {\n    type: CourseSubstep,\n    default: null,\n  },\n})\n\n//Get props\nconst {substep} = toRefs(props)\nconst name = computed(() => substep.value?.plainDisplayName)\n\n//Optimize logic\nconst {\n  optimizeSubstep,\n  optimizedSubstep,\n  isOptimizing,\n  hasError,\n  progress,\n  reset,\n} = useCourseSubstepOptimization(substep)\n\n//Helper to optimize\nconst optimize = async () => {\n  try {\n    await optimizeSubstep()\n  }\n  catch {\n    //Handled by useCourseSubstepOptimization\n  }\n}\n\n//Replace\nconst replace = () => {\n  emit('replace', {modifiedSubstep: optimizedSubstep.value})\n  cancel()\n}\n\n//Append\nconst append = () => {\n  emit('append', {modifiedSubstep: optimizedSubstep.value})\n  cancel()\n}\n\n//Cancel/discard\nconst cancel = () => {\n  reset()\n  emit('close')\n}\n</script>\n\n<template>\n  <ModifySubstepBaseModal\n    v-bind=\"$attrs\"\n    :header=\"`Optimize ${name} length`\"\n    :substep=\"substep\"\n    :modified-substep=\"optimizedSubstep\"\n    :progress=\"progress\"\n    :is-in-progress=\"isOptimizing\"\n    :has-error=\"hasError\"\n    @close=\"cancel()\"\n    @open=\"optimize()\"\n    @retry=\"optimize()\"\n    @append=\"append()\"\n    @replace=\"replace()\"\n  >\n    <template #alerts>\n      <Alert\n        v-if=\"hasError\"\n        type=\"danger\"\n        :text=\"`An error occurred while optimizing the ${name} length. Please try again or contact the support team if the problem persists.`\"\n      />\n      <Alert\n        v-if=\"optimizedSubstep\"\n        :text=\"`The ${name} length has been optimized and you can review the new content below. You can replace the existing ${name} with the new content, or paste the new content below the existing content to then edit it further manually.`\"\n      />\n    </template>\n\n    <template\n      v-if=\"substep\"\n      #progressText\n    >\n      Please wait as the {{ name }} length is being optimized. This can take up to a minute.\n    </template>\n  </ModifySubstepBaseModal>\n</template>\n","import {llmServicesApi} from '@/api/llm-services.api.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {useAiTaskStatus} from '@/composables/use-ai-task-status.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Course substep generation composable\n */\nexport function useCourseSubstepGeneration(substep) {\n\n  //Composables\n  const {setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Task result and status composables\n  const task = ref(null)\n  const {\n    progress,\n    startProgress,\n    resetProgress,\n    startCheckingStatus,\n    stopCheckingStatus,\n    getResultPromise,\n  } = useAiTaskStatus(task, {\n    interval: 2500,\n    targetDuration: 30 * 1000,\n    autoStartChecking: false,\n  })\n\n  //Refs\n  const generatedSubstep = ref(null)\n  const isGenerating = ref(true)\n  const hasError = ref(false)\n\n  //Reset\n  const reset = () => {\n\n    //Reset progress and stop checking status\n    resetProgress()\n    startProgress()\n    stopCheckingStatus()\n\n    //Reset flags and refs\n    task.value = null\n    isGenerating.value = false\n    hasError.value = false\n    generatedSubstep.value = null\n  }\n\n  //Optimize substep\n  const generateSubstep = async () => {\n    try {\n\n      //Reset\n      reset()\n\n      //Run task\n      isGenerating.value = true\n      const {id, substepType} = substep.value\n      task.value = await llmServicesApi.regenerateSubstep(id, substepType)\n\n      //Start checking status now\n      startCheckingStatus()\n\n      //Wait for result and create substep from result\n      const result = await getResultPromise()\n\n      //Set after a timeout, to allow progress bar to visibly reach 100%\n      setTimeout(() => {\n        isGenerating.value = false\n        generatedSubstep.value = CourseSubstep.createFrom(result)\n      }, 750)\n    }\n    catch (error) {\n\n      //If we reset the generation already, just ignore the timeout error\n      if (!isGenerating.value) {\n        return\n      }\n\n      //Process error\n      setFlashFailure('Failed to regenerate, please try again')\n      processError(error)\n      hasError.value = true\n      isGenerating.value = false\n      throw error\n    }\n  }\n\n  //Expose interface\n  return {\n    generateSubstep,\n    generatedSubstep,\n    isGenerating,\n    hasError,\n    progress,\n    reset,\n  }\n}\n","<script setup>\nimport ModifySubstepBaseModal from '@/components/courses/modals/ModifySubstepBaseModal.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport {useCourseSubstepGeneration} from '@/composables/use-course-substep-generation.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'append',\n  'replace',\n])\nconst props = defineProps({\n  substep: {\n    type: CourseSubstep,\n    default: null,\n  },\n})\n\n//Get props\nconst {substep} = toRefs(props)\nconst name = computed(() => substep.value?.plainDisplayName)\n\n//Generate logic\nconst {\n  generateSubstep,\n  generatedSubstep,\n  isGenerating,\n  hasError,\n  progress,\n  reset,\n} = useCourseSubstepGeneration(substep)\n\n//Helper to generate\nconst generate = async () => {\n  try {\n    await generateSubstep()\n  }\n  catch {\n    //Handled by useCourseSubstepGeneration\n  }\n}\n\n//Replace\nconst replace = () => {\n  emit('replace', {modifiedSubstep: generatedSubstep.value})\n  cancel()\n}\n\n//Append\nconst append = () => {\n  emit('append', {modifiedSubstep: generatedSubstep.value})\n  cancel()\n}\n\n//Cancel/discard\nconst cancel = () => {\n  reset()\n  emit('close')\n}\n</script>\n\n<template>\n  <ModifySubstepBaseModal\n    v-bind=\"$attrs\"\n    :header=\"`Regenerate ${name}`\"\n    :substep=\"substep\"\n    :modified-substep=\"generatedSubstep\"\n    :progress=\"progress\"\n    :is-in-progress=\"isGenerating\"\n    :has-error=\"hasError\"\n    @close=\"cancel()\"\n    @open=\"generate()\"\n    @retry=\"generate()\"\n    @append=\"append()\"\n    @replace=\"replace()\"\n  >\n    <template #alerts>\n      <Alert\n        v-if=\"hasError\"\n        type=\"danger\"\n        :text=\"`An error occurred while regenerating the ${name}. Please try again or contact the support team if the problem persists.`\"\n      />\n      <Alert\n        v-if=\"generatedSubstep\"\n        :text=\"`The ${name} has been regenerated and you can review the new content below. You can replace the existing ${name} with the new content, or paste the new content below the existing content to then edit it further manually.`\"\n      />\n    </template>\n\n    <template #progressText>\n      Please wait as the {{ name }} is being regenerated. This can take up to a minute.\n    </template>\n  </ModifySubstepBaseModal>\n</template>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {openUrl} from '@/helpers/url.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'learn-more',\n])\nconst props = defineProps({\n  body: {\n    type: String,\n    default: '',\n  },\n  link: {\n    type: String,\n    required: true,\n  },\n})\n\n//Refs\nconst {link} = toRefs(props)\n\n//Handle learn more\nconst openLink = () => openUrl(link.value, null, true)\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <template #icon>\n      <Icon\n        icon=\"school\"\n        is-outlined\n        color=\"primary\"\n        size=\"l\"\n      />\n    </template>\n    <slot>\n      <p>{{ body }}</p>\n    </slot>\n    <template #footer>\n      <ButtonBar>\n        <template #right>\n          <ActionButton\n            type=\"secondary\"\n            label=\"Close\"\n            @click=\"$emit('close')\"\n          />\n          <ActionButton\n            type=\"primary\"\n            label=\"Learn more\"\n            @click=\"openLink()\"\n          />\n        </template>\n      </ButtonBar>\n    </template>\n  </Modal>\n</template>\n","\n/**\n * Translation types\n */\nexport const translationTypes = {\n  COURSE_BUILDER: 'course_builder',\n}\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Translations API service\n */\nexport class TranslationsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/translations'\n\n  /**\n   * Get translations by type\n   */\n  getByType(locale, type) {\n    if (!locale || !type) {\n      throw new Error(`Must provide locale and type`)\n    }\n    return this\n      .get(`/${locale}/${type}`)\n      .then(data => data.translations)\n  }\n\n  getByKey(locale, key) {\n    if (!locale || !key) {\n      throw new Error(`Must provide locale and key`)\n    }\n    return this\n      .get(`/${locale}/key`, {key})\n      .then(data => data.translation)\n  }\n}\n\n//Export singleton instance\nexport const translationsApi = new TranslationsApi()\n","import {translationsApi} from '@/api/translations.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {watch, ref, unref, computed} from 'vue'\n\n//Translations cache\nconst cache = new Map()\n\n/**\n * Translations composable (cached)\n */\nexport function useTranslations(locale, type) {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Unref type\n  type = unref(type)\n\n  //Translations ref\n  const translations = ref({})\n  const cacheKey = computed(() => `${locale.value}.${type}`)\n\n  //Watch locale\n  watch(locale, async () => {\n\n    //Check if something in cache\n    if (cache.has(cacheKey.value)) {\n      translations.value = cache.get(cacheKey.value)\n      return\n    }\n\n    //Initialize cache so that we don't make multiple requests\n    cache.set(cacheKey.value, {})\n\n    //Get translations\n    try {\n      translations.value = await translationsApi.getByType(locale.value, type)\n      cache.set(cacheKey.value, translations.value)\n    }\n    catch (error) {\n      translations.value = {}\n      processError(error)\n    }\n  }, {immediate: true})\n\n  //Expose interface\n  return {\n    translations,\n    t: translations,\n  }\n}\n","import {ref} from 'vue'\n\n/**\n * Item to remove helper tracking composable\n */\nexport function useItemToRemove() {\n\n  //Item to remove\n  const itemToRemove = ref(null)\n  const contextForItemToRemove = ref(null)\n\n  //Set or clear lesson to remove to remove\n  const setItemToRemove = (item, context = null) => {\n    itemToRemove.value = item\n    contextForItemToRemove.value = context\n  }\n  const clearItemToRemove = () => {\n    itemToRemove.value = null\n    contextForItemToRemove.value = null\n  }\n\n  //Expose interface\n  return {\n    itemToRemove,\n    contextForItemToRemove,\n    setItemToRemove,\n    clearItemToRemove,\n  }\n}\n","import {CourseStep} from '@/models/course-step.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {insertAfter} from '@/helpers/array.js'\nimport {unref} from 'vue'\n\n/**\n * Course step management composable\n */\nexport function useCourseStepManagement() {\n\n  //Create/update/copy/trash steps\n  const createStep = data => CourseStep.createFrom({isNew: true, ...data})\n  const updateStep = (step, data) => Object.assign(step, data)\n  const copyStep = (step, data) => step.copy(data)\n  const trashStep = step => step.markTrashed()\n\n  //Create/update/clone/trash substeps\n  const createSubstep = data => CourseSubstep.createFrom({isNew: true, ...data})\n  const updateSubstep = (substep, data) => Object.assign(substep, data)\n  const copySubstep = substep => substep.copy()\n  const trashSubstep = substep => substep.markTrashed()\n\n  //Append a substep to a step\n  const appendSubstepToStep = (step, substep) => {\n\n    //Can only add activation substeps to activation step\n    if (step.isActivation && !substep.isActivation) {\n      throw new Error(`Tried to add a non-activation substep to activation step`)\n    }\n\n    //Don't add survey or activation substeps if they already exist\n    if (substep.isSurvey || substep.isActivation) {\n      const exists = step.substeps\n        .filter(other => !other.isRemoved)\n        .some(other => other.substepType === substep.substepType)\n      if (exists) {\n        return\n      }\n    }\n\n    //When adding baseline confidence lift, it must sit after the passive substep\n    if (substep.isBaselineConfidenceLift) {\n      substep.stepId = step.id\n      const passiveSubstep = step.substeps.find(other => other.isPassive)\n      if (passiveSubstep) {\n        step.substeps = insertAfter(step.substeps, passiveSubstep, substep)\n      }\n      else {\n        step.substeps = [substep, ...step.substeps]\n      }\n      return\n    }\n\n    //Add to step\n    substep.stepId = step.id\n    step.substeps = [...step.substeps, substep]\n  }\n\n  //Remove a substep from a step\n  const removeSubstepFromStep = (step, substep) => {\n    step.substeps = step.substeps.filter(other => other.id !== substep.id)\n  }\n\n  //Extract survey substeps from given step\n  const extractSurveySubsteps = step => {\n    const surveySubsteps = []\n    const remainingSubsteps = []\n    for (const substep of step.substeps) {\n      if (substep.isSurvey && !substep.isRemoved) {\n        surveySubsteps.push(substep)\n      }\n      else {\n        remainingSubsteps.push(substep)\n      }\n    }\n    step.substeps = remainingSubsteps\n    return surveySubsteps\n  }\n\n  //Sanitize survey steps and substeps\n  const sanitizeSteps = steps => {\n\n    //Unref\n    steps = unref(steps)\n\n    //First and foremost, activation step should always be first\n    const activationStep = steps.find(step => step.isActivation)\n    const otherSteps = steps.filter(step => step && !step.isActivation)\n\n    //Create new array and get lessons only\n    const newSteps = activationStep ? [activationStep, ...otherSteps] : otherSteps\n    const lessons = newSteps.filter(step => step.isLesson)\n\n    //Extract all survey substeps, and remove them from the steps\n    //This is also done for any removed steps, as we may have just removed\n    //them, and in that case we need to preserve the survey substeps\n    const surveySubsteps = lessons.flatMap(extractSurveySubsteps)\n    const activeLessons = lessons.filter(step => !step.isRemoved)\n\n    //Get first/last step\n    const firstStep = activeLessons[0]\n    const lastStep = activeLessons[activeLessons.length - 1]\n\n    //Ensure passive substeps are always first\n    steps.forEach(step => {\n      const {passiveSubstep, substeps} = step\n      const otherSubsteps = substeps.filter(substep => substep !== passiveSubstep)\n      step.substeps = [passiveSubstep, ...otherSubsteps].filter(Boolean)\n    })\n\n    //Now attach the survey substeps to the correct step and in the right order\n    surveySubsteps.forEach(substep => {\n      if (substep.isBaselineConfidenceLift) {\n        appendSubstepToStep(firstStep, substep)\n      }\n      else {\n        appendSubstepToStep(lastStep, substep)\n      }\n    })\n\n    //Return sanitized steps array (contents will have been updated by reference)\n    return newSteps\n  }\n\n  //Apply the correct translations to substep\n  const applyTranslationsToSubstep = (substep, translations) => {\n\n    //Unref\n    const t = unref(translations)\n\n    //Set correct translations depending on substep type\n    if (substep.isNpsSurvey) {\n      substep.body = t.npsSurveyText || ''\n      substep.response = t.npsSurveyResponse || ''\n    }\n    else if (substep.isLearnerSentiment) {\n      substep.body = t.learnerSentimentText || ''\n      substep.response = t.learnerSentimentResponse || ''\n    }\n    else if (substep.isBaselineConfidenceLift) {\n      substep.body = t.confidenceLiftBaselineText || ''\n      substep.response = t.confidenceLiftBaselineResponse || ''\n    }\n    else if (substep.isFollowUpConfidenceLift) {\n      substep.body = t.confidenceLiftFollowUpText || ''\n      substep.response = t.confidenceLiftFollowUpResponse || ''\n    }\n  }\n\n  //Helper to get lesson copy name\n  const getNewStepCopyName = (steps, name) => {\n\n    //Clean up base name and prepare regexes\n    const baseName = name.replace(/\\scopy(\\s\\d)?$/i, '').trim()\n    const sequencedRegex = new RegExp(`^${baseName}\\\\scopy\\\\s(\\\\d+)$`, 'i')\n    const nonSequencedRegex = new RegExp(`^${baseName}\\\\scopy$`, 'i')\n\n    //Check if there are sequenced copy names\n    const sequenced = steps.filter(step => step.name.match(sequencedRegex))\n    if (sequenced.length > 0) {\n      const maxSequence = Math.max(...sequenced.map(step => {\n        const match = step.name.match(sequencedRegex)\n        return match ? parseInt(match[1]) : 0\n      }))\n      return `${baseName} Copy ${maxSequence + 1}`\n    }\n\n    //Check if there is a sequenced copy name\n    const nonSequenced = steps.find(step => step.name.match(nonSequencedRegex))\n    if (nonSequenced) {\n      return `${baseName} Copy 2`\n    }\n\n    //Append copy\n    return `${baseName} Copy`\n  }\n\n  //Expose interface\n  return {\n\n    //Step management\n    createStep,\n    updateStep,\n    copyStep,\n    trashStep,\n\n    //Substep management\n    createSubstep,\n    updateSubstep,\n    copySubstep,\n    trashSubstep,\n\n    //Other\n    appendSubstepToStep,\n    removeSubstepFromStep,\n    sanitizeSteps,\n    applyTranslationsToSubstep,\n    getNewStepCopyName,\n  }\n}\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ViewPromptsButton from '@/components/courses/editor/ViewPromptsButton.vue'\nimport ViewReferencesButton from '@/components/courses/editor/ViewReferencesButton.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport CourseOutline from '@/components/courses/editor/CourseOutline.vue'\nimport CourseStepBlock from '@/components/courses/editor/CourseStepBlock.vue'\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport RemoveStepModal from '@/components/courses/modals/RemoveStepModal.vue'\nimport RemoveSubstepModal from '@/components/courses/modals/RemoveSubstepModal.vue'\nimport OptimizeSubstepModal from '@/components/courses/modals/OptimizeSubstepModal.vue'\nimport GenerateSubstepModal from '@/components/courses/modals/GenerateSubstepModal.vue'\nimport LearnMoreModal from '@/components/shared/modals/LearnMoreModal.vue'\nimport {substepTypes, surveySubstepTypes} from '@/constants/courses.js'\nimport {translationTypes} from '@/constants/translations.js'\nimport {Course} from '@/models/course.model.js'\nimport {useTranslations} from '@/composables/use-translations.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useItemToRemove} from '@/composables/use-item-to-remove.js'\nimport {useCourseStepManagement} from '@/composables/use-course-step-management.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useScroll} from '@vueuse/core'\nimport {computed, ref, unref, toRefs, nextTick, onMounted, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'edit-survey-substep',\n  'confirm',\n  'back',\n  'preview',\n  'view-prompts',\n  'view-references',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  model: {\n    type: Course,\n    required: true,\n  },\n  isSaved: {\n    type: Boolean,\n    default: false,\n  },\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n  isSavingDraft: {\n    type: Boolean,\n    default: false,\n  },\n  canSchedule: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {course, model} = toRefs(props)\nconst isNewCourse = ref(false)\nconst steps = computed(() => model.value.steps)\nconst numLessons = computed(() => model.value.numLessons)\nconst firstLesson = computed(() => model.value.firstLesson)\nconst lastLesson = computed(() => model.value.lastLesson)\nconst hasConfidenceLift = computed(() => model.value.hasConfidenceLift)\n\n//Track if uploading media\nconst isUploadingMedia = ref(false)\nconst setIsUploadingMedia = value => isUploadingMedia.value = value\n\n//User and organization\nconst {user, updateUser} = useCurrentUser()\nconst {organization} = useCurrentOrganization()\nconst updateShowSenderIdWarning = () => updateUser({hasSeenSenderIdWarning: true})\n\n//Translations\nconst locale = computed(() => model.value.language)\nconst {translations} = useTranslations(locale, translationTypes.COURSE_BUILDER)\n\n//Scroll helpers\nconst stepBlocks = ref([])\n\n//Helper to get step block for given step\nconst getStepBlock = step => {\n  step = unref(step)\n  if (step) {\n    const i = model.value.lessons.findIndex(s => s === step)\n    return stepBlocks.value[i]\n  }\n}\n\n//Expand/focus on step\nconst expandStep = step => getStepBlock(step)?.expand()\nconst focusOnStep = step => getStepBlock(step)?.focus()\n\n//Focus on substep\nconst focusOnSubstep = substep => {\n  substep = unref(substep)\n  if (substep) {\n    const i = model.value.lessons.findIndex(s => s === (\n      substep.isBaselineConfidenceLift ? firstLesson.value : lastLesson.value\n    ))\n    stepBlocks.value[i]?.focusOnSubstep(substep)\n  }\n}\n\n//Remove warning toggle\nconst {\n  isValue: isShowingRemoveWarning,\n  setTrue: showRemoveWarning,\n  setFalse: hideRemoveWarning,\n} = useValueToggle()\n\n//Sender ID warning toggle\nconst {\n  isValue: isShowingSenderIdWarning,\n  setTrue: showSenderIdWarning,\n  setFalse: hideShowSenderIdWarning,\n} = useValueToggle()\n\n//Track highlighted step\nconst highlightedStep = ref(model.value.lessons[0])\nconst determineHighlightedStep = () => {\n  stepBlocks.value.forEach((block, i) => {\n    if (block.isVisible) {\n      highlightedStep.value = model.value.lessons[i]\n    }\n  })\n}\n\n//Update when scrolling\nconst {isScrolling} = useScroll(window)\nwatch(isScrolling, determineHighlightedStep)\n\n//Course step management\nconst {\n  createStep,\n  updateStep,\n  copyStep,\n  trashStep,\n  createSubstep,\n  updateSubstep,\n  copySubstep,\n  trashSubstep,\n  appendSubstepToStep,\n  removeSubstepFromStep,\n  applyTranslationsToSubstep,\n  getNewStepCopyName,\n} = useCourseStepManagement()\n\n//Steps updater\nconst updateSteps = (steps, saveInBackground = true) => emit('update', {\n  data: {steps},\n  saveInBackground,\n})\n\n//Step and substep removal tracking\nconst {\n  itemToRemove: stepToRemove,\n  setItemToRemove: setStepToRemove,\n  clearItemToRemove: clearStepToRemove,\n} = useItemToRemove()\nconst {\n  itemToRemove: substepToRemove,\n  setItemToRemove: setSubstepToRemove,\n  clearItemToRemove: clearSubstepToRemove,\n  contextForItemToRemove: substepToRemoveParentStep,\n} = useItemToRemove()\n\n//Add step\nconst doAddStep = (data = {}) => {\n  const step = createStep({name: 'New lesson', ...data})\n  updateSteps([...steps.value, step], false)\n  nextTick(() => focusOnStep(lastLesson))\n}\n\n//Copy step\nconst doCopyStep = step => {\n  const name = getNewStepCopyName(steps.value, step.name)\n  updateSteps([...steps.value, copyStep(step, {name})], false)\n  nextTick(() => focusOnStep(lastLesson))\n}\n\n//Update step\nconst doUpdateStep = (step, data) => {\n  updateStep(step, data)\n  updateSteps(steps.value)\n}\n\n//Helper to check if a step can be trashed\nconst checkIfCanRemoveStep = step => {\n  if (hasConfidenceLift.value && !step.isBlank && numLessons.value <= 2) {\n    return `Confidence lift surveys require at least 2 lessons for baseline and follow-up questions.`\n  }\n  else if (step.hasScheduleFilters) {\n    return `This lesson has active schedule filters applied.`\n  }\n  else if (numLessons.value < 2) {\n    return `At least one lesson is required.`\n  }\n}\n\n//Remove step\nconst cantRemoveReason = ref(null)\nconst doRemoveStep = step => {\n  cantRemoveReason.value = checkIfCanRemoveStep(step)\n  if (cantRemoveReason.value) {\n    return showRemoveWarning()\n  }\n  setStepToRemove(step)\n}\n\n//Confirm step removal\n//NOTE: Must for now also trash new steps (e.g. isNew=true, because they could\n//have survey substeps attached to them at this point which may have already\n//been saved to the database)\nconst confirmStepRemoval = () => {\n  const step = stepToRemove.value\n  trashStep(step)\n  updateSteps(steps.value, false)\n  clearStepToRemove()\n}\n\n//Add substep\nconst doAddSubstep = (step, substepType) => {\n\n  //Use correct handler for survey substeps\n  if (surveySubstepTypes.includes(substepType)) {\n    return doAddSurveySubstep(substepType)\n  }\n\n  //Regular substep\n  const substep = createSubstep({substepType})\n  appendSubstepToStep(step, substep)\n  updateSteps(steps.value, false)\n}\n\n//Move substep to another substep\nconst doMoveSubstep = (substep, targetStep) => {\n  const currentStep = steps.value.find(step => step.substeps.some(s => s.id === substep.id))\n  if (currentStep.id === targetStep.id) {\n    return\n  }\n  removeSubstepFromStep(currentStep, substep)\n  appendSubstepToStep(targetStep, substep)\n  updateSteps(steps.value, false)\n}\n\n//Add survey type substep\nconst doAddSurveySubstep = substepType => {\n\n  //Get copy of steps\n  const newSteps = [...steps.value]\n  const isConfidenceLift = substepType === substepTypes.CONFIDENCE_LIFT\n\n  //Adding confidence lift, ensure we have enough steps\n  if (isConfidenceLift && numLessons.value === 1) {\n    const newStep = createStep({name: 'New lesson'})\n    newSteps.push(newStep)\n  }\n\n  //Add substep to last step\n  const substep = createSubstep({substepType})\n  const lastStep = newSteps.findLast(s => s.isLesson && !s.isRemoved)\n  appendSubstepToStep(lastStep, substep)\n  applyTranslationsToSubstep(substep, translations)\n\n  //Confidence lift? Also add to first step\n  if (isConfidenceLift) {\n    const substep = createSubstep({substepType, isBaselineConfidenceLift: true})\n    const firstStep = newSteps.find(s => s.isLesson && !s.isRemoved)\n    appendSubstepToStep(firstStep, substep)\n    applyTranslationsToSubstep(substep, translations)\n  }\n\n  //Update steps now\n  updateSteps(newSteps, false)\n}\n\n//Copy substep\nconst doCopySubstep = (substep, step) => {\n  const copy = copySubstep(substep)\n  appendSubstepToStep(step, copy)\n  updateSteps(steps.value, false)\n}\n\n//Update substep\nconst doUpdateSubstep = (substep, data) => {\n  updateSubstep(substep, data)\n  updateSteps(steps.value)\n}\n\n//Replace or append substep (content)\nconst doReplaceSubstep = (substep, modifiedSubstep, append = false) => {\n  const data = modifiedSubstep.getModifiedData(append ? substep : null)\n  updateSubstep(substep, data)\n  updateSteps(steps.value)\n}\n\n//Remove substep\nconst doRemoveSubstep = (substep, step) => setSubstepToRemove(substep, step)\n\n//Helper to process substep removal for a given step\nconst processSubstepRemoval = (step, substep) => {\n\n  //New substeps can simply be removed right away and forgotten about\n  if (substep.isNew) {\n    removeSubstepFromStep(step, substep)\n  }\n\n  //Existing substeps need to be trashed\n  else {\n    trashSubstep(substep)\n    updateStep(step, {substeps: [...step.substeps]})\n  }\n}\n\n//Confirm substep removal\nconst confirmSubstepRemoval = () => {\n\n  //Check what is being removed\n  const step = substepToRemoveParentStep.value\n  const substep = substepToRemove.value\n\n  //If a confidence lift substep is being removed, we need to remove it from\n  //every step (usually first & last)\n  if (substep.isConfidenceLift) {\n    steps.value\n      .filter(step => step.hasConfidenceLift)\n      .forEach(step => processSubstepRemoval(step, step.confidenceLiftSubstep))\n  }\n\n  //Otherwise, just process\n  else {\n    processSubstepRemoval(step, substep)\n  }\n\n  //Update steps\n  updateSteps(steps.value, false)\n  clearSubstepToRemove()\n}\n\n//Substep generation\nconst substepToGenerate = ref(null)\nconst doGenerateSubstep = substep => substepToGenerate.value = substep\nconst clearSubstepToGenerate = () => substepToGenerate.value = null\n\n//Substep optimization\nconst substepToOptimize = ref(null)\nconst doOptimizeSubstep = substep => substepToOptimize.value = substep\nconst clearSubstepToOptimize = () => substepToOptimize.value = null\n\n//Track to see if we're dragging questions\nconst isDraggingQuestions = ref(false)\nconst startedDraggingQuestions = () => isDraggingQuestions.value = true\nconst stoppedDraggingQuestions = () => {\n  setTimeout(() => isDraggingQuestions.value = false, 100)\n}\n\n//Watch for user and organization\nwatch([user, organization], () => {\n  if (organization.value && !user.value?.hasSeenSenderIdWarning) {\n    showSenderIdWarning()\n  }\n})\n\n//On mount\nonMounted(() => {\n\n  //Automatically add a new lesson if needed\n  if (numLessons.value === 0) {\n    isNewCourse.value = true\n    doAddStep()\n  }\n  else {\n    expandStep(model.value.firstLesson)\n  }\n\n  //Determine highlighted step after page has rendered\n  setTimeout(determineHighlightedStep, 250)\n})\n</script>\n\n<template>\n  <FlowStep sticky-footer>\n    <template #alerts>\n      <Alert\n        v-if=\"course.hasActiveEnrollments\"\n        type=\"warning\"\n        text=\"This course has active enrollments, so lessons and questions cannot be added, removed, or copied.\"\n        fit-content\n      />\n    </template>\n\n    <template #outline>\n      <CourseOutline\n        :course=\"model\"\n        :highlighted-step=\"highlightedStep\"\n        :is-editable=\"!course.hasActiveEnrollments\"\n        :is-reorderable=\"!course.hasActiveEnrollments\"\n        :show-validation-errors=\"true\"\n        with-sticky-footer\n        @add-step=\"doAddStep()\"\n        @add-substep=\"doAddSurveySubstep($event.type)\"\n        @copy-step=\"doCopyStep($event.step)\"\n        @view-step=\"focusOnStep($event.step)\"\n        @remove-step=\"doRemoveStep($event.step)\"\n        @reorder-steps=\"updateSteps($event.steps, false)\"\n        @remove-substep=\"doRemoveSubstep($event.substep, $event.step)\"\n        @view-substep=\"focusOnSubstep($event.substep)\"\n        @move-substep=\"doMoveSubstep($event.substep, $event.step)\"\n      />\n    </template>\n\n    <PageBlock :header=\"course.name\">\n      <template #headerAside>\n        <ViewPromptsButton\n          v-if=\"model.aiPrompts\"\n          @click=\"$emit('view-prompts')\"\n        />\n        <ViewReferencesButton @click=\"$emit('view-references')\" />\n      </template>\n      <Markdown :content=\"course.description\" />\n    </PageBlock>\n\n    <CourseStepBlock\n      v-for=\"(step, index) in model.lessons\"\n      ref=\"stepBlocks\"\n      :key=\"index\"\n      :course=\"course\"\n      :model=\"model\"\n      :step=\"step\"\n      :step-index=\"index\"\n      :is-draggable=\"!course.hasActiveEnrollments\"\n      :can-remove=\"!step.hasScheduleFilters\"\n      :is-actionable=\"!course.hasActiveEnrollments\"\n      :is-dragging-questions=\"isDraggingQuestions\"\n      @copy-step=\"doCopyStep(step)\"\n      @update-step=\"doUpdateStep(step, $event.data)\"\n      @remove-step=\"doRemoveStep(step)\"\n      @add-substep=\"doAddSubstep(step, $event.type)\"\n      @copy-substep=\"doCopySubstep($event.substep, step)\"\n      @move-substep=\"doMoveSubstep($event.substep, step)\"\n      @update-substep=\"doUpdateSubstep($event.substep, $event.data)\"\n      @remove-substep=\"doRemoveSubstep($event.substep, step)\"\n      @generate-substep=\"doGenerateSubstep($event.substep)\"\n      @optimize-substep=\"doOptimizeSubstep($event.substep)\"\n      @start-dragging-questions=\"startedDraggingQuestions()\"\n      @stop-dragging-questions=\"stoppedDraggingQuestions()\"\n      @is-uploading-media=\"setIsUploadingMedia($event.isUploading)\"\n    />\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-go-back=\"true\"\n        :label-confirm=\"canSchedule ? 'Schedule' : 'Save and exit'\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingDraft\"\n        :is-disabled-confirm=\"(isSaving && !isSavingDraft) || isUploadingMedia\"\n        :has-spinner-confirm=\"isSaving && !isSavingDraft\"\n        @confirm=\"$emit('confirm')\"\n        @back=\"$emit('back')\"\n      >\n        <Tooltip\n          :is-disabled=\"model.isPassingValidations\"\n          text=\"Please fix all content errors to preview this course\"\n          position=\"top\"\n        >\n          <ActionButton\n            label=\"Preview\"\n            type=\"secondary\"\n            :is-disabled=\"!model.isPassingValidations\"\n            @click=\"$emit('preview')\"\n          />\n        </Tooltip>\n      </FlowNavigation>\n    </template>\n\n    <!-- Modals -->\n    <WarningModal\n      header=\"Cannot remove this lesson\"\n      :is-open=\"isShowingRemoveWarning\"\n      :warning=\"cantRemoveReason\"\n      @close=\"hideRemoveWarning()\"\n    />\n    <LearnMoreModal\n      :body=\"`Your sender ID, ${organization && organization.senderId}, or SMS Channel name if selected, will be included in all outgoing SMS messages due to carrier restrictions.`\"\n      :is-open=\"isShowingSenderIdWarning\"\n      link=\"https://arist.helpcenter.io/content/sender-id-now-included-in-all-sms-messages?lang=en\"\n      @close=\"hideShowSenderIdWarning()\"\n      @open=\"updateShowSenderIdWarning()\"\n    />\n    <RemoveStepModal\n      :is-open=\"!!stepToRemove\"\n      :step=\"stepToRemove\"\n      @close=\"clearStepToRemove()\"\n      @confirm=\"confirmStepRemoval()\"\n    />\n    <RemoveSubstepModal\n      :is-open=\"!!substepToRemove\"\n      :substep=\"substepToRemove\"\n      @close=\"clearSubstepToRemove()\"\n      @confirm=\"confirmSubstepRemoval()\"\n    />\n    <OptimizeSubstepModal\n      :is-open=\"!!substepToOptimize\"\n      :substep=\"substepToOptimize\"\n      :language=\"course.language\"\n      @replace=\"doReplaceSubstep(substepToOptimize, $event.modifiedSubstep, false)\"\n      @append=\"doReplaceSubstep(substepToOptimize, $event.modifiedSubstep, true)\"\n      @close=\"clearSubstepToOptimize()\"\n    />\n    <GenerateSubstepModal\n      :is-open=\"!!substepToGenerate\"\n      :substep=\"substepToGenerate\"\n      :language=\"course.language\"\n      @replace=\"doReplaceSubstep(substepToGenerate, $event.modifiedSubstep, false)\"\n      @append=\"doReplaceSubstep(substepToGenerate, $event.modifiedSubstep, true)\"\n      @close=\"clearSubstepToGenerate()\"\n    />\n  </FlowStep>\n</template>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport MediaInput from '@/components/shared/form/MediaInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ViewPromptsButton from '@/components/courses/editor/ViewPromptsButton.vue'\nimport ViewReferencesButton from '@/components/courses/editor/ViewReferencesButton.vue'\nimport DedicatedSmsAddressField from '@/components/courses/editor/DedicatedSmsAddressField.vue'\nimport MediaUrlPreviewCard from '@/components/shared/file/MediaUrlPreviewCard.vue'\nimport SelectThumbnailModal from '@/components/shared/video/SelectThumbnailModal.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {courseLanguageOptions, characterLimits} from '@/constants/courses.js'\nimport {imageFileTypes, videoFileTypes} from '@/constants/file-types.js'\nimport {Course} from '@/models/course.model.js'\nimport {useCourseValidation} from '@/composables/use-course-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useContentTypes} from '@/composables/use-content-types.js'\nimport {useOrganizationTags} from '@/composables/use-organization-tags.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useVideoUrlMetadata} from '@/composables/use-video-url-metadata.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useVideoUrlValidation} from '@/composables/use-video-url-validation.js'\nimport {validateFileSizeByType, validateVideoFileDuration} from '@/helpers/file.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed, onMounted, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update',\n  'back',\n  'confirm',\n  'view-prompts',\n  'preview',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    default: null,\n  },\n  model: {\n    type: Course,\n    required: true,\n  },\n  isCreateFlow: {\n    type: Boolean,\n    default: false,\n  },\n  isSaved: {\n    type: Boolean,\n    default: false,\n  },\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n  isSavingDraft: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {course, model} = toRefs(props)\nconst {canManageSchedules} = useCurrentUser()\n\n//Model updater\nconst updateModel = (data) => emit('update', {data})\n\n//Passive substep handling\nconst steps = computed(() => model.value.steps)\nconst nudgeStep = computed(() => steps.value.find((s) => s.isLesson))\nconst nudgeSubstep = computed(() => nudgeStep.value?.passiveSubstep)\nconst updateNudgeMessage = (body) => {\n  nudgeSubstep.value.body = body\n  updateModel({steps: [...steps.value]})\n}\nconst mediaOptions = ref([\n  {label: 'Upload content', value: true},\n  {label: 'Link to an external video or gif', value: false},\n])\nconst isMediaUpload = ref(!nudgeStep.value.videoUrl?.length)\nconst isUploadingMedia = ref(false)\n\nconst {\n  fetchVideoUrlMetadata,\n  hasError: hasVideoUrlError,\n  reset: clearVideoUrlError,\n  isLoading: isLoadingUrlMetadata,\n} = useVideoUrlMetadata()\n\n//Validation (for detail page & prevention of navigation mainly)\nconst {uniqueName, uniqueExternalId, isCheckingCourseExists} = useCourseValidation(course)\nconst {required, characterCount} = useValidators()\nconst {isValidVideoUrl} = useVideoUrlValidation()\nconst $v = useVuelidate({\n  model: {\n    name: {\n      required: required('Name'),\n      uniqueName,\n    },\n    language: {required: required('Language')},\n    contentTypeId: {required: required('Content type')},\n    author: {required: required('Author name')},\n    externalId: {uniqueExternalId},\n  },\n  nudgeStep: {\n    videoUrl: {\n      valid: isValidVideoUrl(hasVideoUrlError),\n    },\n  },\n  nudgeSubstep: {\n    body: {\n      required: required('Message'),\n      characterCount: characterCount(\n        nudgeSubstep.value.body,\n        characterLimits.SUBSTEP_BODY\n      ),\n    },\n  },\n}, {model, nudgeStep, nudgeSubstep})\n\n//Tags and content types\nconst {organizationTags, loadOrganizationTags, isLoadingOrganizationTags} = useOrganizationTags()\nconst {contentTypes, loadContentTypes, isLoadingContentTypes} = useContentTypes()\n\nconst updateStep = (data) => {\n  Object.keys(data).forEach((key) => {\n    nudgeStep.value[key] = data[key]\n  })\n\n  const updateData = {steps: [...steps.value]}\n  //The image key will be shared between the passive substep and the course image key\n  if ('imageKey' in data) {\n    updateData.imageKey = data.imageKey\n  }\n  updateModel(updateData)\n}\n\n//Custom file size validation for media input\nconst validateFileSize = async file => {\n  validateFileSizeByType(file, '5MB', imageFileTypes)\n  validateFileSizeByType(file, '500MB', videoFileTypes)\n  await validateVideoFileDuration(file, 900)\n}\nconst extractMetadata = async (event) => {\n  clearVideoUrlError()\n  clearVideoMetadata()\n  updateStep({videoUrl: event.value})\n  const {videoUrl} = nudgeStep.value\n\n  if ($v.value.nudgeStep.videoUrl.$error || !videoUrl) {\n    return\n  }\n\n  try {\n    const response = await fetchVideoUrlMetadata(videoUrl)\n    updateStep({\n      videoUrlTitle: response.title,\n      videoUrlDescription: response.description,\n      imageKey: response.image,\n      videoUrlDomain: response.domain,\n    })\n  }\n  catch {\n    // Handled by useVideoUrlMetadata\n  }\n}\n\nconst clearVideoMetadata = () => {\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n  })\n}\n\nconst toggleMediaUploadType = (event) => {\n  isMediaUpload.value = event.value\n  updateStep({\n    videoUrl: '',\n    videoUrlTitle: '',\n    videoUrlDescription: '',\n    imageKey: '',\n    videoUrlDomain: '',\n    videoKey: '',\n    thumbnailTime: 0,\n  })\n}\n\n//Thumbnail modal state\nconst {\n  isValue: isShowingThumbnailModal,\n  setTrue: showThumbnailModal,\n  setFalse: hideThumbnailModal,\n} = useValueToggle()\n\n//Save thumbnail\nconst saveThumbnail = async (event) => {\n  updateStep(event)\n  hideThumbnailModal()\n}\n\n//Load tags and content types\nonMounted(async () => {\n  loadOrganizationTags()\n  loadContentTypes()\n  if (nudgeStep.value.videoUrl && !nudgeStep.value.hasVideoUrlMetadata) {\n    await extractMetadata({value: nudgeStep.value.videoUrl})\n    $v.value.nudgeStep.videoUrl?.$touch()\n  }\n})\n</script>\n\n<template>\n  <FlowStep\n    sticky-footer\n    limited-width\n  >\n    <PageBlock\n      key=\"details\"\n      header=\"Basic details\"\n    >\n      <template #headerAside>\n        <ViewPromptsButton\n          v-if=\"model.aiPrompts\"\n          @click=\"$emit('view-prompts')\"\n        />\n        <ViewReferencesButton @click=\"$emit('view-references')\" />\n      </template>\n      <FormField\n        label=\"Nudge name\"\n        is-required\n        :errors=\"$v.model.name.$errors\"\n      >\n        <TextInput\n          required\n          focus-on-mount\n          placeholder=\"Type nudge name\"\n          test-id=\"name\"\n          :value=\"model.name\"\n          :has-error=\"$v.model.name.$error && !$v.model.name.$pending\"\n          :has-spinner=\"isCheckingCourseExists\"\n          @input=\"updateModel({ name: $event.value })\"\n          @dirty=\"$v.model.name?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Nudge media\"\n        :message=\"\n          !isMediaUpload\n            ? 'Important recommendations: The only supported external sources are YouTube, Vimeo, Loom, and Giphy links. To ensure the best experience for learners, double-check that your link is set to public sharing, as private links may display only a logo instead of the video preview. Note that for SMS delivery, videos best preview when sent from a saved contact.'\n            : ''\n        \"\n      >\n        <FlexColumn>\n          <RadioButtonList\n            name=\"imageOrLink\"\n            :value=\"isMediaUpload\"\n            is-inline\n            :options=\"mediaOptions\"\n            @input=\"toggleMediaUploadType($event)\"\n          />\n          <FormField\n            v-if=\"isMediaUpload\"\n            :message=\"\n              nudgeStep.videoKey\n                ? 'Video recommendations: Keep your videos under 5 minutes for the best learning experience. Videos will appear as clickable previews above the nudge, accessible to all viewers. Note that for SMS delivery, videos best preview when sent from a saved contact.'\n                : ''\n            \"\n          >\n            <MediaInput\n              :image-key=\"nudgeStep.imageKey\"\n              :video-key=\"nudgeStep.videoKey\"\n              custom-details-text=\"Max file size is 5MB for images and 500MB or 15 minutes for videos\"\n              :custom-file-validator=\"validateFileSize\"\n              restricted-height\n              @input=\"updateStep($event)\"\n              @is-uploading=\"isUploadingMedia = $event.isUploading\"\n            >\n              <template\n                v-if=\"nudgeStep.videoKey\"\n                #underCard\n              >\n                <FormField label=\"Video title\">\n                  <template #aside>\n                    <ActionButton\n                      :is-disabled=\"isUploadingMedia\"\n                      type=\"text\"\n                      is-icon-outlined\n                      icon=\"add_photo_alternate\"\n                      label=\"Select thumbnail\"\n                      @click=\"showThumbnailModal()\"\n                    />\n                  </template>\n                  <TextInput\n                    :value=\"nudgeStep.videoTitle\"\n                    :ignore-character-limit=\"model.ignoreValidations\"\n                    :character-limit=\"characterLimits.STEP_TITLE\"\n                    @input=\"updateStep({ videoTitle: $event.value })\"\n                  />\n                </FormField>\n              </template>\n            </MediaInput>\n          </FormField>\n          <template v-else>\n            <MediaUrlPreviewCard\n              v-if=\"nudgeStep.hasVideoUrlMetadata\"\n              :image-src=\"nudgeStep.imageKey\"\n              :title=\"nudgeStep.videoUrlTitle\"\n              :description=\"nudgeStep.videoUrlDescription\"\n              :domain=\"nudgeStep.videoUrlDomain\"\n              :url=\"nudgeStep.videoUrl\"\n            />\n            <FormField :errors=\"$v.nudgeStep.videoUrl.$errors\">\n              <TextInput\n                :value=\"nudgeStep.videoUrl\"\n                :debounce=\"500\"\n                :is-disabled=\"isLoadingUrlMetadata\"\n                :has-spinner=\"isLoadingUrlMetadata\"\n                :has-error=\"$v.nudgeStep.videoUrl.$error\"\n                @input=\"extractMetadata($event)\"\n                @dirty=\"$v.nudgeStep.videoUrl?.$touch()\"\n              />\n            </FormField>\n          </template>\n        </FlexColumn>\n      </FormField>\n\n      <FormField\n        v-if=\"nudgeSubstep\"\n        is-required\n        label=\"Nudge message\"\n        :errors=\"$v.nudgeSubstep.body.$errors\"\n      >\n        <TextInput\n          :value=\"nudgeSubstep.body\"\n          :ignore-character-limit=\"model.ignoreValidations\"\n          :character-limit=\"characterLimits.SUBSTEP_BODY\"\n          :has-error=\"$v.nudgeSubstep.body.$error\"\n          test-id=\"message\"\n          is-multiline\n          no-max-height\n          show-emoji-picker\n          @input=\"updateNudgeMessage($event.value)\"\n          @dirty=\"$v.nudgeSubstep.body?.$touch()\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      key=\"other\"\n      header=\"Other details\"\n    >\n      <FormField\n        label=\"Author name\"\n        is-required\n        :errors=\"$v.model.author.$errors\"\n      >\n        <TextInput\n          :value=\"model.author\"\n          required\n          :has-error=\"$v.model.author.$error\"\n          placeholder=\"Type course author name\"\n          test-id=\"authorName\"\n          @input=\"updateModel({author: $event.value})\"\n          @dirty=\"$v.model.author?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Nudge language\"\n        sub-label=\"You can always add more translations with AI later\"\n        :errors=\"$v.model.language.$errors\"\n      >\n        <SelectInput\n          required\n          placeholder=\"Select language\"\n          :options=\"courseLanguageOptions\"\n          :value=\"model.language\"\n          :has-error=\"$v.model.language.$error\"\n          test-id=\"language\"\n          @input=\"updateModel({language: $event.value})\"\n          @dirty=\"$v.model.language?.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Topic tags\"\n        sub-label=\"Used for filtering (max 3)\"\n        is-optional\n      >\n        <SelectInput\n          value-prop=\"id\"\n          label-prop=\"label\"\n          :has-spinner=\"isLoadingOrganizationTags\"\n          :placeholder=\"isLoadingOrganizationTags ? 'Loading tags...' : 'Select up to 3 topic tags'\"\n          :options=\"organizationTags\"\n          :value=\"model.tagIds\"\n          :max=\"3\"\n          test-id=\"topicTags\"\n          is-multi-select\n          @input=\"updateModel({ tagIds: $event.value })\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"External ID\"\n        sub-label=\"For syncing with external learning systems\"\n        :errors=\"$v.model.externalId.$errors\"\n        is-optional\n      >\n        <TextInput\n          :value=\"model.externalId\"\n          :has-error=\"$v.model.externalId.$error && !$v.model.externalId.$pending\"\n          :has-spinner=\"isCheckingCourseExists\"\n          test-id=\"externalId\"\n          @input=\"updateModel({externalId: $event.value})\"\n          @dirty=\"$v.model.externalId?.$touch()\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock\n      key=\"delivery\"\n      header=\"Delivery options\"\n    >\n      <FormField\n        label=\"Content type\"\n        sub-label=\"Required by carrier\"\n        is-required\n        :errors=\"$v.model.contentTypeId.$errors\"\n      >\n        <SelectInput\n          value-prop=\"id\"\n          label-prop=\"label\"\n          :has-spinner=\"isLoadingContentTypes\"\n          :has-error=\"$v.model.contentTypeId.$error\"\n          :placeholder=\"isLoadingContentTypes ? 'Loading content types...' : 'Select content type'\"\n          :options=\"contentTypes\"\n          :value=\"model.contentTypeId\"\n          test-id=\"contentType\"\n          @input=\"updateModel({contentTypeId: $event.value})\"\n          @dirty=\"$v.model.contentTypeId?.$touch()\"\n        />\n      </FormField>\n\n      <DedicatedSmsAddressField\n        v-if=\"!isCreateFlow && !model.isTemplate\"\n        :course=\"course\"\n      />\n\n      <Alert\n        type=\"warning\"\n        text=\"Nudges cannot be delivered over WhatsApp at this time\"\n        fit-content\n      />\n    </PageBlock>\n\n    <template #footer>\n      <FlowNavigation\n        :can-confirm=\"true\"\n        :can-go-back=\"true\"\n        :label-confirm=\"canManageSchedules ? 'Schedule' : 'Save and exit'\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingDraft\"\n        :is-disabled-confirm=\"(isSaving && !isSavingDraft) || $v.$invalid || isUploadingMedia\"\n        :has-spinner-confirm=\"isSaving && !isSavingDraft\"\n        @confirm=\"$emit('confirm')\"\n        @back=\"$emit('back')\"\n      >\n        <Tooltip\n          :is-disabled=\"!$v.$invalid && !!model.id\"\n          :text=\"`Please ${$v.$invalid ? 'fix all content errors' : 'save'} to preview this course`\"\n          position=\"top\"\n        >\n          <ActionButton\n            label=\"Preview\"\n            type=\"secondary\"\n            :is-disabled=\"$v.$invalid || !model.id\"\n            @click=\"$emit('preview')\"\n          />\n        </Tooltip>\n      </FlowNavigation>\n    </template>\n\n    <SelectThumbnailModal\n      :is-open=\"isShowingThumbnailModal\"\n      :video-key=\"nudgeStep.videoKey\"\n      :image-key=\"nudgeStep.imageKey\"\n      :thumbnail-time=\"nudgeStep.thumbnailTime\"\n      @close=\"hideThumbnailModal()\"\n      @save=\"saveThumbnail($event)\"\n    />\n  </FlowStep>\n</template>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'remove',\n  'update',\n])\nconst props = defineProps({\n  citation: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Extract citation\nconst {citation} = toRefs(props)\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  text: {required: required('Reference')},\n}, citation, {$autoDirty: true})\n</script>\n\n<template>\n  <FormField\n    :errors=\"$v.text.$errors\"\n    :class=\"$style.reference\"\n  >\n    <TextInput\n      :value=\"$v.text.$model\"\n      :has-error=\"$v.text.$error\"\n      is-multiline\n      @input=\"$emit('update', $event)\"\n    />\n    <RemoveButton\n      @click=\"$emit('remove')\"\n    />\n  </FormField>\n</template>\n\n<style module lang=\"scss\">\n.reference {\n  margin-top: 0.25rem !important;\n  p {\n    margin-bottom: 0.5rem;\n  }\n}\n</style>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport CourseReferenceField from '@/components/courses/editor/CourseReferenceField.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {useVuelidate} from '@vuelidate/core'\nimport {Course} from '@/models/course.model.js'\nimport {ref, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'update',\n])\nconst props = defineProps({\n  model: {\n    type: Course,\n    required: true,\n  },\n})\n\n//Extract citations from model\nconst {model} = toRefs(props)\nconst citations = ref(model.value.citations.map(text => ({text})))\n\n//Manage citations\nconst addCitation = () => citations.value.push({text: ''})\nconst updateCitation = (i, value) => citations.value[i].text = value\nconst removeCitation = i => citations.value.splice(i, 1)\n\n//Validation\nconst $v = useVuelidate()\n\n//Save\nconst save = () => {\n  emit('update', {\n    data: {citations: citations.value.map(citation => citation.text)},\n  })\n  emit('close')\n}\n</script>\n\n<template>\n  <SidePanel\n    limited-width\n    is-centered\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"References\"\n        icon=\"edit_note\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <FlowStep>\n      <PageBlock header=\"Edit course references\">\n        <p>\n          <small\n            v-if=\"citations.length === 0\"\n            text-muted\n          >No references yet</small>\n        </p>\n        <CourseReferenceField\n          v-for=\"(citation, i) in citations\"\n          :key=\"i\"\n          :citation=\"citation\"\n          @update=\"updateCitation(i, $event.value)\"\n          @remove=\"removeCitation(i)\"\n        />\n        <ActionButton\n          label=\"Add reference\"\n          type=\"link\"\n          icon=\"add\"\n          @click=\"addCitation()\"\n        />\n      </PageBlock>\n\n      <template #footer>\n        <FlowNavigation\n          :can-confirm=\"true\"\n          :can-cancel=\"true\"\n          label-confirm=\"Save\"\n          :is-disabled-confirm=\"$v.$invalid\"\n          @confirm=\"save()\"\n          @cancel=\"$emit('close')\"\n        />\n      </template>\n    </FlowStep>\n  </SidePanel>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {useIntersectionObserver} from '@vueuse/core'\nimport {toRefs, nextTick, ref, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'load-more',\n  'search',\n  'dirty',\n  'open',\n  'close',\n])\nconst props = defineProps({\n  hasMoreItems: {\n    type: Boolean,\n    default: false,\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Get refs\nconst {options} = toRefs(props)\n\n//Refs\nconst loadRef = ref(null)\n\n//Use intersection observer\nuseIntersectionObserver(\n  loadRef,\n  ([{isIntersecting}]) => {\n    if (isIntersecting) {\n      emit('load-more')\n    }\n  },\n  {threshold: 0}\n)\n\n//Watch options and maintain scroll position\nwatch(() => options.value, () => {\n  if (!loadRef.value) {\n    return\n  }\n\n  //Find current scroll top\n  const ul = loadRef.value.parentElement.parentElement\n  const originalScrollTop = ul.scrollTop\n\n  //Set value\n  nextTick(() => ul.scrollTop = originalScrollTop)\n})\n</script>\n\n<template>\n  <SelectInput\n    v-bind=\"$attrs\"\n    :is-filterable=\"false\"\n    :options=\"options\"\n    @search=\"$emit('search', $event)\"\n    @input=\"$emit('input', $event)\"\n    @open=\"$emit('open', $event)\"\n    @close=\"$emit('close', $event)\"\n    @dirty=\"$emit('dirty', $event)\"\n  >\n    <template #listFooter>\n      <li\n        v-if=\"hasMoreItems\"\n        ref=\"loadRef\"\n        :class=\"$style.loadMore\"\n      >\n        <Spinner />\n      </li>\n    </template>\n  </SelectInput>\n</template>\n\n<style module lang=\"scss\">\n.loadMore {\n  text-align: center;\n  padding: 0.5rem;\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Learner} from '@/models/learner.model.js'\n\n/**\n * Common learners API service\n */\nexport class CommonLearnersApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/common/learners'\n  itemKey = 'learner'\n  itemsKey = 'learners'\n  ModelClass = Learner\n}\n\n//Export singleton instance\nexport const commonLearnersApi = new CommonLearnersApi()\n","<script setup>\nimport InfiniteSelectInput from '@/components/shared/form/InfiniteSelectInput.vue'\nimport {useDebounceFn} from '@vueuse/core'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {commonLearnersApi} from '@/api/common-learners.api.js'\nimport {computed, onMounted} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\n\n//Composables\nconst {\n  items: learners,\n  loadItems: loadLearners,\n  loadMoreItemsThrottled: loadMoreLearners,\n  isLoadingItems: isLoadingLearners,\n  hasLoadedAllItems: hasLoadedAllLearners,\n  changeSearch,\n} = useQuerying({\n  handler: (...args) => commonLearnersApi.query(...args),\n  sort: `displayName`,\n  limit: 100,\n})\n\n//Methods\nconst debouncedSearch = useDebounceFn((search) => {\n  changeSearch(search)\n}, 250)\n\n//Computed refs\nconst placeholder = computed(() => {\n  if (isLoadingLearners.value) {\n    return 'Loading learners...'\n  }\n  else if (learners.value.length) {\n    return 'Select or type learner name'\n  }\n  return 'No learners available'\n})\n\n//Load learners on mount\nonMounted(loadLearners)\n</script>\n\n<template>\n  <InfiniteSelectInput\n    v-bind=\"$attrs\"\n    :has-spinner=\"isLoadingLearners\"\n    value-prop=\"id\"\n    label-prop=\"displayName\"\n    :options=\"learners\"\n    :placeholder=\"placeholder\"\n    :has-more-items=\"!hasLoadedAllLearners\"\n    @load-more=\"loadMoreLearners()\"\n    @search=\"debouncedSearch($event)\"\n    @input=\"$emit('input', $event)\"\n  />\n</template>\n","import {coursesApi} from '@/api/courses.api.js'\nimport {addressTypes} from '@/constants/address-types.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Preview course creation composable\n */\nexport function usePreviewCourseCreation(course) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isCreatingEnrollments = ref(false)\n\n  //Model for creation\n  const model = ref({\n    addressType: addressTypes.SMS,\n    channelId: null,\n    learnerIds: [],\n    cohortIds: [],\n    learners: [],\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Preview course enrollment creation\n  const createEnrollments = async () => {\n    try {\n      isCreatingEnrollments.value = true\n      const response = await coursesApi.previewCourse(course.value.id, model.value)\n      setFlashSuccess('Preview successfully sent')\n      return response\n    }\n    catch (error) {\n      setFlashFailure('Error creating preview enrollments')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingEnrollments.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingEnrollments,\n    updateModel,\n    createEnrollments,\n  }\n}\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport LearnerSelectInput from '@/components/shared/form/LearnerSelectInput.vue'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {usePreviewCourseCreation} from '@/composables/use-preview-course-creation.js'\nimport {addressTypes} from '@/constants/address-types.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {commonChannelsApi} from '@/api/common-channels.api.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {toRefs, computed, ref, watch, onMounted} from 'vue'\n\n//Emits and Props\nconst emit = defineEmits([\n  'close',\n])\nconst props = defineProps({\n  course: {\n    type: Object,\n    default: () => ({}),\n  },\n})\n\n//Get refs\nconst {course} = toRefs(props)\n\n//Refs\nconst channels = ref([])\nconst cohorts = ref([])\nconst missingAddressCount = ref(0)\nconst noValidAddresses = ref(false)\nconst isProcessing = ref(false)\nconst isLoading = ref(true)\n\n//Computed\nconst limitedAddressOptions = computed(() => course.value.isNudge ? availableAddressTypeOptions.value.filter(option => option.value !== addressTypes.WHATSAPP) : availableAddressTypeOptions.value)\nconst missingAddressWarning = computed(() => {\n  if (noValidAddresses.value) {\n    return 'All learners are missing a delivery address for this method.'\n  }\n  else {\n    return `${missingAddressCount.value} learner${missingAddressCount.value === 1 ? '' : 's'} ${missingAddressCount.value === 1 ? 'is' : 'are'} missing a delivery address for this method and won't receive the preview.`\n\n  }\n})\nconst disableConfirm = computed(() => $v.$invalid || isCreatingEnrollments.value || !model.value.learnerIds.length && !model.value.cohortIds.length || noValidAddresses.value)\n\n//Composables\nconst {availableAddressTypeOptions} = useCurrentOrganization()\nconst {\n  model,\n  updateModel,\n  createEnrollments,\n  isCreatingEnrollments,\n} = usePreviewCourseCreation(course)\n\n//Methods\nconst confirm = async () => {\n  await createEnrollments()\n  emit('close')\n}\nconst loadChannels = async () => {\n  const data = await commonChannelsApi.query()\n  channels.value = data.channels\n}\nconst loadCohorts = async () => {\n  const data = await cohortsApi.query({limit: 500})\n  cohorts.value = data.cohorts\n}\nconst fetchMissingAddressCount = async () => {\n  const response = await coursesApi.missingAddressCount(model.value)\n  missingAddressCount.value = response.count\n  noValidAddresses.value = response.noValidAddresses\n}\n\n//Validations\nconst {required} = useValidators()\nconst rules = {\n  addressType: {\n    required: required('Delivery method'),\n  },\n}\nconst $v = useVuelidate(rules, model, {$autoDirty: true})\n\n//Watchers\nwatch([\n  () => model.value.addressType,\n  () => model.value.learnerIds,\n  () => model.value.cohortIds,\n], () => {\n  fetchMissingAddressCount()\n}, {deep: true})\n\n//Lifecycle\nonMounted(async () => {\n  const response = await coursesApi.previewEnrollmentsAreProcessing(course.value.id)\n  isProcessing.value = response.processing\n  isLoading.value = false\n})\n\n//Load dropdowns\nloadChannels()\nloadCohorts()\n</script>\n\n<template>\n  <SidePanel\n    limited-width\n    is-centered\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Preview course\"\n        icon=\"preview\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <Spinner v-if=\"isLoading\" />\n    <Alert\n      v-else-if=\"isProcessing\"\n      type=\"warning\"\n      text=\"Learners have been enrolled, and the preview schedule is processing. You can enroll more learners once it's complete.\"\n    />\n    <FlowStep v-else>\n      <PageBlock>\n        <template #header>\n          <PageBlockHeader header=\"Send a course preview\">\n            <template #subheaderText>\n              <small text-muted>\n                Send a test version to yourself or a colleague.\n              </small>\n              <Alert text=\"Previews will send immediately on an 'instant cadence', overriding any active enrollments for testers on Teams, Slack, or for a specific SMS Channel.\" />\n            </template>\n          </PageBlockHeader>\n        </template>\n        <FormField\n          is-required\n          label=\"Delivery method\"\n          :errors=\"$v.addressType.$errors\"\n        >\n          <SelectInput\n            test-id=\"deliveryMethodSelect\"\n            :value=\"model.addressType\"\n            :is-clearable=\"false\"\n            :has-error=\"$v.addressType.$error\"\n            :options=\"limitedAddressOptions\"\n            @input=\"updateModel({addressType: $event.value})\"\n          />\n        </FormField>\n        <FormField\n          v-if=\"model.addressType === addressTypes.SMS && channels.length\"\n          is-optional\n          label=\"Channel\"\n          sub-label=\"Choose a specific channel for SMS delivery\"\n        >\n          <SelectInput\n            label-prop=\"name\"\n            value-prop=\"id\"\n            test-id=\"channelSelect\"\n            :options=\"channels\"\n            :value=\"model.channelId\"\n            placeholder=\"Select or type a channel name\"\n            @input=\"updateModel({channelId: $event.value})\"\n          />\n        </FormField>\n        <FormField label=\"Select individuals\">\n          <LearnerSelectInput\n            test-id=\"learnerSelect\"\n            is-multi-select\n            :value=\"model.learners\"\n            @input=\"updateModel({learnerIds: $event.value, learners: $event.options})\"\n          />\n        </FormField>\n        <FormField label=\"Select cohorts\">\n          <SelectInput\n            test-id=\"cohortSelect\"\n            :options=\"cohorts\"\n            :value=\"model.cohortIds\"\n            value-prop=\"id\"\n            label-prop=\"name\"\n            is-multi-select\n            placeholder=\"Select or type a cohort name\"\n            @input=\"updateModel({cohortIds: $event.value})\"\n          />\n        </FormField>\n        <Alert\n          v-if=\"missingAddressCount\"\n          type=\"warning\"\n          :text=\"missingAddressWarning\"\n        />\n      </PageBlock>\n      <template #footer>\n        <FlowNavigation\n          :can-confirm=\"true\"\n          :is-disabled-confirm=\"disableConfirm\"\n          :has-spinner-confirm=\"isCreatingEnrollments\"\n          label-confirm=\"Send now\"\n          @confirm=\"confirm()\"\n          @cancel=\"$emit('close')\"\n        />\n      </template>\n    </FlowStep>\n  </SidePanel>\n</template>\n","import {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {watch} from 'vue'\n\n/**\n * Automatically set course author on model if needed\n */\nexport function useCourseAuthor(model) {\n\n  //Get user and organization\n  const {user} = useCurrentUser()\n  const {organization} = useCurrentOrganization()\n\n  //Update when user/organization have been loaded\n  watch([user, organization], () => {\n    if (user.value && organization.value) {\n      if (!model.value.author) {\n        //NOTE: Don't want to use display_name here because we don't want to use\n        //email address or ID as author name.\n        if (user.value.firstName && user.value.lastName) {\n          model.value.author = `${user.value.firstName} ${user.value.lastName}`\n        }\n        else {\n          model.value.author = organization.value.name\n        }\n      }\n    }\n  }, {immediate: true})\n}\n","import {coursesApi} from '@/api/courses.api.js'\nimport {Course} from '@/models/course.model.js'\nimport {useCourseAuthor} from '@/composables/use-course-author.js'\nimport {useCourseStepManagement} from '@/composables/use-course-step-management.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, watch} from 'vue'\n\n/**\n * Course editing composable\n */\nexport function useCourseEditing(course, model) {\n\n  //Composables\n  const {sanitizeSteps} = useCourseStepManagement()\n  const {setFlashFailure, setFlashSuccess} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Must have course model\n  if (!(model.value instanceof Course)) {\n    throw new Error(`Must pass Course instance as model`)\n  }\n\n  //Ensure author is set\n  useCourseAuthor(model)\n\n  //Update course on server\n  const isSavingCourse = ref(false)\n  const updateCourse = async (options = {}) => {\n\n    //Check if nudge\n    const isNudge = model.value.isNudge\n\n    //Merge options with defaults\n    options = {\n      updateSilently: true,\n      updateModelAfterSave: true,\n      successMessage: `${isNudge ? 'Nudge' : 'Course'} updated`,\n      failureMessage: `Failed to update ${isNudge ? 'nudge' : 'course'}`,\n      ...options,\n    }\n\n    //Must have course\n    if (!(course.value instanceof Course)) {\n      throw new Error(`Must have course reference loaded`)\n    }\n\n    //Extract data for update\n    const {id} = course.value\n    const data = model.value.toJson()\n\n    //Check if we have any new steps or substeps. In that case, we must update\n    //the model after save, as the server will assign new IDs to these steps\n    //which we need to persist in the model.\n    if (model.value.hasNewStepsOrSubsteps) {\n      options.updateModelAfterSave = true\n    }\n\n    //Previously, we assumed that the model would always get updated after adding\n    //a step, but this doesn't happen for published courses, as the course has\n    //content errors at that stage due to blank prompt/repsonse fields. So the\n    //client would not perform the save, and subsequent auto saves would not\n    //persist the new step ID onto the model, causing new steps to be created\n    //with every auto save as they were sent back to the server without ID.\n    //SEE https://linear.app/arist/issue/DEV-15447\n\n    //Log for debugging\n    // console.log('UPDATING COURSE:')\n    // console.log('  - Silently?', options.updateSilently)\n    // console.log('  - Update model after save?', options.updateModelAfterSave)\n    // console.log('  - Data:', data)\n\n    //Toggle flag and reset unsaved changes\n    isSavingCourse.value = true\n    model.value.hasUnsavedChanges = false\n\n    //Update\n    try {\n      const updated = await coursesApi.updateById(id, data)\n      course.value = updated\n      if (options.updateModelAfterSave) {\n        model.value = course.value.clone()\n      }\n      else {\n        // Always make sure the isPassingValidations flag is updated\n        model.value.isPassingValidations = course.value.isPassingValidations\n      }\n      if (!options.updateSilently) {\n        setFlashSuccess(options.successMessage)\n      }\n    }\n    catch (error) {\n      if (!options.updateSilently) {\n        setFlashFailure(options.failureMessage)\n        processError(error)\n        throw error\n      }\n    }\n    finally {\n      isSavingCourse.value = false\n    }\n  }\n\n  //Update model\n  const updateModel = data => {\n    // console.log('UPDATING MODEL WITH GIVEN DATA:')\n    // console.log('  - Data: ', data)\n    Object.assign(model.value, data)\n    model.value.steps = sanitizeSteps(model.value.steps)\n    model.value.hasUnsavedChanges = true\n  }\n\n  //Update initial model value once course has loaded\n  //NOTE: This will no longer update the model each time the course is saved,\n  //due to problems this caused with the course builder and user content\n  //potentially being overwritten when they keep typing while a save was in\n  //progress. Instead, we selectively update the local model for non-silent\n  //saves only.\n  watch(course, (newValue, oldValue) => {\n    if (newValue && !oldValue) {\n      model.value = course.value.clone()\n    }\n  })\n\n  //Expose interface\n  return {\n    updateModel,\n    updateCourse,\n    isSavingCourse,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CourseEditDetailsStep from '@/components/courses/CourseEditDetailsStep.vue'\nimport CourseEditLessonsStep from '@/components/courses/CourseEditLessonsStep.vue'\nimport CourseEditNudgeStep from '@/components/courses/CourseEditNudgeStep.vue'\nimport CourseAIPromptsPanel from '@/components/courses/editor/CourseAIPromptsPanel.vue'\nimport CourseEditReferencesPanel from '@/components/courses/editor/CourseEditReferencesPanel.vue'\nimport CoursePreviewPanel from '@/components/courses/editor/CoursePreviewPanel.vue'\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport {Course} from '@/models/course.model.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {courseEditFlowSteps} from '@/constants/courses.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCourseEditing} from '@/composables/use-course-editing.js'\nimport {useSavingFlags} from '@/composables/use-saving-flags.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref, computed, watch, watchEffect, onMounted} from 'vue'\n\n//Routing\nconst {routeParams, replaceRoute} = useRouting()\nconst {id} = routeParams.value\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Edit course')\n\n//Error handling\nconst {processError} = useErrorHandling()\n\n//Step management\nconst {\n  steps,\n  setSteps,\n  activeStep,\n  checkStepActive,\n  goToStep,\n  goToNextStep,\n  goToPrevStep,\n  isGoingBack,\n} = useSteps([\n  {\n    key: courseEditFlowSteps.DETAILS,\n    label: 'Course details',\n    icon: 'description',\n    isClickable: true,\n    route: {\n      name: 'course-edit.details',\n      allowEntry: true,\n    },\n  },\n  {\n    key: courseEditFlowSteps.LESSONS,\n    label: 'Lessons',\n    icon: 'school',\n    isClickable: true,\n    route: {\n      name: 'course-edit.lessons',\n      allowEntry: true,\n    },\n  },\n])\n\n//Step shortcut flags\nconst isEditingDetails = computed(() => activeStep.value.key === courseEditFlowSteps.DETAILS)\nconst isEditingLessons = computed(() => activeStep.value.key === courseEditFlowSteps.LESSONS)\n\n//Refs\nconst course = ref(null)\nconst isLoading = ref(true)\n\n//Load course\nconst loadCourse = () => coursesApi\n  .findById(id)\n  .then(item => course.value = item)\n  .catch(() => replaceRoute('courses-overview'))\n  .finally(() => isLoading.value = false)\n\n//Model ref\nconst model = ref(Course.createFrom({}))\n\n//Check if user can schedule\nconst {user, canManageSchedules, canEditTemplateLibrary} = useCurrentUser()\nconst canSchedule = computed(() => canManageSchedules.value && model.value?.canSchedule)\n\n//Once course and current user are loaded, verify that the course is editable\nwatch([course, user], () => {\n  if (course.value && user.value && !course.value.isEditable && !canEditTemplateLibrary.value) {\n    replaceRoute({name: 'course-view', params: {id}})\n  }\n})\n\n//Once the course is loaded, we double check if it's clear of validation errors and\n//trigger a save if the course was just cloned. This prevents the passing validations\n//flag from lingering in \"true\" state when the course is in fact passing all validations.\n//I've also added a check for this on the backend, but this is a nice safety net.\n//SEE: https://linear.app/arist/issue/DEV-16162\nwatch(model, () => {\n  if (!model.value.isPassingValidations && !model.value.hasValidationErrors) {\n    model.value.hasUnsavedChanges = true\n    saveCourse()\n  }\n})\n\n//Once the course is loaded and we know if it's a nudge, we can set the steps\n//and header correclty\nconst isNudge = computed(() => model.value.isNudge)\nwatch(isNudge, () => {\n  if (isNudge.value) {\n    setHeader('Edit nudge')\n    setSteps([\n      {\n        key: courseEditFlowSteps.NUDGE,\n        label: 'Nudge details',\n        icon: 'description',\n        route: {\n          name: 'course-edit.details',\n          allowEntry: true,\n        },\n      },\n    ])\n    goToStep(courseEditFlowSteps.NUDGE)\n  }\n})\n\n//Mark course as reviewed\nconst requiresReview = computed(() => model.value.requiresReview)\nwatchEffect(() => {\n  if (requiresReview.value && isEditingLessons.value) {\n    updateModelAndSave({requiresReview: false})\n  }\n})\n\n//Collect nested validations\nconst $v = useVuelidate()\n\n//Check if we're in an invalid state. This is used to prevent navigation and\n//auto saves when editing course details. When we're editing lessons, we will\n//no longer prevent saves in an invalid state to avoid the user from potentially\n//losing some work.\nconst isInvalidState = computed(() => {\n  if (isEditingDetails.value) {\n    return $v.value.$invalid\n  }\n  return false\n})\n\n//Course editing\nconst {\n  updateModel,\n  updateCourse,\n  isSavingCourse,\n} = useCourseEditing(course, model)\n\n//Saved indicator\nconst {isSaved, toggleSaved} = useSavingFlags()\n\n//Save course wrapper\nconst saveCourse = async options => {\n\n  //No unsaved changes\n  if (!model.value.hasUnsavedChanges) {\n    console.warn('No unsaved changes on model, not saving')\n    return\n  }\n\n  //Save already in progress\n  if (isSavingCourse.value) {\n    console.warn('Save already in progress, not saving')\n    return\n  }\n\n  //Hard invalid state\n  if (isInvalidState.value) {\n    console.warn('Invalid state, not saving')\n    throw new Error(`Invalid course state, not saving`)\n  }\n\n  //Save\n  await updateCourse(options)\n  toggleSaved()\n}\n\n//Save draft wrapper\nconst isSavingDraft = ref(false)\nconst saveDraft = async options => {\n  try {\n    isSavingDraft.value = true\n    await saveCourse(options)\n  }\n  catch (error) {\n    console.warn('Error while saving draft')\n    processError(error)\n  }\n  finally {\n    isSavingDraft.value = false\n  }\n}\n\n//Save draft in background\nconst saveDraftInBackground = useDebounceFn(async () => {\n  await saveDraft({\n    updateSilently: true,\n    updateModelAfterSave: false,\n  })\n  toggleSaved()\n}, 3000)\n\n//Update model and save\nconst updateModelAndSave = (data, saveInBackground = true) => {\n  updateModel(data)\n  if (saveInBackground) {\n    saveDraftInBackground()\n  }\n  else {\n    saveDraft()\n  }\n}\n\n//Navigation\nconst {\n  goToScheduleCourse,\n  goToCoursesOverview,\n  goToModifyCourseWithAI,\n} = useNavigation()\n\n//Helper methods\nconst continueFromDetailsStep = async () => {\n  try {\n    await saveCourse({updateSilently: false})\n    goToNextStep()\n  }\n  catch {\n    //Fall through\n  }\n}\nconst saveAndSchedule = async () => {\n  try {\n    await saveCourse({updateSilently: false})\n    if (canSchedule.value) {\n      if (course.value.hasValidationErrors) {\n        return showValidationErrorsWarning()\n      }\n      goToScheduleCourse(course.value.id, course.value.firstDistributionId)\n    }\n    else {\n      goToCoursesOverview()\n    }\n  }\n  catch {\n    //Fall through\n  }\n}\n\n//Go to given step if state is valid\nconst goToStepIfValid = step => {\n  if (!isInvalidState.value) {\n    goToStep(step)\n  }\n}\n\n//Show AI prompts\nconst {\n  isValue: isShowingAIPrompts,\n  setTrue: showAIPrompts,\n  setFalse: hideAIPrompts,\n} = useValueToggle()\n\n//Show references\nconst {\n  isValue: isShowingReferences,\n  setTrue: showReferences,\n  setFalse: hideReferences,\n} = useValueToggle()\n\n//Show preview\nconst {\n  isValue: isShowingPreview,\n  setTrue: showPreview,\n  setFalse: hidePreview,\n} = useValueToggle()\n\n//Show validation errors warning\nconst {\n  isValue: isShowingValidationErrorsWarning,\n  setTrue: showValidationErrorsWarning,\n  setFalse: hideValidationErrorsWarning,\n} = useValueToggle()\n\n//Load course on mount\nonMounted(loadCourse)\n</script>\n\n<template>\n  <PageWrapper with-footer>\n    <Flow\n      :is-loading=\"isLoading\"\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n      :is-going-back=\"isGoingBack\"\n      @go-to-step=\"goToStepIfValid($event.step)\"\n    >\n      <CourseEditDetailsStep\n        v-if=\"course && checkStepActive(courseEditFlowSteps.DETAILS)\"\n        :course=\"course\"\n        :model=\"model\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingCourse\"\n        :is-saving-draft=\"isSavingDraft\"\n        @view-prompts=\"showAIPrompts()\"\n        @view-references=\"showReferences()\"\n        @update=\"updateModelAndSave($event.data, true)\"\n        @continue=\"continueFromDetailsStep()\"\n        @back=\"goToCoursesOverview()\"\n      />\n      <CourseEditLessonsStep\n        v-else-if=\"course && checkStepActive(courseEditFlowSteps.LESSONS)\"\n        :course=\"course\"\n        :model=\"model\"\n        :can-schedule=\"canSchedule\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingCourse\"\n        :is-saving-draft=\"isSavingDraft\"\n        @view-prompts=\"showAIPrompts()\"\n        @view-references=\"showReferences()\"\n        @update=\"updateModelAndSave($event.data, $event.saveInBackground)\"\n        @confirm=\"saveAndSchedule()\"\n        @back=\"goToPrevStep()\"\n        @preview=\"showPreview()\"\n      />\n      <CourseEditNudgeStep\n        v-else-if=\"course && checkStepActive(courseEditFlowSteps.NUDGE)\"\n        :course=\"course\"\n        :model=\"model\"\n        :is-saved=\"isSaved\"\n        :is-saving=\"isSavingCourse\"\n        :is-saving-draft=\"isSavingDraft\"\n        @view-prompts=\"showAIPrompts()\"\n        @view-references=\"showReferences()\"\n        @update=\"updateModelAndSave($event.data, true)\"\n        @confirm=\"saveAndSchedule()\"\n        @preview=\"showPreview()\"\n        @back=\"goToCoursesOverview()\"\n      />\n    </Flow>\n\n    <WarningModal\n      header=\"Course has content errors\"\n      :is-open=\"isShowingValidationErrorsWarning\"\n      warning=\"This course contains content errors, which can impact delivery to learners. Please fix these errors to ensure all active schedules deliver properly.\"\n      label-confirm=\"Schedule anyway\"\n      label-cancel=\"Keep editing\"\n      can-confirm\n      @close=\"hideValidationErrorsWarning()\"\n      @confirm=\"goToScheduleCourse(course.id, course.firstDistributionId)\"\n    />\n\n    <template #sidePanels>\n      <CourseAIPromptsPanel\n        v-if=\"isShowingAIPrompts\"\n        :data=\"course.aiPrompts\"\n        show-outline\n        @close=\"hideAIPrompts()\"\n        @edit=\"goToModifyCourseWithAI({courseId: course.id}, $event)\"\n      />\n      <CourseEditReferencesPanel\n        v-else-if=\"isShowingReferences\"\n        :model=\"model\"\n        @update=\"updateModelAndSave($event.data, false)\"\n        @close=\"hideReferences()\"\n      />\n      <CoursePreviewPanel\n        v-else-if=\"isShowingPreview\"\n        :course=\"course\"\n        @close=\"hidePreview()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport {Course} from '@/models/course.model.js'\nimport {ref, toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'close',\n])\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n})\n\n//Extract citations from model\nconst {course} = toRefs(props)\nconst citations = ref(course.value.citations.map(text => ({text})))\n</script>\n\n<template>\n  <SidePanel\n    limited-width\n    is-centered\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"References\"\n        icon=\"edit_note\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <FlowStep>\n      <PageBlock header=\"Course references\">\n        <p>\n          <small\n            v-if=\"citations.length === 0\"\n            text-muted\n          >No references</small>\n        </p>\n        <p\n          v-for=\"(citation, i) in citations\"\n          :key=\"i\"\n        >\n          {{ citation }}\n        </p>\n      </PageBlock>\n\n      <template #footer>\n        <FlowNavigation\n          :can-cancel=\"true\"\n          label-cancel=\"Close\"\n          @cancel=\"$emit('close')\"\n        />\n      </template>\n    </FlowStep>\n  </SidePanel>\n</template>\n","<script setup>\nimport PageSection from '@/components/shared/page/PageSection.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport LanguageName from '@/components/shared/transform/LanguageName.vue'\nimport {Course} from '@/models/course.model.js'\nimport {useContentTypes} from '@/composables/use-content-types.js'\nimport {useOrganizationTags} from '@/composables/use-organization-tags.js'\nimport {computed, toRefs, onMounted} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n})\n\n//Refs\nconst {course} = toRefs(props)\nconst isNudge = computed(() => course.value?.isNudge)\nconst noun = computed(() => isNudge.value ? 'Nudge' : 'Course')\n\n//Tags and content types\nconst {organizationTags, loadOrganizationTags, isLoadingOrganizationTags} = useOrganizationTags()\nconst {contentTypes, loadContentTypes, isLoadingContentTypes} = useContentTypes()\n\n//Load organization tags and content types\nonMounted(() => {\n  loadOrganizationTags()\n  loadContentTypes()\n})\n</script>\n\n<template>\n  <PageSection :header=\"`${noun} details`\">\n    <FormField label=\"Author name\">\n      <p>{{ course.author }}</p>\n    </FormField>\n\n    <FormField :label=\"`${noun} language`\">\n      <p>\n        <LanguageName :language=\"course.language\" />\n      </p>\n    </FormField>\n\n    <FormField\n      v-if=\"course.tagIds.length > 0\"\n      label=\"Topic tags\"\n    >\n      <Spinner v-if=\"isLoadingOrganizationTags\" />\n      <p v=\"e;se\">\n        <LabelValue\n          :value=\"course.tagIds\"\n          :options=\"organizationTags\"\n          value-prop=\"id\"\n        />\n      </p>\n    </FormField>\n\n    <FormField\n      v-if=\"course.externalId\"\n      label=\"External ID\"\n    >\n      <p>\n        {{ course.externalId }}\n      </p>\n    </FormField>\n\n    <FormField label=\"Content type\">\n      <Spinner v-if=\"isLoadingContentTypes\" />\n      <p v-else>\n        <LabelValue\n          :value=\"course.contentTypeId\"\n          :options=\"contentTypes\"\n          value-prop=\"id\"\n        />\n      </p>\n    </FormField>\n  </PageSection>\n</template>\n","<script setup>\nimport PageSection from '@/components/shared/page/PageSection.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport CourseSubstepName from '@/components/courses/CourseSubstepName.vue'\nimport CourseSubstepInfoAlert from '@/components/courses/CourseSubstepInfoAlert.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseSubstep} from '@/models/course-substep.model.js'\nimport {useAlphabet} from '@/composables/use-alphabet.js'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\nimport {ref, computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  substep: {\n    type: CourseSubstep,\n    required: true,\n  },\n  substepIndex: {\n    type: Number,\n    default: -1,\n  },\n})\n\n//Refs\nconst {course, substep, substepIndex} = toRefs(props)\n\n//Alphabet\nconst language = computed(() => course.value.language)\nconst {getAlphabetLetterForIndex} = useAlphabet(language)\n\n//Focus on block\nconst substepBlock = ref(null)\nconst {scrollIntoView} = useScrollIntoView()\nconst focus = () => scrollIntoView(substepBlock)\n\n//Expose to parent\ndefineExpose({\n  focus,\n})\n</script>\n\n<template>\n  <PageSection ref=\"substepBlock\">\n    <template #header>\n      <CourseSubstepName\n        :substep=\"substep\"\n        :substep-index=\"substepIndex\"\n      />\n    </template>\n\n    <CourseSubstepInfoAlert :substep=\"substep\" />\n\n    <FormField :label=\"substep.promptDisplayName\">\n      <Markdown :content=\"substep.body\" />\n    </FormField>\n\n    <template v-if=\"substep.isMultipleChoice\">\n      <template\n        v-for=\"(answer, answerIndex) in substep.answers\"\n        :key=\"answerIndex\"\n      >\n        <FormField\n          :label=\"`Answer (${getAlphabetLetterForIndex(answerIndex)})`\"\n          :text-danger=\"!answer.isCorrect\"\n          :text-success=\"answer.isCorrect\"\n        >\n          <p>\n            {{ answer.choice }}\n            <small v-if=\"answer.isCorrect\">(correct)</small>\n            <small v-else>(incorrect)</small>\n          </p>\n        </FormField>\n        <FormField\n          v-if=\"!substep.isMultiSelect\"\n          label=\"Response to learner\"\n        >\n          <Markdown :content=\"answer.response\" />\n        </FormField>\n      </template>\n\n      <FormField\n        v-if=\"substep.successResponse\"\n        label=\"Response to learners who answer with all options correctly\"\n      >\n        <Markdown :content=\"substep.successResponse\" />\n      </FormField>\n\n      <FormField\n        v-if=\"substep.failureResponse\"\n        label=\"Response to learners who answer partially or fully incorrectly\"\n      >\n        <Markdown :content=\"substep.failureResponse\" />\n      </FormField>\n    </template>\n\n    <template v-else>\n      <FormField\n        v-if=\"substep.aiEvaluatedExampleAnswer\"\n        label=\"Example of a correct answer\"\n      >\n        <Markdown :content=\"substep.aiEvaluatedExampleAnswer\" />\n      </FormField>\n\n      <FormField\n        v-if=\"substep.response\"\n        label=\"Response to learner\"\n      >\n        <Markdown :content=\"substep.response\" />\n      </FormField>\n\n      <FormField\n        v-if=\"substep.successResponse\"\n        label=\"Response to learners who answer correctly\"\n      >\n        <Markdown :content=\"substep.successResponse\" />\n      </FormField>\n\n      <FormField\n        v-if=\"substep.failureResponse\"\n        label=\"Response to learners who answer incorrectly\"\n      >\n        <Markdown :content=\"substep.failureResponse\" />\n      </FormField>\n    </template>\n  </PageSection>\n</template>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageSection from '@/components/shared/page/PageSection.vue'\nimport PageImage from '@/components/shared/page/PageImage.vue'\nimport CourseSubstepViewBlock from '@/components/courses/view/CourseSubstepViewBlock.vue'\nimport {Course} from '@/models/course.model.js'\nimport {CourseStep} from '@/models/course-step.model.js'\nimport {useScrollIntoView} from '@/composables/use-scroll-into-view.js'\nimport {useElementVisibility} from '@vueuse/core'\nimport {ref, computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n  step: {\n    type: CourseStep,\n    required: true,\n  },\n})\n\n//Refs\nconst {course, step} = toRefs(props)\nconst surveySubsteps = computed(() =>\n  step.value.surveySubsteps.filter(substep => !substep.isBaselineConfidenceLift)\n)\n\n//Scroll into view\nconst {scrollIntoView} = useScrollIntoView()\n\n//Block refs\nconst stepBlock = ref(null)\nconst substepBlocks = ref([])\nconst surveySubstepBlocks = ref([])\nconst baselineConfidenceBlock = ref(null)\n\n//Check if block is visible\nconst isVisible = useElementVisibility(stepBlock)\n\n//Focus on current step\nconst focus = () => scrollIntoView(stepBlock)\n\n//Focus on substep\nconst focusOnSubstep = substep => {\n  if (!substep) {\n    return\n  }\n  else if (substep.isSurvey) {\n    if (substep.isBaselineConfidenceLift) {\n      baselineConfidenceBlock.value?.focus()\n      return\n    }\n    const i = step.value.surveySubsteps.findIndex(s => s === substep)\n    surveySubstepBlocks.value[i]?.focus()\n  }\n  else {\n    const i = step.value.questions.findIndex(s => s.id === substep.id)\n    substepBlocks.value[i]?.focus()\n  }\n}\n\n//Expose to parent\ndefineExpose({\n  focus,\n  focusOnSubstep,\n  isVisible,\n})\n</script>\n\n<template>\n  <PageBlock\n    ref=\"stepBlock\"\n    :header=\"step.name\"\n  >\n    <PageSection v-if=\"step.imageUrl\">\n      <PageImage :image-url=\"step.imageUrl\" />\n    </PageSection>\n\n    <CourseSubstepViewBlock\n      v-if=\"step.passiveSubstep\"\n      :course=\"course\"\n      :substep=\"step.passiveSubstep\"\n    />\n\n    <CourseSubstepViewBlock\n      v-if=\"step.hasBaselineConfidenceLift\"\n      ref=\"baselineConfidenceBlock\"\n      :course=\"course\"\n      :substep=\"step.confidenceLiftSubstep\"\n    />\n\n    <CourseSubstepViewBlock\n      v-for=\"(substep, substepIndex) in step.questions\"\n      ref=\"substepBlocks\"\n      :key=\"substepIndex\"\n      :course=\"course\"\n      :step=\"step\"\n      :substep=\"substep\"\n      :substep-index=\"substepIndex\"\n    />\n\n    <CourseSubstepViewBlock\n      v-for=\"(substep, surveySubstepIndex) in surveySubsteps\"\n      ref=\"surveySubstepBlocks\"\n      :key=\"surveySubstepIndex\"\n      :course=\"course\"\n      :substep=\"substep\"\n    />\n  </PageBlock>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageSection from '@/components/shared/page/PageSection.vue'\nimport PageImage from '@/components/shared/page/PageImage.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport ViewPromptsButton from '@/components/courses/editor/ViewPromptsButton.vue'\nimport ViewReferencesButton from '@/components/courses/editor/ViewReferencesButton.vue'\nimport CourseOutline from '@/components/courses/editor/CourseOutline.vue'\nimport CourseAIPromptsPanel from '@/components/courses/editor/CourseAIPromptsPanel.vue'\nimport CourseViewReferencesPanel from '@/components/courses/view/CourseViewReferencesPanel.vue'\nimport CourseDetailsViewSection from '@/components/courses/view/CourseDetailsViewSection.vue'\nimport CourseStepViewBlock from '@/components/courses/view/CourseStepViewBlock.vue'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useScroll, useElementVisibility} from '@vueuse/core'\nimport {ref, unref, computed, watch, onMounted} from 'vue'\n\n//Routing\nconst {routeParams, replaceRoute} = useRouting()\nconst {id} = routeParams.value\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('View course')\n\n//Refs\nconst course = ref(null)\nconst isLoading = ref(true)\nconst isNudge = computed(() => course.value?.isNudge)\nconst noun = computed(() => isNudge.value ? 'Nudge' : 'Course')\nconst steps = computed(() => course.value?.steps || [])\nconst activationStep = computed(() => steps.value.find(step => step.isActivation))\nconst activationSubstep = computed(() => activationStep.value?.substeps[0])\n\n//Navigation\nconst {\n  goToScheduleCourse,\n  goToCoursesOverview,\n  goToModifyCourseWithAI,\n} = useNavigation()\n\n//Check if user can schedule\nconst {canManageSchedules} = useCurrentUser()\nconst canSchedule = computed(() => canManageSchedules.value && course.value?.canSchedule)\n\n//Load course\nconst loadCourse = () => coursesApi\n  .findById(id)\n  .then(item => course.value = item)\n  .catch(() => replaceRoute('courses-overview'))\n  .finally(() => isLoading.value = false)\n\n//Once the course is loaded and we know if it's a nudge, we can set the header\nwatch(isNudge, () => {\n  if (isNudge.value) {\n    setHeader('View nudge')\n  }\n})\n\n//Show AI prompts\nconst {\n  isValue: isShowingAIPrompts,\n  setTrue: showAIPrompts,\n  setFalse: hideAIPrompts,\n} = useValueToggle()\n\n//Show references\nconst {\n  isValue: isShowingReferences,\n  setTrue: showReferences,\n  setFalse: hideReferences,\n} = useValueToggle()\n\n//Scroll helpers\nconst stepBlocks = ref([])\n\n//Helper to get step block for given step\nconst getStepBlock = step => {\n  step = unref(step)\n  if (step) {\n    const i = course.value.lessons.findIndex(s => s === step)\n    return stepBlocks.value[i]\n  }\n}\n\n//Expand/focus on step\nconst focusOnStep = step => getStepBlock(step)?.focus()\n\n//Focus on substep\nconst focusOnSubstep = substep => {\n  substep = unref(substep)\n  if (substep) {\n    const i = course.value.lessons.findIndex(s => s === (\n      substep.isBaselineConfidenceLift ? course.value.firstLesson : course.value.lastLesson\n    ))\n    stepBlocks.value[i]?.focusOnSubstep(substep)\n  }\n}\n\n//Details block\nconst detailsBlock = ref(null)\nconst isDetailsBlockVisible = useElementVisibility(detailsBlock)\n\n//Track highlighted step\nconst highlightedStep = ref(null)\nconst determineHighlightedStep = () => {\n  if (isDetailsBlockVisible.value) {\n    highlightedStep.value = null\n    return\n  }\n  stepBlocks.value.forEach((block, i) => {\n    if (block.isVisible) {\n      highlightedStep.value = course.value.lessons[i]\n    }\n  })\n}\n\n//Update when scrolling\nconst {isScrolling} = useScroll(window)\nwatch(isScrolling, determineHighlightedStep)\n\n//Load on mount\nonMounted(loadCourse)\n</script>\n\n<template>\n  <PageWrapper\n    v-if=\"course\"\n    with-footer\n  >\n    <FlowStep sticky-footer>\n      <template #outline>\n        <CourseOutline\n          :course=\"course\"\n          :highlighted-step=\"highlightedStep\"\n          with-sticky-footer\n          @view-step=\"focusOnStep($event.step)\"\n          @view-substep=\"focusOnSubstep($event.substep)\"\n        />\n      </template>\n\n      <PageBlock\n        ref=\"detailsBlock\"\n        :header=\"course.name\"\n      >\n        <template #headerAside>\n          <ViewPromptsButton\n            v-if=\"course.aiPrompts\"\n            @click=\"showAIPrompts()\"\n          />\n          <ViewReferencesButton @click=\"showReferences()\" />\n        </template>\n\n        <Alert\n          v-if=\"!course.isEditable\"\n          type=\"warning\"\n        >\n          <span v-if=\"course.isArchived\">Archived courses</span>\n          <span v-else>This course</span> can not be edited.\n          <span v-if=\"canSchedule\">Please continue to scheduling to use this course.</span>\n          <span v-if=\"course.isArchived\">Please restore this course first to use it again.</span>\n        </Alert>\n\n        <PageSection v-if=\"course.imageUrl\">\n          <PageImage :image-url=\"course.imageUrl\" />\n        </PageSection>\n\n        <PageSection :header=\"`${noun} description`\">\n          <Markdown :content=\"course.description\" />\n        </PageSection>\n\n        <CourseDetailsViewSection :course=\"course\" />\n\n        <PageSection\n          v-if=\"activationSubstep.body\"\n          header=\"Activation message\"\n        >\n          <Markdown :content=\"activationSubstep.body\" />\n        </PageSection>\n      </PageBlock>\n\n      <CourseStepViewBlock\n        v-for=\"(step, stepIndex) in course.lessons\"\n        :key=\"stepIndex\"\n        ref=\"stepBlocks\"\n        :course=\"course\"\n        :step=\"step\"\n      />\n\n      <template #footer>\n        <FlowNavigation\n          :can-confirm=\"canSchedule\"\n          :can-go-back=\"true\"\n          label-confirm=\"Schedule\"\n          @confirm=\"goToScheduleCourse(course.id, course.firstDistributionId)\"\n          @back=\"goToCoursesOverview()\"\n        />\n      </template>\n    </FlowStep>\n\n    <template #sidePanels>\n      <CourseAIPromptsPanel\n        v-if=\"isShowingAIPrompts\"\n        :data=\"course.aiPrompts\"\n        @close=\"hideAIPrompts()\"\n        @edit=\"goToModifyCourseWithAI({courseId: course.id}, $event)\"\n      />\n      <CourseViewReferencesPanel\n        v-else-if=\"isShowingReferences\"\n        :course=\"course\"\n        @close=\"hideReferences()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n","import {coursesApi} from '@/api/courses.api.js'\nimport {Course} from '@/models/course.model.js'\nimport {useCourseAuthor} from '@/composables/use-course-author.js'\nimport {useCourseStepManagement} from '@/composables/use-course-step-management.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Course creation composable\n */\nexport function useCourseCreation(model) {\n\n  //Composables\n  const {sanitizeSteps} = useCourseStepManagement()\n  const {setFlashFailure, setFlashSuccess} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Must have course model\n  if (!(model.value instanceof Course)) {\n    throw new Error(`Must pass Course instance as model`)\n  }\n\n  //Ensure author is set\n  useCourseAuthor(model)\n\n  //Save course on server\n  const isSavingCourse = ref(false)\n  const saveCourse = async (options = {}) => {\n\n    //Check if nudge\n    const isNudge = model.value.isNudge\n\n    //Merge options with defaults\n    options = {\n      successMessage: `${isNudge ? 'Nudge' : 'Course'} created`,\n      failureMessage: `Failed to create ${isNudge ? 'nudge' : 'course'}`,\n      ...options,\n    }\n\n    //Toggle flag and commence update\n    isSavingCourse.value = true\n\n    //Extract data for update\n    const data = model.value.toJson()\n\n    //Update\n    try {\n      const course = await coursesApi.create(data)\n      setFlashSuccess(options.successMessage)\n      return course\n    }\n    catch (error) {\n      setFlashFailure(options.failureMessage)\n      processError(error)\n      throw error\n    }\n    finally {\n      isSavingCourse.value = false\n    }\n  }\n\n  //Update model\n  const updateModel = data => {\n    model.value = model.value.clone(data)\n    model.value.steps = sanitizeSteps(model.value.steps)\n    model.value.hasUnsavedChanges = true\n  }\n\n  //Expose interface\n  return {\n    updateModel,\n    saveCourse,\n    isSavingCourse,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport Flow from '@/components/shared/flow/Flow.vue'\nimport CourseEditDetailsStep from '@/components/courses/CourseEditDetailsStep.vue'\nimport CourseEditNudgeStep from '@/components/courses/CourseEditNudgeStep.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCourseCreation} from '@/composables/use-course-creation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {courseEditFlowSteps} from '@/constants/courses.js'\nimport {Course} from '@/models/course.model.js'\nimport {ref, computed} from 'vue'\n\n//Routing\nconst {queryParams} = useRouting()\nconst {isNudge, folderId} = queryParams.value\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader(`Create ${isNudge ? 'nudge' : 'course'}`)\n\n//Step management\nconst {\n  steps,\n  activeStep,\n} = useSteps(isNudge ? [\n  {\n    key: courseEditFlowSteps.NUDGE,\n    label: 'Nudge details',\n    icon: 'description',\n    route: {\n      name: 'course-create',\n    },\n  },\n] : [\n  {\n    key: courseEditFlowSteps.DETAILS,\n    label: 'Course details',\n    icon: 'description',\n    route: {\n      name: 'course-create',\n    },\n  },\n  {\n    //NOTE: This second step is just here for show, as we'll redirect to the\n    //edit flow once the course has been created with initial data\n    key: courseEditFlowSteps.LESSONS,\n    label: 'Lessons',\n    icon: 'school',\n  },\n])\n\n//Model ref\nconst model = ref(Course.createFrom({\n  isNudge: isNudge || false,\n  folderId: folderId || null,\n}))\n\n//Course creation\nconst {\n  updateModel,\n  saveCourse,\n  isSavingCourse,\n} = useCourseCreation(model)\n\n//Check if user can schedule\nconst {canManageSchedules} = useCurrentUser()\nconst canSchedule = computed(() => canManageSchedules.value && model.value?.canSchedule)\n\n//Navigation\nconst {\n  goToEditCourseLessons,\n  goToScheduleCourse,\n  goToCoursesOverview,\n} = useNavigation()\n\n//Saving\nconst saveAndEditLessons = async () => {\n  try {\n    const course = await saveCourse()\n    goToEditCourseLessons(course.id)\n  }\n  catch {\n    //Handled by the useCourseCreation composable\n  }\n}\nconst saveAndSchedule = async () => {\n  try {\n    const course = await saveCourse()\n    if (canSchedule.value) {\n      goToScheduleCourse(course.id, course.firstDistributionId)\n    }\n    else {\n      goToCoursesOverview()\n    }\n  }\n  catch {\n    //Handled by the useCourseCreation composable\n  }\n}\n</script>\n\n<template>\n  <PageWrapper with-footer>\n    <Flow\n      :steps=\"steps\"\n      :active-step=\"activeStep\"\n    >\n      <CourseEditDetailsStep\n        v-if=\"!isNudge\"\n        :model=\"model\"\n        :is-saving=\"isSavingCourse\"\n        is-create-flow\n        @update=\"updateModel($event.data)\"\n        @continue=\"saveAndEditLessons()\"\n        @back=\"goToCoursesOverview()\"\n      />\n      <CourseEditNudgeStep\n        v-else\n        :model=\"model\"\n        :can-schedule=\"canSchedule\"\n        :is-saving=\"isSavingCourse\"\n        is-create-flow\n        @update=\"updateModel($event.data)\"\n        @confirm=\"saveAndSchedule()\"\n        @back=\"goToCoursesOverview()\"\n      />\n    </Flow>\n  </PageWrapper>\n</template>\n","<template>\n  <div\n    :class=\"$style.grid\"\n    class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-[18px] mb-[10px]\"\n  >\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.grid {\n  &:not(:last-child) {\n    margin-bottom: 2rem;\n  }\n}\n</style>\n","<script setup>\nimport IconTile from '@/components/shared/icons/IconTile.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n  'dragenter',\n  'dragleave',\n  'dragover',\n  'dragstart',\n  'drop',\n])\nconst props = defineProps({\n  header: {\n    type: String,\n    default: '',\n  },\n  tags: {\n    type: Array,\n    default: () => [],\n  },\n  isClickable: {\n    type: Boolean,\n    default: true,\n  },\n  withMinHeight: {\n    type: Boolean,\n    default: false,\n  },\n  showTooltip: {\n    type: Boolean,\n    default: true,\n  },\n})\n\n//Get refs\nconst {isClickable} = toRefs(props)\nconst handleClick = event => {\n  if (isClickable.value && !event.defaultPrevented) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    class=\"cardStyles cols-span-1\"\n    :class=\"{\n      [$style.card]: true,\n      [$style.minHeight]: withMinHeight,\n      [$style.clickable]: isClickable,\n    }\"\n    v-bind=\"$attrs\"\n    @click=\"handleClick($event)\"\n    @dragenter.prevent=\"$emit('dragenter', $event)\"\n    @dragleave.prevent=\"$emit('dragleave', $event)\"\n    @dragover.prevent=\"$emit('dragover', $event)\"\n    @dragstart=\"$emit('dragstart', $event)\"\n    @drop=\"$emit('drop', $event)\"\n  >\n    <div\n      v-if=\"header\"\n      :class=\"{\n        [$style.header]: true,\n        [$style.minHeight]: withMinHeight,\n      }\"\n    >\n      <IconTile\n        v-if=\"$slots.icon\"\n        size=\"l\"\n      >\n        <slot name=\"icon\" />\n      </IconTile>\n\n      <div :class=\"$style.headerText\">\n        <Tooltip\n          :text=\"header\"\n          :is-disabled=\"!showTooltip\"\n          :show-delay=\"500\"\n        >\n          <strong :class=\"$style.name\">\n            {{ header }}\n          </strong>\n        </Tooltip>\n        <div\n          v-if=\"tags.length > 0\"\n          :class=\"$style.tags\"\n        >\n          <div\n            v-for=\"(tag, index) in tags\"\n            :key=\"index\"\n            :class=\"$style.tag\"\n            :title=\"tag.label\"\n          >\n            <small>{{ tag.label }}</small>\n          </div>\n        </div>\n      </div>\n      <div\n        v-if=\"$slots.itemActions\"\n        :class=\"$style.itemActions\"\n      >\n        <slot name=\"itemActions\" />\n      </div>\n    </div>\n\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.card {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 1rem !important;\n  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;\n  border-radius: var(--border-radius-m);\n  &.clickable {\n    cursor: pointer;\n  }\n  &.minHeight {\n    min-height: 224px; //Prevent cards from collapsing\n  }\n}\n.header {\n  pointer-events: none; //To prevent element from interfering with dragenter events on parent card\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  width: 100%;\n  &.minHeight {\n    height: 64px; //To keep the card height consistent, even if a course doesn't have tags or only a short title\n    align-items: flex-start;\n  }\n}\n.headerText {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  pointer-events: auto;\n}\n.itemActions {\n  margin-left: 0.25rem;\n  display: flex;\n  gap: 0.5rem;\n  align-items: center;\n  pointer-events: auto;\n}\n.name {\n  color: var(--color-text);\n  font-size: var(--font-size-text-normal);\n  /* Fallback for non-webkit browsers */\n  display: block;\n  text-overflow: ellipsis;\n  max-height: 42px;\n  line-height: 21px;\n\n  /* For non webkit browsers, it does not seem possible to have a multi-line\n  text limitation with ellipsis */\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\na:hover .name {\n  color: var(--color-text) !important;\n}\n.tags {\n  display: flex;\n  flex-wrap: wrap;\n  color: var(--color-text-link);\n  margin-top: 0.25rem;\n  gap: 0 0.5rem;\n}\n.tag {\n  &:not(:last-child):after {\n    display: inline-block;\n    content: ',';\n  }\n}\n</style>\n","<script setup>\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  status: {\n    type: String,\n    default: '',\n  },\n  customLabel: {\n    type: String,\n    default: '',\n  },\n})\n\n//Determine label\nconst {status, customLabel} = toRefs(props)\nconst label = computed(() => {\n  if (customLabel.value) {\n    return customLabel.value\n  }\n  switch (status.value) {\n    case 'published':\n      return 'Published'\n    case 'draft':\n      return 'Draft'\n    case 'nudge':\n      return 'Nudge'\n    case 'template':\n      return 'Template'\n    case 'archived':\n      return 'Archived'\n    case 'generating':\n      return 'Generating'\n    case 'waiting_for_review':\n      return 'Waiting for review'\n    default:\n      return 'Other'\n  }\n})\n</script>\n\n<template>\n  <div\n    v-if=\"label\"\n    :class=\"{\n      [$style.label]: true,\n      [$style[status]]: !!status,\n    }\"\n  >\n    <small>{{ label }}</small>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.label {\n  display: flex;\n  align-items: center;\n  padding: 0.25rem 0.5rem;\n  color: var(--white);\n  border-radius: 0.25rem;\n  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);\n  background-color: var(--bg-course-status-default);\n  &.published {\n    background-color: var(--bg-course-status-published);\n  }\n  &.draft {\n    background-color: var(--bg-course-status-draft);\n  }\n  &.nudge {\n    background-color: var(--bg-course-status-nudge);\n  }\n  &.template {\n    background-color: var(--bg-course-status-template);\n  }\n  &.archived {\n    background-color: var(--bg-course-status-archived);\n  }\n  &.generating, &.waiting_for_review {\n    background-color: var(--bg-course-status-generating);\n  }\n}\n</style>\n","import {computed} from 'vue'\n\n/**\n * Element bounding composable. This is needed because the composable\n * from @vueuse/core doesn't account for null refs or comment refs (with v-if)\n */\nexport function useElementBounding(elementRef) {\n\n  //Get bounding rectabnle of element\n  const rect = computed(() => {\n    if (typeof elementRef.value?.$el.getBoundingClientRect === 'function') {\n      return elementRef.value.$el.getBoundingClientRect()\n    }\n    return {}\n  })\n\n  //Compute individual properties\n  const x = computed(() => rect.value.x)\n  const y = computed(() => rect.value.y)\n  const top = computed(() => rect.value.top)\n  const right = computed(() => rect.value.right)\n  const bottom = computed(() => rect.value.bottom)\n  const left = computed(() => rect.value.left)\n  const width = computed(() => rect.value.width)\n  const height = computed(() => rect.value.height)\n\n  //Expose interface\n  return {\n    x,\n    y,\n    top,\n    right,\n    bottom,\n    left,\n    width,\n    height,\n  }\n}\n","<script setup>\nimport Dropdown from '@/components/shared/dropdown/Dropdown.vue'\nimport DropdownMenu from '@/components/shared/dropdown/DropdownMenu.vue'\nimport {useElementBounding} from '@/composables/use-element-bounding.js'\nimport {ref, computed} from 'vue'\n\n//Emits and props\ndefineProps({\n  isVisible: {\n    type: Boolean,\n    default: false,\n  },\n  hide: {\n    type: Function,\n    required: true,\n  },\n})\n\n//Determine element bounding and alignment\nconst dropdown = ref(null)\nconst {right} = useElementBounding(dropdown)\nconst alignment = computed(() => {\n  if (right.value > window.innerWidth) {\n    return 'left'\n  }\n  return 'right'\n})\n</script>\n\n<template>\n  <Dropdown\n    ref=\"dropdown\"\n    :class=\"{\n      [$style.dropdown]: true,\n      [$style[alignment]]: true,\n    }\"\n    :is-visible=\"isVisible\"\n  >\n    <DropdownMenu\n      ref=\"menu\"\n      @click=\"hide()\"\n    >\n      <slot />\n    </DropdownMenu>\n  </Dropdown>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  margin-top: -2.25rem;\n  box-shadow: var(--box-shadow-strong);\n  &.left {\n    right: calc(100% - 0.5rem);\n  }\n  &.right {\n    left: calc(100% - 0.5rem);\n  }\n}\n</style>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport ActionsDropdownMenuNested from '@/components/shared/dropdown/ActionsDropdownMenuNested.vue'\nimport {Course} from '@/models/course.model.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\n\n//Emits and props\ndefineEmits([\n  'organize',\n  'toggle-favorite',\n  'clone-to-drafts',\n  'email',\n  'create-template',\n  'archive',\n  'restore',\n])\ndefineProps({\n  course: {\n    type: Course,\n    required: true,\n  },\n})\n\n//User data\nconst {canEditTemplateLibrary, hasEmail} = useCurrentUser()\nconst {isAiEnabled} = useCurrentOrganization()\n\n//Navigation\nconst {\n  goToTranslateCourseWithAI,\n  goToModifyCourseWithAI,\n  goToViewCourse,\n  goToEditCourse,\n  goToAnalyzeCourse,\n  goToScheduleCourse,\n} = useNavigation()\n</script>\n\n<template>\n  <ActionsDropdownMenu v-bind=\"$attrs\">\n    <template v-if=\"!course.isArchived\">\n      <DropdownMenuItem\n        v-if=\"course.isEditable || canEditTemplateLibrary\"\n        label=\"Edit\"\n        @click=\"goToEditCourse(course.id, $event)\"\n      />\n      <DropdownMenuItem\n        label=\"View\"\n        @click=\"goToViewCourse(course.id, $event)\"\n      />\n      <DropdownMenuItem\n        v-if=\"course.hasDistributions\"\n        label=\"Analyze\"\n        @click=\"goToAnalyzeCourse(course.id, $event)\"\n      />\n      <DropdownMenuItem\n        label=\"Delivery options\"\n        @click=\"goToScheduleCourse(course.id, course.firstDistributionId, $event)\"\n      />\n      <DropdownMenuItem\n        label=\"Organize\"\n        @click=\"$emit('organize', $event)\"\n      />\n      <DropdownMenuItem\n        :label=\"`${course.isFavorite ? 'Remove from' : 'Add to'} favorites`\"\n        @click=\"$emit('toggle-favorite', $event)\"\n      />\n\n      <template v-if=\"!course.isHbr\">\n        <DropdownMenuItem\n          v-if=\"isAiEnabled\"\n          label=\"Translate\"\n          @click=\"goToTranslateCourseWithAI({courseId: course.id}, $event)\"\n        />\n        <DropdownMenuItem\n          v-if=\"isAiEnabled && !course.isNudge\"\n          label=\"Version\"\n          @click=\"goToModifyCourseWithAI({courseId: course.id}, $event)\"\n        />\n        <DropdownMenuItem\n          label=\"Clone to drafts\"\n          @click=\"$emit('clone-to-drafts', $event)\"\n        />\n        <DropdownMenuItem\n          v-if=\"hasEmail\"\n          label=\"Email course\"\n        >\n          <template #nested=\"{isVisible, hide}\">\n            <ActionsDropdownMenuNested\n              :is-visible=\"isVisible\"\n              :hide=\"hide\"\n            >\n              <DropdownMenuItem\n                label=\"as PDF\"\n                @click=\"$emit('email', {format: 'pdf'})\"\n              />\n              <DropdownMenuItem\n                label=\"as Word document (.docx)\"\n                @click=\"$emit('email', {format: 'docx'})\"\n              />\n            </ActionsDropdownMenuNested>\n          </template>\n        </DropdownMenuItem>\n      </template>\n\n      <DropdownMenuItem\n        v-if=\"canEditTemplateLibrary\"\n        label=\"Create template\"\n        @click=\"$emit('create-template', $event)\"\n      />\n      <DropdownMenuItem\n        label=\"Archive\"\n        :is-disabled=\"course.isUpdatingStatus\"\n        @click=\"$emit('archive', $event)\"\n      />\n    </template>\n\n    <template v-else>\n      <DropdownMenuItem\n        label=\"View\"\n        @click=\"goToViewCourse(course.id, $event)\"\n      />\n      <DropdownMenuItem\n        label=\"Restore\"\n        :is-disabled=\"course.isUpdatingStatus\"\n        @click=\"$emit('restore', $event)\"\n      />\n    </template>\n  </ActionsDropdownMenu>\n</template>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport ActionsDropdownMenuNested from '@/components/shared/dropdown/ActionsDropdownMenuNested.vue'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\n\n//Emits and props\ndefineEmits([\n  'lock',\n  'unlock',\n  'clone-template',\n  'use-template',\n  'archive',\n  'restore',\n  'email',\n])\ndefineProps({\n  course: {\n    type: Object,\n    required: true,\n  },\n})\n\n//User data\nconst {canEditTemplateLibrary, hasEmail} = useCurrentUser()\n\n//Navigation\nconst {\n  goToTranslateCourseWithAI,\n  goToModifyCourseWithAI,\n  goToEditCourse,\n  goToContentLibraryView,\n} = useNavigation()\n</script>\n\n<template>\n  <ActionsDropdownMenu>\n    <template v-if=\"!course.isArchived\">\n      <template v-if=\"canEditTemplateLibrary\">\n        <DropdownMenuItem\n          label=\"Edit\"\n          @click=\"goToEditCourse(course.id, $event)\"\n        />\n        <DropdownMenuItem\n          label=\"View\"\n          @click=\"goToViewCourse(course.id, $event)\"\n        />\n        <DropdownMenuItem\n          v-if=\"course.isLocked\"\n          label=\"Unlock\"\n          @click=\"$emit('unlock', $event)\"\n        />\n        <DropdownMenuItem\n          v-else\n          label=\"Lock\"\n          @click=\"$emit('lock', $event)\"\n        />\n        <DropdownMenuItem\n          label=\"Clone template\"\n          @click=\"$emit('clone-template', $event)\"\n        />\n        <DropdownMenuItem\n          label=\"Archive\"\n          :is-disabled=\"course.isUpdatingStatus\"\n          @click=\"$emit('archive', $event)\"\n        />\n      </template>\n\n      <DropdownMenuItem\n        label=\"Use course\"\n        @click=\"$emit('use-template', $event)\"\n      />\n      <DropdownMenuItem\n        label=\"Learn more\"\n        @click=\"goToContentLibraryView(course.id, $event)\"\n      />\n      <template v-if=\"!course.isHbr\">\n        <DropdownMenuItem\n          label=\"Translate\"\n          @click=\"goToTranslateCourseWithAI({courseId: course.id}, $event)\"\n        />\n        <DropdownMenuItem\n          v-if=\"!course.isNudge\"\n          label=\"Version\"\n          @click=\"goToModifyCourseWithAI({courseId: course.id}, $event)\"\n        />\n      </template>\n      <DropdownMenuItem\n        v-if=\"hasEmail && (!course.isHbr || course.isHbr && canEditTemplateLibrary)\"\n        label=\"Email course\"\n      >\n        <template #nested=\"{isVisible, hide}\">\n          <ActionsDropdownMenuNested\n            :is-visible=\"isVisible\"\n            :hide=\"hide\"\n          >\n            <DropdownMenuItem\n              label=\"as PDF\"\n              @click=\"$emit('email', {format: 'pdf'})\"\n            />\n            <DropdownMenuItem\n              label=\"as Word document (.docx)\"\n              @click=\"$emit('email', {format: 'docx'})\"\n            />\n          </ActionsDropdownMenuNested>\n        </template>\n      </DropdownMenuItem>\n    </template>\n\n    <DropdownMenuItem\n      v-else-if=\"canEditTemplateLibrary\"\n      label=\"Restore\"\n      :is-disabled=\"course.isUpdatingStatus\"\n      @click=\"$emit('restore', $event)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","<script setup>\nimport Alert from '@/components/shared/core/Alert.vue'\nimport GridCard from '@/components/shared/cards/GridCard.vue'\nimport CourseImage from '@/components/courses/CourseImage.vue'\nimport CourseStatus from '@/components/courses/CourseStatus.vue'\nimport CourseActionsMenu from '@/components/courses/CourseActionsMenu.vue'\nimport CourseTemplateActionsMenu from '@/components/courses/cards/CourseTemplateActionsMenu.vue'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {Course} from '@/models/course.model.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'archive',\n  'clone-to-drafts',\n  'use-template',\n  'clone-template',\n  'create-template',\n  'dragstart',\n  'email',\n  'organize',\n  'restore',\n  'lock',\n  'unlock',\n  'toggle-favorite',\n])\nconst props = defineProps({\n  course: {\n    type: [Course, Object], //NOTE: Temporarily allow object for template courses overview\n    required: true,\n  },\n  index: {\n    type: Number,\n    default: -1,\n  },\n})\n\n//Edit handling\nconst {course} = toRefs(props)\nconst {canEditTemplateLibrary} = useCurrentUser()\nconst {goToViewCourse, goToEditCourse} = useNavigation()\n\n//Handle click\nconst handleClick = event => {\n  if (course.value.isEditable && (!course.value.isTemplate || canEditTemplateLibrary.value)) {\n    goToEditCourse(course.value.id, event)\n  }\n  else {\n    goToViewCourse(course.value.id, event)\n  }\n}\n</script>\n\n<template>\n  <GridCard\n    v-bind=\"$attrs\"\n    :has-error=\"!course.isPassingValidations\"\n    :header=\"course.name\"\n    :tags=\"course.tags\"\n    with-min-height\n    @click=\"handleClick($event)\"\n    @dragstart=\"$emit('dragstart', $event)\"\n  >\n    <template #itemActions>\n      <CourseActionsMenu\n        v-if=\"!course.isTemplate\"\n        :course=\"course\"\n        :test-id=\"`courseActionsMenu${index + 1}`\"\n        @organize=\"$emit('organize', $event)\"\n        @archive=\"$emit('archive', $event)\"\n        @restore=\"$emit('restore', $event)\"\n        @toggle-favorite=\"$emit('toggle-favorite', $event)\"\n        @create-template=\"$emit('create-template', $event)\"\n        @clone-to-drafts=\"$emit('clone-to-drafts', $event)\"\n        @email=\"$emit('email', $event)\"\n      />\n      <CourseTemplateActionsMenu\n        v-else\n        :course=\"course\"\n        :test-id=\"`courseTemplateActionsMenu${index + 1}`\"\n        @lock=\"$emit('lock', $event)\"\n        @unlock=\"$emit('unlock', $event)\"\n        @archive=\"$emit('archive', $event)\"\n        @restore=\"$emit('restore', $event)\"\n        @use-template=\"$emit('use-template', $event)\"\n        @clone-template=\"$emit('clone-template', $event)\"\n        @email=\"$emit('email', $event)\"\n      />\n    </template>\n\n    <div :class=\"$style.banner\">\n      <CourseImage :src=\"course.imageUrl\" />\n      <div :class=\"$style.overlay\">\n        <CourseStatus :status=\"course.status\" />\n        <CourseStatus\n          v-if=\"course.isTemplate\"\n          status=\"template\"\n        />\n        <CourseStatus\n          v-if=\"course.isNudge\"\n          status=\"nudge\"\n        />\n      </div>\n    </div>\n\n    <div\n      v-if=\"course.requiresReview\"\n      :class=\"$style.error\"\n    >\n      <Alert\n        text=\"Human review needed\"\n        type=\"warning\"\n      />\n    </div>\n    <div\n      v-else-if=\"!course.isPassingValidations\"\n      :class=\"$style.error\"\n    >\n      <Alert\n        text=\"Course has content errors\"\n        type=\"warning\"\n      />\n    </div>\n  </GridCard>\n</template>\n\n<style module lang=\"scss\">\n.banner {\n  margin-top: 1rem;\n  position: relative;\n  min-height: 110px;\n  aspect-ratio: 16 / 9;\n  width: 100%;\n}\n.overlay {\n  position: absolute;\n  left: 0.5rem;\n  bottom: 0.5rem;\n  display: flex;\n  align-items: center;\n  flex-wrap: wrap;\n  gap: 0.5rem;\n}\n.error {\n  margin-top: 0.75rem;\n  width: 100%;\n}\n</style>\n","<script setup>\nimport GridCard from '@/components/shared/cards/GridCard.vue'\nimport CourseStatus from '@/components/courses/CourseStatus.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport GenericActionsDropdownMenu from '@/components/shared/dropdown/GenericActionsDropdownMenu.vue'\nimport {LLMTask} from '@/models/llm-task.model.js'\nimport {aiTaskTypes, aiTaskStatuses} from '@/constants/ai.js'\nimport {languageOptions} from '@/constants/languages.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {ref, toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'remove',\n])\nconst props = defineProps({\n  llmTask: {\n    type: LLMTask,\n    required: true,\n  },\n  index: {\n    type: Number,\n    default: -1,\n  },\n})\n\n//Get refs\nconst {llmTask} = toRefs(props)\nconst taskType = computed(() => llmTask.value.taskType)\nconst sourceName = computed(() => llmTask.value.sourceCourseName)\nconst topic = computed(() => llmTask.value.parameters?.topic)\nconst targetLanguage = computed(() => llmTask.value.parameters?.targetLanguage)\nconst name = computed(() => {\n  if (taskType.value === aiTaskTypes.COURSE_TRANSLATION) {\n    const lang = languageOptions\n      .find(option => option.value === targetLanguage.value)\n    return `${lang?.label} ${sourceName.value}`\n  }\n  else if (taskType.value === aiTaskTypes.COURSE_MODIFICATION) {\n    return `New version of ${sourceName.value}`\n  }\n  return topic.value || 'New course'\n})\n\n//Tags\nconst tags = ref([{label: 'AI generated'}])\n\n//Status\nconst needsReview = computed(() => llmTask.value.status === aiTaskStatuses.WAITING_FOR_REVIEW)\nconst isGenerating = computed(() => !needsReview.value)\n\n//View handling\nconst {\n  goToBuildCourseWithAIGenerationStep,\n  goToTranslateCourseWithAIGenerationStep,\n  goToModifyCourseWithAIGenerationStep,\n} = useNavigation()\nconst view = event => {\n  if (taskType.value === aiTaskTypes.COURSE_TRANSLATION) {\n    goToTranslateCourseWithAIGenerationStep(llmTask.value.id, event)\n  }\n  else if (taskType.value === aiTaskTypes.COURSE_MODIFICATION) {\n    goToModifyCourseWithAIGenerationStep(llmTask.value.id, event)\n  }\n  else {\n    goToBuildCourseWithAIGenerationStep(llmTask.value.id, event)\n  }\n}\n</script>\n\n<template>\n  <GridCard\n    :header=\"name\"\n    is-clickable\n    with-min-height\n    :tags=\"tags\"\n    @click=\"view($event)\"\n  >\n    <template #itemActions>\n      <GenericActionsDropdownMenu\n        can-view\n        :can-remove=\"needsReview\"\n        label-remove=\"Delete\"\n        :test-id=\"`llmTaskActionsMenu${index + 1}`\"\n        @view=\"view($event)\"\n        @remove=\"$emit('remove')\"\n      />\n    </template>\n\n    <div :class=\"$style.banner\">\n      <Icon\n        icon=\"smart_toy\"\n        size=\"xxxl\"\n        color=\"primaryMuted\"\n        is-outlined\n        :class=\"$style.icon\"\n      />\n      <div :class=\"$style.overlay\">\n        <CourseStatus\n          v-if=\"isGenerating\"\n          status=\"generating\"\n        />\n        <CourseStatus\n          v-else-if=\"needsReview\"\n          status=\"waiting_for_review\"\n        />\n        <Spinner\n          v-if=\"isGenerating\"\n          color=\"primaryMuted\"\n        />\n      </div>\n    </div>\n  </GridCard>\n</template>\n\n<style module lang=\"scss\">\n.banner {\n  margin-top: 1rem;\n  position: relative;\n  min-height: 110px;\n  aspect-ratio: 16 / 9;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: var(--bg-highlight);\n}\n.overlay {\n  position: absolute;\n  left: 0.5rem;\n  bottom: 0.5rem;\n  right: 0.5rem;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 1rem;\n}\n.icon {\n  opacity: 0.15;\n}\n</style>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Folder model\n */\nexport class Folder extends BaseModel {\n\n  //Flag for identification\n  get isFolder() {\n    return true\n  }\n\n  //Icon for search results\n  get icon() {\n    return 'folder'\n  }\n\n  //Display name\n  get displayName() {\n    if (this.name) {\n      return this.name\n    }\n    return `(Unnamed)`\n  }\n}\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {\n  courseFilterStatusOptions,\n  courseFilterTypeOptions,\n  courseFilterTypes,\n  courseFilterTabs\n} from '@/constants/courses.js'\nimport {useOrganizationTags} from '@/composables/use-organization-tags.js'\nimport {useGlobalTags} from '@/composables/use-global-tags.js'\nimport {toRefs, computed, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\nconst props = defineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Get refs\nconst {activeFilter} = toRefs(props)\nconst isShowingArchived = computed(() => activeFilter.value.tab === courseFilterTabs.ARCHIVED)\nconst isShowingFolders = computed(() => activeFilter.value.type === courseFilterTypes.FOLDERS)\n\n//Load global tags and organization tags (minus globals)\nconst {globalTags, loadGlobalTags} = useGlobalTags()\nconst {organizationTags, loadOrganizationTags} = useOrganizationTags(false)\n\n//Selected global and org tags\nconst selectedGlobalTags = computed(() => activeFilter.value.selectedTags\n  .filter(id => globalTags.value.some(globalTag => globalTag.id === id))\n)\nconst selectedOrgTags = computed(() => activeFilter.value.selectedTags\n  .filter(id => organizationTags.value.some(orgTag => orgTag.id === id))\n)\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n\n//Helpers to toggle tags\nconst updateGlobalTags = globalTagValues => {\n  changeFilter('selectedTags', [...selectedOrgTags.value, ...globalTagValues])\n}\nconst updateOrgTags = orgTagValues => {\n  changeFilter('selectedTags', [...selectedGlobalTags.value, ...orgTagValues])\n}\n\n//Load tags\nonMounted(() => {\n  loadGlobalTags()\n  loadOrganizationTags()\n})\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    test-id=\"courseFiltersDropdown\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Type\">\n      <PillButtonList\n        :value=\"activeFilter.type\"\n        :options=\"courseFilterTypeOptions\"\n        can-reset\n        @input=\"changeFilter('type', $event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"!isShowingFolders && !isShowingArchived\"\n      label=\"Status\"\n    >\n      <PillButtonList\n        :value=\"activeFilter.status\"\n        :options=\"courseFilterStatusOptions\"\n        can-reset\n        @input=\"changeFilter('status', $event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"globalTags.length > 0 && !isShowingFolders\"\n      label=\"Topics\"\n    >\n      <PillButtonList\n        :value=\"selectedGlobalTags\"\n        :options=\"globalTags\"\n        value-prop=\"id\"\n        is-multi-select\n        @input=\"updateGlobalTags($event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"organizationTags.length > 0 && !isShowingFolders\"\n      label=\"Tags\"\n    >\n      <PillButtonList\n        :value=\"selectedOrgTags\"\n        :options=\"organizationTags\"\n        value-prop=\"id\"\n        is-multi-select\n        @input=\"updateOrgTags($event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","<script setup>\nimport FlashMessage from '@/components/shared/core/FlashMessage.vue'\nimport FlashMessageContainer from '@/components/shared/core/FlashMessageContainer.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {onMounted, toRefs, ref, nextTick} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n  'close',\n  'undo',\n])\nconst props = defineProps({\n  timeout: {\n    type: Number,\n    default: 5000,\n  },\n  type: {\n    type: String,\n    default: 'success',\n  },\n})\n\n//Get refs\nconst {timeout} = toRefs(props)\nconst isVisible = ref(false)\n\n//Make visible after short delay\nnextTick(() => isVisible.value = true)\n\n//Set timeout to close the message again\nonMounted(() => {\n  if (timeout.value > 0) {\n    setTimeout(() => {\n      isVisible.value = false\n      emit('close')\n    }, timeout.value)\n  }\n})\n</script>\n\n<template>\n  <FlashMessageContainer>\n    <FlashMessage\n      v-if=\"isVisible\"\n      v-bind=\"$attrs\"\n      :type=\"type\"\n      :is-static=\"!timeout\"\n      @click=\"$emit('click', $event)\"\n      @close=\"$emit('close', $event)\"\n    >\n      <slot />\n      <template #action>\n        <Icon\n          test-id=\"undoIcon\"\n          icon=\"undo\"\n          size=\"m\"\n          is-clickable\n          @click=\"$emit('undo', $event)\"\n        />\n      </template>\n    </FlashMessage>\n  </FlashMessageContainer>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport ModalBlockButton from '@/components/shared/modals/ModalBlockButton.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\ndefineEmits([\n  'create-using-ai',\n])\ndefineProps({\n  folderId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Settings and navigation\nconst {isNudgesEnabled, isAiEnabled} = useCurrentOrganization()\nconst {goToContentLibraryOverview, goToCreateCourse} = useNavigation()\n</script>\n\n<template>\n  <FlowStep>\n    <FlexColumn>\n      <ModalBlockButton\n        v-if=\"isAiEnabled\"\n        header=\"Build with AI\"\n        subheader=\"Create courses faster - let AI handle the first draft.\"\n        icon=\"smart_toy\"\n        link=\"Get started with AI\"\n        @click=\"$emit('create-using-ai')\"\n      />\n      <ModalBlockButton\n        header=\"Course from scratch\"\n        subheader=\"Jump right in and build some great learning!\"\n        icon=\"construction\"\n        link=\"Get started\"\n        @click=\"goToCreateCourse({folderId}, $event)\"\n      />\n      <ModalBlockButton\n        header=\"Course by pulling from content library\"\n        subheader=\"Pick a premade course and customize as you'd like.\"\n        icon=\"content_paste\"\n        link=\"Pull from library\"\n        @click=\"goToContentLibraryOverview($event)\"\n      />\n      <ModalBlockButton\n        v-if=\"isNudgesEnabled\"\n        header=\"Nudge\"\n        subheader=\"Send a quick message to learners\"\n        icon=\"transition_push\"\n        link=\"Send a quick message\"\n        @click=\"goToCreateCourse({folderId, isNudge: true}, $event)\"\n      />\n    </FlexColumn>\n  </FlowStep>\n</template>\n","<script setup>\nimport FlowStep from '@/components/shared/flow/FlowStep.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport ModalBlockButton from '@/components/shared/modals/ModalBlockButton.vue'\nimport {useNavigation} from '@/composables/use-navigation.js'\n\n//Emits and props\ndefineProps({\n  folderId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Navigation\nconst {\n  goToBuildCourseWithAI,\n  goToTranslateCourseWithAI,\n  goToModifyCourseWithAI,\n} = useNavigation()\n</script>\n\n<template>\n  <FlowStep>\n    <FlexColumn>\n      <ModalBlockButton\n        header=\"Build a course\"\n        subheader=\"Jump right in and build some great learning!\"\n        icon=\"construction\"\n        link=\"Get started\"\n        @click=\"goToBuildCourseWithAI({folderId}, $event)\"\n      />\n      <ModalBlockButton\n        header=\"Translate a course\"\n        subheader=\"Select the languages for AI translation of a specific course.\"\n        icon=\"translate\"\n        link=\"Translate with AI\"\n        @click=\"goToTranslateCourseWithAI({folderId}, $event)\"\n      />\n      <ModalBlockButton\n        header=\"Modify an existing course\"\n        subheader=\"Create a new version of an existing course for a different audience or specific focus.\"\n        icon=\"contract_edit\"\n        link=\"Modify course\"\n        @click=\"goToModifyCourseWithAI({folderId}, $event)\"\n      />\n    </FlexColumn>\n  </FlowStep>\n</template>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport FlowSteps from '@/components/shared/flow/FlowSteps.vue'\nimport CourseCreateManualOptionsStep from '@/components/courses/modals/CourseCreateManualOptionsStep.vue'\nimport CourseCreateAIOptionsStep from '@/components/courses/modals/CourseCreateAIOptionsStep.vue'\nimport {useSteps} from '@/composables/use-steps.js'\nimport {courseCreateModalFlowSteps} from '@/constants/courses.js'\nimport BackButton from '@/components/shared/buttons/BackButton.vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'open',\n])\ndefineProps({\n  folderId: {\n    type: String,\n    default: '',\n  },\n})\n\n//Steps and navigation\nconst {\n  checkStepActive,\n  goToNextStep,\n  goToPrevStep,\n  goToFirstStep,\n  isGoingBack,\n} = useSteps([\n  {key: courseCreateModalFlowSteps.MANUAL},\n  {key: courseCreateModalFlowSteps.AI},\n])\n\n// Handle events\nconst handleClose = () => {\n  goToFirstStep()\n  emit('close')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    close-on-click-outside\n    close-on-key\n    :class=\"$style.modal\"\n    @close=\"handleClose()\"\n    @open=\"$emit('open')\"\n  >\n    <template #header>\n      <h3 v-if=\"checkStepActive(courseCreateModalFlowSteps.MANUAL)\">\n        Create new\n      </h3>\n      <div\n        v-else-if=\"checkStepActive(courseCreateModalFlowSteps.AI)\"\n        :class=\"$style.header\"\n      >\n        <BackButton @click=\"goToPrevStep()\" />\n        <h3>\n          Build a course with AI\n        </h3>\n      </div>\n    </template>\n    <FlowSteps :is-going-back=\"isGoingBack\">\n      <CourseCreateManualOptionsStep\n        v-if=\"checkStepActive(courseCreateModalFlowSteps.MANUAL)\"\n        :folder-id=\"folderId\"\n        @create-using-ai=\"goToNextStep()\"\n      />\n      <CourseCreateAIOptionsStep\n        v-else-if=\"checkStepActive(courseCreateModalFlowSteps.AI)\"\n        :folder-id=\"folderId\"\n      />\n    </FlowSteps>\n  </modal>\n</template>\n\n<style module lang=\"scss\">\n.modal {\n  @media (min-width: 800px) {\n    height: 600px; /* Fixed height to minimize modal jumping in size between steps */\n    width: 800px;\n    max-width: none;\n  }\n}\n.header {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n}\n</style>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {Folder} from '@/models/folder.model.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {ref, computed, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'update',\n])\nconst props = defineProps({\n  folder: {\n    type: Folder,\n    default: null,\n  },\n  isSaving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {folder} = toRefs(props)\nconst isEdit = computed(() => !!folder.value)\nconst model = ref({\n  name: '',\n})\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Folder name'),\n  },\n}, model, {$autoDirty: true})\n\n//Update name\nconst updateName = name => model.value.name = name\n\n//Save handler\nconst confirm = () => emit('update', {model: model.value})\n\n//Open handler\nconst onOpen = () => {\n  if (folder.value) {\n    updateName(folder.value.name)\n  }\n  else {\n    updateName('')\n  }\n  $v.value.name.$reset()\n  emit('open')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    :header=\"isEdit ? 'Rename folder' : 'Create a new folder'\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"onOpen()\"\n  >\n    <FormField\n      label=\"Name\"\n      :errors=\"$v.name.$errors\"\n    >\n      <TextInput\n        ref=\"nameInput\"\n        test-id=\"name\"\n        :value=\"model.name\"\n        maxlength=\"30\"\n        minlength=\"2\"\n        name=\"name\"\n        required\n        type=\"text\"\n        focus-on-mount\n        :has-error=\"$v.name.$error\"\n        @input=\"updateName($event.value)\"\n        @focus=\"$event.target.select()\"\n        @keydown.enter=\"confirm()\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isSaving || $v.$invalid\"\n        :has-spinner-confirm=\"isSaving\"\n        :label-confirm=\"isEdit ? 'Rename' : 'Create folder'\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Folder} from '@/models/folder.model.js'\n\n/**\n * Folders API service\n */\nexport class FoldersApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/folders'\n  itemKey = 'folder'\n  itemsKey = 'folders'\n  ModelClass = Folder\n\n  /**\n   * Archive\n   */\n  archiveFolder(folderId) {\n    return this\n      .post(`/${folderId}/archive`)\n  }\n\n  /**\n   * Restore\n   */\n  restoreFolder(folderId) {\n    return this\n      .post(`/${folderId}/restore`)\n  }\n\n  /**\n   * Toggle favorite\n   */\n  toggleFavorite(folderId, isFavorite) {\n    return this\n      .post(`/${folderId}/toggle_favorite`, {folder: {isFavorite}})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Get folder path\n   */\n  getFolderPath(folderId) {\n    return this\n      .get(`/${folderId}/path`)\n      .then(json => json.path.map(folder => this.toModelInstance({folder})))\n  }\n}\n\n//Export singleton instance\nexport const foldersApi = new FoldersApi()\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport ListItem from '@/components/shared/search/ListItem.vue'\nimport ListItemsContainer from '@/components/shared/search/ListItemsContainer.vue'\nimport {foldersApi} from '@/api/folders.api.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {toRefs, ref, watch, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  item: {\n    type: Object,\n    default: null,\n  },\n})\n\n//Refs\nconst {item} = toRefs(props)\nconst show = ref(true)\nconst search = ref('')\nconst targetFolder = ref(undefined)\nconst allFolders = ref([])\nconst header = computed(() => `Move \"${item.value?.displayName || 'item'}\"`)\n\n//Computed\nconst currentFolder = computed(() => {\n  if (item.value?.folderId) {\n    return allFolders.value.find(folder => folder.id === item.value.folderId)\n  }\n  return null\n})\nconst parentFolder = computed(() => {\n  if (currentFolder.value?.folderId) {\n    return allFolders.value.find(folder => folder.id === currentFolder.value.folderId)\n  }\n  return null\n})\nconst validFolders = computed(() => {\n  if (item.value?.isFolder) {\n    const invalid = findDescendants(item.value).map(folder => folder.id)\n    return allFolders.value.filter(folder => !invalid.includes(folder.id))\n  }\n  return allFolders.value\n})\nconst folders = computed(() => {\n\n  //When searching, display all results\n  if (search.value) {\n    return validFolders.value\n  }\n\n  //Otherwise, show 5 most recent folders\n  return [...validFolders.value]\n    .sort((a, b) => new Date(b.created_at) - new Date(a.created_at))\n    .slice(0, 5)\n})\n\n//Find descendants\nconst findDescendants = folder => allFolders.value\n  .filter(f => f.folderId === folder.id)\n  .reduce((descendants, subFolder) => {\n    return [...descendants, subFolder, ...findDescendants(subFolder)]\n  }, [folder])\n\n//Query folders\nconst isLoadingFolders = ref(false)\nconst parentFoldersPath = ref([])\nconst lastParentFolder = computed(() => parentFoldersPath.value[parentFoldersPath.value.length - 1])\nconst queryFolders = async () => {\n  try {\n    isLoadingFolders.value = true\n    const data = await foldersApi.query({search: search.value || undefined})\n    allFolders.value = data.folders\n    parentFoldersPath.value = []\n  }\n  finally {\n    isLoadingFolders.value = false\n  }\n}\n\n//Load child folders\nconst loadChildFolders = async folder => {\n  try {\n    isLoadingFolders.value = true\n    const data = await foldersApi.query({folderId: folder.id})\n    allFolders.value = data.folders\n\n    //Add to path, but avoid duplication\n    if (parentFoldersPath.value.length === 0 || lastParentFolder.value.id !== folder.id) {\n      parentFoldersPath.value.push(folder)\n    }\n  }\n  finally {\n    isLoadingFolders.value = false\n  }\n}\n\n//Go up one folder\nconst goUpOneFolder = () => {\n  parentFoldersPath.value = parentFoldersPath.value.slice(0, -1)\n  if (parentFoldersPath.value.length === 0) {\n    queryFolders()\n  }\n  else {\n    loadChildFolders(lastParentFolder.value)\n  }\n}\n\n//Query folders on search term changes\nconst queryFoldersDebounced = useDebounceFn(queryFolders, 250)\nwatch(search, queryFoldersDebounced)\n\n//Move folder\nconst move = () => {\n\n  //If removing, move the item to the parent folder if present\n  if (!targetFolder.value && parentFolder.value) {\n    emit('confirm', {targetFolder: parentFolder.value})\n  }\n  else {\n    emit('confirm', {targetFolder: targetFolder.value})\n  }\n}\n\n//Watch item\nwatch(item, () => {\n  targetFolder.value = undefined\n  show.value = !!item.value\n  if (item.value) {\n    queryFolders()\n  }\n}, {immediate: true})\n\n//Clear search on close\nconst closeModal = () => {\n  search.value = ''\n  emit('close')\n}\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    label-confirm=\"Move\"\n    :header=\"header\"\n    :is-disabled-confirm=\"targetFolder === undefined\"\n    @confirm=\"move()\"\n    @close=\"closeModal()\"\n  >\n    <SearchInput\n      test-id=\"searchFolders\"\n      :search-term=\"search\"\n      :has-spinner=\"isLoadingFolders\"\n      @search=\"search = $event.searchTerm\"\n      @clear-search=\"search = ''\"\n    />\n    <div\n      v-if=\"lastParentFolder\"\n      :class=\"$style.navigation\"\n    >\n      <Icon\n        icon=\"chevron_left\"\n        is-clickable\n        test-id=\"goUpOneFolder\"\n        @click=\"goUpOneFolder()\"\n      />\n      <h5 test-id=\"lastParentFolderName\">\n        {{ lastParentFolder.displayName }}\n      </h5>\n    </div>\n    <div :class=\"$style.content\">\n      <p v-if=\"search && !isLoadingFolders && folders.length === 0\">\n        No results found\n      </p>\n      <ListItemsContainer\n        is-padded\n        is-scrollable\n      >\n        <ListItem\n          v-if=\"currentFolder\"\n          icon=\"close\"\n          :is-selected=\"targetFolder === null\"\n          label=\"Remove from folder\"\n          @click=\"targetFolder = null\"\n        >\n          <template #sub>\n            This will move your {{ item.isFolder ? 'folder' : 'course' }} to\n            {{ parentFolder ? `\"${parentFolder.displayName}\"` : 'the \"All\" tab' }}\n          </template>\n        </ListItem>\n\n        <ListItem\n          v-for=\"(folder, index) in folders\"\n          :key=\"folder.id\"\n          :icon=\"folder.icon\"\n          :label=\"folder.displayName\"\n          :is-selected=\"targetFolder === folder\"\n          @click=\"targetFolder = folder\"\n        >\n          <template\n            v-if=\"folder.hasChildFolders\"\n            #actions\n          >\n            <div\n              :class=\"$style.iconWrapper\"\n              :test-id=\"`loadChildFolders_${index + 1}`\"\n              @click=\"loadChildFolders(folder)\"\n            >\n              <Icon\n                icon=\"chevron_right\"\n                is-clickable\n              />\n            </div>\n          </template>\n        </ListItem>\n      </ListItemsContainer>\n    </div>\n  </ConfirmationModal>\n</template>\n\n<style module lang=\"scss\">\n.content {\n  padding-top: 1rem;\n  padding-bottom: 1rem;\n  max-height: 306px; /* Fits 5 results */\n  min-height: 306px; /* Fixed height to prevent layout jumping */\n}\n.navigation {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  padding-top: 1rem;\n  height: 61px; /* One result */\n  h5 {\n    margin: 0;\n  }\n}\n.iconWrapper {\n  border: 1px solid var(--color-borders);\n  border-radius: 2rem;\n  padding: 0.25rem;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n</style>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  llmTasks: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {llmTasks} = toRefs(props)\nconst isSingle = computed(() => llmTasks.value.length === 1)\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete course${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm')\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        this course that is being generated?\n      </span>\n      <span v-else>\n        the {{ llmTasks.length }} selected courses that are being generated?\n      </span>\n    </p>\n  </ConfirmationModal>\n</template>\n","import {coursesApi} from '@/api/courses.api.js'\nimport {idOnly} from '@/helpers/object.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Course management composable\n */\nexport function useCourseManagement() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n  const {email} = useCurrentUser()\n\n  //Refs for courses that are being manipulated\n  const courseBeingArchived = ref(null)\n  const courseBeingRestored = ref(null)\n  const courseBeingOrganized = ref(null)\n\n  //Related setters\n  const setCourseBeingArchived = course => courseBeingArchived.value = course\n  const clearCourseBeingArchived = () => courseBeingArchived.value = null\n  const setCourseBeingRestored = course => courseBeingRestored.value = course\n  const clearCourseBeingRestored = () => courseBeingRestored.value = null\n  const setCourseBeingOrganized = course => courseBeingOrganized.value = course\n  const clearCourseBeingOrganized = () => courseBeingOrganized.value = null\n\n  //Toggle course favorite state\n  const toggleFavoriteCourse = async (course, isFavorite) => {\n\n    //Toggle current state, unless explicitly specified\n    if (typeof isFavorite === 'undefined') {\n      isFavorite = !course.isFavorite\n    }\n\n    //Toggle\n    try {\n      await coursesApi.toggleFavorite(course.id, isFavorite)\n      course.isFavorite = isFavorite\n      setFlashSuccess(`Course ${isFavorite ? 'added to' : 'removed from'} favorites`)\n    }\n    catch (error) {\n      setFlashFailure(`Failed to ${isFavorite ? 'add course to' : 'remove course from'} favorites`)\n      processError(error)\n      throw error\n    }\n  }\n\n  //Archive a course\n  const archiveCourse = async course => {\n    try {\n      await coursesApi.archiveCourse(course.id)\n      setFlashSuccess('Course archived')\n    }\n    catch (error) {\n      setFlashFailure('Failed to archive course')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Restore a course\n  const restoreCourse = async course => {\n    try {\n      await coursesApi.restoreCourse(course.id)\n      setFlashSuccess('Course restored')\n    }\n    catch (error) {\n      setFlashFailure('Failed to restore course')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Organize a course\n  const organizeCourse = async (course, targetFolder) => {\n    try {\n      const folderId = idOnly(targetFolder) || null\n      await coursesApi.organizeCourse(course.id, folderId)\n      course.folderId = folderId\n    }\n    catch (error) {\n      setFlashFailure('Failed to organize course')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Clone course\n  const cloneCourse = async course => {\n    try {\n      const newCourse = await coursesApi.cloneCourse(course.id)\n      setFlashSuccess('Course successfully cloned to drafts')\n      return newCourse\n    }\n    catch (error) {\n      setFlashFailure('Failed to clone course')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Create template from course\n  const createTemplateFromCourse = async course => {\n    try {\n      await coursesApi.createTemplateFromCourse(course.id)\n      setFlashSuccess('Course successfully cloned to templates')\n    }\n    catch (error) {\n      setFlashFailure('Failed to create template from course')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Email course\n  const emailCourse = async (course, format) => {\n    try {\n      await coursesApi.emailCourse(course.id, format)\n      setFlashSuccess(`A link to download your course will be emailed to you at ${email.value} shortly`)\n    }\n    catch (error) {\n      setFlashFailure('Something went wrong emailing your course, please try again')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    courseBeingArchived,\n    courseBeingRestored,\n    courseBeingOrganized,\n\n    //Setters\n    setCourseBeingArchived,\n    clearCourseBeingArchived,\n    setCourseBeingRestored,\n    clearCourseBeingRestored,\n    setCourseBeingOrganized,\n    clearCourseBeingOrganized,\n\n    //Management\n    toggleFavoriteCourse,\n    archiveCourse,\n    restoreCourse,\n    organizeCourse,\n    cloneCourse,\n    createTemplateFromCourse,\n    emailCourse,\n  }\n}\n","import {foldersApi} from '@/api/folders.api.js'\nimport {idOnly} from '@/helpers/object.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Folder management composable\n */\nexport function useFolderManagement() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs for folders being manipulated\n  const folderBeingEdited = ref(null)\n  const folderBeingViewed = ref(null)\n  const folderBeingArchived = ref(null)\n  const folderBeingRestored = ref(null)\n  const folderBeingRemoved = ref(null)\n  const folderBeingOrganized = ref(null)\n\n  //Folder path (for breadcrumbs)\n  const folderPath = ref([])\n\n  //Saving folder state\n  const isSavingFolder = ref(false)\n\n  //Relevant setters\n  const setFolderBeingEdited = folder => folderBeingEdited.value = folder\n  const clearFolderBeingEdited = () => folderBeingEdited.value = null\n  const setFolderBeingViewed = folder => folderBeingViewed.value = folder\n  const clearFolderBeingViewed = () => folderBeingViewed.value = null\n  const setFolderBeingArchived = folder => folderBeingArchived.value = folder\n  const clearFolderBeingArchived = () => folderBeingArchived.value = null\n  const setFolderBeingRestored = folder => folderBeingRestored.value = folder\n  const clearFolderBeingRestored = () => folderBeingRestored.value = null\n  const setFolderBeingRemoved = folder => folderBeingRemoved.value = folder\n  const clearFolderBeingRemoved = () => folderBeingRemoved.value = null\n  const setFolderBeingOrganized = folder => folderBeingOrganized.value = folder\n  const clearFolderBeingOrganized = () => folderBeingOrganized.value = null\n\n  //Toggle folder favorite state\n  const toggleFavoriteFolder = async (folder, isFavorite) => {\n\n    //Toggle current state, unless explicitly specified\n    if (typeof isFavorite === 'undefined') {\n      isFavorite = !folder.isFavorite\n    }\n\n    //Toggle\n    try {\n      await foldersApi.toggleFavorite(folder.id, isFavorite)\n      folder.isFavorite = isFavorite\n      setFlashSuccess(`Folder ${isFavorite ? 'added to' : 'removed from'} favorites`)\n    }\n    catch (error) {\n      processError(error)\n      setFlashFailure(`Failed to ${isFavorite ? 'add folder to' : 'remove folder from'} favorites`)\n      throw error\n    }\n  }\n\n  //Archive a folder\n  const archiveFolder = async folder => {\n    try {\n      await foldersApi.archiveFolder(folder.id)\n      setFlashSuccess('Folder archived')\n    }\n    catch (error) {\n      setFlashFailure('Failed to archive folder')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Restore a folder\n  const restoreFolder = async folder => {\n    try {\n      await foldersApi.restoreFolder(folder.id)\n      setFlashSuccess('Folder restored')\n    }\n    catch (error) {\n      setFlashFailure('Failed to restore folder')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Organize a folder\n  const organizeFolder = async (folder, targetFolder) => {\n    try {\n      const folderId = idOnly(targetFolder) || null\n      await foldersApi.updateById(folder.id, {folderId})\n      folder.folderId = folderId\n    }\n    catch (error) {\n      setFlashFailure('Failed to organize folder')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Create a folder\n  const createFolder = async data => {\n\n    //Specific parent folder being viewed, create the new folder in the\n    //current parent folder\n    data.folderId = folderBeingViewed.value?.id || null\n\n    //Create folder\n    try {\n      isSavingFolder.value = true\n      const folder = await foldersApi.create(data)\n      setFlashSuccess('Folder created')\n      return folder\n    }\n    catch (error) {\n      setFlashFailure('Failed to create folder')\n      processError(error)\n      throw error\n    }\n    finally {\n      isSavingFolder.value = false\n    }\n  }\n\n  //Update a folder\n  const updateFolder = async (folder, data, inBackground = false) => {\n    try {\n      isSavingFolder.value = true\n      await foldersApi.updateById(folder.id, data)\n      if (!inBackground) {\n        setFlashSuccess('Folder updated')\n      }\n    }\n    catch (error) {\n      setFlashFailure('Failed to update folder')\n      processError(error)\n      throw error\n    }\n    finally {\n      isSavingFolder.value = false\n    }\n  }\n\n  //Remove a folder\n  const removeFolder = async folder => {\n    try {\n      await foldersApi.removeById(folder.id)\n      setFlashSuccess('Folder deleted')\n    }\n    catch (error) {\n      setFlashFailure('Failed to delete folder')\n      processError(error)\n      throw error\n    }\n  }\n\n  //Load folder path\n  const loadFolderPath = async folder => {\n    try {\n      const path = await foldersApi.getFolderPath(folder.id)\n      if (folderBeingViewed.value?.id === folder.id) {\n        folderPath.value = path\n      }\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n  }\n\n  //Clear folder path\n  const clearFolderPath = () => {\n    folderPath.value = []\n  }\n\n  //Expose interface\n  return {\n\n    //Refs\n    folderBeingEdited,\n    folderBeingViewed,\n    folderBeingArchived,\n    folderBeingRestored,\n    folderBeingRemoved,\n    folderBeingOrganized,\n    isSavingFolder,\n\n    //Setters\n    setFolderBeingEdited,\n    clearFolderBeingEdited,\n    setFolderBeingViewed,\n    clearFolderBeingViewed,\n    setFolderBeingArchived,\n    clearFolderBeingArchived,\n    setFolderBeingRestored,\n    clearFolderBeingRestored,\n    setFolderBeingRemoved,\n    clearFolderBeingRemoved,\n    setFolderBeingOrganized,\n    clearFolderBeingOrganized,\n\n    //Management\n    toggleFavoriteFolder,\n    archiveFolder,\n    restoreFolder,\n    organizeFolder,\n    createFolder,\n    updateFolder,\n    removeFolder,\n\n    //Folder path\n    folderPath,\n    loadFolderPath,\n    clearFolderPath,\n  }\n}\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {llmTasksApi} from '@/api/llm-tasks.api.js'\n\n/**\n * LLM Task removal wrapper composable\n */\nexport function useLLMTaskRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: llmTasksToRemove,\n    numItemsToRemove: numLLMTasksToRemove,\n    hasItemsToRemove: hasLLMTasksToRemove,\n    isRemovingItems: isRemovingLLMTasks,\n    setItemsToRemove: setLLMTasksToRemove,\n    clearItemsToRemove: clearLLMTasksToRemove,\n    removeItems: removeLLMTasks,\n  } = useItemRemoval({\n    noun: 'course',\n    removeById: id => llmTasksApi.removeById(id),\n    removeManyById: ids => llmTasksApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    llmTasksToRemove,\n    numLLMTasksToRemove,\n    hasLLMTasksToRemove,\n    isRemovingLLMTasks,\n    setLLMTasksToRemove,\n    clearLLMTasksToRemove,\n    removeLLMTasks,\n  }\n}\n","import {ref} from 'vue'\n\n/**\n * Undo moving folder or course composable\n */\nexport function useUndoMoveFolderOrCourse() {\n\n  //Refs\n  const movedItem = ref(null)\n  const movedFromFolderId = ref(null)\n  const movedToTargetFolder = ref(null)\n\n  //Track item being moved\n  const trackMovedItem = (item, targetFolder) => {\n    movedItem.value = item\n    movedFromFolderId.value = item.folderId\n    movedToTargetFolder.value = targetFolder\n  }\n\n  //Forget last moved item\n  const forgetMovedItem = () => {\n    movedItem.value = null\n    movedFromFolderId.value = null\n    movedToTargetFolder.value = null\n  }\n\n  //Expose interface\n  return {\n    movedItem,\n    movedFromFolderId,\n    movedToTargetFolder,\n    trackMovedItem,\n    forgetMovedItem,\n  }\n}\n","import {foldersApi} from '@/api/folders.api.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {courseFilterTypes, courseFilterTabs} from '@/constants/courses.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {computed, ref} from 'vue'\n\n/**\n * Combined course and folder querying, for the courses overview page\n */\nexport function useCourseAndFolderQuerying() {\n\n  //Course querying\n  const {\n    items: courses,\n    total: totalCourses,\n    hasItems: hasCourses,\n    loadItems: loadCourses,\n    queryItems: queryCourses,\n    loadMoreItemsThrottled: loadMoreCourses,\n    isLoadingItems: isLoadingCourses,\n    isLoadingMoreItems: isLoadingMoreCourses,\n    addItem: addCourseToList,\n    removeItem: removeCourseFromList,\n    sort: sortCourses,\n    filter: filterForCourses,\n    changeSearch: changeCoursesSearch,\n    changeFilter: changeCoursesFilter,\n  } = useQuerying({\n    handler: (...args) => coursesApi.query(...args),\n    defaultItemsPerPage: 40,\n    filter: {\n      tab: courseFilterTabs.ALL,\n      status: null,\n      type: null,\n      folderId: null,\n      selectedTags: [],\n    },\n    sort: '-updatedAt',\n    key: 'coursesOverview',\n  })\n\n  //Folder querying\n  const {\n    items: folders,\n    total: totalFolders,\n    hasItems: hasFolders,\n    loadItems: loadFolders,\n    queryItems: queryFolders,\n    reloadItems: reloadFolders,\n    isLoadingItems: isLoadingFolders,\n    removeItem: removeFolderFromList,\n    changeFilter: changeFoldersFilter,\n    changeSearch: changeFoldersSearch,\n  } = useQuerying({\n    handler: (...args) => foldersApi.query(...args),\n    filter: {\n      tab: courseFilterTabs.ALL,\n      folderId: null,\n    },\n    sort: 'name',\n    key: 'foldersOverview',\n    limit: 500,\n  })\n\n  //Local (combined) filter\n  const filter = ref({\n    tab: courseFilterTabs.ALL,\n    status: null,\n    type: null,\n    folderId: null,\n    selectedTags: [],\n  })\n\n  //Number of active filters\n  const numActiveFilters = computed(() => {\n    let count = 0\n    if (filter.value.status) {\n      count++\n    }\n    if (filter.value.type) {\n      count++\n    }\n    count += filter.value.selectedTags.length\n    return count\n  })\n\n  //Change filter wrapper, which handles some additional logic\n  const changeFilter = (newFilter, reload = true) => {\n\n    //If we're toggling to show folders while viewing recent courses,\n    //we switch back to view all content, as folders don't show up under recents\n    if (\n      newFilter.type === courseFilterTypes.FOLDERS &&\n      filter.value.tab === courseFilterTabs.RECENT\n    ) {\n      newFilter.tab = courseFilterTabs.ALL\n    }\n\n    //If we're viewing a folder, we don't filter by tab\n    if (newFilter.folderId) {\n      newFilter.tab = null\n    }\n\n    //Update local filter\n    Object.assign(filter.value, newFilter)\n\n    //Folder filter is a subset of the course filter\n    const folderFilter = {\n      tab: filter.value.tab,\n      folderId: filter.value.folderId,\n    }\n\n    //Change the course and folder filters\n    changeCoursesFilter(filter.value, reload)\n    changeFoldersFilter(folderFilter, reload)\n  }\n\n  //Clear filters (keeps view in same tab)\n  const clearFilters = (reload = true) => {\n    changeFilter({\n      tab: filter.value.tab,\n      status: null,\n      type: null,\n      folderId: null,\n      selectedTags: [],\n    }, reload)\n  }\n\n  //Change search\n  const changeSearch = (newSearch, reload = true) => {\n    changeCoursesSearch(newSearch, reload)\n    changeFoldersSearch(newSearch, reload)\n  }\n\n  //Load courses and folders\n  const loadCoursesAndFolders = async () => {\n    const promises = []\n    if (filter.value.type !== courseFilterTypes.FOLDERS) {\n      promises.push(loadCourses())\n    }\n    if (filter.value.type !== courseFilterTypes.COURSES && filter.value.type !== courseFilterTypes.NUDGES) {\n      promises.push(loadFolders())\n    }\n    await Promise.all(promises)\n  }\n\n  //Query courses and folders (for partial searches)\n  const queryCoursesAndFolders = async params => {\n\n    //Get results (as flat arrays)\n    const [folders, courses] = await Promise.all([\n      queryFolders(params, true),\n      queryCourses(params, true),\n    ])\n\n    //Concatenate them\n    return [...folders, ...courses]\n  }\n\n  //Combined loading flag\n  const isLoadingCoursesAndFolders = computed(() => isLoadingCourses.value || isLoadingFolders.value)\n\n  //Expose interface\n  return {\n\n    //Course data and methods\n    courses,\n    totalCourses,\n    hasCourses,\n    addCourseToList,\n    removeCourseFromList,\n    sortCourses,\n    loadMoreCourses,\n    filterForCourses,\n    isLoadingMoreCourses,\n\n    //Folder data and methods\n    folders,\n    totalFolders,\n    hasFolders,\n    reloadFolders,\n    removeFolderFromList,\n\n    //Combined courses and folders\n    filter,\n    changeSearch,\n    changeFilter,\n    clearFilters,\n    numActiveFilters,\n    loadCoursesAndFolders,\n    queryCoursesAndFolders,\n    isLoadingCoursesAndFolders,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport CourseCardsGrid from '@/components/courses/cards/CourseCardsGrid.vue'\nimport CourseCard from '@/components/courses/cards/CourseCard.vue'\nimport CourseGeneratingCard from '@/components/courses/cards/CourseGeneratingCard.vue'\nimport FolderCard from '@/components/courses/cards/FolderCard.vue'\nimport NewCourseCard from '@/components/courses/cards/NewCourseCard.vue'\nimport NewFolderCard from '@/components/courses/cards/NewFolderCard.vue'\nimport CoursesFilter from '@/components/courses/CoursesFilter.vue'\nimport FoldersBreadcrumb from '@/components/courses/FoldersBreadcrumb.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport UndoFlashMessage from '@/components/shared/core/UndoFlashMessage.vue'\nimport CreateCourseModal from '@/components/courses/modals/CreateCourseModal.vue'\nimport CreateOrEditFolderModal from '@/components/courses/modals/CreateOrEditFolderModal.vue'\nimport ArchiveCourseModal from '@/components/courses/modals/ArchiveCourseModal.vue'\nimport RestoreCourseModal from '@/components/courses/modals/RestoreCourseModal.vue'\nimport OrganizeItemModal from '@/components/courses/modals/OrganizeItemModal.vue'\nimport ArchiveFolderModal from '@/components/courses/modals/ArchiveFolderModal.vue'\nimport RestoreFolderModal from '@/components/courses/modals/RestoreFolderModal.vue'\nimport ConfirmFolderRemovalModal from '@/components/courses/modals/ConfirmFolderRemovalModal.vue'\nimport ConfirmLLMTaskRemovalModal from '@/components/courses/modals/ConfirmLLMTaskRemovalModal.vue'\n\n//Helpers\nimport {aiTaskTypes, aiTaskStatuses} from '@/constants/ai.js'\nimport {\n  courseFilterTypes,\n  courseFilterTabs,\n  courseFilterTabOptions\n} from '@/constants/courses.js'\nimport {llmTasksApi} from '@/api/llm-tasks.api.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useInfiniteScroll} from '@/composables/use-infinite-scroll.js'\nimport {useCourseManagement} from '@/composables/use-course-management.js'\nimport {useFolderManagement} from '@/composables/use-folder-management.js'\nimport {useLLMTaskRemoval} from '@/composables/use-llm-task-removal.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useUndoMoveFolderOrCourse} from '@/composables/use-undo-move-folder-or-course.js'\nimport {useCourseAndFolderQuerying} from '@/composables/use-course-and-folder-querying.js'\nimport {ref, watch, computed, onMounted, onUnmounted} from 'vue'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Courses')\n\n//Routing and navigation\nconst {route, routeParams, pushRoute, replaceRoute} = useRouting()\nconst {\n  goToEditCourse,\n  goToContentLibraryOverview,\n} = useNavigation()\n\n//Current organization\nconst {isAiEnabled} = useCurrentOrganization()\n\n//Modal states\nconst {\n  isValue: isShowingCreateCourseModal,\n  setTrue: showCreateCourseModal,\n  setFalse: hideCreateCourseModal,\n} = useValueToggle()\nconst {\n  isValue: isShowingCreateFolderModal,\n  setTrue: showCreateFolderModal,\n  setFalse: hideCreateFolderModal,\n} = useValueToggle()\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs(courseFilterTabOptions)\n\n//Combined course and folder querying\nconst {\n  courses,\n  folders,\n  hasCourses,\n  hasFolders,\n  totalCourses,\n  filter,\n  changeSearch,\n  changeFilter,\n  clearFilters,\n  numActiveFilters,\n  isLoadingMoreCourses,\n  isLoadingCoursesOrFolders,\n  queryCoursesAndFolders,\n  loadCoursesAndFolders,\n  loadMoreCourses,\n  reloadFolders,\n  addCourseToList,\n  removeCourseFromList,\n  removeFolderFromList,\n} = useCourseAndFolderQuerying()\n\n//Apply infinite scroll to load more courses\nuseInfiniteScroll(window, loadMoreCourses)\n\n//Helper to update route\nconst updateRoute = (tab = courseFilterTabs.ALL, folderId = '') => {\n  pushRoute({params: {tab, folderId}})\n}\n\n//View tab\nconst viewTab = tab => {\n\n  //Find tab if string given\n  if (typeof tab === 'string') {\n    const key = tab\n    tab = tabs.value.find(t => t.key === key)\n    if (!tab) {\n      throw new Error(`Unknown tab key: ${key}`)\n    }\n  }\n\n  //Change route and set active tab\n  updateRoute(tab.key)\n  setActiveTab(tab)\n\n  //Clear search and change appropriate filter\n  clearSearch()\n  changeFilter({\n    tab: tab.value,\n    status: null,\n    folderId: null,\n  })\n}\n\n//Watch tab filter and switch to the correct tab if needed\nconst filteredTab = computed(() => filter.value.tab)\nwatch(filteredTab, key => {\n  const tab = tabs.value.find(tab => tab.key === key)\n  if (key && tab && activeTab.value !== tab) {\n    viewTab(tab)\n  }\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryCoursesAndFolders({search})\nconst {\n  searchTerm,\n  partialSearch,\n  partialSearchResults,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Clear search results and return to view all\nconst clearSearchAndViewAll = () => {\n  const hadSearchTerm = searchTerm.value\n  clearSearch()\n  if (hadSearchTerm) {\n    viewTab(courseFilterTabs.ALL)\n  }\n}\n\n//Handler for result selection in partial search\nconst selectResult = event => {\n  const {result} = event\n  if (result.isFolder) {\n    viewFolder(result)\n  }\n  else {\n    goToEditCourse(result.id, event)\n  }\n}\n\n//LLM task querying\nconst {\n  items: llmTasks,\n  loadItems: loadLlmTasks,\n} = useQuerying({\n  handler: (...args) => llmTasksApi.query(...args),\n  filter: {\n    ignoreStale: true,\n    taskTypes: [\n      aiTaskTypes.COURSE_GENERATION,\n      aiTaskTypes.COURSE_TRANSLATION,\n      aiTaskTypes.COURSE_MODIFICATION,\n      aiTaskTypes.OUTLINE_GENERATION,\n    ],\n    statuses: [\n      aiTaskStatuses.INIT,\n      aiTaskStatuses.WAITING,\n      aiTaskStatuses.PLANNING,\n      aiTaskStatuses.ANALYZING,\n      aiTaskStatuses.GENERATING,\n      aiTaskStatuses.CREATING,\n      aiTaskStatuses.WAITING_FOR_REVIEW,\n    ],\n  },\n  key: 'llmTasksForCourses',\n})\n\n//LLM task reload timeout handler\nconst llmTasksReloadTimeout = ref(null)\nconst startLlmTasksReloadTimeout = () => {\n  llmTasksReloadTimeout.value = setTimeout(async () => {\n    const currentIds = llmTasks.value.map(task => task.id)\n    await loadLlmTasks()\n    const newIds = llmTasks.value.map(task => task.id)\n    if (currentIds.some(id => !newIds.includes(id))) {\n      await loadCoursesAndFolders()\n    }\n  }, 20 * 1000)\n}\nconst clearLlmTasksReloadTimeout = () => {\n  clearTimeout(llmTasksReloadTimeout.value)\n}\n\n//Start LLM tasks reload timeout once LLM tasks have been loaded\nwatch(llmTasks, () => {\n  if (isAiEnabled.value && llmTasks.value.length > 0) {\n    startLlmTasksReloadTimeout()\n  }\n})\n\n//Load data on mount\nonMounted(() => {\n  loadCoursesAndFolders()\n  if (isAiEnabled.value) {\n    loadLlmTasks()\n  }\n})\n\n//Clear timeout on unmount\nonUnmounted(clearLlmTasksReloadTimeout)\n\n//Course/folder drag and drop handling\nconst startDragCourse = (course, event) => startDrag({courseId: course.id}, event)\nconst startDragFolder = (folder, event) => startDrag({folderId: folder.id}, event)\nconst startDrag = (data, event) => {\n  event.dataTransfer.dropEffect = 'move'\n  event.dataTransfer.effectAllowed = 'move'\n  for (const key in data) {\n    event.dataTransfer.setData(key, data[key])\n  }\n}\nconst onDrop = (targetFolder, event) => {\n  const courseId = event.dataTransfer.getData('courseId')\n  const folderId = event.dataTransfer.getData('folderId')\n  if (courseId) {\n    const course = courses.value.find(course => course.id === courseId)\n    if (course) {\n      trackMovedItem(course, targetFolder)\n      doOrganizeCourse(course, targetFolder)\n    }\n  }\n  else if (folderId) {\n    const folder = folders.value.find(folder => folder.id === folderId)\n    if (folder) {\n      trackMovedItem(folder, targetFolder)\n      doOrganizeFolder(folder, targetFolder)\n    }\n  }\n}\n\n//Course management\nconst {\n\n  //Refs\n  courseBeingArchived,\n  courseBeingRestored,\n  courseBeingOrganized,\n\n  //Setters\n  setCourseBeingArchived,\n  clearCourseBeingArchived,\n  setCourseBeingRestored,\n  clearCourseBeingRestored,\n  setCourseBeingOrganized,\n  clearCourseBeingOrganized,\n\n  //Management\n  toggleFavoriteCourse,\n  archiveCourse,\n  restoreCourse,\n  organizeCourse,\n  cloneCourse,\n  createTemplateFromCourse,\n  emailCourse,\n} = useCourseManagement()\n\n//Wrappers\nconst doToggleFavoriteCourse = async course => {\n  try {\n    await toggleFavoriteCourse(course)\n    if (!course.isFavorite && filter.value.tab === courseFilterTabs.FAVORITES) {\n      removeCourseFromList(course)\n    }\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doArchiveCourse = async () => {\n  try {\n    await archiveCourse(courseBeingArchived.value)\n    removeCourseFromList(courseBeingArchived.value)\n    clearCourseBeingArchived()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doRestoreCourse = async () => {\n  try {\n    await restoreCourse(courseBeingRestored.value)\n    removeCourseFromList(courseBeingRestored.value)\n    clearCourseBeingRestored()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doOrganizeCourse = async (course, targetFolder) => {\n  try {\n    await organizeCourse(course, targetFolder)\n\n    //Unless viewing recent courses, remove course from list\n    //as the course has now moved to another folder\n    if (filter.value.tab !== courseFilterTabs.RECENT) {\n      removeCourseFromList(course)\n    }\n\n    //Reload folders to update course counts\n    clearCourseBeingOrganized()\n    reloadFolders()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doCloneCourse = async course => {\n  try {\n    const newCourse = await cloneCourse(course)\n    addCourseToList(newCourse, course)\n    goToEditCourse(newCourse.id)\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doCreateTemplateFromCourse = async course => {\n  try {\n    await createTemplateFromCourse(course)\n    goToContentLibraryOverview()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doEmailCourse = async (course, format) => {\n  try {\n    await emailCourse(course, format)\n  }\n  catch {\n    //Handled by composable\n  }\n}\n\n//Folder management\nconst {\n\n  //Refs\n  folderBeingEdited,\n  folderBeingViewed,\n  folderBeingArchived,\n  folderBeingRestored,\n  folderBeingRemoved,\n  folderBeingOrganized,\n  isSavingFolder,\n\n  //Setters\n  setFolderBeingEdited,\n  clearFolderBeingEdited,\n  setFolderBeingArchived,\n  clearFolderBeingArchived,\n  setFolderBeingRestored,\n  clearFolderBeingRestored,\n  setFolderBeingRemoved,\n  clearFolderBeingRemoved,\n  setFolderBeingOrganized,\n  clearFolderBeingOrganized,\n  setFolderBeingViewed,\n  clearFolderBeingViewed,\n\n  //Management\n  toggleFavoriteFolder,\n  archiveFolder,\n  restoreFolder,\n  organizeFolder,\n  createFolder,\n  updateFolder,\n  removeFolder,\n\n  //Folder path\n  folderPath,\n  loadFolderPath,\n  clearFolderPath,\n} = useFolderManagement()\n\n//Wrappers\nconst doToggleFavoriteFolder = async folder => {\n  try {\n    await toggleFavoriteFolder(folder)\n    if (!folder.isFavorite && filter.value.tab === courseFilterTabs.FAVORITES) {\n      removeFolderFromList(folder)\n    }\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doArchiveFolder = async () => {\n  try {\n    await archiveFolder(folderBeingArchived.value)\n    removeFolderFromList(folderBeingArchived.value)\n    clearFolderBeingArchived()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doRestoreFolder = async () => {\n  try {\n    await restoreFolder(folderBeingRestored.value)\n    removeFolderFromList(folderBeingRestored.value)\n    clearFolderBeingRestored()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doOrganizeFolder = async (folder, targetFolder) => {\n  try {\n    await organizeFolder(folder, targetFolder)\n    removeFolderFromList(folder)\n    clearFolderBeingOrganized()\n    reloadFolders()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doCreateFolder = async data => {\n  try {\n    await createFolder(data)\n    hideCreateFolderModal()\n    reloadFolders()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doUpdateFolder = async data => {\n  try {\n    await updateFolder(folderBeingEdited.value, data)\n    clearFolderBeingEdited()\n    reloadFolders()\n  }\n  catch {\n    //Handled by composable\n  }\n}\nconst doRemoveFolder = async () => {\n  try {\n    await removeFolder(folderBeingRemoved.value)\n\n    //Filter and search, as any courses that were in the folder will now\n    //need to be shown outside if the folder\n    if (folderBeingRemoved.value.numCourses > 0) {\n      loadCoursesAndFolders()\n    }\n    else {\n      removeFolderFromList(folderBeingRemoved.value)\n    }\n\n    //Clear\n    clearFolderBeingRemoved()\n  }\n  catch {\n    //Handled by composable\n  }\n}\n\n//View folder\nconst viewFolder = folder => {\n\n  //Set mock object if string (ID) given\n  if (typeof folder === 'string') {\n    folder = {id: folder}\n  }\n\n  //Set folder being viewed and update route\n  setFolderBeingViewed(folder)\n  updateRoute(courseFilterTabs.ALL, folder.id)\n\n  //Load folder path for the given folder\n  loadFolderPath(folder)\n\n  //Clear search and filter\n  clearSearch()\n  changeFilter({\n    tab: null,\n    folderId: folder.id,\n  })\n}\n\n//View folder if we have a folder ID in the route params\n//Do this only once, once the folders have loaded\nwatch(folders, () => {\n  if (routeParams.value.folderId) {\n    viewFolder(routeParams.value.folderId)\n  }\n}, {once: true})\n\n//Watch route for changes\nwatch(route, () => {\n\n  //Get route params and find matching tab\n  const key = routeParams.value.tab\n  const folderId = routeParams.value.folderId\n  const tab = tabs.value.find(tab => tab.key === key)\n\n  //Change tab when the route changes, but not if folder ID is given, otherwise\n  //it will override the folder view\n  if (key && tab && !folderId && (activeTab.value.key !== tab.key || folderBeingViewed.value?.id !== folderId)) {\n    viewTab(tab)\n  }\n\n  //View folder if the folder ID has changed\n  else if (folderId && folderBeingViewed.value?.id !== folderId) {\n    viewFolder(folderId)\n  }\n\n  //Replace route if we're on the all tab, but no key was given. This will occur\n  //when the user navigates to just /courses\n  else if (!key && activeTab.value.key === courseFilterTabs.ALL) {\n    replaceRoute({params: {tab: courseFilterTabs.ALL}})\n  }\n}, {immediate: true})\n\n//Undo moving folder or course\nconst {\n  movedItem,\n  movedFromFolderId,\n  movedToTargetFolder,\n  trackMovedItem,\n  forgetMovedItem,\n} = useUndoMoveFolderOrCourse()\n\n//Undo move item\nconst undoMoveItem = () => {\n  if (movedItem.value.isFolder) {\n    doOrganizeFolder(movedItem.value, movedFromFolderId.value)\n  }\n  else {\n    doOrganizeCourse(movedItem.value, movedFromFolderId.value)\n  }\n\n  //Forget we moved the item\n  forgetMovedItem()\n}\n\n//Filtered folder ID watcher\nconst filteredFolderId = computed(() => filter.value.folderId)\nwatch(filteredFolderId, id => {\n  if (!id) {\n    clearFolderBeingViewed()\n    clearFolderPath()\n  }\n})\n\n//Should we display LLM tasks?\nconst shouldShowLlmTasks = computed(() => {\n  return (\n    filter.value.tab === courseFilterTabs.ALL &&\n    !folderBeingViewed.value &&\n    llmTasks.value.length > 0\n  )\n})\n\n//Should we display courses?\nconst shouldShowCourses = computed(() => {\n  return (\n\n    //Only if we have courses or if we can show the new course card\n    (hasCourses.value || shouldShowNewCourseCard.value) &&\n\n    //Not when filtering for folders only\n    (filter.value.type !== courseFilterTypes.FOLDERS)\n  )\n})\n\n//Should we display folders?\nconst shouldShowFolders = computed(() => {\n  return (\n\n    //Only if we have folders or if we can show the new folder card\n    (hasFolders.value || shouldShowNewFolderCard.value) &&\n\n    //Not for the recent tab, or when filtering courses/nudges\n    (\n      filter.value.tab !== courseFilterTabs.RECENT &&\n      filter.value.type !== courseFilterTypes.COURSES &&\n      filter.value.type !== courseFilterTypes.NUDGES\n    )\n  )\n})\n\n//Should we show the new course card?\nconst shouldShowNewCourseCard = computed(() => {\n  return (\n\n    //Only when showing courses\n    (\n      filter.value.tab === courseFilterTabs.ALL ||\n      filter.value.type === courseFilterTypes.COURSES ||\n      folderBeingViewed.value\n    ) &&\n\n    //Not when viewing an archived folder\n    !folderBeingViewed?.isArchived &&\n\n    //Not when showing search results\n    !searchTerm.value\n  )\n})\n\n//Should we show the new folder card?\nconst shouldShowNewFolderCard = computed(() => {\n  return (\n\n    //Only when showing folders\n    (\n      filter.value.tab === courseFilterTabs.ALL ||\n      filter.value.type === courseFilterTypes.FOLDERS ||\n      folderBeingViewed.value\n    ) &&\n\n    //Not when viewing an archived folder\n    !folderBeingViewed?.isArchived &&\n\n    //Not when showing search results\n    !searchTerm.value\n  )\n})\n\n//LLM task removal\nconst {\n  llmTasksToRemove,\n  hasLLMTasksToRemove,\n  isRemovingLLMTasks,\n  setLLMTasksToRemove,\n  clearLLMTasksToRemove,\n  removeLLMTasks,\n} = useLLMTaskRemoval()\n\n//LLM task removal handling\nconst cancelLLMTaskRemoval = () => {\n  clearLLMTasksToRemove()\n}\nconst confirmLLMTaskRemoval = async () => {\n  try {\n    await removeLLMTasks()\n    cancelLLMTaskRemoval()\n    loadLlmTasks()\n  }\n  catch {\n    //Handled by useLLMTaskRemoval\n  }\n}\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          @clear-search=\"clearSearchAndViewAll()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"selectResult($event)\"\n        />\n      </template>\n      <template #filters>\n        <CoursesFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"clearFilters()\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton @click=\"showCreateCourseModal()\" />\n      </template>\n    </OverviewTableHeader>\n\n    <TabNavigation\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      is-large\n      @change-tab=\"viewTab($event.tab)\"\n    />\n\n    <FoldersBreadcrumb\n      :path=\"folderPath\"\n      :v-if=\"folderBeingViewed\"\n      @view-all=\"viewTab(courseFilterTabs.ALL)\"\n      @view-folder=\"viewFolder($event.folder)\"\n    />\n\n    <h5 v-if=\"searchTerm\">\n      Search results for \"{{ searchTerm }}\" ({{ totalCourses }})\n    </h5>\n\n    <template v-if=\"shouldShowFolders && !isLoadingCoursesOrFolders\">\n      <h5\n        v-if=\"shouldShowCourses && (hasFolders || shouldShowNewFolderCard)\"\n        text-muted\n      >\n        Folders\n      </h5>\n      <CourseCardsGrid>\n        <NewFolderCard\n          v-if=\"shouldShowNewFolderCard\"\n          @create=\"showCreateFolderModal()\"\n        />\n\n        <FolderCard\n          v-for=\"(folder, index) in folders\"\n          :key=\"folder.id\"\n          :index=\"index\"\n          :draggable=\"true\"\n          :folder=\"folder\"\n          :test-id=\"`folderCard_${index + 1}`\"\n          ondragenter=\"this.classList.toggle('dragTargetFolder')\"\n          ondragleave=\"this.classList.toggle('dragTargetFolder')\"\n          @dragstart=\"startDragFolder(folder, $event)\"\n          @drop=\"onDrop(folder, $event)\"\n          @remove=\"setFolderBeingRemoved(folder)\"\n          @rename=\"setFolderBeingEdited(folder)\"\n          @archive=\"setFolderBeingArchived(folder)\"\n          @restore=\"setFolderBeingRestored(folder)\"\n          @organize=\"setFolderBeingOrganized(folder)\"\n          @toggle-favorite=\"doToggleFavoriteFolder(folder)\"\n          @view=\"viewFolder(folder)\"\n        />\n      </CourseCardsGrid>\n    </template>\n\n    <template v-if=\"shouldShowCourses && !isLoadingCoursesOrFolders\">\n      <h5\n        v-if=\"shouldShowFolders && (hasCourses || shouldShowNewCourseCard)\"\n        text-muted\n      >\n        Content\n        ({{ totalCourses }})\n      </h5>\n      <CourseCardsGrid>\n        <NewCourseCard\n          v-if=\"shouldShowNewCourseCard\"\n          @create=\"showCreateCourseModal()\"\n        />\n\n        <template v-if=\"shouldShowLlmTasks\">\n          <CourseGeneratingCard\n            v-for=\"(llmTask, index) in llmTasks\"\n            :key=\"llmTask.id\"\n            :index=\"index\"\n            :llm-task=\"llmTask\"\n            @remove=\"setLLMTasksToRemove(llmTask)\"\n          />\n        </template>\n\n        <CourseCard\n          v-for=\"(course, index) in courses\"\n          :key=\"course.id\"\n          :index=\"index\"\n          :course=\"course\"\n          :draggable=\"true\"\n          @dragstart=\"startDragCourse(course, $event)\"\n          @organize=\"setCourseBeingOrganized(course)\"\n          @archive=\"setCourseBeingArchived(course)\"\n          @restore=\"setCourseBeingRestored(course)\"\n          @toggle-favorite=\"doToggleFavoriteCourse(course)\"\n          @clone-to-drafts=\"doCloneCourse(course)\"\n          @create-template=\"doCreateTemplateFromCourse(course)\"\n          @email=\"doEmailCourse(course, $event.format)\"\n        />\n      </CourseCardsGrid>\n    </template>\n\n    <div v-if=\"isLoadingCoursesOrFolders || isLoadingMoreCourses\">\n      <Spinner is-block />\n    </div>\n\n    <!-- MODALS -->\n    <CreateCourseModal\n      :is-open=\"isShowingCreateCourseModal\"\n      :folder-id=\"folderBeingViewed?.id\"\n      @close=\"hideCreateCourseModal()\"\n    />\n    <ArchiveCourseModal\n      :is-open=\"!!courseBeingArchived\"\n      :course=\"courseBeingArchived\"\n      @close=\"clearCourseBeingArchived()\"\n      @confirm=\"doArchiveCourse()\"\n    />\n    <RestoreCourseModal\n      :is-open=\"!!courseBeingRestored\"\n      :course=\"courseBeingRestored\"\n      @close=\"clearCourseBeingRestored()\"\n      @confirm=\"doRestoreCourse()\"\n    />\n    <OrganizeItemModal\n      :is-open=\"!!courseBeingOrganized\"\n      :item=\"courseBeingOrganized\"\n      @close=\"clearCourseBeingOrganized()\"\n      @confirm=\"doOrganizeCourse(courseBeingOrganized, $event.targetFolder)\"\n    />\n    <OrganizeItemModal\n      :is-open=\"!!folderBeingOrganized\"\n      :item=\"folderBeingOrganized\"\n      @close=\"clearFolderBeingOrganized()\"\n      @confirm=\"doOrganizeFolder(folderBeingOrganized, $event.targetFolder)\"\n    />\n    <CreateOrEditFolderModal\n      :is-open=\"isShowingCreateFolderModal\"\n      :is-saving=\"isSavingFolder\"\n      @close=\"hideCreateFolderModal()\"\n      @update=\"doCreateFolder($event.model)\"\n    />\n    <CreateOrEditFolderModal\n      :folder=\"folderBeingEdited\"\n      :is-open=\"!!folderBeingEdited\"\n      :is-saving=\"isSavingFolder\"\n      @close=\"clearFolderBeingEdited()\"\n      @update=\"doUpdateFolder($event.model)\"\n    />\n    <ArchiveFolderModal\n      :is-open=\"!!folderBeingArchived\"\n      :folder=\"folderBeingArchived\"\n      @close=\"clearFolderBeingArchived()\"\n      @confirm=\"doArchiveFolder()\"\n    />\n    <RestoreFolderModal\n      :is-open=\"!!folderBeingRestored\"\n      :folder=\"folderBeingRestored\"\n      @close=\"clearFolderBeingRestored()\"\n      @confirm=\"doRestoreFolder()\"\n    />\n    <ConfirmFolderRemovalModal\n      :is-open=\"!!folderBeingRemoved\"\n      :folder=\"folderBeingRemoved\"\n      @close=\"clearFolderBeingRemoved()\"\n      @confirm=\"doRemoveFolder()\"\n    />\n    <ConfirmLLMTaskRemovalModal\n      :is-open=\"hasLLMTasksToRemove\"\n      :llm-tasks=\"llmTasksToRemove\"\n      :is-removing=\"isRemovingLLMTasks\"\n      @close=\"cancelLLMTaskRemoval()\"\n      @confirm=\"confirmLLMTaskRemoval()\"\n    />\n\n    <UndoFlashMessage\n      v-if=\"movedItem\"\n      @undo=\"undoMoveItem()\"\n      @close=\"forgetMovedItem()\"\n    >\n      <strong>{{ movedItem.name }}</strong> has been moved to <strong>{{ movedToTargetFolder.name }}</strong>\n    </UndoFlashMessage>\n  </PageWrapper>\n</template>\n\n<style>\n/* Not ideal to have to use native events and global styles, but there is currently\n no practical way to apply a hover effect on an element when dragging something over it */\n.dragTargetFolder {\n  background-color: #f9fafa;\n}\n</style>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport CourseSelectInput from '@/components/shared/form/CourseSelectInput.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {toRefs, onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'show-course-select',\n  'toggle-editing',\n])\nconst props = defineProps({\n  course: {\n    type: Object,\n    default: () => ({}),\n  },\n  courseId: {\n    type: String,\n    default: null,\n  },\n  showCourseSelect: {\n    type: Boolean,\n    required: true,\n  },\n  hasEnrollments: {\n    type: Boolean,\n    required: true,\n  },\n  validation: {\n    type: Object,\n    required: true,\n  },\n  distribution: {\n    type: Object,\n    required: true,\n  },\n  disableEditing: {\n    type: Boolean,\n    required: true,\n  },\n})\n\n//Refs\nconst {\n  items: courses,\n  loadItemsBatched: loadCourses,\n  isLoadingItems: isLoadingCourses,\n} = useQuerying({\n  handler: (...args) => coursesApi.query(...args),\n  limit: 100,\n  sort: '-updatedAt',\n  fields: [\n    'id',\n    'name',\n    'isNudge',\n    'isPassingValidations',\n  ],\n})\nconst {courseId} = toRefs(props)\n\n//Component mount hook\nonMounted(async () => {\n\n  //Load courses\n  await loadCourses()\n\n  //Emit input event if course ID provided and course found\n  if (courses.value.length && courseId.value) {\n    const course = courses.value.find(course => course.id === courseId.value)\n    if (course) {\n      emit('input', course)\n    }\n  }\n})\n</script>\n\n<template>\n  <FormField\n    test-id=\"courseSelectSection\"\n    :label=\"course ? course.name : 'Select a course'\"\n    :is-required=\"!course\"\n    :errors=\"validation.$errors\"\n    :message=\"hasEnrollments ? 'Since this schedule has enrollments, you cannot change the course it delivers.' : ''\"\n  >\n    <template #aside>\n      <Toggle\n        v-if=\"hasEnrollments && course\"\n        test-id=\"toggleEditing\"\n        :label=\"disableEditing ? 'Editing disabled' : 'Editing enabled'\"\n        :is-checked=\"disableEditing\"\n        :is-disabled=\"distribution.is_concluded\"\n        @click=\"$emit('toggle-editing')\"\n      />\n    </template>\n    <CourseSelectInput\n      v-if=\"!course || showCourseSelect\"\n      :courses=\"courses\"\n      :is-loading=\"isLoadingCourses\"\n      :value=\"course\"\n      :selectable=\"option => option.isPassingValidations\"\n      :has-error=\"validation.$error\"\n      test-id=\"courseSelect\"\n      @input=\"$emit('input', $event.option)\"\n    >\n      <template #option=\"option\">\n        <span>{{ option.name }}</span>\n        <small\n          v-if=\"!option.isPassingValidations\"\n          text-muted\n        >(This course has content errors)</small>\n      </template>\n    </CourseSelectInput>\n    <ActionButton\n      v-else-if=\"!distribution.is_concluded\"\n      type=\"link\"\n      label=\"Select a different course\"\n      :is-disabled=\"hasEnrollments\"\n      @click=\"$emit('show-course-select', true)\"\n    />\n  </FormField>\n</template>\n","<script setup>\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport {computed, toRefs} from 'vue'\n\n//Emits and\ndefineEmits([\n  'input',\n])\nconst props = defineProps({\n  name: {\n    type: String,\n    default: '',\n  },\n  validation: {\n    type: Object,\n    required: true,\n  },\n  errors: {\n    type: Array,\n    default: () => [],\n  },\n})\n\n//Get refs\nconst {errors, validation} = toRefs(props)\n\nconst errorsArray = computed(() => {\n  const nameErrors = errors.value.map(error => `Name ${error}`)\n  if (validation.value.$error) {\n    return [...nameErrors, validation.value.required.$message]\n  }\n  else {\n    return nameErrors\n  }\n})\n</script>\n\n<template>\n  <FormField\n    test-id=\"scheduleNameSection\"\n    label=\"Schedule name\"\n    is-required\n    :errors=\"errorsArray\"\n  >\n    <TextInput\n      test-id=\"scheduleNameInput\"\n      :value=\"name\"\n      :has-error=\"validation.$error || !!errors.length\"\n      :character-limit=\"200\"\n      @input=\"$emit('input', $event.value)\"\n    />\n  </FormField>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Warning from '@/components/shared/core/Warning.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\nconst props = defineProps({\n  addressTypes: {\n    type: Array,\n    required: true,\n  },\n  value: {\n    type: Array,\n    required: true,\n  },\n  isScheduledByStep: {\n    type: Boolean,\n    required: true,\n  },\n  deliveryTimeType: {\n    type: String,\n    required: true,\n  },\n  isBinge: {\n    type: Boolean,\n    required: true,\n  },\n  validation: {\n    type: Object,\n    default: () => ({}),\n  },\n})\n\n//Get refs\nconst {deliveryTimeType} = toRefs(props)\nconst isDeliverAt = computed(() => deliveryTimeType.value === 'deliver_at')\n</script>\n\n<template>\n  <FormField\n    test-id=\"deliveryMethodsSection\"\n    label=\"Delivery methods\"\n    sub-label=\"Choose which delivery methods you would like to offer for this course\"\n    :error=\"validation.nudge.$invalid ? validation.nudge.$message : null\"\n  >\n    <template #subLabelAside>\n      <Warning\n        v-if=\"isScheduledByStep\"\n        text=\"WhatsApp cannot be selected when a custom schedule is being used. Please switch to a basic schedule to use WhatsApp.\"\n      />\n      <Warning\n        v-else-if=\"isDeliverAt\"\n        text=\"WhatsApp cannot be selected when 'Deliver at' is being used. Please remove 'Deliver at' as a delivery time to use WhatsApp.\"\n      />\n    </template>\n    <SelectInput\n      test-id=\"deliveryMethodSelect\"\n      :value=\"value\"\n      :options=\"addressTypes\"\n      label-prop=\"display_name\"\n      value-prop=\"address_type\"\n      is-multi-select\n      v-bind=\"$attrs\"\n      :selectable=\"option => isScheduledByStep || (isDeliverAt && !isBinge) ? option.address_type !== 'is_sms_whatsapp' : true\"\n      @input=\"$emit('input', $event.value)\"\n    />\n  </FormField>\n</template>\n\n<style module lang=\"scss\">\n// This is a hack to get the options to display correctly in the select with the tooltip\n.tooltip {\n  font-size: 14px;\n}\n</style>\n","<script setup>\nimport InputWrapper from '@/components/shared/form/InputWrapper.vue'\nimport InputList from '@/components/shared/form/InputList.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport DropdownPanel from '@/components/shared/dropdown/DropdownPanel.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {DateTime} from 'luxon'\nimport {inputValueToUTCDateTime, roundMinute} from '@/helpers/date-and-time.js'\nimport {dateFormats, meridiems, hourOptions, minuteOptions, meridiemOptions} from '@/constants/date-and-time.js'\nimport {useVisibilityToggle} from '@/composables/use-visibility-toggle.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {ref, toRefs, watch, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n  'dirty',\n])\nconst props = defineProps({\n  value: {\n    type: [String, DateTime, Object],\n    default: '',\n  },\n  displayFormat: {\n    type: String,\n    default: dateFormats.TIME,\n  },\n  inputFormat: {\n    type: String,\n    default: dateFormats.TIME,\n  },\n  outputFormat: {\n    type: String,\n    default: dateFormats.TIME,\n  },\n  isClearable: {\n    type: Boolean,\n    default: false,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n})\n\n//Refs\nconst {timezone} = useTimezone()\nconst {value, displayFormat, inputFormat, outputFormat, isDisabled} = toRefs(props)\n\n//DateTime value (used as base reference for all other values)\nconst dateTimeValue = computed(() => inputValueToUTCDateTime(value.value, inputFormat.value, timezone.value))\n\n//Display value as displayed to the user in the text input\nconst displayValue = computed(() => dateTimeValue.value?.setZone(timezone.value).toFormat(displayFormat.value) || '')\n\n//Object value with split out values for the time picker\nconst objectValue = computed(() => {\n\n  //No value\n  if (!dateTimeValue.value || dateTimeValue.value.invalid) {\n    return null\n  }\n\n  //Convert to object and extract values\n  const {hour, minute} = dateTimeValue.value.setZone(timezone.value).toObject()\n\n  //Time picker uses 12-hour time so convert from 24-hour\n  return {\n    hour: String(parseInt(hour % 12 || 12)),\n    minute: String(parseInt(roundMinute(minute)) || '00'),\n    meridiem: hour < 12 ? meridiems.AM : meridiems.PM,\n  }\n})\n\n//Individual refs for hour/minute/meridiem\nconst hour = ref('')\nconst minute = ref('')\nconst meridiem = ref('')\n\n//Computed date based on individual refs\nconst computedDateTime = computed(() => {\n  if (!hour.value || !minute.value || !meridiem.value) {\n    return null\n  }\n  return DateTime.fromObject({\n    hour: (parseInt(hour.value) % 12) + (meridiem.value === meridiems.PM ? 12 : 0),\n    minute: parseInt(minute.value),\n  }, {zone: timezone.value})\n})\n\n//Validation helper\nconst isValid = computed(() => {\n\n  //Check if all required fields are filled\n  if (!hour.value || !minute.value || !meridiem.value) {\n    return false\n  }\n\n  //Try to create a DateTime object from the selected values\n  const timeString = `${hour.value}:${minute.value} ${meridiem.value}`\n  return DateTime.fromFormat(timeString, dateFormats.TIME).isValid\n})\n\n//Apply new value\nconst apply = () => {\n  const dateTime = computedDateTime.value.setZone('utc')\n  emit('input', {\n    value: computedDateTime.value.toFormat(outputFormat.value),\n    dateTime,\n    iso: dateTime.toISO(),\n    hour: Number(hour.value),\n    minute: Number(minute.value),\n    meridiem: meridiem.value,\n  })\n  emit('dirty')\n  hideDropdown()\n}\n\n//Watch object value for changes and update individual refs\n//We don't use computed values, so that we can freely change the individual refs\n//with the time picker interface.\nwatch(objectValue, () => {\n  if (objectValue.value) {\n    hour.value = objectValue.value.hour\n    minute.value = objectValue.value.minute\n    meridiem.value = objectValue.value.meridiem\n  }\n}, {immediate: true})\n\n//Dropdown toggling\nconst inputWrapper = ref(null)\nconst dropdownPanel = ref(null)\nconst {\n  isVisible: isShowingDropdown,\n  hide: hideDropdown,\n  toggle: toggleDropdown,\n} = useVisibilityToggle(inputWrapper, dropdownPanel)\n\n//Wrapper around cancel\nconst handleCancel = () => {\n  hideDropdown()\n  if (objectValue.value) {\n    hour.value = objectValue.value.hour\n    minute.value = objectValue.value.minute\n    meridiem.value = objectValue.value.meridiem\n  }\n  else {\n    hour.value = ''\n    minute.value = ''\n    meridiem.value = ''\n  }\n}\n\n//Wrapper around click handler\nconst handleClick = () => {\n  if (props.isDisabled) {\n    return\n  }\n  toggleDropdown()\n}\n</script>\n\n<template>\n  <InputWrapper ref=\"inputWrapper\">\n    <TextInput\n      :value=\"displayValue\"\n      :test-id=\"testId\"\n      :is-disabled=\"isDisabled\"\n      :is-clickable=\"!isDisabled\"\n      readonly\n      v-bind=\"$attrs\"\n      @click=\"handleClick()\"\n    >\n      <template #iconLeft>\n        <Icon\n          icon=\"schedule\"\n          size=\"s\"\n          is-outlined\n          :is-clickable=\"!isDisabled\"\n          :test-id=\"testId ? `${testId}_icon` : undefined\"\n        />\n      </template>\n      <template\n        v-if=\"isClearable && value && !isDisabled\"\n        #iconRight\n      >\n        <Icon\n          icon=\"close\"\n          size=\"s\"\n          is-outlined\n          is-clickable\n          @click.stop=\"emit('input', {value: ''})\"\n        />\n      </template>\n    </TextInput>\n    <DropdownPanel\n      ref=\"dropdownPanel\"\n      :is-visible=\"isShowingDropdown\"\n    >\n      <InputList is-inline>\n        <SelectInput\n          :test-id=\"testId ? `${testId}_hour` : undefined\"\n          :class=\"$style.select\"\n          :value=\"hour\"\n          :options=\"hourOptions\"\n          is-slim\n          is-centered\n          :is-searchable=\"false\"\n          :is-clearable=\"false\"\n          @input=\"hour = $event.value\"\n        />\n        <span>:</span>\n        <SelectInput\n          :test-id=\"testId ? `${testId}_minute` : undefined\"\n          :class=\"$style.select\"\n          :value=\"minute\"\n          :options=\"minuteOptions\"\n          is-slim\n          is-centered\n          :is-searchable=\"false\"\n          :is-clearable=\"false\"\n          @input=\"minute = $event.value\"\n        />\n        <SelectInput\n          :test-id=\"testId ? `${testId}_meridiem` : undefined\"\n          :class=\"$style.select\"\n          :value=\"meridiem\"\n          :options=\"meridiemOptions\"\n          is-slim\n          is-centered\n          :is-searchable=\"false\"\n          :is-clearable=\"false\"\n          @input=\"meridiem = $event.value\"\n        />\n      </InputList>\n      <ButtonBar>\n        <template #left>\n          <ActionButton\n            label=\"Cancel\"\n            type=\"secondary\"\n            :test-id=\"testId ? `${testId}_cancelButton` : undefined\"\n            @click=\"handleCancel()\"\n          />\n        </template>\n        <template #right>\n          <ActionButton\n            label=\"Apply\"\n            type=\"primary\"\n            :is-disabled=\"!isValid\"\n            :test-id=\"testId ? `${testId}_applyButton` : undefined\"\n            @click=\"apply()\"\n          />\n        </template>\n      </ButtonBar>\n    </DropdownPanel>\n  </InputWrapper>\n</template>\n\n<style module lang=\"scss\">\n.select {\n  width: 70px;\n}\n</style>\n","<script setup>\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'update-step-start-date',\n  'update-step-deliver-at-time',\n  'dirty',\n])\nconst props = defineProps({\n  steps: {\n    type: Array,\n    required: true,\n  },\n  validations: {\n    type: Object,\n    required: true,\n  },\n  hasEnrollments: {\n    type: Boolean,\n    required: true,\n  },\n  errors: {\n    type: Object,\n    required: true,\n  },\n  isConcluded: {\n    type: Boolean,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  fetchingSteps: {\n    type: Boolean,\n    default: false,\n  },\n  validationMessages: {\n    type: Array,\n    required: true,\n  },\n})\n\n//Get props\nconst {isConcluded, hasEnrollments, errors, validationMessages} = toRefs(props)\n\n//Methods\nconst updateStartDate = (newStartDate, index) => {\n  emit('update-step-start-date', {newStartDate, index})\n  emit('dirty')\n}\nconst updateDeliverAtTime = (newDeliverAtTime, index) => {\n  emit('update-step-deliver-at-time', {newDeliverAtTime, index})\n  emit('dirty')\n}\nconst ignoreValidationErrors = step => {\n  if (isConcluded.value) {\n    return true\n  }\n  return step.delivery_date_passed && hasEnrollments.value\n}\nconst hasErrors = step => {\n  return errors.value[step.id] && Object.keys(errors.value[step.id]).length\n}\nconst errorMessages = (step, index) => {\n  const backendErrors = errors.value[step.id] || []\n  if (ignoreValidationErrors(step)) {\n    return backendErrors\n  }\n  else {\n    return [...validationMessages.value[index].start_date.map(field => field.$message), ...backendErrors]\n  }\n}\n</script>\n\n<template>\n  <FormField\n    test-id=\"launchDateSection\"\n    label=\"Lessons\"\n    sub-label=\"Set your course to automatically deliver lessons on your chosen days and times\"\n  >\n    <FlexColumn>\n      <Divider />\n      <Spinner\n        v-if=\"fetchingSteps\"\n        is-block\n      />\n      <template v-else>\n        <div\n          v-for=\"(step, index) in steps\"\n          :key=\"`${step.id}-${index}`\"\n        >\n          <Tooltip\n            :text=\"step.name\"\n            is-full-width\n          >\n            <label class=\"line-clamp-1 mb-2 !font-semibold w-fit\">\n              {{ step.name }}\n            </label>\n          </Tooltip>\n          <FormField :errors=\"errorMessages(step, index)\">\n            <SideBySide :class=\"$style.sideBySide\">\n              <Tooltip\n                text=\"Editing past dates is not possible for this schedule because learners are currently enrolled.\"\n                position=\"top\"\n                is-full-width\n                :is-disabled=\"!ignoreValidationErrors(step) || isConcluded\"\n              >\n                <DateInput\n                  :test-id=\"`${step.id}-date-picker`\"\n                  :has-error=\"(validations[index].start_date.$invalid || hasErrors(step)) && !ignoreValidationErrors(step)\"\n                  :is-disabled=\"ignoreValidationErrors(step) || (isDisabled && !step.is_unscheduled)\"\n                  :value=\"step.start_date\"\n                  @input=\"updateStartDate($event.formattedValue, index)\"\n                />\n              </Tooltip>\n              <TimeInput\n                :test-id=\"`${step.id}-time-picker`\"\n                :is-disabled=\"ignoreValidationErrors(step) || (isDisabled && !step.is_unscheduled)\"\n                :value=\"step.deliver_at_time\"\n                @input=\"updateDeliverAtTime($event.value, index)\"\n              />\n            </SideBySide>\n          </FormField>\n        </div>\n      </template>\n    </FlexColumn>\n  </FormField>\n</template>\n\n<style module lang=\"scss\">\n.sideBySide {\n  width: 100%;\n}\n</style>\n","<script>\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {onClickOutside} from '@vueuse/core'\n\nexport default {\n  components: {\n    TimeInput,\n    DateInput,\n    FormField,\n    FlexColumn,\n    Tooltip,\n    SelectInput,\n    Spinner,\n  },\n  props: {\n    steps: {\n      type: Array,\n      required: true,\n    },\n    fetchingSteps: {\n      type: Boolean,\n      default: false,\n    },\n    dayOrDateOptions: {\n      type: Array,\n      required: true,\n    },\n    dayOrDateSelection: {\n      type: String,\n      required: true,\n    },\n    validations: {\n      type: Object,\n      required: true,\n    },\n    validationMessages: {\n      type: Array,\n      required: true,\n    },\n    errors: {\n      type: Object,\n      required: true,\n    },\n    disableStartDatePicker: {\n      type: Boolean,\n      default: false,\n    },\n    isDisabled: {\n      type: Boolean,\n      default: false,\n    },\n  },\n  emits: [\n    'update-step-deliver-at-time',\n    'update-step-num-days',\n    'update-step-start-day',\n    'update-step-start-date',\n    'dirty',\n  ],\n  data() {\n    return {\n      showDateInput: false,\n    }\n  },\n  computed: {\n    numDaysArray() {\n      return [...Array(31).keys()]\n    },\n    startDate() {\n      return this.steps[0]?.start_date || ''\n    },\n  },\n  mounted() {\n    onClickOutside(\n      this.$refs.datePicker,\n      this.handleDateClose\n    )\n  },\n  methods: {\n    updateDeliverAtTime(newDeliverAtTime, index) {\n      this.$emit('update-step-deliver-at-time', {newDeliverAtTime, index})\n      this.$emit('dirty')\n    },\n    updateNumDays(newNumDays, index) {\n      this.$emit('update-step-num-days', {newNumDays, index})\n      this.$emit('dirty')\n    },\n    errorText(index, step) {\n      // NOTE: combine the relevant validations with the errors from the backend into a single string\n      const relevantValidations = this.relevantValidations(index)\n      const stepId = step.id\n\n      let errors = Object.values(relevantValidations)\n        .filter(validation => !validation.value)\n        .map(validation => validation.message)\n\n      if (this.errors[stepId]) {\n        errors = [...errors, ...new Set(this.errors[stepId].flat().filter(error => !errors.includes(error)))]\n      }\n      if (step.is_unscheduled) {\n        errors = [...errors, 'This lesson isn\\'t scheduled. Adjust or confirm the time and save changes to send it to learners']\n      }\n      return errors\n    },\n    dayText(numDays, index) {\n      const dayText = `(${numDays}) ${numDays === 1 ? 'day' : 'days'}`\n      if (index === 0) {\n        return this.dayOrDateSelection.includes('day') ? this.dayOrDateSelection : `on ${this.dayOrDateSelection}`\n      }\n      else {\n        return `${dayText} after previous lesson`\n      }\n    },\n    handleSelectionChange(event, index) {\n      if (event === 'Select date') {\n        this.showDateInput = true\n        this.$nextTick(() => {\n          this.$refs.datePicker[0].openInput()\n        })\n      }\n      else if (event === '0 days') {\n        this.$emit('update-step-num-days', {newNumDays: 0, index: index, clearStartDate: true})\n        this.$emit('dirty')\n      }\n      else {\n        this.$emit('update-step-start-day', {event, index})\n        this.$emit('dirty')\n      }\n    },\n    handleDateClose() {\n      this.showDateInput = false\n    },\n    setStartDate(value) {\n      this.showDateInput = false\n      this.$emit('update-step-start-date', value)\n      this.$emit('dirty')\n    },\n    hasErrors(step) {\n      return !!this.errors[step.id] && Object.keys(this.errors[step.id]).length > 0\n    },\n    relevantValidations(index) {\n      // NOTE: these will still fail validations, but we don't really need the background to be red on all the lessons when the start date is invalid since in the UI you can only select start date on the first lesson\n      const regex = /^(?!\\$)/\n      const keysToIgnore = index > 0 ? ['isTodayOrLater', 'startDateFallsOnSelectedDay', 'isNotWithinOneHourOfCurrentTime'] : []\n\n      const startDate = this.validations[index].start_date\n      return Object.keys(startDate)\n        .filter(key => regex.test(key) && !keysToIgnore.includes(key))\n        .reduce((obj, key) => {\n          obj[key] = {\n            value: startDate[key],\n            message: this.validationMessages[index].start_date.find(item => item.$validator === key)?.$message,\n          }\n          return obj\n        }, {})\n    },\n    isInvalid(index) {\n      return Object.values(this.relevantValidations(index)).some(validation => !validation.value)\n    },\n    needsErrorClass(step, index) {\n      return this.isInvalid(index) || this.hasErrors(step)\n    },\n  },\n}\n</script>\n\n<template>\n  <FormField>\n    <Spinner\n      v-if=\"fetchingSteps\"\n      is-block\n    />\n    <FlexColumn v-else>\n      <div\n        v-for=\"(step, index) in steps\"\n        :key=\"`${step.id}-${index}`\"\n      >\n        <Tooltip :text=\"step.name\">\n          <label class=\"line-clamp-1 mb-2 !font-semibold w-fit\">\n            {{ step.name }}\n          </label>\n        </Tooltip>\n        <FormField :errors=\"errorText(index, step)\">\n          <div class=\"w-50\">\n            <SelectInput\n              v-if=\"index > 0\"\n              :is-clearable=\"false\"\n              :is-disabled=\"isDisabled && !step.is_unscheduled\"\n              :options=\"numDaysArray\"\n              :value=\"step.num_days\"\n              :has-error=\"needsErrorClass(step, index)\"\n              @input=\"updateNumDays($event.value, index)\"\n            />\n            <div\n              v-else\n              class=\"dayOrDateContainer\"\n            >\n              <SelectInput\n                v-if=\"!showDateInput\"\n                :is-clearable=\"false\"\n                :is-disabled=\"isDisabled && !step.is_unscheduled\"\n                :options=\"dayOrDateOptions\"\n                placeholder=\"Select a day or date\"\n                :value=\"dayOrDateSelection\"\n                :has-error=\"needsErrorClass(step, index)\"\n                :selectable=\"option => disableStartDatePicker ? option !== 'Select date' : true\"\n                @input=\"handleSelectionChange($event.value, index)\"\n              />\n              <DateInput\n                v-else\n                ref=\"datePicker\"\n                :disabled=\"isDisabled && !step.is_unscheduled\"\n                :is-clearable=\"false\"\n                :has-error=\"needsErrorClass(step, index)\"\n                :value=\"startDate\"\n                @input=\"setStartDate($event.formattedValue)\"\n              />\n            </div>\n          </div>\n          <div class=\"w-50\">\n            <TimeInput\n              :id=\"`${step.id}-time-picker`\"\n              :is-disabled=\"isDisabled && !step.is_unscheduled\"\n              :has-error=\"needsErrorClass(step, index)\"\n              :value=\"step.deliver_at_time\"\n              @input=\"updateDeliverAtTime($event.value, index)\"\n            />\n          </div>\n          <template #underInput>\n            <p class=\"text-sm mt-2 mb-0\">\n              {{ dayText(step.num_days, index) }}\n            </p>\n          </template>\n        </FormField>\n      </div>\n    </FlexColumn>\n  </FormField>\n</template>\n\n<style scoped lang=\"scss\">\n.dayOrDateContainer {\n  :deep(.vs__selected) {\n    z-index: 100;\n  }\n}\n</style>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport {DateTime} from 'luxon'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'dirty',\n  'input',\n])\nconst props = defineProps({\n  value: {\n    type: [String, DateTime],\n    default: '',\n  },\n  disableStartDatePicker: {\n    type: Boolean,\n    default: false,\n  },\n  validation: {\n    type: Object,\n    required: true,\n  },\n  errors: {\n    type: Array,\n    default: () => [],\n  },\n  showStartDatePassedWarning: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get props\nconst {\n  value,\n  validation,\n  showStartDatePassedWarning,\n  disableStartDatePicker,\n  errors,\n} = toRefs(props)\n\n//Computed\nconst combinedErrors = computed(() => {\n  const errorMessages = [...errors.value, ...validation.value.$errors]\n  if (showStartDatePassedWarning.value) {\n    errorMessages.push('Launch date has passed! Consider clearing or updating the date')\n  }\n  if (disableStartDatePicker.value) {\n    errorMessages.push('This distribution has active enrollments. The launch date cannot be edited')\n  }\n  return errorMessages\n})\n</script>\n\n<template>\n  <FormField\n    test-id=\"launchDateSection\"\n    label=\"Launch date\"\n    sub-label=\"If you don't set a launch date, the course will start once learners are enrolled\"\n    :errors=\"combinedErrors\"\n  >\n    <DateInput\n      :has-error=\"validation.$invalid || !!errors.length \"\n      :value=\"value\"\n      :is-disabled=\"disableStartDatePicker\"\n      is-clearable\n      test-id=\"launchDateInput\"\n      @input=\"emit('input', $event)\"\n      @dirty=\"$emit('dirty')\"\n    />\n  </FormField>\n</template>\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport {toRefs} from 'vue'\n\nconst emit = defineEmits([\n  'change',\n  'dirty',\n])\n\nconst props = defineProps({\n  selectedDays: {\n    type: Array,\n    required: true,\n  },\n  daysOfTheWeek: {\n    type: Array,\n    required: true,\n  },\n  validation: {\n    type: Object,\n    required: true,\n  },\n  errors: {\n    type: Array,\n    required: true,\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {selectedDays} = toRefs(props)\n\n//Methods\nconst updateSelectedDays = day => {\n  const newSelectedDays = selectedDays.value.includes(day)\n    ? selectedDays.value.filter((d) => d !== day)\n    : [...selectedDays.value, day]\n\n  emit('change', newSelectedDays)\n  emit('dirty')\n}\n</script>\n\n<template>\n  <FormField\n    test-id=\"lessonDaysSection\"\n    label=\"Lesson days\"\n    sub-label=\"Which days do you want lessons to deliver?\"\n    :errors=\"[...validation.$errors, ...errors]\"\n  >\n    <div class=\"w-100 grid grid-cols-7 gap-x-3 cursor-pointer\">\n      <template\n        v-for=\"day in daysOfTheWeek\"\n        :key=\"day\"\n      >\n        <input\n          :id=\"day\"\n          :checked=\"selectedDays.includes(day)\"\n          :is-disabled=\"isDisabled\"\n          class=\"sr-only\"\n          type=\"checkbox\"\n          :value=\"day\"\n          @change=\"updateSelectedDays($event.target.value)\"\n        >\n        <label\n          :class=\"['col-span-1 items-center justify-center px-3 py-2 !text-sm !font-semibold inline-flex cursor-pointer mb-0 rounded-md', selectedDays?.includes(day) ? 'bg-orange-600 bg-opacity-10 text-orange-600' : 'text-gray-400 bg-gray-50']\"\n          :for=\"day\"\n        > {{ day.slice(0, 3).charAt(0).toUpperCase() + day.slice(0, 3).slice(1).toLowerCase() }}</label>\n      </template>\n    </div>\n  </FormField>\n</template>\n","<script>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\n\nexport default {\n  components: {\n    TimeInput,\n    FormField,\n    FlexColumn,\n    Tooltip,\n    SideBySide,\n  },\n  props: [\n    'deliverAtTime',\n    'deliverBetweenStartTime',\n    'deliverBetweenEndTime',\n    'deliveryTimeType',\n    'useUserTimezone',\n    'validation',\n    'errors',\n    'hasEnrollments',\n    'hasWhatsappSelected',\n    'isDisabled',\n    'isBinge',\n    'isDeliverAtClearable',\n  ],\n  emits: [\n    'update:deliver-at-time',\n    'update:deliver-between-start-time',\n    'update:deliver-between-end-time',\n    'update:delivery-time-type',\n    'dirty',\n  ],\n  computed: {\n    localDeliverAtTime: {\n      get() {\n        return this.deliverAtTime\n      },\n      set(value) {\n        this.$emit('update:deliver-at-time', value)\n        this.$emit('dirty')\n      },\n    },\n    localDeliverBetweenStartTime: {\n      get() {\n        return this.deliverBetweenStartTime\n      },\n      set(value) {\n        this.$emit('update:deliver-between-start-time', value)\n        this.$emit('dirty')\n      },\n    },\n    localDeliverBetweenEndTime: {\n      get() {\n        return this.deliverBetweenEndTime\n      },\n      set(value) {\n        this.$emit('update:deliver-between-end-time', value)\n        this.$emit('dirty')\n      },\n    },\n    localDeliveryTimeType: {\n      get() {\n        return this.deliveryTimeType\n      },\n      set(value) {\n        if (value === 'deliver_at' && this.hasWhatsappSelected && !this.isBinge) {\n          return\n        }\n        this.$emit('update:delivery-time-type', value)\n        this.$emit('dirty')\n      },\n    },\n    timeTypes() {\n      if (this.isBinge) {\n        return ['deliver_at']\n      }\n      return ['deliver_at', 'deliver_between', 'deliver_anytime']\n    },\n    fullErrors() {\n      const errors = [...this.errors]\n      if (this.validation.startTimeIsBeforeEndTime.$invalid) {\n        errors.push('Start time must be before end time')\n      }\n      if (this.validation.isFiveOrMoreHoursApartWhenWhatsapp.$invalid) {\n        errors.push('Delivery windows for WhatsApp must be set to 5+ hours')\n      }\n      if (this.validation.isNotWithinOneHourOfCurrentTime.$invalid) {\n        errors.push('Deliver at date and time must be at least one hour in the future in the specified timezone')\n      }\n      return errors\n    },\n    hasErrors() {\n      return !!this.fullErrors.length\n    },\n  },\n}\n</script>\n\n<template>\n  <FormField\n    test-id=\"deliveryTimeSection\"\n    label=\"Delivery time\"\n    :sub-label=\"isBinge ? 'If you don\\'t select a time, messages will send at the time you enroll learners in the schedule' : 'Select one'\"\n  >\n    <FlexColumn :with-gap=\"false\">\n      <div\n        v-if=\"!isBinge\"\n        class=\"grid gap-x-3 cursor-pointer w-100 grid-cols-3\"\n      >\n        <template\n          v-for=\"timeType in timeTypes\"\n          :key=\"`${timeType}-input`\"\n        >\n          <input\n            :id=\"timeType\"\n            v-model=\"localDeliveryTimeType\"\n            class=\"sr-only\"\n            :disabled=\"isDisabled || (timeType === 'deliver_at' && hasWhatsappSelected)\"\n            name=\"delivery-time\"\n            type=\"radio\"\n            :value=\"timeType\"\n          >\n          <Tooltip\n            is-full-width\n            text=\"Deliver at times cannot be utilized with WhatsApp. Please remove WhatsApp as a delivery method to set a deliver at time.\"\n            is-compact\n            :is-disabled=\"!hasWhatsappSelected || timeType !== 'deliver_at' || isDisabled\"\n          >\n            <label\n              :test-id=\"`deliveryTimeType-${timeType}`\"\n              :class=\"['col-span-1 w-100 items-center justify-center !px-3 !py-2 !text-sm !font-semibold inline-flex cursor-pointer mb-0 rounded-md', deliveryTimeType === timeType ? 'bg-orange-600 bg-opacity-10 text-orange-600' : 'text-gray-400 bg-gray-50']\"\n              :for=\"timeType\"\n              @click=\"localDeliveryTimeType = timeType\"\n            >{{ timeType.replace('_', ' ').replace(/^\\w/, c => c.toUpperCase()) }}\n            </label>\n          </Tooltip>\n        </template>\n      </div>\n      <SideBySide>\n        <FormField\n          v-if=\"deliveryTimeType === 'deliver_at'\"\n          :is-required=\"!isDeliverAtClearable\"\n          :sub-label=\"isBinge && !isDeliverAtClearable ? 'A deliver at time is required for instant courses with a start date' : ''\"\n          :errors=\"fullErrors\"\n        >\n          <TimeInput\n            test-id=\"deliverAtTime\"\n            :value=\"localDeliverAtTime\"\n            :is-clearable=\"isDeliverAtClearable\"\n            :is-disabled=\"isDisabled\"\n            :has-error=\"hasErrors\"\n            @input=\"localDeliverAtTime = $event.value\"\n          />\n        </FormField>\n        <template v-else-if=\"deliveryTimeType === 'deliver_between'\">\n          <FormField\n            label=\"Start time\"\n            is-required\n            :errors=\"fullErrors\"\n          >\n            <TimeInput\n              test-id=\"deliverBetweenStartTime\"\n              :value=\"localDeliverBetweenStartTime\"\n              :has-error=\"hasErrors\"\n              :is-disabled=\"isDisabled\"\n              @input=\"localDeliverBetweenStartTime = $event.value\"\n            />\n          </FormField>\n          <FormField\n            label=\"End time\"\n            is-required\n          >\n            <TimeInput\n              test-id=\"deliverBetweenEndTime\"\n              :value=\"localDeliverBetweenEndTime\"\n              :has-error=\"hasErrors\"\n              :is-disabled=\"isDisabled\"\n              @input=\"localDeliverBetweenEndTime = $event.value\"\n            />\n          </FormField>\n        </template>\n      </SideBySide>\n    </FlexColumn>\n  </FormField>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * Legacy distributions API service which doesn't convert params, so\n * that we can use it without making too many changes to the\n * existing Vue pages.\n */\nexport class LegacyDistributionsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/distributions'\n  itemKey = 'distribution'\n  itemsKey = 'distributions'\n  convertParamKeys = false\n  convertDataKeys = false\n  convertJsonKeys = false\n\n  /**\n   * Create\n   */\n  create(params) {\n    return this.post('/', params)\n  }\n\n  /**\n   * Update\n   */\n  update(distributionId, params) {\n    return this.patch(`/${distributionId}`, params)\n  }\n\n  /**\n   * Update preferred address type\n   */\n  updatePreferredAddressType(distributionId, data) {\n    return this\n      .post(`/${distributionId}/update_preferred_address_type`, data)\n  }\n\n  /**\n   * Update code\n   */\n  updateCode(distributionId, data) {\n    return this\n      .post(`/${distributionId}/update_code`, data)\n  }\n\n  /**\n   * Update show on homepage\n   */\n  updateShowOnHomepage(distributionId, data) {\n    return this\n      .post(`/${distributionId}/update_show_on_homepage`, data)\n  }\n\n  /**\n   * Update prioritize enrollment\n   */\n  updatePrioritizeEnrollment(distributionId, data) {\n    return this\n      .post(`/${distributionId}/update_prioritize_enrollment`, data)\n  }\n\n  /**\n   * Update enabled at\n   */\n  updateEnabledAt(distributionId, data) {\n    return this\n      .post(`/${distributionId}/update_enabled_at`, data)\n  }\n\n  /**\n   * Setup enrollment options\n   */\n  setupEnrollmentOptions(distributionId) {\n    return this\n      .get(`/${distributionId}/setup_enrollment_options`)\n  }\n\n  /**\n   * Setup new form\n   */\n  setupNewForm(params) {\n    return this.get('/new', params)\n  }\n\n  /**\n   * Setup edit form\n   */\n  setupEditForm(distributionId, params) {\n    return this.get(`/${distributionId}/edit`, params)\n  }\n\n  /**\n   * Setup steps\n   */\n  setupSteps(courseId, distributionId, params) {\n    //NOTE: Inconsistency with having the course ID in the place of the\n    //distribution ID in the path, we should look at refactoring this to be\n    //consistent with the rest of the API.\n    const path = distributionId ?\n      `/${courseId}/setup_steps/${distributionId}` :\n      `/${courseId}/setup_steps`\n    return this\n      .get(path, params)\n  }\n\n  /**\n   * Generate QR code\n   */\n  generateQrCode(distributionId) {\n    return this\n      .get(`/${distributionId}/generate_qr_code`)\n  }\n\n  /**\n   * Enroll cohorts and individuals\n   */\n  enrollCohortsAndIndividuals(distributionId, params) {\n    return this\n      .post(`/${distributionId}/enroll_cohorts_and_individuals`, params)\n  }\n}\n\n//Export singleton instance\nexport const legacyDistributionsApi = new LegacyDistributionsApi()\n","<script setup>\nimport CourseSelectFormSection from './CourseSelectFormSection.vue'\nimport DistributionName from './NameFormSection.vue'\nimport DeliveryMethodsFormSection from './DeliveryMethodsFormSection.vue'\nimport ChannelFormSection from './ChannelFormSection.vue'\nimport ScheduleType from './ScheduleTypeSection.vue'\nimport WhenToDeliver from './WhenToDeliverSection.vue'\nimport DistributionCadence from './CadenceFormSection.vue'\nimport LessonStartDates from './LessonStartDatesSection.vue'\nimport LessonRelativeDays from './LessonRelativeDaysSection.vue'\nimport IncludeWeekends from './IncludeWeekendsSection.vue'\nimport StartDateFormSection from './StartDateFormSection.vue'\nimport LessonDays from './LessonDaysFormSection.vue'\nimport DeliveryTime from './DeliveryTimeFormSection.vue'\nimport RequireResponses from './RequireResponsesFormSection.vue'\nimport ResponseReminders from './ResponseRemindersFormSection.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport EmailWarningModal from '@/components/shared/modals/EmailWarningModal.vue'\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport ErrorModal from '@/components/shared/modals/ErrorModal.vue'\nimport UnsavedChangesModal from '@/components/shared/modals/UnsavedChangesModal.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport TimezoneSection from './TimezoneSection.vue'\nimport {DateTime} from 'luxon'\nimport {commonChannelsApi} from '@/api/common-channels.api.js'\nimport {legacyDistributionsApi} from '@/api/legacy-distributions.api.js'\nimport {useTimezones} from '@/composables/use-timezones.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {usePage} from '@/composables/use-page.js'\nimport {ref, computed, watch, onMounted} from 'vue'\n\n//Set page header\nconst {setHeader} = usePage()\nsetHeader('Scheduling')\n\n//Routing\nconst {routeParams, queryParams} = useRouting()\nconst {id: distributionId} = routeParams.value\n\n//Composables\nconst {timezones} = useTimezones()\nconst {goToSchedulesOverview, goToEditSchedule, goToScheduleEnrollment} = useNavigation()\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\n\n//Refs\nconst addressTypes = ref([])\nconst courseId = ref(queryParams.value.courseId)\nconst course = ref(null)\nconst channels = ref([])\nconst daysOfTheWeek = ref([])\nconst weekdays = ref([])\nconst disableStartDatePicker = ref(false)\nconst distribution = ref({})\nconst errors = ref({\n  distribution: {\n    name: [],\n    schedule_filters: [],\n    selected_days: [],\n    start_date: [],\n  },\n  steps: {},\n})\nconst hasEnrollments = ref(false)\nconst isEditingDisabled = ref(false)\nconst loading = ref(true)\nconst newPreferredAddressType = ref(null)\nconst newSelectedAddressTypes = ref([])\nconst prevPreferredAddressType = ref(null)\nconst prevSelectedAddressTypes = ref([])\nconst saving = ref(false)\nconst sawEmailWarning = ref(false)\nconst selectedAddressTypes = ref([])\nconst showCourseSelect = ref(false)\nconst showStartDatePassedWarning = ref(false)\nconst steps = ref([])\nconst fetchingSteps = ref(true)\nconst scheduleType = ref('Basic')\nconst whenToDeliver = ref('Select dates')\nconst cadence = ref('Scheduled')\nconst promptReply = ref(false)\nconst responseRemindersEnabled = ref(true)\nconst includeWeekends = ref(false)\nconst scheduleTypeOptions = ref([{label: 'Basic', value: 'Basic'}, {label: 'Custom', value: 'Custom'}])\nconst whenToDeliverOptions = ref([{label: 'Select dates', value: 'Select dates'}, {label: 'Select days', value: 'Select days'}])\nconst cadenceOptions = ref([{label: 'Instant', value: 'Instant'}, {label: 'Scheduled', value: 'Scheduled'}])\nconst isShowingUnsavedChangesModal = ref(false)\nconst isShowingPreferredDeliveryTypeModal = ref(false)\nconst isShowingEmailWarningModal = ref(false)\nconst isShowingEditWarningModal = ref(false)\nconst isShowingErrorModal = ref(false)\nconst hasSeenEditingWarning = ref(false)\nconst currentDeliverAtTime = ref(null)\n\n// Computed properties\nconst ianaZone = computed(() => {\n  if (timezones.value.length > 0) {\n    return timezones.value.find(timezone => timezone.value === distribution.value.timezone).ianaZone\n  }\n  else {\n    return distribution.value.iana_zone\n  }\n})\n\nconst days = computed(() => includeWeekends.value ? daysOfTheWeek.value : weekdays.value)\n\nconst disableTimezoneSelect = computed(() => distribution.value.is_concluded || hasEnrollments.value)\n\nconst disableScheduleType = computed(() => !steps.value.length || hasEnrollments.value || (distribution.value.is_custom_by_step && distribution.value.is_concluded) || hasWhatsappSelected.value)\n\nconst isScheduledByStep = computed(() => distribution.value.is_custom_by_step || distribution.value.is_relative_by_step)\n\nconst dayOrDateSelection = computed(() => {\n  if (!steps.value.length || fetchingSteps.value) {\n    return ''\n  }\n\n  const startDate = steps.value[0]?.start_date\n  const singleDayOfWeek = steps.value[0]?.selected_days?.length === 1\n\n  if (startDate) {\n    return DateTime.fromISO(startDate).toFormat('MM/dd/yyyy')\n  }\n  else if (singleDayOfWeek) {\n    const selectedDay = steps.value[0].selected_days[0]\n    return selectedDay.charAt(0).toUpperCase() + selectedDay.slice(1)\n  }\n  else {\n    return `${steps.value[0].num_days} days`\n  }\n})\n\nconst dayOrDateOptions = computed(() => {\n  let filteredDays = [...days.value.map(day => day.charAt(0).toUpperCase() + day.slice(1)), 'Select date', '0 days']\n  const startDate = steps.value[0]?.start_date\n  const singleDayOfWeek = steps.value[0]?.selected_days?.length === 1\n\n  if (startDate) {\n    filteredDays.unshift(DateTime.fromISO(steps.value[0].start_date).toFormat('MM/dd/yyyy'))\n  }\n  else if (!singleDayOfWeek && steps.value[0]?.num_days) {\n    filteredDays.unshift(steps.value[0].num_days)\n  }\n\n  return filteredDays\n})\n\nconst hasWhatsappSelected = computed(() => selectedAddressTypes.value.includes('is_sms_whatsapp'))\n\nconst skipStartDateValidations = computed(() => {\n  const currentDate = currentDateTime()\n  const distributionCurrentStartDate = DateTime.fromISO(distribution.value.current_start_date, {zone: ianaZone.value})\n  const distributionNewStartDate = DateTime.fromISO(distribution.value.start_date, {zone: ianaZone.value})\n  const hasExistingPastStartDate = distribution.value.current_start_date &&\n    distributionCurrentStartDate < currentDate &&\n    distribution.value.start_date &&\n    distributionCurrentStartDate.toISODate() === distributionNewStartDate.toISODate()\n\n  let hasExistingPastStartDateAndTime = false\n  if (distribution.value.start_date &&\n      distribution.value.deliver_at_time &&\n      distribution.value.current_start_date &&\n      currentDeliverAtTime) {\n    hasExistingPastStartDateAndTime =\n      distributionCurrentStartDate.toISODate() === distributionNewStartDate.toISODate() &&\n      currentDeliverAtTime.value === distribution.value.deliver_at_time\n  }\n\n  return isScheduledByStep.value || hasExistingPastStartDate || hasExistingPastStartDateAndTime\n})\n\nconst isInvalid = computed(() => {\n  return $v.value.$invalid || errors.value?.distribution?.name?.length\n})\n\nconst hasLessonsLessThanThreeHoursApart = computed(() => {\n  if (!isScheduledByStep.value) {\n    return false\n  }\n\n  return steps.value.some((currentStep, i) => {\n    const nextStep = steps.value[i + 1]\n    if (!nextStep) {\n      return false\n    }\n\n    const {is_custom_by_step, is_relative_by_step} = distribution.value\n    const isCustomCondition = is_custom_by_step && nextStep.start_date.length\n    const isRelativeCondition = is_relative_by_step && nextStep.num_days === 0\n\n    if (isCustomCondition || isRelativeCondition) {\n      return stepDateTime(currentStep).plus({hours: 3}) > stepDateTime(nextStep)\n    }\n\n    return false\n  })\n})\n\n// Watch\nwatch(selectedAddressTypes, (newVal, oldVal) => {\n  // Prevent user from deselecting all address types\n  if (newVal.length === 0) {\n    selectedAddressTypes.value = oldVal\n  }\n\n  // Show email warning modal if email is selected and user hasn't seen it during current load visit yet\n  const addedElement = newVal.find(item => !oldVal.includes(item))\n  if (addedElement === 'is_email' && !sawEmailWarning.value) {\n    isShowingEmailWarningModal.value = true\n    sawEmailWarning.value = true\n  }\n\n  // if the current list of selectedAddressTypes does not include distribution.preferred_address_type, set distribution.preferred_address_type to first value in selectedAddressTypes. Has to be done in here to prevent unselecting of last preferred delivery method\n  const enums = newVal.map((addressType) => addressType.substring(3)) // get rid of is_ so we can set preferred_address_type\n  if (!enums.includes(distribution.value.preferred_address_type)) {\n    newPreferredAddressType.value = enums[0]\n    newSelectedAddressTypes.value = newVal\n    prevSelectedAddressTypes.value = oldVal\n    prevPreferredAddressType.value = distribution.value.preferred_address_type\n    if (newVal.length > 0) {\n      isShowingPreferredDeliveryTypeModal.value = true\n    }\n    return\n  }\n\n  // The address type fields are all separate booleans on the distribution object, but come back in a single array here since we're using a multi-select instead of checkboxes. Map the array of address types to their corresponding fields on the distribution object.\n  mapSelectedAddressTypesToDistribution()\n})\n\n// Methods\nconst handleEditingToggle = () => {\n  if (hasSeenEditingWarning.value) {\n    isEditingDisabled.value = !isEditingDisabled.value\n  }\n  else {\n    isShowingEditWarningModal.value = true\n  }\n}\nconst confirmEditingWarningModal = () => {\n  isEditingDisabled.value = !isEditingDisabled.value\n  isShowingEditWarningModal.value = false\n  hasSeenEditingWarning.value = true\n}\nconst hideEditingWarningModal = () => {\n  isShowingEditWarningModal.value = false\n  hasSeenEditingWarning.value = true\n}\n\nconst selectCourse = (selectedCourse) => {\n  if (selectedCourse === null) {\n    return\n  }\n  course.value = selectedCourse\n  $v.value.course.$touch()\n  fetchCourseSteps()\n}\n\nconst updateName = (name) => {\n  distribution.value.name = name\n  errors.value.distribution.name = []\n  $v.value.distribution.$touch()\n}\n\nconst updateSelectedAddressTypes = (value) => {\n  selectedAddressTypes.value = value\n}\n\nconst updateChannel = (value) => {\n  distribution.value.channel_id = value\n}\n\nconst updateTimezone = (value) => {\n  distribution.value.timezone = value\n}\n\nconst updateUseUserTimezone = (value) => {\n  distribution.value.use_user_timezone = value\n}\n\nconst updateUseCohortTimezone = value => distribution.value.use_cohort_timezone = value\n\nconst loadChannels = async () => {\n  const data = await commonChannelsApi.query()\n  channels.value = data.channels\n}\n\nconst loadSetupData = async () => {\n  const data = distributionId ?\n    await legacyDistributionsApi.setupEditForm(distributionId, queryParams.value) :\n    await legacyDistributionsApi.setupNewForm(queryParams.value)\n  setData(data)\n  if (distribution.value.course_id) {\n    fetchCourseSteps()\n  }\n}\n\nconst setStartDateOnSteps = (date) => {\n  steps.value.forEach(step => {\n    step.start_date = date\n    step.selected_days = days.value\n  })\n}\n\nconst updateStepStartDay = ({event, index}) => {\n  setStartDateOnSteps('')\n  steps.value[index] = {...steps.value[index], selected_days: [event.toLowerCase()]}\n}\n\nconst updateIncludeWeekends = () => {\n  includeWeekends.value = !includeWeekends.value\n  const hasStartDate = steps.value[0] && steps.value[0].start_date?.length\n  const startingIndex = hasStartDate ? 0 : 1\n  steps.value.forEach((step, index) => {\n    if (index < startingIndex) {\n      return\n    }\n    steps.value[index] = {...step, selected_days: days.value}\n  })\n}\n\nconst updateResponseRemindersEnabled = () => {\n  responseRemindersEnabled.value = !responseRemindersEnabled.value\n  distribution.value.response_reminders_enabled = responseRemindersEnabled.value\n}\n\nconst updatePromptReplyBehavior = () => {\n  promptReply.value = !promptReply.value\n  distribution.value.prompt_reply = promptReply.value ? 'hold_back_cadence' : 'ignore'\n}\n\nconst updateCadence = (value) => {\n  cadence.value = value\n  distribution.value.binge = cadence.value === 'Instant'\n  if (cadence.value === 'Instant') {\n    distribution.value.delivery_time_type = 'deliver_at'\n    distribution.value.start_date = ''\n    distribution.value.deliver_at_time = '' // start out with no time/date selected for instant deliver_at\n  }\n  if (cadence.value === 'Scheduled' && distribution.value.delivery_time_type == 'deliver_at' && selectedAddressTypes.value.includes('is_sms_whatsapp')) {\n    distribution.value.delivery_time_type = 'deliver_between'\n  }\n  if (cadence.value === 'Scheduled' && distribution.value.delivery_time_type == 'deliver_at' && !distribution.value.deliver_at_time) {\n    distribution.value.deliver_at_time = '9:00 AM'\n  }\n}\n\nconst setCustomScheduleType = () => {\n  const isSelectDates = whenToDeliver.value === 'Select dates'\n  distribution.value.is_custom_by_step = isSelectDates\n  distribution.value.is_relative_by_step = !isSelectDates\n}\n\nconst updateScheduleType = (value) => {\n  scheduleType.value = value\n  if (scheduleType.value === 'Basic') {\n    distribution.value.is_custom_by_step = false\n    distribution.value.is_relative_by_step = false\n  }\n  else if (!isScheduledByStep.value) {\n    setCustomScheduleType()\n    fetchCourseSteps()\n  }\n  else {\n    fetchCourseSteps()\n  }\n}\n\nconst updateWhenToDeliver = (value) => {\n  whenToDeliver.value = value\n  setCustomScheduleType()\n  fetchCourseSteps()\n}\nconst setData = data => {\n  addressTypes.value = data.address_types\n  course.value = data.course\n  daysOfTheWeek.value = data.days_of_the_week\n  weekdays.value = data.weekdays\n  disableStartDatePicker.value = data.disable_start_date_picker\n  distribution.value = data.distribution\n  hasEnrollments.value = data.has_enrollments\n  currentDeliverAtTime.value = data.distribution.deliver_at_time\n  isEditingDisabled.value = hasEnrollments.value // start off with editing disabled if there are enrollments\n  selectedAddressTypes.value = data.selected_address_types\n  showStartDatePassedWarning.value = data.show_start_date_passed_warning\n  includeWeekends.value = data.include_weekends\n  scheduleType.value = isScheduledByStep.value ? 'Custom' : 'Basic'\n  whenToDeliver.value = distribution.value.is_relative_by_step ? 'Select days' : 'Select dates'\n  cadence.value = distribution.value.binge ? 'Instant' : 'Scheduled'\n  promptReply.value = distribution.value.prompt_reply !== 'ignore'\n  responseRemindersEnabled.value = distribution.value.response_reminders_enabled\n  loading.value = false\n  saving.value = false\n}\n\nconst mapSelectedAddressTypesToDistribution = () => {\n  addressTypes.value.map(address_type => address_type.address_type).forEach((key) => {\n    distribution.value[key] = selectedAddressTypes.value.includes(key)\n  })\n}\n\nconst fetchCourseSteps = async () => {\n  distribution.value.course_id = course.value.id\n  showCourseSelect.value = false\n  fetchingSteps.value = true\n\n  const customScheduleType = distribution.value.is_custom_by_step ? 'is_custom_by_step' : 'is_relative_by_step'\n\n  try {\n    const data = await legacyDistributionsApi\n      .setupSteps(distribution.value.course_id, distribution.value.id, {\n        scheduleType: customScheduleType,\n        includeWeekends: includeWeekends.value,\n      })\n    steps.value = data.steps\n  }\n  finally {\n    fetchingSteps.value = false\n  }\n}\n\nconst handleStepStartDateUpdate = ({newStartDate, index}) => {\n  let selectedDays = []\n  if (newStartDate.length) {\n    selectedDays = [DateTime.fromISO(newStartDate).weekdayLong.toLowerCase()]\n  }\n  steps.value[index] = {...steps.value[index], start_date: newStartDate, selected_days: selectedDays}\n}\n\nconst handleStepDeliverAtTimeUpdate = ({newDeliverAtTime, index}) => {\n  steps.value[index] = {...steps.value[index], deliver_at_time: newDeliverAtTime}\n}\n\nconst updateStepNumDays = ({newNumDays, index, clearStartDate = false}) => {\n  steps.value[index] = {...steps.value[index], num_days: newNumDays, selected_days: days.value}\n  if (clearStartDate) {\n    // NOTE: this is really only needed when going from a start date on the first lesson to a num_days schedule\n    setStartDateOnSteps('')\n  }\n}\n\nconst hideUnsavedChangesModal = () => {\n  isShowingUnsavedChangesModal.value = false\n}\n\nconst confirmPreferredDeliveryTypeButton = () => {\n  distribution.value.preferred_address_type = newPreferredAddressType.value\n  selectedAddressTypes.value = newSelectedAddressTypes.value\n  mapSelectedAddressTypesToDistribution()\n  isShowingPreferredDeliveryTypeModal.value = false\n}\n\nconst cancelPreferredDeliveryTypeButton = () => {\n  isShowingPreferredDeliveryTypeModal.value = false\n  revertPreferredDeliveryTypeAndSelectedAddresses()\n}\n\nconst revertPreferredDeliveryTypeAndSelectedAddresses = () => {\n  distribution.value.preferred_address_type = prevPreferredAddressType.value\n  selectedAddressTypes.value = prevSelectedAddressTypes.value\n  mapSelectedAddressTypesToDistribution()\n}\n\nconst saveButton = async () => {\n  if (await submit()) {\n    goToEditSchedule(distribution.value.id)\n    fetchCourseSteps()\n  }\n}\nconst showErrorModal = () => {\n  isShowingErrorModal.value = true\n}\nconst submit = async () => {\n  saving.value = true\n  $v.value.$touch()\n\n  if (isInvalid.value) {\n    showErrorModal()\n    saving.value = false\n    return false\n  }\n\n  if (isScheduledByStep.value) {\n    distribution.value.binge = false\n    distribution.value.prompt_reply = 'ignore'\n  }\n\n  const isBinge = distribution.value.binge\n  const scheduleStart = distribution.value.delivery_time_type === 'deliver_between' && !isBinge ? distribution.value.deliver_between_start_time : null\n  const scheduleEnd = distribution.value.delivery_time_type === 'deliver_between' && !isBinge ? distribution.value.deliver_between_end_time : null\n  const deliverAt = distribution.value.delivery_time_type === 'deliver_at' ? distribution.value.deliver_at_time : null\n\n  const params = {\n    distribution: distribution.value,\n    selected_days: distribution.value.selected_days,\n    start_date: distribution.value.start_date,\n    schedule_start: scheduleStart,\n    schedule_end: scheduleEnd,\n    deliver_at_time: deliverAt,\n    steps: steps.value,\n  }\n\n  try {\n    const data = distributionId ?\n      await legacyDistributionsApi.update(distributionId, params) :\n      await legacyDistributionsApi.create(params)\n    setData(data)\n    setFlashSuccess(`Schedule saved`)\n    return true\n  }\n  catch (error) {\n    if (error.data) {\n      errors.value = error.data.errors\n    }\n    setFlashFailure(`Failed to save schedule. Please fix all errors and try again.`)\n    return false\n  }\n  finally {\n    saving.value = false\n  }\n}\n\nconst continueButton = async () => {\n  if (distribution.value.is_concluded) {\n    goToScheduleEnrollment(distribution.value.id)\n  }\n  else {\n    if (await submit()) {\n      goToScheduleEnrollment(distribution.value.id)\n    }\n  }\n}\n\nconst skipStepStartDateValidations = (step, withDeliveryTime = false) => {\n  const currentDate = currentDateTime().toISODate()\n  const stepCurrentStartDate = stepDateTime(step, true)\n  const stepNewStartDate = stepDateTime(step)\n  const hasSamePastStartDateWithEnrollment = step.current_start_date.length > 0 && stepCurrentStartDate.toISODate() <= currentDate && step.start_date.length > 0 && stepCurrentStartDate.toISODate() === stepNewStartDate.toISODate() && hasEnrollments.value\n  const {is_custom_by_step, is_relative_by_step, is_concluded} = distribution.value\n\n  if (is_relative_by_step) {\n    return hasSamePastStartDateWithEnrollment\n  }\n  if (withDeliveryTime) {\n    return is_concluded || !is_custom_by_step || (step.delivery_date_passed && hasEnrollments.value)\n  }\n  return is_concluded || !is_custom_by_step || hasSamePastStartDateWithEnrollment\n}\nconst stepDateTime = (step, useCurrentStartDate = false) => {\n  const startDate = useCurrentStartDate ? step.current_start_date : step.start_date\n  const deliverAtTime = step.deliver_at_time\n\n  if (startDate) {\n    let dateTime = DateTime.fromISO(startDate, {zone: ianaZone.value})\n\n    // If we have a deliver_at_time, incorporate it\n    if (deliverAtTime) {\n      const timePart = DateTime.fromFormat(deliverAtTime, 'h:mm a', {zone: ianaZone.value})\n      if (timePart.isValid) {\n        dateTime = dateTime.set({hour: timePart.hour, minute: timePart.minute, second: 0, millisecond: 0})\n      }\n    }\n\n    return dateTime\n  }\n  else if (deliverAtTime) {\n    // If we only have time, parse and return it\n    return DateTime.fromFormat(deliverAtTime, 'h:mm a', {zone: ianaZone.value})\n  }\n\n  return null\n}\nconst currentDateTime = () => {\n  return DateTime.now().setZone(ianaZone.value)\n}\n\nconst handleStartDate = date => {\n  showStartDatePassedWarning.value = false\n  distribution.value.start_date = date\n  if (date && !distribution.value.deliver_at_time) {\n    distribution.value.deliver_at_time = '12:00 PM'\n  }\n  else if (distribution.value.binge && !date) {\n    distribution.value.deliver_at_time = ''\n  }\n}\n\n// Lifecycle hooks\nonMounted(async () => {\n  await loadSetupData()\n  await loadChannels()\n})\n\nconst {required, forEach, withMessage} = useValidators()\nconst rules = computed(() => {\n  const baseRules = {\n    course: {\n      required: required('Course'),\n    },\n    distribution: {\n      name: {\n        required: required('Schedule name'),\n      },\n      delivery_methods: {\n        nudge: withMessage('WhatsApp cannot be used to deliver nudges', () => {\n          return !(course.value?.isNudge && selectedAddressTypes.value.includes('is_sms_whatsapp'))\n        }),\n      },\n      deliver_between_start_time: {\n        startTimeIsBeforeEndTime: withMessage('Start time must be before end time', (value) => {\n          if (distribution.value.binge || distribution.value.is_custom_by_step) {\n            return true\n          }\n          if (distribution.value.delivery_time_type === 'deliver_between') {\n            const start = DateTime.fromFormat(value, 'h:mm a')\n            const end = DateTime.fromFormat(distribution.value.deliver_between_end_time, 'h:mm a')\n            return start < end\n          }\n          return true\n        }),\n        isFiveOrMoreHoursApartWhenWhatsapp: withMessage('Delivery windows for WhatsApp must be set to 5+ hours', (value) => {\n          if (distribution.value.binge || distribution.value.is_custom_by_step) {\n            return true\n          }\n          if (distribution.value.delivery_time_type === 'deliver_between' && selectedAddressTypes.value.includes('is_sms_whatsapp')) {\n            const start = DateTime.fromFormat(value, 'h:mm a')\n            const end = DateTime.fromFormat(distribution.value.deliver_between_end_time, 'h:mm a')\n            return end >= start.plus({hours: 5})\n          }\n          return true\n        }),\n      },\n      selected_days: {\n        isNotEmpty: withMessage('Required', (value) => {\n          if (distribution.value.binge || distribution.value.is_custom_by_step) {\n            return true\n          }\n          return value.length > 0\n        }),\n      },\n      start_date: {\n        startDateIsTodayOrLater: withMessage('Launch date must be today or later', (value) => {\n          if (value && !skipStartDateValidations.value) {\n            const [year, month, day] = value.split('-')\n            const startDate = DateTime.fromObject({year, month, day}, {zone: ianaZone.value})\n            const currentDate = currentDateTime().startOf('day')\n            return startDate >= currentDate\n          }\n          return true\n        }),\n        startDateFallsOnSelectedDay: withMessage('Launch date must fall on a selected day', (value) => {\n          if (value && !skipStartDateValidations.value && !distribution.value.binge) {\n            const [year, month, day] = value.split('-')\n            const startDate = DateTime.fromObject({year, month, day}, {zone: ianaZone.value})\n            const dayOfWeek = startDate.weekdayLong.toLowerCase()\n            return distribution.value.selected_days.includes(dayOfWeek)\n          }\n          return true\n        }),\n      },\n      deliver_at_time: {\n        isNotWithinOneHourOfCurrentTime() {\n          if (distribution.value.delivery_time_type === 'deliver_at' && distribution.value.start_date && !skipStartDateValidations.value) {\n            const deliverAtDateTime = DateTime.fromFormat(`${distribution.value.start_date} ${distribution.value.deliver_at_time}`,'yyyy-MM-dd h:mm a', {zone: ianaZone.value})\n\n            const currentDT = currentDateTime()\n\n            return deliverAtDateTime > currentDT.plus({hours: 1})\n          }\n          else {\n            return true\n          }\n        },\n      },\n    },\n    steps: {\n      $each: forEach({\n        start_date: {\n          isNotAfterNextCourseSteps: withMessage('Delivery date and time must be at least 1 hour before any subsequent lessons\\' dates and times', (value, step) => {\n            if (!value || !distribution.value.is_custom_by_step) {\n              return true\n            }\n            const startIndex = steps.value.findIndex((s) => s.id === step.id) + 1\n            for (let i = startIndex; i < steps.value.length; i++) {\n              const courseStep = steps.value[i]\n              if (!courseStep.start_date) {\n                continue\n              }\n              const stepDT = stepDateTime(step)\n              const courseStepDT = stepDateTime(courseStep)\n              if (stepDT && courseStepDT && stepDT.plus({hours: 1}) > courseStepDT) {\n                return false\n              }\n            }\n            return true\n          }),\n          isNotBeforePreviousCourseSteps: withMessage('Delivery date and time must be at least 1 hour after any previous lessons\\' dates and times', (value, step) => {\n            if (!value || !distribution.value.is_custom_by_step) {\n              return true\n            }\n            const stopIndex = steps.value.findIndex((s) => s.id === step.id)\n            for (let i = 0; i < stopIndex; i++) {\n              const courseStep = steps.value[i]\n              if (!courseStep.start_date) {\n                continue\n              }\n              const stepDT = stepDateTime(step)\n              const courseStepDT = stepDateTime(courseStep)\n              if (stepDT && courseStepDT && stepDT.minus({hours: 1}) < courseStepDT) {\n                return false\n              }\n            }\n            return true\n          }),\n          isNotBlank: withMessage('Required', (value, step) => {\n          // Check for step.delivery_date_passed is for steps that were never scheduled and have already 'sent'\n            if (!distribution.value.is_custom_by_step || step.delivery_date_passed) {\n              return true\n            }\n            return !!value\n          }),\n          isTodayOrLater: withMessage('Delivery date must be today or later', (value, step) => {\n            if (!value || skipStepStartDateValidations(step)) {\n              return true\n            }\n            const stepDT = stepDateTime(step)\n            return stepDT ? stepDT >= currentDateTime().startOf('day') : true\n          }),\n          isNotWithinOneHourOfCurrentTime: withMessage('Same day delivery times must be at least 1 hour from the current time in the selected timezone', (value, step) => {\n            const stepDT = stepDateTime(step)\n            const currentDT = currentDateTime()\n            const stepIndex = steps.value.findIndex(s => s.id === step.id)\n            const isNotFirstRelativeStep = distribution.value.is_relative_by_step && stepIndex > 0\n\n            if (!step.start_date || !stepDT.hasSame(currentDT, 'day') ||\n              skipStepStartDateValidations(step, true) || isNotFirstRelativeStep) {\n              return true\n            }\n            return stepDT > currentDT.plus({hours: 1})\n          }),\n          startDateFallsOnSelectedDay: withMessage('Start date must fall on a weekday when weekends are excluded', (value, step) => {\n            if (!value || !distribution.value.is_relative_by_step) {\n              return true\n            }\n            const dayOfWeek = DateTime.fromISO(value).setZone(ianaZone.value).weekdayLong.toLowerCase()\n            return step.selected_days.includes(dayOfWeek)\n          }),\n          startDayFallsOnSelectedDay: withMessage('Start day must fall on a weekday when weekends are excluded', (value, step) => {\n            if (!distribution.value.is_relative_by_step || value) {\n              return true\n            }\n            return step.selected_days.every(day => days.value.includes(day))\n          }),\n          isNotLessThan1HourFromNextStep: withMessage('Delivery time must be at least 1 hour before the next lesson', (value, step) => {\n            if (!distribution.value.is_relative_by_step) {\n              return true\n            }\n            const stepIndex = steps.value.findIndex(s => s.id === step.id)\n            if (stepIndex === -1) {\n              return true\n            }\n            const nextStep = steps.value[stepIndex + 1]\n            if (!nextStep || nextStep.num_days > 0) {\n              return true\n            }\n            return stepDateTime(step).plus({hours: 1}) <= stepDateTime(nextStep)\n          }),\n          isNotLessThan1HourFromPreviousStep: withMessage('Delivery time must be at least 1 hour after the previous lesson', (value, step) => {\n            if (!distribution.value.is_relative_by_step || step.num_days > 0) {\n              return true\n            }\n            const stepIndex = steps.value.findIndex(s => s.id === step.id)\n            if (stepIndex <= 0) {\n              return true\n            }\n            const previousStep = steps.value[stepIndex - 1]\n            return stepDateTime(step).minus({hours: 1}) >= stepDateTime(previousStep)\n          }),\n        },\n      }),\n    },\n  }\n\n  return baseRules\n})\nconst $v = useVuelidate(rules, {course, distribution, steps})\n</script>\n\n<template>\n  <div class=\"page-container appWrapper mb-24\">\n    <!-- MODALS -->\n    <ErrorModal\n      test-id=\"saveErrorModal\"\n      header=\"Schedule errors\"\n      :is-open=\"isShowingErrorModal\"\n      @close=\"isShowingErrorModal = false\"\n    >\n      <p>\n        Your schedule has errors or is missing required fields. Please fix them before saving.\n      </p>\n    </ErrorModal>\n\n    <UnsavedChangesModal\n      :is-open=\"isShowingUnsavedChangesModal\"\n      @confirm=\"goToSchedulesOverview()\"\n      @close=\"hideUnsavedChangesModal()\"\n    />\n\n    <WarningModal\n      :is-open=\"isShowingEditWarningModal\"\n      warning=\"Making changes to this schedule will affect all active enrollments. Are you sure you want to continue editing?\"\n      can-confirm\n      @confirm=\"confirmEditingWarningModal()\"\n      @close=\"hideEditingWarningModal()\"\n    />\n\n    <WarningModal\n      :is-open=\"isShowingPreferredDeliveryTypeModal\"\n      warning=\"This delivery method is currently the preferred delivery method. If you remove it then a new preferred delivery method will be selected for you. Please check the enrollments page to make sure this is correct.\"\n      can-confirm\n      @confirm=\"confirmPreferredDeliveryTypeButton()\"\n      @close=\"cancelPreferredDeliveryTypeButton()\"\n    />\n\n    <EmailWarningModal\n      :is-open=\"isShowingEmailWarningModal\"\n      @close=\"isShowingEmailWarningModal = false\"\n    />\n\n    <!-- CONTENT -->\n    <Spinner\n      v-if=\"loading\"\n      is-block\n    />\n\n    <div v-else>\n      <div class=\"flex justify-center gap-y-6 gap-x-0\">\n        <div :class=\"['flex flex-col bg-white border border-gray-200 rounded-md p-6 col-span-2 w-full lg:w-1/2', distribution.is_concluded ? 'enrollment-options-container-disabled' : 'distributions-new-edit-container'] \">\n          <Alert\n            v-if=\"distribution.is_concluded\"\n            type=\"danger\"\n            :text=\"`Schedule concluded: This schedule concluded on ${distribution.concluded_on}. You can no longer edit or enroll learners in this schedule.`\"\n          />\n          <!-- COURSE SELECT -->\n          <CourseSelectFormSection\n            test-id=\"courseSelectSection\"\n            :course=\"course\"\n            :course-id=\"courseId\"\n            :distribution=\"distribution\"\n            :has-enrollments=\"hasEnrollments\"\n            :show-course-select=\"showCourseSelect\"\n            :validation=\"$v.course\"\n            :disable-editing=\"isEditingDisabled\"\n            @toggle-editing=\"handleEditingToggle()\"\n            @input=\"selectCourse($event)\"\n            @show-course-select=\"value => showCourseSelect = value\"\n          />\n\n          <!-- SCHEDULE NAME -->\n          <DistributionName\n            :name=\"distribution.name\"\n            :errors=\"errors.distribution.name\"\n            :validation=\"$v.distribution.name\"\n            @input=\"updateName($event)\"\n          />\n\n          <!-- DELIVERY METHODS -->\n          <DeliveryMethodsFormSection\n            :address-types=\"addressTypes\"\n            :is-binge=\"distribution.binge\"\n            :value=\"selectedAddressTypes\"\n            :delivery-time-type=\"distribution.delivery_time_type\"\n            :is-scheduled-by-step=\"isScheduledByStep\"\n            :is-disabled=\"isEditingDisabled\"\n            :validation=\"$v.distribution.delivery_methods\"\n            @input=\"updateSelectedAddressTypes($event)\"\n          />\n\n          <!-- CHANNEL -->\n          <ChannelFormSection\n            v-if=\"channels.length > 0 && selectedAddressTypes.includes('is_sms')\"\n            :is-disabled=\"isEditingDisabled\"\n            :value=\"distribution.channel_id\"\n            :channels=\"channels\"\n            @input=\"updateChannel($event)\"\n          />\n\n          <!-- SCHEDULE TYPE -->\n          <ScheduleType\n            :disabled=\"disableScheduleType\"\n            :has-whatsapp-selected=\"hasWhatsappSelected\"\n            :schedule-type=\"scheduleType\"\n            :schedule-type-options=\"scheduleTypeOptions\"\n            @input=\"updateScheduleType($event.value)\"\n          />\n\n          <!-- WHEN TO DELIVER -->\n          <WhenToDeliver\n            v-if=\"scheduleType === 'Custom'\"\n            :disabled=\"disableScheduleType\"\n            :when-to-deliver=\"whenToDeliver\"\n            :when-to-deliver-options=\"whenToDeliverOptions\"\n            @input=\"updateWhenToDeliver($event.value)\"\n          />\n\n          <TimezoneSection\n            test-id=\"timezoneSection\"\n            :disabled=\"disableTimezoneSelect\"\n            :timezone=\"distribution.timezone\"\n            :use-user-timezone=\"distribution.use_user_timezone\"\n            :use-cohort-timezone=\"distribution.use_cohort_timezone\"\n            @update-timezone=\"updateTimezone($event)\"\n            @update-use-user-timezone=\"updateUseUserTimezone($event)\"\n            @update-use-cohort-timezone=\"updateUseCohortTimezone($event)\"\n          />\n\n          <!-- CUSTOM SCHEDULE EDITOR -->\n          <template v-if=\"scheduleType === 'Custom'\">\n            <!-- IS CUSTOM BY STEP -->\n            <LessonStartDates\n              v-if=\"whenToDeliver === 'Select dates'\"\n              :errors=\"errors.steps\"\n              :fetching-steps=\"fetchingSteps\"\n              :has-enrollments=\"hasEnrollments\"\n              :is-disabled=\"isEditingDisabled\"\n              :is-concluded=\"distribution.is_concluded\"\n              :steps=\"steps\"\n              :validations=\"$v.steps?.$each?.$response?.$data || {}\"\n              :validation-messages=\"$v.steps?.$each?.$response?.$errors || []\"\n              @update-step-deliver-at-time=\"handleStepDeliverAtTimeUpdate\"\n              @update-step-start-date=\"handleStepStartDateUpdate\"\n              @dirty=\"$v.steps.$touch()\"\n            />\n            <!-- IS RELATIVE BY STEP -->\n            <template v-else>\n              <IncludeWeekends\n                :disabled=\"fetchingSteps || isEditingDisabled\"\n                :include-weekends=\"includeWeekends\"\n                @input=\"updateIncludeWeekends()\"\n              />\n              <LessonRelativeDays\n                :day-or-date-options=\"dayOrDateOptions\"\n                :day-or-date-selection=\"dayOrDateSelection\"\n                :disable-start-date-picker=\"disableStartDatePicker\"\n                :is-disabled=\"isEditingDisabled\"\n                :errors=\"errors.steps\"\n                :fetching-steps=\"fetchingSteps\"\n                :steps=\"steps\"\n                :validations=\"$v.steps?.$each?.$response?.$data || {}\"\n                :validation-messages=\"$v.steps?.$each?.$response?.$errors || []\"\n                @update-step-deliver-at-time=\"handleStepDeliverAtTimeUpdate\"\n                @update-step-num-days=\"updateStepNumDays\"\n                @update-step-start-date=\"setStartDateOnSteps\"\n                @update-step-start-day=\"updateStepStartDay\"\n                @dirty=\"$v.steps.$touch()\"\n              />\n            </template>\n          </template>\n\n          <!-- STANDARD BASIC EDITOR -->\n          <template v-else>\n            <!-- DISTRIBUTION CADENCE -->\n            <DistributionCadence\n              :cadence=\"cadence\"\n              :cadence-options=\"cadenceOptions\"\n              :disabled=\"hasEnrollments\"\n              @update-cadence=\"updateCadence\"\n            />\n\n            <!-- START DATE -->\n            <StartDateFormSection\n              :value=\"distribution.start_date\"\n              :disable-start-date-picker=\"disableStartDatePicker\"\n              :errors=\"errors.distribution.start_date\"\n              :show-start-date-passed-warning=\"showStartDatePassedWarning\"\n              :validation=\"$v.distribution.start_date\"\n              @input=\"handleStartDate($event.formattedValue)\"\n              @dirty=\"$v.distribution.start_date.$touch()\"\n            />\n\n            <!-- LESSON DAYS -->\n            <LessonDays\n              v-if=\"!distribution.binge\"\n              :selected-days=\"distribution.selected_days\"\n              :is-disabled=\"isEditingDisabled\"\n              :days-of-the-week=\"daysOfTheWeek\"\n              :errors=\"errors.distribution.selected_days\"\n              :validation=\"$v.distribution.selected_days\"\n              @change=\"distribution.selected_days = $event\"\n              @dirty=\"$v.distribution.selected_days.$touch()\"\n            />\n\n            <!-- DELIVERY TIME -->\n            <DeliveryTime\n              v-model:deliver-at-time=\"distribution.deliver_at_time\"\n              v-model:deliver-between-end-time=\"distribution.deliver_between_end_time\"\n              v-model:deliver-between-start-time=\"distribution.deliver_between_start_time\"\n              v-model:delivery-time-type=\"distribution.delivery_time_type\"\n              :is-binge=\"distribution.binge\"\n              :is-deliver-at-clearable=\"distribution.binge && !distribution.start_date\"\n              :is-disabled=\"isEditingDisabled\"\n              :errors=\"errors.distribution.schedule_filters\"\n              :has-enrollments=\"hasEnrollments\"\n              :has-whatsapp-selected=\"hasWhatsappSelected\"\n              :validation=\"{...$v.distribution.deliver_between_start_time, ...$v.distribution.deliver_at_time}\n              \"\n              @dirty=\"$v.distribution.deliver_between_start_time.$touch()\"\n            />\n          </template>\n          <Divider />\n\n          <!-- REQUIRE RESPONSES -->\n          <RequireResponses\n            v-if=\"!isScheduledByStep\"\n            :is-disabled=\"isEditingDisabled\"\n            :prompt-reply=\"promptReply\"\n            @input=\"updatePromptReplyBehavior()\"\n          />\n\n          <!-- RESPONSE REMINDERS -->\n          <ResponseReminders\n            :disabled=\"distribution.is_concluded || isEditingDisabled\"\n            :has-lessons-less-than-three-hours-apart=\"hasLessonsLessThanThreeHoursApart\"\n            :response-reminders-enabled=\"responseRemindersEnabled\"\n            @input=\"updateResponseRemindersEnabled()\"\n          />\n        </div>\n\n        <div class=\"footer m-0\">\n          <div class=\"\">\n            <button\n              class=\"btn-md-light col-12\"\n              @click=\"distribution.is_concluded ? goToSchedulesOverview() : isShowingUnsavedChangesModal = true\"\n            >\n              Exit\n            </button>\n          </div>\n          <div class=\"flex gap-x-6\">\n            <button\n              v-if=\"!distribution.is_concluded\"\n              id=\"submitButton\"\n              class=\"btn-md-muted px-6\"\n              :disabled=\"saving\"\n              @click=\"saveButton\"\n            >\n              Save changes\n            </button>\n            <button\n              class=\"btn-md-primary\"\n              :disabled=\"saving\"\n              type=\"submit\"\n              @click=\"continueButton\"\n            >\n              Publish\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport DistributionForm from '../../components/distributions/NewEditForm.vue'\nimport {usePage} from '@/composables/use-page.js'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Scheduling')\n</script>\n\n<template>\n  <PageWrapper>\n    <DistributionForm />\n  </PageWrapper>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport DistributionForm from '../../components/distributions/NewEditForm.vue'\nimport {usePage} from '@/composables/use-page.js'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Scheduling')\n</script>\n\n<template>\n  <PageWrapper>\n    <DistributionForm />\n  </PageWrapper>\n</template>\n","import {unref} from 'vue'\nimport {useClipboard} from '@vueuse/core'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\n\n/**\n * Copy to clipboard (wrapper around VueUse composable hooked up with flash message)\n */\nexport function useCopyToClipboard() {\n\n  //Composables\n  const {setFlashSuccess} = useFlashMessages()\n\n  //Copy something to clipboard\n  const copyToClipboard = (source, successMessage = 'Copied to clipboard') => {\n    const {copy, isSupported} = useClipboard({source})\n    if (!isSupported.value) {\n      return\n    }\n    copy()\n    setFlashSuccess(unref(successMessage))\n  }\n\n  //Expose interface\n  return {\n    copyToClipboard,\n  }\n}\n","<script setup>\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport CopyButton from '@/components/shared/buttons/CopyButton.vue'\nimport {useCopyToClipboard} from '@/composables/use-copy-to-clipboard.js'\nimport {toRefs} from 'vue'\n\nconst props = defineProps({\n  text: {\n    type: String,\n    default: '',\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {text} = toRefs(props)\n\n//Composables\nconst {copyToClipboard} = useCopyToClipboard()\n</script>\n\n<template>\n  <TextInput\n    v-bind=\"$attrs\"\n    readonly\n    :placeholder=\"text\"\n    :is-disabled=\"isDisabled\"\n  >\n    <template\n      v-if=\"!!$slots.iconLeft\"\n      #iconLeft\n    >\n      <slot name=\"iconLeft\" />\n    </template>\n    <template #iconRight>\n      <CopyButton\n        :is-disabled=\"isDisabled\"\n        @click.stop=\"copyToClipboard(text)\"\n      />\n    </template>\n  </TextInput>\n</template>\n","<script setup>\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  isActive: {\n    type: Boolean,\n    default: false,\n  },\n  label: {\n    type: String,\n    default: '',\n  },\n  icon: {\n    type: String,\n    default: '',\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Extract props\nconst {isDisabled} = toRefs(props)\n\n//Handle click event\nconst handleClick = event => {\n  if (!isDisabled.value) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <div\n    :class=\"{\n      [$style.item]: true,\n      [$style.active]: isActive,\n      [$style.disabled]: isDisabled,\n    }\"\n    @click=\"handleClick($event)\"\n  >\n    <Icon\n      v-if=\"icon\"\n      v-bind=\"$attrs\"\n      :icon=\"icon\"\n      size=\"s\"\n      is-default\n      :class=\"{\n        [$style.icon]: true,\n      }\"\n    />\n    <div>\n      <slot>{{ label }}</slot>\n    </div>\n    <aside :class=\"$style.aside\">\n      <slot name=\"aside\" />\n    </aside>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.item {\n  display: flex;\n  align-items: center;\n  padding: 0.5rem 1rem;\n  gap: 0.5rem;\n  cursor: pointer;\n  transition: all var(--transition-ease);\n  font-weight: var(--font-weight-bold);\n  white-space: nowrap;\n  background-color: var(--bg-input);\n  height: 3rem;\n  border-radius: var(--border-radius-m);\n  &:hover {\n    color: var(--color-text-primary);\n    background-color: var(--bg-highlight);\n    .icon {\n      color: var(--color-text-primary);\n      transform: scale(1.2);\n    }\n  }\n  &.active {\n    background-color: var(--bg-highlight);\n    color: var(--color-text-primary);\n    .icon {\n      color: var(--color-text-primary);\n    }\n  }\n\n  &.disabled {\n    cursor: not-allowed;\n    color: var(--color-text-muted);\n    .icon {\n      color: var(--color-text-muted);\n      transform: none;\n    }\n    &.active {\n      background-color: var(--bg-input-disabled);\n    }\n    &:hover {\n      background-color: var(--bg-input);\n      .icon {\n        transform: none;\n      }\n      &.active {\n        background-color: var(--bg-input-disabled);\n      }\n    }\n  }\n}\n\n.aside {\n  margin-left: auto;\n}\n.icon {\n  color: var(--color-text);\n  transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;\n}\n</style>\n","\n/**\n * Schedule statuses\n */\nexport const scheduleStatuses = {\n  NEW_DUPLICATE: 'new_duplicate',\n  SCHEDULED: 'scheduled',\n  CONCLUDED: 'concluded',\n  DISABLED: 'disabled',\n  ACTIVE: 'active',\n}\n\n/**\n * Schedule types\n */\nexport const scheduleTypes = {\n  DELIVER_AT: 'deliver_at',\n  DELIVER_BETWEEN: 'deliver_between',\n  DELIVER_ANYTIME: 'deliver_anytime',\n  INSTANT: 'instant',\n  CUSTOM: 'custom',\n}\n\n/**\n * Schedule status options\n */\nexport const scheduleStatusOptions = [\n  {\n    value: scheduleStatuses.NEW_DUPLICATE,\n    label: 'New',\n  },\n  {\n    value: scheduleStatuses.ACTIVE,\n    label: 'Active',\n  },\n  {\n    value: scheduleStatuses.SCHEDULED,\n    label: 'Scheduled',\n  },\n  {\n    value: scheduleStatuses.CONCLUDED,\n    label: 'Concluded',\n  },\n  {\n    value: scheduleStatuses.DISABLED,\n    label: 'Disabled',\n  },\n]\n\n/**\n * Recipient status tabs\n */\nexport const recipientStatusTabs = {\n  ALL: null,\n  WILL_BE_ENROLLED: 'will_be_enrolled',\n  WILL_BE_QEUED: 'will_be_queued',\n  ALREADY_ENROLLED: 'already_enrolled',\n  CANNOT_BE_ENROLLED: 'cannot_be_enrolled',\n}\n\n/**\n * Recipient status tab options\n */\nexport const recipientStatusTabOptions = [\n  {\n    value: recipientStatusTabs.ALL,\n    label: 'All recipients',\n  },\n  {\n    value: recipientStatusTabs.WILL_BE_ENROLLED,\n    label: 'Will be enrolled',\n  },\n  {\n    value: recipientStatusTabs.WILL_BE_QEUED,\n    label: 'Will be queued',\n  },\n  {\n    value: recipientStatusTabs.ALREADY_ENROLLED,\n    label: 'Already enrolled',\n  },\n  {\n    value: recipientStatusTabs.CANNOT_BE_ENROLLED,\n    label: 'Cannot be enrolled',\n  },\n]\n","import {ModelApi} from '@/api/model.api.js'\nimport {Schedule} from '@/models/schedule.model.js'\n\n/**\n * Schedules API service\n */\nexport class SchedulesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/distributions'\n  itemKey = 'distribution'\n  itemsKey = 'distributions'\n  ModelClass = Schedule\n\n  /**\n   * Query enrollable schedules for a course\n   */\n  queryEnrollable(courseId) {\n    return this\n      .get(`/enrollable`, {courseId})\n  }\n\n  /**\n   * Duplicate schedule\n   */\n  duplicateById(scheduleId) {\n    return this\n      .post(`/${scheduleId}/duplicate`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Download launch dashboard CSV\n   */\n  downloadLaunchDashboardCsv(scheduleId, params, filename = 'launch_dashboard') {\n    this.downloadCsv(`/${scheduleId}/launch_table_csv`, params, filename)\n  }\n\n  /**\n   * Download intended recipients CSV\n   */\n  downloadIntendedRecipientsCsv(scheduleId, params, filename = 'intended_recipients') {\n    this.downloadCsv(`/${scheduleId}/intended_recipients_csv`, params, filename)\n  }\n\n  /**\n   * Setup launch sidebar options\n    */\n  setupLaunchSidebar(distributionId, params) {\n    return this\n      .get(`/${distributionId}/setup_launch_sidebar`, params)\n  }\n\n  /**\n   * Setup launch dashboard table data\n   */\n  setupLaunchDashboard(distributionId, params) {\n    return this\n      .get(`/${distributionId}/setup_launch_dashboard`, params)\n  }\n\n  /**\n   * Setup launch metrics\n   */\n  setupLaunchMetrics(distributionId, params) {\n    return this\n      .get(`/${distributionId}/setup_launch_metrics`, params)\n  }\n\n  /**\n   * Get recipient list\n   */\n  getIntendedRecipients(distributionId, params) {\n    return this\n      .get(`/${distributionId}/intended_recipients`, params)\n  }\n\n  /**\n   * Get enrollment summary\n   */\n  getEnrollmentSummary(distributionId, params) {\n    return this\n      .get(`/${distributionId}/enrollment_summary_data`, params)\n  }\n}\n\n//Export singleton instance\nexport const schedulesApi = new SchedulesApi()\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport NavMenuItem from '@/components/shared/navigation/NavMenuItem.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport {integrationAddressTypes} from '@/constants/address-types.js'\nimport {recipientStatusTabOptions} from '@/constants/schedules.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {toRefs, ref, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'enroll',\n  'remove-learners',\n])\nconst props = defineProps({\n  schedule: {\n    type: Object,\n    required: true,\n  },\n  cohortIds: {\n    type: Array,\n    required: true,\n  },\n  individualIds: {\n    type: Array,\n    required: true,\n  },\n  removedIds: {\n    type: Array,\n    required: true,\n  },\n})\n\n//Get refs\nconst {schedule, cohortIds, individualIds, removedIds} = toRefs(props)\n\n//Refs\nconst selectedState = ref(null)\nconst selectedLearners = ref([])\nconst isLoadingEnrollmentSummary = ref(false)\nconst enrollmentSummary = ref({})\nconst filter = ref({\n  cohortIds,\n  individualIds,\n  removedIds,\n  selectedState,\n})\n\n//Navigation\nconst {goToViewLearner} = useNavigation()\n\n//Querying\nconst {\n  items: learners,\n  total: totalLearners,\n  loadItemsForPage: loadLearnersForPage,\n  reloadItems: reloadLearners,\n  isLoadingItems: isLoadingLearners,\n  sort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  clearSearch,\n  getQueryParams,\n} = useQuerying({\n  handler: (...args) => schedulesApi.getIntendedRecipients(schedule.value.id, ...args),\n  filter,\n  sort: 'displayName',\n})\n\n//Enrollment summary\nconst loadEnrollmentSummary = async () => {\n  isLoadingEnrollmentSummary.value = true\n  try {\n    const {enrollmentSummaryData} = await schedulesApi.getEnrollmentSummary(schedule.value.id, {\n      cohortIds: cohortIds.value,\n      individualIds: individualIds.value,\n      removedIds: removedIds.value,\n    })\n    enrollmentSummary.value = enrollmentSummaryData\n  }\n  finally {\n    isLoadingEnrollmentSummary.value = false\n  }\n}\n\n// Download learners\nconst downloadLearners = async () => schedulesApi.downloadIntendedRecipientsCsv(schedule.value.id, getQueryParams())\n\n//Item selection\nconst {\n  toggleAllItems: toggleAllLearners,\n  toggleItem: toggleLearner,\n  numSelectedItems: numSelectedLearners,\n  hasSelectedItems: hasSelectedLearners,\n  unselectAllItems: unselectAllLearners,\n} = useItemSelection(learners, selectedLearners)\n\n//Methods\nconst setSelectedState = value => {\n  selectedState.value = value\n  reloadLearners()\n}\nconst setLearnersToRemove = learners => {\n  emit('remove-learners', learners)\n  selectedLearners.value = []\n}\n\nconst reloadData = () => {\n  loadEnrollmentSummary()\n  reloadLearners()\n}\n\n//Watch for changes to the removedIds and (re)load the enrollment summary and learners\nwatch(removedIds, () => {\n  reloadData()\n}, {immediate: true})\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    @close=\"$emit('close')\"\n  >\n    <PageBlock header=\"Recipient list manager\">\n      <template #subheaderText>\n        Use this list to manage enrollment for the schedule: <strong>{{ schedule.name }}</strong> over <AddressType :value=\"schedule.preferred_address_type\" />.\n        <Alert\n          v-if=\"enrollmentSummary.totalRecipients > 1000\"\n          type=\"warning\"\n          text=\"You’ve selected over 1,000 learners for enrollment. Sending messages to all learners may take up to 15 minutes.\"\n        />\n      </template>\n      <template #headerAside>\n        <ActionButton\n          icon=\"refresh\"\n          label=\"Reload\"\n          type=\"secondary\"\n          :is-disabled=\"isLoadingEnrollmentSummary || isLoadingLearners\"\n          :has-spinner=\"isLoadingEnrollmentSummary || isLoadingLearners\"\n          @click=\"reloadData()\"\n        />\n      </template>\n      <InfoCardsGrid cols=\"5\">\n        <InfoCard\n          test-id=\"allRecipients\"\n          label=\"All recipients\"\n          :value=\"enrollmentSummary.totalRecipients\"\n          is-clickable\n          is-centered\n          @click=\"setSelectedState(null)\"\n        />\n        <InfoCard\n          label=\"Will be enrolled\"\n          :value=\"enrollmentSummary.willBeEnrolledCount\"\n          is-clickable\n          is-centered\n          @click=\"setSelectedState('will_be_enrolled')\"\n        />\n        <InfoCard\n          label=\"Will be queued\"\n          :value=\"enrollmentSummary.willBeQueuedCount\"\n          is-clickable\n          is-centered\n          @click=\"setSelectedState('will_be_queued')\"\n        />\n        <InfoCard\n          test-id=\"alreadyEnrolled\"\n          label=\"Already enrolled\"\n          :value=\"enrollmentSummary.alreadyEnrolledCount\"\n          is-clickable\n          is-centered\n          @click=\"setSelectedState('already_enrolled')\"\n        />\n        <InfoCard\n          label=\"Cannot be enrolled\"\n          :value=\"enrollmentSummary.cannotBeEnrolledCount\"\n          is-clickable\n          is-centered\n          @click=\"setSelectedState('cannot_be_enrolled')\"\n        />\n      </InfoCardsGrid>\n\n      <Divider />\n\n      <FlexRow align-items=\"start\">\n        <FlexColumn\n          :class=\"$style.sidebar\"\n          :with-gap=\"false\"\n        >\n          <NavMenuItem\n            v-for=\"option in recipientStatusTabOptions\"\n            :key=\"option.value\"\n            :is-active=\"option.value === selectedState\"\n            :label=\"option.label\"\n            @click=\"setSelectedState(option.value)\"\n          />\n        </FlexColumn>\n        <FlexColumn\n          :class=\"$style.table\"\n          :with-margin=\"false\"\n        >\n          <OverviewTableHeader>\n            <template #search>\n              <SearchInput\n                is-compact\n                @clear-search=\"clearSearch()\"\n                @search=\"changeSearch($event.searchTerm)\"\n              />\n            </template>\n            <template #actions>\n              <DownloadButton\n                :is-disabled=\"!learners.length\"\n                @click=\"downloadLearners()\"\n              />\n            </template>\n          </OverviewTableHeader>\n\n          <OverviewTable\n            :items=\"learners\"\n            :items-per-page=\"itemsPerPage\"\n            :current-page=\"currentPage\"\n            :total-items=\"totalLearners\"\n            :selected-items=\"selectedLearners\"\n            can-select-items\n            :is-loading=\"isLoadingLearners\"\n            can-expand\n            @load-page=\"loadLearnersForPage($event.page)\"\n            @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n            @toggle-item=\"toggleLearner($event.item)\"\n            @toggle-all-items=\"toggleAllLearners()\"\n          >\n            <template #headerRow>\n              <TableHeaderCell\n                :class=\"$style.name\"\n                is-sortable\n                sort-prop=\"displayName\"\n                :current-sort=\"sort\"\n                @sort=\"changeSort($event.sort)\"\n              >\n                Name\n              </TableHeaderCell>\n              <TableHeaderCell\n                :class=\"$style.state\"\n                is-sortable\n                sort-prop=\"expectedState\"\n                :current-sort=\"sort\"\n                @sort=\"changeSort($event.sort)\"\n              >\n                State\n              </TableHeaderCell>\n              <TableHeaderCell\n                :class=\"$style.activeEnrollments\"\n                is-sortable\n                sort-prop=\"numActiveEnrollments\"\n                :current-sort=\"sort\"\n                @sort=\"changeSort($event.sort)\"\n              >\n                Active enrollments\n              </TableHeaderCell>\n              <TableHeaderCell\n                :class=\"$style.queuedEnrollments\"\n                is-sortable\n                sort-prop=\"numQueuedEnrollments\"\n                :current-sort=\"sort\"\n                @sort=\"changeSort($event.sort)\"\n              >\n                Queued enrollments\n              </TableHeaderCell>\n            </template>\n\n            <template #row=\"{item: learner, isExpanded}\">\n              <TableCell\n                :class=\"$style.name\"\n                is-clickable\n                @click=\"goToViewLearner(learner.id, { ctrlKey: true })\"\n              >\n                <FlexColumn>\n                  <strong>{{ learner.name }}</strong>\n                  <div v-if=\"isExpanded\">\n                    <template v-if=\"learner.expectedState === 'will_be_queued'\">\n                      This user is currently active in '{{ learner.currentActiveCourse }}' and will begin this course\n                      <template v-if=\"learner.numQueuedEnrollments === 0\">\n                        after completing their active enrollment.\n                      </template>\n                      <template v-else>\n                        after completing {{ learner.numQueuedEnrollments }} other <Inflect\n                          text=\"course\"\n                          :count=\"learner.numQueuedEnrollments\"\n                        />  in their queue.\n                      </template>\n                      You can adjust the order on the learner details page.\n                    </template>\n                    <template v-else-if=\"learner.expectedState === 'cannot_be_enrolled'\">\n                      This user doesn't have a valid <AddressType :value=\"schedule.preferred_address_type\" /> address. {{ integrationAddressTypes.includes(schedule.preferred_address_type) ? '' : 'You can edit their delivery addresses on the learner details page.' }}\n                    </template>\n                    <template v-else-if=\"learner.expectedState === 'already_enrolled'\">\n                      This user is already enrolled in this schedule, so they will not be enrolled again. You can manage their enrollments from the learner details page.\n                    </template>\n                    <template v-else>\n                      This user will be enrolled immediately and follow the intended schedule.\n                    </template>\n                  </div>\n                </FlexColumn>\n              </TableCell>\n              <TableCell :class=\"$style.state\">\n                <StatusBadge>\n                  <LabelValue\n                    :options=\"recipientStatusTabOptions\"\n                    :value=\"learner.expectedState\"\n                  />\n                </StatusBadge>\n              </TableCell>\n              <TableCell :class=\"$style.activeEnrollments\">\n                {{ learner.numActiveEnrollments }}\n              </TableCell>\n              <TableCell :class=\"$style.queuedEnrollments\">\n                {{ learner.numQueuedEnrollments }}\n              </TableCell>\n            </template>\n          </OverviewTable>\n        </FlexColumn>\n      </FlexRow>\n      <BulkActionsBar\n        v-if=\"hasSelectedLearners\"\n        item-type=\"learner\"\n        :num-selected=\"numSelectedLearners\"\n        @clear-selection=\"unselectAllLearners()\"\n      >\n        <BulkAction\n          label=\"Remove\"\n          icon=\"delete\"\n          is-icon-outlined\n          @click=\"setLearnersToRemove(selectedLearners)\"\n        />\n      </BulkActionsBar>\n    </PageBlock>\n    <template #footer>\n      <FlowNavigation\n        :is-disabled-confirm=\"!enrollmentSummary.totalRecipients || isLoadingEnrollmentSummary || isLoadingLearners || hasSelectedLearners\"\n        :can-confirm=\"true\"\n        :can-cancel=\"true\"\n        label-confirm=\"Enroll\"\n        @confirm=\"$emit('enroll')\"\n        @cancel=\"$emit('close')\"\n      />\n    </template>\n  </SidePanel>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 2;\n}\n.state, .activeEnrollments, .queuedEnrollments, .sidebar {\n  flex: 1;\n}\n.table {\n  flex: 4;\n}\n</style>\n","import {DateTime} from 'luxon'\nimport {useValidators} from '@/composables/use-validators.js'\n\n/**\n * Delivery time validation composable\n */\nexport function useDeliveryTimeValidation(existingSchedule) {\n\n  //Composables\n  const {withMessage} = useValidators()\n\n  //Validators\n  const isWithinRange = withMessage('Must be within the allowed delivery range', (value) => {\n    // If no value or the start/end times are missing, treat as valid.\n    if (!value || !existingSchedule.value?.start_time || !existingSchedule.value?.end_time) {\n      return true\n    }\n\n    const startTime = DateTime.fromFormat(existingSchedule.value.start_time, 'h:mm a')\n    const endTime = DateTime.fromFormat(existingSchedule.value.end_time, 'h:mm a')\n    const checkTime = DateTime.fromFormat(value, 'h:mm a')\n\n    // Check if the time falls between start and end times (inclusive).\n    return checkTime.isValid && startTime.isValid && endTime.isValid && (checkTime >= startTime && checkTime <= endTime)\n  })\n\n  //Expose interface\n  return {\n    isWithinRange,\n  }\n}\n","<script setup>\nimport CustomScheduleModal from '@/components/schedules/CustomScheduleModal.vue'\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport CopyInput from '@/components/shared/form/CopyInput.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Timezone from '@/components/shared/transform/Timezone.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport ManageRecipientsPanel from '@/components/schedules/ManageRecipientsPanel.vue'\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport LearnerSelectInput from '@/components/shared/form/LearnerSelectInput.vue'\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDeliveryTimeValidation} from '@/composables/use-delivery-time-validation.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {scheduleTypes} from '@/constants/schedules.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {addressTypes, addressTypeOptions} from '@/constants/address-types.js'\nimport {legacyDistributionsApi} from '@/api/legacy-distributions.api.js'\nimport {useRoute} from 'vue-router'\nimport {useDebounceFn} from '@vueuse/core'\nimport {useVuelidate} from '@vuelidate/core'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {Schedule} from '@/models/schedule.model.js'\nimport {DateTime} from 'luxon'\nimport {ref, computed, onMounted, onBeforeUnmount} from 'vue'\n\n//Composables\nconst route = useRoute()\nconst {goToEditSchedule, goToScheduleDelivery} = useNavigation()\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\nconst {setHeader} = usePage()\nconst {organization} = useCurrentOrganization()\n\n//Set header\nsetHeader('Enrollment options')\n\n//Value toggles\nconst {\n  isValue: isShowingCustomScheduleModal,\n  setTrue: showCustomScheduleModal,\n  setFalse: hideCustomScheduleModal,\n} = useValueToggle()\nconst {\n  isValue: isShowingTimezoneWarningModal,\n  setTrue: showTimezoneWarningModal,\n  setFalse: hideTimezoneWarningModal,\n} = useValueToggle()\nconst {\n  isValue: isShowingManageRecipients,\n  setTrue: showManageRecipients,\n  setFalse: hideShowManageRecipients,\n} = useValueToggle()\n\n//Refs\nconst cohorts = ref([])\nconst distribution = ref({})\nconst isUpdatingStatus = ref(false)\nconst loading = ref(true)\nconst codeEnabled = ref(false)\nconst distributionCodeSuccessMessage = ref('')\nconst distributionCodeFailMessage = ref('')\nconst distributionCodeSuccessTimeout = ref(null)\nconst providers = ref([])\nconst enrollCode = ref('')\nconst enrolledCohortIds = ref([])\nconst enrolledCohorts = ref([])\nconst enrolledLearnerIds = ref([])\nconst enrolledLearners = ref([])\nconst enabledAddressTypes = ref([])\nconst enabled = ref(true)\nconst isEnrolling = ref(false)\nconst removedLeanerIds = ref([])\nconst deliveryTime = ref('')\n\n// Computed properties\nconst disableCodeEnrollCopy = computed(() => !distribution.value.code?.length || disableSharing.value)\nconst modifiedCode = computed(() => !enrollCode.value.length ? null : enrollCode.value)\nconst disableEnrollButton = computed(() =>\n  !enrolledCohortIds.value.length &&\n  !enrolledLearnerIds.value.length ||\n  distribution.value.is_processing_bulk_enrollments ||\n  isEnrolling.value ||\n  disableSharing.value ||\n  $v.value.deliveryTime.$invalid\n)\nconst disableSharing = computed(() => !distribution.value.enabled_at)\nconst showTimeInput = computed(() => [\n  scheduleTypes.DELIVER_BETWEEN,\n  scheduleTypes.DELIVER_ANYTIME,\n].includes(distribution.value.delivery_type))\nconst alertText = computed(() => {\n  if (!distribution.value.enabled_at) {\n    return 'Schedule deactivated: Please activate this schedule in order to enroll learners.'\n  }\n  if (distribution.value.is_concluded) {\n    return `Schedule concluded: This schedule concluded on ${distribution.value.concluded_on}. You can no longer edit or enroll learners in this schedule.`\n  }\n  return 'The delivery window for this schedule has already passed, so you cannot enroll new users.'\n})\nconst showTeamsWarning = computed(() => {\n  return !organization.value.skipTeamsGroupMessages && enrolledCohorts.value.some(cohort => cohort.teams_channel_id) && enabledAddressTypes.value.map(type => type.enum).includes(addressTypes.TEAMS)\n})\n\n// Methods\nconst onlyLettersAndNumbers = event => {\n  //only allow a-z, A-Z, digits 0-9\n  if (!event.key.match(/[a-zA-Z0-9]/)) {\n    event.preventDefault()\n  }\n}\nconst image = addressType => addressTypeOptions.find(option => option.value === addressType)?.image\nconst enroll = async () => {\n  isEnrolling.value = true\n  try {\n    await legacyDistributionsApi\n      .enrollCohortsAndIndividuals(distribution.value.id, {\n        cohort_ids: enrolledCohortIds.value,\n        individual_ids: enrolledLearnerIds.value,\n        removed_ids: removedLeanerIds.value,\n        delivery_time: deliveryTime.value ? DateTime.fromFormat(deliveryTime.value, 'h:mm a').toFormat('HH:mm') : null,\n      })\n    setFlashSuccess('Enrollment creation has started')\n    goToScheduleDelivery(distribution.value.id)\n  }\n  catch {\n    // Fall through\n  }\n  finally {\n    isEnrolling.value = false\n  }\n}\nconst handlePreferredAddressType = async (value) => {\n  distribution.value.preferred_address_type = value\n  try {\n    const data = await legacyDistributionsApi\n      .updatePreferredAddressType(distribution.value.id, {\n        preferred_address_type: distribution.value.preferred_address_type,\n      })\n    distribution.value = data.distribution\n    setFlashSuccess('Delivery method updated successfully!')\n  }\n  catch (error) {\n    const errorMsg = error.response && error.response.status === 400 ? error.data.errors : 'Something went wrong. Please try again.'\n    setFlashFailure(errorMsg)\n  }\n}\nconst handleCodeInput = (value) => {\n  clearTimeout(distributionCodeSuccessTimeout.value)\n  distributionCodeSuccessMessage.value = null\n  distributionCodeFailMessage.value = null\n  updateCodeDebounced(value)\n}\nconst updateCode = async (value) => {\n  enrollCode.value = value\n  if ($v.value.enrollCode.$invalid) {\n    return\n  }\n\n  try {\n    const data = await legacyDistributionsApi\n      .updateCode(distribution.value.id, {\n        code: modifiedCode.value,\n      })\n    distribution.value = data.distribution\n    providers.value = data.providers\n    codeEnabled.value = !!distribution.value.code\n\n    if (distribution.value.code?.length) {\n      handleCodeSuccess()\n    }\n  }\n  catch {\n    distributionCodeFailMessage.value = 'Sorry, this code is already in use. Please select a different code'\n  }\n}\nconst toggleCodeEnabled = () => {\n  codeEnabled.value = !codeEnabled.value\n  distributionCodeSuccessMessage.value = null\n  distributionCodeFailMessage.value = null\n\n  if (!codeEnabled.value) {\n    updateCode('')\n  }\n}\nconst handleCodeSuccess = () => {\n  distributionCodeSuccessMessage.value = `Success! you have enabled code signup with code ${distribution.value.code.toUpperCase()}.`\n  distributionCodeSuccessTimeout.value = setTimeout(() => distributionCodeSuccessMessage.value = null, 5000)\n}\nconst showOnHomepage = async () => {\n  const data = await legacyDistributionsApi\n    .updateShowOnHomepage(distribution.value.id, {\n      show_on_homepage: !distribution.value.show_on_homepage,\n    })\n  distribution.value = data.distribution\n  setFlashSuccess('Display in course catalog updated successfully.')\n}\nconst prioritizeEnrollment = async () => {\n  const data = await legacyDistributionsApi\n    .updatePrioritizeEnrollment(distribution.value.id, {\n      prioritize_enrollment: !distribution.value.prioritize_enrollment,\n    })\n  distribution.value = data.distribution\n  setFlashSuccess(data.success_message)\n}\nconst downloadQRCode = async () => {\n  const data = await legacyDistributionsApi.generateQrCode(distribution.value.id)\n  const link = document.createElement('a')\n  link.href = data.img_data\n  const filename = `${data.filename}-QRCode.png`\n  link.download = filename\n  link.click()\n  URL.revokeObjectURL(link.href)\n}\nconst handleLearnerSelect = (learnerIds, learners) => {\n  const selectedSet = new Set(learnerIds)\n  removedLeanerIds.value = removedLeanerIds.value.filter(id => !selectedSet.has(id))\n  enrolledLearners.value = learners\n  enrolledLearnerIds.value = learnerIds\n}\nconst handleCohortSelect = async (cohortIds, cohorts) => {\n  enrolledCohortIds.value = cohortIds\n  enrolledCohorts.value = cohorts\n}\nconst updateEnabledAt = async () => {\n  clearTimeout(distributionCodeSuccessTimeout.value)\n  distributionCodeSuccessMessage.value = null\n  try {\n    const data = await legacyDistributionsApi\n      .updateEnabledAt(distribution.value.id, {\n        enabled: !enabled.value,\n      })\n    distribution.value = data.distribution\n    enabled.value = !!distribution.value.enabled_at\n    setFlashSuccess('Schedule status updated successfully!')\n  }\n  catch (error) {\n    if (error.response && error.response.status === 400) {\n      setFlashFailure(error.data.errors)\n      isUpdatingStatus.value = error.data.is_updating_status\n    }\n    else {\n      setFlashFailure('Something went wrong. Please try again.')\n    }\n  }\n}\nconst handleTimezoneWarningModalClose = isCanceled => {\n  if (isCanceled) {\n    goToEditSchedule(distribution.value.id)\n  }\n  hideTimezoneWarningModal()\n}\nconst handleRemoveLearners = async (learners) => {\n  const learnerIds = learners.map(learner => learner.id)\n  const uniqueLearnerIds = new Set([...removedLeanerIds.value, ...learnerIds])\n  removedLeanerIds.value = Array.from(uniqueLearnerIds)\n  // Remove the uniqueLearnerIds from enrolledLearnerIds\n  enrolledLearnerIds.value = enrolledLearnerIds.value.filter(id => !uniqueLearnerIds.has(id))\n}\n\n//Lifecycle hooks\nonMounted(async () => {\n  try {\n    const data = await legacyDistributionsApi\n      .setupEnrollmentOptions(route.params.id)\n    distribution.value = data.distribution\n    providers.value = data.providers\n    cohorts.value = data.cohorts\n    enabledAddressTypes.value = data.address_types\n    codeEnabled.value = !!distribution.value.code\n    enabled.value = !!distribution.value.enabled_at\n    enrollCode.value = distribution.value.code ? distribution.value.code : ''\n    loading.value = false\n\n    if (distribution.value.use_user_timezone && !distribution.value.custom_by_step_has_begun && distribution.value.custom_launch_is_today) {\n      showTimezoneWarningModal()\n    }\n  }\n  catch {\n    // Fall through\n  }\n})\nonBeforeUnmount(() => {\n  clearTimeout(distributionCodeSuccessTimeout.value)\n})\n\n//Validations\nconst {minLength} = useValidators()\nconst {isWithinRange} = useDeliveryTimeValidation(distribution)\nconst rules = {\n  enrollCode: {\n    minLength: minLength(4),\n  },\n  deliveryTime: {\n    isWithinBounds: isWithinRange,\n  },\n}\nconst $v = useVuelidate(rules, {enrollCode, deliveryTime})\n\n// Debounced functions\nconst updateCodeDebounced = useDebounceFn(updateCode, 1000)\n</script>\n\n<template>\n  <PageWrapper\n    with-footer\n    sticky-footer\n  >\n    <Spinner v-if=\"loading\" />\n    <FlexColumn v-else>\n      <PageBlock\n        :header=\"distribution.name\"\n        :subheader=\"distribution.course_name\"\n      >\n        <template #headerAside>\n          <Toggle\n            v-if=\"!distribution.is_concluded\"\n            test-id=\"enabledDisabledSchedule\"\n            :is-checked=\"enabled\"\n            :label=\"distribution.enabled_at ? 'Activated' : 'Deactivated'\"\n            @click=\"updateEnabledAt()\"\n          />\n        </template>\n        <InfoCardsGrid cols=\"5\">\n          <InfoCard :label=\"distribution.has_start_date ? 'Launch date' : 'Date created'\">\n            <h5>{{ distribution.formatted_date }}</h5>\n          </InfoCard>\n          <InfoCard label=\"Lesson days\">\n            <h5>{{ distribution.lesson_days }}</h5>\n          </InfoCard>\n          <InfoCard label=\"Delivery time\">\n            <h5 v-if=\"distribution.is_scheduled_by_step\">\n              <TextLink\n                :text=\"distribution.delivery_time\"\n                @click=\"showCustomScheduleModal()\"\n              />\n            </h5>\n            <h5 v-else>\n              {{ distribution.delivery_time }}\n            </h5>\n          </InfoCard>\n          <InfoCard label=\"Delivery methods\">\n            <h5>{{ distribution.delivery_methods }}</h5>\n          </InfoCard>\n          <InfoCard label=\"Timezone\">\n            <h5>\n              <Timezone\n                :timezone=\"distribution.timezone\"\n                empty-label=\"Not selected\"\n              />\n            </h5>\n          </InfoCard>\n        </InfoCardsGrid>\n      </PageBlock>\n\n      <Alert\n        v-if=\"disableSharing\"\n        type=\"danger\"\n        :text=\"alertText\"\n      />\n      <SideBySide>\n        <PageBlock header=\"Share with learners\">\n          <FlexColumn>\n            <FormField label=\"Share to web\">\n              <CopyInput\n                :text=\"distribution.signup_url\"\n                :is-disabled=\"disableSharing\"\n              />\n            </FormField>\n            <ActionButton\n              :is-disabled=\"disableSharing\"\n              label=\"Generate QR code\"\n              type=\"secondary\"\n              @click=\"downloadQRCode()\"\n            />\n            <Divider :has-margin=\"false\" />\n            <Toggle\n              :is-disabled=\"disableSharing\"\n              test-id=\"showOnHomepage\"\n              :is-checked=\"distribution.show_on_homepage\"\n              @click=\"showOnHomepage()\"\n            >\n              Display in <TextLink\n                :url=\"distribution.course_catalog_url\"\n                is-inline\n                open-in-new-window\n                text=\"course catalog\"\n              />\n            </Toggle>\n            <Toggle\n              :is-disabled=\"disableSharing\"\n              test-id=\"prioritizeEnrollment\"\n              :is-checked=\"distribution.prioritize_enrollment\"\n              @click=\"prioritizeEnrollment()\"\n            >\n              Prioritize enrollment <Help\n                is-compact\n                text=\"By turning this on, you are prioritizing this schedule, moving it to the top of the up next queue for all new enrollments.\"\n              />\n            </Toggle>\n            <Toggle\n              :is-disabled=\"disableSharing\"\n              label=\"Enable code-based enrollment\"\n              :is-checked=\"codeEnabled\"\n              @click=\"toggleCodeEnabled()\"\n            />\n            <FormField\n              label=\"Enter a 4-8 character code consisting only of letters and numbers\"\n              :errors=\"$v.enrollCode.$errors\"\n            >\n              <TextInput\n                :is-disabled=\"disableSharing\"\n                :value=\"enrollCode\"\n                maxlength=\"8\"\n                minlength=\"4\"\n                placeholder=\"4-8 character code\"\n                @input=\"handleCodeInput($event.value)\"\n                @keypress=\"onlyLettersAndNumbers($event)\"\n                @dirty=\"$v.enrollCode.$touch()\"\n              />\n              <template #underInput>\n                <Alert\n                  v-if=\"distributionCodeSuccessMessage\"\n                  type=\"success\"\n                  :text=\"distributionCodeSuccessMessage\"\n                />\n                <Alert\n                  v-if=\"distributionCodeFailMessage\"\n                  type=\"danger\"\n                  :text=\"distributionCodeFailMessage\"\n                />\n              </template>\n            </FormField>\n\n            <FormField is-list>\n              <CopyInput\n                v-for=\"(provider, index) in providers\"\n                :key=\"index\"\n                :class=\"$style.copyInput\"\n                :is-disabled=\"disableCodeEnrollCopy\"\n                :text=\"provider.enroll_message\"\n              >\n                <template #iconLeft>\n                  <img\n                    class=\"max-w-[1.5rem]\"\n                    :src=\"image(provider.address_type)\"\n                  >\n                </template>\n              </CopyInput>\n            </FormField>\n          </FlexColumn>\n        </PageBlock>\n\n        <PageBlock header=\"Enroll learners\">\n          <Alert\n            v-if=\"showTeamsWarning\"\n            type=\"warning\"\n            text=\"A Teams Group message may send if a Teams Group Cohort is selected and enrolled for the first time.\"\n          />\n          <FormField label=\"Select cohorts\">\n            <SelectInput\n              test-id=\"selectCohorts\"\n              :options=\"cohorts\"\n              value-prop=\"id\"\n              :value=\"enrolledCohortIds\"\n              label-prop=\"name\"\n              is-multi-select\n              :is-disabled=\"distribution.is_processing_bulk_enrollments || disableSharing\"\n              @input=\"handleCohortSelect($event.value, $event.options)\"\n            />\n          </FormField>\n          <FormField label=\"Select individuals\">\n            <LearnerSelectInput\n              test-id=\"selectLearners\"\n              :is-disabled=\"distribution.is_processing_bulk_enrollments || disableSharing\"\n              is-multi-select\n              :value=\"enrolledLearners\"\n              @input=\"handleLearnerSelect($event.value, $event.options)\"\n            />\n          </FormField>\n          <FormField label=\"Delivery method\">\n            <SelectInput\n              :options=\"enabledAddressTypes\"\n              label-prop=\"display_name\"\n              value-prop=\"enum\"\n              :is-clearable=\"false\"\n              :is-searchable=\"false\"\n              :value=\"distribution.preferred_address_type\"\n              :is-disabled=\"distribution.is_processing_bulk_enrollments || disableSharing\"\n              @input=\"handlePreferredAddressType($event.value)\"\n            />\n          </FormField>\n          <FormField\n            v-if=\"showTimeInput\"\n            label=\"Delivery time\"\n            sub-label=\"You may set a delivery time for lessons, or leave it blank to use time of enrollment as the default delivery time. Learners can adjust it after enrollment.\"\n            is-optional\n            :errors=\"$v.deliveryTime.$errors\"\n          >\n            <TimeInput\n              :value=\"deliveryTime\"\n              is-clearable\n              :has-error=\"$v.deliveryTime.$invalid\"\n              @input=\"deliveryTime = $event.value\"\n              @dirty=\"$v.deliveryTime.$touch()\"\n            />\n          </FormField>\n          <FlowNavigation\n            :can-confirm=\"true\"\n            label-confirm=\"Review & enroll recipients\"\n            :is-disabled-confirm=\"disableEnrollButton\"\n            @confirm=\"showManageRecipients()\"\n          />\n          <Alert\n            v-if=\"distribution.is_processing_bulk_enrollments\"\n            type=\"warning\"\n            text=\"Learners have been enrolled, and the schedule is processing. You can enroll more learners once it's complete.\"\n          />\n        </PageBlock>\n      </SideBySide>\n    </FlexColumn>\n\n    <template #footer>\n      <FlowNavigation\n        :can-go-back=\"true\"\n        @back=\"goToEditSchedule(distribution.id)\"\n      />\n    </template>\n\n    <!-- Side Panel -->\n    <ManageRecipientsPanel\n      v-if=\"isShowingManageRecipients\"\n      :schedule=\"distribution\"\n      :cohort-ids=\"enrolledCohortIds\"\n      :individual-ids=\"enrolledLearnerIds\"\n      :removed-ids=\"removedLeanerIds\"\n      @close=\"hideShowManageRecipients\"\n      @remove-learners=\"handleRemoveLearners($event)\"\n      @enroll=\"enroll()\"\n    />\n\n    <!-- Modals -->\n    <WarningModal\n      :is-open=\"isShowingTimezoneWarningModal\"\n      can-confirm\n      label-confirm=\"Continue\"\n      label-cancel=\"Edit schedule\"\n      warning=\"You are enrolling users to receive learning today. The scheduled time for delivery may have already passed for some users in this cohort, and enrollments will not be created for them. Are you sure you want to proceed?\"\n      @close=\"handleTimezoneWarningModalClose($event.isCanceled)\"\n      @confirm=\"hideTimezoneWarningModal()\"\n    />\n\n    <CustomScheduleModal\n      :is-open=\"isShowingCustomScheduleModal\"\n      :schedule=\"Schedule.createFrom(distribution)\"\n      @close=\"hideCustomScheduleModal()\"\n      @edit=\"goToEditSchedule(distribution.id)\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.copyInput {\n  width: 100%;\n}\n.summary {\n  color: var(--color-text)\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\n\n/**\n * CountryCodes API service\n */\nexport class CountryCodesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/country_codes'\n  itemsKey = 'countryCodes'\n}\n\n//Export singleton instance\nexport const countryCodesApi = new CountryCodesApi()\n","import {countryCodesApi} from '@/api/country-codes.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n//Track countryCodes and loading flag\nconst countryCodes = ref([])\nconst isLoadingCountryCodes = ref(false)\nconst loadingPromise = ref(null)\n\n/**\n * Country codes composable\n*/\nexport function useCountryCodes() {\n\n  //Load country codes\n  const loadCountryCodes = async () => {\n\n    //Composables\n    const {processError} = useErrorHandling()\n\n    //Already loaded\n    if (countryCodes.value.length > 0) {\n      return\n    }\n\n    //Already loading\n    if (loadingPromise.value) {\n      return loadingPromise.value\n    }\n\n    //Create promise\n    isLoadingCountryCodes.value = true\n    loadingPromise.value = countryCodesApi.query()\n\n    //Load country codes\n    try {\n      const data = await loadingPromise.value\n      countryCodes.value = data.countryCodes\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isLoadingCountryCodes.value = false\n      loadingPromise.value = null\n    }\n  }\n\n  //Expose global refs and method\n  return {\n    countryCodes,\n    isLoadingCountryCodes,\n    loadCountryCodes,\n  }\n}\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {useCountryCodes} from '@/composables/use-country-codes.js'\nimport {onMounted} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\n\n//Get timezones\nconst {\n  countryCodes,\n  isLoadingCountryCodes,\n  loadCountryCodes,\n} = useCountryCodes()\n\n//Load country codes on mount\nonMounted(loadCountryCodes)\n</script>\n\n<template>\n  <SelectInput\n    v-bind=\"$attrs\"\n    :class=\"$style.input\"\n    value-prop=\"code\"\n    label-prop=\"displayName\"\n    required\n    :has-spinner=\"isLoadingCountryCodes\"\n    :placeholder=\"isLoadingCountryCodes ? 'Loading...' : ''\"\n    :options=\"countryCodes\"\n    @input=\"$emit('input', $event)\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.input {\n  flex: 0 0 150px;\n}\n</style>\n","import {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {learnersApi} from '@/api/learners.api.js'\nimport {addressTypes} from '@/constants/address-types.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Learner creation composable\n */\nexport function useLearnerCreation() {\n\n  //Flash messages and error handling\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isCreatingLearner = ref(false)\n  const model = ref({\n    firstName: '',\n    lastName: '',\n    email: '',\n    addressType: addressTypes.SMS,\n    addressValue: '',\n    isoCountryCode: 'US',\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Create learner\n  const createLearner = async () => {\n\n    //Clear country code if not needed\n    if (model.value.addressType === addressTypes.EMAIL)  {\n      model.value.isoCountryCode = ''\n    }\n\n    //Base data\n    const data = {\n      firstName: model.value.firstName,\n      lastName: model.value.lastName,\n      email: model.value.email,\n      addressType: model.value.addressType,\n      addressValue: model.value.addressValue,\n      isoCountryCode: model.value.isoCountryCode,\n    }\n\n    //Toggle flag\n    isCreatingLearner.value = true\n\n    //Create\n    try {\n      const learner = await learnersApi.create(data)\n      setFlashSuccess('Learner added')\n      model.value = {\n        firstName: '',\n        lastName: '',\n        email: '',\n        addressType: addressTypes.SMS,\n        addressValue: '',\n        isoCountryCode: 'US',\n      }\n      return learner\n    }\n    catch (error) {\n      setFlashFailure('Failed to add learner')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingLearner.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingLearner,\n    updateModel,\n    createLearner,\n  }\n}\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport CountryCodeSelectInput from '@/components/shared/form/CountryCodeSelectInput.vue'\nimport {addressTypes, basicAddressTypeOptions} from '@/constants/address-types.js'\nimport {useLearnerCreation} from '@/composables/use-learner-creation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {ref, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'added',\n])\n\n//Learner creation\nconst {\n  model,\n  isCreatingLearner,\n  updateModel,\n  createLearner,\n} = useLearnerCreation()\n\n//Friendly address type for label\nconst addressTypeFriendly = computed(() => {\n  if (model.value.addressType === addressTypes.EMAIL) {\n    return 'email'\n  }\n  return 'phone number'\n})\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  addressValue: {\n    required: required('Address'),\n  },\n}, model, {$autoDirty: true})\n\n//Server side errors\nconst addressErrors = ref([])\nconst updateAddressErrors = () => {\n  addressErrors.value = [...$v.value.addressValue.$errors]\n}\n\n//Cancel and confirm\nconst cancel = () => emit('close')\nconst confirm = async () => {\n\n  //Update errors\n  updateAddressErrors()\n\n  //Try to create\n  try {\n    const learner = await createLearner()\n    emit('added', {learner})\n  }\n  catch (error) {\n    if (Array.isArray(error.data?.errors)) {\n      addressErrors.value = error.data.errors\n    }\n    //Handled by useLearnerCreation\n  }\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    @close=\"cancel()\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Add learner\"\n        icon=\"person\"\n        is-active\n      />\n    </StepIndicators>\n\n    <PageBlock header=\"Add a new learner\">\n      <FormField label=\"First name\">\n        <TextInput\n          focus-on-mount\n          :value=\"model.firstName\"\n          test-id=\"firstName\"\n          @input=\"updateModel({firstName: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Last name\">\n        <TextInput\n          :value=\"model.lastName\"\n          test-id=\"lastName\"\n          @input=\"updateModel({lastName: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Account email\">\n        <TextInput\n          :value=\"model.email\"\n          test-id=\"accountEmail\"\n          @input=\"updateModel({email: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Address type\">\n        <SelectInput\n          :value=\"model.addressType\"\n          :options=\"basicAddressTypeOptions\"\n          test-id=\"addressType\"\n          @input=\"updateModel({addressType: $event.value})\"\n          @dirty=\"updateAddressErrors()\"\n        />\n      </FormField>\n\n      <FormField\n        :label=\"`Address (${addressTypeFriendly})`\"\n        :errors=\"addressErrors\"\n        is-required\n      >\n        <CountryCodeSelectInput\n          v-if=\"model.addressType !== addressTypes.EMAIL\"\n          :value=\"model.isoCountryCode\"\n          position=\"top\"\n          test-id=\"addressCountryCode\"\n          @input=\"updateModel({isoCountryCode: $event.value})\"\n          @dirty=\"updateAddressErrors()\"\n        />\n        <TextInput\n          required\n          :value=\"model.addressValue\"\n          test-id=\"addressValue\"\n          :has-error=\"$v.addressValue.$error || addressErrors.length > 0\"\n          @input=\"updateModel({addressValue: $event.value})\"\n          @dirty=\"updateAddressErrors()\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isCreatingLearner || $v.$invalid\"\n        :has-spinner-confirm=\"isCreatingLearner\"\n        label-confirm=\"Add learner\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </SidePanel>\n</template>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  learners: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {learners} = toRefs(props)\nconst isSingle = computed(() => learners.value.length === 1)\nconst single = computed(() => learners.value[0])\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete learner${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {learner})\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        the learner \"<strong>{{ single.displayName }}</strong>\"?\n      </span>\n      <span v-else>\n        the {{ learners.length }} selected learners?\n      </span>\n    </p>\n  </ConfirmationModal>\n</template>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport {User} from '@/models/user.model.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\n\n//Emits and props\ndefineEmits([\n  'duplicate',\n  'remove',\n])\ndefineProps({\n  learner: {\n    type: User,\n    required: true,\n  },\n})\n\n//Composables\nconst {goToViewLearner, goToAnalyzeLearner} = useNavigation()\nconst {canManageInteractions} = useCurrentUser()\n</script>\n\n<template>\n  <ActionsDropdownMenu v-bind=\"$attrs\">\n    <DropdownMenuItem\n      v-if=\"canManageInteractions\"\n      label=\"Analyze\"\n      @click=\"goToAnalyzeLearner(learner.id, $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Edit\"\n      @click=\"goToViewLearner(learner.id, $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Delete\"\n      @click=\"$emit('remove', $event)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","<script setup>\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {toRefs, computed, onMounted} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'input',\n])\nconst props = defineProps({\n  cohorts: {\n    type: Array,\n    default: () => [],\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n  autoLoad: {\n    type: Boolean,\n    default: false,\n  },\n  staticOnly: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {cohorts, isLoading, autoLoad, staticOnly} = toRefs(props)\n\n//Batched cohort querying, defaults to querying all cohorts into the selector\nconst {\n  items: autoLoadedCohorts,\n  loadItemsBatched: loadCohorts,\n  isLoadingItems,\n} = useQuerying({\n  handler: (...args) => cohortsApi.query(...args),\n  filter: {\n    isDynamic: staticOnly.value ? false : undefined,\n  },\n  limit: 100,\n})\n\n//Load cohorts on mount if autoLoad is true\nonMounted(() => {\n  if (autoLoad.value) {\n    loadCohorts()\n  }\n})\n\n//Cohort options for use in select input\nconst cohortOptions = computed(() => autoLoad.value ? autoLoadedCohorts.value : cohorts.value)\nconst isAutoLoading = computed(() => isLoadingItems.value && autoLoad.value)\n\n//Computed refs\nconst isLoadingWithoutOptions = computed(() => (isLoading.value || isAutoLoading.value) && !cohortOptions.value.length)\nconst placeholder = computed(() => {\n  if (isLoadingWithoutOptions.value) {\n    return 'Loading cohorts...'\n  }\n  else if (cohortOptions.value.length) {\n    return 'Select or type cohort name'\n  }\n  return 'No cohorts available'\n})\n</script>\n\n<template>\n  <SelectInput\n    v-bind=\"$attrs\"\n    value-prop=\"id\"\n    label-prop=\"name\"\n    :has-spinner=\"isLoadingWithoutOptions\"\n    :placeholder=\"placeholder\"\n    :options=\"cohortOptions\"\n    is-flexible\n    @input=\"$emit('input', $event)\"\n  >\n    <template #option=\"option\">\n      <slot\n        name=\"option\"\n        v-bind=\"option\"\n      >\n        <span>{{ option.name }}</span>\n        <small\n          v-if=\"option.isDynamic\"\n          text-muted\n        >(dynamic)</small>\n      </slot>\n    </template>\n  </SelectInput>\n</template>\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport DeliveryMethodsFilter from '@/components/shared/filters/DeliveryMethodsFilter.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport CohortSelectInput from '@/components/shared/form/CohortSelectInput.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {onMounted} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n\n//Load cohorts\nconst {\n  items: cohorts,\n  loadItemsBatched: loadCohorts,\n} = useQuerying({\n  handler: (...args) => cohortsApi.query(...args),\n  limit: 100,\n})\n\nonMounted(loadCohorts)\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    test-id=\"learnerFiltersDropdown\"\n    :class=\"$style.dropdown\"\n    @clear=\"resetFilter()\"\n  >\n    <DeliveryMethodsFilter\n      :value=\"activeFilter.addressTypes\"\n      @input=\"changeFilter('addressTypes', $event.value)\"\n    />\n\n    <FormField\n      v-if=\"cohorts.length > 0\"\n      label=\"Cohorts\"\n    >\n      <CohortSelectInput\n        v-if=\"cohorts.length > 10\"\n        :value=\"activeFilter.cohortIds\"\n        :cohorts=\"cohorts\"\n        is-multi-select\n        @input=\"changeFilter('cohortIds', $event.value)\"\n      />\n      <PillButtonList\n        v-else\n        :value=\"activeFilter.cohortIds\"\n        :options=\"cohorts\"\n        value-prop=\"id\"\n        label-prop=\"name\"\n        is-multi-select\n        can-reset\n        @input=\"changeFilter('cohortIds', $event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  width: 40vw;\n}\n</style>\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {learnersApi} from '@/api/learners.api.js'\n\n/**\n * Learner removal wrapper composable\n */\nexport function useLearnerRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: learnersToRemove,\n    numItemsToRemove: numLearnersToRemove,\n    hasItemsToRemove: hasLearnersToRemove,\n    isRemovingItems: isRemovingLearners,\n    setItemsToRemove: setLearnersToRemove,\n    clearItemsToRemove: clearLearnersToRemove,\n    removeItems: removeLearners,\n  } = useItemRemoval({\n    noun: 'learner',\n    removeById: id => learnersApi.removeById(id),\n    removeManyById: ids => learnersApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    learnersToRemove,\n    numLearnersToRemove,\n    hasLearnersToRemove,\n    isRemovingLearners,\n    setLearnersToRemove,\n    clearLearnersToRemove,\n    removeLearners,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport Join from '@/components/shared/transform/Join.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport AddLearnerPanel from '@/components/learners/AddLearnerPanel.vue'\nimport ConfirmLearnerRemovalModal from '@/components/learners/ConfirmLearnerRemovalModal.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport LearnerActionsMenu from '@/components/learners/LearnerActionsMenu.vue'\nimport LearnersFilter from '@/components/learners/LearnersFilter.vue'\nimport ExportStatusBarDynamic from '@/components/shared/export/ExportStatusBarDynamic.vue'\nimport {dataExportContentTypes} from '@/constants/data-exports.js'\nimport {learnersApi} from '@/api/learners.api.js'\nimport {useDataExportRequest} from '@/composables/use-data-export-request.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useLearnerRemoval} from '@/composables/use-learner-removal.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Learners')\n\n//Querying\nconst {\n  items: learners,\n  total: totalLearners,\n  queryItems: queryLearners,\n  loadItems: loadLearners,\n  loadItemsForPage: loadLearnersForPage,\n  reloadItems: reloadLearners,\n  isLoadingItems: isLoadingLearners,\n  sort,\n  filter,\n  numActiveFilters,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  changeFilter,\n  resetFilter,\n  getExportQueryParams,\n} = useQuerying({\n  handler: (...args) => learnersApi.query(...args),\n  filter: {\n    addressTypes: [],\n    cohortIds: [],\n  },\n  sort: 'displayName',\n  key: 'learnersOverview',\n})\n\n//Data export\nconst {\n  exportId,\n  isRequestingExport,\n  requestExport,\n  resetExport,\n} = useDataExportRequest({\n  contentType: dataExportContentTypes.LEARNERS,\n  handler: (...args) => learnersApi.requestCsvExport( ...args),\n})\n\n//General composables\nconst {goToViewLearner} = useNavigation()\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryLearners({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Item selection\nconst selectedLearners = ref([])\nconst {\n  toggleAllItems: toggleAllLearners,\n  toggleItem: toggleLearner,\n  numSelectedItems: numSelectedLearners,\n  hasSelectedItems: hasSelectedLearners,\n  unselectAllItems: unselectAllLearners,\n} = useItemSelection(learners, selectedLearners)\n\n//Learner addition\nconst isShowingAddPanel = ref(false)\nconst showAddPanel = () => isShowingAddPanel.value = true\nconst hideAddPanel = () => isShowingAddPanel.value = false\nconst confirmLearnerAddition = () => {\n  hideAddPanel()\n  reloadLearners()\n}\n\n//Learner removal\nconst {\n  learnersToRemove,\n  hasLearnersToRemove,\n  isRemovingLearners,\n  setLearnersToRemove,\n  clearLearnersToRemove,\n  removeLearners,\n} = useLearnerRemoval()\n\n//Learner removal handling\nconst cancelLearnerRemoval = () => {\n  clearLearnersToRemove()\n}\nconst confirmLearnerRemoval = async () => {\n  try {\n    await removeLearners()\n    reloadLearners()\n    unselectAllLearners()\n    cancelLearnerRemoval()\n  }\n  catch {\n    //Handled by useLearnerRemoval\n  }\n}\n\n//Download learners\nconst downloadLearners = async () => {\n  try {\n    const queryParams = getExportQueryParams()\n    await requestExport(queryParams)\n  }\n  catch {\n    //Handled by useDataExport\n  }\n}\n\n//Load learners\nloadLearners()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"goToViewLearner($event.result.id)\"\n        >\n          <template #resultLabel=\"{result}\">\n            <UserName :user=\"result\" />\n          </template>\n        </SearchPanel>\n      </template>\n      <template #filters>\n        <LearnersFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"resetFilter()\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton\n          label=\"Add learner\"\n          test-id=\"showAddLearnerPanelButton\"\n          @click=\"showAddPanel()\"\n        />\n        <DownloadButton\n          :is-disabled=\"learners.length === 0 || isRequestingExport || !!exportId\"\n          @click=\"downloadLearners()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalLearners\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"learner\"\n              :count=\"totalLearners\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"learners\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalLearners\"\n        :selected-items=\"selectedLearners\"\n        :is-loading=\"isLoadingLearners\"\n        can-select-items\n        @load-page=\"loadLearnersForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n        @toggle-item=\"toggleLearner($event.item)\"\n        @toggle-all-items=\"toggleAllLearners()\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.name\"\n            is-sortable\n            sort-prop=\"displayName\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.cohorts\">\n            Cohorts\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.platforms\">\n            Platforms\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: learner}\">\n          <TableCell\n            :class=\"$style.name\"\n            is-clickable\n            @click=\"goToViewLearner(learner.id)\"\n          >\n            <strong>\n              <UserName :user=\"learner\" />\n            </strong>\n          </TableCell>\n          <TableCell :class=\"$style.cohorts\">\n            <Join\n              :array=\"learner.cohorts\"\n              prop=\"name\"\n            />\n          </TableCell>\n          <TableCell :class=\"$style.platforms\">\n            <Join :array=\"learner.platforms\" />\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: learner, index}\">\n          <LearnerActionsMenu\n            :learner=\"learner\"\n            :test-id=\"`learnerActionsMenu${index + 1}`\"\n            @remove=\"setLearnersToRemove(learner)\"\n          />\n        </template>\n\n        <template #bulkActions>\n          <BulkActionsBar\n            v-if=\"hasSelectedLearners\"\n            item-type=\"learner\"\n            :num-selected=\"numSelectedLearners\"\n            @clear-selection=\"unselectAllLearners()\"\n          >\n            <BulkAction\n              label=\"Delete\"\n              icon=\"delete\"\n              is-icon-outlined\n              @click=\"setLearnersToRemove(selectedLearners)\"\n            />\n          </BulkActionsBar>\n\n          <ExportStatusBarDynamic\n            v-if=\"!!exportId\"\n            :export-id=\"exportId\"\n            :will-send-email=\"false\"\n            :show-progress-bar=\"false\"\n            @close=\"resetExport()\"\n          />\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <template #sidePanels>\n      <AddLearnerPanel\n        v-if=\"isShowingAddPanel\"\n        @close=\"hideAddPanel()\"\n        @added=\"confirmLearnerAddition()\"\n      />\n    </template>\n\n    <ConfirmLearnerRemovalModal\n      :learners=\"learnersToRemove\"\n      :is-open=\"hasLearnersToRemove\"\n      :is-removing=\"isRemovingLearners\"\n      @close=\"cancelLearnerRemoval()\"\n      @confirm=\"confirmLearnerRemoval()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 1;\n}\n.cohorts {\n  flex: 3;\n}\n.platforms {\n  flex: 1;\n  max-width: 10rem;\n}\n</style>\n","<script setup>\nimport TooltipIcon from '@/components/shared/icons/TooltipIcon.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport {Address} from '@/models/address.model.js'\nimport {componentColors} from '@/constants/components.js'\nimport {addressTypes, basicAddressTypes, addressTypeOptions} from '@/constants/address-types.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {computed, toRefs} from 'vue'\n\n//Props\nconst props = defineProps({\n  address: {\n    type: [Address, Object],\n    required: true,\n  },\n  ignoreAnonymization: {\n    type: Boolean,\n    default: false,\n  },\n  showType: {\n    type: Boolean,\n    default: false,\n  },\n  showDefault: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {address} = toRefs(props)\nconst type = computed(() => address.value?.addressType)\n\n//Current organization\nconst {anonymizePii} = useCurrentOrganization()\n\n//Can show default\nconst canShowDefault = computed(() => address.value?.isDefault && basicAddressTypes.includes(type.value))\n\n//Address type for tooltip text\nconst addressLabel = computed(() => addressTypeOptions.find(addressTypeOption => addressTypeOption.value === address.value.addressType)?.label)\n</script>\n\n<template>\n  <FlexRow\n    v-if=\"address\"\n    :gap=\"0.25\"\n  >\n    <template v-if=\"anonymizePii && !ignoreAnonymization\">\n      {{ address.id }}\n    </template>\n    <template v-else>\n      <template v-if=\"showType && type\">\n        <AddressType\n          :type=\"type\"\n          suffix=\": \"\n        />\n      </template>\n      <template v-if=\"address.displayValue\">\n        {{ address.displayValue }}\n      </template>\n\n      <template v-else-if=\"type === addressTypes.SLACK\">\n        {{ address.slackEmail }}\n      </template>\n      <template v-else-if=\"type === addressTypes.TEAMS\">\n        {{ address.teamsEmail }}\n      </template>\n      <template v-else-if=\"type === addressTypes.WHATSAPP\">\n        {{ address.value?.replace(/whatsapp:/, '') }}\n      </template>\n      <template v-else>\n        {{ address.value }}\n      </template>\n    </template>\n    <TooltipIcon\n      v-if=\"showDefault && canShowDefault\"\n      :text=\"`Default ${addressLabel} address`\"\n      icon=\"check_circle\"\n      :color=\"componentColors.PRIMARY\"\n      :is-outlined=\"false\"\n    />\n  </FlexRow>\n</template>\n","\n//Yes no options\nexport const yesNoOptions = [\n  {value: true, label: 'Yes'},\n  {value: false, label: 'No'},\n]\n","<script setup>\nimport FormField from '@/components/shared/form/FormField.vue'\nimport MetadataInput from '@/components/shared/form/MetadataInput.vue'\nimport {MetadataField} from '@/models/metadata-field.model.js'\nimport {DateTime} from 'luxon'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs} from 'vue'\n\n//NOTE: The reason we created this wrapper FormField component, instead of simply\n//using the MetadataInput component directly, is that we want to encapsulate the\n//validation and error handling of required fields in a single place. This allows\n//for nested validations to be handled gracefully when this component is used in\n// a loop of metadata fields.\n\n//Emits and props\ndefineEmits([\n  'input',\n])\nconst props = defineProps({\n  field: {\n    type: MetadataField,\n    required: true,\n  },\n  value: {\n    type: [String, Number, Boolean, DateTime],\n    default: '',\n  },\n})\n\n//Get refs\nconst {field, value} = toRefs(props)\n\n//Validation\nconst {requiredIf} = useValidators()\nconst $v = useVuelidate({\n  value: {required: requiredIf('Value', () => field.value.required)},\n}, {value}, {$autoDirty: true})\n</script>\n\n<template>\n  <FormField\n    :label=\"field.name\"\n    :is-required=\"field.required\"\n    :errors=\"$v.value.$errors\"\n    v-bind=\"$attrs\"\n  >\n    <MetadataInput\n      :field=\"field\"\n      :value=\"value\"\n      :has-error=\"$v.value.$error\"\n      @input=\"$emit('input', $event)\"\n    />\n  </FormField>\n</template>\n","import {learnersApi} from '@/api/learners.api.js'\nimport {copyValue, idOnly} from '@/helpers/object.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed, watch} from 'vue'\n\n/**\n * Learner editing composable\n */\nexport function useLearnerEditing(learner) {\n\n  //Flash messages and error handling\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Model\n  const model = ref({\n    firstName: '',\n    lastName: '',\n    email: '',\n    externalUserId: '',\n    externalManagerId: '',\n    metadata: [],\n    cohorts: [],\n    addresses: [],\n    timezone: '',\n  })\n\n  //Store relevant model keys\n  const keys = model.value ? Object.keys(model.value) : []\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Update metadata\n  const updateMetadata = (field, data) => {\n    const i = model.value.metadata.findIndex(m => m.id === field.id)\n    if (i === -1) {\n      model.value.metadata.push({id: field.id, ...data})\n    }\n    else {\n      Object.assign(model.value.metadata[i], data)\n    }\n  }\n\n  //Update address\n  const updateAddress = (address, data) => {\n    const i = model.value.addresses.findIndex(a => a.id === address.id)\n    if (i === -1) {\n      model.value.addresses.push({...address, ...data})\n    }\n    else {\n      Object.assign(model.value.addresses[i], data)\n    }\n  }\n\n  //Metadata values map\n  const metadataValuesMap = computed(() => model.value.metadata.reduce((map, m) => {\n    map[m.id] = m.value\n    return map\n  }, {}))\n\n  //Addresses map\n  const addressesMap = computed(() => model.value.addresses.reduce((map, a) => {\n    map[a.id] = a\n    return map\n  }, {}))\n\n  //Learner update\n  const isUpdatingLearner = ref(false)\n  const updateLearner = async () => {\n\n    //Must have learner\n    if (!learner.value) {\n      throw new Error(`Must have learner reference`)\n    }\n\n    //Must have data to update with\n    if (Object.keys(model).length === 0) {\n      throw new Error(`No model data to update learner with`)\n    }\n\n    //Toggle flag\n    isUpdatingLearner.value = true\n\n    //Extract data for update\n    const {id} = learner.value\n    const data = {...model.value}\n\n    //Clean up metadata and addresses\n    data.metadata = data.metadata.map(({id, value}) => ({id, value}))\n    data.addresses = data.addresses.map(({id, isoCountryCode, value, isDefault}) => ({id, isoCountryCode, value, isDefault}))\n\n    //Update\n    try {\n      const {learner: updated, meta} = await learnersApi.updateById(id, data)\n      keys.forEach(key => learner.value[key] = updated[key])\n\n      //Always show success message if at least the main update succeeds\n      setFlashSuccess('Learner updated')\n\n      //But display individual address/metadata validation errors\n      if (Array.isArray(meta.errors) && meta.errors.length > 0) {\n        meta.errors\n          .flatMap(e => e)\n          .forEach(setFlashFailure)\n      }\n    }\n    catch (error) {\n      setFlashFailure('Failed to update learner')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingLearner.value = false\n    }\n  }\n\n  //Watch learner for changes and update initial model values accordingly\n  watch(learner, () => {\n    if (learner.value) {\n      keys.forEach(key => {\n        if (key === 'cohorts') {\n          model.value[key] = learner.value[key].map(idOnly)\n        }\n        else {\n          model.value[key] = copyValue(learner.value[key])\n        }\n      })\n    }\n  }, {immediate: true})\n\n  //Expose interface\n  return {\n    model,\n    metadataValuesMap,\n    addressesMap,\n    updateModel,\n    updateMetadata,\n    updateAddress,\n    updateLearner,\n    isUpdatingLearner,\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Address} from '@/models/address.model.js'\n\n/**\n * Learner addresses API service\n */\nexport class LearnerAddressesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/learners'\n  itemKey = 'address'\n  itemsKey = 'addresses'\n  ModelClass = Address\n\n  /**\n   * Query\n   */\n  // query(learnerId, params, options) {\n  //   return super.query(params, options, `/${learnerId}/addresses`)\n  // }\n\n  /**\n   * Add address to learner\n   */\n  addAddress(learnerId, address) {\n    return this\n      .post(`/${learnerId}/addresses`, {address})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Update address from learner\n   */\n  updateAddress(learnerId, addressId, address) {\n    return this\n      .patch(`/${learnerId}/addresses/${addressId}`, {address})\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Remove address from learner\n   */\n  removeAddress(learnerId, addressId) {\n    return this\n      .delete(`/${learnerId}/addresses/${addressId}`)\n  }\n}\n\n//Export singleton instance\nexport const learnerAddressesApi = new LearnerAddressesApi()\n","import {learnerAddressesApi} from '@/api/learner-addresses.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Learner address management composable\n */\nexport function useLearnerAddressManagement(learner) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Add address to learner\n  const isAddingAddress = ref(false)\n  const addAddress = async (addressType, data) => {\n    try {\n      isAddingAddress.value = true\n      if (!addressType) {\n        throw new Error(`Address type is required`)\n      }\n      const address = await learnerAddressesApi.addAddress(learner.value.id, {\n        addressType,\n        ...data,\n      })\n      learner.value.addresses.push(address)\n      setFlashSuccess('Address added')\n      return address\n    }\n    catch (error) {\n      setFlashFailure('Failed to add address')\n      processError(error)\n      throw error\n    }\n    finally {\n      isAddingAddress.value = false\n    }\n  }\n\n  //Update address from learner\n  const isUpdatingAddress = ref(false)\n  const updateAddress = async (address, data) => {\n    try {\n      isUpdatingAddress.value = true\n      const updated = await learnerAddressesApi.updateAddress(learner.value.id, address.id, {\n        isoCountryCode: address.isoCountryCode,\n        value: address.value,\n        isDefault: address.value,\n        ...data,\n      })\n      address.value = updated.value\n      address.isoCountryCode = updated.isoCountryCode\n      address.isDefault = updated.isDefault\n      setFlashSuccess('Address updated')\n    }\n    catch (error) {\n      setFlashFailure('Failed to update address')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingAddress.value = false\n    }\n  }\n\n  //Remove address from learner\n  const isRemovingAddress = ref(false)\n  const removeAddress = async address => {\n    try {\n      isRemovingAddress.value = true\n      const data = await learnerAddressesApi.removeAddress(learner.value.id, address.id)\n      learner.value.addresses = learner.value.addresses.filter(a => a.id !== address.id)\n      if (data.isDisabled) {\n        setFlashSuccess(`Address will no longer be used for this user`)\n      }\n      else {\n        setFlashSuccess(`Address has been removed from this user`)\n      }\n    }\n    catch (error) {\n      setFlashFailure('Failed to remove address')\n      processError(error)\n      throw error\n    }\n    finally {\n      isRemovingAddress.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    addAddress,\n    updateAddress,\n    removeAddress,\n    isAddingAddress,\n    isUpdatingAddress,\n    isRemovingAddress,\n  }\n}\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport MetadataFormField from '@/components/shared/form/MetadataFormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport CohortSelectInput from '@/components/shared/form/CohortSelectInput.vue'\nimport TimezoneSelectInput from '@/components/shared/form/TimezoneSelectInput.vue'\nimport CountryCodeSelectInput from '@/components/shared/form/CountryCodeSelectInput.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport RadioButton from '@/components/shared/form/RadioButton.vue'\nimport {Learner} from '@/models/learner.model.js'\nimport {addressTypes, basicAddressTypes} from '@/constants/address-types.js'\nimport {useLearnerEditing} from '@/composables/use-learner-editing.js'\nimport {useLearnerAddressManagement} from '@/composables/use-learner-address-management.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useMetadataFields} from '@/composables/use-metadata-fields.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'reload-learner',\n])\nconst props = defineProps({\n  learner: {\n    type: Learner,\n    required: true,\n  },\n})\n\n//Organization settings\nconst {isExternalManagerEnabled, availableAddressTypeOptions} = useCurrentOrganization()\n\n//Metadata fields\nconst {metadataFields, loadMetadataFields} = useMetadataFields()\nloadMetadataFields({displayable: true})\n\n//Learner creation\nconst {learner} = toRefs(props)\nconst {\n  model,\n  metadataValuesMap,\n  addressesMap,\n  updateMetadata,\n  updateModel,\n  updateAddress,\n  updateLearner,\n  isUpdatingLearner,\n} = useLearnerEditing(learner)\n\n//Learner address management\nconst {\n  addAddress,\n  removeAddress,\n  isAddingAddress,\n} = useLearnerAddressManagement(learner)\n\n//Remove address handling\nconst confirmRemoveAddress = async address => {\n  try {\n    await removeAddress(address)\n    emit('reload-learner')\n  }\n  catch {\n    //Handled by useLearnerAddressManagement\n  }\n}\n\n//New address handling\nconst newAddressType = ref(null)\nconst newAddressModel = ref({\n  isoCountryCode: 'US',\n  value: '',\n  isDefault: '',\n})\n\n//New address errors\nconst newAddressErrors = ref({\n  [addressTypes.EMAIL]: [],\n  [addressTypes.SMS]: [],\n  [addressTypes.WHATSAPP]: [],\n})\n\n//Reset errors\nconst resetErrors = () => {\n  newAddressErrors.value = {\n    [addressTypes.EMAIL]: [],\n    [addressTypes.SMS]: [],\n    [addressTypes.WHATSAPP]: [],\n  }\n}\n\n//Update errors\nconst updateErrors = () => {\n  newAddressErrors.value[newAddressType.value] = [...$v.value.newAddressModel.$errors]\n}\n\n//New address validation\nconst {requiredIf} = useValidators()\nconst $v = useVuelidate({\n  newAddressModel: {\n    isoCountryCode: {required: requiredIf('Country code', () => newAddressType.value !== addressTypes.EMAIL)},\n    value: {required: requiredIf('Address', () => !!newAddressType.value)},\n  },\n}, {newAddressModel}, {$autoDirty: false})\n\n//Toggle adding new address\nconst toggleAddAddress = type => {\n  resetErrors()\n  // when we close, if the new address was the default, reset one of the existing addresses as default so we always have a default\n  if (newAddressModel.value.isDefault) {\n    forceSelectDefaultAddress(newAddressType.value)\n  }\n  if (!newAddressType.value || newAddressType.value !== type) {\n    // have clicked the Add X address button\n    defaultAddressesOfType(type).forEach(defaultAddr => updateAddress(defaultAddr, {isDefault: false}))\n  }\n\n  newAddressType.value = newAddressType.value === type ? null : type\n  newAddressModel.value = {\n    isoCountryCode: 'US',\n    value: '',\n    isDefault: true,\n  }\n}\n\n//Confirm adding new address\nconst confirmAddAddress = async () => {\n\n  //Touch validation now to show errors\n  $v.value.newAddressModel.$touch()\n  updateErrors()\n\n  //Do not proceed if invalid\n  if ($v.value.newAddressModel.$invalid) {\n    return\n  }\n\n  //Add address\n  try {\n    const address = await addAddress(newAddressType.value, newAddressModel.value)\n    model.value.addresses.push(address)\n    toggleAddAddress(newAddressType.value)\n    $v.value.$reset()\n    resetErrors()\n  }\n  catch (error) {\n\n    //Handle server side errorsss\n    if (Array.isArray(error.data?.errors)) {\n      newAddressErrors.value[newAddressType.value] = error.data.errors\n    }\n  }\n}\n\nconst addressesOfType = type => Object.values(addressesMap.value).filter(addr => addr.addressType === type)\nconst defaultAddressesOfType = type => Object.values(addressesMap.value).filter(addr => addr.addressType === type && addr.isDefault === true)\nconst hasAddressesOfType = type => !!addressesOfType(type).length\nconst hasDefaultAddressesOfType = type => !!defaultAddressesOfType(type).length\n\nconst handleDefaultSelection = address => {\n  if (address.isDefault) {\n    return // Return if user is trying to set something that is already default\n  }\n  resetDefaultAddressesOfType(address.addressType)\n  updateAddress(address, {isDefault: true})\n}\n\nconst handleNewDefaultSelection = type => {\n  if (newAddressModel.value.isDefault) {\n    return\n  }\n  resetDefaultAddressesOfType(type)\n  newAddressModel.value.isDefault = true\n}\n\nconst resetDefaultAddressesOfType = type => {\n  if (newAddressType.value === type) {\n    newAddressModel.value.isDefault = false\n  }\n  defaultAddressesOfType(type).forEach(defaultAddr => updateAddress(defaultAddr, {isDefault: false}))\n}\n\nconst forceSelectDefaultAddress = type => {\n  // If a default already exists on one of the existing records, nothing to do\n  if (hasDefaultAddressesOfType(type)) {\n    return\n  }\n\n  // If there are addresses of this type, make the first one default\n  if (hasAddressesOfType(type)) {\n    updateAddress(addressesOfType(type)[0], {isDefault: true})\n  }\n}\n\n//Cancel and confirm\nconst cancel = () => emit('close')\nconst confirm = async () => {\n  try {\n    await updateLearner()\n    emit('close')\n  }\n  catch {\n    //Handled by useLearnerCreation\n  }\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    @close=\"cancel()\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Edit learner\"\n        icon=\"person\"\n        is-active\n      />\n    </StepIndicators>\n\n    <PageBlock header=\"Account details\">\n      <FormField label=\"First name\">\n        <TextInput\n          focus-on-mount\n          :value=\"model.firstName\"\n          test-id=\"firstName\"\n          @input=\"updateModel({firstName: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Last name\">\n        <TextInput\n          :value=\"model.lastName\"\n          test-id=\"lastName\"\n          @input=\"updateModel({lastName: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Account email\">\n        <TextInput\n          :value=\"model.email\"\n          test-id=\"accountEmail\"\n          @input=\"updateModel({email: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"Timezone\">\n        <TimezoneSelectInput\n          :is-clearable=\"false\"\n          :value=\"model.timezone\"\n          @input=\"updateModel({timezone: $event.value})\"\n        />\n      </FormField>\n\n      <FormField label=\"External user ID\">\n        <TextInput\n          :value=\"model.externalUserId\"\n          test-id=\"externalUserId\"\n          @input=\"updateModel({externalUserId: $event.value})\"\n        />\n      </FormField>\n\n      <FormField\n        v-if=\"isExternalManagerEnabled\"\n        label=\"External manager ID\"\n      >\n        <TextInput\n          :value=\"model.externalManagerId\"\n          test-id=\"externalManagerId\"\n          @input=\"updateModel({externalManagerId: $event.value})\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Cohorts\"\n        help=\"Learners can only manually be added to or removed from static cohorts\"\n      >\n        <CohortSelectInput\n          :value=\"model.cohorts\"\n          is-multi-select\n          auto-load\n          static-only\n          test-id=\"cohorts\"\n          @input=\"updateModel({cohorts: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n\n    <PageBlock header=\"Delivery addresses\">\n      <template\n        v-for=\"addressType in availableAddressTypeOptions\"\n        :key=\"addressType.value\"\n      >\n        <FormField\n          :label=\"addressType.label\"\n          :errors=\"newAddressErrors[addressType.value]\"\n          is-list\n        >\n          <p\n            v-if=\"!learner.deliveryAddressesMap[addressType.value].length\"\n            text-muted\n          >\n            No {{ addressType.label }} addresses yet\n          </p>\n          <FlexRow\n            v-for=\"(address, i) in learner.deliveryAddressesMap[addressType.value]\"\n            :key=\"address.id\"\n            :class=\"$style.addressRow\"\n          >\n            <AddressDisplay\n              v-if=\"address.isIntegration\"\n              :address=\"address\"\n            />\n            <template v-else>\n              <RadioButton\n                :test-id=\"`defaultSelect-${address.addressType}-${i + 1}`\"\n                label=\"Default address\"\n                :is-checked=\"addressesMap[address.id]?.isDefault\"\n                :is-disabled=\"addressesOfType(addressType.value).length === 1 && newAddressType !== addressType.value\"\n                @click=\"handleDefaultSelection(addressesMap[address.id])\"\n              />\n              <CountryCodeSelectInput\n                v-if=\"address.isPhone\"\n                :value=\"addressesMap[address.id]?.isoCountryCode\"\n                :test-id=\"`countryCode_${addressType.value}_${i}`\"\n                @input=\"updateAddress(address, {isoCountryCode: $event.value})\"\n              />\n              <TextInput\n                :value=\"addressesMap[address.id]?.value\"\n                :test-id=\"`addressValue_${addressType.value}_${i}`\"\n                @input=\"updateAddress(address, {value: $event.value})\"\n              />\n              <RemoveButton\n                :test-id=\"`remove_${addressType.value}_${i}`\"\n                @click=\"confirmRemoveAddress(address)\"\n              />\n            </template>\n          </FlexRow>\n          <FlexRow\n            v-if=\"newAddressType === addressType.value\"\n            :class=\"$style.addressRow\"\n          >\n            <RadioButton\n              label=\"Default address\"\n              :test-id=\"`newAddressDefaultSelect-${newAddressType}`\"\n              :is-checked=\"newAddressModel.isDefault\"\n              :is-disabled=\"!hasAddressesOfType(addressType.value)\"\n              @click=\"handleNewDefaultSelection(addressType.value)\"\n            />\n            <CountryCodeSelectInput\n              v-if=\"addressType.value !== addressTypes.EMAIL\"\n              :value=\"newAddressModel.isoCountryCode\"\n              :has-error=\"$v.newAddressModel.isoCountryCode.$error\"\n              :test-id=\"`countryCode_${addressType.value}_new`\"\n              @input=\"newAddressModel.isoCountryCode = $event.value\"\n              @dirty=\"updateErrors()\"\n            />\n            <TextInput\n              :value=\"newAddressModel.value\"\n              :has-error=\"$v.newAddressModel.value.$error || newAddressErrors[addressType.value].length > 0\"\n              :test-id=\"`addressValue_${addressType.value}_new`\"\n              @input=\"newAddressModel.value = $event.value\"\n              @dirty=\"updateErrors()\"\n            />\n            <div :class=\"$style.fakeButton\" />\n          </FlexRow>\n        </FormField>\n\n        <CancelConfirmBar\n          v-if=\"newAddressType === addressType.value\"\n          :is-disabled-confirm=\"isAddingAddress\"\n          :has-spinner-confirm=\"isAddingAddress\"\n          label-confirm=\"Save address\"\n          :class=\"$style.buttonBar\"\n          :test-id-confirm=\"`save_${addressType.value}`\"\n          :test-id-cancel=\"`cancel_${addressType.value}`\"\n          @cancel=\"toggleAddAddress(addressType.value)\"\n          @confirm=\"confirmAddAddress()\"\n        />\n        <ButtonBar\n          v-else\n          :class=\"$style.buttonBar\"\n        >\n          <ActionButton\n            v-if=\"basicAddressTypes.includes(addressType.value)\"\n            :label=\"`Add ${addressType.label} address`\"\n            type=\"link\"\n            icon=\"add\"\n            :test-id=\"`add_${addressType.value}`\"\n            @click=\"toggleAddAddress(addressType.value)\"\n          />\n        </ButtonBar>\n      </template>\n    </PageBlock>\n\n    <PageBlock\n      v-if=\"metadataFields.length > 0\"\n      header=\"Metadata\"\n    >\n      <MetadataFormField\n        v-for=\"field in metadataFields\"\n        :key=\"field.id\"\n        :field=\"field\"\n        :value=\"metadataValuesMap[field.id]\"\n        @input=\"updateMetadata(field, $event)\"\n      />\n    </PageBlock>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isUpdatingLearner\"\n        :has-spinner-confirm=\"isUpdatingLearner\"\n        label-confirm=\"Save\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </SidePanel>\n</template>\n\n<style module lang=\"scss\">\n.buttonBar {\n  margin-top: 0.75rem  !important;\n  padding-right: calc(36px + 0.5rem); /* Match the fakeButton + 0.5rem gap */\n}\n.addressRow {\n  gap: 0.5rem !important;\n}\n.fakeButton {\n  width: 36px; /* Match the RemoveButton */\n}\n</style>\n","\n//Enrollment actions\nexport const enrollmentActions = {\n  START: 'start',\n  PAUSE: 'pause',\n  RESUME: 'resume',\n  CANCEL: 'cancel',\n  PRIORITIZE: 'prioritize',\n  RE_ENROLL: 're_enroll',\n  RESEND: 'resend',\n  REWIND: 'rewind',\n  SEND_OPT_OUT_NOTIFICATION: 'send_opt_out_notification',\n  GET_HELP: 'get_help',\n  COMPLETE: 'complete',\n}\n\n//Enrollment statuses\nexport const enrollmentStatuses = {\n  ACTIVE: 'active',\n  UP_NEXT: 'up_next',\n  SCHEDULED: 'scheduled',\n  PAUSED: 'paused',\n  CANCELED: 'canceled',\n  OPTED_OUT: 'opted_out',\n  COMPLETED: 'completed',\n  DISABLED: 'disabled',\n  NOT_ENGAGED: 'not_engaged',\n  WHATSAPP_WINDOW_VIOLATED: 'whatsapp_window_violated',\n  ERROR: 'error',\n}\n\n//Enrollment action options\nexport const enrollmentActionOptions = [\n  {\n    value: enrollmentActions.PAUSE,\n    label: 'Pause',\n    icon: 'pause',\n  },\n  {\n    value: enrollmentActions.CANCEL,\n    label: 'Cancel',\n    icon: 'highlight_off',\n  },\n  {\n    value: enrollmentActions.RESEND,\n    label: 'Resend',\n    icon: 'send',\n  },\n  {\n    value: enrollmentActions.START,\n    label: 'Start enrollment now',\n    icon: 'start',\n  },\n  {\n    value: enrollmentActions.PRIORITIZE,\n    label: 'Prioritize',\n    icon: 'priority_high',\n  },\n  {\n    value: enrollmentActions.REWIND,\n    label: 'Rewind',\n    icon: 'fast_rewind',\n  },\n  {\n    value: enrollmentActions.GET_HELP,\n    label: 'Get help',\n    icon: 'mail',\n  },\n  {\n    value: enrollmentActions.RESUME,\n    label: 'Resume',\n    icon: 'play_arrow',\n  },\n  {\n    value: enrollmentActions.RE_ENROLL,\n    label: 'Re-enroll',\n    icon: 'person_add',\n  },\n  {\n    value: enrollmentActions.SEND_OPT_OUT_NOTIFICATION,\n    label: 'Send opt-out notification',\n    icon: 'smartphone',\n  },\n  {\n    value: enrollmentActions.COMPLETE,\n    label: 'Complete',\n    icon: 'check',\n  },\n]\n\n//Enrollment bulk actions map\nexport const enrollmentBulkActionsMap = {\n  [enrollmentStatuses.ACTIVE]: [\n    enrollmentActions.PAUSE,\n    enrollmentActions.CANCEL,\n    enrollmentActions.RESEND,\n    enrollmentActions.COMPLETE,\n  ],\n  [enrollmentStatuses.UP_NEXT]: [\n    enrollmentActions.CANCEL,\n    enrollmentActions.START,\n  ],\n  [enrollmentStatuses.SCHEDULED]: [\n    enrollmentActions.CANCEL,\n  ],\n  [enrollmentStatuses.ERROR]: [\n    //NOTE: Because these are used as \"keys\", the WHATSAPP_WINDOW_VIOLATED\n    //option will fall under this item as well\n    enrollmentActions.CANCEL,\n    enrollmentActions.REWIND,\n    enrollmentActions.GET_HELP,\n  ],\n  [enrollmentStatuses.PAUSED]: [\n    enrollmentActions.RESUME,\n    enrollmentActions.CANCEL,\n  ],\n  [enrollmentStatuses.OPTED_OUT]: [\n    enrollmentActions.SEND_OPT_OUT_NOTIFICATION,\n  ],\n  [enrollmentStatuses.CANCELED]: [\n    enrollmentActions.RE_ENROLL,\n  ],\n}\n\n//Enrollment status options\nexport const enrollmentStatusOptions = [\n  {\n    value: enrollmentStatuses.ACTIVE,\n    label: 'Active',\n  },\n  {\n    value: enrollmentStatuses.UP_NEXT,\n    label: 'Up next',\n  },\n  {\n    value: enrollmentStatuses.SCHEDULED,\n    label: 'Scheduled',\n  },\n  {\n    value: enrollmentStatuses.PAUSED,\n    label: 'Paused',\n  },\n  {\n    value: enrollmentStatuses.CANCELED,\n    label: 'Canceled',\n  },\n  {\n    value: enrollmentStatuses.OPTED_OUT,\n    label: 'Opted out',\n  },\n  {\n    value: enrollmentStatuses.COMPLETED,\n    label: 'Completed',\n  },\n  {\n    value: enrollmentStatuses.DISABLED,\n    label: 'Disabled',\n  },\n  {\n    value: enrollmentStatuses.NOT_ENGAGED,\n    label: 'Not engaged',\n  },\n  {\n    value: enrollmentStatuses.WHATSAPP_WINDOW_VIOLATED,\n    label: 'WhatsApp reply window expired',\n  },\n  {\n    value: enrollmentStatuses.ERROR,\n    label: 'Error',\n  },\n]\n\n//Additional enrollment table filters\nexport const enrollmentTableFilters = {\n  [enrollmentStatuses.ACTIVE]: [\n    {label: 'Active', value: 'active'},\n    {label: 'Not engaged', value: 'not_engaged'},\n  ],\n  [enrollmentStatuses.ERROR]: [\n    {label: 'Error', value: 'error'},\n    {label: 'WhatsApp error', value: 'whatsapp_window_violated'},\n  ],\n}\n\n//Enrollment table states\nexport const enrollmentTableStates = {\n  [enrollmentStatuses.ACTIVE]: ['active', 'not_engaged'],\n  [enrollmentStatuses.UP_NEXT]: ['up_next'],\n  [enrollmentStatuses.SCHEDULED]: ['scheduled'],\n  [enrollmentStatuses.ERROR]: ['error', 'whatsapp_window_violated'],\n  [enrollmentStatuses.PAUSED]: ['paused'],\n  [enrollmentStatuses.OPTED_OUT]: ['opted_out'],\n  [enrollmentStatuses.CANCELED]: ['canceled'],\n  [enrollmentStatuses.COMPLETED]: ['completed'],\n  [enrollmentStatuses.DISABLED]: ['disabled'],\n}\n","import {BaseModel} from '@/models/base.model.js'\nimport {enrollmentStatuses} from '@/constants/enrollments.js'\nimport {useEnv} from '@/composables/use-env.js'\n\n/**\n * Enrollment model\n */\nexport class Enrollment extends BaseModel {\n\n  //Submodels\n  static subModels = {\n    queue: [Enrollment],\n  }\n\n  /**\n   * Can toggle status\n   */\n  get canToggleStatus() {\n    return ![\n      enrollmentStatuses.UP_NEXT,\n      enrollmentStatuses.COMPLETED,\n      enrollmentStatuses.CANCELED,\n    ].includes(this.status)\n  }\n\n  /**\n   * Messenger URL\n   */\n  get messengerUrl() {\n    const {id} = this\n    const {messengerBaseUrl} = useEnv()\n    return `${messengerBaseUrl.value}/enrollments/${id}/conversation`\n  }\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {Enrollment} from '@/models/enrollment.model.js'\n\n/**\n * Learner enrollments API service\n */\nexport class LearnerEnrollmentsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/learners'\n  itemKey = 'enrollment'\n  itemsKey = 'enrollments'\n  ModelClass = Enrollment\n\n  /**\n   * Query\n   */\n  query(learnerId, params, options) {\n    return super.query(params, options, `/${learnerId}/enrollments`)\n  }\n\n  /**\n   * Create enrollment for learner\n   */\n  create(learnerId, enrollment) {\n    return this\n      .post(`/${learnerId}/enrollments`, enrollment)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Update enrollment queue\n   */\n  updateQueue(learnerId, enrollmentIds) {\n    return this\n      .post(`${learnerId}/queues`, {enrollmentIds})\n      .then(json => this.toModelCollection(json))\n  }\n}\n\n//Export singleton instance\nexport const learnerEnrollmentsApi = new LearnerEnrollmentsApi()\n","import {learnerEnrollmentsApi} from '@/api/learner-enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Learner enrollment creation composable\n */\nexport function useLearnerEnrollmentCreation(learner) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Model\n  const model = ref({\n    courseId: null,\n    distributionId: null,\n    addressId: null,\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Create a new enrollment\n  const isCreatingEnrollment = ref(false)\n  const createEnrollment = async () => {\n    try {\n      isCreatingEnrollment.value = true\n      const data = {\n        enrollment: {\n          distribution_id: model.value.distributionId,\n          address_id: model.value.addressId,\n        },\n      }\n      const enrollment = await learnerEnrollmentsApi.create(learner.value.id, data)\n      setFlashSuccess('Learner enrolled')\n      return enrollment\n    }\n    catch (error) {\n      setFlashFailure('Failed to enroll learner')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingEnrollment.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    updateModel,\n    isCreatingEnrollment,\n    createEnrollment,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport CourseSelectInput from '@/components/shared/form/CourseSelectInput.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {Learner} from '@/models/learner.model.js'\nimport {useLearnerEnrollmentCreation} from '@/composables/use-learner-enrollment-creation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, ref, computed, watch} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'created',\n])\nconst props = defineProps({\n  learner: {\n    type: Learner,\n    required: true,\n  },\n})\n\n//Enrollment creation\nconst {learner} = toRefs(props)\nconst {\n  model,\n  updateModel,\n  createEnrollment,\n  isCreatingEnrollment,\n} = useLearnerEnrollmentCreation(learner)\n\n//Helper refs\nconst courseId = computed(() => model.value.courseId)\nconst distributionId = computed(() => model.value.distributionId)\nconst addressId = computed(() => model.value.addressId)\n\n//Validation\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  courseId: {\n    required: required('Course'),\n  },\n  distributionId: {\n    required: required('Schedule'),\n  },\n  addressId: {\n    required: required('Address'),\n  },\n}, model, {$autoDirty: true})\n\n//Confirm\nconst errorMessage = ref(null)\nconst confirm = async () => {\n  errorMessage.value = null\n  $v.value.$touch()\n  if ($v.value.$invalid) {\n    return\n  }\n  try {\n    const enrollment = await createEnrollment()\n    emit('created', {enrollment})\n  }\n  catch (error) {\n    if (error.data?.error) {\n      errorMessage.value = error.data.error\n    }\n  }\n}\n\n//Load schedules\nconst schedules = ref([])\nconst isLoadingSchedules = ref(false)\nconst loadSchedules = async() => {\n  if (!model.value.courseId) {\n    return schedules.value = []\n  }\n  try {\n    isLoadingSchedules.value = true\n    const data = await schedulesApi.queryEnrollable(model.value.courseId)\n    schedules.value = data.distributions\n    if (schedules.value.length > 0) {\n      updateModel({distributionId: schedules.value[0].id})\n    }\n  }\n  finally {\n    isLoadingSchedules.value = false\n  }\n}\n\n//Load schedules when course is selected\nwatch(courseId, loadSchedules)\n\n//Available addresses\nconst addresses = computed(() => {\n\n  //No schedule selected yet\n  if (!distributionId.value) {\n    return []\n  }\n\n  //Get enabled address types\n  const schedule = schedules.value.find(s => s.id === distributionId.value)\n  const enabled = schedule ? schedule.enabledAddressTypes : []\n\n  //Filter addresses\n  return learner.value.addresses\n    .filter(address => enabled.includes(address.addressType))\n})\n\n//Watch for changes in addresses\nwatch(addresses, () => {\n  if (addressId.value && addresses.value.find(a => a.id === addressId.value)) {\n    return\n  }\n  if (addresses.value.length > 0) {\n    updateModel({addressId: addresses.value[0].id})\n  }\n  else {\n    updateModel({addressId: null})\n  }\n})\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Enroll learner\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <FormField\n      label=\"Course\"\n      :errors=\"$v.courseId.$errors\"\n    >\n      <CourseSelectInput\n        auto-load\n        :query-params=\"{enrollable: true, sort: '-updatedAt'}\"\n        :value=\"model.courseId\"\n        :is-disabled=\"isLoadingSchedules\"\n        :has-error=\"$v.courseId.$error\"\n        test-id=\"course\"\n        @input=\"updateModel({courseId: $event.value})\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"Schedule\"\n      :errors=\"$v.distributionId.$errors\"\n    >\n      <SelectInput\n        :value=\"model.distributionId\"\n        :options=\"schedules\"\n        value-prop=\"id\"\n        label-prop=\"name\"\n        :has-error=\"$v.distributionId.$error\"\n        :is-disabled=\"isLoadingSchedules\"\n        :has-spinner=\"isLoadingSchedules\"\n        :placeholder=\"isLoadingSchedules ? 'Loading schedules...' : 'Select or type schedule name'\"\n        test-id=\"schedule\"\n        @input=\"updateModel({distributionId: $event.value})\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"Address\"\n      :errors=\"$v.addressId.$errors\"\n    >\n      <SelectInput\n        :value=\"model.addressId\"\n        :options=\"addresses\"\n        :has-error=\"$v.addressId.$error\"\n        value-prop=\"id\"\n        label-prop=\"value\"\n        test-id=\"address\"\n        is-low\n        @input=\"updateModel({addressId: $event.value})\"\n      >\n        <template #option=\"option\">\n          <AddressDisplay\n            :address=\"option\"\n            show-type\n          />\n        </template>\n\n        <template #selectedOption=\"option\">\n          <AddressDisplay\n            :address=\"option\"\n            show-type\n          />\n        </template>\n      </SelectInput>\n    </FormField>\n\n    <!-- Because dialogs cannot have overflowing content 😞 -->\n    <br><br><br><br><br><br>\n\n    <Alert\n      v-if=\"errorMessage\"\n      type=\"danger\"\n      :text=\"errorMessage\"\n    />\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isCreatingEnrollment || $v.$invalid\"\n        :has-spinner-confirm=\"isCreatingEnrollment\"\n        label-confirm=\"Enroll learner\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","<script setup>\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport {enrollmentStatuses, enrollmentStatusOptions} from '@/constants/enrollments.js'\nimport {componentColors} from '@/constants/components.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  status: {\n    type: String,\n    required: true,\n  },\n})\n\n//Determine color for status badge\nconst {status} = toRefs(props)\nconst color = computed(() => {\n  switch (status.value) {\n    case enrollmentStatuses.ACTIVE:\n      return componentColors.SUCCESS\n    case enrollmentStatuses.UP_NEXT:\n    case enrollmentStatuses.SCHEDULED:\n    case enrollmentStatuses.NOT_ENGAGED:\n      return componentColors.WARNING\n    case enrollmentStatuses.CANCELED:\n    case enrollmentStatuses.PAUSED:\n    case enrollmentStatuses.DISABLED:\n    case enrollmentStatuses.OPTED_OUT:\n    case enrollmentStatuses.ERROR:\n    case enrollmentStatuses.WHATSAPP_WINDOW_VIOLATED:\n      return componentColors.DANGER\n    case enrollmentStatuses.COMPLETED:\n    default:\n      return ''\n  }\n})\n</script>\n\n<template>\n  <StatusBadge\n    icon=\"circle\"\n    :color=\"color\"\n    v-bind=\"$attrs\"\n  >\n    <LabelValue\n      :options=\"enrollmentStatusOptions\"\n      :value=\"status\"\n    />\n  </StatusBadge>\n</template>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport {Enrollment} from '@/models/enrollment.model.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\n\n//Emits and props\ndefineEmits([\n  'start',\n  'pause',\n  'resume',\n  'cancel',\n  'prioritize',\n  'resend',\n  'rewind',\n  're-enroll',\n  'send-opt-out-notification',\n  'complete',\n  'select-order',\n])\ndefineProps({\n  enrollment: {\n    type: Enrollment,\n    required: true,\n  },\n  canSelectOrder: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Composales\nconst {goToMyEnrollmentView} = useNavigation()\nconst {canManageEnrollments} = useCurrentUser()\n</script>\n\n<template>\n  <ActionsDropdownMenu v-bind=\"$attrs\">\n    <DropdownMenuItem\n      v-if=\"canSelectOrder\"\n      label=\"Select order\"\n      @click=\"$emit('select-order', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"canManageEnrollments\"\n      label=\"Manage\"\n      @click=\"goToMyEnrollmentView(enrollment.id, $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canStart\"\n      label=\"Start\"\n      @click=\"$emit('start', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canPause\"\n      label=\"Pause\"\n      @click=\"$emit('pause', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canResume\"\n      label=\"Resume\"\n      @click=\"$emit('resume', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canPrioritize\"\n      label=\"Prioritize\"\n      @click=\"$emit('prioritize', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canResend\"\n      label=\"Resend\"\n      @click=\"$emit('resend', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canRewind\"\n      label=\"Rewind\"\n      @click=\"$emit('rewind', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canReEnroll\"\n      label=\"Re-enroll\"\n      @click=\"$emit('re-enroll', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canReceiveOptOutNotification\"\n      label=\"Send opt-out notification\"\n      @click=\"$emit('send-opt-out-notification', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canCancel\"\n      label=\"Cancel\"\n      @click=\"$emit('cancel', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"enrollment.canComplete\"\n      label=\"Complete\"\n      @click=\"$emit('complete', $event)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","<script setup>\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport {enrollmentActions} from '@/constants/enrollments.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  action: {\n    type: String,\n    default: null,\n  },\n  isPerformingAction: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {action} = toRefs(props)\nconst isGettingHelp = computed(() => action.value === enrollmentActions.GET_HELP)\n</script>\n\n<template>\n  <WarningModal\n    v-bind=\"$attrs\"\n    can-confirm\n    :is-confirming=\"isPerformingAction\"\n    :label-confirm=\"isGettingHelp ? 'Email support' : 'Confirm'\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {action, handler})\"\n  >\n    <p v-if=\"action === enrollmentActions.START\">\n      This will cancel any in progress or up next enrollments to start this Schedule immediately. This action cannot be undone.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.PAUSE\">\n      Pausing this enrollment will stop all scheduled messages until resumed. You will have to cancel an enrollment to allow any Next Up enrollments to send.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RESUME\">\n      Resuming this enrollment will continue from where the learner left off.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.CANCEL\">\n      Canceling this enrollment will permanently stop all scheduled messages. This action cannot be undone.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RESEND\">\n      This will resend the most recent course message. The process may take a few minutes. Please click once and wait for confirmation.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.PRIORITIZE\">\n      Prioritizing this course will move it to the top of the learner’s queue, starting it after any current course is completed or canceled.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.REWIND\">\n      Rewind will roll back the enrollment to the first point of failure, attempting to resume from where the learner left off. If issues persist, please contact support.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RE_ENROLL\">\n      This will re-enroll the learner in the course, starting from the beginning. This action cannot be undone.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.SEND_OPT_OUT_NOTIFICATION\">\n      This will send an opt-out notification to the learner, asking them to reply with START to opt back in.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.GET_HELP\">\n      Support will need to assist you with this enrollment. Would you like to email support for help with this enrollment?\n    </p>\n    <p v-else-if=\"action === enrollmentActions.COMPLETE\">\n      This will mark the enrollment as complete. This action cannot be undone.\n    </p>\n    <p v-if=\"!isGettingHelp\">\n      Are you sure?\n    </p>\n  </WarningModal>\n</template>\n","import {ref, computed, watch} from 'vue'\nimport {arraysMatchExactly} from '@/helpers/array.js'\n\n/**\n * Queue re-ordering composable\n */\nexport function useQueueReordering(initialItems) {\n\n  //Refs\n  const items = ref([...initialItems.value])\n  const hasChanges = computed(() => !arraysMatchExactly(items.value, initialItems.value))\n  const orderedItems = computed({\n    get: () => items.value,\n    set: (newValue) => {\n      items.value = newValue\n    },\n  })\n\n  //Reset order\n  const resetOrder = () => items.value = [...initialItems.value]\n\n  //Watch for changes\n  watch(initialItems, newValue => {\n    items.value = newValue\n  }, {immediate: true})\n\n  //Expose interface\n  return {\n    orderedItems,\n    hasChanges,\n    resetOrder,\n  }\n}\n","import {learnerEnrollmentsApi} from '@/api/learner-enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Enrollment queue editing composable\n */\nexport function useEnrollmentQueueEditing(learnerId) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isUpdatingQueue = ref(false)\n\n  //Update enrollment queue\n  const updateEnrollmentQueue = async enrollments => {\n\n    //Must have enrollment queue\n    if (!enrollments.value) {\n      throw new Error('No queue to update')\n    }\n\n    //Toggle flag\n    isUpdatingQueue.value = true\n    const enrollmentIds = enrollments.value.map(enrollment => enrollment.id)\n\n    //Create\n    try {\n      await learnerEnrollmentsApi.updateQueue(learnerId.value, enrollmentIds)\n      setFlashSuccess('Queue updated')\n    }\n    catch (error) {\n      setFlashFailure('Failed to update queue')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingQueue.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isUpdatingQueue,\n    updateEnrollmentQueue,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport PageOutlineBlock from '@/components/shared/page/PageOutlineBlock.vue'\nimport PageOutlineBlockItem from '@/components/shared/page/PageOutlineBlockItem.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {useQueueReordering} from '@/composables/use-queue-reordering'\nimport {useEnrollmentQueueEditing} from '@/composables/use-enrollment-queue-editing'\nimport {VueDraggable} from 'vue-draggable-plus'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'confirm',\n  'update',\n])\nconst props = defineProps({\n  enrollments: {\n    type: Array,\n    default: () => [],\n  },\n  learnerId: {\n    type: String,\n    required: true,\n  },\n})\n\n//Get refs\nconst {enrollments, learnerId} = toRefs(props)\n\n//Reordering\nconst {\n  orderedItems,\n  hasChanges,\n  resetOrder,\n} = useQueueReordering(enrollments)\n\n//Queue updating\nconst {\n  isUpdatingQueue,\n  updateEnrollmentQueue,\n} = useEnrollmentQueueEditing(learnerId)\n\n//Update queue\nconst update = async () => {\n  await updateEnrollmentQueue(orderedItems)\n  emit('update')\n}\n\n//Reset queue before close\nconst close = () => {\n  resetOrder()\n  emit('close')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Queue order\"\n    @open=\"$emit('open')\"\n    @close=\"close()\"\n  >\n    <VueDraggable\n      v-model=\"orderedItems\"\n      handle=\".drag-block\"\n      :animation=\"250\"\n      tag=\"FlexColumn\"\n      :component-data=\"{\n        attrs: {\n          withGap: false,\n          class: $style.queueContainer,\n        }\n      }\"\n    >\n      <PageOutlineBlock\n        v-for=\"enrollment in orderedItems\"\n        :key=\"enrollment.id\"\n        class=\"drag-block\"\n      >\n        <PageOutlineBlockItem\n          icon=\"subscriptions\"\n          is-draggable\n        >\n          <template #label>\n            <div>\n              <strong>{{ enrollment.courseName }}</strong>\n              <br>\n              <small text-muted>\n                {{ enrollment.distributionName }}\n              </small>\n            </div>\n          </template>\n        </PageOutlineBlockItem>\n      </PageOutlineBlock>\n    </VueDraggable>\n    <template #footer>\n      <FlowNavigation>\n        <template #left>\n          <ActionButton\n            type=\"secondary\"\n            label=\"Reset\"\n            :is-disabled=\"!hasChanges || isUpdatingQueue\"\n            @click=\"resetOrder()\"\n          />\n        </template>\n        <template #right>\n          <ActionButton\n            type=\"secondary\"\n            label=\"Cancel\"\n            @click=\"close()\"\n          />\n          <ActionButton\n            label=\"Confirm\"\n            type=\"primary\"\n            :is-disabled=\"isUpdatingQueue || !hasChanges\"\n            :has-spinner=\"isUpdatingQueue\"\n            @click=\"update()\"\n          />\n        </template>\n      </FlowNavigation>\n    </template>\n  </Modal>\n</template>\n\n<style module lang=\"scss\">\n.queueContainer {\n  overflow-y: scroll;\n  min-height: 224px;\n  -ms-overflow-style: none;\n  scrollbar-width: none;\n  &::-webkit-scrollbar {\n    display: none;\n  }\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Enrollment} from '@/models/enrollment.model.js'\n\n/**\n * Enrollments API service\n */\nexport class EnrollmentsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/enrollments'\n  itemKey = 'enrollment'\n  itemsKey = 'enrollments'\n  ModelClass = Enrollment\n\n  /**\n   * Start enrollment\n   */\n  start(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/start`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Pause enrollment\n   */\n  pause(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/pause`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Resume enrollment\n   */\n  resume(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/resume`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Cancel enrollment\n   */\n  cancel(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/cancel`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Re-enroll\n   */\n  reEnroll(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/re_enroll`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Prioritize\n   */\n  prioritize(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/prioritize`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Rewind enrollment\n   */\n  rewind(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/rewind`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Resend last message\n   */\n  resendLastMessage(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/resend_last_message`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Send opt-out notification\n   */\n  sendOptOutNotification(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/send_opt_out_notification`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Complete enrollment\n   */\n  complete(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/complete`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Get enrollment count\n   */\n  count(params) {\n    return this\n      .get('/count', params)\n  }\n}\n\n//Export singleton instance\nexport const enrollmentsApi = new EnrollmentsApi()\n","import {enrollmentsApi} from '@/api/enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Enrollment management composable\n */\nexport function useEnrollmentManagement() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Start enrollment\n  const isStartingEnrollment = ref(false)\n  const startEnrollment = async enrollment => {\n    try {\n      isStartingEnrollment.value = true\n      const updated = await enrollmentsApi.start(enrollment.id)\n      setFlashSuccess('Enrollment started')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to start enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isStartingEnrollment.value = false\n    }\n  }\n\n  //Pause enrollment\n  const isPausingEnrollment = ref(false)\n  const pauseEnrollment = async enrollment => {\n    try {\n      isPausingEnrollment.value = true\n      const updated = await enrollmentsApi.pause(enrollment.id)\n      setFlashSuccess('Enrollment paused')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to pause enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isPausingEnrollment.value = false\n    }\n  }\n\n  //Resume enrollment\n  const isResumingEnrollment = ref(false)\n  const resumeEnrollment = async enrollment => {\n    try {\n      isResumingEnrollment.value = true\n      const updated = await enrollmentsApi.resume(enrollment.id)\n      setFlashSuccess('Enrollment resumed')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to resume enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isResumingEnrollment.value = false\n    }\n  }\n\n  //Cancel enrollment\n  const isCancelingEnrollment = ref(false)\n  const cancelEnrollment = async enrollment => {\n    try {\n      isCancelingEnrollment.value = true\n      const updated = await enrollmentsApi.cancel(enrollment.id)\n      setFlashSuccess('Enrollment canceled')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to cancel enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCancelingEnrollment.value = false\n    }\n  }\n\n  //Re-enroll enrollment\n  const isReEnrollingEnrollment = ref(false)\n  const reEnrollEnrollment = async enrollment => {\n    try {\n      isReEnrollingEnrollment.value = true\n      const updated = await enrollmentsApi.reEnroll(enrollment.id)\n      setFlashSuccess('Learner re-enrolled')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to re-enroll learner')\n      processError(error)\n      throw error\n    }\n    finally {\n      isReEnrollingEnrollment.value = false\n    }\n  }\n\n  //Prioritize enrollment\n  const isPrioritizingEnrollment = ref(false)\n  const prioritizeEnrollment = async enrollment => {\n    try {\n      isPrioritizingEnrollment.value = true\n      const updated = await enrollmentsApi.prioritize(enrollment.id)\n      setFlashSuccess('Enrollment prioritized')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to prioritize enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isPrioritizingEnrollment.value = false\n    }\n  }\n\n  //Rewind enrollment\n  const isRewindingEnrollment = ref(false)\n  const rewindEnrollment = async enrollment => {\n    try {\n      isRewindingEnrollment.value = true\n      const updated = await enrollmentsApi.rewind(enrollment.id)\n      setFlashSuccess('Rewound enrollment')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to rewind enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isRewindingEnrollment.value = false\n    }\n  }\n\n  //Resend last message\n  const isResendingLastMessage = ref(false)\n  const resendLastMessage = async enrollment => {\n    try {\n      isResendingLastMessage.value = true\n      const updated = await enrollmentsApi.resendLastMessage(enrollment.id)\n      setFlashSuccess('Resent the last message')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to resend last message')\n      processError(error)\n      throw error\n    }\n    finally {\n      isResendingLastMessage.value = false\n    }\n  }\n\n  //Send opt-out notification\n  const isSendingOptOutNotification = ref(false)\n  const sendOptOutNotification = async enrollment => {\n    try {\n      isSendingOptOutNotification.value = true\n      const updated = await enrollmentsApi.sendOptOutNotification(enrollment.id)\n      setFlashSuccess('Opt-out notification sent')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to send opt-out notification')\n      processError(error)\n      throw error\n    }\n    finally {\n      isSendingOptOutNotification.value = false\n    }\n  }\n\n  //Complete enrollment\n  const isCompletingEnrollment = ref(false)\n  const completeEnrollment = async enrollment => {\n    try {\n      isCompletingEnrollment.value = true\n      const updated = await enrollmentsApi.complete(enrollment.id)\n      setFlashSuccess('Enrollment completed')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to complete enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCompletingEnrollment.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isStartingEnrollment,\n    startEnrollment,\n    isPausingEnrollment,\n    pauseEnrollment,\n    isResumingEnrollment,\n    resumeEnrollment,\n    isCancelingEnrollment,\n    cancelEnrollment,\n    isReEnrollingEnrollment,\n    reEnrollEnrollment,\n    isPrioritizingEnrollment,\n    prioritizeEnrollment,\n    isResendingLastMessage,\n    resendLastMessage,\n    isRewindingEnrollment,\n    rewindEnrollment,\n    isSendingOptOutNotification,\n    sendOptOutNotification,\n    isCompletingEnrollment,\n    completeEnrollment,\n  }\n}\n","import {enrollmentActions} from '@/constants/enrollments.js'\nimport {useEnrollmentManagement} from '@/composables/use-enrollment-management.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, computed} from 'vue'\n\n/**\n * Enrollment actions helper composable\n */\nexport function useEnrollmentActions() {\n\n  //Composables\n  const {processError} = useErrorHandling()\n\n  //Get handlers\n  const {\n    startEnrollment,\n    pauseEnrollment,\n    resumeEnrollment,\n    cancelEnrollment,\n    prioritizeEnrollment,\n    rewindEnrollment,\n    resendLastMessage,\n    reEnrollEnrollment,\n    sendOptOutNotification,\n    completeEnrollment,\n  } = useEnrollmentManagement()\n\n  //Refs\n  const selectedEnrollment = ref(null)\n  const selectedEnrollmentAction = ref(null)\n  const isPerformingSelectedEnrollmentAction = ref(false)\n\n  //Get handler\n  const handler = computed(() => {\n    switch (selectedEnrollmentAction.value) {\n      case enrollmentActions.START:\n        return startEnrollment\n      case enrollmentActions.PAUSE:\n        return pauseEnrollment\n      case enrollmentActions.RESUME:\n        return resumeEnrollment\n      case enrollmentActions.CANCEL:\n        return cancelEnrollment\n      case enrollmentActions.PRIORITIZE:\n        return prioritizeEnrollment\n      case enrollmentActions.REWIND:\n        return rewindEnrollment\n      case enrollmentActions.RESEND:\n        return resendLastMessage\n      case enrollmentActions.RE_ENROLL:\n        return reEnrollEnrollment\n      case enrollmentActions.SEND_OPT_OUT_NOTIFICATION:\n        return sendOptOutNotification\n      case enrollmentActions.COMPLETE:\n        return completeEnrollment\n      default:\n        return null\n    }\n  })\n\n  //Helpers to confirm/cancel an action\n  const prepareEnrollmentAction = (enrollment, action) => {\n    selectedEnrollment.value = enrollment\n    selectedEnrollmentAction.value = action\n  }\n  const cancelEnrollmentAction = () => {\n    selectedEnrollment.value = null\n    selectedEnrollmentAction.value = null\n  }\n\n  //Perform action\n  const performSelectedEnrollmentAction = async () => {\n\n    //Must have selected enrollment and action\n    if (!selectedEnrollment.value) {\n      throw new Error(`No enrollment selected`)\n    }\n    if (!selectedEnrollmentAction.value) {\n      throw new Error(`No enrollment action selected`)\n    }\n\n    //Perform action\n    try {\n      isPerformingSelectedEnrollmentAction.value = true\n      const result = await handler.value(selectedEnrollment.value)\n      cancelEnrollmentAction()\n      return result\n    }\n    catch (error) {\n      processError(error)\n      throw error\n    }\n    finally {\n      isPerformingSelectedEnrollmentAction.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    selectedEnrollment,\n    selectedEnrollmentAction,\n    isPerformingSelectedEnrollmentAction,\n    performSelectedEnrollmentAction,\n    prepareEnrollmentAction,\n    cancelEnrollmentAction,\n  }\n}\n","<script setup>\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport EnrollmentActionsMenu from '@/components/enrollments/EnrollmentActionsMenu.vue'\nimport IndividualEnrollmentActionConfirmationModal from '@/components/enrollments/IndividualEnrollmentActionConfirmationModal.vue'\nimport TableRow from '@/components/shared/table/TableRow.vue'\nimport CopyButton from '@/components/shared/buttons/CopyButton.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport ManageQueueModal from '@/components/learners/ManageQueueModal.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport {Learner} from '@/models/learner.model.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useEnrollmentActions} from '@/composables/use-enrollment-actions.js'\nimport {useCopyToClipboard} from '@/composables/use-copy-to-clipboard.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {enrollmentActions} from '@/constants/enrollments.js'\nimport {learnerEnrollmentsApi} from '@/api/learner-enrollments.api.js'\nimport {toRefs, ref} from 'vue'\n\nconst props = defineProps({\n  learner: {\n    type: Learner,\n    required: true,\n  },\n})\n\n//Get refs\nconst {learner} = toRefs(props)\n\nconst {goToMyEnrollmentView} = useNavigation()\n\n//Track queue to edit\nconst queuedItems = ref([])\n\n//Queued enrollments\nconst {\n  items: queuedEnrollments,\n  total: totalQueuedEnrollments,\n  loadItems: loadQueuedEnrollments,\n  reloadItems: reloadQueuedEnrollments,\n  loadItemsForPage: loadQueuedEnrollmentsForPage,\n  isLoadingItems: isLoadingQueuedEnrollments,\n  currentPage: queuedCurrentPage,\n  itemsPerPage: queuedItemsPerPage,\n  changeItemsPerPage: queuedChangeItemsPerPage,\n} = useQuerying({\n  handler: (...args) => learnerEnrollmentsApi.query(learner.value.id, ...args),\n  filter: {queues: true},\n  key: 'learnerQueuedEnrollmentsOverview',\n})\n\n//Enrollment actions\nconst {\n  selectedEnrollmentAction,\n  isPerformingSelectedEnrollmentAction,\n  performSelectedEnrollmentAction,\n  prepareEnrollmentAction,\n  cancelEnrollmentAction,\n} = useEnrollmentActions()\n\n//Copy to clipboard\nconst {copyToClipboard} = useCopyToClipboard()\n\n//Manage queue modal\nconst {\n  isValue: isShowingManageQueuedModal,\n  setTrue: showManageQueuedModal,\n  setFalse: hideManageQueuedModal,\n} = useValueToggle()\n\n//Manage queue\nconst manageQueue = queue => {\n  queuedItems.value = queue\n  showManageQueuedModal()\n}\n\n//Close modal and reload table\nconst closeModalAndReloadTable = () => {\n  queuedItems.value = []\n  hideManageQueuedModal()\n  loadQueuedEnrollments()\n}\n\n//Perform enrollment action\nconst performAction = async () => {\n  await performSelectedEnrollmentAction()\n  await reloadQueuedEnrollments()\n}\n\n//Load records\nloadQueuedEnrollments()\n\n//Expose\ndefineExpose({\n  reloadData: () => loadQueuedEnrollments(),\n})\n</script>\n\n<template>\n  <p v-if=\"queuedEnrollments.length === 0 && !isLoadingQueuedEnrollments\">\n    No queues yet\n  </p>\n  <OverviewTable\n    v-else\n    can-expand\n    :items=\"queuedEnrollments\"\n    :items-per-page=\"queuedItemsPerPage\"\n    :current-page=\"queuedCurrentPage\"\n    :total-items=\"totalQueuedEnrollments\"\n    :is-loading=\"isLoadingQueuedEnrollments\"\n    @load-page=\"loadQueuedEnrollmentsForPage($event.page)\"\n    @change-items-per-page=\"queuedChangeItemsPerPage($event.itemsPerPage)\"\n  >\n    <template #headerRow>\n      <TableHeaderCell :class=\"$style.id\">\n        ID\n        <Help\n          text=\"You can copy this enrollment ID and share it with our team if there are any technical issues\"\n          is-compact\n        />\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.course\">\n        Course\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.address\">\n        Address\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.channel\">\n        Channel\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.queue\">\n        Queue #\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.date\">\n        Date enrolled\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.status\">\n        Status\n      </TableHeaderCell>\n    </template>\n\n    <template #row=\"{item: enrollment}\">\n      <TableCell :class=\"$style.id\">\n        <CopyButton @click=\"copyToClipboard(enrollment.id, 'Enrollment ID copied to clipboard')\" />\n      </TableCell>\n      <TableCell\n        :class=\"$style.course\"\n        is-clickable\n        @click=\"goToMyEnrollmentView(enrollment.id, $event)\"\n      >\n        <div>\n          <strong>\n            {{ enrollment.courseName }}\n          </strong>\n          <br>\n          <small text-muted>\n            {{ enrollment.distributionName }}\n          </small>\n        </div>\n      </TableCell>\n      <TableCell :class=\"$style.address\">\n        <AddressDisplay\n          :address=\"enrollment.address\"\n          show-type\n        />\n      </TableCell>\n      <TableCell :class=\"$style.channel\">\n        {{ enrollment.channel }}\n      </TableCell>\n      <TableCell :class=\"$style.queue\" />\n      <TableCell :class=\"$style.date\">\n        <DateTime\n          :date=\"enrollment.createdAt\"\n          :format=\"dateFormats.DATE_AND_TIME\"\n          empty-label=\"N/A\"\n        />\n      </TableCell>\n      <TableCell :class=\"$style.status\">\n        <Tooltip\n          :text=\"enrollment.hoverText\"\n          position=\"top\"\n        >\n          <EnrollmentStatus :status=\"enrollment.status\" />\n        </Tooltip>\n      </TableCell>\n    </template>\n\n    <template #itemActions=\"{item: enrollment}\">\n      <EnrollmentActionsMenu\n        :enrollment=\"enrollment\"\n        :test-id=\"`enrollmentActionsMenu_${enrollment.id}`\"\n        @start=\"prepareEnrollmentAction(enrollment, enrollmentActions.START)\"\n        @pause=\"prepareEnrollmentAction(enrollment, enrollmentActions.PAUSE)\"\n        @resume=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESUME)\"\n        @cancel=\"prepareEnrollmentAction(enrollment, enrollmentActions.CANCEL)\"\n        @prioritize=\"prepareEnrollmentAction(enrollment, enrollmentActions.PRIORITIZE)\"\n        @resend=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESEND)\"\n        @rewind=\"prepareEnrollmentAction(enrollment, enrollmentActions.REWIND)\"\n        @re-enroll=\"prepareEnrollmentAction(enrollment, enrollmentActions.RE_ENROLL)\"\n        @send-opt-out-notification=\"prepareEnrollmentAction(enrollment, enrollmentActions.SEND_OPT_OUT_NOTIFICATION)\"\n      />\n    </template>\n\n    <template #expandedRow=\"{ item: enrollment }\">\n      <TableRow\n        v-for=\"queuedEnrollment in enrollment.queue\"\n        :key=\"queuedEnrollment.id\"\n      >\n        <TableCell :class=\"$style.icon\" />\n        <TableCell :class=\"$style.id\">\n          <CopyButton @click=\"copyToClipboard(queuedEnrollment.id, 'Enrollment ID copied to clipboard')\" />\n        </TableCell>\n        <TableCell\n          :class=\"$style.course\"\n          is-clickable\n          @click=\"goToMyEnrollmentView(queuedEnrollment.id, $event)\"\n        >\n          <div>\n            <strong>\n              {{ queuedEnrollment.courseName }}\n            </strong>\n            <br>\n            <small text-muted>\n              {{ queuedEnrollment.distributionName }}\n            </small>\n          </div>\n        </TableCell>\n        <TableCell :class=\"$style.address\">\n          <AddressDisplay\n            :address=\"queuedEnrollment.address\"\n            show-type\n          />\n        </TableCell>\n        <TableCell :class=\"$style.channel\">\n          {{ queuedEnrollment.channel }}\n        </TableCell>\n        <TableCell :class=\"$style.queue\">\n          {{ queuedEnrollment.queueNumber }}\n        </TableCell>\n        <TableCell :class=\"$style.date\">\n          <DateTime\n            :date=\"queuedEnrollment.createdAt\"\n            :format=\"dateFormats.DATE_AND_TIME\"\n            empty-label=\"N/A\"\n          />\n        </TableCell>\n        <TableCell :class=\"$style.status\">\n          <Tooltip\n            :text=\"queuedEnrollment.hoverText\"\n            position=\"top\"\n          >\n            <EnrollmentStatus :status=\"queuedEnrollment.status\" />\n          </Tooltip>\n        </TableCell>\n        <TableCell :class=\"$style.icon\">\n          <EnrollmentActionsMenu\n            :enrollment=\"queuedEnrollment\"\n            :test-id=\"`enrollmentActionsMenu_${queuedEnrollment.id}`\"\n            :can-select-order=\"queuedEnrollment.canPrioritize ||enrollment.queue.length > 1\"\n            @start=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.START)\"\n            @pause=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.PAUSE)\"\n            @resume=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.RESUME)\"\n            @cancel=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.CANCEL)\"\n            @prioritize=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.PRIORITIZE)\"\n            @resend=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.RESEND)\"\n            @rewind=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.REWIND)\"\n            @re-enroll=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.RE_ENROLL)\"\n            @send-opt-out-notification=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.SEND_OPT_OUT_NOTIFICATION)\"\n            @select-order=\"manageQueue(enrollment.queue)\"\n            @complete=\"prepareEnrollmentAction(queuedEnrollment, enrollmentActions.COMPLETE)\"\n          />\n        </TableCell>\n      </TableRow>\n    </template>\n  </OverviewTable>\n  <ManageQueueModal\n    :is-open=\"isShowingManageQueuedModal\"\n    :enrollments=\"queuedItems\"\n    :learner-id=\"learner.id\"\n    @close=\"hideManageQueuedModal()\"\n    @update=\"closeModalAndReloadTable()\"\n  />\n  <IndividualEnrollmentActionConfirmationModal\n    :is-open=\"!!selectedEnrollmentAction\"\n    :is-performing-action=\"isPerformingSelectedEnrollmentAction\"\n    :action=\"selectedEnrollmentAction\"\n    @close=\"cancelEnrollmentAction()\"\n    @confirm=\"performAction()\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.id {\n  flex: 0 0 3rem;\n}\n.course {\n  flex: 3;\n}\n.address {\n  flex: 2;\n}\n.channel {\n  flex: 2;\n}\n.queue {\n  flex: 1;\n}\n.date {\n  flex: 0 0 12rem;\n}\n.status {\n  flex: 0 0 12rem;\n}\n.icon {\n  flex: 0 0 2.5rem;\n  min-width: 2.5rem;\n  display: flex;\n  justify-content: center;\n  position: relative; // Add this to establish positioning context\n  z-index: 1;\n}\n</style>\n","<script setup>\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport EnrollmentActionsMenu from '@/components/enrollments/EnrollmentActionsMenu.vue'\nimport IndividualEnrollmentActionConfirmationModal from '@/components/enrollments/IndividualEnrollmentActionConfirmationModal.vue'\nimport CopyButton from '@/components/shared/buttons/CopyButton.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport {Learner} from '@/models/learner.model.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useEnrollmentActions} from '@/composables/use-enrollment-actions.js'\nimport {useCopyToClipboard} from '@/composables/use-copy-to-clipboard.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {enrollmentActions} from '@/constants/enrollments.js'\nimport {learnerEnrollmentsApi} from '@/api/learner-enrollments.api.js'\nimport {toRefs} from 'vue'\n\n//Props\nconst props = defineProps({\n  learner: {\n    type: Learner,\n    required: true,\n  },\n})\n\n//Get refs\nconst {learner} = toRefs(props)\n\n//Querying\nconst {\n  items: enrollments,\n  total: totalEnrollments,\n  loadItems: loadEnrollments,\n  reloadItems: reloadEnrollments,\n  loadItemsForPage: loadEnrollmentsForPage,\n  isLoadingItems: isLoadingEnrollments,\n  sort,\n  changeSort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n} = useQuerying({\n  handler: (...args) => learnerEnrollmentsApi.query(learner.value.id, ...args),\n  key: 'learnerEnrollmentsOverview',\n})\n\n//Composables\nconst {copyToClipboard} = useCopyToClipboard()\nconst {goToMyEnrollmentView} = useNavigation()\n\n//Enrollment actions\nconst {\n  selectedEnrollmentAction,\n  isPerformingSelectedEnrollmentAction,\n  performSelectedEnrollmentAction,\n  prepareEnrollmentAction,\n  cancelEnrollmentAction,\n} = useEnrollmentActions()\n\n//Perform enrollment action\nconst performAction = async () => {\n  await performSelectedEnrollmentAction()\n  await reloadEnrollments()\n}\n\n//Load enrollments on initial load\nloadEnrollments()\n\n//Expose\ndefineExpose({\n  reloadData: () => loadEnrollments(),\n})\n</script>\n\n<template>\n  <p v-if=\"enrollments.length === 0 && !isLoadingEnrollments\">\n    No enrollments yet\n  </p>\n  <OverviewTable\n    v-else\n    :items=\"enrollments\"\n    :items-per-page=\"itemsPerPage\"\n    :current-page=\"currentPage\"\n    :total-items=\"totalEnrollments\"\n    :is-loading=\"isLoadingEnrollments\"\n    @load-page=\"loadEnrollmentsForPage($event.page)\"\n    @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n  >\n    <template #headerRow>\n      <TableHeaderCell :class=\"$style.id\">\n        ID\n        <Help\n          text=\"You can copy this enrollment ID and share it with our team if there are any technical issues\"\n          is-compact\n        />\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.course\">\n        Course\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.address\">\n        Address\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.createdAt\"\n        is-sortable\n        sort-prop=\"createdAt\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Date enrolled\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.completedAt\"\n        is-sortable\n        sort-prop=\"completedAt\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Date completed\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.status\"\n        is-sortable\n        sort-prop=\"state\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Status\n      </TableHeaderCell>\n    </template>\n\n    <template #row=\"{item: enrollment}\">\n      <TableCell :class=\"$style.id\">\n        <CopyButton @click=\"copyToClipboard(enrollment.id, 'Enrollment ID copied to clipboard')\" />\n      </TableCell>\n      <TableCell\n        :class=\"$style.course\"\n        is-clickable\n        @click=\"goToMyEnrollmentView(enrollment.id, $event)\"\n      >\n        <div>\n          <strong>\n            {{ enrollment.courseName }}\n          </strong>\n          <br>\n          <small text-muted>\n            {{ enrollment.distributionName }}\n          </small>\n        </div>\n      </TableCell>\n      <TableCell :class=\"$style.address\">\n        <div>\n          <AddressDisplay :address=\"enrollment.address\" />\n          <small text-muted>\n            <AddressType :type=\"enrollment.address?.addressType\" />\n          </small>\n        </div>\n      </TableCell>\n      <TableCell :class=\"$style.createdAt\">\n        <DateTime\n          :date=\"enrollment.createdAt\"\n          :format=\"dateFormats.DATE_AND_TIME\"\n          empty-label=\"N/A\"\n        />\n      </TableCell>\n      <TableCell :class=\"$style.completedAt\">\n        <DateTime\n          :date=\"enrollment.completedAt\"\n          :format=\"dateFormats.DATE_AND_TIME\"\n          empty-label=\"N/A\"\n        />\n      </TableCell>\n      <TableCell :class=\"$style.status\">\n        <Tooltip\n          :text=\"enrollment.hoverText\"\n          position=\"top\"\n        >\n          <EnrollmentStatus :status=\"enrollment.status\" />\n        </Tooltip>\n      </TableCell>\n    </template>\n\n    <template #itemActions=\"{item: enrollment}\">\n      <EnrollmentActionsMenu\n        :enrollment=\"enrollment\"\n        :test-id=\"`enrollmentActionsMenu_${enrollment.id}`\"\n        @start=\"prepareEnrollmentAction(enrollment, enrollmentActions.START)\"\n        @pause=\"prepareEnrollmentAction(enrollment, enrollmentActions.PAUSE)\"\n        @resume=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESUME)\"\n        @cancel=\"prepareEnrollmentAction(enrollment, enrollmentActions.CANCEL)\"\n        @prioritize=\"prepareEnrollmentAction(enrollment, enrollmentActions.PRIORITIZE)\"\n        @resend=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESEND)\"\n        @rewind=\"prepareEnrollmentAction(enrollment, enrollmentActions.REWIND)\"\n        @re-enroll=\"prepareEnrollmentAction(enrollment, enrollmentActions.RE_ENROLL)\"\n        @send-opt-out-notification=\"prepareEnrollmentAction(enrollment, enrollmentActions.SEND_OPT_OUT_NOTIFICATION)\"\n        @complete=\"prepareEnrollmentAction(enrollment, enrollmentActions.COMPLETE)\"\n      />\n    </template>\n  </OverviewTable>\n  <IndividualEnrollmentActionConfirmationModal\n    :is-open=\"!!selectedEnrollmentAction\"\n    :is-performing-action=\"isPerformingSelectedEnrollmentAction\"\n    :action=\"selectedEnrollmentAction\"\n    @close=\"cancelEnrollmentAction()\"\n    @confirm=\"performAction()\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.id {\n  flex: 0 0 3rem;\n}\n.course {\n  flex: 3;\n}\n.address {\n  flex: 1;\n  min-width: 8rem;\n}\n.channel {\n  flex: 2;\n}\n.createdAt {\n  display: none;\n  flex: 0 0 11rem;\n  @media (min-width: 1024px) {\n    display: flex;\n  }\n}\n.completedAt {\n  display: none;\n  flex: 0 0 11rem;\n  @media (min-width: 1240px) {\n    display: flex;\n  }\n}\n.status {\n  flex: 0 0 9rem;\n}\n</style>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport CreateLearnerEnrollmentModal from '@/components/learners/CreateLearnerEnrollmentModal.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport LearnerQueuedEnrollmentsTable from '@/components/learners/LearnerQueuedEnrollmentsTable.vue'\nimport LearnerEnrollmentsTable from '@/components/learners/LearnerEnrollmentsTable.vue'\nimport {Learner} from '@/models/learner.model.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {toRefs, ref} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  learner: {\n    type: Learner,\n    required: true,\n  },\n})\n\n//Get refs\nconst {learner} = toRefs(props)\n\n//Tabs\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {label: 'Enrollments', key: 'enrollments'},\n  {label: 'Queues', key: 'queues'},\n])\n\n//Create enrollment modal\nconst {\n  isValue: isShowingCreateEnrollmentModal,\n  setTrue: showCreateEnrollmentModal,\n  setFalse: hideCreateEnrollmentModal,\n} = useValueToggle()\n\n//Reload data\nconst enrollmentsTable = ref(null)\nconst queuesTable = ref(null)\nconst reloadData = () => {\n  enrollmentsTable.value?.reloadData()\n  queuesTable.value?.reloadData()\n}\n\n//Reload data and close modal when enrollment is created\nconst createdEnrollment = () => {\n  reloadData()\n  hideCreateEnrollmentModal()\n}\n</script>\n\n<template>\n  <PageBlock header=\"Enrollments\">\n    <TabNavigation\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      @change-tab=\"setActiveTab($event.tab)\"\n    />\n    <template #headerAside>\n      <ActionButton\n        type=\"primary\"\n        label=\"Enroll\"\n        icon=\"person_add\"\n        @click=\"showCreateEnrollmentModal()\"\n      />\n    </template>\n\n    <LearnerEnrollmentsTable\n      v-if=\"activeTab.key === 'enrollments'\"\n      ref=\"enrollmentsTable\"\n      :learner=\"learner\"\n    />\n    <LearnerQueuedEnrollmentsTable\n      v-else-if=\"activeTab.key === 'queues'\"\n      ref=\"queuesTable\"\n      :learner=\"learner\"\n    />\n\n    <CreateLearnerEnrollmentModal\n      :is-open=\"isShowingCreateEnrollmentModal\"\n      :learner=\"learner\"\n      @close=\"hideCreateEnrollmentModal()\"\n      @created=\"createdEnrollment()\"\n    />\n  </PageBlock>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport UserName from '@/components/shared/transform/UserName.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport Timezone from '@/components/shared/transform/Timezone.vue'\nimport EditLearnerPanel from '@/components/learners/EditLearnerPanel.vue'\nimport LearnerEnrollmentsOverview from '@/components/learners/LearnerEnrollmentsOverview.vue'\nimport {learnersApi} from '@/api/learners.api.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {ref, computed} from 'vue'\n\n//Get route and router\nconst {route, router} = useRouting()\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Learners')\n\n//Organization settings\nconst {isExternalManagerEnabled, anonymizePii, availableAddressTypeOptions} = useCurrentOrganization()\n\n//Learner refs\nconst learner = ref(null)\nconst isLoading = ref(true)\n\n//Displayed metadata fields\nconst fieldsToShow = 3\nconst {\n  isValue: isShowingAllMetadataFields,\n  setTrue: showAllMetadataFields,\n} = useValueToggle()\nconst additionalMetadataFields = computed(() => learner.value.metadata.length - fieldsToShow)\nconst hasMoreMetadataFields = computed(() => additionalMetadataFields.value > 0)\nconst displayedMetadataFields = computed(() => {\n  if (isShowingAllMetadataFields.value) {\n    return learner.value.metadata\n  }\n  return learner.value.metadata.slice(0, fieldsToShow)\n})\n\n//Displayed cohorts\nconst cohortsToShow = 3\nconst {\n  isValue: isShowingAllCohorts,\n  setTrue: showAllCohorts,\n} = useValueToggle()\nconst additionalCohorts = computed(() => learner.value.cohorts.length - cohortsToShow)\nconst hasMoreCohorts = computed(() => additionalCohorts.value > 0)\nconst displayedCohorts = computed(() => {\n  if (isShowingAllCohorts.value) {\n    return learner.value.cohorts\n  }\n  return learner.value.cohorts.slice(0, cohortsToShow)\n})\n\n//Learner loader\nconst loadLearner = () => learnersApi\n  .findById(route.params.id)\n  .then(item => learner.value = item)\n  .catch(() => router.replace({name: 'learners-overview'}))\n  .finally(() => isLoading.value = false)\n\n//Edit state management\nconst {\n  isValue: isShowingEditPanel,\n  setTrue: showEditPanel,\n  setFalse: hideEditPanel,\n} = useValueToggle()\n\n//Reload learner and hide edit panel\nconst reloadLearner = () => {\n  loadLearner()\n  hideEditPanel()\n}\n\n//Load learner\nloadLearner()\n</script>\n\n<template>\n  <PageWrapper>\n    <PageBlock v-if=\"learner\">\n      <template #headerText>\n        <UserName :user=\"learner\" />\n      </template>\n      <template #headerAside>\n        <ActionButton\n          v-if=\"!anonymizePii\"\n          type=\"primary\"\n          label=\"Edit\"\n          @click=\"showEditPanel()\"\n        />\n      </template>\n\n      <SideBySide>\n        <div>\n          <h5>\n            Account details\n          </h5>\n\n          <FormField label=\"Name\">\n            <UserName :user=\"learner\" />\n          </FormField>\n\n          <FormField\n            v-if=\"learner.email\"\n            label=\"Account email\"\n          >\n            {{ learner.email }}\n          </FormField>\n\n          <FormField\n            v-if=\"learner.timezone\"\n            label=\"Timezone\"\n          >\n            <Timezone\n              :timezone=\"learner.timezone\"\n              empty-label=\"Not selected\"\n            />\n          </FormField>\n\n          <FormField\n            v-if=\"learner.externalUserId\"\n            label=\"External user ID\"\n          >\n            {{ learner.externalUserId }}\n          </FormField>\n\n          <FormField\n            v-if=\"isExternalManagerEnabled && learner.externalManagerId\"\n            label=\"External manager ID\"\n          >\n            {{ learner.externalManagerId }}\n          </FormField>\n\n          <template v-if=\"displayedMetadataFields.length > 0\">\n            <Divider :has-line=\"false\" />\n\n            <h5>\n              Metadata\n            </h5>\n\n            <FormField\n              v-for=\"field in displayedMetadataFields\"\n              :key=\"field.id\"\n              :label=\"field.name\"\n            >\n              <p>\n                <DateTime\n                  v-if=\"field.isDate\"\n                  :date=\"field.value\"\n                />\n                <span v-else>{{ field.value }}</span>\n              </p>\n            </FormField>\n\n            <ActionButton\n              v-if=\"hasMoreMetadataFields && !isShowingAllMetadataFields\"\n              :class=\"$style.showMore\"\n              type=\"link\"\n              @click=\"showAllMetadataFields()\"\n            >\n              <template #label>\n                Show {{ additionalMetadataFields }} more metadata\n                <Inflect\n                  text=\"field\"\n                  :count=\"additionalMetadataFields\"\n                />\n              </template>\n            </ActionButton>\n          </template>\n        </div>\n        <div>\n          <template v-if=\"learner.hasDeliveryAddresses\">\n            <h5>\n              Delivery addresses\n            </h5>\n\n            <FormField\n              v-for=\"addressType in availableAddressTypeOptions\"\n              :key=\"addressType.value\"\n              :label=\"addressType.label\"\n              :is-hidden=\"!learner.deliveryAddressesMap[addressType.value].length\"\n              is-list\n            >\n              <AddressDisplay\n                v-for=\"address in learner.deliveryAddressesMap[addressType.value]\"\n                :key=\"address.id\"\n                :address=\"address\"\n                show-default\n              />\n            </FormField>\n          </template>\n\n          <Divider\n            v-if=\"learner.hasDeliveryAddresses && learner.hasCohorts\"\n            :has-line=\"false\"\n          />\n\n          <template v-if=\"learner.hasCohorts\">\n            <h5>\n              Cohorts enrolled in\n            </h5>\n\n            <ul unordered-list>\n              <li\n                v-for=\"cohort in displayedCohorts\"\n                :key=\"cohort.id\"\n              >\n                {{ cohort.name }}\n                <small\n                  v-if=\"cohort.isDynamic\"\n                  text-muted\n                >(dynamic)</small>\n              </li>\n            </ul>\n\n            <ActionButton\n              v-if=\"hasMoreCohorts && !isShowingAllCohorts\"\n              :class=\"$style.showMore\"\n              type=\"link\"\n              @click=\"showAllCohorts()\"\n            >\n              <template #label>\n                Show {{ additionalCohorts }} more\n                <Inflect\n                  text=\"cohort\"\n                  :count=\"additionalCohorts\"\n                />\n              </template>\n            </ActionButton>\n          </template>\n        </div>\n      </SideBySide>\n    </PageBlock>\n\n    <LearnerEnrollmentsOverview\n      v-if=\"learner\"\n      :learner=\"learner\"\n    />\n\n    <template #sidePanels>\n      <EditLearnerPanel\n        v-if=\"isShowingEditPanel\"\n        :learner=\"learner\"\n        @close=\"reloadLearner()\"\n        @reload-learner=\"loadLearner()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.showMore {\n  margin-top: 1rem;\n}\n</style>\n","<script setup>\nimport {truncate} from '@/helpers/string.js'\nimport {computed, toRefs} from 'vue'\n\n//Props\nconst props = defineProps({\n  text: {\n    type: String,\n    required: true,\n  },\n  maxLength: {\n    type: Number,\n    required: true,\n  },\n  ending: {\n    type: String,\n    default: '...',\n  },\n})\n\n//Truncated text\nconst {text, maxLength, ending} = toRefs(props)\nconst truncated = computed(() => truncate(text.value, maxLength.value, ending.value))\n</script>\n\n<template>\n  {{ truncated }}\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Enrollment} from '@/models/enrollment.model.js'\n\n/**\n * My enrollments API service\n */\nexport class MyEnrollmentsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/my_enrollments'\n  itemKey = 'enrollment'\n  itemsKey = 'enrollments'\n  ModelClass = Enrollment\n\n  /**\n   * Start or stop an enrollment\n   */\n  startOrStopEnrollment(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/start_or_stop_enrollment`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Resend last message\n   */\n  resendLastMessage(enrollmentId) {\n    return this\n      .post(`/${enrollmentId}/resend_last_message`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Submit feedback\n   */\n  submitFeedback(enrollmentId, feedback) {\n    return this\n      .post(`/${enrollmentId}/submit_feedback`, {[this.itemKey]: {feedback}})\n      .then(json => this.toModelInstance(json))\n  }\n}\n\n//Export singleton instance\nexport const myEnrollmentsApi = new MyEnrollmentsApi()\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport Truncate from '@/components/shared/transform/Truncate.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport EnrollmentProgress from '@/components/enrollments/EnrollmentProgress.vue'\nimport {myEnrollmentsApi} from '@/api/my-enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {usePage} from '@/composables/use-page.js'\n\n//Get composables\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\nconst {goToMyEnrollmentView} = useNavigation()\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('My enrollments')\n\n//Querying\nconst {\n  items: enrollments,\n  total: totalEnrollments,\n  loadItems: loadEnrollments,\n  isLoadingItems: isLoadingEnrollments,\n  replaceItem: replaceEnrollment,\n} = useQuerying({\n  handler: (...args) => myEnrollmentsApi.query(...args),\n  key: 'myEnrollmentsOverview',\n})\n\n//Start or stop enrollment\nconst startOrStopEnrollment = async enrollment => {\n  try {\n    const updated = await myEnrollmentsApi.startOrStopEnrollment(enrollment.id)\n    replaceEnrollment(updated.enrollment)\n    setFlashSuccess(`Enrollment ${updated.enrollment.pausedAt ? 'paused' : 'resumed'}`)\n  }\n  catch {\n    setFlashFailure(`Failed to ${enrollment.pausedAt ? 'resume' : 'pause'} enrollment`)\n  }\n}\n\n//Load now\nloadEnrollments()\n</script>\n\n<template>\n  <PageWrapper>\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template #headerText>\n            <Inflect\n              text=\"enrollment\"\n              :count=\"totalEnrollments\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"enrollments\"\n        :total-items=\"totalEnrollments\"\n        :is-loading=\"isLoadingEnrollments\"\n        :show-pagination=\"false\"\n      >\n        <template #headerRow>\n          <TableHeaderCell :class=\"$style.name\">\n            Course\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.progress\">\n            Progress\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.status\">\n            Status\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.option\">\n            &nbsp;\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.option\">\n            &nbsp;\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: enrollment}\">\n          <TableCell\n            :class=\"$style.name\"\n            is-clickable\n            :test-id=\"`enrollmentDetailsTableCell-${enrollment.id}`\"\n            @click=\"goToMyEnrollmentView(enrollment.id)\"\n          >\n            <FlexColumn :class=\"$style.nameAndDescription\">\n              <strong>{{ enrollment.course.name }}</strong>\n              <span>\n                <Truncate\n                  :text=\"enrollment.course.description\"\n                  :max-length=\"200\"\n                />\n              </span>\n            </FlexColumn>\n          </TableCell>\n          <TableCell :class=\"$style.progress\">\n            <EnrollmentProgress\n              :num-steps=\"enrollment.numSteps\"\n              :num-completed=\"enrollment.numCompleted\"\n            />\n          </TableCell>\n          <TableCell :class=\"$style.status\">\n            <EnrollmentStatus :status=\"enrollment.status\" />\n          </TableCell>\n          <TableCell :class=\"$style.option\">\n            <ActionButton\n              v-if=\"enrollment.canToggleStatus\"\n              type=\"text\"\n              :icon=\"enrollment.pausedAt ? 'play_arrow' : 'pause'\"\n              :label=\"enrollment.pausedAt ? 'Resume' : 'Pause'\"\n              :is-disabled=\"!enrollment.isResumable\"\n              is-icon-outlined\n              @click=\"startOrStopEnrollment(enrollment)\"\n            />\n          </TableCell>\n          <TableCell :class=\"$style.option\">\n            <ActionButton\n              type=\"text\"\n              icon=\"edit\"\n              label=\"Details\"\n              is-icon-outlined\n              @click=\"goToMyEnrollmentView(enrollment.id)\"\n            />\n          </TableCell>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 2;\n}\n.status {\n  flex: 0 0 9rem;\n}\n.progress {\n  flex: 0 0 9rem;\n}\n.option {\n  flex: 0 0 7rem;\n}\n.nameAndDescription {\n  gap: 0.25rem !important;\n}\n</style>\n","<template>\n  <div\n    :class=\"$style.breadcrumb\"\n    hide-empty\n  >\n    <slot />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.breadcrumb {\n  display: flex;\n  align-items: center;\n  gap: 0.25rem;\n  margin-bottom: 1rem;\n  font-size: var(--font-size-m);\n}\n</style>\n","import {DateTime} from 'luxon'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {myEnrollmentsApi} from '@/api/my-enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, watch} from 'vue'\n\n/**\n * My enrollment editing composable\n */\nexport function useMyEnrollmentEditing(enrollment) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Models\n  const feedback = ref('')\n  const model = ref({\n    timezone: '',\n    enrollmentTime: null,\n  })\n\n  //Update model/feedback\n  const updateModel = data => Object.assign(model.value, data)\n  const updateFeedback = value => feedback.value = value\n\n  //Enrollment update\n  const isUpdatingEnrollment = ref(false)\n  const updateEnrollment = async () => {\n\n    //Must have enrollment\n    if (!enrollment.value?.id) {\n      throw new Error(`Must have enrollment reference to an existing enrollment`)\n    }\n\n    //Toggle flag\n    isUpdatingEnrollment.value = true\n\n    //Extract data for update\n    const {id} = enrollment.value\n    const data = {...model.value}\n\n    //Update\n    try {\n      const json = await myEnrollmentsApi.updateById(id, data)\n      enrollment.value = json.enrollment\n      setFlashSuccess('Enrollment updated')\n    }\n    catch (error) {\n      setFlashFailure('Failed to update enrollment')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingEnrollment.value = false\n    }\n  }\n\n  //Submit feedback\n  const isSubmittingFeedback = ref(false)\n  const submitFeedback = async () => {\n\n    //Must have enrollment\n    if (!enrollment.value?.id) {\n      throw new Error(`Must have enrollment reference to an existing enrollment`)\n    }\n\n    //Toggle flag\n    isSubmittingFeedback.value = true\n\n    //Get ID\n    const {id} = enrollment.value\n\n    //Update\n    try {\n      await myEnrollmentsApi.submitFeedback(id, feedback.value)\n      enrollment.value.feedback = feedback.value\n      setFlashSuccess('Feedback submitted')\n    }\n    catch (error) {\n      setFlashFailure('Failed to submit feedback')\n      processError(error)\n      throw error\n    }\n    finally {\n      isSubmittingFeedback.value = false\n    }\n  }\n\n  //Start or stop enrollment\n  const isStartingOrStoppingEnrollment = ref(false)\n  const startOrStopEnrollment = async () => {\n\n    //Must have enrollment\n    if (!enrollment.value?.id) {\n      throw new Error(`Must have enrollment reference to an existing enrollment`)\n    }\n\n    //Toggle flag\n    isStartingOrStoppingEnrollment.value = true\n\n    //Get ID\n    const {id} = enrollment.value\n\n    try {\n      const json = await myEnrollmentsApi.startOrStopEnrollment(id)\n      enrollment.value = json.enrollment\n      setFlashSuccess(`Enrollment ${enrollment.value.pausedAt ? 'paused' : 'resumed'}`)\n    }\n    catch (error) {\n      setFlashFailure(`Failed to ${enrollment.value.pausedAt ? 'resume' : 'pause'} enrollment`)\n      processError(error)\n      throw error\n    }\n    finally {\n      isStartingOrStoppingEnrollment.value = false\n    }\n  }\n\n  //Resend last message\n  const isResendingLastMessage = ref(false)\n  const resendLastMessage = async enrollment => {\n    try {\n      isResendingLastMessage.value = true\n      const updated = await myEnrollmentsApi.resendLastMessage(enrollment.id)\n      setFlashSuccess('Resent the last message')\n      Object.assign(enrollment, updated)\n      return updated\n    }\n    catch (error) {\n      setFlashFailure('Failed to resend last message')\n      processError(error)\n      throw error\n    }\n    finally {\n      isResendingLastMessage.value = false\n    }\n  }\n\n  //Watch enrollment for changes and update initial model values accordingly\n  watch(enrollment, () => {\n    if (enrollment.value && model.value) {\n      model.value.timezone = enrollment.value.effectiveTimezone\n      model.value.enrollmentTime = DateTime\n        .fromISO(enrollment.value.expectedDeliveryTime)\n        .setZone(enrollment.value.timezone)\n        .toFormat(dateFormats.TIME)\n    }\n    if (enrollment.value?.feedback) {\n      feedback.value = enrollment.value.feedback\n    }\n  }, {immediate: true})\n\n  //Expose interface\n  return {\n\n    //Enrollment\n    model,\n    updateModel,\n    updateEnrollment,\n    isUpdatingEnrollment,\n    resendLastMessage,\n    isResendingLastMessage,\n\n    //Feedback\n    feedback,\n    updateFeedback,\n    submitFeedback,\n    isSubmittingFeedback,\n\n    //Start/stop\n    startOrStopEnrollment,\n    isStartingOrStoppingEnrollment,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageImage from '@/components/shared/page/PageImage.vue'\nimport PageSection from '@/components/shared/page/PageSection.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport Timezone from '@/components/shared/transform/Timezone.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport TimezoneSelectInput from '@/components/shared/form/TimezoneSelectInput.vue'\nimport Breadcrumb from '@/components/shared/core/Breadcrumb.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport SideBySide from '@/components/shared/core/SideBySide.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport EnrollmentProgress from '@/components/enrollments/EnrollmentProgress.vue'\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport {openUrl} from '@/helpers/url.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {myEnrollmentsApi} from '@/api/my-enrollments.api.js'\nimport {useMyEnrollmentEditing} from '@/composables/use-my-enrollment-editing.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {ref, computed, onMounted} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('My enrollments')\n\n//Routing\nconst {routeParams, replaceRoute} = useRouting()\nconst {id} = routeParams.value\n\n//Check if we have a current user\nconst {user} = useCurrentUser()\n\n//Env and navigation\nconst {isProduction, isStaging} = useEnv() //TEMP\nconst {goToMyEnrollmentsOverview, goToMyEnrollmentView} = useNavigation()\n\n//Refs\nconst meta = ref(null)\nconst enrollment = ref(null)\nconst course = computed(() => enrollment.value?.course)\nconst addresses = computed(() => meta.value?.addresses || [])\nconst address = computed(() => addresses.value.find(a => a.id === enrollment.value?.addressId))\nconst isLoadingEnrollment = ref(true)\n\n//Load enrollment\nconst loadEnrollment = async () => {\n  try {\n    const json = await myEnrollmentsApi.findById(id)\n    enrollment.value = json.enrollment\n    meta.value = json.meta\n  }\n  finally {\n    isLoadingEnrollment.value = false\n  }\n}\n\n//Enrollment editing\nconst {\n  model,\n  feedback,\n  updateModel,\n  updateFeedback,\n  updateEnrollment,\n  submitFeedback,\n  isSubmittingFeedback,\n  resendLastMessage,\n  isResendingLastMessage,\n  startOrStopEnrollment,\n  isStartingOrStoppingEnrollment,\n} = useMyEnrollmentEditing(enrollment)\n\n//View message details\nconst viewMessage = ref(null)\nconst setViewMessage = message => viewMessage.value = message\nconst clearViewMessage = () => viewMessage.value = null\n\n//Load on mount\nonMounted(async () => {\n  try {\n    await loadEnrollment()\n  }\n  catch {\n    replaceRoute('my-enrollments-overview')\n  }\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoadingEnrollment\" />\n\n    <template v-else-if=\"enrollment && course\">\n      <Breadcrumb v-if=\"user\">\n        <TextLink\n          text=\"My enrollments\"\n          @click=\"goToMyEnrollmentsOverview($event)\"\n        />\n        <Icon\n          icon=\"chevron_right\"\n          color=\"muted\"\n          size=\"s\"\n        />\n        <TextLink\n          :text=\"course.name\"\n          @click=\"goToMyEnrollmentView(enrollment.id, $event)\"\n        />\n      </Breadcrumb>\n\n      <PageBlock :header=\"course.name\">\n        <PageSection v-if=\"course.imageUrl\">\n          <PageImage :image-url=\"course.imageUrl\" />\n        </PageSection>\n\n        <PageSection header=\"Course description\">\n          <Markdown :content=\"course.description\" />\n        </PageSection>\n\n        <PageSection header=\"Enrollment details\">\n          <SideBySide>\n            <FormField label=\"Delivery method\">\n              <AddressDisplay\n                :address=\"address\"\n                show-type\n              />\n            </FormField>\n            <FormField\n              v-if=\"!enrollment.isBinge\"\n              label=\"Schedule\"\n            >\n              <p>{{ enrollment.deliveryDays }}</p>\n            </FormField>\n          </SideBySide>\n          <SideBySide>\n            <FormField label=\"Delivery time\">\n              <p v-if=\"enrollment.isBinge\">\n                Instant\n              </p>\n              <p v-else-if=\"!meta.isTimeChangeable\">\n                <DateTime\n                  :date=\"enrollment.expectedDeliveryTime\"\n                  :format=\"dateFormats.DATE_AND_TIME\"\n                />\n              </p>\n              <TimeInput\n                v-else\n                :value=\"model.enrollmentTime\"\n                @input=\"updateModel({enrollmentTime: $event.value})\"\n                @dirty=\"updateEnrollment()\"\n              />\n            </FormField>\n            <FormField label=\"Timezone\">\n              <TimezoneSelectInput\n                v-if=\"meta.isTimezoneChangeable && !enrollment.isBinge && enrollment.isActive\"\n                :is-clearable=\"false\"\n                :value=\"model.timezone\"\n                test-id=\"timezone\"\n                @input=\"updateModel({timezone: $event.value})\"\n                @dirty=\"updateEnrollment()\"\n              />\n              <Timezone\n                v-else\n                :timezone=\"enrollment.effectiveTimezone\"\n                empty-label=\"Not selected\"\n              />\n            </FormField>\n          </SideBySide>\n        </PageSection>\n\n        <PageSection subheader=\"Course progress\">\n          <div :class=\"$style.progress\">\n            <EnrollmentProgress\n              is-large\n              :num-steps=\"enrollment.numSteps\"\n              :num-completed=\"enrollment.numCompleted\"\n            />\n            <EnrollmentStatus\n              is-large\n              :status=\"enrollment.status\"\n            />\n            <ActionButton\n              v-if=\"(enrollment.completedAt || enrollment.canceledAt) && enrollment.distribution\"\n              type=\"secondary\"\n              label=\"Re-enroll\"\n              icon=\"replay\"\n              @click=\"openUrl(`/distributions/${enrollment.distribution.id}/register`, null, $event.ctrlKey || $event.metaKey)\"\n            />\n            <ActionButton\n              v-else-if=\"enrollment.canToggleStatus\"\n              type=\"secondary\"\n              :label=\"enrollment.pausedAt ? 'Resume' : 'Pause'\"\n              :icon=\"enrollment.pausedAt ? 'play_arrow' : 'pause'\"\n              :is-disabled=\"!enrollment.isResumable || isStartingOrStoppingEnrollment\"\n              :has-spinner=\"isStartingOrStoppingEnrollment\"\n              @click=\"startOrStopEnrollment(enrollment)\"\n            />\n          </div>\n        </PageSection>\n\n        <Divider v-if=\"!isProduction && !isStaging\" />\n\n        <FormField\n          v-if=\"!isProduction && !isStaging\"\n          label=\"Trouble engaging with your course through your selected delivery method?\"\n        >\n          <TextLink\n            text=\"Click here to use the web messenger instead\"\n            :url=\"enrollment.messengerUrl\"\n            open-in-new-window\n          />\n        </FormField>\n\n        <Divider />\n\n        <FormField label=\"Want to leave feedback?\">\n          <TextInput\n            :value=\"feedback\"\n            :character-limit=\"1200\"\n            is-multiline\n            show-emoji-picker\n            @input=\"updateFeedback($event.value)\"\n          />\n        </FormField>\n\n        <ButtonBar>\n          <ActionButton\n            type=\"primary\"\n            label=\"Submit feedback\"\n            :is-disabled=\"isSubmittingFeedback\"\n            :has-spinner=\"isSubmittingFeedback\"\n            @click=\"submitFeedback()\"\n          />\n        </ButtonBar>\n      </PageBlock>\n\n      <PageBlock header=\"Messages\">\n        <template\n          v-if=\"enrollment.canResend\"\n          #headerAside\n        >\n          <ActionButton\n            type=\"secondary\"\n            label=\"Resend last message\"\n            :is-disabled=\"isResendingLastMessage\"\n            :has-spinner=\"isResendingLastMessage\"\n            @click=\"resendLastMessage(enrollment)\"\n          />\n        </template>\n        <OverviewTable\n          v-if=\"meta.messages.length > 0\"\n          :items=\"meta.messages\"\n          :total-items=\"meta.messages.length\"\n          :show-pagination=\"false\"\n        >\n          <template #headerRow>\n            <TableHeaderCell :class=\"$style.name\">\n              Step\n            </TableHeaderCell>\n            <TableHeaderCell :class=\"$style.type\">\n              Type\n            </TableHeaderCell>\n            <TableHeaderCell :class=\"$style.date\">\n              Date\n            </TableHeaderCell>\n            <TableHeaderCell :class=\"$style.content\">\n              Content\n            </TableHeaderCell>\n          </template>\n\n          <template #row=\"{item: message}\">\n            <TableCell\n              :class=\"$style.name\"\n              is-clickable\n              @click=\"setViewMessage(message)\"\n            >\n              {{ message.name }}\n            </TableCell>\n            <TableCell :class=\"$style.type\">\n              {{ message.type }}\n            </TableCell>\n            <TableCell :class=\"$style.date\">\n              <DateTime\n                v-if=\"message.date\"\n                :format=\"dateFormats.DATE_AND_TIME\"\n                :date=\"message.date\"\n              />\n              <span v-else>N/A</span>\n            </TableCell>\n            <TableCell :class=\"$style.content\">\n              <ActionButton\n                type=\"text\"\n                label=\"View\"\n                @click=\"setViewMessage(message)\"\n              />\n            </TableCell>\n          </template>\n        </OverviewTable>\n\n        <p v-else>\n          Looks like no messages have been sent, check back later!\n        </p>\n      </PageBlock>\n    </template>\n\n    <Modal\n      :is-open=\"!!viewMessage\"\n      :header=\"viewMessage?.name\"\n      close-on-key\n      close-on-click-outside\n      @close=\"clearViewMessage()\"\n    >\n      <Markdown :content=\"viewMessage?.content\" />\n    </Modal>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.progress {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  margin-bottom: 1rem;\n}\n.name {\n  flex: 1;\n}\n.type {\n  flex: 0 0 6rem;\n}\n.date {\n  flex: 0 0 12rem;\n}\n.content {\n  flex: 0 0 6rem;\n}\n</style>\n","<script setup>\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport {toRefs} from 'vue'\n\n//Emit and props\nconst emit = defineEmits([\n  'click',\n])\nconst props = defineProps({\n  name: {\n    type: String,\n    required: true,\n  },\n  canExpand: {\n    type: Boolean,\n    default: false,\n  },\n  isExpanded: {\n    type: Boolean,\n    default: false,\n  },\n  isSubRow: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Get refs\nconst {canExpand} = toRefs(props)\n\n//Handle click\nconst handleClick = (event) => {\n  if (canExpand.value) {\n    emit('click', event)\n  }\n}\n</script>\n\n<template>\n  <Tooltip\n    :text=\"name\"\n    position=\"top\"\n  >\n    <div\n      :class=\"{\n        [$style.nameCell]: true,\n        [$style.noIcon]: !canExpand,\n        [$style.isSubRow]: isSubRow,\n      }\"\n      @click=\"handleClick($event)\"\n    >\n      <Icon\n        v-if=\"canExpand\"\n        :icon=\"isExpanded ? 'expand_less' : 'expand_more'\"\n        color=\"muted\"\n      />\n      <span\n        test-id=\"nameCell\"\n        :class=\"$style.nameText\"\n      >{{ name }}</span>\n    </div>\n  </Tooltip>\n</template>\n\n<style module lang=\"scss\">\n.nameCell {\n  height: 42px;\n  width: 300px;\n  display: flex;\n  align-items: center;\n  font-weight: 600;\n  cursor: pointer;\n  &.noIcon {\n    padding-left: 2rem;\n    cursor: default;\n  }\n  &.isSubRow {\n    height: 34px;\n    padding-left: 1.5rem;\n    color: var(--color-text-muted);\n    font-weight: var(--font-weight-normal);\n    cursor: default;\n  }\n}\n.nameText {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  width: 100%;\n}\n</style>\n","import {DateTime} from 'luxon'\n\nexport function useTimelineDatePosition(dateRange) {\n  const getDateIndex = (date) => dateRange.value.findIndex(dt => dt.hasSame(DateTime.fromISO(date).startOf('day'), 'day'))\n\n  const getDateOffsets = date => ({offset: getDateIndex(date)})\n\n  const getDateRangeOffsets = (startDate, endDate) => {\n    let startOffset = getDateIndex(startDate)\n    let endOffset = getDateIndex(endDate)\n\n    // Convert dates to DateTime objects for comparison\n    const start = DateTime.fromISO(startDate)\n    const end = DateTime.fromISO(endDate)\n\n    // Only hide if the entire range is before or after visible dates\n    if (end < dateRange.value[0] || start > dateRange.value[dateRange.value.length - 1]) {\n      return {}\n    }\n\n    // If start is before visible range, use first visible date\n    if (startOffset === -1 && start < dateRange.value[0]) {\n      startOffset = 0\n    }\n\n    // If end is after visible range, use last visible date\n    if (endOffset === -1 && end > dateRange.value[dateRange.value.length - 1]) {\n      endOffset = dateRange.value.length - 1\n    }\n\n    return {\n      startOffset,\n      endOffset,\n    }\n  }\n\n  return {\n    getDateOffsets,\n    getDateRangeOffsets,\n  }\n}\n","<script setup>\nimport {DateTime} from 'luxon'\nimport {toRefs, computed} from 'vue'\nimport {useTimelineDatePosition} from '@/composables/use-timeline-date-position.js'\n\ndefineEmits([\n  'click',\n])\nconst props = defineProps({\n  startDate: {\n    type: [DateTime, String],\n    default: '',\n  },\n  endDate: {\n    type: [DateTime, String],\n    default: '',\n  },\n  dates: {\n    type: Array,\n    default: () => [],\n  },\n  isSubRow: {\n    type: Boolean,\n    default: false,\n  },\n  dateRange: {\n    type: Object,\n    default: () => ({}),\n  },\n  cellWidth: {\n    type: Number,\n    default: 60,\n  },\n})\n\nconst {startDate, endDate, dateRange, cellWidth} = toRefs(props)\n\nconst {getDateOffsets, getDateRangeOffsets} = useTimelineDatePosition(dateRange)\n\nconst getDateStyle = (date) => {\n  const {offset} = getDateOffsets(date)\n  return {\n    left: `${offset * cellWidth.value}px`,\n    width: `${cellWidth.value - 1}px`,\n  }\n}\n\nconst getDateRangeStyle = computed(() => {\n  const {startOffset, endOffset} = getDateRangeOffsets(startDate.value, endDate.value)\n\n  if (startOffset === undefined || endOffset === undefined) {\n    return\n  }\n  return {\n    left: `${startOffset * cellWidth.value}px`,\n    width: `${(endOffset - startOffset + 1) * cellWidth.value}px`,\n  }\n})\n</script>\n\n<template>\n  <div\n    :class=\"{\n      [$style.recordRow]: true,\n      [$style.subRecordRow]: isSubRow,\n    }\"\n  >\n    <div :class=\"$style.recordProgressContainer\">\n      <div\n        v-if=\"startDate && endDate\"\n        test-id=\"dateRange\"\n        :class=\"$style.dateRange\"\n        :style=\"getDateRangeStyle\"\n        @click=\"$emit('click', $event)\"\n      />\n      <div\n        v-for=\"(date, index) in dates\"\n        v-else\n        :key=\"index\"\n        test-id=\"subDateBlock\"\n        :class=\"{\n          [$style.dateBlock]: true,\n          [$style.singleDate]: true,\n          [$style.subDateBlock]: isSubRow\n        }\"\n        :style=\"getDateStyle(date)\"\n        @click=\"$emit('click', {date})\"\n      />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.recordRow {\n  display: flex;\n  height: 42px;\n  width: fit-content;\n  &.subRecordRow {\n    height: 34px;\n    border-bottom: none;\n  }\n}\n.recordProgressContainer {\n  position: relative;\n  flex: 1;\n  padding: 8px 0;\n}\n.dateBlock, .dateRange {\n  position: absolute;\n  top: 50%;\n  transform: translateY(-50%);\n  height: 24px;\n  border-radius: 4px;\n  cursor: pointer;\n}\n.subDateBlock {\n  height: 20px;\n  opacity: 0.8;\n}\n.singleDate {\n  background-color: var(--bg-primary-muted);\n}\n.dateRange {\n  background-color: var(--bg-highlight-hover);\n}\n</style>\n","import {useCurrentUser} from '@/composables/use-current-user.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {computed} from 'vue'\nimport {DateTime} from 'luxon'\n\nexport function useTimelineDates({startBuffer, endBuffer, cellWidth = 60}) {\n  const {timezone} = useCurrentUser()\n  const currentDateTime = computed(() => DateTime.now().setZone(timezone.value).startOf('day'))\n\n  const dateRange = computed(() => {\n    const startDate = currentDateTime.value.minus({days: startBuffer.value})\n    const endDate = currentDateTime.value.plus({days: endBuffer.value})\n    const dates = []\n    let currentDate = startDate\n\n    while (currentDate <= endDate) {\n      dates.push(currentDate)\n      currentDate = currentDate.plus({days: 1})\n    }\n\n    return dates\n  })\n\n  const groupedDates = computed(() => {\n    const groups = []\n    let currentGroup = null\n\n    dateRange.value.forEach(date => {\n      const monthYear = date.toFormat(dateFormats.MONTH_YEAR)\n\n      if (!currentGroup || currentGroup.monthYear !== monthYear) {\n        currentGroup = {\n          monthYear,\n          month: date.toFormat('MMMM'),\n          year: date.toFormat('yyyy'),\n          dates: [],\n          startIndex: groups.reduce((sum, group) => sum + group.dates.length, 0),\n        }\n        groups.push(currentGroup)\n      }\n\n      currentGroup.dates.push(date)\n    })\n\n    return groups\n  })\n\n  const currentDatePosition = computed(() =>\n    dateRange.value.findIndex(d => d.hasSame(currentDateTime.value, 'day'))\n  )\n\n  const timelineWidth = computed(() => dateRange.value.length * cellWidth)\n\n  return {\n    dateRange,\n    groupedDates,\n    currentDateTime,\n    currentDatePosition,\n    timelineWidth,\n  }\n}\n","import {ref, nextTick, onMounted, onUnmounted} from 'vue'\nimport {useThrottleFn} from '@vueuse/core'\n\nexport function useTimelineScroll({\n  startBuffer,\n  endBuffer,\n  cellWidth = 60,\n  bufferIncrease = 30,\n  scrollThreshold = 0.2,\n  scrollThrottle = 10,\n}) {\n\n  const timelineEl = ref(null)\n\n  const handleHorizontalScroll = useThrottleFn(() => {\n    if (!timelineEl.value) {\n      return\n    }\n\n    const container = timelineEl.value\n    const scrollLeft = container.scrollLeft\n    const scrollWidth = container.scrollWidth\n    const clientWidth = container.clientWidth\n    const scrollRight = scrollWidth - (scrollLeft + clientWidth)\n\n    // Calculate threshold distance\n    const thresholdDistance = clientWidth * scrollThreshold\n\n    // Load more dates when near the start\n    if (scrollLeft < thresholdDistance) {\n      const previousStartBuffer = startBuffer.value\n      startBuffer.value += bufferIncrease / 2\n\n      // After Vue updates the DOM, adjust scroll position to maintain relative view\n      nextTick(() => {\n        const addedWidth = (startBuffer.value - previousStartBuffer) * cellWidth\n        container.scrollLeft += addedWidth\n      })\n    }\n\n    // Load more dates when near the end\n    if (scrollRight < thresholdDistance) {\n      endBuffer.value += bufferIncrease / 2\n    }\n  }, scrollThrottle)\n\n  onMounted(() => {\n    if (!timelineEl.value) {\n      return\n    }\n\n    timelineEl.value.addEventListener('scroll', handleHorizontalScroll)\n\n    // Scroll to the current date\n    scrollToCurrentDate(true)\n  })\n\n  const scrollToCurrentDate = async (isInitialLoad = false) => {\n    await nextTick()\n\n    if (!timelineEl.value) {\n      return\n    }\n\n    const currentDateIndex = startBuffer.value\n    const centerOffset = (timelineEl.value.clientWidth - cellWidth) / 2\n\n    const scrollTarget = (currentDateIndex * cellWidth) - centerOffset\n\n    // Try scrollTo first, fall back to scrollLeft if not available\n    if (typeof timelineEl.value.scrollTo === 'function') {\n      timelineEl.value.scrollTo({\n        left: scrollTarget,\n        behavior: isInitialLoad ? 'auto' : 'smooth',\n      })\n    }\n    else {\n      timelineEl.value.scrollLeft = scrollTarget\n    }\n  }\n  onUnmounted(() => {\n    if (timelineEl.value) {\n      timelineEl.value.removeEventListener('scroll', handleHorizontalScroll)\n    }\n  })\n\n  return {\n    timelineEl,\n    scrollToCurrentDate,\n  }\n}\n","<script setup>\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport GanttChartNameCell from '@/components/shared/chart/GanttChartNameCell.vue'\nimport GanttChartDateCell from '@/components/shared/chart/GanttChartDateCell.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {useTimelineDates} from '@/composables/use-timeline-dates.js'\nimport {useTimelineScroll} from '@/composables/use-timeline-scroll.js'\nimport {ref} from 'vue'\n\nconst emit = defineEmits([\n  'toggle-expand',\n  'record-date-click',\n  'sub-record-date-click',\n])\ndefineProps({\n  records: {\n    type: Array,\n    required: true,\n  },\n  isLoading: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Constants\nconst cellWidth = 60\nconst bufferIncrease = 30\nconst scrollThreshold = 0.2\nconst scrollDebounce = 10\nconst buffer = 14\n\n//Refs\nconst expandedItems = ref({})\nconst startBuffer = ref(buffer)\nconst endBuffer = ref(buffer)\n\nconst toggleExpand = (itemId) => {\n  expandedItems.value[itemId] = !expandedItems.value[itemId]\n  emit('toggle-expand', {itemId, isExpanded: expandedItems.value[itemId]})\n}\n\n//Composables\nconst {\n  dateRange,\n  groupedDates,\n  currentDateTime,\n  currentDatePosition,\n  timelineWidth,\n} = useTimelineDates({\n  cellWidth,\n  startBuffer,\n  endBuffer,\n})\n\n// Scroll handling for timeline\nconst {\n  timelineEl,\n  scrollToCurrentDate,\n} = useTimelineScroll({\n  scrollThreshold,\n  scrollDebounce,\n  cellWidth,\n  bufferIncrease,\n  startBuffer,\n  endBuffer,\n})\n</script>\n\n<template>\n  <div :class=\"$style.timelineWrapper\">\n    <!-- Names column -->\n    <div\n      test-id=\"namesColumn\"\n      :class=\"$style.namesColumn\"\n    >\n      <div :class=\"$style.namesHeader\">\n        <slot name=\"header\" />\n      </div>\n      <div\n        v-for=\"(record, index) in records\"\n        :key=\"record.id\"\n        test-id=\"recordGroup\"\n        :class=\"$style.recordGroup\"\n      >\n        <!-- Record name -->\n        <GanttChartNameCell\n          :name=\"record.name\"\n          :is-expanded=\"expandedItems[record.id || index]\"\n          can-expand\n          @click=\"toggleExpand(record.id || index)\"\n        />\n        <!-- Sub-record names -->\n        <template v-if=\"expandedItems[record.id || index]\">\n          <GanttChartNameCell\n            v-for=\"subRecord in record.subDates\"\n            :key=\"subRecord.id\"\n            :name=\"subRecord.name\"\n            is-sub-row\n          />\n        </template>\n      </div>\n    </div>\n\n    <!-- Timeline scroll container -->\n    <div\n      ref=\"timelineEl\"\n      test-id=\"timelineContainer\"\n      :class=\"$style.timelineContainer\"\n    >\n      <div\n        :class=\"$style.timelineContent\"\n        :style=\"{ width: `${timelineWidth}px` }\"\n      >\n        <!-- Date headers -->\n        <div :class=\"$style.timelineHeaders\">\n          <!-- Month separators -->\n          <div\n            v-for=\"group in groupedDates\"\n            :key=\"group.monthYear\"\n            :class=\"$style.monthSeparator\"\n            :style=\"{\n              left: `${group.startIndex * cellWidth}px`\n            }\"\n          />\n\n          <!-- Month/Year row -->\n          <div :class=\"$style.monthRow\">\n            <template\n              v-for=\"(group) in groupedDates\"\n              :key=\"group.monthYear\"\n            >\n              <div\n                :class=\"$style.monthHeader\"\n                :style=\"{\n                  left: `${group.startIndex * cellWidth}px`,\n                  width: `${group.dates.length * cellWidth}px`\n                }\"\n              >\n                {{ group.month }} {{ group.year }}\n              </div>\n            </template>\n          </div>\n\n          <!-- Date row -->\n          <div :class=\"$style.dateRow\">\n            <div\n              v-for=\"date in dateRange\"\n              :key=\"date.toISO()\"\n              :class=\"{\n                [$style.dateHeader]: true,\n                [$style.currentDate]: date.hasSame(currentDateTime, 'day')\n              }\"\n            >\n              {{ date.day }}\n            </div>\n          </div>\n        </div>\n\n        <!-- Records -->\n        <div :class=\"$style.timelineRecords\">\n          <div\n            v-for=\"record in records\"\n            :key=\"record.id\"\n            :class=\"$style.recordGroup\"\n          >\n            <!-- Parent record dates -->\n            <GanttChartDateCell\n              :start-date=\"record.startDate\"\n              :end-date=\"record.endDate\"\n              :date-range=\"dateRange\"\n              :cell-width=\"cellWidth\"\n              @click=\"$emit('record-date-click', {record, startDate: record.startDate, endDate: record.endDate})\"\n            />\n            <!-- Sub-record dates -->\n            <template v-if=\"expandedItems[record.id || index]\">\n              <GanttChartDateCell\n                v-for=\"subRecord in record.subDates\"\n                :key=\"subRecord.id\"\n                :dates=\"subRecord.dates\"\n                :date-range=\"dateRange\"\n                :cell-width=\"cellWidth\"\n                is-sub-row\n                @click=\"$emit('sub-record-date-click', {record: subRecord, parent: record, date: $event.date})\"\n              />\n            </template>\n          </div>\n        </div>\n\n        <!-- Current date indicator -->\n        <div\n          test-id=\"currentDateLine\"\n          :class=\"$style.currentDateLine\"\n          :style=\"{\n            left: `${currentDatePosition * cellWidth + (cellWidth / 2)}px`\n          }\"\n        />\n      </div>\n    </div>\n    <ActionButton\n      icon=\"history\"\n      :class=\"$style.resetButton\"\n      @click=\"scrollToCurrentDate()\"\n    />\n\n    <div\n      v-if=\"isLoading\"\n      test-id=\"loadingContainer\"\n      :class=\"$style.loadingContainer\"\n    >\n      <Spinner is-block />\n    </div>\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.timelineWrapper {\n  display: grid;\n  grid-template-columns: 300px 1fr;\n  border: 1px solid var(--color-ghost);\n  background-color: var(--bg-input);\n  width: 100%;\n  position: relative;\n}\n\n.resetButton {\n  position: absolute;\n  top: 0;\n  right: 2px;\n  z-index: 1;\n}\n\n.namesColumn {\n  background: var(--bg-input);\n  border-right: 1px solid var(--color-borders-light);\n  overflow-y: auto;\n  scrollbar-width: none;\n  position: relative;\n}\n\n.namesHeader {\n  height: 74px;\n  padding: 1rem;\n  font-weight: 600;\n  border-bottom: 1px solid var(--color-ghost);\n  display: flex;\n  align-items: center;\n  background: var(--color-ghost);\n  position: sticky;\n  top: 0;\n  z-index: 1;\n}\n\n.timelineContainer {\n  overflow: auto;\n  position: relative;\n  width: 100%;\n  background-color: var(--bg-input);\n}\n\n.timelineContent {\n  position: relative;\n  min-height: 100%;\n}\n\n.timelineHeaders {\n  position: sticky;\n  top: 0;\n  z-index: 1;\n  border-bottom: 1px solid var(--color-ghost);\n}\n\n.monthRow {\n  position: relative;\n  height: 36px;\n  background: var(--bg-input);\n}\n\n.monthSeparator {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  width: 1px;\n  background-color: var(--bg-overlays);\n  z-index: 1;\n  pointer-events: none;\n}\n\n.monthHeader {\n  position: absolute;\n  top: 0;\n  height: 100%;\n  padding: 8px 16px;\n  background: var(--color-ghost);\n  text-align: left;\n  white-space: nowrap;\n  display: flex;\n  align-items: center;\n  color: var(--color-text-muted);\n  text-transform: uppercase;\n  font-weight: 500;\n  letter-spacing: 0.025em;\n  font-size: 0.75rem;\n}\n\n.dateRow {\n  display: flex;\n  position: relative;\n  background: var(--color-ghost);\n}\n\n.dateHeader {\n  flex: 0 0 v-bind('cellWidth + \"px\"');\n  text-align: center;\n  padding: 8px;\n  font-size: 0.875rem;\n  color: var(--color-text-muted);\n}\n\n.currentDate {\n  background-color: var(--bg-highlight-hover);\n  font-weight: 600;\n  border-radius: 4px;\n  color: var(--bg-primary);\n}\n\n.timelineRecords {\n  position: relative;\n}\n\n.recordGroup {\n  display: flex;\n  flex-direction: column;\n  row-gap: 5px;\n  padding: 0.25rem;\n  border-bottom: 2px solid var(--color-ghost);\n}\n\n.currentDateLine {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  width: 2px;\n  height: 100%;\n  background-color: var(--bg-primary);\n  pointer-events: none;\n}\n\n.loadingContainer {\n  grid-column: 1 / -1;\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\nimport {User} from '@/models/user.model.js'\n\n/**\n * Schedule creators API service\n */\nexport class ScheduleCreatorsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/distribution_creators'\n  itemsKey = 'creators'\n  ModelClass = User\n}\n\n//Export singleton instance\nexport const scheduleCreatorsApi = new ScheduleCreatorsApi()\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport LearnerSelectInput from '@/components/shared/form/LearnerSelectInput.vue'\nimport CohortSelectInput from '@/components/shared/form/CohortSelectInput.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport {scheduleStatusOptions, scheduleStatuses} from '@/constants/schedules.js'\nimport {convertToOptions} from '@/helpers/options.js'\nimport {commonChannelsApi} from '@/api/common-channels.api.js'\nimport {scheduleCreatorsApi} from '@/api/schedule-creators.api.js'\nimport {courseFilterTypeOptions, courseFilterTypes} from '@/constants/courses.js'\nimport {onMounted, computed, ref, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\nconst props = defineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n  isCalendar: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {isCalendar} = toRefs(props)\nconst learners = ref([])\n\n//Restrict options depending on view\nconst courseContentTypeOptions = computed(() => courseFilterTypeOptions.filter(option =>  option.value !== courseFilterTypes.FOLDERS))\nconst scheduleStatusFilteredOptions = computed(() => {\n  if (!isCalendar.value) {\n    return scheduleStatusOptions\n  }\n  return scheduleStatusOptions.filter(option => [\n    scheduleStatuses.ACTIVE,\n    scheduleStatuses.SCHEDULED,\n  ].includes(option.value))\n})\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => {\n  learners.value = []\n  emit('reset-filter')\n}\n\n//Channel options and loader\nconst channelOptions = ref([])\nconst loadChannels = async () => {\n  const data = await commonChannelsApi.query()\n  channelOptions.value = convertToOptions(data.channels)\n}\n\n//Creators handling\nconst creators = ref([])\nconst loadCreators = async () => {\n  const data = await scheduleCreatorsApi.query()\n  creators.value = data.creators\n}\n\n//Learner select handler\nconst handleLearnerSelect = event => {\n  learners.value = event.options\n  changeFilter('individualIds', event.value)\n}\n\n//Load channels and creators\nonMounted(() => {\n  loadChannels()\n  loadCreators()\n})\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    test-id=\"scheduleFiltersDropdown\"\n    :class=\"$style.dropdown\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Status\">\n      <PillButtonList\n        :value=\"activeFilter.status\"\n        :options=\"scheduleStatusFilteredOptions\"\n        can-reset\n        @input=\"changeFilter('status', $event.value)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"channelOptions.length > 0\"\n      label=\"Channels\"\n    >\n      <PillButtonList\n        :value=\"activeFilter.channelIds\"\n        :options=\"channelOptions\"\n        is-multi-select\n        can-reset\n        @input=\"changeFilter('channelIds', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Content\">\n      <PillButtonList\n        :value=\"activeFilter.contentType\"\n        :options=\"courseContentTypeOptions\"\n        can-reset\n        @input=\"changeFilter('contentType', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Cohorts\">\n      <CohortSelectInput\n        :value=\"activeFilter.cohortIds\"\n        is-multi-select\n        auto-load\n        test-id=\"cohorts\"\n        @input=\"changeFilter('cohortIds', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Learners\">\n      <LearnerSelectInput\n        is-multi-select\n        position=\"top\"\n        test-id=\"learnerSelect\"\n        :value=\"learners\"\n        :max=\"5\"\n        @input=\"handleLearnerSelect($event)\"\n      />\n    </FormField>\n\n    <FormField\n      v-if=\"creators.length > 0\"\n      label=\"Created by\"\n    >\n      <SelectInput\n        :value=\"activeFilter.createdBy\"\n        :options=\"creators\"\n        label-prop=\"displayName\"\n        value-prop=\"id\"\n        position=\"top\"\n        test-id=\"scheduleCreatorFilter\"\n        is-clearable\n        @input=\"changeFilter('createdBy', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Other\">\n      <Toggle\n        label=\"With active enrollments\"\n        :is-checked=\"activeFilter.withActiveEnrollments\"\n        @click=\"changeFilter('withActiveEnrollments', !activeFilter.withActiveEnrollments)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n\n<style module lang=\"scss\">\n.dropdown {\n  width: 40vw;\n}\n</style>\n","<script setup>\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport CustomScheduleModal from '@/components/schedules/CustomScheduleModal.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport SummaryBlock from '@/components/shared/page/SummaryBlock.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {enrollmentsApi} from '@/api/enrollments.api.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {toRefs, ref, onMounted} from 'vue'\n\n//Emits and Props\ndefineEmits([\n  'close',\n])\nconst props = defineProps({\n  scheduleId: {\n    type: String,\n    required: true,\n  },\n})\n\n//Get refs\nconst {scheduleId} = toRefs(props)\n\n//Composables\nconst {goToScheduleDelivery, goToEditSchedule} = useNavigation()\n\n//Refs\nconst isLoading = ref(true)\nconst schedule = ref(null)\nconst totalEnrollmentCount = ref(0)\nconst activeEnrollmentCount = ref(0)\n\n//Methods\nconst loadScheduleData = async () => {\n  try {\n    const [\n      scheduleResponse,\n      enrollmentCounts,\n    ] = await Promise.all([\n      schedulesApi.findById(scheduleId.value),\n      enrollmentsApi.count({distributionId: scheduleId.value}),\n    ])\n    schedule.value = scheduleResponse\n    totalEnrollmentCount.value = enrollmentCounts.total\n    activeEnrollmentCount.value = enrollmentCounts.active\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\nconst {\n  isValue: isShowingScheduleCadenceModal,\n  setTrue: showScheduleCadenceModal,\n  setFalse: hideScheduleCadenceModal,\n} = useValueToggle()\n\n//Lifecycle\nonMounted(loadScheduleData)\n</script>\n\n<template>\n  <SidePanel\n    test-id=\"schedulePanel\"\n    is-centered\n    limited-width\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Schedule Details\"\n        icon=\"calendar_month\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <Spinner\n      v-if=\"isLoading\"\n      is-block\n    />\n    <PageBlock v-else>\n      <template #header>\n        <PageBlockHeader\n          is-clickable\n          @click=\"goToScheduleDelivery(schedule.id)\"\n        >\n          <template #headerText>\n            {{ schedule.name }}\n          </template>\n          <template #subheaderText>\n            {{ schedule.courseName }}\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <Alert\n        v-if=\"schedule.isConcluded\"\n        :text=\"`Schedule concluded: This schedule concluded on ${schedule.concludedOn}`\"\n      />\n\n      <SummaryBlock label=\"Cadence\">\n        <TextLink\n          v-if=\"schedule.isCustomByStep || schedule.isRelativeByStep\"\n          :text=\"schedule.currentCadence\"\n          is-clickable\n          @click=\"showScheduleCadenceModal()\"\n        />\n        <template v-else>\n          {{ schedule.currentCadence }}\n        </template>\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Delivery methods\">\n        <AddressType\n          :type=\"schedule.enabledAddressTypes\"\n          show-other\n          show-unknown\n        />\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.startDate\"\n        label=\"Start date\"\n      >\n        <DateTime :date=\"schedule.startDate\" />\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Timezone\">\n        {{ schedule.timezone }}\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.channelName\"\n        label=\"Channel\"\n      >\n        {{ schedule.channelName }}\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Enrolled\">\n        {{ totalEnrollmentCount }}\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Active\">\n        {{ activeEnrollmentCount }}\n      </SummaryBlock>\n    </PageBlock>\n  </SidePanel>\n  <CustomScheduleModal\n    :is-open=\"isShowingScheduleCadenceModal\"\n    :schedule=\"schedule\"\n    @close=\"hideScheduleCadenceModal()\"\n    @edit=\"goToEditSchedule(schedule.id)\"\n  />\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {CourseStep} from '@/models/course-step.model.js'\n\n/**\n * Steps API service\n */\nexport class CourseSteps extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/steps'\n  itemKey = 'step'\n  itemsKey = 'steps'\n  ModelClass = CourseStep\n}\n\n//Export singleton instance\nexport const courseStepsApi = new CourseSteps()\n","<script setup>\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport SummaryBlock from '@/components/shared/page/SummaryBlock.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport CustomScheduleModal from '@/components/schedules/CustomScheduleModal.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport DateTimeComponent from '@/components/shared/transform/DateTime.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {enrollmentsApi} from '@/api/enrollments.api.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {courseStepsApi} from '@/api/course-steps.api.js'\nimport {DateTime} from 'luxon'\nimport {toRefs, ref, onMounted, computed} from 'vue'\n\n//Emits and Props\ndefineEmits([\n  'close',\n])\nconst props = defineProps({\n  cohortId: {\n    type: String,\n    required: true,\n  },\n  scheduleId: {\n    type: String,\n    required: true,\n  },\n  date: {\n    type: String,\n    required: true,\n  },\n})\n\nconst {\n  isValue: isShowingScheduleCadenceModal,\n  setTrue: showScheduleCadenceModal,\n  setFalse: hideScheduleCadenceModal,\n} = useValueToggle()\n\n//Get refs\nconst {cohortId, scheduleId, date} = toRefs(props)\n\n//Composables\nconst {goToScheduleDelivery, goToEditSchedule} = useNavigation()\n\n//Refs\nconst isLoading = ref(true)\nconst cohort = ref(null)\nconst schedule = ref(null)\nconst totalEnrollmentCount = ref(0)\nconst activeEnrollmentCount = ref(0)\nconst lessons = ref([])\n\n//Get timezone\nconst {timezone} = useCurrentUser()\n\nconst isPastDate = (date) => {\n  const dateTime = DateTime.fromISO(date).startOf('day')\n\n  if (!dateTime.isValid) {\n    throw new Error(`Invalid date: ${date}`)\n  }\n\n  const today = DateTime.now().setZone(timezone.value).startOf('day')\n  return dateTime < today\n}\n\nconst lessonHeader = computed(() => {\n  return isPastDate(date.value) ? 'Lessons sent this day' : 'Lessons sending this day'\n})\n\n//Methods\nconst loadData = async () => {\n  try {\n    const [\n      cohortResponse,\n      scheduleResponse,\n      enrollmentCounts,\n      lessonsResponse,\n    ] = await Promise.all([\n      cohortsApi.findById(cohortId.value),\n      schedulesApi.findById(scheduleId.value),\n      enrollmentsApi.count({cohortId: cohortId.value, distributionId: scheduleId.value}),\n      courseStepsApi.query({date: date.value, cohortId: cohortId.value, distributionId: scheduleId.value, states: ['active', 'not_engaged', 'scheduled'], isLessons: true}),\n    ])\n    cohort.value = cohortResponse\n    schedule.value = scheduleResponse\n    totalEnrollmentCount.value = enrollmentCounts.total\n    activeEnrollmentCount.value = enrollmentCounts.active\n    lessons.value = lessonsResponse.items\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Lifecycle\nonMounted(loadData)\n</script>\n\n<template>\n  <SidePanel\n    test-id=\"cohortPanel\"\n    is-centered\n    limited-width\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Cohort Schedule Details\"\n        icon=\"groups\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <Spinner\n      v-if=\"isLoading\"\n      is-block\n    />\n    <PageBlock v-else>\n      <template #header>\n        <PageBlockHeader\n          is-clickable\n          @click=\"goToScheduleDelivery(schedule.id)\"\n        >\n          <template #headerText>\n            {{ cohort.name }}\n          </template>\n          <template #subheaderText>\n            {{ schedule.courseName }} - {{ schedule.name }}\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <SummaryBlock label=\"Cadence\">\n        <TextLink\n          v-if=\"schedule.isScheduledByStep\"\n          :text=\"schedule.currentCadence\"\n          is-clickable\n          @click=\"showScheduleCadenceModal()\"\n        />\n        <template v-else>\n          {{ schedule.currentCadence }}\n        </template>\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Delivery methods\">\n        <AddressType\n          :type=\"schedule.enabledAddressTypes\"\n          show-other\n          show-unknown\n        />\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.startDate\"\n        label=\"Start date\"\n      >\n        <DateTimeComponent :date=\"schedule.startDate\" />\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Delivery date\">\n        <DateTimeComponent :date=\"date\" />\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Timezone\">\n        {{ schedule.timezone }}\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.channelName\"\n        label=\"Channel\"\n      >\n        {{ schedule.channelName }}\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Enrolled\">\n        {{ totalEnrollmentCount }}\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Active\">\n        {{ activeEnrollmentCount }}\n      </SummaryBlock>\n\n      <SummaryBlock :label=\"lessonHeader\">\n        <p\n          v-for=\"lesson in lessons\"\n          :key=\"lesson.id\"\n        >\n          {{ lesson.name }}\n        </p>\n      </SummaryBlock>\n    </PageBlock>\n  </SidePanel>\n  <CustomScheduleModal\n    :is-open=\"isShowingScheduleCadenceModal\"\n    :schedule=\"schedule\"\n    @close=\"hideScheduleCadenceModal()\"\n    @edit=\"goToEditSchedule(scheduleId)\"\n  />\n</template>\n","<script setup>\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport SummaryBlock from '@/components/shared/page/SummaryBlock.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport CustomScheduleModal from '@/components/schedules/CustomScheduleModal.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport AddressType from '@/components/shared/transform/AddressType.vue'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {enrollmentStatusOptions} from '@/constants/enrollments.js'\nimport {enrollmentsApi} from '@/api/enrollments.api.js'\nimport {courseStepsApi} from '@/api/course-steps.api.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {DateTime as DateTimeLuxon} from 'luxon'\nimport {toRefs, ref, onMounted, computed} from 'vue'\n\n//Emits and Props\ndefineEmits([\n  'close',\n])\nconst props = defineProps({\n  enrollmentId: {\n    type: String,\n    required: true,\n  },\n  scheduleId: {\n    type: String,\n    required: true,\n  },\n  date: {\n    type: String,\n    required: true,\n  },\n})\n\n//Get refs\nconst {enrollmentId, scheduleId, date} = toRefs(props)\n\n//Composables\nconst {goToScheduleDelivery, goToEditSchedule} = useNavigation()\n\n//Get timezone\nconst {timezone} = useCurrentUser()\n\n//Refs\nconst isLoading = ref(true)\nconst enrollment = ref(null)\nconst schedule = ref(null)\nconst lessons = ref([])\n\nconst {\n  isValue: isShowingScheduleCadenceModal,\n  setTrue: showScheduleCadenceModal,\n  setFalse: hideScheduleCadenceModal,\n} = useValueToggle()\n\nconst isPastDate = (date) => {\n  const dateTime = DateTimeLuxon.fromISO(date).startOf('day')\n\n  if (!dateTime.isValid) {\n    throw new Error(`Invalid date: ${date}`)\n  }\n\n  const today = DateTimeLuxon.now().setZone(timezone.value).startOf('day')\n  return dateTime < today\n}\n\nconst lessonHeader = computed(() => {\n  return isPastDate(date.value) ? 'Lessons sent this day' : 'Lessons sending this day'\n})\nconst enrollmentState = computed(() => {\n  return enrollmentStatusOptions.find(option => option.value === enrollment.value.state).label\n})\n\n//Methods\nconst loadData = async () => {\n  try {\n    const [\n      enrollmentResponse,\n      lessonsResponse,\n      scheduleResponse,\n    ] = await Promise.all([\n      enrollmentsApi.findById(enrollmentId.value),\n      courseStepsApi.query({date: date.value, enrollmentId: enrollmentId.value, distributionId: scheduleId.value, isLessons: true}),\n      schedulesApi.findById(scheduleId.value),\n    ])\n    enrollment.value = enrollmentResponse\n    schedule.value = scheduleResponse\n    lessons.value = lessonsResponse.items\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Lifecycle\nonMounted(loadData)\n</script>\n\n<template>\n  <SidePanel\n    test-id=\"enrollmentPanel\"\n    is-centered\n    limited-width\n    @close=\"$emit('close')\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"Enrollment Schedule Details\"\n        icon=\"groups\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <Spinner\n      v-if=\"isLoading\"\n      is-block\n    />\n    <PageBlock v-else>\n      <template #header>\n        <PageBlockHeader\n          is-clickable\n          @click=\"goToScheduleDelivery(schedule.id)\"\n        >\n          <template #headerText>\n            {{ enrollment.userName }}\n          </template>\n          <template #subheaderText>\n            {{ schedule.courseName }} - {{ schedule.name }}\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <SummaryBlock label=\"Cadence\">\n        <TextLink\n          v-if=\"schedule.isScheduledByStep\"\n          :text=\"schedule.currentCadence\"\n          is-clickable\n          @click=\"showScheduleCadenceModal()\"\n        />\n        <template v-else>\n          {{ schedule.currentCadence }}\n        </template>\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Delivery method\">\n        <AddressType\n          :type=\"enrollment.addressType\"\n          show-other\n          show-unknown\n        />\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.startDate\"\n        label=\"Start date\"\n      >\n        <DateTime :date=\"schedule.startDate\" />\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Delivery date\">\n        <DateTime :date=\"date\" />\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Timezone\">\n        {{ enrollment.timezone }}\n      </SummaryBlock>\n\n      <SummaryBlock\n        v-if=\"schedule.channelName\"\n        label=\"Channel\"\n      >\n        {{ schedule.channelName }}\n      </SummaryBlock>\n\n      <SummaryBlock label=\"Status\">\n        {{ enrollmentState }}\n      </SummaryBlock>\n\n      <SummaryBlock :label=\"lessonHeader\">\n        <p\n          v-for=\"lesson in lessons\"\n          :key=\"lesson.id\"\n        >\n          {{ lesson.name }}\n        </p>\n      </SummaryBlock>\n    </PageBlock>\n  </SidePanel>\n  <CustomScheduleModal\n    :is-open=\"isShowingScheduleCadenceModal\"\n    :schedule=\"schedule\"\n    @close=\"hideScheduleCadenceModal()\"\n    @edit=\"goToEditSchedule(scheduleId)\"\n  />\n</template>\n","<script setup>\nimport GanttChart from '@/components/shared/chart/GanttChart.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport SchedulesFilter from '@/components/schedules/SchedulesFilter.vue'\nimport ScheduleViewPanel from '@/components/schedules/ScheduleViewPanel.vue'\nimport CohortScheduleViewPanel from '@/components/cohorts/CohortScheduleViewPanel.vue'\nimport EnrollmentScheduleViewPanel from '@/components/enrollments/EnrollmentScheduleViewPanel.vue'\nimport {useSearch} from '@/composables/use-search.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {watch, ref, onMounted} from 'vue'\n\n//Emits\nconst emit = defineEmits([\n  'total-schedules-changed',\n  'search-term-changed',\n])\n\n//Routing\nconst {queryParams} = useRouting()\n\n//Navigation\nconst {goToEditSchedule} = useNavigation()\n\nconst selectedScheduleId = ref(null)\nconst selectedCohortId = ref(null)\nconst selectedDate = ref(null)\nconst selectedEnrollmentId = ref(null)\n\n//Show schedule details\nconst {\n  isValue: isShowingScheduleDetails,\n  setTrue: showScheduleDetails,\n  setFalse: hideScheduleDetails,\n} = useValueToggle()\n\n//Show cohort schedule details\nconst {\n  isValue: isShowingCohortScheduleDetails,\n  setTrue: showCohortScheduleDetails,\n  setFalse: hideCohortScheduleDetails,\n} = useValueToggle()\n\n//Show enrollment schedule details\nconst {\n  isValue: isShowingEnrollmentScheduleDetails,\n  setTrue: showEnrollmentScheduleDetails,\n  setFalse: hideEnrollmentScheduleDetails,\n} = useValueToggle()\n\n//Querying\nconst {\n  items: schedules,\n  queryItems: querySchedules,\n  loadItemsBatched: loadSchedules,\n  total: totalSchedules,\n  hasLoadedItems: hasLoadedSchedules,\n  isLoadingMoreItems: isLoadingMoreSchedules,\n  isLoadingItems: isLoadingSchedules,\n  sort,\n  filter,\n  numActiveFilters,\n  changeSort,\n  changeSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => schedulesApi.query(...args),\n  filter: {\n    isCalendar: true,\n    courseId: queryParams.value.courseId || null,\n    cohortId: queryParams.value.cohortId || null,\n    cohortIds: [],\n    individualIds: [],\n    channelIds: [],\n    contentType: null,\n    status: null,\n  },\n  sort: '-updatedAt',\n  key: 'schedulesOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => querySchedules({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Watch header data\nwatch([totalSchedules, hasLoadedSchedules], () => emit('total-schedules-changed', {value: totalSchedules.value}))\nwatch(searchTerm, () => emit('search-term-changed', {value: searchTerm.value}))\n\n//Handle record name click\nconst handleRecordDateClick = record => {\n  selectedScheduleId.value = record.id\n  showScheduleDetails()\n}\n\nconst handleSubRecordDateClick = async event => {\n  selectedDate.value = event.date\n\n  if (event.record.type === 'cohort') {\n    selectedCohortId.value = event.record.id\n    selectedScheduleId.value = event.parent.id\n    showCohortScheduleDetails()\n  }\n  else {\n    selectedEnrollmentId.value = event.record.id\n    selectedScheduleId.value = event.parent.id\n    showEnrollmentScheduleDetails()\n  }\n}\n\n//Load schedules\nonMounted(loadSchedules)\n</script>\n\n<template>\n  <OverviewTableHeader>\n    <template #search>\n      <SearchPanel\n        :search-results=\"partialSearchResults\"\n        :search-term=\"searchTerm\"\n        @clear-search=\"clearSearch()\"\n        @full-search=\"fullSearch($event.searchTerm)\"\n        @partial-search=\"partialSearch($event.searchTerm)\"\n        @select-result=\"goToEditSchedule($event.result.id)\"\n      />\n    </template>\n    <template #filters>\n      <SchedulesFilter\n        is-calendar\n        :active-filter=\"filter\"\n        :num-active-filters=\"numActiveFilters\"\n        @change-filter=\"changeFilter($event.value)\"\n        @reset-filter=\"resetFilter()\"\n      />\n    </template>\n  </OverviewTableHeader>\n\n  <GanttChart\n    :records=\"schedules\"\n    :is-loading=\"isLoadingMoreSchedules || isLoadingSchedules\"\n    @record-date-click=\"handleRecordDateClick($event.record)\"\n    @sub-record-date-click=\"handleSubRecordDateClick($event)\"\n  >\n    <template #header>\n      <TableHeaderCell\n        is-sortable\n        sort-prop=\"name\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Name\n      </TableHeaderCell>\n    </template>\n  </GanttChart>\n  <ScheduleViewPanel\n    v-if=\"isShowingScheduleDetails\"\n    :schedule-id=\"selectedScheduleId\"\n    @close=\"hideScheduleDetails()\"\n  />\n  <CohortScheduleViewPanel\n    v-if=\"isShowingCohortScheduleDetails\"\n    :cohort-id=\"selectedCohortId\"\n    :schedule-id=\"selectedScheduleId\"\n    :date=\"selectedDate\"\n    @close=\"hideCohortScheduleDetails()\"\n  />\n  <EnrollmentScheduleViewPanel\n    v-if=\"isShowingEnrollmentScheduleDetails\"\n    :enrollment-id=\"selectedEnrollmentId\"\n    :schedule-id=\"selectedScheduleId\"\n    :date=\"selectedDate\"\n    @close=\"hideEnrollmentScheduleDetails()\"\n  />\n</template>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  schedules: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {schedules} = toRefs(props)\nconst isSingle = computed(() => schedules.value.length === 1)\nconst single = computed(() => schedules.value[0])\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete schedule${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {schedule})\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        the schedule \"<strong>{{ single.name }}</strong>\" for the course \"<strong>{{ single.courseName }}</strong>\"?\n      </span>\n      <span v-else>\n        the {{ schedules.length }} selected schedules?\n      </span>\n    </p>\n  </ConfirmationModal>\n</template>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport {Schedule} from '@/models/schedule.model.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\n\n//Emits and props\ndefineEmits([\n  'duplicate',\n  'remove',\n])\ndefineProps({\n  schedule: {\n    type: Schedule,\n    required: true,\n  },\n})\n\n//Navigation\nconst {\n  goToEditSchedule,\n  goToAnalyzeSchedule,\n  goToScheduleDelivery,\n  goToScheduleEnrollment,\n} = useNavigation()\n\n//Permissions\nconst {\n  canManageInteractions,\n} = useCurrentUser()\n</script>\n\n<template>\n  <ActionsDropdownMenu\n    v-if=\"schedule.canReadWrite\"\n    v-bind=\"$attrs\"\n  >\n    <DropdownMenuItem\n      label=\"Track delivery\"\n      @click=\"goToScheduleDelivery(schedule.id, $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Enroll\"\n      @click=\"goToScheduleEnrollment(schedule.id, $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"canManageInteractions\"\n      :is-disabled=\"schedule.enrolledLearnerCount === 0\"\n      label=\"Analyze\"\n      @click=\"goToAnalyzeSchedule(schedule.id, $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Edit\"\n      @click=\"goToEditSchedule(schedule.id, $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Duplicate\"\n      @click=\"$emit('duplicate', $event)\"\n    />\n    <DropdownMenuItem\n      label=\"Delete\"\n      @click=\"$emit('remove', $event)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","<script setup>\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport {DateTime} from 'luxon'\nimport {formatDate} from '@/helpers/date-and-time.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\nimport {componentColors} from '@/constants/components.js'\nimport {scheduleStatuses, scheduleStatusOptions} from '@/constants/schedules.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  status: {\n    type: String,\n    required: true,\n  },\n  createdAt: {\n    type: [String, DateTime],\n    default: '',\n  },\n  concludedAt: {\n    type: [String, DateTime],\n    default: '',\n  },\n  disabledAt: {\n    type: [String, DateTime],\n    default: '',\n  },\n  launchDate: {\n    type: [String, DateTime],\n    default: '',\n  },\n})\n\n//Get props\nconst {status, createdAt, disabledAt, concludedAt, launchDate} = toRefs(props)\n\n//Get timezone and create date formatting wrapper for tooltip text\nconst {timezone} = useTimezone()\nconst format = date =>\n  formatDate(date, dateFormats.DATE_AND_TIME, timezone.value)\n    .replace(', 12:00 AM', '')\n\n//Determine tooltip\nconst tooltip = computed(() => {\n  switch (status.value) {\n    case scheduleStatuses.NEW_DUPLICATE:\n      if (createdAt.value) {\n        return `Schedule created on ${format(createdAt.value)}. Please review the schedule and enroll learners to set this live.`\n      }\n      return 'New schedule. Please review the schedule and enroll learners to set this live.'\n    case scheduleStatuses.CONCLUDED:\n      if (concludedAt.value) {\n        return `Final lesson was sent on ${format(concludedAt.value)}.`\n      }\n      return `Final lesson was sent`\n    case scheduleStatuses.DISABLED:\n      if (disabledAt.value) {\n        return `Disabled on ${format(disabledAt.value)}.`\n      }\n      return ''\n    case scheduleStatuses.SCHEDULED:\n      if (launchDate.value) {\n        return `Scheduled for ${format(launchDate.value)}.`\n      }\n      return ''\n    case scheduleStatuses.ACTIVE:\n      if (launchDate.value) {\n        return `Launched on ${format(launchDate.value)}.`\n      }\n      return ''\n    default:\n      return ''\n  }\n})\n\n//Determine color\nconst color = computed(() => {\n  switch (status.value) {\n    case scheduleStatuses.NEW_DUPLICATE:\n      return componentColors.INFO\n    case scheduleStatuses.DISABLED:\n      return componentColors.DANGER\n    case scheduleStatuses.SCHEDULED:\n      return componentColors.WARNING\n    case scheduleStatuses.ACTIVE:\n      return componentColors.SUCCESS\n    case scheduleStatuses.CONCLUDED:\n    default:\n      return ''\n  }\n})\n</script>\n\n<template>\n  <Tooltip\n    :text=\"tooltip\"\n    is-compact\n  >\n    <StatusBadge\n      :color=\"color\"\n      icon=\"circle\"\n    >\n      <LabelValue\n        :options=\"scheduleStatusOptions\"\n        :value=\"status\"\n      />\n    </StatusBadge>\n  </tooltip>\n</template>\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\n\n/**\n * Schedule removal wrapper composable\n */\nexport function useScheduleRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: schedulesToRemove,\n    numItemsToRemove: numSchedulesToRemove,\n    hasItemsToRemove: hasSchedulesToRemove,\n    isRemovingItems: isRemovingSchedules,\n    setItemsToRemove: setSchedulesToRemove,\n    clearItemsToRemove: clearSchedulesToRemove,\n    removeItems: removeSchedules,\n  } = useItemRemoval({\n    noun: 'schedule',\n    removeById: id => schedulesApi.removeById(id),\n    removeManyById: ids => schedulesApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    schedulesToRemove,\n    numSchedulesToRemove,\n    hasSchedulesToRemove,\n    isRemovingSchedules,\n    setSchedulesToRemove,\n    clearSchedulesToRemove,\n    removeSchedules,\n  }\n}\n","import {schedulesApi} from '@/api/schedules.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Schedule duplication composable\n */\nexport function useScheduleDuplication() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isDuplicatingSchedule = ref(false)\n\n  //Duplicate schedule\n  const duplicateSchedule = async schedule => {\n\n    //Toggle flag\n    isDuplicatingSchedule.value = true\n\n    //Create\n    try {\n      const copy = await schedulesApi.duplicateById(schedule.id)\n      setFlashSuccess('Schedule duplicated')\n      return copy\n    }\n    catch (error) {\n      setFlashFailure('Failed to duplicate schedule')\n      processError(error)\n      throw error\n    }\n    finally {\n      isDuplicatingSchedule.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    isDuplicatingSchedule,\n    duplicateSchedule,\n  }\n}\n","<script setup>\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport ErrorIcon from '@/components/shared/icons/ErrorIcon.vue'\nimport WarningIcon from '@/components/shared/icons/WarningIcon.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport DateTime from '@/components/shared/transform/DateTime.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport ConfirmScheduleRemovalModal from '@/components/schedules/ConfirmScheduleRemovalModal.vue'\nimport CustomScheduleModal from '@/components/schedules/CustomScheduleModal.vue'\nimport ScheduleActionsMenu from '@/components/schedules/ScheduleActionsMenu.vue'\nimport SchedulesFilter from '@/components/schedules/SchedulesFilter.vue'\nimport ScheduleStatus from '@/components/schedules/ScheduleStatus.vue'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useScheduleRemoval} from '@/composables/use-schedule-removal.js'\nimport {useScheduleDuplication} from '@/composables/use-schedule-duplication.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {ref, watch, onMounted} from 'vue'\n\n//Emits\nconst emit = defineEmits([\n  'total-schedules-changed',\n  'search-term-changed',\n])\n\n//Routing and navigation\nconst {queryParams} = useRouting()\nconst {goToEditSchedule} = useNavigation()\n\n//Querying\nconst {\n  items: schedules,\n  total: totalSchedules,\n  queryItems: querySchedules,\n  loadItems: loadSchedules,\n  loadItemsForPage: loadSchedulesForPage,\n  reloadItems: reloadSchedules,\n  isLoadingItems: isLoadingSchedules,\n  sort,\n  filter,\n  numActiveFilters,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => schedulesApi.query(...args),\n  filter: {\n    courseId: queryParams.value.courseId || null,\n    cohortId: queryParams.value.cohortId || null,\n    cohortIds: [],\n    individualIds: [],\n    channelIds: [],\n    contentType: null,\n    status: null,\n    withActiveEnrollments: false,\n  },\n  sort: '-updatedAt',\n  key: 'schedulesOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => querySchedules({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Schedule removal\nconst {\n  schedulesToRemove,\n  hasSchedulesToRemove,\n  isRemovingSchedules,\n  setSchedulesToRemove,\n  clearSchedulesToRemove,\n  removeSchedules,\n} = useScheduleRemoval()\n\n//Schedule removal handling\nconst cancelScheduleRemoval = () => {\n  clearSchedulesToRemove()\n}\nconst confirmScheduleRemoval = async () => {\n  try {\n    await removeSchedules()\n    reloadSchedules()\n    cancelScheduleRemoval()\n  }\n  catch {\n    //Handled by useScheduleRemoval\n  }\n}\n\n//Schedule duplication\nconst {duplicateSchedule} = useScheduleDuplication()\nconst confirmScheduleDuplication = async schedule => {\n  try {\n    await duplicateSchedule(schedule)\n    reloadSchedules()\n  }\n  catch {\n    //Handled by useScheduleDuplication\n  }\n}\n//Custom schedule modal\nconst customScheduleToShow = ref(null)\nconst {\n  isValue: isShowingScheduleCadenceModal,\n  setTrue: showScheduleCadenceModal,\n  setFalse: hideScheduleCadenceModal,\n} = useValueToggle()\nconst showCustomScheduleModal = schedule => {\n  customScheduleToShow.value = schedule\n  showScheduleCadenceModal()\n}\n\n//Emit total schedules and search term\nwatch(totalSchedules, () => emit('total-schedules-changed', {value: totalSchedules.value}))\nwatch(searchTerm, () => emit('search-term-changed', {value: searchTerm.value}))\n\n//Load schedules\nonMounted(loadSchedules)\n</script>\n\n<template>\n  <OverviewTableHeader>\n    <template #search>\n      <SearchPanel\n        :search-results=\"partialSearchResults\"\n        :search-term=\"searchTerm\"\n        @clear-search=\"clearSearch()\"\n        @full-search=\"fullSearch($event.searchTerm)\"\n        @partial-search=\"partialSearch($event.searchTerm)\"\n        @select-result=\"goToEditSchedule($event.result.id)\"\n      />\n    </template>\n    <template #filters>\n      <SchedulesFilter\n        :active-filter=\"filter\"\n        :num-active-filters=\"numActiveFilters\"\n        @change-filter=\"changeFilter($event.value)\"\n        @reset-filter=\"resetFilter()\"\n      />\n    </template>\n  </OverviewTableHeader>\n\n  <OverviewTable\n    :items=\"schedules\"\n    :items-per-page=\"itemsPerPage\"\n    :current-page=\"currentPage\"\n    :total-items=\"totalSchedules\"\n    :is-loading=\"isLoadingSchedules\"\n    @load-page=\"loadSchedulesForPage($event.page)\"\n    @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n  >\n    <template #headerRow>\n      <TableHeaderCell\n        :class=\"$style.status\"\n        is-sortable\n        sort-prop=\"currentStatus\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Status\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.name\"\n        is-sortable\n        sort-prop=\"name\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Name\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.channel\"\n        is-sortable\n        sort-prop=\"channelName\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Channel\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.cohorts\">\n        Cohorts\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.cadence\"\n        is-sortable\n        sort-prop=\"currentCadence\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Cadence\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.enrolled\"\n        is-sortable\n        sort-prop=\"enrolledLearnerCount\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Enrolled\n      </TableHeaderCell>\n      <TableHeaderCell\n        :class=\"$style.created\"\n        is-sortable\n        sort-prop=\"createdAt\"\n        :current-sort=\"sort\"\n        @sort=\"changeSort($event.sort)\"\n      >\n        Created\n      </TableHeaderCell>\n    </template>\n\n    <template #row=\"{item: schedule}\">\n      <TableCell :class=\"$style.status\">\n        <ScheduleStatus\n          :status=\"schedule.currentStatus\"\n          :created-at=\"schedule.createdAt\"\n          :concluded-on=\"schedule.concludedOn\"\n          :disabled-at=\"schedule.disabledAt\"\n          :launch-date=\"schedule.launchDate\"\n        />\n      </TableCell>\n      <TableCell\n        :class=\"$style.name\"\n        is-clickable\n        @click=\"goToEditSchedule(schedule.id)\"\n      >\n        <span>\n          <strong>{{ schedule.name }}</strong>\n          <br><small text-muted>{{ schedule.courseName }}</small>\n        </span>\n\n        <template #icons>\n          <Tooltip\n            v-if=\"!schedule.courseIsPassingValidations\"\n            text=\"This course contains content errors, which can impact delivery to learners. Please fix these errors to ensure all active schedules deliver properly.\"\n          >\n            <WarningIcon />\n          </Tooltip>\n          <Tooltip\n            v-if=\"!schedule.isValidByStep && !schedule.lastLessonHasBegun\"\n            text=\"New lessons have been added to your course. Please schedule them to ensure they are delivered correctly.\"\n          >\n            <ErrorIcon />\n          </Tooltip>\n          <Tooltip\n            v-else-if=\"!schedule.isConcluded && schedule.customByStepHasBegun && schedule.enrolledLearnerCount === 0\"\n            text=\"Your first lesson's delivery date has passed, but you have not enrolled learners yet. Update your schedule to enroll learners.\"\n          >\n            <WarningIcon />\n          </Tooltip>\n        </template>\n      </TableCell>\n      <TableCell :class=\"$style.channel\">\n        {{ schedule.channelName }}\n      </TableCell>\n      <TableCell :class=\"$style.cohorts\">\n        {{ schedule.cohortNames }}\n      </TableCell>\n      <TableCell :class=\"$style.cadence\">\n        <TextLink\n          v-if=\"schedule.isScheduledByStep\"\n          :text=\"schedule.currentCadence\"\n          is-clickable\n          @click=\"showCustomScheduleModal(schedule)\"\n        />\n        <template v-else>\n          {{ schedule.currentCadence }}\n        </template>\n      </TableCell>\n      <TableCell\n        :class=\"$style.enrolled\"\n        is-column\n      >\n        <span>{{ schedule.enrolledLearnerCount }}</span>\n        <small text-muted>{{ schedule.activeLearnerCount }} active</small>\n      </TableCell>\n      <TableCell\n        :class=\"$style.created\"\n        is-column\n      >\n        <span>\n          <DateTime :date=\"schedule.createdAt\" />\n        </span>\n        <small text-muted>\n          {{ schedule.createdBy?.displayName ? `by ${schedule.createdBy?.displayName}` : 'N/A' }}\n        </small>\n      </TableCell>\n    </template>\n\n    <template #itemActions=\"{item: schedule, index}\">\n      <ScheduleActionsMenu\n        :schedule=\"schedule\"\n        :test-id=\"`scheduleActionsMenu${index + 1}`\"\n        @duplicate=\"confirmScheduleDuplication(schedule)\"\n        @remove=\"setSchedulesToRemove(schedule)\"\n      />\n    </template>\n  </OverviewTable>\n\n  <CustomScheduleModal\n    :is-open=\"isShowingScheduleCadenceModal\"\n    :schedule=\"customScheduleToShow\"\n    @close=\"hideScheduleCadenceModal()\"\n    @edit=\"goToEditSchedule(customScheduleToShow.id)\"\n  />\n  <ConfirmScheduleRemovalModal\n    :schedules=\"schedulesToRemove\"\n    :is-open=\"hasSchedulesToRemove\"\n    :is-removing=\"isRemovingSchedules\"\n    @close=\"cancelScheduleRemoval()\"\n    @confirm=\"confirmScheduleRemoval()\"\n  />\n</template>\n\n<style module lang=\"scss\">\n.status {\n  flex: 0 0 8rem;\n}\n.name {\n  flex: 4;\n}\n.channel, .cohorts {\n  flex: 3;\n  max-width: 15rem;\n  display: none;\n  @media (min-width: 1140px) {\n    display: flex;\n  }\n}\n.enrolled {\n  flex: 0 0 7rem;\n  display: none;\n  @media (min-width: 800px) {\n    display: flex;\n  }\n}\n.cadence {\n  flex: 2;\n  max-width: 10rem;\n  display: none;\n  @media (min-width: 1280px) {\n    display: flex;\n  }\n}\n.created {\n  flex: 2;\n  max-width: 10rem;\n  display: none;\n  @media (min-width: 1024px) {\n    display: flex;\n  }\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\n// import ScheduleCreateFlow from '@/components/schedules/ScheduleCreateFlow.vue'\nimport SchedulesTimeline from '@/components/schedules/SchedulesTimeline.vue'\nimport SchedulesTable from '@/components/schedules/SchedulesTable.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {ref, computed} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Schedules')\n\n//Navigation\nconst {goToCreateSchedule} = useNavigation()\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n  checkTabKeyActive,\n} = useTabs([\n  {label: 'Table view', key: 'schedules'},\n  {label: 'Calendar view', key: 'calendar'},\n])\n\n//Track total schedules and search from both views for the header\nconst totalSchedules = ref(0)\nconst searchTerm = ref('')\n\n//Views\nconst isCalendarView = computed(() => checkTabKeyActive('calendar'))\nconst isSchedulesView = computed(() => checkTabKeyActive('schedules'))\n\n//Schedule creation\n// const isCreatingSchedule = ref(route.name === 'schedule-create')\n// const initScheduleCreation = () => isCreatingSchedule.value = true\n// const cancelScheduleCreation = () => isCreatingSchedule.value = false\n// const confirmScheduleCreation = () => cancelScheduleCreation()\n</script>\n\n<template>\n  <PageWrapper>\n    <PageBlock>\n      <PageBlockHeader>\n        <template\n          v-if=\"isCalendarView\"\n          #subheaderText\n        >\n          <strong text-info>\n            <Icon\n              icon=\"info\"\n              color=\"info\"\n              is-outlined\n              size=\"xs\"\n            />\n            How to use this view:</strong> By default, this view shows only Schedules with active Cohort enrollments. Completed or inactive enrollments are hidden. Use filters to view hidden schedules or see individual learner enrollments. Expand any schedule for details.\n        </template>\n        <template\n          v-if=\"searchTerm\"\n          #headerText\n        >\n          <Inflect\n            text=\"search result\"\n            :count=\"totalSchedules\"\n            include-count\n          />\n          for \"{{ searchTerm }}\"\n        </template>\n        <template\n          v-else\n          #headerText\n        >\n          <Inflect\n            text=\"schedule\"\n            :count=\"totalSchedules\"\n            include-count\n          />\n        </template>\n        <template #aside>\n          <CreateButton @click=\"goToCreateSchedule()\" />\n        </template>\n      </PageBlockHeader>\n      <TabNavigation\n        :tabs=\"tabs\"\n        :active-tab=\"activeTab\"\n        with-auto-routing\n        @change-tab=\"setActiveTab($event.tab)\"\n      />\n      <SchedulesTimeline\n        v-if=\"isCalendarView\"\n        @total-schedules-changed=\"totalSchedules = $event.value\"\n        @search-term-changed=\"searchTerm = $event.value\"\n      />\n      <SchedulesTable\n        v-else-if=\"isSchedulesView\"\n        @total-schedules-changed=\"totalSchedules = $event.value\"\n        @search-term-changed=\"searchTerm = $event.value\"\n      />\n    </PageBlock>\n\n    <!-- TODO: Enable once we're refactoring schedule creation & editing -->\n    <!-- <template #sidePanels>\n      <ScheduleCreateFlow\n        v-if=\"isCreatingSchedule\"\n        @cancel=\"cancelScheduleCreation()\"\n        @created=\"confirmScheduleCreation($event.schedule)\"\n      />\n    </template> -->\n  </PageWrapper>\n</template>\n","<script setup>\nimport {toRefs, ref, watch, onMounted, nextTick} from 'vue'\nimport {Line} from 'vue-chartjs'\nimport {Chart as ChartJS, Title, Tooltip, Legend, LineElement, LinearScale, CategoryScale, PointElement} from 'chart.js'\nChartJS.register(Title, Tooltip, Legend, LineElement, LinearScale, CategoryScale, PointElement)\n\n//Emits and props\nconst props = defineProps({\n  graphData: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Get refs\nconst {graphData} = toRefs(props)\n\n//Refs\nconst chartRef = ref(null)\nconst containerRef = ref(null)\nconst options = ref({\n  responsive: true,\n  maintainAspectRatio: false,\n  plugins: {\n    tooltip: {\n      callbacks: {\n        title: function(tooltipItems) {\n          let tooltipItem = tooltipItems[0]\n          return `${tooltipItem.label}\\n`\n        },\n        label: function(tooltipItem) {\n          let label = tooltipItem.dataset.customLabel || ''\n          let percentage = tooltipItem.dataset.percentage[tooltipItem.dataIndex] || ''\n          let value = tooltipItem.formattedValue\n          return ` ${label}: ${value}, ${percentage}%\\n`\n        },\n      },\n      backgroundColor: '#000000',\n      titleFont: {\n        size: 14,\n      },\n      titleColor: '#ffffff',\n      bodyColor: '#ffffff',\n      bodyFont: {\n        size: 12,\n      },\n      displayColors: true,\n      padding: {\n        x: 20,\n        y: 20,\n      },\n      cornerRadius: 5,\n      bodySpacing: 10,\n    },\n    legend: {\n      display: false,\n    },\n  },\n  scales: {\n    y: {\n      beginAtZero: true,\n    },\n    x: {\n      grid: {\n        display: false,\n      },\n    },\n  },\n  layout: {\n    padding: {\n      bottom: 20,\n    },\n  },\n})\n\n//Methods\nfunction renderLineChart() {\n  if (chartRef.value && chartRef.value.chart) {\n    chartRef.value.chart.update()\n  }\n}\nfunction setChartScroll() {\n  // Set the width of the graph container to allow for horizontal scrolling when there are more than 10 lessons\n  if (!containerRef.value) {\n    return\n  }\n\n  const containerWidth = containerRef.value.offsetWidth\n  const totalLabels = graphData.value.labels?.length\n\n  if (totalLabels > 10) {\n    const newWidth = containerWidth + ((totalLabels - 10) * 50)\n    containerRef.value.style.width = `${newWidth}px`\n    if (containerRef.value.parentElement) {\n      containerRef.value.parentElement.style.overflowX = 'scroll'\n      containerRef.value.parentElement.style.scrollbarWidth = 'thin'\n      containerRef.value.parentElement.style.scrollbarColor = 'lightgray lightgray'\n    }\n  }\n  else if (containerRef.value.parentElement) {\n    containerRef.value.parentElement.style.overflowX = 'hidden'\n  }\n}\n\n//Watchers\nwatch(graphData, () => {\n  nextTick(() => {\n    renderLineChart()\n  })\n}, {deep: true})\n\n//Lifecycle hooks\nonMounted(() => {\n  renderLineChart()\n  setChartScroll()\n})\n</script>\n\n<template>\n  <div ref=\"containerRef\">\n    <Line\n      ref=\"chartRef\"\n      :data=\"graphData\"\n      :options=\"options\"\n      :height=\"250\"\n    />\n  </div>\n</template>\n","<script>\nexport default {\n  props: {\n    selectAll: {\n      type: Boolean,\n      required: true,\n    },\n    totalRows: {\n      type: Number,\n      required: true,\n    },\n    perPage: {\n      type: Number,\n      required: true,\n    },\n    itemName: {\n      type: String,\n      default: 'items',\n    },\n  },\n  emits: ['set-select-all'],\n}\n</script>\n\n<template>\n  <div class=\"p-2.5 mb-2 text-center bg-gray-100 rounded-md text-gray-500 text-sm\">\n    <template v-if=\"selectAll\">\n      All <span class=\"font-semibold\">{{ totalRows }}</span> {{ itemName }} are selected. <a\n        class=\"!text-blue-600 cursor-pointer\"\n        @click=\"$emit('set-select-all', false)\"\n      >Clear selection</a>\n    </template>\n    <template v-else>\n      All <span class=\"font-semibold\">{{ perPage }}</span> {{ itemName }} on this page are selected. <a\n        class=\"!text-blue-600 cursor-pointer\"\n        @click=\"$emit('set-select-all', true)\"\n      >Select all {{ totalRows }} {{ itemName }}</a>\n    </template>\n  </div>\n</template>\n","<script setup>\nimport DOMPurify from 'dompurify'\nimport {defaultAllowedTags} from '@/constants/html.js'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  html: {\n    type: String,\n    required: true,\n  },\n  tag: {\n    type: String,\n    default: 'p',\n  },\n  allowedTags: {\n    type: Array,\n    default: () => defaultAllowedTags,\n  },\n})\n\n//Clean up HTML\nconst {html, allowedTags} = toRefs(props)\nconst sanitizedHtml = computed(() => DOMPurify.sanitize(html.value, {\n  USE_PROFILES: {html: true},\n  ALLOWED_TAGS: allowedTags.value,\n}))\n</script>\n\n<template>\n  <!-- eslint-disable vue/no-v-html vue/no-v-text-v-html-on-component -->\n  <component\n    :is=\"tag\"\n    v-html=\"sanitizedHtml\"\n  />\n</template>\n","<script setup>\nimport WarningModal from '@/components/shared/modals/WarningModal.vue'\nimport {enrollmentActions} from '@/constants/enrollments.js'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  action: {\n    type: String,\n    default: null,\n  },\n  isPerformingAction: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {action} = toRefs(props)\nconst isGettingHelp = computed(() => action.value === enrollmentActions.GET_HELP)\n</script>\n\n<template>\n  <WarningModal\n    v-bind=\"$attrs\"\n    can-confirm\n    :is-confirming=\"isPerformingAction\"\n    :label-confirm=\"isGettingHelp ? 'Email support' : 'Confirm'\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {action, handler})\"\n  >\n    <p v-if=\"action === enrollmentActions.START\">\n      This will cancel any in progress or up next enrollments for the selected learners to start this schedule immediately. This action cannot be undone.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.PAUSE\">\n      Pausing the selected enrollments will halt all scheduled messages for these learners. You can resume at any time.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RESUME\">\n      Resuming the selected enrollments will continue from where each learner left off.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.CANCEL\">\n      Canceling the selected enrollments will permanently stop all scheduled messages for these learners. This action cannot be undone.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RESEND\">\n      This will resend the most recent course message. The process may take a few minutes. Please click once and wait for confirmation.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.PRIORITIZE\">\n      Prioritizing this course will move it to the top of the learner’s queue, starting it after any current course is completed or canceled.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.REWIND\">\n      Rewind will roll back the enrollment to the first point of failure, attempting to resume from where the learner left off. If issues persist, please contact support.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.RE_ENROLL\">\n      This will re-enroll the course for learners who have opted back in. This action is irreversible.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.SEND_OPT_OUT_NOTIFICATION\">\n      This will send an opt-out notification to all the selected learners with an SMS enrollment, asking them to reply with START to opt back in.\n    </p>\n    <p v-else-if=\"action === enrollmentActions.GET_HELP\">\n      Support will need to assist you with these enrollments. Would you like to email support with a list of the selected enrollments for help?\n    </p>\n    <p v-else-if=\"action === enrollmentActions.COMPLETE\">\n      This will mark any enrollments that have received all lessons as completed. This action cannot be undone.\n    </p>\n    <p v-if=\"!isGettingHelp\">\n      Are you sure?\n    </p>\n  </WarningModal>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Enrollment} from '@/models/enrollment.model.js'\n\n/**\n * Schedule enrollments API service\n */\nexport class ScheduleEnrollmentsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/distributions'\n  itemKey = 'enrollment'\n  itemsKey = 'enrollments'\n  ModelClass = Enrollment\n\n  /**\n   * Query\n   */\n  query(distributionId, params, options) {\n    return super.query(params, options, `/${distributionId}/enrollments`)\n  }\n\n  /**\n   * Bulk action\n   */\n  bulkAction(distributionId, bulkAction, params) {\n    return this\n      .post(`/${distributionId}/enrollments/bulk_action`, {...params, bulkAction})\n  }\n}\n\n//Export singleton instance\nexport const scheduleEnrollmentsApi = new ScheduleEnrollmentsApi()\n","import {enrollmentActions} from '@/constants/enrollments.js'\nimport {scheduleEnrollmentsApi} from '@/api/schedule-enrollments.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref, unref, computed} from 'vue'\n\n/**\n * Bulk enrollment actions helper composable\n */\nexport function useBulkEnrollmentActions(distributionId) {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const bulkEnrollmentAction = ref(null)\n  const bulkEnrollmentParams = ref(null)\n  const isPerformingBulkEnrollmentAction = ref(false)\n\n  //Success message\n  const successMessage = computed(() => {\n    switch (bulkEnrollmentAction.value) {\n      case enrollmentActions.START:\n        return 'Enrollments started'\n      case enrollmentActions.PAUSE:\n        return 'Enrollments paused'\n      case enrollmentActions.RESUME:\n        return 'Enrollments resumed'\n      case enrollmentActions.CANCEL:\n        return 'Enrollments canceled'\n      case enrollmentActions.PRIORITIZE:\n        return 'Enrollments prioritized'\n      case enrollmentActions.REWIND:\n        return 'Rewound enrollments'\n      case enrollmentActions.RESEND:\n        return 'Resent the last message'\n      case enrollmentActions.RE_ENROLL:\n        return 'Learners re-enrolled'\n      case enrollmentActions.SEND_OPT_OUT_NOTIFICATION:\n        return 'Opt-out notification sent'\n      case enrollmentActions.GET_HELP:\n        return 'Help request sent'\n      default:\n        return null\n    }\n  })\n\n  //Failure message\n  const failureMessage = computed(() => {\n    switch (bulkEnrollmentAction.value) {\n      case enrollmentActions.START:\n        return 'Failed to start enrollments'\n      case enrollmentActions.PAUSE:\n        return 'Failed to pause enrollments'\n      case enrollmentActions.RESUME:\n        return 'Failed to resume enrollments'\n      case enrollmentActions.CANCEL:\n        return 'Failed to cancel enrollments'\n      case enrollmentActions.PRIORITIZE:\n        return 'Failed to prioritize enrollments'\n      case enrollmentActions.REWIND:\n        return 'Failed to rewind enrollments'\n      case enrollmentActions.RESEND:\n        return 'Failed to resend the last message'\n      case enrollmentActions.RE_ENROLL:\n        return 'Failed to re-enroll learners'\n      case enrollmentActions.SEND_OPT_OUT_NOTIFICATION:\n        return 'Failed to send opt-out notification'\n      case enrollmentActions.GET_HELP:\n        return 'Failed to send help request'\n      default:\n        return null\n    }\n  })\n\n  //Helpers to confirm/cancel an action\n  const prepareBulkEnrollmentAction = (action, params) => {\n    bulkEnrollmentAction.value = action\n    bulkEnrollmentParams.value = params\n  }\n  const cancelBulkEnrollmentAction = () => {\n    bulkEnrollmentAction.value = null\n    bulkEnrollmentParams.value = null\n  }\n\n  //Perform action\n  const performBulkEnrollmentAction = async () => {\n\n    //Must have action and params\n    if (!bulkEnrollmentAction.value) {\n      throw new Error(`No enrollment action selected`)\n    }\n    if (!bulkEnrollmentParams.value) {\n      throw new Error(`No enrollment action parameters provided`)\n    }\n\n    //Perform action\n    try {\n      isPerformingBulkEnrollmentAction.value = true\n      const result = await scheduleEnrollmentsApi.bulkAction(\n        unref(distributionId),\n        bulkEnrollmentAction.value,\n        bulkEnrollmentParams.value\n      )\n      setFlashSuccess(successMessage.value)\n      cancelBulkEnrollmentAction()\n      return result\n    }\n    catch (error) {\n      setFlashFailure(failureMessage.value)\n      processError(error)\n      throw error\n    }\n    finally {\n      isPerformingBulkEnrollmentAction.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    bulkEnrollmentAction,\n    isPerformingBulkEnrollmentAction,\n    performBulkEnrollmentAction,\n    prepareBulkEnrollmentAction,\n    cancelBulkEnrollmentAction,\n  }\n}\n","<script setup>\nimport Breadcrumb from '@/components/shared/core/Breadcrumb.vue'\nimport PerformanceGraph from '@/components/distributions/PerformanceGraph.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport FlexRow from '@/components/shared/core/FlexRow.vue'\nimport SelectAllBanner from '@/components/schedules/SelectAllBanner.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport EnrollmentActionsMenu from '@/components/enrollments/EnrollmentActionsMenu.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport NavMenuItem from '@/components/shared/navigation/NavMenuItem.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport HTMLContent from '@/components/shared/transform/HTMLContent.vue'\nimport LabelValue from '@/components/shared/transform/LabelValue.vue'\nimport AddressDisplay from '@/components/shared/transform/AddressDisplay.vue'\nimport BulkEnrollmentActionConfirmationModal from '@/components/enrollments/BulkEnrollmentActionConfirmationModal.vue'\nimport IndividualEnrollmentActionConfirmationModal from '@/components/enrollments/IndividualEnrollmentActionConfirmationModal.vue'\nimport {\n  enrollmentActions,\n  enrollmentActionOptions,\n  enrollmentBulkActionsMap,\n  enrollmentStatuses,\n  enrollmentStatusOptions,\n  enrollmentTableFilters,\n  enrollmentTableStates\n\n} from '@/constants/enrollments.js'\nimport {getOptionLabel} from '@/helpers/options.js'\nimport {scheduleEnrollmentsApi} from '@/api/schedule-enrollments.api.js'\nimport {schedulesApi} from '@/api/schedules.api.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useEnrollmentActions} from '@/composables/use-enrollment-actions.js'\nimport {useBulkEnrollmentActions} from '@/composables/use-bulk-enrollment-actions.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {ref, computed, watch, onMounted} from 'vue'\n\n//Refs\nconst cardData = ref([])\nconst subheaderText = ref('')\nconst name = ref('')\nconst isLoading = ref(true)\nconst graphData = ref({})\nconst stepOptions = ref([])\nconst key = ref(enrollmentStatuses.ACTIVE)\nconst hasEnrollments = ref(false)\nconst isSelectAll = ref(false)\nconst sidebarOptions = ref([])\nconst tableBlock = ref(null)\nconst isDisabled = ref(false)\n\n//Get route params\nconst {routeParams} = useRouting()\nconst {id} = routeParams.value\n\n//Set page header\nconst {setHeader} = usePage()\nsetHeader('Scheduling')\n\n//Navigation and user data\nconst {goToSchedulesOverview, goToViewLearner} = useNavigation()\nconst {isSuperAdmin, isAdmin} = useCurrentUser()\n\n//Computed\nconst states = computed(() =>  enrollmentTableStates[key.value])\nconst canSelectItems = computed(() => {\n  if (isDisabled.value) {\n    return false\n  }\n  return !!enrollmentBulkActionsMap[key.value]?.length\n})\n\nconst exportName = computed(() => {\n  let baseName = `${filter.value.states.join('_')}_enrollments_for_${name.value}`\n  baseName += filter.value.stepId ? `_on_lesson_id_${filter.value.stepId}` : ''\n  baseName += filter.value.dateRangeBegin && filter.value.dateRangeEnd?.[1] ? `_${filter.value.dateRangeBegin}_${filter.value.dateRangeEnd}` : '_all_time'\n  return `${baseName}.csv`\n})\nconst dateRange = computed(() =>  filter.value?.dateRangeBegin && filter.value?.dateRangeEnd ? [filter.value.dateRangeBegin, filter.value.dateRangeEnd] : null)\n\n//Querying\nconst {\n  items: enrollments,\n  total: totalEnrollments,\n  loadItems: loadEnrollments,\n  loadItemsForPage: loadEnrollmentsForPage,\n  isLoadingItems: isLoadingEnrollments,\n  sort,\n  filter,\n  search,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  clearSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => scheduleEnrollmentsApi.query(id, ...args),\n  filter: {\n    key,\n    states,\n    stepId: null,\n    dateRangeBegin: null,\n    dateRangeEnd: null,\n  },\n  sort: `-createdAt`,\n  key: 'launchDashboardOverview',\n})\n\n//Item selection\nconst selectedEnrollments = ref([])\nconst {\n  toggleAllItems: toggleAllEnrollments,\n  toggleItem: toggleEnrollment,\n  numSelectedItems: numSelectedEnrollments,\n  hasSelectedItems: hasSelectedEnrollments,\n  unselectAllItems: unselectAllEnrollments,\n  hasSelectedAllItems: hasSelectedAllEnrollments,\n} = useItemSelection(enrollments, selectedEnrollments)\n\n//Enrollment actions (for individual actions)\nconst {\n  selectedEnrollmentAction,\n  isPerformingSelectedEnrollmentAction,\n  performSelectedEnrollmentAction,\n  prepareEnrollmentAction,\n  cancelEnrollmentAction,\n} = useEnrollmentActions()\n\n//Bulk enrollment actions\nconst {\n  bulkEnrollmentAction,\n  isPerformingBulkEnrollmentAction,\n  performBulkEnrollmentAction,\n  prepareBulkEnrollmentAction,\n  cancelBulkEnrollmentAction,\n} = useBulkEnrollmentActions(id)\n\n//Bulk action params\nconst bulkActionParams = computed(() => ({\n  ...filter.value,\n  search: search.value,\n  key: key.value,\n  enrollmentIds: selectedEnrollments.value.map(enrollment => enrollment.id),\n  selectAll: isSelectAll.value,\n}))\n\n//Methods\nconst takeBulkAction = async () => {\n  try {\n    const result = await performBulkEnrollmentAction()\n    unselectAllEnrollments()\n    if (result.action === enrollmentActions.GET_HELP) {\n      return\n    }\n    await Promise.all([\n      loadMetrics(),\n      loadSidebarOptions(),\n      loadEnrollments(),\n    ])\n  }\n  catch {\n    //Handled by the composable\n  }\n}\nconst takeIndividualAction = async () => {\n  try {\n    await performSelectedEnrollmentAction()\n    unselectAllEnrollments()\n    await Promise.all([\n      loadMetrics(),\n      loadSidebarOptions(),\n      loadEnrollments(),\n    ])\n  }\n  catch {\n    //Handled by the composable\n  }\n}\n\nconst updatekey = newKey => {\n  if (key.value === newKey) {\n    return\n  }\n  tableBlock.value.scrollIntoView()\n  key.value = newKey\n  isSelectAll.value = false\n  unselectAllEnrollments()\n  resetFilter()\n}\nconst handlePageChange = (page) => {\n  isSelectAll.value = false\n  loadEnrollmentsForPage(page)\n}\nconst handleSelectAll = selectAll => {\n  isSelectAll.value = selectAll\n  if (!selectAll) {\n    unselectAllEnrollments()\n  }\n}\nconst handleToggleAllEnrollments = () => {\n  toggleAllEnrollments()\n  isSelectAll.value = hasSelectedEnrollments.value && numSelectedEnrollments.value === totalEnrollments\n}\nconst handlestates = states => {\n  if (states.value?.length === 0) {\n    const unselectedState = filter.value.states[0]\n    const toggleValue = states.value.filter(state => state !== unselectedState)[0]\n    changeFilter({states: [toggleValue]})\n  }\n  else {\n    changeFilter({states: states})\n  }\n}\nconst handleDateRange = async (date) => {\n  changeFilter({dateRangeBegin: date?.[0], dateRangeEnd: date?.[1]})\n  loadMetrics()\n}\n\n//Requests\nconst exportEnrollmentsCsv = () => {\n  schedulesApi.downloadLaunchDashboardCsv(id, {...filter.value, search: search.value}, exportName.value)\n}\nconst loadBasicData = async () => {\n  const data = await schedulesApi.setupLaunchDashboard(id)\n  subheaderText.value = data.subheaderText\n  name.value = data.name\n  stepOptions.value = data.stepOptions\n  hasEnrollments.value = data.hasEnrollments\n  isDisabled.value = data.isDisabled\n  isLoading.value = false\n}\nconst loadMetrics = async () => {\n  const data = await schedulesApi.setupLaunchMetrics(id, {...filter.value, search: search.value})\n  cardData.value = data.cardData\n  graphData.value = data.graphData\n}\nconst loadSidebarOptions = async () => {\n  const options = await schedulesApi.setupLaunchSidebar(id, {...filter.value, search: search.value})\n  sidebarOptions.value = options\n}\n\n//Reload sidebar options to get updated counts after search/filter\nwatch([search, filter], loadSidebarOptions)\n\n//Lifecycle\nonMounted(async () => {\n  await Promise.all([\n    loadBasicData(),\n    loadMetrics(),\n    loadSidebarOptions(),\n    loadEnrollments(),\n  ])\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <FlexColumn>\n      <Breadcrumb>\n        <ActionButton\n          type=\"text\"\n          label=\"Schedules\"\n          @click=\"goToSchedulesOverview()\"\n        /><Icon\n          icon=\"navigate_next\"\n          color=\"muted\"\n          size=\"s\"\n        />\n        <TextLink\n          :text=\"name\"\n          :is-clickable=\"false\"\n        />\n      </Breadcrumb>\n      <Spinner\n        v-if=\"isLoading\"\n        is-block\n      />\n      <template v-else>\n        <template v-if=\"hasEnrollments\">\n          <PageBlock\n            :header=\"name\"\n            :subheader=\"subheaderText\"\n          >\n            <template #headerAside>\n              <DateInput\n                ref=\"datepicker\"\n                :value=\"dateRange\"\n                placeholder=\"Select date range\"\n                is-range\n                alignment=\"right\"\n                @input=\"handleDateRange($event.value)\"\n              />\n            </template>\n            <FlexColumn>\n              <div text-muted>\n                Enrollment status overview\n              </div>\n              <InfoCardsGrid :cols=\"5\">\n                <InfoCard\n                  v-for=\"(data, index) in cardData\"\n                  :key=\"index\"\n                  :is-clickable=\"!isLoadingEnrollments\"\n                  :status=\"data.status\"\n                  :label=\"data.title\"\n                  :help=\"data.hoverText\"\n                  @click=\"updatekey(data.sidebarKey)\"\n                >\n                  <span :text-error=\"data.percentage > 1.0 && data.title === 'errors'\">\n                    {{ data.count }}\n                  </span>\n                  <template #subValue>\n                    <Percentage\n                      :text-error=\"data.percentage > 1.0 && data.title === 'errors'\"\n                      :fraction=\"data.percentage / 100\"\n                      :options=\"{maximumFractionDigits: 2}\"\n                    />\n                  </template>\n                </InfoCard>\n              </InfoCardsGrid>\n            </FlexColumn>\n            <FlexColumn>\n              <PerformanceGraph\n                v-if=\"Object.keys(graphData).length\"\n                :graph-data=\"graphData\"\n              />\n            </FlexColumn>\n          </PageBlock>\n\n          <PageBlock ref=\"tableBlock\">\n            <FlexRow align-items=\"start\">\n              <FlexColumn\n                :class=\"$style.sidebar\"\n                :with-gap=\"false\"\n              >\n                <NavMenuItem\n                  v-for=\"item in sidebarOptions\"\n                  :key=\"item.key\"\n                  :is-active=\"key === item.key\"\n                  :is-disabled=\"isLoadingEnrollments\"\n                  @click=\"updatekey(item.key)\"\n                >\n                  <LabelValue\n                    :options=\"enrollmentStatusOptions\"\n                    :value=\"item.key\"\n                  />\n                  <template #aside>\n                    {{ item.count }}\n                  </template>\n                </NavMenuItem>\n              </FlexColumn>\n              <FlexColumn\n                :class=\"$style.table\"\n                :with-margin=\"false\"\n              >\n                <SelectAllBanner\n                  v-if=\"hasSelectedAllEnrollments && totalEnrollments !== selectedEnrollments.length\"\n                  item-name=\"enrollments\"\n                  :per-page=\"enrollments.length\"\n                  :select-all=\"isSelectAll\"\n                  :total-rows=\"totalEnrollments\"\n                  @set-select-all=\"handleSelectAll($event)\"\n                />\n                <OverviewTableHeader>\n                  <template #search>\n                    <SearchInput\n                      is-compact\n                      :is-disabled=\"isLoadingEnrollments\"\n                      @search=\"changeSearch($event.searchTerm)\"\n                      @clear-search=\"clearSearch()\"\n                    />\n                  </template>\n                  <template #filters>\n                    <FlexRow>\n                      <SelectInput\n                        :value=\"filter.stepId\"\n                        :options=\"stepOptions\"\n                        label-prop=\"name\"\n                        :class=\"$style.selectedStep\"\n                        is-compact\n                        value-prop=\"stepId\"\n                        :is-disabled=\"isLoadingEnrollments\"\n                        placeholder=\"Filter by lesson\"\n                        @input=\"changeFilter({stepId: $event.value})\"\n                      />\n                      <FiltersDropdownPanel\n                        v-if=\"enrollmentTableFilters[key]\"\n                        :can-clear=\"false\"\n                        :num-active-filters=\"filter.states.length\"\n                      >\n                        <FormField label=\"Status\">\n                          <PillButtonList\n                            :value=\"filter.states\"\n                            :options=\"enrollmentTableFilters[key]\"\n                            is-multi-select\n                            @input=\"handlestates($event.value)\"\n                          />\n                        </FormField>\n                      </FiltersDropdownPanel>\n                    </FlexRow>\n                  </template>\n                  <template #actions>\n                    <DownloadButton\n                      :is-disabled=\"!totalEnrollments || isLoadingEnrollments\"\n                      @click=\"exportEnrollmentsCsv()\"\n                    />\n                  </template>\n                </OverviewTableHeader>\n                <OverviewTable\n                  :items=\"enrollments\"\n                  :items-per-page=\"itemsPerPage\"\n                  :current-page=\"currentPage\"\n                  :total-items=\"totalEnrollments\"\n                  :selected-items=\"selectedEnrollments\"\n                  :is-loading=\"isLoadingEnrollments\"\n                  :can-select-items=\"canSelectItems\"\n                  can-expand\n                  @load-page=\"handlePageChange($event.page)\"\n                  @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n                  @toggle-item=\"toggleEnrollment($event.item)\"\n                  @toggle-all-items=\"handleToggleAllEnrollments($event)\"\n                >\n                  <template #headerRow>\n                    <TableHeaderCell\n                      :class=\"$style.name\"\n                      is-sortable\n                      sort-prop=\"name\"\n                      :current-sort=\"sort\"\n                      @sort=\"changeSort($event.sort)\"\n                    >\n                      Name\n                    </TableHeaderCell>\n                    <TableHeaderCell\n                      :class=\"$style.status\"\n                      is-sortable\n                      sort-prop=\"status\"\n                      :current-sort=\"sort\"\n                      @sort=\"changeSort($event.sort)\"\n                    >\n                      Status\n                    </TableHeaderCell>\n                    <TableHeaderCell\n                      :class=\"$style.statusDate\"\n                      is-sortable\n                      sort-prop=\"statusDate\"\n                      :current-sort=\"sort\"\n                      @sort=\"changeSort($event.sort)\"\n                    >\n                      Status date\n                    </TableHeaderCell>\n                  </template>\n\n                  <template #row=\"{item: enrollment, isExpanded}\">\n                    <TableCell\n                      :class=\"$style.name\"\n                      :is-clickable=\"enrollment.userMembership && (isAdmin || isSuperAdmin)\"\n                      @click=\"goToViewLearner(enrollment.userId)\"\n                    >\n                      <div>\n                        <strong>{{ enrollment.name }}</strong>\n                        <div class=\"desc !text-gray-500 pt-1\">\n                          <AddressDisplay :address=\"enrollment.address\" />\n                        </div>\n                        <div\n                          v-if=\"isExpanded\"\n                          class=\"py-4\"\n                        >\n                          <HTMLContent\n                            :html=\"enrollment.statusReason\"\n                            tag=\"span\"\n                          />\n                        </div>\n                      </div>\n                    </TableCell>\n                    <TableCell :class=\"$style.status\">\n                      <EnrollmentStatus :status=\"enrollment.status\" />\n                    </TableCell>\n                    <TableCell :class=\"$style.statusDate\">\n                      {{ enrollment.statusDate }}\n                    </TableCell>\n                  </template>\n\n                  <template #itemActions=\"{item: enrollment}\">\n                    <EnrollmentActionsMenu\n                      :enrollment=\"enrollment\"\n                      @start=\"prepareEnrollmentAction(enrollment, enrollmentActions.START)\"\n                      @pause=\"prepareEnrollmentAction(enrollment, enrollmentActions.PAUSE)\"\n                      @resume=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESUME)\"\n                      @cancel=\"prepareEnrollmentAction(enrollment, enrollmentActions.CANCEL)\"\n                      @prioritize=\"prepareEnrollmentAction(enrollment, enrollmentActions.PRIORITIZE)\"\n                      @resend=\"prepareEnrollmentAction(enrollment, enrollmentActions.RESEND)\"\n                      @rewind=\"prepareEnrollmentAction(enrollment, enrollmentActions.REWIND)\"\n                      @re-enroll=\"prepareEnrollmentAction(enrollment, enrollmentActions.RE_ENROLL)\"\n                      @send-opt-out-notification=\"prepareEnrollmentAction(enrollment, enrollmentActions.SEND_OPT_OUT_NOTIFICATION)\"\n                      @complete=\"prepareEnrollmentAction(enrollment, enrollmentActions.COMPLETE)\"\n                    />\n                  </template>\n                </OverviewTable>\n              </FlexColumn>\n            </FlexRow>\n            <BulkActionsBar\n              v-if=\"hasSelectedEnrollments && enrollmentBulkActionsMap[key]\"\n              item-type=\"enrollment\"\n              :num-selected=\"isSelectAll ? totalEnrollments : numSelectedEnrollments\"\n              @clear-selection=\"unselectAllEnrollments()\"\n            >\n              <BulkAction\n                v-for=\"action in enrollmentBulkActionsMap[key]\"\n                :key=\"action\"\n                :label=\"getOptionLabel(enrollmentActionOptions, action)\"\n                :is-disabled=\"isLoadingEnrollments\"\n                :icon=\"getOptionLabel(enrollmentActionOptions, action, 'icon')\"\n                @click=\"prepareBulkEnrollmentAction(action, bulkActionParams)\"\n              />\n            </BulkActionsBar>\n          </PageBlock>\n        </template>\n        <Alert\n          v-else\n          text=\"Your schedule is still processing. Check back once there are enrollments for more information.\"\n        />\n      </template>\n    </FlexColumn>\n\n    <!-- Modals -->\n    <BulkEnrollmentActionConfirmationModal\n      :is-open=\"!!bulkEnrollmentAction\"\n      :action=\"bulkEnrollmentAction\"\n      :is-performing-action=\"isPerformingBulkEnrollmentAction\"\n      @close=\"cancelBulkEnrollmentAction()\"\n      @confirm=\"takeBulkAction()\"\n    />\n    <IndividualEnrollmentActionConfirmationModal\n      :is-open=\"!!selectedEnrollmentAction\"\n      :is-performing-action=\"isPerformingSelectedEnrollmentAction\"\n      :action=\"selectedEnrollmentAction\"\n      @close=\"cancelEnrollmentAction()\"\n      @confirm=\"takeIndividualAction()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 3;\n}\n.status {\n  flex: 1;\n}\n.statusDate {\n  flex: 1;\n}\n.actions {\n  flex: 1;\n}\n.sidebar {\n  flex: 1;\n}\n.table {\n  flex: 4;\n}\n.selectedStep{\n  width: 300px\n}\n</style>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  tags: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {tags} = toRefs(props)\nconst isSingle = computed(() => tags.value.length === 1)\nconst single = computed(() => tags.value[0])\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete tag${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {tag})\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        the tag \"<strong>{{ single.label }}</strong>\"?\n        <span v-if=\"single.numCourses > 0\">\n          The tag will also be removed from {{ single.numCourses }} course{{ single.numCourses > 1 ? 's' : '' }}.\n        </span>\n      </span>\n      <span v-else>\n        the {{ tags.length }} selected tags? The tags will also be removed from any associated courses.\n      </span>\n    </p>\n  </ConfirmationModal>\n</template>\n","import {tagsApi} from '@/api/tags.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Tag validation composable\n */\nexport function useTagValidation(existingTag) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingTagExists = ref(false)\n\n  //Check if tag exists by given properties\n  const checkTagExists = async data => {\n    try {\n      isCheckingTagExists.value = true\n      return await tagsApi.checkExists({\n        ...data,\n        excludeId: existingTag?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingTagExists.value = false\n    }\n  }\n\n  //Debounced check for tag existence\n  const checkTagExistsDebounced = useDebounceFn(checkTagExists, 500)\n\n  //Unique tag name validator\n  const uniqueName = asyncValidator(\n    'A tag with this name already exists',\n    async label => {\n      if (!label) {\n        return true\n      }\n      const exists = await checkTagExistsDebounced({label})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkTagExists,\n    checkTagExistsDebounced,\n    isCheckingTagExists,\n    uniqueName,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport {Tag} from '@/models/tag.model.js'\nimport {useTagValidation} from '@/composables/use-tag-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  tag: {\n    type: Tag,\n    default: null,\n  },\n  isBusy: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {model, tag} = toRefs(props)\nconst isEdit = computed(() => !!tag.value)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Validation\nconst {uniqueName, isCheckingTagExists} = useTagValidation(tag)\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  label: {\n    required: required('Name'),\n    uniqueName,\n  },\n}, model, {$autoDirty: true})\n\n//Save\nconst confirm = () => {\n  if (!$v.value.$invalid && !$v.value.$pending) {\n    emit('confirm')\n  }\n}\n\n//Open handler\nconst onOpen = () => {\n  $v.value.$reset()\n  emit('open')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    :header=\"isEdit ? 'Edit tag' : 'Create a new tag'\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"onOpen()\"\n  >\n    <FormField\n      label=\"Name\"\n      :errors=\"$v.label.$errors\"\n    >\n      <TextInput\n        required\n        focus-on-mount\n        test-id=\"name\"\n        :value=\"model.label\"\n        :maxlength=\"100\"\n        :minlength=\"2\"\n        :has-error=\"$v.label.$error && !$v.label.$pending\"\n        :has-spinner=\"isCheckingTagExists\"\n        @input=\"updateModel({label: $event.value})\"\n        @focus=\"$event.target.select()\"\n        @keydown.enter=\"confirm()\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isBusy || $v.$invalid || $v.label.$pending\"\n        :has-spinner-confirm=\"isBusy\"\n        :label-confirm=\"isEdit ? 'Save' : 'Create tag'\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","import {tagsApi} from '@/api/tags.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Tag creation composable\n */\nexport function useTagCreation() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isCreatingTag = ref(false)\n  const model = ref({\n    label: '',\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Create tag\n  const createTag = async () => {\n\n    //Base data\n    const data = {\n      label: model.value.label,\n    }\n\n    //Toggle flag\n    isCreatingTag.value = true\n\n    //Create\n    try {\n      const tag = await tagsApi.create(data)\n      setFlashSuccess('Tag created')\n      model.value = {\n        label: '',\n      }\n      return tag\n    }\n    catch (error) {\n      setFlashFailure('Failed to create tag')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingTag.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingTag,\n    updateModel,\n    createTag,\n  }\n}\n","import {tagsApi} from '@/api/tags.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Tag editing composable\n */\nexport function useTagEditing() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isUpdatingTag = ref(false)\n  const tagBeingEdited = ref(null)\n  const model = ref({\n    label: '',\n  })\n\n  //Keys\n  const keys = Object.keys(model.value)\n\n  //Set tag being edited\n  const setTagBeingEdited = tag => {\n    tagBeingEdited.value = tag\n    keys.forEach(key => model.value[key] = tag[key])\n  }\n\n  //Clear tag being edited\n  const clearTagBeingEdited = () => {\n    tagBeingEdited.value = null\n    keys.forEach(key => model.value[key] = '')\n  }\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Update tag\n  const updateTag = async () => {\n\n    //Must have tag\n    if (!tagBeingEdited.value || !tagBeingEdited.value.id) {\n      throw new Error('No tag or tag without ID')\n    }\n\n    //Base data\n    const data = {\n      label: model.value.label,\n    }\n\n    //Toggle flag\n    isUpdatingTag.value = true\n\n    //Create\n    try {\n      const tag = await tagsApi.updateById(tagBeingEdited.value.id, data)\n      setFlashSuccess('Tag updated')\n      keys.forEach(key => tagBeingEdited.value[key] = tag[key])\n      clearTagBeingEdited()\n      return tag\n    }\n    catch (error) {\n      setFlashFailure('Failed to update tag')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingTag.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    tagBeingEdited,\n    isUpdatingTag,\n    setTagBeingEdited,\n    clearTagBeingEdited,\n    updateModel,\n    updateTag,\n  }\n}\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {tagsApi} from '@/api/tags.api.js'\n\n/**\n * Tag removal wrapper composable\n */\nexport function useTagRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: tagsToRemove,\n    numItemsToRemove: numTagsToRemove,\n    hasItemsToRemove: hasTagsToRemove,\n    isRemovingItems: isRemovingTags,\n    setItemsToRemove: setTagsToRemove,\n    clearItemsToRemove: clearTagsToRemove,\n    removeItems: removeTags,\n  } = useItemRemoval({\n    noun: 'tag',\n    removeById: id => tagsApi.removeById(id),\n    removeManyById: ids => tagsApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    tagsToRemove,\n    numTagsToRemove,\n    hasTagsToRemove,\n    isRemovingTags,\n    setTagsToRemove,\n    clearTagsToRemove,\n    removeTags,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport ConfirmTagRemovalModal from '@/components/settings/tags/ConfirmTagRemovalModal.vue'\nimport CreateOrEditTagModal from '@/components/settings/tags/CreateOrEditTagModal.vue'\nimport TagActionsMenu from '@/components/settings/tags/TagActionsMenu.vue'\nimport {tagsApi} from '@/api/tags.api.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useTagCreation} from '@/composables/use-tag-creation.js'\nimport {useTagEditing} from '@/composables/use-tag-editing.js'\nimport {useTagRemoval} from '@/composables/use-tag-removal.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Tags')\n\n//Querying\nconst {\n  items: tags,\n  total: totalTags,\n  queryItems: queryTags,\n  loadItems: loadTags,\n  loadItemsForPage: loadTagsForPage,\n  reloadItems: reloadTags,\n  isLoadingItems: isLoadingTags,\n  sort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n} = useQuerying({\n  handler: (...args) => tagsApi.query(...args),\n  sort: '-updatedAt',\n  key: 'tagsOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryTags({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Item selection\nconst selectedTags = ref([])\nconst {\n  toggleAllItems: toggleAllTags,\n  toggleItem: toggleTag,\n  numSelectedItems: numSelectedTags,\n  hasSelectedItems: hasSelectedTags,\n  unselectAllItems: unselectAllTags,\n} = useItemSelection(tags, selectedTags)\n\n//Tag creation and modal management\nconst {\n  model: modelForCreation,\n  updateModel: updateModelForCreation,\n  isCreatingTag,\n  createTag,\n} = useTagCreation()\nconst {\n  isValue: isShowingCreateModal,\n  setTrue: showCreateModal,\n  setFalse: hideCreateModal,\n} = useValueToggle()\nconst confirmTagCreation = async () => {\n  try {\n    await createTag()\n    hideCreateModal()\n    reloadTags()\n  }\n  catch {\n    //Handled by useTagCreation\n  }\n}\n\n//Tag editing\nconst {\n  model: modelForEditing,\n  updateModel: updateModelForEditing,\n  tagBeingEdited,\n  setTagBeingEdited,\n  clearTagBeingEdited,\n  isUpdatingTag,\n  updateTag,\n} = useTagEditing()\nconst confirmTagUpdate = async () => {\n  try {\n    await updateTag()\n  }\n  catch {\n    //Handled by useTagEditing\n  }\n}\n\n//Tag removal\nconst {\n  tagsToRemove,\n  hasTagsToRemove,\n  isRemovingTags,\n  setTagsToRemove,\n  clearTagsToRemove,\n  removeTags,\n} = useTagRemoval()\nconst confirmTagRemoval = async () => {\n  try {\n    await removeTags()\n    reloadTags()\n    unselectAllTags()\n  }\n  catch {\n    //Handled by useTagRemoval\n  }\n}\n\n//Load tags\nloadTags()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          result-label-prop=\"label\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"setTagBeingEdited($event.result)\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton @click=\"showCreateModal()\" />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalTags\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"tag\"\n              :count=\"totalTags\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"tags\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalTags\"\n        :selected-items=\"selectedTags\"\n        :is-loading=\"isLoadingTags\"\n        can-select-items\n        @load-page=\"loadTagsForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n        @toggle-item=\"toggleTag($event.item)\"\n        @toggle-all-items=\"toggleAllTags()\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.label\"\n            is-sortable\n            sort-prop=\"label\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.numCourses\"\n            is-sortable\n            sort-prop=\"numCourses\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            # of courses\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: tag}\">\n          <TableCell\n            :class=\"$style.label\"\n            is-clickable\n            @click=\"setTagBeingEdited(tag)\"\n          >\n            <strong>{{ tag.label }}</strong>\n          </TableCell>\n          <TableCell :class=\"$style.numCourses\">\n            {{ tag.numCourses }}\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: tag, index}\">\n          <TagActionsMenu\n            :test-id=\"`tagActionsMenu${index + 1}`\"\n            :tag=\"tag\"\n            @edit=\"setTagBeingEdited(tag)\"\n            @remove=\"setTagsToRemove(tag)\"\n          />\n        </template>\n\n        <template #bulkActions>\n          <BulkActionsBar\n            v-if=\"hasSelectedTags\"\n            item-type=\"tag\"\n            :num-selected=\"numSelectedTags\"\n            @clear-selection=\"unselectAllTags()\"\n          >\n            <BulkAction\n              label=\"Delete\"\n              icon=\"delete\"\n              is-icon-outlined\n              @click=\"setTagsToRemove(selectedTags)\"\n            />\n          </BulkActionsBar>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <ConfirmTagRemovalModal\n      :tags=\"tagsToRemove\"\n      :is-open=\"hasTagsToRemove\"\n      :is-removing=\"isRemovingTags\"\n      @close=\"clearTagsToRemove()\"\n      @confirm=\"confirmTagRemoval()\"\n    />\n    <CreateOrEditTagModal\n      :model=\"modelForCreation\"\n      :is-open=\"isShowingCreateModal\"\n      :is-busy=\"isCreatingTag\"\n      @close=\"hideCreateModal()\"\n      @update=\"updateModelForCreation($event.data)\"\n      @confirm=\"confirmTagCreation()\"\n    />\n    <CreateOrEditTagModal\n      :model=\"modelForEditing\"\n      :tag=\"tagBeingEdited\"\n      :is-open=\"!!tagBeingEdited\"\n      :is-busy=\"isUpdatingTag\"\n      @close=\"clearTagBeingEdited()\"\n      @update=\"updateModelForEditing($event.data)\"\n      @confirm=\"confirmTagUpdate()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.label {\n  flex: 3;\n}\n.numCourses {\n  flex: 0 0 10rem;\n}\n</style>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  channels: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {channels} = toRefs(props)\nconst isSingle = computed(() => channels.value.length === 1)\nconst single = computed(() => channels.value[0])\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete channel${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {channel})\"\n  >\n    <p>\n      Are you sure you want to delete\n      <span v-if=\"isSingle\">\n        the channel \"<strong>{{ single.name }}</strong>\"?\n      </span>\n      <span v-else>\n        the {{ channels.length }} selected channels?\n      </span>\n    </p>\n  </ConfirmationModal>\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Channel} from '@/models/channel.model.js'\n\n/**\n * Channels API service\n */\nexport class ChannelsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/channels'\n  itemKey = 'channel'\n  itemsKey = 'channels'\n  ModelClass = Channel\n}\n\n//Export singleton instance\nexport const channelsApi = new ChannelsApi()\n","import {channelsApi} from '@/api/channels.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Channel validation composable\n */\nexport function useChannelValidation(existingChannel) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingChannelExists = ref(false)\n\n  //Check if channel exists by given properties\n  const checkChannelExists = async data => {\n    try {\n      isCheckingChannelExists.value = true\n      return await channelsApi.checkExists({\n        ...data,\n        excludeId: existingChannel?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingChannelExists.value = false\n    }\n  }\n\n  //Debounced check for channel existence\n  const checkChannelExistsDebounced = useDebounceFn(checkChannelExists, 500)\n\n  //Unique channel name validator\n  const uniqueName = asyncValidator(\n    'A channel with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      const exists = await checkChannelExistsDebounced({name})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkChannelExists,\n    checkChannelExistsDebounced,\n    isCheckingChannelExists,\n    uniqueName,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport ImageInput from '@/components/shared/form/ImageInput.vue'\nimport {Channel} from '@/models/channel.model.js'\nimport {useChannelValidation} from '@/composables/use-channel-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {ref, computed, toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  channel: {\n    type: Channel,\n    default: null,\n  },\n  isBusy: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {model, channel} = toRefs(props)\nconst isEdit = computed(() => !!channel.value)\nconst isUploading = ref(false)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\nconst setUploadingState = value => isUploading.value = value\n\n//Validation\nconst {uniqueName, isCheckingChannelExists} = useChannelValidation(channel)\nconst {required} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Name'),\n    uniqueName,\n  },\n}, model, {$autoDirty: true})\n\n//Save\nconst confirm = () => {\n  if (!$v.value.$invalid && !$v.value.$pending) {\n    emit('confirm')\n  }\n}\n\n//Open handler\nconst onOpen = () => {\n  $v.value.$reset()\n  emit('open')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    :header=\"isEdit ? 'Edit channel' : 'Create a new channel'\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"onOpen()\"\n  >\n    <FormField\n      label=\"Name\"\n      :errors=\"$v.name.$errors\"\n    >\n      <TextInput\n        required\n        focus-on-mount\n        test-id=\"name\"\n        :value=\"model.name\"\n        :maxlength=\"30\"\n        :minlength=\"2\"\n        :has-error=\"$v.name.$error && !$v.name.$pending\"\n        :has-spinner=\"isCheckingChannelExists\"\n        @input=\"updateModel({name: $event.value})\"\n        @focus=\"$event.target.select()\"\n        @keydown.enter=\"confirm()\"\n      />\n    </FormField>\n\n    <FormField label=\"Image\">\n      <ImageInput\n        :image-key=\"model.imageKey\"\n        max-file-size=\"3MB\"\n        custom-details-text=\"Use a transparent logo for optimal display on SMS contact cards.\"\n        @input=\"updateModel({imageKey: $event.imageKey})\"\n        @is-uploading=\"setUploadingState($event.isUploading)\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isUploading || isBusy || $v.$invalid || $v.name.$pending\"\n        :has-spinner-confirm=\"isUploading || isBusy\"\n        :label-confirm=\"isEdit ? 'Save' : 'Create channel'\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","import {channelsApi} from '@/api/channels.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Channel creation composable\n */\nexport function useChannelCreation() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isCreatingChannel = ref(false)\n  const model = ref({\n    name: '',\n    imageKey: '',\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Create channel\n  const createChannel = async () => {\n\n    //Base data\n    const data = {\n      name: model.value.name,\n      imageKey: model.value.imageKey,\n    }\n\n    //Toggle flag\n    isCreatingChannel.value = true\n\n    //Create\n    try {\n      const channel = await channelsApi.create(data)\n      setFlashSuccess('Channel created')\n      model.value = {\n        name: '',\n        imageKey: '',\n      }\n      return channel\n    }\n    catch (error) {\n      setFlashFailure('Failed to create channel')\n      processError(error)\n      throw error\n    }\n    finally {\n      isCreatingChannel.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingChannel,\n    updateModel,\n    createChannel,\n  }\n}\n","import {channelsApi} from '@/api/channels.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {ref} from 'vue'\n\n/**\n * Channel editing composable\n */\nexport function useChannelEditing() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isUpdatingChannel = ref(false)\n  const channelBeingEdited = ref(null)\n  const model = ref({\n    name: '',\n    imageKey: '',\n  })\n\n  //Keys\n  const keys = Object.keys(model.value)\n\n  //Set channel being edited\n  const setChannelBeingEdited = channel => {\n    channelBeingEdited.value = channel\n    keys.forEach(key => model.value[key] = channel[key])\n  }\n\n  //Clear channel being edited\n  const clearChannelBeingEdited = () => {\n    channelBeingEdited.value = null\n    keys.forEach(key => model.value[key] = '')\n  }\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Update channel\n  const updateChannel = async () => {\n\n    //Must have channel\n    if (!channelBeingEdited.value || !channelBeingEdited.value.id) {\n      throw new Error('No channel or channel without ID')\n    }\n\n    //Base data\n    const data = {\n      name: model.value.name,\n      imageKey: model.value.imageKey,\n    }\n\n    //Toggle flag\n    isUpdatingChannel.value = true\n\n    //Create\n    try {\n      const channel = await channelsApi.updateById(channelBeingEdited.value.id, data)\n      setFlashSuccess('Channel updated')\n      keys.forEach(key => channelBeingEdited.value[key] = channel[key])\n      clearChannelBeingEdited()\n      return channel\n    }\n    catch (error) {\n      setFlashFailure('Failed to update channel')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingChannel.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    channelBeingEdited,\n    isUpdatingChannel,\n    setChannelBeingEdited,\n    clearChannelBeingEdited,\n    updateModel,\n    updateChannel,\n  }\n}\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {channelsApi} from '@/api/channels.api.js'\n\n/**\n * Channel removal wrapper composable\n */\nexport function useChannelRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: channelsToRemove,\n    numItemsToRemove: numChannelsToRemove,\n    hasItemsToRemove: hasChannelsToRemove,\n    isRemovingItems: isRemovingChannels,\n    setItemsToRemove: setChannelsToRemove,\n    clearItemsToRemove: clearChannelsToRemove,\n    removeItems: removeChannels,\n  } = useItemRemoval({\n    noun: 'channel',\n    removeById: id => channelsApi.removeById(id),\n    removeManyById: ids => channelsApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    channelsToRemove,\n    numChannelsToRemove,\n    hasChannelsToRemove,\n    isRemovingChannels,\n    setChannelsToRemove,\n    clearChannelsToRemove,\n    removeChannels,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport ConfirmChannelRemovalModal from '@/components/settings/channels/ConfirmChannelRemovalModal.vue'\nimport CreateOrEditChannelModal from '@/components/settings/channels/CreateOrEditChannelModal.vue'\nimport ChannelActionsMenu from '@/components/settings/channels/ChannelActionsMenu.vue'\nimport {channelsApi} from '@/api/channels.api.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useChannelCreation} from '@/composables/use-channel-creation.js'\nimport {useChannelEditing} from '@/composables/use-channel-editing.js'\nimport {useChannelRemoval} from '@/composables/use-channel-removal.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {onMounted} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Channels')\n\n//Max number of channels\nconst maxChannels = 8\n\n//Querying\nconst {\n  items: channels,\n  total: totalChannels,\n  queryItems: queryChannels,\n  loadItems: loadChannels,\n  loadItemsForPage: loadChannelsForPage,\n  reloadItems: reloadChannels,\n  isLoadingItems: isLoadingChannels,\n  sort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n} = useQuerying({\n  handler: (...args) => channelsApi.query(...args),\n  sort: 'name',\n  key: 'channelsOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryChannels({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Channel creation and modal management\nconst {\n  model: modelForCreation,\n  updateModel: updateModelForCreation,\n  isCreatingChannel,\n  createChannel,\n} = useChannelCreation()\nconst {\n  isValue: isShowingCreateModal,\n  setTrue: showCreateModal,\n  setFalse: hideCreateModal,\n} = useValueToggle()\nconst confirmChannelCreation = async () => {\n  try {\n    await createChannel()\n    hideCreateModal()\n    reloadChannels()\n  }\n  catch {\n    //Handled by useChannelCreation\n  }\n}\n\n//Channel editing\nconst {\n  model: modelForEditing,\n  updateModel: updateModelForEditing,\n  channelBeingEdited,\n  setChannelBeingEdited,\n  clearChannelBeingEdited,\n  isUpdatingChannel,\n  updateChannel,\n} = useChannelEditing()\nconst confirmChannelUpdate = async () => {\n  try {\n    await updateChannel()\n  }\n  catch {\n    //Handled by useChannelEditing\n  }\n}\n\n//Channel removal\nconst {\n  channelsToRemove,\n  hasChannelsToRemove,\n  isRemovingChannels,\n  setChannelsToRemove,\n  clearChannelsToRemove,\n  removeChannels,\n} = useChannelRemoval()\nconst confirmChannelRemoval = async () => {\n  try {\n    await removeChannels()\n    reloadChannels()\n  }\n  catch {\n    //Handled by useChannelRemoval\n  }\n}\n\n//Load channels\nonMounted(loadChannels)\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"setChannelBeingEdited($event.result)\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton\n          v-if=\"totalChannels < maxChannels\"\n          @click=\"showCreateModal()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalChannels\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"channel\"\n              :count=\"totalChannels\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"channels\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalChannels\"\n        :is-loading=\"isLoadingChannels\"\n        @load-page=\"loadChannelsForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.name\"\n            is-sortable\n            sort-prop=\"name\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.number\"\n            is-sortable\n            sort-prop=\"number\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Assigned number\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.numSchedules\"\n            is-sortable\n            sort-prop=\"numDistributions\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            # of schedules\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: channel}\">\n          <TableCell\n            :class=\"$style.name\"\n            is-clickable\n            @click=\"setChannelBeingEdited(channel)\"\n          >\n            <strong>{{ channel.name }}</strong>\n          </TableCell>\n          <TableCell :class=\"$style.number\">\n            {{ channel.number }}\n          </TableCell>\n          <TableCell :class=\"$style.numSchedules\">\n            {{ channel.numDistributions }}\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: channel, index}\">\n          <ChannelActionsMenu\n            :test-id=\"`channelActionsMenu${index + 1}`\"\n            :channel=\"channel\"\n            @edit=\"setChannelBeingEdited(channel)\"\n            @remove=\"setChannelsToRemove(channel)\"\n          />\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <ConfirmChannelRemovalModal\n      :channels=\"channelsToRemove\"\n      :is-open=\"hasChannelsToRemove\"\n      :is-removing=\"isRemovingChannels\"\n      @close=\"clearChannelsToRemove()\"\n      @confirm=\"confirmChannelRemoval()\"\n    />\n    <CreateOrEditChannelModal\n      :model=\"modelForCreation\"\n      :is-open=\"isShowingCreateModal\"\n      :is-busy=\"isCreatingChannel\"\n      @close=\"hideCreateModal()\"\n      @update=\"updateModelForCreation($event.data)\"\n      @confirm=\"confirmChannelCreation()\"\n    />\n    <CreateOrEditChannelModal\n      :model=\"modelForEditing\"\n      :channel=\"channelBeingEdited\"\n      :is-open=\"!!channelBeingEdited\"\n      :is-busy=\"isUpdatingChannel\"\n      @close=\"clearChannelBeingEdited()\"\n      @update=\"updateModelForEditing($event.data)\"\n      @confirm=\"confirmChannelUpdate()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 3;\n}\n.numSchedules {\n  flex: 0 0 10rem;\n}\n</style>\n","\n/**\n * System message types\n */\nexport const organizationSystemMessageTypes = {\n  SUPPORT: 'support',\n  RESPONSE_ALREADY_ACCEPTED: 'response_already_accepted',\n  ACTIVATION_SUFFIX_QUEUED: 'activation_suffix_queued',\n  RESPONSE_REMINDER_ONE_SCHEDULED: 'response_reminder_one_scheduled',\n  RESPONSE_REMINDER_ONE_INSTANT: 'response_reminder_one_instant',\n  RESPONSE_REMINDER_TWO: 'response_reminder_two',\n  RESPONSE_REMINDER_THREE: 'response_reminder_three',\n  RESPONSE_REMINDER_FOUR: 'response_reminder_four',\n  RESPONSE_REMINDER_FIVE: 'response_reminder_five',\n  SUPPORT_ALL_LINKS: 'support_all_links',\n  TEAMS_HELP: 'teams_help',\n}\n\n/**\n * WhatsApp incompatible system message types\n */\n\nexport const whatsappIncompatibleOrganizationSystemMessages = [\n  organizationSystemMessageTypes.ACTIVATION_SUFFIX_QUEUED,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_ONE_SCHEDULED,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_ONE_INSTANT,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_TWO,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_THREE,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_FOUR,\n  organizationSystemMessageTypes.RESPONSE_REMINDER_FIVE,\n]\n\n/**\n * System message options\n */\nexport const organizationSystemMessageOptions = [\n  {\n    value: organizationSystemMessageTypes.SUPPORT,\n    label: 'Support',\n    key: 'messaging.support_text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_ALREADY_ACCEPTED,\n    label: 'Response already accepted',\n    key: 'messaging.response_already_accepted',\n  },\n  {\n    value: organizationSystemMessageTypes.ACTIVATION_SUFFIX_QUEUED,\n    label: 'Up next enrollment pre-activation message',\n    key: 'messaging.activation_suffix_queued.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_ONE_SCHEDULED,\n    label: 'Response reminder #1 for scheduled enrollments',\n    key: 'response_reminders.indexed1.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_ONE_INSTANT,\n    label: 'Response reminder #1 for instant enrollments',\n    key: 'response_reminders.instant-indexed1.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_TWO,\n    label: 'Response reminder #2',\n    key: 'response_reminders.indexed2.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_THREE,\n    label: 'Response reminder #3',\n    key: 'response_reminders.indexed3.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_FOUR,\n    label: 'Response reminder #4',\n    key: 'response_reminders.indexed4.text',\n  },\n  {\n    value: organizationSystemMessageTypes.RESPONSE_REMINDER_FIVE,\n    label: 'Response reminder #5',\n    key: 'response_reminders.indexed5.text',\n  },\n  {\n    value: organizationSystemMessageTypes.SUPPORT_ALL_LINKS,\n    label: 'Support message for SMS code enrollment',\n    key: 'messaging.support_all_links',\n  },\n  {\n    value: organizationSystemMessageTypes.TEAMS_HELP,\n    label: 'Teams help message',\n    key: 'teams.cards.help.text',\n  },\n]\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {organizationSystemMessageTypes, organizationSystemMessageOptions} from '@/constants/organization-system-messages.js'\nimport {courseLanguageOptions} from '@/constants/courses.js'\nimport {computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Current organization\nconst {organization} = useCurrentOrganization()\n\n//Show appropriate message type filters\nconst filteredOrganizationSystemMessageOptions = computed(() => {\n  if (organization.value?.isTeams && !!organization.value?.teamsTenantId) {\n    return organizationSystemMessageOptions\n  }\n  else {\n    return organizationSystemMessageOptions.filter(message => message.value !== organizationSystemMessageTypes.TEAMS_HELP)\n  }\n})\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    :num-active-filters=\"numActiveFilters\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Message type\">\n      <SelectInput\n        test-id=\"messageTypes\"\n        :value=\"activeFilter.messageTypes\"\n        is-multi-select\n        placeholder=\"Select or type a message type\"\n        :options=\"filteredOrganizationSystemMessageOptions\"\n        @input=\"changeFilter('messageTypes', $event.value)\"\n      />\n    </FormField>\n\n    <FormField label=\"Language\">\n      <SelectInput\n        test-id=\"locales\"\n        :value=\"activeFilter.locales\"\n        is-multi-select\n        placeholder=\"Select or type a language\"\n        :options=\"courseLanguageOptions\"\n        @input=\"changeFilter('locales', $event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","<script setup>\nimport ConfirmationModal from '@/components/shared/modals/ConfirmationModal.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\ndefineEmits([\n  'open',\n  'close',\n  'confirm',\n])\nconst props = defineProps({\n  organizationSystemMessages: {\n    type: Array,\n    default: () => [],\n  },\n  isRemoving: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {organizationSystemMessages} = toRefs(props)\nconst isSingle = computed(() => organizationSystemMessages.value.length === 1)\n</script>\n\n<template>\n  <ConfirmationModal\n    v-bind=\"$attrs\"\n    :header=\"`Delete system message${isSingle ? '' : 's'}`\"\n    :is-confirming=\"isRemoving\"\n    @open=\"$emit('open')\"\n    @close=\"$emit('close')\"\n    @confirm=\"$emit('confirm', {tag})\"\n  >\n    <p>\n      Are you sure you want to delete <Inflect\n        :count=\"organizationSystemMessages.length\"\n        text=\"system message\"\n        include-count\n      />?\n    </p>\n  </ConfirmationModal>\n</template>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * System message model\n */\nexport class OrganizationSystemMessage extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {OrganizationSystemMessage} from '@/models/organization-system-message.model.js'\n\n/**\n * Organization System Messages API service\n */\nexport class OrganizationSystemMessagesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/organization_system_messages'\n  itemKey = 'organizationSystemMessage'\n  itemsKey = 'organizationSystemMessages'\n  ModelClass = OrganizationSystemMessage\n}\n\n//Export singleton instance\nexport const organizationSystemMessagesApi = new OrganizationSystemMessagesApi()\n","import {organizationSystemMessagesApi} from '@/api/organization-system-messages.api.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref, computed, watch} from 'vue'\n\n/**\n * Organization system message validation composable\n */\nexport function useOrganizationSystemMessageValidation(existingSystemMessage, model, $v, $externalResults) {\n\n  //Refs\n  const messageType = computed(() => model.value.messageType)\n  const locale = computed(() => model.value.locale)\n  const isCheckingSystemMessageExists = ref(false)\n\n  //Check if organizationSystemMessage exists by given properties\n  const checkSystemMessageExists = async () => {\n    try {\n      isCheckingSystemMessageExists.value = true\n      return await organizationSystemMessagesApi.checkExists({\n        messageType: messageType.value,\n        locale: locale.value,\n        excludeId: existingSystemMessage?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingSystemMessageExists.value = false\n    }\n  }\n\n  //Debounced check\n  const checkSystemMessageExistsDebounced = useDebounceFn(checkSystemMessageExists, 500)\n\n  //Validate locale/message type combo when either is changed (external validator)\n  watch([messageType, locale], async () => {\n    if (!messageType.value || !locale.value) {\n      return\n    }\n    if (!$v.value.messageType.$dirty && !$v.value.locale.$dirty) {\n      return\n    }\n    const exists = await checkSystemMessageExistsDebounced()\n    if (exists) {\n      $v.value.messageType.$touch()\n      $v.value.locale.$touch()\n      $externalResults.value = {\n        messageType: [''], //Just blank error as we don't want to duplicate it\n        locale: ['A system message of this type and language already exists'],\n      }\n    }\n    else {\n      $externalResults.value = {}\n    }\n  })\n\n  //Expose interface\n  return {\n    checkSystemMessageExists,\n    checkSystemMessageExistsDebounced,\n    isCheckingSystemMessageExists,\n  }\n}\n","<script setup>\nimport SidePanel from '@/components/shared/page/SidePanel.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport {OrganizationSystemMessage} from '@/models/organization-system-message.model.js'\nimport {useOrganizationSystemMessageValidation} from '@/composables/use-organization-system-message-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {translationsApi} from '@/api/translations.api.js'\nimport {courseLanguageOptions} from '@/constants/courses.js'\nimport {\n  organizationSystemMessageTypes,\n  organizationSystemMessageOptions,\n  whatsappIncompatibleOrganizationSystemMessages\n} from '@/constants/organization-system-messages.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed, ref} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  organizationSystemMessage: {\n    type: OrganizationSystemMessage,\n    default: null,\n  },\n  isBusy: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {model, organizationSystemMessage} = toRefs(props)\nconst isEdit = computed(() => !!organizationSystemMessage.value)\nconst showWhatsappWarning = computed (() => whatsappIncompatibleOrganizationSystemMessages.includes(model.value.messageType))\n\n//General composables\nconst {organization} = useCurrentOrganization()\nconst {processError} = useErrorHandling()\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Validation\nconst {required} = useValidators()\nconst $externalResults = ref({})\nconst $v = useVuelidate({\n  messageType: {\n    required: required('Type'),\n  },\n  locale: {\n    required: required('Language'),\n  },\n  text: {\n    required: required('Text'),\n  },\n}, model, {$externalResults})\n\n//Apply external validation for message type/local combo\nconst {\n  isCheckingSystemMessageExists,\n} = useOrganizationSystemMessageValidation(organizationSystemMessage, model, $v, $externalResults)\n\n//Save\nconst confirm = () => {\n  if (!$v.value.$invalid && !$v.value.$pending) {\n    $v.value.$reset()\n    emit('confirm')\n  }\n}\n\n//Close and reset model\nconst onClose = () => {\n  updateModel({messageType: '', locale: '', text: ''})\n  emit('close')\n}\n\n//Handle setting default text translations where needed\nconst translation = ref(null)\nconst messagingKey = ref(null)\nconst shoudSetTextToDefaultTranslation = computed(() => (\n  model.value.locale.length &&\n  model.value.messageType.length &&\n  (!model.value.text?.trim()?.length || model.value.text === translation.value)\n)) //Text is empty or matches the default text\n\nconst updateLocale = value => {\n  updateModel({locale: value})\n  if (shoudSetTextToDefaultTranslation.value) {\n    setTextToDefaultTranslation()\n  }\n}\nconst updateMessageType = event =>{\n  messagingKey.value = event.option.key\n  updateModel({messageType: event.value})\n  if (shoudSetTextToDefaultTranslation.value) {\n    setTextToDefaultTranslation()\n  }\n}\n\nconst filteredMessageTypeOptions = computed(() => {\n  if (organization.value?.isTeams && !!organization.value?.teamsTenantId) {\n    return organizationSystemMessageOptions\n  }\n  else {\n    return organizationSystemMessageOptions\n      .filter(message => message.value !== organizationSystemMessageTypes.TEAMS_HELP)\n  }\n})\n\n//Set text to default translation\nconst setTextToDefaultTranslation = async () => {\n  try {\n    translation.value = await translationsApi.getByKey(model.value.locale, messagingKey.value)\n    updateModel({text: translation.value})\n  }\n  catch (error) {\n    processError(error)\n  }\n}\n</script>\n\n<template>\n  <SidePanel\n    is-centered\n    limited-width\n    @close=\"onClose()\"\n  >\n    <StepIndicators is-centered>\n      <StepIndicator\n        label=\"System message\"\n        icon=\"chat\"\n        :is-active=\"true\"\n      />\n    </StepIndicators>\n    <PageBlock :header=\"isEdit ? 'Edit system message' : 'Create a new system message'\">\n      <FormField\n        label=\"Type\"\n        :errors=\"$v.messageType.$errors\"\n        :sub-label=\"showWhatsappWarning ? 'This system message does not apply to WhatsApp enrollments. It will only be applied to enrollments using non-WhatsApp delivery providers.' : ''\"\n      >\n        <SelectInput\n          focus-on-mount\n          :is-clearable=\"false\"\n          test-id=\"type\"\n          placeholder=\"Select type\"\n          :options=\"filteredMessageTypeOptions\"\n          :value=\"model.messageType\"\n          :has-error=\"$v.messageType.$error && !$v.messageType.$pending\"\n          :has-spinner=\"isCheckingSystemMessageExists\"\n          @input=\"updateMessageType($event)\"\n          @dirty=\"$v.messageType.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Language\"\n        :errors=\"$v.locale.$errors\"\n      >\n        <SelectInput\n          required\n          test-id=\"language\"\n          placeholder=\"Select language\"\n          :options=\"courseLanguageOptions\"\n          :value=\"model.locale\"\n          :has-error=\"$v.locale.$error && !$v.locale.$pending\"\n          :has-spinner=\"isCheckingSystemMessageExists\"\n          @input=\"updateLocale($event.value)\"\n          @dirty=\"$v.locale.$touch()\"\n        />\n      </FormField>\n\n      <FormField\n        label=\"Text\"\n        :errors=\"$v.text.$errors\"\n      >\n        <TextInput\n          required\n          test-id=\"text\"\n          :value=\"model.text\"\n          show-emoji-picker\n          :maxlength=\"400\"\n          :minlength=\"2\"\n          is-multiline\n          :has-error=\"$v.text.$error && !$v.text.$pending\"\n          @input=\"updateModel({text: $event.value})\"\n        />\n      </FormField>\n    </PageBlock>\n    <CancelConfirmBar\n      :is-disabled-confirm=\"isBusy || $v.$invalid\"\n      :has-spinner-confirm=\"isBusy\"\n      :label-confirm=\"isEdit ? 'Save' : 'Create system message'\"\n      @cancel=\"onClose()\"\n      @confirm=\"confirm()\"\n    />\n  </SidePanel>\n</template>\n","import {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {organizationSystemMessagesApi} from '@/api/organization-system-messages.api.js'\nimport {ref} from 'vue'\n\n/**\n * System message creation composable\n */\nexport function useOrganizationSystemMessageCreation() {\n\n  //Flash messages\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n\n  //Refs\n  const isCreatingOrganizationSystemMessage = ref(false)\n  const model = ref({\n    messageType: '',\n    locale: '',\n    text: '',\n  })\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Create system message\n  const createOrganizationSystemMessage = async () => {\n\n    //Base data\n    const data = {\n      messageType: model.value.messageType,\n      locale: model.value.locale,\n      text: model.value.text,\n    }\n\n    //Toggle flag\n    isCreatingOrganizationSystemMessage.value = true\n\n    //Create\n    try {\n      const organizationSystemMessage = await organizationSystemMessagesApi.create(data)\n      setFlashSuccess('System message created')\n      model.value = {\n        messageType: '',\n        locale: '',\n        text: '',\n      }\n      return organizationSystemMessage\n    }\n    catch (error) {\n      setFlashFailure('Failed to create system message')\n      throw error\n    }\n    finally {\n      isCreatingOrganizationSystemMessage.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    isCreatingOrganizationSystemMessage,\n    updateModel,\n    createOrganizationSystemMessage,\n  }\n}\n","import {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {organizationSystemMessagesApi} from '@/api/organization-system-messages.api.js'\nimport {ref} from 'vue'\n\n/**\n * System message editing composable\n */\nexport function useOrganizationSystemMessageEditing() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n\n  //Refs\n  const isUpdatingOrganizationSystemMessage = ref(false)\n  const organizationSystemMessageBeingEdited = ref(null)\n  const model = ref({\n    messageType: '',\n    locale: '',\n    text: '',\n  })\n\n  //Keys\n  const keys = Object.keys(model.value)\n\n  //Set system message being edited\n  const setOrganizationSystemMessageBeingEdited = organizationSystemMessage => {\n    organizationSystemMessageBeingEdited.value = organizationSystemMessage\n    keys.forEach(key => model.value[key] = organizationSystemMessage[key])\n  }\n\n  //Clear organizationSystemMessage being edited\n  const clearOrganizationSystemMessageBeingEdited = () => {\n    organizationSystemMessageBeingEdited.value = null\n    keys.forEach(key => model.value[key] = '')\n  }\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Update system message\n  const updateOrganizationSystemMessage = async () => {\n\n    //Must have system message\n    if (!organizationSystemMessageBeingEdited.value || !organizationSystemMessageBeingEdited.value.id) {\n      throw new Error('No system message or system message without ID')\n    }\n\n    //Base data\n    const data = {\n      messageType: model.value.messageType,\n      locale: model.value.locale,\n      text: model.value.text,\n    }\n\n    //Toggle flag\n    isUpdatingOrganizationSystemMessage.value = true\n\n    //Update\n    try {\n      const organizationSystemMessage = await organizationSystemMessagesApi.updateById(organizationSystemMessageBeingEdited.value.id, data)\n      setFlashSuccess('System message saved')\n      keys.forEach(key => organizationSystemMessageBeingEdited.value[key] = organizationSystemMessage[key])\n      clearOrganizationSystemMessageBeingEdited()\n      return organizationSystemMessage\n    }\n    catch (error) {\n      setFlashFailure('Failed to save system message')\n      throw error\n    }\n    finally {\n      isUpdatingOrganizationSystemMessage.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    organizationSystemMessageBeingEdited,\n    isUpdatingOrganizationSystemMessage,\n    setOrganizationSystemMessageBeingEdited,\n    clearOrganizationSystemMessageBeingEdited,\n    updateModel,\n    updateOrganizationSystemMessage,\n  }\n}\n","import {useItemRemoval} from '@/composables/use-item-removal.js'\nimport {organizationSystemMessagesApi} from '@/api/organization-system-messages.api.js'\n\n/**\n * System message removal wrapper composable\n */\nexport function useOrganizationSystemMessageRemoval() {\n\n  //Use item removal\n  const {\n    itemsToRemove: organizationSystemMessagesToRemove,\n    numItemsToRemove: numOrganizationSystemMessagesToRemove,\n    hasItemsToRemove: hasOrganizationSystemMessagesToRemove,\n    isRemovingItems: isRemovingOrganizationSystemMessages,\n    setItemsToRemove: setOrganizationSystemMessagesToRemove,\n    clearItemsToRemove: clearOrganizationSystemMessagesToRemove,\n    removeItems: removeOrganizationSystemMessages,\n  } = useItemRemoval({\n    noun: 'system message',\n    removeById: id => organizationSystemMessagesApi.removeById(id),\n    removeManyById: ids => organizationSystemMessagesApi.removeManyById(ids),\n  })\n\n  //Expose interface\n  return {\n    organizationSystemMessagesToRemove,\n    numOrganizationSystemMessagesToRemove,\n    hasOrganizationSystemMessagesToRemove,\n    isRemovingOrganizationSystemMessages,\n    setOrganizationSystemMessagesToRemove,\n    clearOrganizationSystemMessagesToRemove,\n    removeOrganizationSystemMessages,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport OrganizationSystemMessageFilter from '@/components/settings/organization-system-messages/OrganizationSystemMessageFilter.vue'\nimport SearchPanel from '@/components/shared/search/SearchPanel.vue'\nimport ConfirmOrganizationSystemMessageRemovalModal from '@/components/settings/organization-system-messages/ConfirmOrganizationSystemMessageRemovalModal.vue'\nimport CreateOrEditOrganizationSystemMessagePanel from '@/components/settings/organization-system-messages/CreateOrEditOrganizationSystemMessagePanel.vue'\nimport OrganizationSystemMessageActionsMenu from '@/components/settings/organization-system-messages/OrganizationSystemMessageActionsMenu.vue'\nimport {organizationSystemMessagesApi} from '@/api/organization-system-messages.api.js'\nimport {useItemSelection} from '@/composables/use-item-selection.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useOrganizationSystemMessageCreation} from '@/composables/use-organization-system-message-creation.js'\nimport {useOrganizationSystemMessageEditing} from '@/composables/use-organization-system-message-editing.js'\nimport {useOrganizationSystemMessageRemoval} from '@/composables/use-organization-system-message-removal.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useSearch} from '@/composables/use-search.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {organizationSystemMessageOptions} from '@/constants/organization-system-messages.js'\nimport {languageOptions} from '@/constants/languages.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('System messages')\n\n//Querying\nconst {\n  items: organizationSystemMessages,\n  total: totalOrganizationSystemMessages,\n  queryItems: queryOrganizationSystemMessages,\n  loadItems: loadOrganizationSystemMessages,\n  loadItemsForPage: loadOrganizationSystemMessagesForPage,\n  reloadItems: reloadOrganizationSystemMessages,\n  isLoadingItems: isLoadingOrganizationSystemMessages,\n  sort,\n  filter,\n  numActiveFilters,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n  changeSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => organizationSystemMessagesApi.query(...args),\n  filter: {\n    messageTypes: [],\n    locales: [],\n  },\n  sort: '-updatedAt',\n  key: 'organizationSystemMessagesOverview',\n})\n\n//Searching\nconst fullSearchHandler = search => changeSearch(search)\nconst partialSearchHandler = search => queryOrganizationSystemMessages({search}, true)\nconst {\n  searchTerm,\n  partialSearchResults,\n  partialSearch,\n  fullSearch,\n  clearSearch,\n} = useSearch(fullSearchHandler, partialSearchHandler)\n\n//Item selection\nconst selectedOrganizationSystemMessages = ref([])\nconst {\n  toggleAllItems: toggleAllOrganizationSystemMessages,\n  toggleItem: toggleOrganizationSystemMessage,\n  numSelectedItems: numSelectedOrganizationSystemMessages,\n  hasSelectedItems: hasSelectedOrganizationSystemMessages,\n  unselectAllItems: unselectAllOrganizationSystemMessages,\n} = useItemSelection(organizationSystemMessages, selectedOrganizationSystemMessages)\n\n//System message creation and modal management\nconst {\n  model: modelForCreation,\n  updateModel: updateModelForCreation,\n  isCreatingOrganizationSystemMessage,\n  createOrganizationSystemMessage,\n} = useOrganizationSystemMessageCreation()\nconst {\n  isValue: isShowingCreatePanel,\n  setTrue: showCreatePanel,\n  setFalse: hideCreatePanel,\n} = useValueToggle()\nconst confirmOrganizationSystemMessageCreation = async () => {\n  try {\n    await createOrganizationSystemMessage()\n    hideCreatePanel()\n    reloadOrganizationSystemMessages()\n  }\n  catch {\n    //Handled by useOrganizationSystemMessageCreation\n  }\n}\n\n//System message editing\nconst {\n  model: modelForEditing,\n  updateModel: updateModelForEditing,\n  organizationSystemMessageBeingEdited,\n  setOrganizationSystemMessageBeingEdited,\n  clearOrganizationSystemMessageBeingEdited,\n  isUpdatingOrganizationSystemMessage,\n  updateOrganizationSystemMessage,\n} = useOrganizationSystemMessageEditing()\nconst confirmOrganizationSystemMessageUpdate = async () => {\n  try {\n    await updateOrganizationSystemMessage()\n    reloadOrganizationSystemMessages()\n  }\n  catch {\n    //Handled by useOrganizationSystemMessageEditing\n  }\n}\n\n//System message removal\nconst {\n  organizationSystemMessagesToRemove,\n  hasOrganizationSystemMessagesToRemove,\n  isRemovingOrganizationSystemMessages,\n  setOrganizationSystemMessagesToRemove,\n  clearOrganizationSystemMessagesToRemove,\n  removeOrganizationSystemMessages,\n} = useOrganizationSystemMessageRemoval()\nconst confirmOrganizationSystemMessageRemoval = async () => {\n  try {\n    await removeOrganizationSystemMessages()\n    reloadOrganizationSystemMessages()\n    unselectAllOrganizationSystemMessages()\n  }\n  catch {\n    //Handled by useOrganizationSystemMessageRemoval\n  }\n}\n\n//Get labels for table\nconst getLanguageLabel = locale => languageOptions.find(lo => lo.value === locale).label\nconst getOrganizationSystemMessageLabel = messageType => organizationSystemMessageOptions.find(sm => sm.value === messageType).label\n\n//Load system messsages\nloadOrganizationSystemMessages()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchPanel\n          :search-results=\"partialSearchResults\"\n          :search-term=\"searchTerm\"\n          result-label-prop=\"text\"\n          @clear-search=\"clearSearch()\"\n          @full-search=\"fullSearch($event.searchTerm)\"\n          @partial-search=\"partialSearch($event.searchTerm)\"\n          @select-result=\"setOrganizationSystemMessageBeingEdited($event.result)\"\n        />\n      </template>\n      <template #filters>\n        <OrganizationSystemMessageFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @change-filter=\"changeFilter($event.value)\"\n          @reset-filter=\"resetFilter()\"\n        />\n      </template>\n      <template #actions>\n        <CreateButton @click=\"showCreatePanel()\" />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template\n            v-if=\"searchTerm\"\n            #headerText\n          >\n            <Inflect\n              text=\"search result\"\n              :count=\"totalOrganizationSystemMessages\"\n              include-count\n            />\n            for \"{{ searchTerm }}\"\n          </template>\n          <template\n            v-else\n            #headerText\n          >\n            <Inflect\n              text=\"system message\"\n              :count=\"totalOrganizationSystemMessages\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"organizationSystemMessages\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalOrganizationSystemMessages\"\n        :selected-items=\"selectedOrganizationSystemMessages\"\n        :is-loading=\"isLoadingOrganizationSystemMessages\"\n        can-select-items\n        @load-page=\"loadOrganizationSystemMessagesForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n        @toggle-item=\"toggleOrganizationSystemMessage($event.item)\"\n        @toggle-all-items=\"toggleAllOrganizationSystemMessages()\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.messageType\"\n            is-sortable\n            sort-prop=\"messageType\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Message Type\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.locale\"\n            is-sortable\n            sort-prop=\"locale\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Language\n          </TableHeaderCell>\n          <TableHeaderCell :class=\"$style.text\">\n            Text\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: organizationSystemMessage}\">\n          <TableCell\n            :class=\"$style.messageType\"\n            is-clickable\n            @click=\"setOrganizationSystemMessageBeingEdited(organizationSystemMessage)\"\n          >\n            <strong>{{ getOrganizationSystemMessageLabel(organizationSystemMessage.messageType) }}</strong>\n          </TableCell>\n          <TableCell :class=\"$style.locale\">\n            {{ getLanguageLabel(organizationSystemMessage.locale) }}\n          </TableCell>\n          <TableCell :class=\"$style.text\">\n            {{ organizationSystemMessage.text }}\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: organizationSystemMessage, index}\">\n          <OrganizationSystemMessageActionsMenu\n            :test-id=\"`organizationSystemMessageActionsMenu${index + 1}`\"\n            @edit=\"setOrganizationSystemMessageBeingEdited(organizationSystemMessage)\"\n            @remove=\"setOrganizationSystemMessagesToRemove(organizationSystemMessage)\"\n          />\n        </template>\n\n        <template #bulkActions>\n          <BulkActionsBar\n            v-if=\"hasSelectedOrganizationSystemMessages\"\n            item-type=\"system message\"\n            :num-selected=\"numSelectedOrganizationSystemMessages\"\n            @clear-selection=\"unselectAllOrganizationSystemMessages()\"\n          >\n            <BulkAction\n              label=\"Delete\"\n              icon=\"delete\"\n              is-icon-outlined\n              @click=\"setOrganizationSystemMessagesToRemove(selectedOrganizationSystemMessages)\"\n            />\n          </BulkActionsBar>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <ConfirmOrganizationSystemMessageRemovalModal\n      :organization-system-messages=\"organizationSystemMessagesToRemove\"\n      :is-open=\"hasOrganizationSystemMessagesToRemove\"\n      :is-removing=\"isRemovingOrganizationSystemMessages\"\n      @close=\"clearOrganizationSystemMessagesToRemove()\"\n      @confirm=\"confirmOrganizationSystemMessageRemoval()\"\n    />\n    <template #sidePanels>\n      <CreateOrEditOrganizationSystemMessagePanel\n        v-if=\"isShowingCreatePanel\"\n        :model=\"modelForCreation\"\n        :is-busy=\"isCreatingOrganizationSystemMessage\"\n        @close=\"hideCreatePanel()\"\n        @update=\"updateModelForCreation($event.data)\"\n        @confirm=\"confirmOrganizationSystemMessageCreation()\"\n      />\n      <CreateOrEditOrganizationSystemMessagePanel\n        v-if=\"!!organizationSystemMessageBeingEdited\"\n        :model=\"modelForEditing\"\n        :organization-system-message=\"organizationSystemMessageBeingEdited\"\n        :is-busy=\"isUpdatingOrganizationSystemMessage\"\n        @close=\"clearOrganizationSystemMessageBeingEdited()\"\n        @update=\"updateModelForEditing($event.data)\"\n        @confirm=\"confirmOrganizationSystemMessageUpdate()\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.messageType {\n  flex: 1;\n}\n.text {\n  flex: 3;\n}\n.locale {\n  flex: 1;\n}\n</style>\n","<script setup>\nimport TagsOverview from '@/components/settings/tags/TagsOverview.vue'\nimport ChannelsOverview from '@/components/settings/channels/ChannelsOverview.vue'\nimport OrganizationSystemMessagesOverview from '@/components/settings/organization-system-messages/OrganizationSystemMessagesOverview.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Settings')\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n\n  //Rails pages\n  {\n    label: 'User',\n    key: 'user',\n    href: '/users/:userId/edit',\n  },\n  {\n    label: 'Organization',\n    key: 'organization',\n    href: '/organizations/:orgId/edit',\n  },\n  {\n    label: 'Members',\n    key: 'members',\n    href: '/memberships',\n  },\n  {\n    label: 'Security log',\n    key: 'securityLog',\n    href: '/versions',\n  },\n  {\n    label: 'Integrations',\n    key: 'integrations',\n    href: '/organizations/:orgId/integrations',\n  },\n  {\n    label: 'Metadata',\n    key: 'metadataFields',\n    href: '/metadata_fields',\n  },\n\n  //Vue tabs\n  {\n    label: 'Tags',\n    key: 'tags',\n    component: 'TagsOverview',\n  },\n  {\n    label: 'Channels',\n    key: 'channels',\n    component: 'ChannelsOverview',\n  },\n  {\n    label: 'System messages',\n    key: 'organization_system_messages',\n    component: 'OrganizationSystemMessagesOverview',\n  },\n])\n\n//Component refs\n//NOTE: Because if we pass components directly to the tabs, they will become\n//reactive which can have negative performance implications\nconst componentRefs = {\n  TagsOverview,\n  ChannelsOverview,\n  OrganizationSystemMessagesOverview,\n}\n</script>\n\n<template>\n  <div>\n    <TabNavigation\n      :class=\"$style.tabNavigation\"\n      is-large\n      with-auto-routing\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      @change-tab=\"setActiveTab($event.tab)\"\n    />\n\n    <component\n      :is=\"componentRefs[activeTab.component]\"\n      v-if=\"activeTab.component\"\n    />\n  </div>\n</template>\n\n<style module lang=\"scss\">\n.tabNavigation {\n  margin: 0 1rem;\n  margin-bottom: 1rem;\n}\n</style>\n","<script setup>\n\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  data: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Convert data to array of items\nconst {data} = toRefs(props)\nconst items = computed(() => Object.entries(data.value).map(([key, value]) => ({\n  key, value,\n})))\n</script>\n\n<template>\n  <OverviewTable :items=\"items\">\n    <template #headerRow>\n      <TableHeaderCell :class=\"$style.key\">\n        Key\n      </TableHeaderCell>\n      <TableHeaderCell :class=\"$style.value\">\n        Value\n      </TableHeaderCell>\n    </template>\n\n    <template #row=\"{item}\">\n      <TableCell :class=\"$style.key\">\n        <strong>{{ item.key }}</strong>\n      </TableCell>\n      <TableCell :class=\"$style.value\">\n        {{ item.value }}\n      </TableCell>\n    </template>\n  </OverviewTable>\n</template>\n\n<style module lang=\"scss\">\n.key {\n  flex: 0 0 17.5rem;\n}\n.value {\n  flex: 1;\n}\n</style>\n","import {ModelApi} from '@/api/model.api.js'\nimport {formatDate} from '@/helpers/date-and-time.js'\nimport {dateFormats} from '@/constants/date-and-time.js'\n\n/**\n * Super admin API\n */\nexport class SuperAdminApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/super_admin'\n\n  /**\n   * Generate signup code\n   */\n  generateSignupCode() {\n    return this\n      .post(`/generate_signup_code`)\n      .then(data => data.code)\n  }\n\n  /**\n   * Generate demo data\n   */\n  generateDemoData(organizationId) {\n    return this\n      .post(`/generate_demo_data`, {organizationId})\n  }\n\n  /**\n   * Enrollment checker\n   */\n  enrollmentChecker(enrollmentId) {\n    return this\n      .post(`/enrollment_checker`, {enrollmentId})\n  }\n\n  /**\n   * Object lookup\n   */\n  performObjectLookup(params) {\n    return this\n      .post(`/perform_object_lookup`, params)\n      .then(data => {\n        if (data.queryResults.length === 0) {\n          return {fields: [], results: []}\n        }\n        const fields = Object.keys(data.queryResults[0])\n        const results = data.queryResults\n        return {fields, results}\n      })\n  }\n\n  /**\n   * Get KPI data\n   */\n  getKpiData(params) {\n    return this\n      .post(`/get_kpi_data`, params)\n  }\n\n  /**\n   * Get product usage metrics\n   */\n  getProductUsageMetrics(params) {\n    return this\n      .get(`/product_usage_metrics`, params)\n  }\n\n  /**\n   * Get message deliveries\n   */\n  getMessageDeliveries() {\n    return this\n      .get(`/setup_message_deliveries`)\n      .then(data => {\n        if (data.length === 0) {\n          return {dates: [], items: []}\n        }\n        const dates = Object.keys(data[0]).filter(key => key !== 'organization')\n        const items = data.map(item => ({\n          organization: item.organization,\n          dates: dates.map(date => item[date]),\n        }))\n        return {dates, items}\n      })\n  }\n\n  /**\n   * Download customer insights CSV\n   */\n  downloadCustomerInsightsCsv(params, filename = 'customer_insights') {\n    this.downloadCsv('insights_table_data_csv', params, filename)\n  }\n\n  /**\n   * Download arist reports CSV\n   */\n  downloadAristReportsCsv(params) {\n\n    //Determine filename\n    const from = formatDate(params.dateRangeBegin, dateFormats.DATE)\n    const to = formatDate(params.dateRangeEnd, dateFormats.DATE)\n    const filename = `Product usage metrics ${from} - ${to}`\n\n    //Download CSV\n    this.downloadCsv('arist_reports/product_usage_metrics', {\n      ...params,\n      csv: true,\n    }, filename)\n  }\n\n  /**\n   * Get Capacity Data\n   */\n  getCapacityData(params) {\n    return this\n      .post(`/get_capacity_data`, params)\n  }\n}\n\n//Export singleton instance\nexport const superAdminApi = new SuperAdminApi()\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport KeyValueTable from '@/components/shared/table/KeyValueTable.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {label: 'Enrollment', key: 'enrollment'},\n  {label: 'User', key: 'user'},\n  {label: 'Address', key: 'address'},\n  {label: 'Schedule', key: 'schedule'},\n  {label: 'Course', key: 'course'},\n  {label: 'Organization', key: 'organization'},\n])\n\n//Refs\nconst enrollmentId = ref('')\nconst enrollment = ref(null)\nconst user = ref(null)\nconst address = ref(null)\nconst distribution = ref(null)\nconst course = ref(null)\nconst organization = ref(null)\nconst situation = ref('')\nconst isLoading = ref(false)\n\n//Clear data\nconst clearData = () => {\n  enrollment.value = null\n  user.value = null\n  address.value = null\n  distribution.value = null\n  course.value = null\n  organization.value = null\n  situation.value = ''\n}\n\n//Check enrollment\nconst checkEnrollment = async () => {\n  try {\n\n    //Load data\n    isLoading.value = true\n    const data = await superAdminApi.enrollmentChecker(enrollmentId.value)\n\n    //Set values\n    enrollment.value = data.enrollment\n    user.value = data.user\n    address.value = data.address\n    distribution.value = data.distribution\n    course.value = data.course\n    organization.value = data.organization\n    situation.value = data.situation\n  }\n  catch {\n    //Handled by server error interceptor\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Update enrollment ID\nconst updateEnrollmentId = value => {\n  enrollmentId.value = value\n  if (enrollmentId.value) {\n    checkEnrollment()\n  }\n  else {\n    clearData()\n  }\n}\n\n// 8f69ee5d-f056-456e-b2b2-ff88a2bab36f\n\n//Debounced wrapper\nconst updateEnrollmentIdDebounced = useDebounceFn(updateEnrollmentId, 500)\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #filters>\n        <TextInput\n          :class=\"$style.input\"\n          :value=\"enrollmentId\"\n          placeholder=\"Enter enrollment ID\"\n          :has-spinner=\"isLoading\"\n          @input=\"updateEnrollmentIdDebounced($event.value)\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <template v-if=\"enrollment\">\n      <TabNavigation\n        :tabs=\"tabs\"\n        :active-tab=\"activeTab\"\n        @change-tab=\"setActiveTab($event.tab)\"\n      />\n\n      <PageBlock\n        v-if=\"activeTab.key === 'enrollment'\"\n        header=\"Enrollment\"\n        :subheader=\"`Situation: ${situation[0]}`\"\n      >\n        <template #headerAside>\n          <EnrollmentStatus :status=\"situation[0]\" />\n        </template>\n        <KeyValueTable :data=\"enrollment\" />\n      </PageBlock>\n\n      <PageBlock\n        v-else-if=\"activeTab.key === 'user'\"\n        header=\"User\"\n      >\n        <KeyValueTable :data=\"user\" />\n      </PageBlock>\n\n      <PageBlock\n        v-else-if=\"activeTab.key === 'address'\"\n        header=\"Address\"\n      >\n        <KeyValueTable :data=\"address\" />\n      </PageBlock>\n\n      <PageBlock\n        v-else-if=\"activeTab.key === 'schedule'\"\n        header=\"Schedule\"\n      >\n        <KeyValueTable :data=\"distribution\" />\n      </PageBlock>\n\n      <PageBlock\n        v-else-if=\"activeTab.key === 'course'\"\n        header=\"Course\"\n      >\n        <KeyValueTable :data=\"course\" />\n      </PageBlock>\n\n      <PageBlock\n        v-else-if=\"activeTab.key === 'organization'\"\n        header=\"Organization\"\n      >\n        <KeyValueTable :data=\"organization\" />\n      </PageBlock>\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.input {\n  width: 350px;\n}\n</style>\n","<script setup>\nimport {ref, watch, onMounted, nextTick} from 'vue'\nimport {Bar} from 'vue-chartjs'\nimport {Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale} from 'chart.js'\n\nChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)\n\n// Props\nconst props = defineProps({\n  chartdata: {\n    type: Object,\n    required: true,\n  },\n})\n\n// Refs\nconst chartRef = ref(null)\nconst options = ref({\n  scales: {\n    y: {\n      beginAtZero: true,\n      grid: {\n        display: true,\n      },\n    },\n    x: {\n      grid: {\n        display: false,\n      },\n    },\n  },\n  plugins: {\n    legend: {\n      display: true,\n    },\n  },\n  responsive: true,\n  maintainAspectRatio: false,\n})\n\n// Methods\nfunction renderBarChart() {\n  if (chartRef.value && chartRef.value.chart) {\n    chartRef.value.chart.update()\n  }\n}\n\n// Watchers\nwatch(() => props.chartdata, () => {\n  nextTick(() => {\n    renderBarChart()\n  })\n}, {deep: true})\n\n// Lifecycle hooks\nonMounted(() => {\n  renderBarChart()\n})\n</script>\n\n<template>\n  <Bar\n    ref=\"chartRef\"\n    :data=\"chartdata\"\n    :options=\"options\"\n    :height=\"350\"\n  />\n</template>\n","import {ModelApi} from '@/api/model.api.js'\nimport {Organization} from '@/models/organization.model.js'\n\n/**\n * Organizations API service\n */\nexport class OrganizationsApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/organizations'\n  itemKey = 'organization'\n  itemsKey = 'organizations'\n  ModelClass = Organization\n\n  /**\n   * Check if an organization has data\n   */\n  checkHasData(organizationId) {\n    return this\n      .get(`/${organizationId}/check_has_data`)\n      .then(data => data.hasData)\n  }\n\n  /**\n   * Download CSV of organizations\n   */\n  downloadCsv(params) {\n    this.openUrl(`/csv`, params)\n  }\n}\n\n//Export singleton instance\nexport const organizationsApi = new OrganizationsApi()\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport BarChart from '@/components/shared/other/BarChart.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport {dateTokens} from '@/constants/date-and-time.js'\nimport {tokenToDateTime} from '@/helpers/date-and-time.js'\nimport {organizationsApi} from '@/api/organizations.api.js'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {onMounted, ref} from 'vue'\n\n//Get user timezone\nconst {timezone} = useTimezone()\n\n//Refs\nconst organizations = ref([])\nconst isLoading = ref(true)\nconst params = ref({\n  organizationIds: [],\n  dateRange: [\n    tokenToDateTime(dateTokens.THIRTY_DAYS_AGO, timezone.value),\n    tokenToDateTime(dateTokens.NOW, timezone.value),\n  ],\n})\n\n//Categories\nconst categories = ref([\n  {\n    title: 'Users',\n    key:   'user',\n    chartData: [],\n    cardData: [],\n  },\n  {\n    title: 'All courses',\n    key:   'all_course',\n    chartData: [],\n    cardData: [],\n  },\n  {\n    title: 'Courses from templates',\n    key:   'template_course',\n    chartData: [],\n    cardData: [],\n  },\n  {\n    title: 'Courses by users',\n    key:   'user_course',\n    chartData: [],\n    cardData: [],\n  },\n  {\n    title: 'Other',\n    key:   'other',\n    chartData: [],\n    cardData: [],\n  },\n])\n\n//Preset dates\nconst presetDates = [\n  {\n    label: 'Any',\n    value: [null, null],\n  },\n  {\n    label: 'Past 30 days',\n    value: [\n      dateTokens.THIRTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 60 days',\n    value: [\n      dateTokens.SIXTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 90 days',\n    value: [\n      dateTokens.NINETY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n]\n\n//Load data\nconst loadData = async () => {\n  try {\n\n    //Flag as loading\n    isLoading.value = true\n\n    //Load data\n    const {chartData, cardData} = await superAdminApi.getKpiData({\n      organizationIds: params.value.organizationIds,\n      dateRangeBegin: params.value.dateRange[0] || null,\n      dateRangeEnd: params.value.dateRange[1] || null,\n    })\n\n    //Update data on categories\n    categories.value.forEach(category => {\n      category.chartData = chartData.filter(chartData => chartData.dataCategory === category.key)\n      category.cardData = cardData.filter(cardData => cardData.dataCategory === category.key)\n    })\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Update params\nconst updateParams = (key, value) => {\n  params.value[key] = value\n  loadData()\n}\n\n//On mounted\nonMounted(async () => {\n\n  //Load organizations\n  const data = await organizationsApi.query({sort: 'name'})\n  organizations.value = data.organizations\n\n  //Load KPI data\n  await loadData()\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoading\" />\n    <template v-else>\n      <OverviewTableHeader>\n        <template #filters>\n          <SelectInput\n            :class=\"$style.filter\"\n            value-prop=\"id\"\n            label-prop=\"name\"\n            :value=\"params.organizationIds\"\n            :options=\"organizations\"\n            placeholder=\"Filter by organization\"\n            is-multiselect\n            @input=\"updateParams('organizationIds', $event.value)\"\n          />\n          <DateInput\n            :class=\"$style.filter\"\n            :value=\"params.dateRange\"\n            :preset-dates=\"presetDates\"\n            alignment=\"right\"\n            is-range\n            @input=\"updateParams('dateRange', $event.value)\"\n          />\n        </template>\n      </OverviewTableHeader>\n\n      <section\n        v-for=\"category in categories\"\n        :key=\"category.key\"\n        :class=\"$style.section\"\n      >\n        <h4>{{ category.title }}</h4>\n        <InfoCardsGrid :cols=\"category.cardData.length\">\n          <InfoCard\n            v-for=\"(item, i) in category.cardData\"\n            :key=\"i\"\n            :value=\"item.value\"\n            :label=\"item.text\"\n            :help=\"item.tooltipText\"\n          />\n        </InfoCardsGrid>\n\n        <div :class=\"$style.charts\">\n          <div\n            v-for=\"(item, i) in category.chartData\"\n            :key=\"i\"\n            :class=\"$style.chart\"\n          >\n            <BarChart :chartdata=\"item.chartData\" />\n          </div>\n        </div>\n      </section>\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.filter {\n  flex: 0 0 20rem;\n}\n.section {\n  margin-top: 2rem;\n}\n.charts {\n  display: flex;\n  align-items: center;\n  gap: 2rem;\n}\n.chart {\n  flex: 1;\n}\n</style>\n","import {organizationsApi} from '@/api/organizations.api.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useDebounceFn} from '@vueuse/core'\nimport {ref} from 'vue'\n\n/**\n * Organization validation composable\n */\nexport function useOrganizationValidation(existingOrganization) {\n\n  //Composables\n  const {asyncValidator} = useValidators()\n\n  //Flag\n  const isCheckingOrganizationExists = ref(false)\n\n  //Check if organization exists by given properties\n  const checkOrganizationExists = async data => {\n    try {\n      isCheckingOrganizationExists.value = true\n      return await organizationsApi.checkExists({\n        ...data,\n        excludeId: existingOrganization?.value?.id || null,\n      })\n    }\n    finally {\n      isCheckingOrganizationExists.value = false\n    }\n  }\n\n  //Debounced check for organization existence\n  const checkOrganizationExistsDebounced = useDebounceFn(checkOrganizationExists, 500)\n\n  //Unique organization name validator\n  const uniqueName = asyncValidator(\n    'A organization with this name already exists',\n    async name => {\n      if (!name) {\n        return true\n      }\n      const exists = await checkOrganizationExistsDebounced({name})\n      return !exists\n    }\n  )\n\n  //Expose interface\n  return {\n    checkOrganizationExists,\n    checkOrganizationExistsDebounced,\n    isCheckingOrganizationExists,\n    uniqueName,\n  }\n}\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport {Organization} from '@/models/organization.model.js'\nimport {useOrganizationValidation} from '@/composables/use-organization-validation.js'\nimport {useValidators} from '@/composables/use-validators.js'\nimport {useVuelidate} from '@vuelidate/core'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n  organization: {\n    type: Organization,\n    default: null,\n  },\n  isBusy: {\n    type: Boolean,\n    default: false,\n  },\n})\n\n//Refs\nconst {model, organization} = toRefs(props)\nconst isEdit = computed(() => !!organization.value)\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n\n//Validation\nconst {uniqueName, isCheckingorganizationExists} = useOrganizationValidation(organization)\nconst {required, minValue} = useValidators()\nconst $v = useVuelidate({\n  name: {\n    required: required('Name'),\n    uniqueName,\n  },\n  licenseCount: {\n    minValue: minValue(0),\n  },\n}, model)\n\n//Save\nconst confirm = () => {\n  if (!$v.value.$invalid) {\n    emit('confirm')\n  }\n}\n\n//Open handler\nconst onOpen = () => {\n  $v.value.$reset()\n  emit('open')\n}\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    :header=\"isEdit ? 'Edit organization' : 'Create a new organization'\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"onOpen()\"\n  >\n    <FormField\n      label=\"Name\"\n      :errors=\"$v.name.$errors\"\n    >\n      <TextInput\n        name=\"name\"\n        required\n        :value=\"model.name\"\n        :has-error=\"$v.name.$error && !$v.name.$pending\"\n        :has-spinner=\"isCheckingorganizationExists\"\n        @input=\"updateModel({name: $event.value})\"\n        @dirty=\"$v.name.$touch()\"\n        @focus=\"$event.target.select()\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"License count\"\n      :errors=\"$v.licenseCount.$errors\"\n    >\n      <TextInput\n        name=\"licenseCount\"\n        required\n        :value=\"model.licenseCount\"\n        :has-error=\"$v.licenseCount.$error\"\n        @input=\"updateModel({licenseCount: $event.value})\"\n        @dirty=\"$v.licenseCount.$touch()\"\n        @focus=\"$event.target.select()\"\n      />\n    </FormField>\n\n    <FormField>\n      <Toggle\n        label=\"Test organization\"\n        :is-checked=\"model.isTest\"\n        @click=\"updateModel({isTest: !model.isTest})\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"isBusy || $v.$invalid\"\n        :has-spinner-confirm=\"isBusy\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"confirm()\"\n      />\n    </template>\n  </Modal>\n</template>\n","<script setup>\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport {Organization} from '@/models/organization.model.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\n\n//Emits and props\ndefineEmits([\n  'edit',\n  'switch',\n  'generate-demo-data',\n])\ndefineProps({\n  organization: {\n    type: Organization,\n    required: true,\n  },\n})\n\n//Check current organization\nconst {organization: currentOrganization} = useCurrentOrganization()\n</script>\n\n<template>\n  <ActionsDropdownMenu v-bind=\"$attrs\">\n    <DropdownMenuItem\n      label=\"Edit\"\n      @click=\"$emit('edit', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"organization.id !== currentOrganization.id\"\n      label=\"Switch to\"\n      @click=\"$emit('switch', $event)\"\n    />\n    <DropdownMenuItem\n      v-if=\"organization.isDemo && !organization.isGeneratingDemoData\"\n      label=\"Generate demo data\"\n      @click=\"$emit('generate-demo-data', $event)\"\n    />\n  </ActionsDropdownMenu>\n</template>\n","import {organizationsApi} from '@/api/organizations.api.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {ref} from 'vue'\n\n/**\n * Organization editing composable\n */\nexport function useOrganizationEditing() {\n\n  //Composables\n  const {setFlashSuccess, setFlashFailure} = useFlashMessages()\n  const {processError} = useErrorHandling()\n\n  //Refs\n  const isUpdatingOrganization = ref(false)\n  const organizationBeingEdited = ref(null)\n  const model = ref({\n    name: '',\n    licenseCount: null,\n    isTest: false,\n  })\n\n  //Keys\n  const keys = Object.keys(model.value)\n\n  //Set organization being edited\n  const setOrganizationBeingEdited = organization => {\n    organizationBeingEdited.value = organization\n    keys.forEach(key => model.value[key] = organization[key])\n  }\n\n  //Clear organization being edited\n  const clearOrganizationBeingEdited = () => {\n    organizationBeingEdited.value = null\n    keys.forEach(key => model.value[key] = '')\n  }\n\n  //Update model\n  const updateModel = data => Object.assign(model.value, data)\n\n  //Update organization\n  const updateOrganization = async () => {\n\n    //Must have organization\n    if (!organizationBeingEdited.value || !organizationBeingEdited.value.id) {\n      throw new Error('No organization or organization without ID')\n    }\n\n    //Base data\n    const data = {\n      name: model.value.name,\n      licenseCount: model.value.licenseCount,\n      isTest: model.value.isTest,\n    }\n\n    //Toggle flag\n    isUpdatingOrganization.value = true\n\n    //Create\n    try {\n      const organization = await organizationsApi.updateById(organizationBeingEdited.value.id, data)\n      setFlashSuccess('Organization updated')\n      keys.forEach(key => organizationBeingEdited.value[key] = organization[key])\n      clearOrganizationBeingEdited()\n      return organization\n    }\n    catch (error) {\n      setFlashFailure('Failed to update organization')\n      processError(error)\n      throw error\n    }\n    finally {\n      isUpdatingOrganization.value = false\n    }\n  }\n\n  //Expose interface\n  return {\n    model,\n    organizationBeingEdited,\n    isUpdatingOrganization,\n    setOrganizationBeingEdited,\n    clearOrganizationBeingEdited,\n    updateModel,\n    updateOrganization,\n  }\n}\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport PageBlockHeader from '@/components/shared/page/PageBlockHeader.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport Inflect from '@/components/shared/transform/Inflect.vue'\nimport Percentage from '@/components/shared/transform/Percentage.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport CreateOrEditOrganizationModal from '@/components/super_admin/CreateOrEditOrganizationModal.vue'\nimport OrganizationActionsMenu from '@/components/super_admin/OrganizationActionsMenu.vue'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useOrganizationEditing} from '@/composables/use-organization-editing.js'\nimport {useCopyToClipboard} from '@/composables/use-copy-to-clipboard.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {organizationsApi} from '@/api/organizations.api.js'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {ref} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Organizations')\n\n//Querying\nconst {\n  items: organizations,\n  total: totalOrganizations,\n  loadItems: loadOrganizations,\n  loadItemsForPage: loadOrganizationsForPage,\n  isLoadingItems: isLoadingOrganizations,\n  sort,\n  currentPage,\n  itemsPerPage,\n  changeItemsPerPage,\n  changeSort,\n} = useQuerying({\n  handler: (...args) => organizationsApi.query(...args),\n  sort: 'name',\n  key: 'organizationsOverview',\n})\n\n//Organization switching\nconst {switchOrganization} = useCurrentOrganization()\n\n//Download CSV\nconst downloadCsv = () => organizationsApi.downloadCsv()\n\n//Generate signup code\nconst isGeneratingSignupCode = ref(false)\nconst {copyToClipboard} = useCopyToClipboard()\nconst generateSignupCode = async () => {\n  try {\n    isGeneratingSignupCode.value = true\n    const code = await superAdminApi.generateSignupCode()\n    copyToClipboard(code, `Signup code ${code} copied to clipboard`)\n  }\n  finally {\n    isGeneratingSignupCode.value = false\n  }\n}\n\n//Generate demo data\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\nconst generateDemoData = async organization => {\n  try {\n    const hasData = await organizationsApi.checkHasData(organization.id)\n    if (hasData) {\n      return setFlashFailure('Organization already has data')\n    }\n    await superAdminApi.generateDemoData(organization.id)\n    setFlashSuccess('Demo data generation started (this can take a few minutes)')\n  }\n  catch {\n    setFlashFailure('Demo data generation failed')\n  }\n}\n\n//Organization editing\nconst {\n  model: modelForEditing,\n  updateModel: updateModelForEditing,\n  organizationBeingEdited,\n  setOrganizationBeingEdited,\n  clearOrganizationBeingEdited,\n  isUpdatingOrganization,\n  updateOrganization,\n} = useOrganizationEditing()\nconst confirmOrganizationUpdate = async () => {\n  try {\n    await updateOrganization()\n  }\n  catch {\n    //Handled by useOrganizationEditing\n  }\n}\n\n//Load organizations\nloadOrganizations()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #actions>\n        <ActionButton\n          type=\"secondary\"\n          label=\"Generate signup code\"\n          :is-disabled=\"isGeneratingSignupCode\"\n          :has-spinner=\"isGeneratingSignupCode\"\n          @click=\"generateSignupCode()\"\n        />\n        <DownloadButton @click=\"downloadCsv()\" />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock>\n      <template #header>\n        <PageBlockHeader>\n          <template #headerText>\n            <Inflect\n              text=\"organization\"\n              :count=\"totalOrganizations\"\n              include-count\n            />\n          </template>\n        </PageBlockHeader>\n      </template>\n\n      <OverviewTable\n        :items=\"organizations\"\n        :items-per-page=\"itemsPerPage\"\n        :current-page=\"currentPage\"\n        :total-items=\"totalOrganizations\"\n        :is-loading=\"isLoadingOrganizations\"\n        @load-page=\"loadOrganizationsForPage($event.page)\"\n        @change-items-per-page=\"changeItemsPerPage($event.itemsPerPage)\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            :class=\"$style.name\"\n            is-sortable\n            sort-prop=\"name\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Name\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.licenseCount\"\n            is-sortable\n            sort-prop=\"licenseCount\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            License count\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.numActivatedLearners\"\n            is-sortable\n            sort-prop=\"numActivatedLearners\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            # of activated learners\n          </TableHeaderCell>\n          <TableHeaderCell\n            :class=\"$style.adoptionRate\"\n            is-sortable\n            sort-prop=\"adoptionRate\"\n            :current-sort=\"sort\"\n            @sort=\"changeSort($event.sort)\"\n          >\n            Adoption rate\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item: organization}\">\n          <TableCell\n            :class=\"$style.name\"\n            is-clickable\n            @click=\"setOrganizationBeingEdited(organization)\"\n          >\n            <strong>{{ organization.name }}</strong>\n            <template #icons>\n              <Tooltip\n                v-if=\"organization.isTest\"\n                text=\"Test organization\"\n              >\n                <Icon\n                  icon=\"person_play\"\n                  size=\"s\"\n                  color=\"primary\"\n                />\n              </Tooltip>\n            </template>\n          </TableCell>\n          <TableCell\n            :class=\"$style.licenseCount\"\n            is-clickable\n            @click=\"setOrganizationBeingEdited(organization)\"\n          >\n            {{ organization.licenseCount }}\n          </TableCell>\n          <TableCell :class=\"$style.numActivatedLearners\">\n            {{ organization.numActivatedLearners }}\n          </TableCell>\n          <TableCell :class=\"$style.adoptionRate\">\n            <Percentage :fraction=\"organization.adoptionRate / 100\" />\n          </TableCell>\n        </template>\n\n        <template #itemActions=\"{item: organization}\">\n          <OrganizationActionsMenu\n            :organization=\"organization\"\n            @edit=\"setOrganizationBeingEdited(organization)\"\n            @switch=\"switchOrganization(organization)\"\n            @generate-demo-data=\"generateDemoData(organization)\"\n          />\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <CreateOrEditOrganizationModal\n      :model=\"modelForEditing\"\n      :organization=\"organizationBeingEdited\"\n      :is-open=\"!!organizationBeingEdited\"\n      :is-busy=\"isUpdatingOrganization\"\n      @close=\"clearOrganizationBeingEdited()\"\n      @update=\"updateModelForEditing($event.data)\"\n      @confirm=\"confirmOrganizationUpdate()\"\n    />\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.name {\n  flex: 5;\n}\n.licenseCount {\n  flex: 1 0 7rem;\n}\n.numActivatedLearners {\n  flex: 1 0 13rem;\n}\n.adoptionRate {\n  flex: 1 0 7rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {ref} from 'vue'\n\n//Load data\nconst dates = ref([])\nconst items = ref([])\nconst isLoadingDeliveries = ref(false)\nconst loadDeliveries = async () => {\n  try {\n    isLoadingDeliveries.value = true\n    const data = await superAdminApi.getMessageDeliveries()\n    dates.value = data.dates\n    items.value = data.items\n  }\n  finally {\n    isLoadingDeliveries.value = false\n  }\n}\n\n//Load\nloadDeliveries()\n</script>\n<template>\n  <PageWrapper>\n    <PageBlock\n      header=\"Teams interactions by date\"\n      subheader=\"Failure statuses: failed, permanent_failure\"\n    >\n      <p v-if=\"!isLoadingDeliveries && items.length === 0\">\n        No data available\n      </p>\n      <OverviewTable\n        :items=\"items\"\n        :is-loading=\"isLoadingDeliveries\"\n      >\n        <template #headerRow>\n          <TableHeaderCell>\n            Organization\n          </TableHeaderCell>\n          <TableHeaderCell\n            v-for=\"date in dates\"\n            :key=\"date\"\n          >\n            {{ date }}\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item}\">\n          <TableCell>\n            {{ item.organization }}\n          </TableCell>\n          <TableCell\n            v-for=\"(date, i) in dates\"\n            :key=\"date\"\n            :class=\"$style.data\"\n          >\n            {{ item.dates[i] }}\n          </TableCell>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.data {\n  white-space: pre-line;\n}\n</style>\n","<script setup>\nimport Modal from '@/components/shared/modals/Modal.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport {toRefs, computed} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'open',\n  'close',\n  'update',\n  'confirm',\n])\nconst props = defineProps({\n  model: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Refs\nconst {model} = toRefs(props)\n\n//Available models and related field options\nconst models = [\n  {\n    model: 'Address',\n    fields: ['value', 'id', 'teams_email', 'slack_email'],\n  },\n  {\n    model: 'Cohort',\n    fields: ['name', 'id'],\n  },\n  {\n    model: 'Course',\n    fields: ['name', 'id'],\n  },\n  {\n    model: 'Distribution',\n    fields: ['name', 'id'],\n  },\n  {\n    model: 'Enrollment',\n    fields: ['organization_id'],\n  },\n  {\n    model: 'Membership',\n    fields: ['user_id'],\n  },\n  {\n    model: 'Messages',\n    fields: ['enrollment_id'],\n  },\n  {\n    model: 'User',\n    fields: ['email', 'full_name', 'last_name', 'id'],\n  },\n]\n\n//Available model options\nconst modelOptions = models.map(item => ({\n  label: item.model,\n  value: item.model,\n}))\n\n//Available field options\nconst fieldOptions = computed(() => {\n  const selectedModel = models.find(item => item.model === model.value.model)\n  return selectedModel ? selectedModel.fields.map(field => ({\n    label: field.replace(/_/g, ''),\n    value: field,\n  })) : []\n})\n\n//Model updater\nconst updateModel = data => emit('update', {data})\n</script>\n\n<template>\n  <Modal\n    v-bind=\"$attrs\"\n    header=\"Lookup object\"\n    overflow=\"visible\"\n    close-on-key\n    @close=\"$emit('close')\"\n    @open=\"$emit('open')\"\n  >\n    <FormField\n      label=\"Model\"\n      is-required\n    >\n      <SelectInput\n        :value=\"model.model\"\n        :options=\"modelOptions\"\n        @input=\"updateModel({model: $event.value})\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"Search field\"\n      is-required\n    >\n      <SelectInput\n        :value=\"model.field\"\n        :options=\"fieldOptions\"\n        @input=\"updateModel({field: $event.value})\"\n      />\n    </FormField>\n\n    <FormField\n      label=\"Search value\"\n      is-required\n    >\n      <TextInput\n        :value=\"model.value\"\n        focus-on-mount\n        @input=\"updateModel({value: $event.value})\"\n        @focus=\"$event.target.select()\"\n      />\n    </FormField>\n\n    <FormField>\n      <Toggle\n        label=\"Allow partial search (can't be used for ID's)\"\n        :is-checked=\"model.partial\"\n        @click=\"updateModel({partial: !model.partial})\"\n      />\n    </FormField>\n\n    <template #footer>\n      <CancelConfirmBar\n        :is-disabled-confirm=\"!model.model || !model.field || !model.value\"\n        label-confirm=\"Search\"\n        @cancel=\"$emit('close')\"\n        @confirm=\"$emit('confirm')\"\n      />\n    </template>\n  </Modal>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport ObjectLookupModal from '@/components/super_admin/ObjectLookupModal.vue'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {toSnakeCase} from '@/helpers/string.js'\nimport {useValueToggle} from '@/composables/use-value-toggle.js'\nimport {useCopyToClipboard} from '@/composables/use-copy-to-clipboard.js'\nimport {ref} from 'vue'\n\n//Lookup model\nconst model = ref({\n  model: 'User',\n  field: 'email',\n  value: '',\n  partial: true,\n})\n\n//Model updater\nconst updateModel = data => Object.assign(model.value, data)\n\n//Modal toggle\nconst {\n  isValue: isShowingModal,\n  setTrue: showModal,\n  setFalse: hideModal,\n} = useValueToggle()\n\n//Copy to clipboard\nconst {copyToClipboard} = useCopyToClipboard()\n\n//Perform lookup\nconst fields = ref([])\nconst results = ref([])\nconst isLookingUp = ref(false)\nconst performLookup = async () => {\n  hideModal()\n  try {\n    isLookingUp.value = true\n    const data = await superAdminApi.performObjectLookup(model.value)\n    results.value = data.results\n    fields.value = data.fields\n  }\n  finally {\n    isLookingUp.value = false\n  }\n}\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #actions>\n        <ActionButton\n          type=\"primary\"\n          label=\"Lookup object\"\n          @click=\"showModal()\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <PageBlock header=\"Object lookup\">\n      <p v-if=\"!isLookingUp && results.length === 0\">\n        No data available\n      </p>\n      <OverviewTable\n        :items=\"results\"\n        :is-loading=\"isLookingUp\"\n      >\n        <template #headerRow>\n          <TableHeaderCell\n            v-for=\"field in fields\"\n            :key=\"field\"\n          >\n            {{ toSnakeCase(field).replace(/_/g, ' ') }}\n          </TableHeaderCell>\n        </template>\n\n        <template #row=\"{item}\">\n          <TableCell\n            v-for=\"field in fields\"\n            :key=\"field\"\n            is-clickable\n            @click=\"copyToClipboard(item[field], 'Value copied to clipboard')\"\n          >\n            {{ item[field] }}\n          </TableCell>\n        </template>\n      </OverviewTable>\n    </PageBlock>\n\n    <ObjectLookupModal\n      :is-open=\"isShowingModal\"\n      :model=\"model\"\n      @close=\"hideModal()\"\n      @update=\"updateModel($event.data)\"\n      @confirm=\"performLookup()\"\n    />\n  </PageWrapper>\n</template>\n","<script setup>\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport OverviewTable from '@/components/shared/table/OverviewTable.vue'\nimport TableHeaderCell from '@/components/shared/table/TableHeaderCell.vue'\nimport TableCell from '@/components/shared/table/TableCell.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport {computed, toRefs} from 'vue'\n\n//Emits and props\nconst props = defineProps({\n  header: {\n    type: String,\n    required: true,\n  },\n  data: {\n    type: Object,\n    required: true,\n  },\n})\n\n//Convert data to array of items\nconst {data} = toRefs(props)\nconst items = computed(() => Object.entries(data.value).map(([, value]) => value))\n</script>\n\n<template>\n  <PageBlock :header=\"header\">\n    <OverviewTable :items=\"items\">\n      <template #headerRow>\n        <TableHeaderCell :class=\"$style.group\">\n          Group\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.description\">\n          Description\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.calculation\">\n          Calculation\n        </TableHeaderCell>\n        <TableHeaderCell :class=\"$style.value\">\n          Value\n        </TableHeaderCell>\n      </template>\n\n      <template #row=\"{item}\">\n        <TableCell :class=\"$style.group\">\n          {{ item.group }}\n        </TableCell>\n        <TableCell :class=\"$style.description\">\n          {{ item.description }}\n        </TableCell>\n        <TableCell :class=\"$style.calculation\">\n          {{ item.calculation }}\n        </TableCell>\n        <TableCell :class=\"$style.value\">\n          <Help\n            v-if=\"typeof item.value ==='string' && item.value.startsWith('Not')\"\n            :text=\"item.value\"\n          />\n          <span v-else>{{ item.value }}</span>\n        </TableCell>\n      </template>\n    </OverviewTable>\n  </PageBlock>\n</template>\n\n<style module lang=\"scss\">\n.group {\n  flex: 0 0 11rem;\n}\n.description {\n  flex: 0 0 18rem;\n}\n.calculation {\n  flex: 1;\n}\n.value {\n  flex: 0 0 8rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport AristReportsTable from '@/components/super_admin/AristReportsTable.vue'\nimport {dateTokens} from '@/constants/date-and-time.js'\nimport {tokenToDateTime} from '@/helpers/date-and-time.js'\nimport {organizationsApi} from '@/api/organizations.api.js'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {onMounted, ref} from 'vue'\n\n//Get user timezone\nconst {timezone} = useTimezone()\n\n//Refs\nconst magicNumbers = ref({})\nconst generalUsage = ref({})\nconst featureAdoptionRate = ref({})\nconst organizations = ref([])\nconst isLoading = ref(true)\nconst params = ref({\n  organizationIds: [],\n  dateRange: [\n    tokenToDateTime(dateTokens.THIRTY_DAYS_AGO, timezone.value),\n    tokenToDateTime(dateTokens.NOW, timezone.value),\n  ],\n})\n\n//Preset dates\nconst presetDates = [\n  {\n    label: 'Any',\n    value: [null, null],\n  },\n  {\n    label: 'Past 30 days',\n    value: [\n      dateTokens.THIRTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 60 days',\n    value: [\n      dateTokens.SIXTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 90 days',\n    value: [\n      dateTokens.NINETY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n]\n\n//Load data\nconst loadData = async () => {\n  try {\n\n    //Flag as loading\n    isLoading.value = true\n\n    //Load data\n    const data = await superAdminApi.getProductUsageMetrics({\n      organizationIds: params.value.organizationIds,\n      dateRangeBegin: params.value.dateRange[0] || null,\n      dateRangeEnd: params.value.dateRange[1] || null,\n    })\n\n    //Set data\n    magicNumbers.value = data.magicNumbers\n    generalUsage.value = data.generalUsage\n    featureAdoptionRate.value = data.featureAdoptionRate\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\n//Update params\nconst updateParams = (key, value) => {\n  params.value[key] = value\n  loadData()\n}\n\n//Download report\nconst downloadReport = () => {\n  superAdminApi.downloadAristReportsCsv({\n    organizationIds: params.value.organizationIds,\n    dateRangeBegin: params.value.dateRange[0] || null,\n    dateRangeEnd: params.value.dateRange[1] || null,\n  })\n}\n\n//On mounted\nonMounted(async () => {\n\n  //Load organizations\n  const data = await organizationsApi.query({sort: 'name'})\n  organizations.value = data.organizations\n\n  //Load data\n  await loadData()\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoading\" />\n    <template v-else>\n      <OverviewTableHeader>\n        <template #filters>\n          <SelectInput\n            :class=\"$style.filter\"\n            value-prop=\"id\"\n            label-prop=\"name\"\n            :value=\"params.organizationIds\"\n            :options=\"organizations\"\n            placeholder=\"Filter by organization\"\n            is-multiselect\n            @input=\"updateParams('organizationIds', $event.value)\"\n          />\n          <DateInput\n            :class=\"$style.filter\"\n            :value=\"params.dateRange\"\n            :preset-dates=\"presetDates\"\n            alignment=\"right\"\n            is-range\n            @input=\"updateParams('dateRange', $event.value)\"\n          />\n        </template>\n        <template #actions>\n          <DownloadButton\n            @click=\"downloadReport()\"\n          />\n        </template>\n      </OverviewTableHeader>\n\n      <AristReportsTable\n        header=\"Magic numbers\"\n        :data=\"magicNumbers\"\n      />\n      <AristReportsTable\n        header=\"General usage\"\n        :data=\"generalUsage\"\n      />\n      <AristReportsTable\n        header=\"Feature adoption rate\"\n        :data=\"featureAdoptionRate\"\n      />\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.filter {\n  flex: 0 0 20rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport InfoCard from '@/components/shared/cards/InfoCard.vue'\nimport InfoCardsGrid from '@/components/shared/cards/InfoCardsGrid.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport {superAdminApi} from '@/api/super-admin.api.js'\nimport {onMounted, ref} from 'vue'\n\nconst isLoading = ref(true)\n\nconst categories = ref([\n  {\n    title: 'Scheduler',\n    key:   'scheduler',\n    cardData: [],\n  },\n])\n\nconst loadData = async () => {\n  try {\n\n    //Flag as loading\n    isLoading.value = true\n\n    const {cardData} = await superAdminApi.getCapacityData({})\n\n    console.log('GOT', cardData)\n\n    //Update data on categories\n    categories.value.forEach(category => {\n      category.cardData = cardData.filter(cardData => cardData.dataCategory === category.key)\n      console.log('SET', category, category.cardData)\n    })\n  }\n  finally {\n    isLoading.value = false\n  }\n}\n\nonMounted(async () => {\n  await loadData()\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoading\" />\n    <template v-else>\n      <section\n        v-for=\"category in categories\"\n        :key=\"category.key\"\n        :class=\"$style.section\"\n      >\n        <h4>{{ category.title }}</h4>\n        <InfoCardsGrid :cols=\"category.cardData.length\">\n          <InfoCard\n            v-for=\"(item, i) in category.cardData\"\n            :key=\"i\"\n            :value=\"item.value\"\n            :label=\"item.text\"\n            :help=\"item.tooltipText\"\n          />\n        </InfoCardsGrid>\n      </section>\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.section {\n  margin-top: 2rem;\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport EnrollmentChecker from '@/components/super_admin/EnrollmentChecker.vue'\nimport KPIQueries from '@/components/super_admin/KPIQueries.vue'\nimport OrganizationsOverview from '@/components/super_admin/OrganizationsOverview.vue'\nimport MessageDeliveries from  '@/components/super_admin/MessageDeliveries.vue'\nimport ObjectLookup from '@/components/super_admin/ObjectLookup.vue'\nimport AristReports from '@/components/super_admin/AristReports.vue'\nimport CapacityTracking from '@/components/super_admin/CapacityTracking.vue'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\n\n//Page setup\nconst {setHeader} = usePage()\nsetHeader('Super admin')\n\n//Tabbed navigation\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {\n    label: 'KPI queries',\n    component: 'KPIQueries',\n    key: 'kpi-queries',\n  },\n  {\n    label: 'Organizations',\n    component: 'OrganizationsOverview',\n    key: 'organizations',\n  },\n  {\n    label: 'Enrollment check',\n    component: 'EnrollmentChecker',\n    key: 'enrollment-check',\n  },\n  {\n    label: 'Message deliveries',\n    component: 'MessageDeliveries',\n    key: 'message-deliveries',\n  },\n  {\n    label: 'Object lookup',\n    component: 'ObjectLookup',\n    key: 'object-lookup',\n  },\n  {\n    label: 'Reports',\n    component: 'AristReports',\n    key: 'reports',\n  },\n  {\n    label: 'Capacity',\n    component: 'CapacityTracking',\n    key: 'capacity',\n  },\n])\n\n//Component refs\n//NOTE: Because if we pass components directly to the tabs, they will become\n//reactive which can have negative performance implications\nconst componentRefs = {\n  KPIQueries,\n  EnrollmentChecker,\n  OrganizationsOverview,\n  MessageDeliveries,\n  ObjectLookup,\n  AristReports,\n  CapacityTracking,\n}\n</script>\n\n<template>\n  <PageWrapper>\n    <TabNavigation\n      is-large\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      with-auto-routing\n      @change-tab=\"setActiveTab($event.tab)\"\n    />\n\n    <component\n      :is=\"componentRefs[activeTab.component]\"\n      v-if=\"activeTab.component\"\n    />\n  </PageWrapper>\n</template>\n","<script setup>\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport {useGlobalTags} from '@/composables/use-global-tags.js'\n\n//Emits and props\nconst emit = defineEmits([\n  'change-filter',\n  'reset-filter',\n])\ndefineProps({\n  activeFilter: {\n    type: Object,\n    required: true,\n  },\n  numActiveFilters: {\n    type: Number,\n    default: 0,\n  },\n})\n\n//Load global tags\nconst {globalTags, loadGlobalTags} = useGlobalTags()\nloadGlobalTags()\n\n//Change handlers\nconst changeFilter = (key, value) => emit('change-filter', {value: {[key]: value}})\nconst resetFilter = () => emit('reset-filter')\n</script>\n\n<template>\n  <FiltersDropdownPanel\n    v-if=\"globalTags.length > 0\"\n    :num-active-filters=\"numActiveFilters\"\n    @clear=\"resetFilter()\"\n  >\n    <FormField label=\"Topics\">\n      <PillButtonList\n        :value=\"activeFilter.selectedTags\"\n        :options=\"globalTags\"\n        value-prop=\"id\"\n        is-multi-select\n        @input=\"changeFilter('selectedTags', $event.value)\"\n      />\n    </FormField>\n  </FiltersDropdownPanel>\n</template>\n","import {BaseModel} from '@/models/base.model.js'\n\n/**\n * Template Course model\n */\nexport class TemplateCourse extends BaseModel {\n}\n","import {ModelApi} from '@/api/model.api.js'\nimport {TemplateCourse} from '@/models/template-course.model.js'\n\n/**\n * Template Courses API service\n */\nexport class TemplateCoursesApi extends ModelApi {\n\n  //Props\n  basePath = '/api/v1/template_courses'\n  itemKey = 'templateCourse'\n  itemsKey = 'templateCourses'\n  ModelClass = TemplateCourse\n\n  /**\n   * Use a template\n   */\n  useTemplate(courseId) {\n    return this\n      .post(`/${courseId}/use_template`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Lock a template\n   */\n  lock(courseId) {\n    return this\n      .post(`/${courseId}/lock`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Unlock a template\n   */\n  unlock(courseId) {\n    return this\n      .post(`/${courseId}/unlock`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Archive a template\n   */\n  archive(courseId) {\n    return this\n      .post(`/${courseId}/archive`)\n      .then(json => this.toModelInstance(json))\n  }\n\n  /**\n   * Restore a template\n   */\n  restore(courseId) {\n    return this\n      .post(`/${courseId}/restore`)\n      .then(json => this.toModelInstance(json))\n  }\n}\n\n//Export singleton instance\nexport const templateCoursesApi = new TemplateCoursesApi()\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport CourseCardsGrid from '@/components/courses/cards/CourseCardsGrid.vue'\nimport CourseCard from '@/components/courses/cards/CourseCard.vue'\nimport CourseTemplatesFilter from '@/components/courses/CourseTemplatesFilter.vue'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {templateCoursesApi} from '@/api/template-courses.api.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTabs} from '@/composables/use-tabs.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {watch, computed} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Content library')\n\n//Querying\nconst {\n  items: courses,\n  loadItems: loadCourses,\n  reloadItems: reloadCourses,\n  isLoadingItems: isLoadingCourses,\n  filter,\n  changeSearch,\n  clearSearch,\n  changeFilter,\n  resetFilter,\n} = useQuerying({\n  handler: (...args) => templateCoursesApi.query(...args),\n  filter: {\n    selectedTags: [],\n  },\n  key: 'templacteCoursesOverview',\n})\n\n//Custom num active filters determination to not get triggered by the isArchived flag\n//Normally this comes out of useQuerying\nconst numActiveFilters = computed(() => filter.value.selectedTags.length > 0 ? 1 : 0)\n\n//Tabs\nconst {\n  tabs,\n  activeTab,\n  setActiveTab,\n} = useTabs([\n  {label: 'Templates', key: 'templates'},\n  {label: 'Archived templates', key: 'archivedTemplates'},\n])\n\n//Composables\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\nconst {goToEditCourse} = useNavigation()\nconst {email, canEditTemplateLibrary} = useCurrentUser()\n\n//Individual template actions\nconst archiveCourse = async course => {\n  try {\n    await templateCoursesApi.archive(course.id)\n    setFlashSuccess('Template archived')\n    reloadCourses()\n  }\n  catch {\n    setFlashFailure('Failed to archive template')\n  }\n}\nconst restoreCourse = async course => {\n  try {\n    await templateCoursesApi.restore(course.id)\n    setFlashSuccess('Template restored')\n    reloadCourses()\n  }\n  catch {\n    setFlashFailure('Failed to restore template')\n  }\n}\nconst lockCourse = async course => {\n  try {\n    await templateCoursesApi.lock(course.id)\n    setFlashSuccess('Template locked')\n    reloadCourses()\n  }\n  catch {\n    setFlashFailure('Failed to lock template')\n  }\n}\nconst unlockCourse = async course => {\n  try {\n    await templateCoursesApi.unlock(course.id)\n    setFlashSuccess('Template unlocked')\n    reloadCourses()\n  }\n  catch {\n    setFlashFailure('Failed to unlock template')\n  }\n}\nconst useTemplate = async course => {\n  try {\n    const clone = await templateCoursesApi.useTemplate(course.id)\n    setFlashSuccess(`Successfully created a course from ${course.name}\"`)\n    goToEditCourse(clone.id)\n  }\n  catch {\n    setFlashFailure('Failed to use template')\n  }\n}\nconst cloneTemplate = async course => {\n  try {\n    await coursesApi.createTemplateFromCourse(course.id)\n    setFlashSuccess('Template cloned')\n    reloadCourses()\n  }\n  catch {\n    setFlashFailure('Failed to clone template')\n  }\n}\nconst emailCourse = async (course, format) => {\n  try {\n    await coursesApi.emailCourse(course.id, format)\n    setFlashSuccess(`A link to download your course will be emailed to you at ${email.value} shortly`)\n  }\n  catch {\n    setFlashFailure('Something went wrong emailing your course, please try again')\n  }\n}\n\n//Watch tab for changes\nwatch(activeTab, () => changeFilter({isArchived: (\n  canEditTemplateLibrary.value &&\n  activeTab.value.key === 'archivedTemplates'\n)}))\n\n//Load courses\nloadCourses()\n</script>\n\n<template>\n  <PageWrapper>\n    <OverviewTableHeader>\n      <template #search>\n        <SearchInput\n          @clear-search=\"clearSearch()\"\n          @search=\"changeSearch($event.searchTerm)\"\n        />\n      </template>\n      <template #filters>\n        <CourseTemplatesFilter\n          :active-filter=\"filter\"\n          :num-active-filters=\"numActiveFilters\"\n          @reset-filter=\"resetFilter()\"\n          @change-filter=\"changeFilter($event.value)\"\n        />\n      </template>\n    </OverviewTableHeader>\n\n    <TabNavigation\n      v-if=\"canEditTemplateLibrary\"\n      :tabs=\"tabs\"\n      :active-tab=\"activeTab\"\n      @change-tab=\"setActiveTab($event.tab)\"\n    />\n\n    <Spinner v-if=\"isLoadingCourses\" />\n\n    <CourseCardsGrid v-else>\n      <CourseCard\n        v-for=\"(course, index) in courses\"\n        :key=\"course.id\"\n        :index=\"index\"\n        :course=\"course\"\n        :is-clickable=\"canEditTemplateLibrary\"\n        @archive=\"archiveCourse(course)\"\n        @use-template=\"useTemplate(course)\"\n        @clone-template=\"cloneTemplate(course)\"\n        @email=\"emailCourse(course, $event.format)\"\n        @lock=\"lockCourse(course)\"\n        @unlock=\"unlockCourse(course)\"\n        @restore=\"restoreCourse(course)\"\n      />\n    </CourseCardsGrid>\n  </PageWrapper>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport Markdown from '@/components/shared/transform/Markdown.vue'\nimport FormField from '@/components/shared/form/FormField.vue'\nimport Breadcrumb from '@/components/shared/core/Breadcrumb.vue'\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport {templateCoursesApi} from '@/api/template-courses.api.js'\nimport {usePage} from '@/composables/use-page.js'\nimport {useRouting} from '@/composables/use-routing.js'\nimport {useNavigation} from '@/composables/use-navigation.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {ref, onMounted} from 'vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Course preview')\n\n//Routing\nconst {routeParams, replaceRoute} = useRouting()\nconst {id} = routeParams.value\n\n//Composables\nconst {setFlashSuccess, setFlashFailure} = useFlashMessages()\nconst {goToContentLibraryOverview, goToContentLibraryView, goToEditCourse} = useNavigation()\n\n//Refs\nconst course = ref(null)\nconst isLoadingCourse = ref(true)\n\n//Load course\nconst loadCourse = async () => {\n  try {\n    course.value = await templateCoursesApi.findById(id)\n  }\n  finally {\n    isLoadingCourse.value = false\n  }\n}\n\n//Use template\nconst isUsingTemplate = ref(false)\nconst useTemplate = async () => {\n  try {\n    isUsingTemplate.value = true\n    const clone = await templateCoursesApi.useTemplate(id)\n    setFlashSuccess(`Successfully created a course from ${course.value.name}`)\n    goToEditCourse(clone.id)\n  }\n  catch {\n    setFlashFailure('Failed to create course from template')\n  }\n  finally {\n    isUsingTemplate.value = false\n  }\n}\n\n//Load on mount\nonMounted(async () => {\n  try {\n    await loadCourse()\n  }\n  catch {\n    replaceRoute('content-library')\n  }\n})\n</script>\n\n<template>\n  <PageWrapper>\n    <Spinner v-if=\"isLoadingCourse\" />\n\n    <template v-else-if=\"course\">\n      <Breadcrumb>\n        <TextLink\n          text=\"Content library\"\n          @click=\"goToContentLibraryOverview($event)\"\n        />\n        <Icon\n          icon=\"chevron_right\"\n          color=\"muted\"\n          size=\"s\"\n        />\n        <TextLink\n          :text=\"course.name\"\n          @click=\"goToContentLibraryView(course.id, $event)\"\n        />\n      </Breadcrumb>\n\n      <PageBlock :header=\"course.name\">\n        <div\n          v-if=\"course.imageUrl\"\n          :class=\"$style.image\"\n          :style=\"{backgroundImage: `url(${course.imageUrl})`}\"\n        />\n\n        <section :class=\"$style.section\">\n          <FormField label=\"Course description\">\n            <Markdown :content=\"course.description\" />\n          </FormField>\n        </section>\n\n        <section :class=\"$style.section\">\n          <FormField label=\"Course length\">\n            <p>\n              {{ course.numLessons }} lessons\n            </p>\n          </FormField>\n        </section>\n\n        <Divider />\n\n        <ButtonBar>\n          <ActionButton\n            type=\"primary\"\n            label=\"Use course\"\n            :is-disabled=\"isUsingTemplate\"\n            :has-spinner=\"isUsingTemplate\"\n            @click=\"useTemplate()\"\n          />\n        </ButtonBar>\n      </PageBlock>\n    </template>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.image {\n  background-position: center center;\n  height: 350px;\n  background-repeat: no-repeat;\n  background-size: contain;\n  border-radius: var(--border-radius-m);\n}\n.section {\n  &:not(:first-child) {\n    margin-top: 2rem;\n  }\n  p {\n    margin-top: 0;\n  }\n}\n</style>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport {usePage} from '@/composables/use-page.js'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('Page not found')\n</script>\n\n<template>\n  <PageWrapper\n    limited-width\n    icon=\"error_outline\"\n  >\n    <h1>Oops</h1>\n    <p>Sorry, we could not find that page. It may have moved, or the link you followed may be broken.</p>\n  </PageWrapper>\n</template>\n","<script setup>\nimport InputList from './InputList.vue'\nimport CheckBox from './CheckBox.vue'\nimport {toggleValueInArray} from '@/helpers/array.js'\nimport {toRefs} from 'vue'\n\n//Emits and props\nconst emit = defineEmits([\n  'input',\n])\nconst props = defineProps({\n  value: {\n    type: Array,\n    default: () => [],\n  },\n  options: {\n    type: Array,\n    default: () => [],\n  },\n  isDisabled: {\n    type: Boolean,\n    default: false,\n  },\n  testId: {\n    type: String,\n    default: undefined,\n  },\n})\n\n//Get refs\nconst {value, isDisabled} = toRefs(props)\n\n//Toggle value\nconst toggleValue = optionValue => {\n  if (!isDisabled.value) {\n    const newValue = toggleValueInArray(value.value, optionValue)\n    emit('input', {value: newValue})\n  }\n}\n\n//Check if checked\nconst isChecked = optionValue => value.value.includes(optionValue)\n</script>\n\n<template>\n  <InputList v-bind=\"$attrs\">\n    <CheckBox\n      v-for=\"option in options\"\n      :key=\"option.value\"\n      :label=\"option.label\"\n      :is-disabled=\"isDisabled\"\n      :is-checked=\"isChecked(option.value)\"\n      :test-id=\"testId ? `checkBox_${testId}_${option.value}` : undefined\"\n      @click=\"toggleValue(option.value)\"\n    />\n  </InputList>\n</template>\n","<script setup>\nimport PageWrapper from '@/components/shared/page/PageWrapper.vue'\nimport PageBlock from '@/components/shared/page/PageBlock.vue'\nimport UXExamples from '@/components/ux/UXExamples.vue'\nimport UXColor from '@/components/ux/UXColor.vue'\nimport {scheduleStatuses} from '@/constants/schedules.js'\nimport {statuses as statusConstant} from '@/constants/statuses.js'\nimport {componentColors} from '@/constants/components.js'\nimport {courseStatuses} from '@/constants/courses.js'\nimport {enrollmentStatusOptions} from '@/constants/enrollments.js'\nimport {dataExportStatuses} from '@/constants/data-exports.js'\nimport {aiTaskStatuses, aiSourceMaterialFileTypes} from '@/constants/ai.js'\nimport {imageFileTypes} from '@/constants/file-types.js'\nimport {dateFormats, dateTokens} from '@/constants/date-and-time.js'\nimport {randomFloat} from '@/helpers/random.js'\nimport {toUpperCaseFirst} from '@/helpers/string.js'\nimport {DateTime} from 'luxon'\nimport {usePage} from '@/composables/use-page.js'\nimport {useTimezone} from '@/composables/use-timezone.js'\nimport {useFlashMessages} from '@/composables/use-flash-messages.js'\nimport {useStatusProgress} from '@/composables/use-status-progress.js'\nimport {useQuerying} from '@/composables/use-querying.js'\nimport {cohortsApi} from '@/api/cohorts.api.js'\nimport {coursesApi} from '@/api/courses.api.js'\nimport {User} from '@/models/user.model.js'\nimport {ref, computed, onUnmounted, onMounted} from 'vue'\n\n//Core components\nimport FlexColumn from '@/components/shared/core/FlexColumn.vue'\nimport Spinner from '@/components/shared/core/Spinner.vue'\nimport CountIndicator from '@/components/shared/core/CountIndicator.vue'\nimport StatusDot from '@/components/shared/core/StatusDot.vue'\nimport Divider from '@/components/shared/core/Divider.vue'\nimport Alert from '@/components/shared/core/Alert.vue'\nimport Tooltip from '@/components/shared/core/Tooltip.vue'\nimport TooltipIcon from '@/components/shared/core/TooltipIcon.vue'\nimport Help from '@/components/shared/core/Help.vue'\nimport Warning from '@/components/shared/core/Warning.vue'\nimport Tag from '@/components/shared/core/Tag.vue'\nimport ProgressBar from '@/components/shared/core/ProgressBar.vue'\nimport FlashMessage from '@/components/shared/core/FlashMessage.vue'\nimport DragHandle from '@/components/shared/core/DragHandle.vue'\nimport Dropzone from '@/components/shared/core/Dropzone.vue'\nimport StatusBadge from '@/components/shared/core/StatusBadge.vue'\nimport StatusIconLabel from '@/components/shared/core/StatusIconLabel.vue'\nimport StatusIconLabels from '@/components/shared/core/StatusIconLabels.vue'\n\n//Icon components\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport IconCount from '@/components/shared/icons/IconCount.vue'\nimport IconCircle from '@/components/shared/icons/IconCircle.vue'\nimport IconTile from '@/components/shared/icons/IconTile.vue'\nimport IconLabel from '@/components/shared/icons/IconLabel.vue'\n\n//Link components\nimport TextLink from '@/components/shared/links/TextLink.vue'\nimport ExternalLink from '@/components/shared/links/ExternalLink.vue'\nimport DownloadLink from '@/components/shared/links/DownloadLink.vue'\nimport EmailLink from '@/components/shared/links/EmailLink.vue'\n\n//Form components\nimport FormField from '@/components/shared/form/FormField.vue'\nimport TextInput from '@/components/shared/form/TextInput.vue'\nimport SearchInput from '@/components/shared/form/SearchInput.vue'\nimport SelectInput from '@/components/shared/form/SelectInput.vue'\nimport DateInput from '@/components/shared/form/DateInput.vue'\nimport TimeInput from '@/components/shared/form/TimeInput.vue'\nimport CheckBox from '@/components/shared/form/CheckBox.vue'\nimport CheckBoxList from '@/components/shared/form/CheckBoxList.vue'\nimport RadioButtonList from '@/components/shared/form/RadioButtonList.vue'\nimport PillButtonList from '@/components/shared/form/PillButtonList.vue'\nimport PillButton from '@/components/shared/form/PillButton.vue'\nimport Toggle from '@/components/shared/form/Toggle.vue'\nimport InputList from '@/components/shared/form/InputList.vue'\nimport CountryCodeSelectInput from '@/components/shared/form/CountryCodeSelectInput.vue'\nimport TimezoneSelectInput from '@/components/shared/form/TimezoneSelectInput.vue'\nimport CourseSelectInput from '@/components/shared/form/CourseSelectInput.vue'\nimport CohortSelectInput from '@/components/shared/form/CohortSelectInput.vue'\nimport LearnerSelectInput from '@/components/shared/form/LearnerSelectInput.vue'\nimport ImageInput from '@/components/shared/form/ImageInput.vue'\nimport MediaInput from '@/components/shared/form/MediaInput.vue'\nimport LearnerPicker from '@/components/shared/form/LearnerPicker.vue'\n\n//Button components\nimport ActionButton from '@/components/shared/buttons/ActionButton.vue'\nimport FiltersButton from '@/components/shared/buttons/FiltersButton.vue'\nimport CloseButton from '@/components/shared/buttons/CloseButton.vue'\nimport CreateButton from '@/components/shared/buttons/CreateButton.vue'\nimport DownloadButton from '@/components/shared/buttons/DownloadButton.vue'\nimport RegenerateButton from '@/components/shared/buttons/RegenerateButton.vue'\nimport MoreActionsButton from '@/components/shared/buttons/MoreActionsButton.vue'\nimport ButtonBar from '@/components/shared/buttons/ButtonBar.vue'\nimport CancelConfirmBar from '@/components/shared/buttons/CancelConfirmBar.vue'\nimport ChevronButton from '@/components/shared/buttons/ChevronButton.vue'\nimport BackButton from '@/components/shared/buttons/BackButton.vue'\nimport RemoveButton from '@/components/shared/buttons/RemoveButton.vue'\nimport CopyButton from '@/components/shared/buttons/CopyButton.vue'\n\n//Dropdown components\nimport DropdownMenuItem from '@/components/shared/dropdown/DropdownMenuItem.vue'\nimport ActionsDropdownMenu from '@/components/shared/dropdown/ActionsDropdownMenu.vue'\nimport ActionsDropdownMenuNested from '@/components/shared/dropdown/ActionsDropdownMenuNested.vue'\nimport FiltersDropdownPanel from '@/components/shared/dropdown/FiltersDropdownPanel.vue'\nimport ExampleDropdown from '@/components/shared/dropdown/ExampleDropdown.vue'\n\n//Navigation components\nimport TabNavigation from '@/components/shared/tabs/TabNavigation.vue'\nimport FlowNavigation from '@/components/shared/flow/FlowNavigation.vue'\nimport StepIndicators from '@/components/shared/flow/StepIndicators.vue'\nimport StepIndicator from '@/components/shared/flow/StepIndicator.vue'\nimport StepDivider from '@/components/shared/flow/StepDivider.vue'\nimport NavMenuItem from '@/components/shared/navigation/NavMenuItem.vue'\n\n//Table components\nimport BulkActionsBar from '@/components/shared/table/BulkActionsBar.vue'\nimport BulkAction from '@/components/shared/table/BulkAction.vue'\nimport Pagination from '@/components/shared/table/Pagination.vue'\n\n//Modal components\nimport ModalBlockButton from '@/components/shared/modals/ModalBlockButton.vue'\n\n//Page elements\nimport PageOutline from '@/components/shared/page/PageOutline.vue'\nimport PageOutlineBlock from '@/components/shared/page/PageOutlineBlock.vue'\nimport PageOutlineBlockItem from '@/components/shared/page/PageOutlineBlockItem.vue'\nimport SummaryBlock from '@/components/shared/page/SummaryBlock.vue'\n\n//Image components\nimport ImageCard from '@/components/shared/image/ImageCard.vue'\n\n//File selection components\nimport FileSelect from '@/components/shared/file/FileSelect.vue'\nimport MediaFileSelect from '@/components/shared/file/MediaFileSelect.vue'\n\n//Overview table components\nimport OverviewTableHeader from '@/components/shared/table/OverviewTableHeader.vue'\n\n//Other\nimport ActivityLineItem from '@/components/shared/other/ActivityLineItem.vue'\nimport ScheduleStatus from '@/components/schedules/ScheduleStatus.vue'\nimport CourseStatus from '@/components/courses/CourseStatus.vue'\nimport EnrollmentStatus from '@/components/enrollments/EnrollmentStatus.vue'\nimport EnrollmentProgress from '@/components/enrollments/EnrollmentProgress.vue'\nimport CSVSampleDataPreview from '@/components/shared/csv/CSVSampleDataPreview.vue'\nimport CSVImportErrorsList from '@/components/shared/csv/CSVImportErrorsList.vue'\nimport CSVImportErrorsSummary from '@/components/shared/csv/CSVImportErrorsSummary.vue'\nimport ExportStatusBar from '@/components/shared/export/ExportStatusBar.vue'\n\n//Setup page\nconst {setHeader} = usePage()\nsetHeader('UX Components Reference')\n\n//Composables\nconst {showFlashMessage} = useFlashMessages()\nconst {timezone} = useTimezone()\nconst {\n  items: cohorts,\n  loadItemsBatched: loadCohorts,\n  unloadItems: unloadCohorts,\n  isLoadingItems: isLoadingCohorts,\n} = useQuerying({\n  handler: (...args) => cohortsApi.query(...args),\n  limit: 100,\n})\nconst {\n  items: courses,\n  loadItemsBatched: loadCourses,\n  unloadItems: unloadCourses,\n  isLoadingItems: isLoadingCourses,\n} = useQuerying({\n  handler: (...args) => coursesApi.query(...args),\n  limit: 100,\n  fields: [\n    'id',\n    'name',\n    'isNudge',\n    'isPassingValidations',\n  ],\n})\n\n//Test data\nconst options = ref([\n  {label: 'Option 1', value: 'option-1'},\n  {label: 'Option 2', value: 'option-2'},\n  {label: 'Option 3', value: 'option-3'},\n  {label: 'Here is a label with a very long title that will no doubt cause some problems and issues and anxiety for the developers', value: 'option-4'},\n])\n\n//Test data with model classes\nconst users = ref([\n  User.createFrom({id: '1', firstName: 'John', lastName: 'Doe', displayName: 'John Doe'}),\n  User.createFrom({id: '2', firstName: 'Alice', lastName: 'Smith', displayName: 'Alice Smith'}),\n  User.createFrom({id: '3', firstName: 'Bob', lastName: 'Johnson', displayName: 'Bob Johnson'}),\n  User.createFrom({id: '4', firstName: 'Eve', lastName: 'Brown', displayName: 'Eve Brown'}),\n  User.createFrom({id: '5', firstName: 'Charlie', lastName: 'Jones', displayName: 'Charlie Jones'}),\n])\n\n//Preset dates\nconst presetDates = [\n  {\n    label: 'Any',\n    value: [null, null],\n  },\n  {\n    label: 'Past 30 days',\n    value: [\n      dateTokens.THIRTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 60 days',\n    value: [\n      dateTokens.SIXTY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n  {\n    label: 'Past 90 days',\n    value: [\n      dateTokens.NINETY_DAYS_AGO,\n      dateTokens.NOW,\n    ],\n  },\n]\n\n//Model ref and clearing helper\nconst model = ref({\n  textInput: '',\n  textInput2: '',\n  textInputMultiline: `I am a multiline text input\\nthat can have linebreaks and span multiple lines\\ncan auto expand to fit my content or be resized manually,\\nand a character limit that will display once you get close to the limit.`,\n  textInputMultiline2: `I am a text input\\nwith manual character count (2x actual count)`,\n  textInputMultiline3: `I am a text input\\nwith a character limit that you can go over.`,\n  textInputMultiline4: `I am a text input\\nwith an emoji picker 🎉`,\n  searchInput: '',\n  selectInput: 'option-1',\n  selectInput2: null,\n  selectInputMulti: ['option-1', 'option-2'],\n  selectInputMulti2: [],\n  selectInputUsers: [users.value[1], users.value[2]],\n  courseSelectInput: null,\n  courseSelectInput2: null,\n  cohortSelectInput: null,\n  cohortSelectInput2: null,\n  cohortSelectInput3: null,\n  learnerSelectInput: null,\n  learnerSelectInput2: null,\n  timeInput: '2:15 PM',\n  timeInputIso: DateTime.now().setZone(timezone.value).toISO(),\n  dateInput: DateTime.now().setZone(timezone.value).startOf('day'),\n  dateInputIso: DateTime.now().setZone(timezone.value).startOf('day').toISO(),\n  dateInputFormatted: DateTime.now().setZone(timezone.value).startOf('day').toFormat(dateFormats.ISO_DATE_ONLY),\n  dateInputRange: null,\n  dateInputRange2: [null, null],\n  checkBox: false,\n  checkBox2: true,\n  checkBoxList: ['option-1', 'option-2'],\n  radioButtonList: 'option-1',\n  toggle: false,\n  pillButtonListSingle: 'option-1',\n  pillButtonListMulti: ['option-1', 'option-2'],\n  pillButtonListSingleNullable: 'option-1',\n  pillButtonListMultiNullable: ['option-1', 'option-2'],\n  countryCode: 'US',\n  timezone: '',\n  imageKey: '',\n  videoKey: '',\n  currentPage: 1,\n})\n\n//Set media keys helper\nconst setMediaKeys = event => {\n  if (typeof event.imageKey !== 'undefined') {\n    model.value.imageKey = event.imageKey\n  }\n  if (typeof event.videoKey !== 'undefined') {\n    model.value.videoKey = event.videoKey\n  }\n}\n\n//Filtering\nconst filter = ref({\n  pillButtonListSingleNullable: null,\n  pillButtonListMultiNullable: [],\n})\nconst clearFilter = () => {\n  filter.value.pillButtonListSingleNullable = null\n  filter.value.pillButtonListMultiNullable = []\n}\nconst isShowingFilters = ref(false)\n\n//Buttons\nconst isCollapsed = ref(true)\n\n//Tabs\nconst tabs = ref([\n  {label: 'First tab', key: 'tab-1'},\n  {label: 'Second tab', key: 'tab-2'},\n  {label: 'Third tab', key: 'tab-3'},\n])\nconst activeTab = ref(tabs.value[0])\nconst activeStep = ref(1)\n\n//Icons\nconst iconSizes = ['xs', 's', 'm', 'l', 'xl']\nconst iconWrapperSizes = ['s', 'm', 'l']\nconst icons = ['grade', 'cloud', 'people']\n\n//Statuses\nconst statusDotSizes = ['s', 'm', 'l']\nconst statuses = Object.values(statusConstant)\n\n//Status badge colors\nconst statusBadgeColors = [\n  componentColors.SUCCESS,\n  componentColors.WARNING,\n  componentColors.DANGER,\n  componentColors.INFO,\n]\n\n//Flow navigation\nconst flowStep = ref(1)\nconst flowIsConfirming = ref(false)\nconst confirmFlowStep = () => {\n  if (flowStep.value === 1) {\n    flowStep.value++\n  }\n  else {\n    flowIsConfirming.value = true\n    setTimeout(() => {\n      flowIsConfirming.value = false\n      flowStep.value = 1\n    }, 2000)\n  }\n}\n\n//Schedules\nconst schedules = [\n  {\n    currentStatus: scheduleStatuses.NEW_DUPLICATE,\n    createdAt: '2024-05-01T12:00:00Z',\n  },\n  {\n    currentStatus: scheduleStatuses.CONCLUDED,\n    concludedOn: '2024-05-02T13:00:00Z',\n  },\n  {\n    currentStatus: scheduleStatuses.DISABLED,\n    disabledAt: '2024-05-02T15:30:00Z',\n  },\n  {\n    currentStatus: scheduleStatuses.SCHEDULED,\n    launchDate: '2024-05-02T15:30:00Z',\n  },\n  {\n    currentStatus: scheduleStatuses.ACTIVE,\n    launchDate: '2024-05-02T15:30:00Z',\n  },\n]\n\n//Last names for CSV preview\nconst lastNames = [\n  'Smith',\n  'Johnson',\n  'Williams',\n  'Brown',\n  'Jones',\n  'Garcia',\n  '',\n  'Davis',\n  'Rodriguez',\n  '',\n  'Hernandez',\n  'Lopez',\n  'Gonzalez',\n  'Wilson',\n  'Anderson',\n  'Thomas',\n  'Taylor',\n  'Moore',\n  'Jackson',\n  'Martin',\n]\n\n//Activity line items\nconst activities = [\n  {\n    id: 1,\n    action: 'Cohort created',\n    actor: {\n      displayName: 'John Doe',\n    },\n    timestamp: '2024-05-01T12:00:00Z',\n  },\n  {\n    id: 2,\n    icon: 'edit',\n    action: 'Cohort updated',\n    actor: {\n      displayName: 'Alice Smith',\n    },\n    timestamp: '2024-05-02T13:00:00Z',\n  },\n  {\n    id: 3,\n    action: 'Learners added',\n    actor: {\n      displayName: 'John Doe',\n    },\n    timestamp: '2024-05-02T15:30:00Z',\n  },\n]\n\n//CSV import errors\nconst csvImportErrors = [\n  {rowNo: 1, error: 'First row, first error'},\n  {rowNo: 1, error: 'First row, second error'},\n  {rowNo: 2, error: 'Second row, first error'},\n  {rowNo: 3, error: 'Third row, first error'},\n  {rowNo: 3, error: 'Third row, second error'},\n  {rowNo: 3, error: 'Third row, third error'},\n]\n\n//CSV import errors summary\nconst csvImportErrorsSummary = [\n  {error: 'Some error', rows: [1]},\n  {error: 'Other error', rows: [1, 2, 5, 19, 20, 21]},\n  {error: 'Different error', rows: [3, 7, 8, 9, 11, 12, 15, 16, 17, 18, 19, 25]},\n  {error: 'Yet another error', rows: [4, 6, 10, 13, 14, 22, 23, 24]},\n]\n\n//Generic logger\nconst log = (...args) => console.log(...args)\n\n//Progress bar\nconst progress = ref(0)\nconst interval = setInterval(() => {\n  if (progress.value === 1) {\n    progress.value = 0\n    return\n  }\n  progress.value = Math.min(progress.value + randomFloat(0.01, 0.2), 1)\n}, 1000)\nonUnmounted(() => {\n  clearInterval(interval)\n})\n\nonMounted(() => {\n  loadCohorts()\n  loadCourses()\n})\n\n//Status progress simulator\nconst aiTaskStatusesList = ref([\n  aiTaskStatuses.INIT,\n  aiTaskStatuses.WAITING,\n  aiTaskStatuses.PLANNING,\n  aiTaskStatuses.ANALYZING,\n  aiTaskStatuses.GENERATING,\n  aiTaskStatuses.CREATING,\n  aiTaskStatuses.DONE,\n].join('\\n'))\nconst aiTaskStatusesArray = computed(() => aiTaskStatusesList.value.split('\\n'))\nconst aiTaskStatusIndex = ref(0)\nconst aiTaskStatus = computed(() => aiTaskStatusesArray.value[aiTaskStatusIndex.value])\nconst {progress: aiTaskStatusProgress, resetProgress: resetAiTaskStatusProgress} = useStatusProgress([\n  {\n    //Started processing\n    status: aiTaskStatuses.INIT,\n    progress: 0.01,\n  },\n  {\n    //Waiting in job queue\n    status: aiTaskStatuses.WAITING,\n    progress: 0.02,\n  },\n  {\n    //Overloaded\n    status: aiTaskStatuses.OVERLOADED,\n    progress: 0.03,\n  },\n  {\n    //Making LLM calls to set up context\n    status: aiTaskStatuses.PLANNING,\n    progress: 0.10,\n  },\n  {\n    //Processing source material\n    status: aiTaskStatuses.ANALYZING,\n    progress: 0.25,\n  },\n  {\n    //Making LLM calls to get the result\n    status: aiTaskStatuses.GENERATING,\n    progress: 0.45,\n  },\n  {\n    //Creating course in database\n    status: aiTaskStatuses.CREATING,\n    progress: 0.97,\n  },\n  {\n    //Done\n    status: aiTaskStatuses.DONE,\n    progress: 1,\n  },\n  {\n    //Error\n    status: aiTaskStatuses.ERROR,\n    progress: 1,\n  },\n], aiTaskStatus)\n\n//Update the status every 3 seconds\nconst aiTaskStatusIsRunning = ref(false)\nlet aiTaskStatusInterval = null\nconst stopAITaskStatusInterval = () => {\n  aiTaskStatusIsRunning.value = false\n  clearInterval(aiTaskStatusInterval)\n}\nconst startAITaskStatusInterval = () => {\n  resetAiTaskStatusProgress()\n  aiTaskStatusIsRunning.value = true\n  aiTaskStatusIndex.value = 0\n  clearInterval(aiTaskStatusInterval)\n  aiTaskStatusInterval = setInterval(() => {\n    if (aiTaskStatusIndex.value === aiTaskStatusesArray.value.length - 1) {\n      return stopAITaskStatusInterval()\n    }\n    aiTaskStatusIndex.value++\n  }, 5 * 1000)\n}\n</script>\n\n<template>\n  <PageWrapper>\n    <PageBlock header=\"Font\">\n      <UXExamples header=\"Heading 1\">\n        <h1>\n          Heading 1 – 36px, 150%, 400 weight\n          <br>With another line to show line height\n        </h1>\n      </UXExamples>\n      <UXExamples header=\"Heading 2\">\n        <h2>\n          Heading 2 – 28px, 150%, 400 weight\n          <br>With another line to show line height\n        </h2>\n      </UXExamples>\n      <UXExamples header=\"Heading 3\">\n        <h3>\n          Heading 3 – 24px, 150%, 400 weight\n          <br>With another line to show line height\n        </h3>\n      </UXExamples>\n      <UXExamples header=\"Heading 4\">\n        <h4>\n          Heading 4 – 20px, 150%, 400 weight\n          <br>With another line to show line height\n        </h4>\n      </UXExamples>\n      <UXExamples header=\"Heading 5\">\n        <h5>\n          Heading 5 – 16px, 150%, 500 weight\n          <br>With another line to show line height\n        </h5>\n      </UXExamples>\n      <UXExamples header=\"Heading 6\">\n        <h6>\n          Heading 6 – 14px, 150%, 500 weight\n          <br>With another line to show line height\n        </h6>\n      </UXExamples>\n      <UXExamples header=\"Body text (large)\">\n        <p :class=\"$style.bodyTextLarge\">\n          Body text large – 16px\n          <br>With another line to show line height\n        </p>\n      </UXExamples>\n      <UXExamples header=\"Body text (normal)\">\n        <p>\n          Body text normal – 14px\n          <br>With another line to show line height\n        </p>\n      </UXExamples>\n      <UXExamples header=\"Body text (small)\">\n        <p>\n          <small>\n            Body text small – 12px\n            <br>With another line to show line height\n          </small>\n        </p>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Colors\">\n      <UXExamples header=\"Primary color\">\n        <UXColor\n          hex=\"ff6348\"\n          label=\"Primary\"\n        />\n        <UXColor\n          hex=\"ed624b\"\n          label=\"Primary (hover)\"\n        />\n        <UXColor\n          hex=\"fca191\"\n          label=\"Primary (muted)\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Status colors\">\n        <UXColor\n          hex=\"179e50\"\n          label=\"Success\"\n        />\n        <UXColor\n          hex=\"fba706\"\n          label=\"Warning\"\n        />\n        <UXColor\n          hex=\"d0023a\"\n          label=\"Danger\"\n        />\n        <UXColor\n          hex=\"2c96e3\"\n          label=\"Info\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Text colors\">\n        <UXColor\n          hex=\"212529\"\n          label=\"Regular text\"\n        />\n        <UXColor\n          hex=\"6b7280\"\n          label=\"Muted text\"\n        />\n        <UXColor\n          hex=\"ff6348\"\n          label=\"Links\"\n        />\n      </UXExamples>\n      <UXExamples>\n        <UXColor\n          hex=\"026d2f\"\n          label=\"Success text\"\n        />\n        <UXColor\n          hex=\"885a08\"\n          label=\"Warning text\"\n        />\n        <UXColor\n          hex=\"ab002e\"\n          label=\"Danger text\"\n        />\n        <UXColor\n          hex=\"025fa2\"\n          label=\"Info text\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Element colors\">\n        <UXColor\n          hex=\"9da3a9\"\n          label=\"Element color\"\n        />\n        <UXColor\n          hex=\"6b7280\"\n          label=\"Element hover\"\n        />\n        <UXColor\n          hex=\"ff6348\"\n          label=\"Active element\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Border colors\">\n        <UXColor\n          hex=\"dcdee3\"\n          label=\"Default borders\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"e5e7eb\"\n          label=\"Lighter borders\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"9da3a9\"\n          label=\"Darker borders\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"ff6348\"\n          label=\"Active borders\"\n          use-dark-text\n        />\n      </UXExamples>\n      <UXExamples header=\"Background colors\">\n        <UXColor\n          hex=\"f9fafa\"\n          label=\"Panels\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"ffefed\"\n          label=\"Highlight\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"ffe1dd\"\n          label=\"Highlight (hover)\"\n          use-dark-text\n        />\n      </UXExamples>\n      <UXExamples>\n        <UXColor\n          hex=\"f5fff9\"\n          label=\"Success\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"fff9ef\"\n          label=\"Warning\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"fff7f9\"\n          label=\"Danger\"\n          use-dark-text\n        />\n        <UXColor\n          hex=\"f7fbff\"\n          label=\"Info\"\n          use-dark-text\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Generic buttons\">\n      <UXExamples header=\"Primary button\">\n        <ActionButton\n          type=\"primary\"\n          label=\"Default\"\n        />\n        <ActionButton\n          type=\"primary\"\n          label=\"Slim\"\n          is-slim\n        />\n        <ActionButton\n          type=\"primary\"\n          icon=\"search\"\n          label=\"With icon\"\n        />\n        <ActionButton\n          type=\"primary\"\n          count=\"5\"\n          label=\"With count\"\n        />\n        <ActionButton\n          type=\"primary\"\n          is-disabled\n          label=\"Disabled\"\n        />\n        <ActionButton\n          type=\"primary\"\n          has-spinner\n          label=\"Spinner\"\n        />\n        <ActionButton\n          type=\"primary\"\n          icon=\"grade\"\n        />\n        <ActionButton\n          type=\"primary\"\n          icon=\"grade\"\n          is-disabled\n        />\n        <ActionButton\n          type=\"primary\"\n          icon=\"grade\"\n          has-spinner\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Secondary button\">\n        <ActionButton\n          type=\"secondary\"\n          label=\"Default\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          label=\"Slim\"\n          is-slim\n        />\n        <ActionButton\n          type=\"secondary\"\n          icon=\"search\"\n          label=\"With icon\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          count=\"5\"\n          label=\"With count\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          is-disabled\n          label=\"Disabled\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          has-spinner\n          label=\"Spinner\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          icon=\"grade\"\n        />\n        <ActionButton\n          type=\"secondary\"\n          icon=\"grade\"\n          is-disabled\n        />\n        <ActionButton\n          type=\"secondary\"\n          icon=\"grade\"\n          has-spinner\n        />\n        <ActionButton\n          label=\"Danger\"\n          type=\"secondary\"\n          icon=\"delete\"\n          is-danger\n        />\n        <ActionButton\n          type=\"secondary\"\n          icon=\"delete\"\n          is-danger\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Link button\">\n        <ActionButton\n          type=\"link\"\n          label=\"Link button\"\n        />\n        <ActionButton\n          type=\"link\"\n          icon=\"search\"\n          label=\"With icon\"\n        />\n        <ActionButton\n          type=\"link\"\n          is-disabled\n          label=\"Disabled\"\n        />\n        <ActionButton\n          type=\"link\"\n          icon=\"star\"\n        />\n        <ActionButton\n          type=\"link\"\n          icon=\"star\"\n          is-disabled\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Text button\">\n        <ActionButton\n          type=\"text\"\n          label=\"Text button\"\n        />\n        <ActionButton\n          type=\"text\"\n          icon=\"search\"\n          label=\"With icon\"\n        />\n        <ActionButton\n          type=\"text\"\n          is-disabled\n          label=\"Disabled\"\n        />\n        <ActionButton\n          type=\"text\"\n          icon=\"star\"\n        />\n        <ActionButton\n          type=\"text\"\n          icon=\"star\"\n          is-disabled\n        />\n        <ActionButton\n          label=\"Danger\"\n          type=\"text\"\n          icon=\"delete\"\n          is-danger\n        />\n        <ActionButton\n          type=\"text\"\n          icon=\"delete\"\n          is-danger\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Specific buttons\">\n      <UXExamples header=\"Create buttons\">\n        <CreateButton />\n        <CreateButton\n          type=\"link\"\n        />\n        <CreateButton\n          type=\"link\"\n          icon-only\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Download/export button (regular & icon only)\">\n        <DownloadButton />\n        <DownloadButton icon-only />\n      </UXExamples>\n\n      <UXExamples header=\"Filter button with active filters count\">\n        <FiltersButton\n          :num-active-filters=\"3\"\n          :is-showing-filters=\"isShowingFilters\"\n          @click=\"isShowingFilters = !isShowingFilters\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Regenerate button\">\n        <RegenerateButton />\n      </UXExamples>\n\n      <UXExamples header=\"Close button (for modals, panels, etc.)\">\n        <CloseButton />\n      </UXExamples>\n\n      <UXExamples header=\"More actions button\">\n        <MoreActionsButton />\n      </UXExamples>\n\n      <UXExamples header=\"Back button\">\n        <BackButton />\n      </UXExamples>\n\n      <UXExamples header=\"Remove buttons\">\n        <RemoveButton />\n        <RemoveButton icon=\"close\" />\n      </UXExamples>\n\n      <UXExamples header=\"Copy button\">\n        <CopyButton />\n      </UXExamples>\n\n      <UXExamples header=\"Chevron button (collapsible)\">\n        <ChevronButton\n          :is-collapsed=\"isCollapsed\"\n          @click=\"isCollapsed = !isCollapsed\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Button bars\">\n      <UXExamples\n        header=\"Generic button bar\"\n        is-block\n      >\n        <ButtonBar>\n          <template #left>\n            <ActionButton\n              type=\"secondary\"\n              label=\"Left button\"\n            />\n          </template>\n          <template #right>\n            <ActionButton\n              type=\"secondary\"\n              label=\"Right button\"\n            />\n            <ActionButton\n              type=\"primary\"\n              label=\"Right button\"\n            />\n          </template>\n        </ButtonBar>\n      </UXExamples>\n\n      <UXExamples\n        header=\"Cancel / confirm bar\"\n        is-block\n      >\n        <CancelConfirmBar />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Flow navigation bar\"\n        is-block\n      >\n        <FlowNavigation\n          can-cancel\n          can-confirm\n          :can-go-back=\"flowStep > 1\"\n          :label-confirm=\"flowStep === 1 ? 'Continue' : 'Confirm'\"\n          :has-spinner-confirm=\"flowIsConfirming\"\n          @confirm=\"confirmFlowStep()\"\n          @back=\"flowStep--\"\n          @cancel=\"flowStep = 1\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Pill buttons\">\n      <UXExamples\n        is-block\n        header=\"Pill button (small)\"\n      >\n        <FormField>\n          <InputList is-inline>\n            <PillButton\n              label=\"Pill button\"\n              is-small\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n              is-small\n            />\n            <PillButton\n              label=\"Selected\"\n              is-selected\n              is-small\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n              is-selected\n              is-small\n            />\n          </InputList>\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        header=\"Pill button (normal)\"\n      >\n        <FormField>\n          <InputList is-inline>\n            <PillButton\n              label=\"Pill button\"\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n            />\n            <PillButton\n              label=\"Selected\"\n              is-selected\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n              is-selected\n            />\n          </InputList>\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        header=\"Pill button (large)\"\n      >\n        <FormField>\n          <InputList is-inline>\n            <PillButton\n              label=\"Pill button\"\n              is-large\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n              is-large\n            />\n            <PillButton\n              label=\"Selected\"\n              is-selected\n              is-large\n            />\n            <PillButton\n              label=\"Clearable\"\n              is-clearable\n              is-selected\n              is-large\n            />\n          </InputList>\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Text inputs\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input\"\n      >\n        <FormField>\n          <TextInput\n            :value=\"model.textInput\"\n            test-id=\"testTextInput\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (with placeholder text)\"\n      >\n        <FormField>\n          <TextInput\n            placeholder=\"Enter text here\"\n            :value=\"model.textInput2\"\n            @input=\"model.textInput2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (error state)\"\n      >\n        <FormField>\n          <TextInput\n            value=\"I have an error state\"\n            has-error\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (disabled)\"\n      >\n        <FormField>\n          <TextInput\n            value=\"I have been disabled\"\n            is-disabled\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (with spinner)\"\n      >\n        <FormField>\n          <TextInput\n            value=\"I have a spinner\"\n            has-spinner\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (multiline)\"\n      >\n        <FormField>\n          <TextInput\n            is-multiline\n            :character-limit=\"300\"\n            :value=\"model.textInputMultiline\"\n            @input=\"model.textInputMultiline = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (manual character count)\"\n      >\n        <FormField>\n          <TextInput\n            is-multiline\n            :character-limit=\"150\"\n            :manual-character-count=\"model.textInputMultiline2.length * 2\"\n            :value=\"model.textInputMultiline2\"\n            @input=\"model.textInputMultiline2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (ignored character limit)\"\n      >\n        <FormField>\n          <TextInput\n            is-multiline\n            :character-limit=\"150\"\n            ignore-character-limit\n            :value=\"model.textInputMultiline3\"\n            @input=\"model.textInputMultiline3 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (with emoij picker)\"\n      >\n        <FormField>\n          <TextInput\n            is-multiline\n            show-emoji-picker\n            :value=\"model.textInputMultiline4\"\n            @input=\"model.textInputMultiline4 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (with enter handling)\"\n      >\n        <FormField>\n          <TextInput\n            is-multiline\n            with-enter-key-handling\n            @keydown.enter=\"console.log($event)\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Text input (compact, matching button height)\"\n      >\n        <FormField>\n          <InputList is-inline>\n            <TextInput\n              is-compact\n              :value=\"model.textInput\"\n              @input=\"model.textInput = $event.value\"\n            />\n            <ActionButton\n              type=\"primary\"\n              label=\"Button\"\n            />\n          </InputList>\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Other text type inputs\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Search input\"\n      >\n        <FormField>\n          <SearchInput\n            :value=\"model.searchInput\"\n            @input=\"model.searchInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Time input\"\n      >\n        <FormField>\n          <TimeInput\n            :value=\"model.timeInput\"\n            @input=\"model.timeInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Time input (with custom display format)\"\n      >\n        <FormField>\n          <TimeInput\n            :value=\"model.timeInput\"\n            :display-format=\"dateFormats.TIME_24\"\n            @input=\"model.timeInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Time input (with ISO string input value)\"\n      >\n        <FormField>\n          <TimeInput\n            :value=\"model.timeInputIso\"\n            @input=\"model.timeInputIso = $event.iso\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Time input (disabled)\"\n      >\n        <FormField>\n          <TimeInput\n            :value=\"model.timeInput\"\n            is-disabled\n            @input=\"model.timeInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date input\"\n      >\n        <FormField>\n          <DateInput\n            :value=\"model.dateInput\"\n            @input=\"model.dateInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date input (with custom display format)\"\n      >\n        <FormField>\n          <DateInput\n            :value=\"model.dateInput\"\n            :display-format=\"dateFormats.DATE\"\n            @input=\"model.dateInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date input (with ISO string input value)\"\n      >\n        <FormField>\n          <DateInput\n            :value=\"model.dateInputIso\"\n            @input=\"model.dateInputIso = $event.iso\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date input (with formatted string input/output value)\"\n      >\n        <FormField>\n          <DateInput\n            :value=\"model.dateInputFormatted\"\n            :input-format=\"dateFormats.ISO_DATE_ONLY\"\n            :output-format=\"dateFormats.ISO_DATE_ONLY\"\n            @input=\"model.dateInputFormatted = $event.formattedValue\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date input (disabled)\"\n      >\n        <FormField>\n          <DateInput\n            :value=\"model.dateInput\"\n            is-disabled\n            @input=\"model.dateInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date range input\"\n      >\n        <FormField>\n          <DateInput\n            is-range\n            :value=\"model.dateInputRange\"\n            @input=\"model.dateInputRange = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Date range input (with custom preset dates)\"\n      >\n        <FormField>\n          <DateInput\n            is-range\n            :preset-dates=\"presetDates\"\n            :value=\"model.dateInputRange2\"\n            @input=\"model.dateInputRange2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Select inputs\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input\"\n      >\n        <FormField>\n          <SelectInput\n            :options=\"options\"\n            :value=\"model.selectInput\"\n            test-id=\"testSelectInput\"\n            @input=\"model.selectInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (opens on top)\"\n      >\n        <FormField>\n          <SelectInput\n            :options=\"options\"\n            :value=\"model.selectInput\"\n            position=\"top\"\n            @input=\"model.selectInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (with placeholder)\"\n      >\n        <FormField>\n          <SelectInput\n            :options=\"options\"\n            placeholder=\"Select an option\"\n            :value=\"model.selectInput2\"\n            @input=\"model.selectInput2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (error state)\"\n      >\n        <FormField>\n          <SelectInput\n            has-error\n            :options=\"options\"\n            :value=\"model.selectInput\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (disabled)\"\n      >\n        <FormField>\n          <SelectInput\n            is-disabled\n            :options=\"options\"\n            :value=\"model.selectInput\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (with spinner)\"\n      >\n        <FormField>\n          <SelectInput\n            is-disabled\n            has-spinner\n            :options=\"options\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (multiselect)\"\n      >\n        <FormField>\n          <SelectInput\n            is-multi-select\n            :options=\"options\"\n            :value=\"model.selectInputMulti\"\n            @input=\"model.selectInputMulti = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (multiselect, max 2 selections)\"\n      >\n        <FormField>\n          <SelectInput\n            is-multi-select\n            :max=\"2\"\n            :options=\"options\"\n            :value=\"model.selectInputMulti2\"\n            @input=\"model.selectInputMulti2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Select input (multiselect, disabled)\"\n      >\n        <FormField>\n          <SelectInput\n            is-disabled\n            is-multi-select\n            :options=\"options\"\n            :value=\"model.selectInputMulti\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Specific select inputs\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Country code select input\"\n      >\n        <FormField>\n          <CountryCodeSelectInput\n            :value=\"model.countryCode\"\n            @input=\"model.countryCode = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Timezone select input\"\n      >\n        <FormField>\n          <TimezoneSelectInput\n            :is-clearable=\"false\"\n            :value=\"model.timezone\"\n            @input=\"model.timezone = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Users select input\"\n      >\n        <FormField>\n          <SelectInput\n            is-multi-select\n            value-prop=\"id\"\n            label-prop=\"displayName\"\n            :options=\"users\"\n            :value=\"model.selectInputUsers\"\n            @input=\"model.selectInputUsers = $event.options\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Course select input\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Course select input (auto-loaded)\"\n      >\n        <FormField>\n          <CourseSelectInput\n            auto-load\n            :value=\"model.courseSelectInput\"\n            @input=\"model.courseSelectInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Course select input (manually loaded)\"\n      >\n        <FormField>\n          <CourseSelectInput\n            :courses=\"courses\"\n            :is-loading=\"isLoadingCourses\"\n            :value=\"model.courseSelectInput2\"\n            @input=\"model.courseSelectInput2 = $event.value\"\n          />\n          <template #underInput>\n            <ButtonBar>\n              <ActionButton\n                v-if=\"!courses.length\"\n                label=\"Load courses\"\n                type=\"secondary\"\n                @click=\"loadCourses()\"\n              />\n              <ActionButton\n                v-else\n                label=\"Unload courses\"\n                type=\"secondary\"\n                @click=\"unloadCourses()\"\n              />\n            </ButtonBar>\n          </template>\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Cohort select input\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Cohort select input (auto loaded)\"\n      >\n        <FormField>\n          <CohortSelectInput\n            auto-load\n            :value=\"model.cohortSelectInput\"\n            @input=\"model.cohortSelectInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Cohort select input (static cohorts only)\"\n      >\n        <FormField>\n          <CohortSelectInput\n            auto-load\n            static-only\n            :value=\"model.cohortSelectInput2\"\n            @input=\"model.cohortSelectInput2 = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Cohort select input (manually loaded)\"\n      >\n        <FormField>\n          <CohortSelectInput\n            :cohorts=\"cohorts\"\n            :is-loading=\"isLoadingCohorts\"\n            :value=\"model.cohortSelectInput3\"\n            @input=\"model.cohortSelectInput3 = $event.value\"\n          />\n          <template #underInput>\n            <ButtonBar>\n              <ActionButton\n                v-if=\"!cohorts.length\"\n                label=\"Load cohorts\"\n                type=\"secondary\"\n                @click=\"loadCohorts()\"\n              />\n              <ActionButton\n                v-else\n                label=\"Unload cohorts\"\n                type=\"secondary\"\n                @click=\"unloadCohorts()\"\n              />\n            </ButtonBar>\n          </template>\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Learner select input\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Learner select input (with search & infinite scroll)\"\n      >\n        <FormField>\n          <LearnerSelectInput\n            auto-load\n            :value=\"model.learnerSelectInput\"\n            @input=\"model.learnerSelectInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Check boxes and radio buttons\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Check box\"\n      >\n        <FormField>\n          <CheckBox\n            label=\"A single check box\"\n            :is-checked=\"model.checkBox\"\n            @click=\"model.checkBox = !model.checkBox\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Check box (with sub label)\"\n      >\n        <FormField>\n          <CheckBox\n            label=\"A single check box\"\n            sub-label=\"With a sub label\"\n            :is-checked=\"model.checkBox2\"\n            @click=\"model.checkBox2 = !model.checkBox2\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Check box list\"\n      >\n        <FormField>\n          <CheckBoxList\n            :options=\"options\"\n            :value=\"model.checkBoxList\"\n            @input=\"model.checkBoxList = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Check box list (disabled)\"\n      >\n        <FormField>\n          <CheckBoxList\n            is-disabled\n            :options=\"options\"\n            :value=\"model.checkBoxList\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Radio button list\"\n      >\n        <FormField>\n          <RadioButtonList\n            :options=\"options\"\n            :value=\"model.radioButtonList\"\n            @input=\"model.radioButtonList = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Radio button list (disabled)\"\n      >\n        <FormField>\n          <RadioButtonList\n            is-disabled\n            :options=\"options\"\n            :value=\"model.radioButtonList\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Learner picker\">\n      <UXExamples\n        is-block\n        header=\"Learner picker\"\n      >\n        <LearnerPicker />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Toggles\">\n      <UXExamples\n        is-block\n        header=\"Toggle\"\n      >\n        <FormField>\n          <Toggle\n            label=\"A simple two-state toggle\"\n            :is-checked=\"model.toggle\"\n            @click=\"model.toggle = !model.toggle\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Toggle (disabled)\"\n      >\n        <FormField>\n          <Toggle\n            label=\"A simple two-state toggle\"\n            :is-checked=\"model.toggle\"\n            is-disabled\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Toggle\"\n      >\n        <FormField>\n          <Toggle\n            label=\"A toggle with a sub label\"\n            sub-label=\"Hello, I am sub label\"\n            :is-checked=\"model.toggle\"\n            @click=\"model.toggle = !model.toggle\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Toggle (small)\"\n      >\n        <FormField>\n          <Toggle\n            label=\"A small toggle for tiny spaces\"\n            :is-checked=\"model.toggle\"\n            is-small\n            @click=\"model.toggle = !model.toggle\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Toggle (small, sub label only)\"\n      >\n        <FormField>\n          <Toggle\n            sub-label=\"A small toggle with just a sub label\"\n            :is-checked=\"model.toggle\"\n            is-small\n            @click=\"model.toggle = !model.toggle\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Pill button lists\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Pill button list (single select)\"\n      >\n        <FormField>\n          <PillButtonList\n            :options=\"options\"\n            :value=\"model.pillButtonListSingle\"\n            @input=\"model.pillButtonListSingle = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Pill button list (multi select)\"\n      >\n        <FormField>\n          <PillButtonList\n            :options=\"options\"\n            is-multi-select\n            :value=\"model.pillButtonListMulti\"\n            @input=\"model.pillButtonListMulti = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Pill button list (single select, resettable)\"\n      >\n        <FormField>\n          <PillButtonList\n            :options=\"options\"\n            can-reset\n            :value=\"model.pillButtonListSingleNullable\"\n            @input=\"model.pillButtonListSingleNullable = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Pill button list (multi select, resettable)\"\n      >\n        <FormField>\n          <PillButtonList\n            :options=\"options\"\n            is-multi-select\n            can-reset\n            :value=\"model.pillButtonListMultiNullable\"\n            @input=\"model.pillButtonListMultiNullable = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Pill button list (large)\"\n      >\n        <FormField>\n          <PillButtonList\n            :options=\"options\"\n            :value=\"model.pillButtonListSingle\"\n            is-large\n            @input=\"model.pillButtonListSingle = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Form fields\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field\"\n      >\n        <FormField label=\"This is a label\">\n          <TextInput\n            :value=\"model.textInput\"\n            placeholder=\"Start typing here\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field (required)\"\n      >\n        <FormField\n          label=\"This is a label\"\n          is-required\n        >\n          <TextInput\n            :value=\"model.textInput\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field (optional)\"\n      >\n        <FormField\n          label=\"This is a label\"\n          is-optional\n        >\n          <TextInput\n            :value=\"model.textInput\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field (with help text)\"\n      >\n        <FormField\n          label=\"This is a label\"\n          help=\"Help text here\"\n        >\n          <TextInput\n            :value=\"model.textInput\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field (supporting message)\"\n      >\n        <FormField\n          label=\"This is a label\"\n          message=\"Supporting message\"\n        >\n          <TextInput\n            :value=\"model.textInput\"\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Form field (error state)\"\n      >\n        <FormField\n          label=\"This is a label\"\n          :errors=\"[\n            'Something is wrong',\n            'Errors will appear below the field',\n          ]\"\n        >\n          <TextInput\n            :value=\"model.textInput\"\n            placeholder=\"Start typing here\"\n            has-error\n            @input=\"model.textInput = $event.value\"\n          />\n        </FormField>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Icons\">\n      <UXExamples\n        v-for=\"size in iconSizes\"\n        :key=\"size\"\n        :header=\"`Icons (${size})`\"\n      >\n        <Icon\n          v-for=\"icon in icons\"\n          :key=\"`${icon}_fill`\"\n          :icon=\"icon\"\n          :size=\"size\"\n          color=\"primary\"\n        />\n        <Icon\n          v-for=\"icon in icons\"\n          :key=\"`${icon}_outline`\"\n          :icon=\"icon\"\n          :size=\"size\"\n          is-outlined\n          color=\"primary\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"With count\">\n        <IconCount\n          icon=\"folder\"\n          :count=\"5\"\n          size=\"l\"\n          color=\"primary\"\n        />\n        <IconCount\n          icon=\"cloud\"\n          :count=\"5\"\n          size=\"l\"\n          color=\"primary\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Icon tiles\">\n      <UXExamples\n        v-for=\"size in iconWrapperSizes\"\n        :key=\"size\"\n        :header=\"`Icon tiles (${size})`\"\n      >\n        <IconTile\n          v-for=\"icon in icons\"\n          :key=\"`${icon}_wrapper`\"\n          :size=\"size\"\n        >\n          <Icon\n            :icon=\"icon\"\n            :size=\"size\"\n            color=\"primary\"\n          />\n        </IconTile>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Icon labels\">\n      <UXExamples\n        header=\"Icon labels\"\n        is-column\n      >\n        <IconLabel\n          icon=\"schedule\"\n          label=\"This is an icon label\"\n        />\n        <IconLabel\n          icon=\"star\"\n          label=\"Non-outlined\"\n          :is-outlined=\"false\"\n        />\n        <IconLabel\n          icon=\"search\"\n          label=\"Another icon label\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Status icon labels\"\n        is-column\n      >\n        <StatusIconLabels>\n          <StatusIconLabel\n            :status=\"statusConstant.SUCCESS\"\n            label=\"The first step completed\"\n          />\n          <StatusIconLabel\n            :status=\"statusConstant.SUCCESS\"\n            label=\"The second step in progress\"\n            has-spinner\n          />\n          <StatusIconLabel\n            label=\"The third step yet to begin\"\n          />\n        </StatusIconLabels>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Icon circles\">\n      <UXExamples\n        v-for=\"size in iconSizes\"\n        :key=\"size\"\n        :header=\"`Icon circles (${size})`\"\n      >\n        <IconCircle\n          icon=\"search\"\n          :size=\"size\"\n        />\n        <IconCircle\n          icon=\"search\"\n          :size=\"size\"\n          is-outline\n        />\n        <IconCircle\n          icon=\"people\"\n          :size=\"size\"\n          type=\"primary\"\n        />\n        <IconCircle\n          icon=\"people\"\n          :size=\"size\"\n          type=\"primary\"\n          is-outline\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Tooltips\">\n      <UXExamples header=\"Generic tooltip\">\n        <Tooltip text=\"This is a tooltip\">\n          Hover over me\n        </Tooltip>\n      </UXExamples>\n\n      <UXExamples header=\"Tooltip icon\">\n        <TooltipIcon\n          text=\"This is a generic tooltip icon\"\n          icon=\"star\"\n        />\n        <TooltipIcon\n          text=\"A non-outlined tooltip icon\"\n          icon=\"star\"\n          color=\"warning\"\n          :is-outlined=\"false\"\n        />\n        <TooltipIcon\n          text=\"This is a another tooltip icon\"\n          icon=\"bookmark\"\n          color=\"info\"\n        />\n        <TooltipIcon\n          text=\"Yet another tooltip icon\"\n          icon=\"check_circle\"\n          color=\"success\"\n        />\n        <TooltipIcon\n          text=\"A fifth tooltip icon\"\n          icon=\"error\"\n          color=\"danger\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Help tooltip icon\">\n        <Help text=\"This is a help tooltip\" />\n      </UXExamples>\n\n      <UXExamples header=\"Warning tooltip icon\">\n        <Warning text=\"This is a warning tooltip\" />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Links\">\n      <UXExamples header=\"Text link\">\n        <TextLink\n          url=\"https://arist.app\"\n          text=\"A plain text link\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Text link (with icon)\">\n        <TextLink\n          url=\"https://arist.app\"\n          text=\"A plain text link with icon\"\n          icon=\"search\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Text link (non-clickable)\">\n        <TextLink\n          url=\"https://arist.app\"\n          text=\"A non-clickable text link\"\n          :is-clickable=\"false\"\n        />\n      </UXExamples>\n      <UXExamples header=\"External link\">\n        <ExternalLink\n          url=\"https://arist.app\"\n          text=\"An external link\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Email link\">\n        <EmailLink\n          email=\"test@arist.co\"\n        />\n      </UXExamples>\n      <UXExamples header=\"Download link\">\n        <DownloadLink\n          url=\"https://arist.app\"\n          text=\"A link to download something\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Alerts\">\n      <UXExamples\n        v-for=\"(status, i) in statuses\"\n        :key=\"`${status}_alert`\"\n        :header=\"(i === 0) ? `Alerts` : ''\"\n        is-column\n        limited-width\n      >\n        <Alert\n          :text=\"`This is a ${status} alert`\"\n          :type=\"status\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Flash messages\">\n      <UXExamples\n        v-for=\"(status, i) in statuses\"\n        :key=\"`${status}_flash`\"\n        :header=\"(i === 0) ? `Flash messages` : ''\"\n        is-column\n        limited-width\n      >\n        <FlashMessage\n          :text=\"`This is a ${status} flash message`\"\n          :type=\"status\"\n          @click=\"showFlashMessage(`Test ${status} flash message`, status)\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        v-for=\"(status, i) in statuses\"\n        :key=\"`${status}_flash_static`\"\n        :header=\"(i === 0) ? `Flash messages (static)` : ''\"\n        is-column\n        limited-width\n      >\n        <FlashMessage\n          :text=\"`This is a static ${status} flash message`\"\n          :type=\"status\"\n          is-static\n          @click=\"showFlashMessage(`Test static ${status} flash message`, status, 0)\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Dropdowns\">\n      <UXExamples header=\"Actions dropdown menu\">\n        <ActionsDropdownMenu>\n          <DropdownMenuItem label=\"Action 1\" />\n          <DropdownMenuItem label=\"Action 2\" />\n          <DropdownMenuItem label=\"Action 3\" />\n          <DropdownMenuItem\n            label=\"Disabled\"\n            is-disabled\n          />\n          <DropdownMenuItem label=\"Nested\">\n            <template #nested=\"{isVisible, hide}\">\n              <ActionsDropdownMenuNested\n                :is-visible=\"isVisible\"\n                :hide=\"hide\"\n              >\n                <DropdownMenuItem label=\"Action 4\" />\n                <DropdownMenuItem label=\"Action 5\" />\n                <DropdownMenuItem label=\"Action 6\" />\n              </ActionsDropdownMenuNested>\n            </template>\n          </DropdownMenuItem>\n        </ActionsDropdownMenu>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Filters dropdown panel\"\n      >\n        <FiltersDropdownPanel\n          :num-active-filters=\"(filter.pillButtonListSingleNullable ? 1 : 0) + filter.pillButtonListMultiNullable.length\"\n          @clear=\"clearFilter()\"\n        >\n          <FormField label=\"Options\">\n            <PillButtonList\n              :options=\"options\"\n              can-reset\n              :value=\"filter.pillButtonListSingleNullable\"\n              @input=\"filter.pillButtonListSingleNullable = $event.value\"\n            />\n          </FormField>\n          <FormField label=\"Options\">\n            <PillButtonList\n              :options=\"options\"\n              is-multi-select\n              can-reset\n              :value=\"filter.pillButtonListMultiNullable\"\n              @input=\"filter.pillButtonListMultiNullable = $event.value\"\n            />\n          </FormField>\n        </FiltersDropdownPanel>\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Example dropdown\"\n      >\n        <ExampleDropdown\n          header=\"Example\"\n        >\n          <p>\n            Project Managers need to know when to schedule meetings, how to prepare by building an agenda, strategies to conduct a meething, and how to follow-up after a metting to ensure deliverables.\n          </p>\n        </ExampleDropdown>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Overview tables\">\n      <UXExamples\n        is-block\n        header=\"Overview table header bar\"\n      >\n        <OverviewTableHeader>\n          <template #search>\n            <SearchInput is-compact />\n          </template>\n          <template #filters>\n            <FiltersDropdownPanel\n              :num-active-filters=\"(filter.pillButtonListSingleNullable ? 1 : 0) + filter.pillButtonListMultiNullable.length\"\n              @clear=\"clearFilter()\"\n            >\n              <FormField label=\"Options\">\n                <PillButtonList\n                  :options=\"options\"\n                  can-reset\n                  :value=\"filter.pillButtonListSingleNullable\"\n                  @input=\"filter.pillButtonListSingleNullable = $event.value\"\n                />\n              </FormField>\n              <FormField label=\"Options\">\n                <PillButtonList\n                  :options=\"options\"\n                  is-multi-select\n                  can-reset\n                  :value=\"filter.pillButtonListMultiNullable\"\n                  @input=\"filter.pillButtonListMultiNullable = $event.value\"\n                />\n              </FormField>\n            </FiltersDropdownPanel>\n          </template>\n          <template #actions>\n            <DownloadButton />\n            <ActionButton\n              type=\"primary\"\n              label=\"Create something\"\n              icon=\"group_add\"\n            />\n          </template>\n        </OverviewTableHeader>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Navigation\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Tabs (regular)\"\n      >\n        <TabNavigation\n          :tabs=\"tabs\"\n          :active-tab=\"activeTab\"\n          @change-tab=\"activeTab = $event.tab\"\n        />\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Tabs (large)\"\n      >\n        <TabNavigation\n          :tabs=\"tabs\"\n          :active-tab=\"activeTab\"\n          is-large\n          @change-tab=\"activeTab = $event.tab\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Nav item\"\n      >\n        <NavMenuItem label=\"Inactive\" />\n        <NavMenuItem\n          label=\"Disabled\"\n          is-disabled\n        />\n        <NavMenuItem\n          icon=\"home\"\n          is-outlined\n          label=\"Inactive with icon and right slot\"\n        >\n          <template #right>\n            2\n          </template>\n        </NavMenuItem>\n        <NavMenuItem\n          is-active\n          label=\"Active\"\n          icon=\"person\"\n          is-outlined\n        />\n        <NavMenuItem\n          is-active\n          label=\"Active disabled\"\n          icon=\"person\"\n          is-disabled\n          is-outlined\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Flow step indicators\">\n        <StepIndicators :is-spaced=\"false\">\n          <StepIndicator\n            label=\"Step 1\"\n            icon=\"search\"\n            is-clickable\n            :is-active=\"activeStep === 1\"\n            @click=\"activeStep = 1\"\n          />\n          <StepDivider />\n          <StepIndicator\n            label=\"Step 2\"\n            icon=\"people\"\n            is-clickable\n            :is-active=\"activeStep === 2\"\n            @click=\"activeStep = 2\"\n          />\n          <StepDivider />\n          <StepIndicator\n            label=\"Step 3\"\n            icon=\"cloud\"\n            is-clickable\n            :is-active=\"activeStep === 3\"\n            @click=\"activeStep = 3\"\n          />\n        </StepIndicators>\n      </UXExamples>\n      <UXExamples header=\"Flow step indicators (centered)\">\n        <StepIndicators\n          :is-spaced=\"false\"\n          is-centered\n        >\n          <StepIndicator\n            label=\"Step 1\"\n            icon=\"search\"\n            is-clickable\n            :is-active=\"activeStep === 1\"\n            @click=\"activeStep = 1\"\n          />\n          <StepDivider />\n          <StepIndicator\n            label=\"Step 2\"\n            icon=\"people\"\n            is-clickable\n            :is-active=\"activeStep === 2\"\n            @click=\"activeStep = 2\"\n          />\n        </StepIndicators>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Image cards\">\n      <UXExamples\n        is-block\n        header=\"Image card\"\n      >\n        <ImageCard src=\"https://cdn.britannica.com/34/235834-004-A701AB85/two-different-breeds-of-cats-side-by-side-outdoors-in-the-garden.jpg?s=750x350&q=85\" />\n      </UXExamples>\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Image card (for image key)\"\n      >\n        <TextInput\n          :value=\"model.imageKey\"\n          placeholder=\"Enter a valid existing image key\"\n          @input=\"model.imageKey = $event.value\"\n        />\n        <br>\n        <ImageCard\n          :src=\"model.imageKey\"\n          is-image-key\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Media inputs\">\n      <UXExamples\n        is-block\n        header=\"Image input\"\n      >\n        <ImageInput\n          :image-key=\"model.imageKey\"\n          @input=\"setMediaKeys($event)\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Media input (image or video)\"\n      >\n        <MediaInput\n          :image-key=\"model.imageKey\"\n          :video-key=\"model.videoKey\"\n          @input=\"setMediaKeys($event)\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"File selection\">\n      <UXExamples\n        is-block\n        header=\"File select (any file, no limits)\"\n      >\n        <FileSelect\n          allow-multiple\n          @files=\"log($event.files)\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"File select (specific types, multiple files, max file size)\"\n      >\n        <FileSelect\n          allow-multiple\n          :allowed-file-types=\"aiSourceMaterialFileTypes\"\n          max-file-size=\"5MB\"\n          max-total-size=\"10MB\"\n          @files=\"log($event.files)\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Media file select (any media, multiple files)\"\n      >\n        <MediaFileSelect\n          allow-multiple\n          @files=\"log($event.files)\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        is-block\n        header=\"Media file select (image only, single file, max file size)\"\n      >\n        <MediaFileSelect\n          max-file-size=\"2MB\"\n          noun=\"image\"\n          :allowed-file-types=\"imageFileTypes\"\n          @files=\"log($event.files[0])\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Modal elements\">\n      <UXExamples\n        header=\"Modal block buttons\"\n        limited-width\n      >\n        <FlexColumn>\n          <ModalBlockButton\n            header=\"Course from scratch\"\n            subheader=\"Jump right in and build some great learning!\"\n            icon=\"construction\"\n            link=\"Get started\"\n          />\n          <ModalBlockButton\n            header=\"Build with AI\"\n            subheader=\"Create courses faster - let AI handle the first draft.\"\n            icon=\"smart_toy\"\n            link=\"Get started with AI\"\n          />\n        </FlexColumn>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Page elements\">\n      <UXExamples\n        is-block\n        header=\"Page outline\"\n      >\n        <PageOutline header=\"Outline\">\n          <FlexColumn>\n            <PageOutlineBlock>\n              <PageOutlineBlockItem\n                label=\"Block 1\"\n                icon=\"grade\"\n                is-clickable\n                is-draggable\n              >\n                <template #actions>\n                  <ActionsDropdownMenu>\n                    <DropdownMenuItem label=\"Action 1\" />\n                    <DropdownMenuItem label=\"Action 2\" />\n                    <DropdownMenuItem label=\"Action 3\" />\n                  </ActionsDropdownMenu>\n                </template>\n              </PageOutlineBlockItem>\n              <PageOutlineBlockItem\n                label=\"Sub block\"\n                icon=\"subdirectory_arrow_right\"\n                is-clickable\n                is-secondary\n                is-parent-draggable\n              >\n                <template #actions>\n                  <RemoveButton icon=\"close\" />\n                </template>\n              </PageOutlineBlockItem>\n            </PageOutlineBlock>\n            <PageOutlineBlock>\n              <PageOutlineBlockItem\n                label=\"Block 2\"\n                icon=\"construction\"\n                is-clickable\n                is-draggable\n              >\n                <template #actions>\n                  <ActionsDropdownMenu>\n                    <DropdownMenuItem label=\"Action 1\" />\n                    <DropdownMenuItem label=\"Action 2\" />\n                    <DropdownMenuItem label=\"Action 3\" />\n                  </ActionsDropdownMenu>\n                </template>\n              </PageOutlineBlockItem>\n            </PageOutlineBlock>\n            <PageOutlineBlock>\n              <PageOutlineBlockItem\n                label=\"Block 3\"\n                icon=\"smart_toy\"\n                is-clickable\n                is-draggable\n              >\n                <template #actions>\n                  <ActionsDropdownMenu>\n                    <DropdownMenuItem label=\"Action 1\" />\n                    <DropdownMenuItem label=\"Action 2\" />\n                    <DropdownMenuItem label=\"Action 3\" />\n                  </ActionsDropdownMenu>\n                </template>\n              </PageOutlineBlockItem>\n              <PageOutlineBlockItem\n                label=\"Sub block\"\n                icon=\"subdirectory_arrow_right\"\n                is-clickable\n                is-secondary\n                is-parent-draggable\n              >\n                <template #actions>\n                  <RemoveButton icon=\"close\" />\n                </template>\n              </PageOutlineBlockItem>\n              <PageOutlineBlockItem\n                label=\"Another sub block\"\n                icon=\"subdirectory_arrow_right\"\n                is-clickable\n                is-secondary\n                is-parent-draggable\n              >\n                <template #actions>\n                  <RemoveButton icon=\"close\" />\n                </template>\n              </PageOutlineBlockItem>\n            </PageOutlineBlock>\n          </FlexColumn>\n\n          <ActionButton\n            type=\"primary\"\n            label=\"Add block\"\n            icon=\"add_circle\"\n          />\n        </PageOutline>\n      </UXExamples>\n\n      <UXExamples\n        header=\"Summary blocks\"\n        is-block\n      >\n        <SummaryBlock label=\"Label one\">\n          <p>This is a summary block</p>\n        </SummaryBlock>\n        <SummaryBlock label=\"Label two\">\n          <p>This is also a summary block</p>\n        </SummaryBlock>\n        <SummaryBlock label=\"Label three\">\n          <p>This is, surprisingly, also a summary block</p>\n        </SummaryBlock>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Count indicators\">\n      <UXExamples header=\"Count indicator\">\n        <CountIndicator :count=\"1\" />\n        <CountIndicator :count=\"5\" />\n        <CountIndicator :count=\"20\" />\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator (inactive)\">\n        <CountIndicator\n          :count=\"1\"\n          :is-active=\"false\"\n        />\n        <CountIndicator\n          :count=\"5\"\n          :is-active=\"false\"\n        />\n        <CountIndicator\n          :count=\"20\"\n          :is-active=\"false\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator (inactive, clickable)\">\n        <CountIndicator\n          :count=\"1\"\n          :is-active=\"false\"\n          is-clickable\n        />\n        <CountIndicator\n          :count=\"5\"\n          :is-active=\"false\"\n          is-clickable\n        />\n        <CountIndicator\n          :count=\"20\"\n          :is-active=\"false\"\n          is-clickable\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator (large)\">\n        <CountIndicator\n          :count=\"1\"\n          is-large\n        />\n        <CountIndicator\n          :count=\"5\"\n          is-large\n        />\n        <CountIndicator\n          :count=\"20\"\n          is-large\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator (large, inactive)\">\n        <CountIndicator\n          :count=\"1\"\n          is-large\n          :is-active=\"false\"\n        />\n        <CountIndicator\n          :count=\"5\"\n          is-large\n          :is-active=\"false\"\n        />\n        <CountIndicator\n          :count=\"20\"\n          is-large\n          :is-active=\"false\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator (large, inactive, clickable)\">\n        <CountIndicator\n          :count=\"1\"\n          is-large\n          :is-active=\"false\"\n          is-clickable\n        />\n        <CountIndicator\n          :count=\"5\"\n          is-large\n          :is-active=\"false\"\n          is-clickable\n        />\n        <CountIndicator\n          :count=\"20\"\n          is-large\n          :is-active=\"false\"\n          is-clickable\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Table components\">\n      <UXExamples\n        header=\"Pagination\"\n        is-block\n      >\n        <Pagination\n          :current-page=\"model.currentPage\"\n          :items-per-page=\"10\"\n          :total-items=\"100\"\n          @view-page=\"model.currentPage = $event.page\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Pagination (compact)\"\n        is-block\n      >\n        <Pagination\n          :current-page=\"model.currentPage\"\n          :items-per-page=\"10\"\n          :total-items=\"100\"\n          :max-pages=\"5\"\n          @view-page=\"model.currentPage = $event.page\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Bulk actions bar\"\n        is-block\n      >\n        <BulkActionsBar :num-selected=\"5\">\n          <BulkAction\n            label=\"Favorite\"\n            icon=\"star\"\n          />\n          <BulkAction\n            label=\"Remove\"\n            icon=\"delete\"\n            is-icon-outlined\n          />\n        </BulkActionsBar>\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Badges &amp; tags\">\n      <UXExamples\n        header=\"Generic status badges\"\n      >\n        <StatusBadge\n          v-for=\"color in statusBadgeColors\"\n          :key=\"color\"\n          :color=\"color\"\n          :text=\"toUpperCaseFirst(color)\"\n        />\n        <StatusBadge\n          text=\"Default\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Schedule status badges\"\n      >\n        <ScheduleStatus\n          v-for=\"(schedule, i) in schedules\"\n          :key=\"i\"\n          :status=\"schedule.currentStatus\"\n          :created-at=\"schedule.createdAt\"\n          :concluded-on=\"schedule.concludedOn\"\n          :disabled-at=\"schedule.disabledAt\"\n          :launch-date=\"schedule.launchDate\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Enrolment status badges\"\n      >\n        <EnrollmentStatus\n          v-for=\"option in enrollmentStatusOptions\"\n          :key=\"option.value\"\n          :status=\"option.value\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Enrolment progress badge\"\n      >\n        <EnrollmentProgress\n          :num-steps=\"10\"\n          :num-completed=\"4\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Schedule status badges\"\n      >\n        <ScheduleStatus\n          v-for=\"(schedule, i) in schedules\"\n          :key=\"i\"\n          :status=\"schedule.currentStatus\"\n          :created-at=\"schedule.createdAt\"\n          :concluded-on=\"schedule.concludedOn\"\n          :disabled-at=\"schedule.disabledAt\"\n          :launch-date=\"schedule.launchDate\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Course status badges\"\n      >\n        <CourseStatus\n          v-for=\"status in Object.values(courseStatuses)\"\n          :key=\"status\"\n          :status=\"status\"\n        />\n        <CourseStatus\n          custom-label=\"Custom\"\n        />\n      </UXExamples>\n\n      <UXExamples header=\"Tags\">\n        <InputList is-inline>\n          <Tag label=\"Tag\" />\n          <Tag label=\"Another\" />\n          <Tag\n            label=\"Disabled\"\n            is-disabled\n          />\n          <Tag\n            label=\"Clearable\"\n            is-clearable\n          />\n          <Tag\n            label=\"Clearable disabled\"\n            is-clearable\n            is-disabled\n          />\n        </InputList>\n      </UXExamples>\n\n      <UXExamples header=\"Count indicator\">\n        <CountIndicator :count=\"1\" />\n        <CountIndicator :count=\"5\" />\n        <CountIndicator :count=\"20\" />\n      </UXExamples>\n    </PageBlock>\n    <PageBlock header=\"Progress bars\">\n      <UXExamples\n        header=\"Progress bar\"\n        is-block\n        limited-width\n      >\n        <ProgressBar\n          :progress=\"progress\"\n          show-label\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Progress bar (compact)\"\n        is-block\n        limited-width\n      >\n        <ProgressBar\n          :progress=\"progress\"\n          show-label\n          is-compact\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Progress bar (indeterminate)\"\n        is-block\n        limited-width\n      >\n        <ProgressBar\n          :progress=\"progress\"\n          is-indeterminate\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Progress bar (AI task status driven)\"\n        is-block\n      >\n        <ProgressBar\n          :progress=\"aiTaskStatusProgress\"\n          show-label\n        />\n      </UXExamples>\n\n      <hr>\n\n      <p>Current status: <strong>{{ aiTaskStatus }}</strong></p>\n      <br>\n\n      <TextInput\n        is-multiline\n        :value=\"aiTaskStatusesList\"\n        @input=\"aiTaskStatusesList = $event.value\"\n      />\n\n      <ButtonBar>\n        <ActionButton\n          type=\"primary\"\n          label=\"Start\"\n          :has-spinner=\"aiTaskStatusIsRunning\"\n          @click=\"startAITaskStatusInterval()\"\n        />\n        <ActionButton\n          v-if=\"aiTaskStatusIsRunning\"\n          type=\"secondary\"\n          label=\"Stop\"\n          @click=\"stopAITaskStatusInterval()\"\n        />\n      </ButtonBar>\n    </PageBlock>\n\n    <PageBlock header=\"Export status bar\">\n      <UXExamples\n        header=\"Export status bar\"\n        is-column\n      >\n        <ExportStatusBar\n          :export-status=\"dataExportStatuses.PENDING\"\n          :class=\"$style.relative\"\n        />\n        <ExportStatusBar\n          :export-status=\"dataExportStatuses.QUEUED\"\n          :class=\"$style.relative\"\n        />\n        <ExportStatusBar\n          :export-status=\"dataExportStatuses.PROCESSING\"\n          :export-progress=\"0.37\"\n          :class=\"$style.relative\"\n        />\n        <ExportStatusBar\n          :export-status=\"dataExportStatuses.COMPLETED\"\n          export-link=\"https://example.org\"\n          :class=\"$style.relative\"\n        />\n        <ExportStatusBar\n          :export-status=\"dataExportStatuses.FAILED\"\n          export-error=\"Something went wrong\"\n          :class=\"$style.relative\"\n        />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Drag and drop\">\n      <UXExamples\n        header=\"Dropzones\"\n        is-block\n        limited-width\n      >\n        <Dropzone>\n          This is a regular dropzone\n        </Dropzone>\n        <Dropzone is-primary>\n          This is a primary dropzone\n        </Dropzone>\n        <Dropzone\n          is-primary\n          is-large\n        >\n          This is a large dropzone\n        </Dropzone>\n      </UXExamples>\n\n      <UXExamples header=\"Drag handle\">\n        <DragHandle />\n      </UXExamples>\n    </PageBlock>\n\n    <PageBlock header=\"Other\">\n      <UXExamples\n        is-block\n        limited-width\n        header=\"Inline spinner\"\n      >\n        <Spinner />\n      </UXExamples>\n\n      <UXExamples\n        v-for=\"(size, i) in statusDotSizes\"\n        :key=\"size\"\n        :header=\"(i === 0) ? 'Status dot (small, medium, large)' : ''\"\n      >\n        <StatusDot\n          v-for=\"status in statuses\"\n          :key=\"`${status}_dot`\"\n          :status=\"status\"\n          :size=\"size\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Divider\"\n        is-block\n      >\n        <Divider />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Divider (with label)\"\n        is-block\n      >\n        <Divider label=\"or\" />\n      </UXExamples>\n\n      <UXExamples\n        header=\"Activity line items\"\n        is-block\n      >\n        <ActivityLineItem\n          v-for=\"activity in activities\"\n          :key=\"activity.id\"\n          :icon=\"activity.icon\"\n          :action=\"activity.action\"\n          :actor=\"activity.actor\"\n          :timestamp=\"activity.timestamp\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"CSV data preview\"\n        is-block\n        limited-width\n      >\n        <CSVSampleDataPreview\n          :values=\"lastNames\"\n          :limit=\"7\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"CSV import errors list\"\n        is-block\n        limited-width\n      >\n        <CSVImportErrorsList\n          :errors=\"csvImportErrors\"\n        />\n      </UXExamples>\n\n      <UXExamples\n        header=\"CSV import errors summary\"\n        is-block\n        limited-width\n      >\n        <CSVImportErrorsSummary\n          :summary=\"csvImportErrorsSummary\"\n        />\n      </UXExamples>\n    </PageBlock>\n  </PageWrapper>\n</template>\n\n<style module lang=\"scss\">\n.bodyTextLarge {\n  font-size: var(--font-size-text-large);\n}\n.relative {\n  position: relative !important;\n}\n</style>\n","import AnalyticsDashboard from '@/views/analytics/AnalyticsDashboard.vue'\nimport AutomationsEdit from '@/views/automations/AutomationsEdit.vue'\nimport AutomationsOverview from '@/views/automations/AutomationsOverview.vue'\nimport AutomationsNew from '@/views/automations/AutomationsNew.vue'\nimport CohortsOverview from '@/views/cohorts/CohortsOverview.vue'\nimport CohortView from '@/views/cohorts/CohortView.vue'\nimport CourseCatalogOverview from '@/views/course_catalog/CourseCatalogOverview.vue'\nimport CourseCatalogView from '@/views/course_catalog/CourseCatalogView.vue'\nimport CourseAIBuildFlow from '@/views/courses/CourseAIBuildFlow.vue'\nimport CourseAITranslateFlow from '@/views/courses/CourseAITranslateFlow.vue'\nimport CourseAIModifyFlow from '@/views/courses/CourseAIModifyFlow.vue'\nimport CourseEdit from '@/views/courses/CourseEdit.vue'\nimport CourseView from '@/views/courses/CourseView.vue'\nimport CourseCreate from '@/views/courses/CourseCreate.vue'\nimport CoursesOverview from '@/views/courses/CoursesOverview.vue'\nimport ScheduleEdit from '@/views/schedules/ScheduleEdit.vue'\nimport ScheduleCreate from '@/views/schedules/ScheduleCreate.vue'\nimport EnrollmentOptions from '@/views/schedules/SchedulesEnrollmentOptions.vue'\nimport LearnersOverview from '@/views/learners/LearnersOverview.vue'\nimport LearnerView from '@/views/learners/LearnerView.vue'\nimport MyEnrollmentsOverview from '@/views/my_enrollments/MyEnrollmentsOverview.vue'\nimport MyEnrollmentView from '@/views/my_enrollments/MyEnrollmentView.vue'\nimport SchedulesOverview from '@/views/schedules/SchedulesOverview.vue'\nimport SchedulesLaunchDashboard from '@/views/schedules/SchedulesLaunchDashboard.vue'\nimport SettingsIndex from '@/views/settings/SettingsIndex.vue'\nimport SuperAdminIndex from '@/views/super_admin/SuperAdminIndex.vue'\nimport ContentLibraryOverview from '@/views/content_library/ContentLibraryOverview.vue'\nimport ContentLibraryView from '@/views/content_library/ContentLibraryView.vue'\n\n//Special\nimport PageNotFound from '@/views/PageNotFound.vue'\nimport UXComponentsReference from '@/views/ux/UXComponentsReference.vue'\n// import EmbeddedParentView from '@/views/embedded/EmbeddedParentView.vue'\n// import MarketingBuildCourseWithAI from '@/views/embedded/marketing/MarketingBuildCourseWithAI.vue'\n\n//Routes\nexport const routes = [\n\n  //Cohorts\n  {\n    name: 'cohorts-overview',\n    path: '/cohorts',\n    component: CohortsOverview,\n  },\n  {\n    name: 'cohort-view',\n    path: '/cohorts/:id',\n    component: CohortView,\n  },\n\n  //Courses\n  {\n    name: 'courses-overview',\n    path: '/courses/:tab?/:folderId?',\n    component: CoursesOverview,\n  },\n  {\n    name: 'course-create',\n    path: '/courses/new',\n    component: CourseCreate,\n  },\n  {\n    name: 'course-view',\n    path: '/courses/:id/view',\n    component: CourseView,\n  },\n  {\n    name: 'course-edit',\n    path: '/courses/:id/edit',\n    children: [\n      {\n        name: 'course-edit.details',\n        path: 'details',\n        component: CourseEdit,\n      },\n      {\n        name: 'course-edit.lessons',\n        path: 'lessons',\n        component: CourseEdit,\n      },\n    ],\n  },\n  {\n    path: '/courses/ai/build',\n    meta: {\n      ensureAiEnabled: true,\n    },\n    children: [\n      {\n        name: 'course-ai-build.describe',\n        path: 'describe',\n        component: CourseAIBuildFlow,\n      },\n      {\n        name: 'course-ai-build.review',\n        path: 'review',\n        component: CourseAIBuildFlow,\n      },\n      {\n        name: 'course-ai-build.outline',\n        path: 'outline',\n        component: CourseAIBuildFlow,\n      },\n      {\n        name: 'course-ai-build.generate',\n        path: 'generate',\n        component: CourseAIBuildFlow,\n      },\n    ],\n  },\n  {\n    path: '/courses/ai/modify',\n    meta: {\n      ensureAiEnabled: true,\n    },\n    children: [\n      {\n        name: 'course-ai-modify.describe',\n        path: 'describe',\n        component: CourseAIModifyFlow,\n      },\n      {\n        name: 'course-ai-modify.generate',\n        path: 'generate',\n        component: CourseAIModifyFlow,\n      },\n    ],\n  },\n  {\n    path: '/courses/ai/translate',\n    meta: {\n      ensureAiEnabled: true,\n    },\n    children: [\n      {\n        name: 'course-ai-translate.select-language',\n        path: 'select-language',\n        component: CourseAITranslateFlow,\n      },\n      {\n        name: 'course-ai-translate.generate',\n        path: 'generate',\n        component: CourseAITranslateFlow,\n      },\n    ],\n  },\n\n  //Content library\n  {\n    name: 'content-library-overview',\n    path: '/content_library',\n    alias: '/template_courses',\n    component: ContentLibraryOverview,\n  },\n  {\n    name: 'content-library-view',\n    path: '/content_library/:id/show',\n    alias: '/template_courses/:id/show',\n    component: ContentLibraryView,\n  },\n\n  //Schedules\n  {\n    path: '/schedules',\n    children: [\n      {\n        name: 'schedules-overview',\n        path: '',\n        component: SchedulesOverview,\n      },\n      {\n        name: 'schedule-create',\n        path: 'new',\n        component: ScheduleCreate,\n      },\n      {\n        name: 'schedule-edit',\n        path: ':id/edit',\n        component: ScheduleEdit,\n      },\n    ],\n  },\n  {\n    name: 'schedule-enrollment',\n    path: '/schedules/:id/enrollment_options',\n    component: EnrollmentOptions,\n  },\n  {\n    name: 'schedule-delivery',\n    path: '/schedules/:id/delivery',\n    component: SchedulesLaunchDashboard,\n  },\n\n  //My enrollments\n  {\n    name: 'my-enrollments-overview',\n    path: '/my_enrollments',\n    component: MyEnrollmentsOverview,\n    meta: {\n      ignoreErrors: [401, 403],\n    },\n  },\n  {\n    name: 'my-enrollment-view',\n    path: '/my_enrollments/:id/show',\n    component: MyEnrollmentView,\n    meta: {\n      ignoreErrors: [401, 403],\n    },\n  },\n\n  //Learners\n  {\n    name: 'learners-overview',\n    path: '/learners',\n    component: LearnersOverview,\n  },\n  {\n    name: 'learner-view',\n    path: '/learners/:id',\n    component: LearnerView,\n  },\n\n  //Analytics dashboard\n  {\n    name: 'analytics-dashboard',\n    path: '/analytics/dashboard',\n    component: AnalyticsDashboard,\n  },\n\n  //Super admin & settings\n  {\n    path: '/super_admin/:tab?',\n    component: SuperAdminIndex,\n  },\n  {\n    path: '/settings/:tab?',\n    component: SettingsIndex,\n  },\n  {\n    name: 'course-catalog-overview',\n    path: '/orgs/:orgSlug/courses',\n    component: CourseCatalogOverview,\n    meta: {\n      ignoreErrors: [401, 403],\n    },\n  },\n  {\n    name: 'course-catalog-view',\n    path: '/orgs/:orgSlug/courses/:distributionId',\n    component: CourseCatalogView,\n    meta: {\n      ignoreErrors: [401, 403],\n    },\n  },\n  {\n    name: 'automations-overview',\n    path: '/automations',\n    component: AutomationsOverview,\n  },\n  {\n    name: 'automation-create',\n    path: '/automations/new',\n    component: AutomationsNew,\n  },\n  {\n    name: 'automation-edit',\n    path: '/automations/:id/edit',\n    component: AutomationsEdit,\n  },\n\n  //Embedded routes (e.g. for marketing website)\n  // NOTE: Disabled for now, as no longer available on the marketing website\n  //       Leaving code in, in case we want to enable it again at some stage.\n  // {\n  //   path: '/embedded',\n  //   component: EmbeddedParentView,\n  //   meta: {\n  //     isEmbedded: true,\n  //   },\n  //   children: [\n  //     {\n  //       path: 'marketing/build-course-with-ai',\n  //       component: MarketingBuildCourseWithAI,\n  //       name: 'embedded.course-ai-build',\n  //       meta: {\n  //         isMarketing: true,\n  //       },\n  //     },\n  //   ],\n  // },\n\n  //Other\n  {\n    path: '/ux',\n    component: UXComponentsReference,\n  },\n  {\n    path: '/:pathMatch(.*)*',\n    component: PageNotFound,\n    meta: {\n      is404: true,\n    },\n  },\n]\n","import {createRouter, createWebHistory} from 'vue-router'\nimport {routes} from './routes.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\n\n//Scroll behaviour for router\nconst scrollBehavior = (to, from, savedPosition) => {\n  if (to.hash && document.querySelector(to.hash)) {\n    return {el: to.hash}\n  }\n  else if (savedPosition) {\n    return savedPosition\n  }\n  return {top: 0}\n}\n\n//Create history and router\nexport const history = createWebHistory() //NOTE: Do not pass import.meta.env.BASE_URL, as this breaks the routing in development!\nexport const router = createRouter({history, routes, scrollBehavior})\n\n//Global resolve hook\nrouter.beforeResolve(async to => {\n\n  //Ignore for embedded routes\n  if (to.meta.isEmbedded || to.meta.is404) {\n    return\n  }\n\n  //Get composables\n  const {loadOrganization, isAiEnabled} = useCurrentOrganization()\n  const {loadUser} = useCurrentUser()\n\n  //Load user and organization\n  try {\n    await Promise.all([\n      loadUser(),\n      loadOrganization(),\n    ])\n  }\n  catch (error) {\n\n    //Ignore specific response errors if told to do so\n    if (error.status && to.meta.ignoreErrors?.includes(error.status)) {\n      console.warn(`Ignoring ${error.status} response error for route ${to.path}`)\n      return\n    }\n\n    //Rethrow\n    throw error\n  }\n\n  //Check if AI must be enabled\n  if (to.meta.ensureAiEnabled && !isAiEnabled.value) {\n    console.warn(`AI is not enabled, aborting navigation`)\n    return {name: 'courses-overview'}\n  }\n})\n","import * as Sentry from '@sentry/vue'\nimport {domains} from '@/constants/app.js'\nimport {useEnv} from '@/composables/use-env.js'\nimport {useCurrentUser} from '@/composables/use-current-user.js'\nimport {useCurrentOrganization} from '@/composables/use-current-organization.js'\nimport {watch} from 'vue'\n\n/**\n * Sentry initializer\n */\nexport function initSentry(app, router) {\n\n  //Only initialize Sentry if the environment is not local\n  const {isLocal, env, gitHash} = useEnv()\n  if (isLocal.value) {\n    return\n  }\n\n  //Get user and environment refs\n  const {user} = useCurrentUser()\n  const {organization} = useCurrentOrganization()\n\n  //DSN is safe to expose in the frontend\n  //SEE: https://arist.sentry.io/projects/arist-main-vue/?project=4508656186163201\n  const dsn = 'https://bf113a287bccd2cb767faf6268449ae9@o454316.ingest.us.sentry.io/4508656186163201'\n\n  //Set/update user once data becomes available\n  watch([user, organization], () => {\n    Sentry.setUser({\n      ID: user.value?.id,\n      Timezone: user.value?.timezone,\n      Admin: user.value?.isAdmin,\n      Organization: organization.value?.name,\n      'Organization ID': organization.value?.id,\n    })\n  })\n\n  //Initialize Sentry\n  //SEE: https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options\n  Sentry.init({\n    app,\n    dsn,\n    release: gitHash.value,\n    environment: env.value,\n    integrations: [\n      Sentry.browserTracingIntegration({router}),\n    ],\n    trackComponents: [\n      'App',\n    ],\n    tracesSampleRate: 1.0,\n    tracePropagationTargets: [\n      domains.DEV,\n      domains.QA,\n      domains.STAGING,\n      domains.PRODUCTION,\n    ],\n\n    //Populate as needed with errors we want to ignore\n    //NOTE: Every error added here *must* have a clear comment explaining why it is being ignored\n    ignoreErrors: [\n\n      //Specific network errors\n      'Failed to fetch', //Generic fetch failures\n      'Load failed', //iOS message for when fetch doesn't respond, likely a network issue\n      'NetworkError when attempting to fetch resource', //CORS or network error\n      'AbortError', //Occurs when a fetch request is aborted\n\n      //Generic request/response errors\n      'Request timed out', //Server request timeouts\n      'Network error', //Generic network errors\n      'Bad gateway', //Occurs when a request is made during a deploy\n      'Internal server error', //Internal server errors (500)\n      'Server error', //Generic server errors\n      'Record not found', //Generic 404 errors\n\n      //Auth related\n      'Unauthenticated', //Unauthenticated errors\n      'Unauthorized', //Unauthorized errors\n      'No organization', //Occurs when user accesses my enrollments page unauthenticated?\n\n      //Non-errors, likely caused by requests that are made during deploys\n      'Missing JSON data in response with model collection', //Guard in toModelCollection()\n      'Missing JSON data in response with model instance', //Guard in toModelInstance()\n      'Missing items key timezones in response JSON', //This endpoint works correctly, so probably a deploy issue\n\n      //3rd party/browser internals errors\n      'Large Render Blocking Asset', //Browser complaining about slow loading assets\n      'Object.hasOwn is not a function', //Thrown from within Ky if user is using an older browser\n      'The user denied permission to access the database', //We don't use the browser database anyway\n      'The requested file could not be read', //Permission problem that can occur after a reference to a file is acquired\n\n      //Processing errors\n      'Video processing failed', //Video processing failed with an empty error message\n      'Image processing failed', //Image processing failed with an empty error message\n      'Document processing failed', //Document processing failed with an empty error message\n      'Export failed', //Export failed with an empty error message\n\n      //Business logic errors that bubble up and are unhandled\n      'Invalid course state, not saving', //When an (auto) save of a course is attempted while it's in an invalid state\n      'The export is taking longer than expected', //When an export is taking longer than expected\n      'Learner is already enrolled in that schedule', //Occurs when a user attempts to enroll in a schedule they are already enrolled in\n      'Cannot move folder into itself or one of its descendants', //May occur if a folder has been moved in one view/tab and a user tries to move it again in another view/tab\n      'Address already belongs to someone else', //When adding an address already in use\n      'Address already belongs to this learner', //When adding an address already in use\n      'Address must be a valid email address', //When adding an invalid email address\n      'Address must be a valid phone number', //When adding an invalid phone number\n      'Address must be a possible phone number', //When adding an invalid phone number\n      'Address must have a country code', //When adding an invalid phone number\n      'Address can\\'t contain spaces', //When adding an invalid address\n      'Address is too short', //When adding an invalid address\n      'already exists and can only be copied once', //When trying to copy a HBR course that already exists\n      'already uses that phone number', //When adding a phone number already in use\n      'already uses that email address', //When adding an address already in use\n    ],\n  })\n}\n","\n//Core Vue packages and 3rd party dependencies\nimport {createApp} from 'vue'\nimport {createPinia} from 'pinia'\n\n//Global components\nimport VSelect from 'vue-select'\nimport Icon from '@/components/shared/icons/Icon.vue'\nimport Debug from '@/components/shared/dev/Debug.vue'\n\n//App and router\nimport App from '../App.vue'\nimport {router} from '@/routing/router.js'\nimport {initSentry} from '@/services/sentry.js'\nimport {useErrorHandling} from '@/composables/use-error-handling.js'\n\n//Create app\nconst app = createApp(App)\nconst pinia = createPinia()\n\n//Register plugins and services\napp\n  .use(pinia)\n  .use(router)\n\n//Register global components\napp\n  .component('VSelect', VSelect)\n  .component('Icon', Icon)\n  .component('Debug', Debug)\n\n//Initialize Sentry\ninitSentry(app, router, pinia)\n\n//Attach to Vue error handler\nconst {processError} = useErrorHandling()\napp.config.errorHandler = processError\n\n//Mount\napp\n  .mount('#vueapp')\n"],"names":["makeMap","str","map","key","val","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","isOn","isModelListener","extend","remove","arr","el","i","hasOwnProperty","hasOwn","isArray","isMap","toTypeString","isSet","isDate","isFunction","isString","isSymbol","isObject","isPromise","objectToString","value","toRawType","isPlainObject","isIntegerKey","isReservedProp","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","writable","looseToNumber","n","toNumber","_globalThis","getGlobalThis","normalizeStyle","res","item","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","ret","tmp","normalizeClass","name","normalizeProps","props","klass","style","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","looseCompareArrays","a","b","equal","looseEqual","aValidType","bValidType","aKeysCount","bKeysCount","aHasKey","bHasKey","isRef","toDisplayString","replacer","_key","entries","val2","stringifySymbol","v","_a","activeEffectScope","EffectScope","detached","l","currentEffectScope","fromParent","last","effectScope","getCurrentScope","onScopeDispose","failSilently","activeSub","pausedQueueEffects","ReactiveEffect","batch","cleanupEffect","prepareDeps","prevEffect","prevShouldTrack","shouldTrack","cleanupDeps","link","removeSub","isDirty","batchDepth","batchedSub","batchedComputed","sub","isComputed","startBatch","endBatch","e","next","error","err","head","tail","prev","removeDep","refreshComputed","computed","globalVersion","dep","prevSub","soft","nextSub","prevDep","nextDep","trackStack","pauseTracking","resetTracking","cleanup","Link","Dep","debugInfo","addSub","currentTail","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ARRAY_ITERATE_KEY","track","target","type","depsMap","trigger","newValue","oldTarget","run","targetIsArray","isArrayIndex","newLength","key2","getDepFromReactive","object","depMap","reactiveReadArray","array","raw","toRaw","isShallow","toReactive","shallowReadArray","arrayInstrumentations","iterator","args","x","thisArg","apply","searchProxy","separator","noTracking","reduce","comparer","self","method","wrapValue","iter","result","arrayProto","wrappedRetFn","needsWrap","methodFn","result2","wrappedFn","index","acc","isProxy","isNonTrackableKeys","builtInSymbols","BaseReactiveHandler","_isReadonly","_isShallow","receiver","isReadonly2","isShallow2","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","hadKey","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","shallowReadonlyHandlers","toShallow","getProto","createIterableMethod","rawTarget","targetIsMap","isPair","isKeyOnly","innerIterator","wrap","toReadonly","done","createReadonlyMethod","createInstrumentations","shallow","instrumentations","rawKey","has","callback","observed","get","hadItems","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","shallowReadonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","shallowReadonly","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","proxy","isReactive","markRaw","r","ref","createRef","shallowRef","rawValue","RefImpl","useDirectValue","unref","ref2","shallowUnwrapHandlers","proxyRefs","objectWithRefs","toRefs","propertyToRef","ObjectRefImpl","_object","_defaultValue","newVal","GetterRefImpl","_getter","toRef","source","defaultValue","ComputedRefImpl","setter","isSSR","getterOrOptions","debugOptions","getter","INITIAL_WATCHER_VALUE","cleanupMap","activeWatcher","onWatcherCleanup","cleanupFn","owner","cleanups","watch","cb","options","immediate","deep","once","scheduler","augmentJob","call","reactiveGetter","source2","traverse","effect","boundCleanup","forceTrigger","isMultiSource","s","currentEffect","baseGetter","depth","scope","watchHandle","_cb","job","immediateFirstRun","currentWatcher","cleanup2","seen","callWithErrorHandling","instance","handleError","callWithAsyncErrorHandling","values","throwInDev","contextVNode","errorHandler","throwUnhandledErrorInProduction","cur","exposedInstance","errorInfo","errorCapturedHooks","logError","throwInProd","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","middleJob","middleJobId","getId","queueJob","jobId","lastJob","queueFlush","flushJobs","queuePostFlushCb","flushPreFlushCbs","flushPostFlushCbs","deduped","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","withDirectives","vnode","directives","getComponentPublicInstance","bindings","dir","modifiers","invokeDirectiveHook","prevVNode","oldBindings","binding","hook","TeleportEndKey","isTeleport","isTeleportDisabled","isTeleportDeferred","isTargetSVG","isTargetMathML","resolveTarget","select","targetSelector","TeleportImpl","n1","n2","container","anchor","parentComponent","parentSuspense","namespace","slotScopeIds","optimized","internals","mountChildren","patchChildren","patchBlockChildren","insert","querySelector","createText","createComment","disabled","shapeFlag","children","dynamicChildren","placeholder","mainAnchor","mount","container2","anchor2","mountToTarget","targetAnchor","prepareAnchor","updateCssVars","queuePostRenderEffect","wasDisabled","currentContainer","currentAnchor","traverseStaticChildren","moveTeleport","nextTarget","unmount","hostRemove","doRemove","targetStart","shouldRemove","child","hydrateTeleport","parentAnchor","move","moveType","isReorder","node","nextSibling","parentNode","hydrateChildren","targetNode","Teleport","isDisabled","leaveCbKey","enterCbKey","useTransitionState","state","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionPropsValidators","recursiveGetSubtree","subTree","BaseTransitionImpl","slots","getCurrentInstance","getTransitionRawChildren","findNonCommentChild","rawProps","mode","emptyPlaceholder","innerChild","getInnerChild$1","enterHooks","resolveTransitionHooks","hooks","Comment","setTransitionHooks","oldChild","oldInnerChild","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","BaseTransition","leavingVNodes","postClone","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","callHook","callAsyncHook","hook2","leavingVNode","afterHook","cancelHook","called","cancelled","vnode2","hooks2","isKeepAlive","cloneVNode","keepComment","parentKey","keyedFragmentCount","Fragment","defineComponent","extraOptions","markAsyncBoundary","setRef","rawRef","oldRawRef","isUnmount","isAsyncWrapper","refValue","oldRef","refs","setupState","rawSetupState","canSetSetupRef","_isString","_isRef","doSet","existing","onActivated","registerKeepAliveHook","onDeactivated","currentInstance","wrappedHook","current","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","reset","setCurrentInstance","createHook","lifecycle","isInSSRComponentSetup","onBeforeMount","onBeforeUpdate","onUpdated","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","COMPONENTS","DIRECTIVES","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","component","resolveDirective","warnMissing","Component","selfName","getComponentName","resolve","registry","renderList","renderItem","cached","sourceIsArray","sourceIsReactiveArray","keys","createSlots","dynamicSlots","slot","j","renderSlot","fallback","noSlotted","openBlock","createBlock","createVNode","validSlotContent","ensureValidVNode","slotKey","rendered","vnodes","isVNode","toHandlers","preserveCaseIfNecessary","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","instanceWatch","hasSetupBinding","PublicInstanceProxyHandlers","data","accessCache","appContext","normalizedProps","shouldCacheAccess","publicGetter","cssModule","globalProperties","propsOptions","descriptor","useSlots","getContext","useAttrs","createSetupContext","normalizePropsOrEmits","applyOptions","publicThis","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","render","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","inheritAttrs","components","filters","resolveInjections","methodHandler","opt","set","createWatcher","provides","provide","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","normalizeInject","inject","h","createPathGetter","handler","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","asMixin","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","hydrate","rootComponent","rootProps","context","installedPlugins","pluginCleanupFns","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","lastApp","currentApp","parentProvides","treatDefaultAsFactory","hasInjectionContext","internalObjectProto","createInternalObject","isInternalObject","initProps","isStateful","attrs","setFullProps","updateProps","rawPrevProps","patchFlag","rawCurrentProps","hasAttrsChanged","propsToUpdate","isEmitListener","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","mixinPropsCache","normalizePropsOptions","comp","hasExtends","extendProps","raw2","normalizedKey","validatePropName","prop","propType","shouldCast","shouldCastTrue","typeName","isInternalKey","normalizeSlotValue","normalizeVNode","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","assignSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","queueEffectWithSuspense","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","patch","getNextHostNode","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","moveStaticNode","removeStaticNode","mountElement","patchElement","vnodeHook","transition","dirs","resolveChildrenNamespace","setScopeId","invokeVNodeHook","needCallTransitionHooks","needTransition","scopeId","isSuspense","parentVNode","cloneIfMounted","oldProps","newProps","toggleRecurse","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","shouldUpdateComponent","updateComponentPreRender","componentUpdateFn","bu","u","parent","nonHydratedAsyncRoot","locateNonHydratedAsyncRoot","originNext","nextTree","renderComponentRoot","prevTree","updateHOCHostEl","bm","root","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","update","nextVNode","prevProps","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","unmountChildren","oldLength","commonLength","nextChild","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","leave","delayLeave","afterLeave","remove2","performLeave","cacheIndex","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","invalidateMount","teleportEnd","isFlushing","currentNamespace","allowed","ch1","ch2","len","arrI","subComponent","ssrContextKey","useSSRContext","watchEffect","doWatch","watchPostEffect","flush","baseWatchOptions","runsImmediately","ssrCleanup","watchStopHandle","isPre","isFirstRun","watch$1","path","segments","getModelModifiers","modelName","emit","event","rawArgs","handlerName","onceHandler","normalizeEmitsOptions","extendEmits","normalizedFromExtend","withProxy","renderCache","fallthroughAttrs","proxyToUse","thisProxy","render2","getFunctionalFallthrough","blockStack","filterModelListeners","prevChildren","nextProps","nextChildren","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","suspense","currentBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","extraProps","mergeRef","cloneTransition","mergedProps","mergeProps","createTextVNode","text","flag","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","setInSSRSetupState","g","registerGlobalSetter","setters","unsetCurrentInstance","setupResult","setupStatefulComponent","setup","setupContext","isAsyncSetup","resolvedResult","handleSetupResult","finishComponentSetup","compile","skipOptions","template","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","attrsProxyHandlers","includeInferred","computed$1","propsOrChildren","policy","tt","unsafeToTrustedHTML","svgNS","mathmlNS","doc","templateContainer","nodeOps","tag","is","selector","content","before","wrapper","TRANSITION","ANIMATION","vtcKey","DOMTransitionPropsValidators","TransitionPropsValidators","decorate$1","t","Transition","resolveTransitionProps","h2","hasExplicitCallback","baseProps","duration","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","cls","_vtc","endId","expectedType","explicitTimeout","resolveIfNotStale","timeout","propCount","getTransitionInfo","endEvent","ended","onEnd","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","toMs","patchClass","isSVG","transitionClasses","vShowOriginalDisplay","vShowHidden","vShow","setDisplay","CSS_VAR_TEXT","useCssVars","updateTeleports","vars","setVarsOnNode","setVars","setVarsOnVNode","ob","displayRE","patchStyle","isCssString","hasControlledDisplay","prevStyle","setStyle","cssVarText","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","attrName","needRemove","addEventListener","removeEventListener","veiKey","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","cachedNow","getNow","initialValue","patchStopImmediatePropagation","originalStop","isNativeOn","patchProp","shouldSetAsProp","camelize$1","useCssModule","modules","mod","positionMap","newPositionMap","moveCbKey","decorate","TransitionGroupImpl","moveClass","hasCSSTransform","callPendingCbs","recordPosition","movedChildren","applyTranslation","cssTransitionProps","TransitionGroup","oldPos","newPos","dx","dy","clone","getModelAssigner","onCompositionStart","onCompositionEnd","assignKey","vModelText","lazy","trim","number","castToNumber","domValue","elValue","vModelRadio","getValue","systemModifiers","modifierGuards","withModifiers","cacheKey","guard","keyNames","withKeys","eventKey","k","rendererOptions","renderer","ensureRenderer","createApp","containerOrSelector","normalizeContainer","resolveRootNamespace","isVue2","activePinia","setActivePinia","pinia","piniaSymbol","o","MutationType","createPinia","_p","toBeInstalled","noop","addSubscription","subscriptions","onCleanup","removeSubscription","idx","triggerSubscriptions","fallbackRunWithContext","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","patchToApply","subPatch","targetValue","skipHydrateSymbol","shouldHydrate","assign","createOptionsStore","hot","actions","getters","initialState","store","localState","computedGetters","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","$reset","newState","$state","$dispose","action","wrappedAction","afterCallbackList","onErrorCallbackList","after","onError","partialStore","stopWatcher","setupStore","actionValue","extender","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","storeToRefs","rawStore","E","M","V","I","N","C","f","U","q","J","S","H","X","Y","Q","G","W","Z","ee","te","se","ie","oe","T","ne","y","le","ae","re","de","he","ce","ue","pe","fe","ge","ye","me","be","_e","Oe","we","ve","K","A","B","L","D","O","w","P","$","R","z","F","Ce","componentColors","componentSizes","__props","rotate","transform","environments","domains","messengerBaseUrls","apiBaseUrls","useEnv","href","origin","hostname","port","env","gitHash","messengerBaseUrl","isLocal","isDev","isQa","isStaging","isProduction","isTest","apiBaseUrl","beforeLeave","marginLeft","marginTop","width","height","_imports_0","__emit","isClickable","handleClick","_cache","_openBlock","_createBlock","_Transition","$style","_ctx","_withCtx","vNodeIsEmpty","isEmpty","useEmptySlotsCheck","isSlotEmpty","emptySlots","openUrl","url","params","blank","search","getURLSearchParams","joinPaths","paths","appendSearchParams","subKey","subValue","useLocalStorage","isBrowser","isRouteComponent","isESModule","applyToParams","newParams","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","lastToSegment","position","toPosition","segment","START_LOCATION_NORMALIZED","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","subPattern","parse","match","stringify","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","message","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","isMatchable","insertMatcher","matcherRef","getRoutes","paramsFromLocation","matched","parentMatcher","mergeMetaFields","clearRoutes","normalizeRecordProps","propsObject","meta","defaults","partialOptions","lower","upper","mid","insertionAncestor","getInsertionAncestor","ancestor","searchParams","searchParam","eqPos","currentValue","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","guardToPromiseFn","runWithContext","enterCallbackArray","reject","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","componentPromise","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","elClass","getLinkClass","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","injectedRoute","routeToDisplay","injectedDepth","initialDepth","matchedRoute","matchedRouteRef","viewRef","oldInstance","oldName","currentName","ViewComponent","routePropsOption","routeProps","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","readyHandlers","errorListeners","ready","list","isReady","scrollBehavior","started","reactiveRoute","unmountApp","promise","recordFrom","recordTo","useRouter","useRoute","_name","useRouting","routeMeta","routeParams","queryParams","isEmbeddedRoute","isMarketingRoute","isParamEmpty","cleanParams","clean","ensureObject","withQuery","withParams","handleRoutingError","pushRoute","replaceRoute","replaceCurrentRoute","checkRouteActive","setInLocalStorage","spinnerColor","isDefaultSlotEmpty","isLabelSlotEmpty","isOpen","closeOnClickOutside","closeOnKey","modal","handleClose","useNavigation","cohortId","courseId","scheduleId","orgSlug","distributionId","llmTaskId","learnerId","enrollmentId","automationId","HTTPError","response","request","code","title","status","reason","__publicField","TimeoutError","validateAndMerge","sources","deepMerge","mergeHeaders","source1","isHeadersInstance","newHookValue","original","property","mergeHooks","returnValue","headers","supportsRequestStreams","duplexAccessed","hasContentType","supportsReadableStream","supportsRequest","supportsAbortController","supportsResponseStreams","supportsFormData","requestMethods","responseTypes","maxSafeTimeout","stop","kyOptionKeys","requestOptionsRegistry","normalizeRequestMethod","input","retryMethods","retryStatusCodes","retryAfterStatusCodes","defaultRetryOptions","attemptCount","normalizeRetryOptions","retry","init","abortController","timeoutId","delay","ms","signal","abortHandler","findUnknownOptions","unknownOptions","Ky","originalSignal","_b","ky","function_","modifiedResponse","mimeType","retryAfter","max","retryDelay","nonRequestOptions","mainRequest","onDownloadProgress","totalBytes","transferredBytes","controller","reader","read","percent","createInstance","newDefaults","errorNames","ResponseError","config","HttpService","contentType","responseError","http","isISODateString","valueFromJSON","date","DateTime","copy","valueToJSON","toCamelCase","toSnakeCase","uppercase","$1","toUpperCaseFirst","first","rest","replaceUnicode","truncate","maxCharacters","ending","getNumLineBreaks","getCharacterCount","isOverCharacterLimit","limit","levenshteinDistance","pluralize","noun","inflect","count","includeCount","inflected","stripHtml","isEmptyObject","createFormData","formData","convertFormDataKeys","form","newKey","convertKeys","ignore","convertKeysToSnakeCase","convertKeysToCamelCase","idOnly","copyValue","cloneObject","DEBUG_BUILD","SDK_VERSION","GLOBAL_OBJ","getGlobalSingleton","creator","gbl","__SENTRY__","versionedCarrier","PREFIX","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","console","wrappedFuncs","wrappedLevels","level","originalConsoleMethod","makeLogger","enabled","logger","STACKTRACE_FRAME_LIMIT","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","stack","skipFirstLines","framesToPop","frames","lines","line","cleanedLine","frame","stripSentryFramesAndReverse","stackParserFromStackParserOptions","stackParser","localStack","getLastStackFrame","defaultFunctionName","getFunctionName","getFramesFromEvent","exception","instrumented","addHandler","maybeInstrument","instrumentFn","triggerHandlers","typeHandlers","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","msg","column","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","getMainCarrier","getSentryCarrier","carrier","isError","wat","isInstanceOf","isBuiltin","className","isErrorEvent","isDOMError","isDOMException","isParameterizedString","isPrimitive","isEvent","isElement","isRegExp","isThenable","isSyntheticEvent","isVueViewModel","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","out","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","keyAttrPairs","keyAttr","keyAttrPair","classes","allowedAttrs","attr","getLocationHref","getDomElement","safeJoin","delimiter","output","isMatchingPattern","requireExactStringMatch","stringMatchesSomePattern","testString","patterns","fill","replacementFactory","wrapped","markFunctionWrapped","addNonEnumerableProperty","proto","getOriginalFunction","func","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","extractedProps","extractExceptionKeysForMessage","maxLength","firstKey","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","memoVal","ONE_SECOND_IN_MS","dateTimestampInSeconds","createUnixTimestampInSecondsFunc","performance","approxStartingTimeOrigin","timeOrigin","timestampInSeconds","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","navigationStartDelta","navigationStartIsReliable","uuid4","crypto","getRandomByte","typedArray","getFirstException","getEventDescription","eventId","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","mergedData","checkOrSetAlreadyCaught","isAlreadyCaptured","States","RESOLVED","REJECTED","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","executor","onfulfilled","onrejected","onfinally","isRejected","cachedHandlers","makeSession","startingTime","session","sessionToJSON","updateSession","closeSession","generateTraceId","generateSpanId","merge","initialObj","mergeObj","levels","SCOPE_SPAN_FIELD","_setSpanForScope","span","_getSpanForScope","DEFAULT_MAX_BREADCRUMBS","ScopeClass","newScope","client","lastEventId","user","requestSession","tags","extras","extra","fingerprint","captureContext","scopeToMerge","scopeInstance","Scope","contexts","propagationContext","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","breadcrumbs","attachment","newData","hint","syntheticException","getDefaultCurrentScope","getDefaultIsolationScope","AsyncContextStack","isolationScope","assignedScope","assignedIsolationScope","maybePromiseResult","getAsyncContextStack","sentry","withScope","withSetScope","withIsolationScope","getStackAsyncContextStrategy","_isolationScope","getAsyncContextStrategy","getIsolationScope","getGlobalScope","acs","getClient","getTraceContextFromScope","traceId","spanId","parentSpanId","METRICS_SPAN_FIELD","getMetricSummaryJsonForSpan","storage","exportKey","summary","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","SPAN_STATUS_UNSET","SPAN_STATUS_OK","SPAN_STATUS_ERROR","getSpanStatusFromHttpCode","httpStatus","setHttpStatus","spanStatus","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","parseBaggageHeader","dynamicSamplingContext","nonPrefixedKey","dynamicSamplingContextToSentryBaggageHeader","sentryPrefixedDSC","dscKey","dscValue","objectToBaggageHeader","curr","currBaggageObject","baggageHeaderToObject","baggageEntry","keyOrValue","objectKey","objectValue","currentIndex","newBaggageHeader","TRACEPARENT_REGEXP","extractTraceparentData","traceparent","matches","parentSampled","propagationContextFromHeaders","sentryTrace","baggage","traceparentData","virtualSpanId","generateSentryTraceHeader","sampled","sampledString","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTransactionTraceContext","span_id","trace_id","op","parent_span_id","spanToJSON","spanToTraceContext","isRemote","spanToTraceHeader","spanIsSampled","spanTimeInputToSeconds","ensureTimestampInSeconds","timestamp","spanIsSentrySpan","spanIsOpenTelemetrySdkTraceBaseSpan","attributes","startTime","endTime","getStatusMessage","castSpan","traceFlags","CHILD_SPANS_FIELD","ROOT_SPAN_FIELD","addChildSpanToSpan","childSpan","rootSpan","removeChildSpanFromSpan","getSpanDescendants","resultSet","addSpanChildren","childSpans","getRootSpan","getActiveSpan","showSpanDropWarning","errorsInstrumented","registerSpanErrorInstrumentation","errorCallback","activeSpan","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","setCapturedScopesOnSpan","getCapturedScopesOnSpan","hasTracingEnabled","maybeOptions","SentryNonRecordingSpan","spanContext","_timestamp","_value","_values","_status","_attributesOrStartTime","_startTime","_link","_links","_exception","_time","DEFAULT_ENVIRONMENT","FROZEN_DSC_FIELD","freezeDscOnSpan","dsc","getDynamicSamplingContextFromClient","public_key","getDynamicSamplingContextFromScope","getDynamicSamplingContextFromSpan","frozenDsc","traceState","traceStateDsc","dscOnTraceState","jsonSpan","maybeSampleRate","logSpanStart","description","isRootSpan","header","infoParts","logSpanEnd","parseSampleRate","sampleRate","rate","sampleSpan","samplingContext","normalizedRequest","enhancedSamplingContext","parsedSampleRate","DSN_REGEX","isValidProtocol","protocol","dsnToString","dsn","withPassword","host","pass","projectId","publicKey","dsnFromString","lastPath","split","projectMatch","dsnFromComponents","validateDsn","makeDsn","memoBuilder","hasWeakSet","memoize","unmemoize","normalize","maxProperties","visit","normalizeToSize","maxSize","jsonSize","memo","stringified","stringifyValue","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","visitKey","visitValue","objName","getConstructorName","prototype","utf8Length","createEnvelope","items","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","envelopeItemType","encodeUTF8","serializeEnvelope","envHeaders","parts","append","itemHeaders","payload","stringifiedPayload","concatBuffers","buffers","totalLength","buf","createSpanEnvelopeItem","spanJson","createAttachmentEnvelopeItem","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","createEventEnvelopeHeaders","sdkInfo","tunnel","enhanceEventWithSdkInfo","createSessionEnvelope","metadata","envelopeHeaders","createEventEnvelope","eventType","createSpanEnvelope","spans","dscHasRequiredProps","beforeSendSpan","convertToSpanJSON","setMeasurement","unit","timedEventsToMeasurements","events","measurements","MAX_SPAN_COUNT","SentrySpan","timeInput","endTimestamp","attributesOrStartTime","time","isSpanTimeInput","sendSpanEnvelope","transactionEvent","isFullFinishedSpan","capturedSpanScope","capturedSpanIsolationScope","isStandaloneSpan","transaction","spanItems","SUPPRESS_TRACING_KEY","startInactiveSpan","getAcs","spanArguments","parseSentrySpanArguments","forceTransaction","customParentSpan","withActiveSpan","parentSpan","getParentSpan","createChildOrRootSpan","_startChildSpan","_startRootSpan","initialCtx","TRACING_DEFAULTS","FINISH_REASON_HEARTBEAT_FAILED","FINISH_REASON_IDLE_TIMEOUT","FINISH_REASON_FINAL_TIMEOUT","FINISH_REASON_EXTERNAL_FINISH","startIdleSpan","startSpanOptions","activities","_finished","_idleTimeoutID","_finishReason","_autoFinishAllowed","_cleanupHooks","idleTimeout","finalTimeout","childSpanTimeout","beforeSpanEnd","previousActiveSpan","_startIdleSpan","definedEndTimestamp","spanEndTimestamp","onIdleSpanEnded","childEndTimestamps","latestSpanEndTimestamp","spanStartTimestamp","_cancelIdleTimeout","_restartIdleTimeout","_restartChildSpanTimeout","_pushActivity","_popActivity","spanJSON","startTimestamp","discardedSpans","childSpanJSON","childEndTimestamp","childStartTimestamp","spanStartedBeforeIdleSpanEnd","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","startedSpan","endedSpan","spanToAllowAutoFinish","notifyEventProcessors","processors","processor","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","getFilenameToDebugIdMap","debugIdMap","debugIdKeys","stackKey","parsedStack","stackFrame","filename","debugId","applyScopeDataToEvent","sdkProcessingMetadata","applyDataToEvent","applySpanToEvent","applyFingerprintToEvent","applyBreadcrumbsToEvent","applySdkMetadataToEvent","mergeScopeData","mergeData","eventProcessors","attachments","transactionName","mergeAndOverwriteScopeData","mergeVal","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","mergedBreadcrumbs","prepareEvent","normalizeDepth","normalizeMaxBreadth","prepared","integrations","applyClientOptions","applyIntegrationsMetadata","applyDebugIds","finalScope","getFinalScope","clientEventProcessors","isolationData","finalScopeData","evt","applyDebugMeta","normalizeEvent","environment","release","dist","maxValueLength","filenameDebugIdMap","images","debug_id","integrationNames","maxBreadth","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","captureContextKeys","captureException","captureMessage","captureEvent","setUser","isEnabled","startSession","currentScope","userAgent","currentSession","endSession","_sendSessionUpdate","captureSession","SENTRY_API_VERSION","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","installedIntegrations","filterDuplicates","integrationsByName","existingInstance","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","resolvedUserIntegrations","finalIntegrations","debugIndex","debugInstance","setupIntegrations","integrationIndex","setupIntegration","afterSetupIntegrations","createClientReportEnvelope","discarded_events","clientReportItem","SentryError","logLevel","ALREADY_SEEN_ERROR","BaseClient","undefinedOption","option","hintWithEventId","eventMessage","promisedEvent","transport","clientFinished","transportFlushed","eventProcessor","integrationName","isAlreadyInstalled","sendResponse","category","eventOrCount","cbIndex","callbacks","crashed","errored","exceptions","ex","mechanism","sessionNonTerminal","ticked","tick","interval","finalEvent","sentryError","isTransaction","isTransactionEvent","beforeSendLabel","dataCategory","processBeforeSend","_validateBeforeSendResult","processedEvent","spanCount","spanCountBefore","spanCountAfter","droppedSpanCount","transactionInfo","outcomes","quantity","beforeSendResult","invalidValueError","beforeSend","beforeSendTransaction","processedSpans","processedSpan","initAndBind","clientClass","setCurrentClient","makePromiseBuffer","task","taskProducer","drain","counter","capturedSetTimeout","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","now","headerDelay","headerDate","disabledUntil","limits","isRateLimited","updateRateLimits","statusCode","updatedRateLimits","rateLimitHeader","retryAfterHeader","categories","namespaces","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","makeRequest","rateLimits","send","filteredEnvelopeItems","getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","requestTask","applySdkMetadata","names","getTraceData","scopeToTraceHeader","DEFAULT_BREADCRUMBS","addBreadcrumb","beforeBreadcrumb","finalBreadcrumb","originalFunctionToString","INTEGRATION_NAME","SETUP_CLIENTS","_functionToStringIntegration","originalFunction","functionToStringIntegration","DEFAULT_IGNORE_ERRORS","_inboundFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","_shouldDropEvent","inboundFiltersIntegration","internalOptions","_isSentryError","_isIgnoredError","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","_getPossibleEventMessages","ignoreTransactions","denyUrls","allowUrls","possibleMessages","lastException","_getLastValidUrl","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","parentId","parseUrl","fragment","addConsoleInstrumentationHandler","instrumentConsole","log","severityLevelFromString","_dedupeIntegration","previousEvent","currentEvent","dedupeIntegration","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","instrumentFetchRequest","handlerData","shouldCreateSpan","shouldAttachHeaders","spanOrigin","shouldCreateSpanResult","endSpan","fullUrl","getFullURL","hasParent","_addTracingHeadersToFetchRequest","fetchOptionsObj","traceHeaders","isRequest","isHeaders","newHeaders","prevBaggageHeader","prevHeaderStrippedFromSentryBaggage","stripBaggageHeaderOfSentryBaggageValues","headerName","headerValue","existingBaggageHeader","newBaggageHeaders","headerItem","contentLength","contentLengthNum","getBreadcrumbLogLevelFromHttpStatusCode","supportsFetch","isNativeFunction","supportsNativeFetch","sandbox","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","addFetchEndInstrumentationHandler","streamHandler","onFetchResolved","originalFetch","virtualError","parseFetchArgs","resolveResponse","onFinishedResolving","body","responseReader","maxFetchDurationTimeout","readingActive","chunkTimeout","clonedResponseForResolving","hasProp","getUrlFromResource","resource","fetchArgs","getSDKSource","supportsHistory","chromeVar","isChromePackagedApp","hasHistoryApi","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","sentryWrapped","wrappedArguments","exceptionFromError","parseStackFrames","extractType","extractMessage","eventFromPlainObject","isUnhandledRejection","errorFromProp","getErrorPropertyFromObject","getNonErrorObjectExceptionValue","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","eventFromException","attachStacktrace","eventFromUnknownInput","eventFromMessage","eventFromString","domException","__sentry_template_string__","__sentry_template_values__","captureType","getObjectClassName","createUserFeedbackEnvelope","feedback","createUserFeedbackEnvelopeItem","BrowserClient","opts","sdkSource","getRating","thresholds","bindReporter","metric","reportAllChanges","forceReport","generateUniqueID","getNavigationEntry","checkResponseStart","navigationEntry","getActivationStart","navEntry","initMetric","navigationType","observe","po","onHidden","onHiddenOrPageHide","runOnce","firstHiddenTime","initHiddenTime","onVisibilityUpdate","removeChangeListeners","addChangeListeners","getVisibilityWatcher","whenActivated","FCPThresholds","onFCP","onReport","visibilityWatcher","report","entry","CLSThresholds","onCLS","sessionValue","sessionEntries","handleEntries","firstSessionEntry","lastSessionEntry","FIDThresholds","onFID","handleEntry","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","getInteractionCount","initInteractionCountPolyfill","longestInteractionList","longestInteractionMap","DEFAULT_DURATION_THRESHOLD","prevInteractionCount","getInteractionCountForNavigation","estimateP98LongestInteraction","candidateInteractionIndex","MAX_INTERACTIONS_TO_CONSIDER","entryPreProcessingCallbacks","processInteractionEntry","minLongestInteraction","existingInteraction","interaction","whenIdle","rIC","handle","INPThresholds","onINP","inp","LCPThresholds","reportedMetricIDs","onLCP","stopListening","TTFBThresholds","whenReady","onTTFB","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addClsInstrumentationHandler","stopOnCallback","addMetricObserver","instrumentCls","addLcpInstrumentationHandler","instrumentLcp","addFidInstrumentationHandler","instrumentFid","addTtfbInstrumentationHandler","instrumentTtfb","addInpInstrumentationHandler","instrumentInp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","previousValue","isPerformanceEventTiming","isMeasurementValue","startAndEndSpan","startTimeInSeconds","parentStartTime","startStandaloneWebVitalSpan","passedAttributes","replay","replayId","userDisplay","profileId","getBrowserPerformanceAPI","msToSec","trackClsAsStandaloneSpan","standaloneCLsValue","standaloneClsEntry","pageloadSpanId","supportsLayoutShift","sentSpan","_collectClsOnce","sendStandaloneClsSpan","cleanupClsHandler","unsubscribeStartNavigation","clsValue","routeName","MAX_INT_AS_BYTES","_performanceCursor","_measurements","_lcpEntry","_clsEntry","startTrackingWebVitals","recordClsStandaloneSpans","fidCleanupCallback","_trackFID","lcpCleanupCallback","_trackLCP","ttfbCleanupCallback","_trackTtfb","clsCleanupCallback","_trackCLS","startTrackingLongTasks","parentOp","parentStartTimestamp","startTrackingLongAnimationFrames","initialScript","invokerType","sourceURL","sourceFunctionName","sourceCharPosition","startTrackingInteractions","spanOptions","componentName","addPerformanceEntries","performanceEntries","transactionStartTime","_addNavigationSpans","_addMeasureSpans","firstHidden","shouldRecord","_addResourceSpans","_trackNavigator","_addTtfbRequestTimeToMeasurements","fidMark","measurementName","measurement","_setWebVitalAttributes","requestTime","measureStartTimestamp","startTimeStamp","measureEndTimestamp","_addPerformanceNavigationTiming","_addRequest","eventEnd","_getEndPropertyNameForNavigationTiming","requestStartTimestamp","responseEndTimestamp","responseStartTimestamp","resourceUrl","parsedUrl","setResourceEntrySizeData","deliveryType","renderBlockingStatus","navigator","connection","dataKey","entryVal","responseStart","requestStart","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","targetObj","originalAddEventListener","handlerForType","originalRemoveEventListener","isSimilarToLastCapturedEvent","shouldSkipDOMEvent","globalListener","getEventTarget","lastHref","addHistoryInstrumentationHandler","instrumentHistory","oldOnPopState","historyReplacementFunction","originalHistoryFunction","cachedImplementations","getNativeImplementation","impl","document","contentWindow","clearCachedImplementation","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","onreadystatechangeHandler","xhrInfo","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","LAST_INTERACTIONS","INTERACTIONS_SPAN_MAP","startTrackingINP","inpCallback","_trackINP","INP_ENTRY_MAP","interactionId","interactionType","spanToUse","registerInpInteractionListener","_latestRoute","activeRootSpan","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","requestSize","requestOptions","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","lineno","colno","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeStackParserFn","noFnParts","col","subMatch","extractSafariExtensionDetails","chromeStackLineParser","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","defaultStackLineParsers","defaultStackParser","isSafariExtension","isSafariWebExtension","MAX_ALLOWED_STRING_LENGTH","_breadcrumbsIntegration","_options","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","breadcrumbsIntegration","dom","element","_isEvent","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","_browserApiErrorsIntegration","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","browserApiErrorsIntegration","originalCallback","xhr","wrapOptions","eventName","isEventListenerObject","originalEventHandler","browserSessionIntegration","_globalHandlersIntegration","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","globalHandlersIntegration","getOptions","_enhanceEventWithInitialFrame","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","ev","ev0","ev0s","ev0sf","httpContextIntegration","referrer","DEFAULT_KEY","DEFAULT_LIMIT","_linkedErrorsIntegration","linkedErrorsIntegration","getDefaultIntegrations","applyDefaultOptions","optionsArg","defaultOptions","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionKey","extensionObject","runtimeId","extensionProtocols","isDedicatedExtensionPage","isNWjs","browserOptions","responseToSpanId","spanIdToEndTimestamp","defaultRequestInstrumentationOptions","instrumentOutgoingRequests","traceFetch","traceXHR","trackFetchStreamPerformance","shouldCreateSpanForRequest","enableHTTPTimings","tracePropagationTargets","shouldAttachHeadersWithTargets","updatedTimestamp","createdSpan","addHTTPTimings","xhrCallback","isPerformanceResourceTiming","resourceTimingEntryToSpanData","extractNetworkProtocol","nextHopProtocol","getAbsoluteTime","resourceTiming","timingSpanData","targetUrl","resolvedUrl","currentOrigin","isSameOriginRequest","isRelativeSameOriginRequest","addTracingHeadersToXhrRequest","setHeaderOnXhr","sentryTraceHeader","sentryBaggageHeader","registerBackgroundTabDetection","cancelledStatus","BROWSER_TRACING_INTEGRATION_ID","DEFAULT_BROWSER_TRACING_OPTIONS","browserTracingIntegration","enableInp","enableLongTask","enableLongAnimationFrame","enableInteractions","enableStandaloneClsSpans","beforeStartSpan","markBackgroundSpan","instrumentPageLoad","instrumentNavigation","_collectWebVitals","latestRoute","_createRouteSpan","isPageloadTransaction","finalStartSpanOptions","idleSpan","emitFinish","startingUrl","maybeEndActiveSpan","traceOptions","getMetaContent","oldPropagationContext","startBrowserTracingPageLoadSpan","startBrowserTracingNavigationSpan","registerInteractionListener","metaName","metaTag","inflightInteractionSpan","registerInteractionTransaction","currentRootSpanOp","DEFAULT_HOOKS","classifyRE","classify","ROOT_COMPONENT_NAME","ANONYMOUS_COMPONENT_NAME","repeat","formatComponentName","vm","includeFile","file","generateComponentTrace","tree","currentRecursiveSequence","attachErrorHandler","originalErrorHandler","warnHandler","silent","lifecycleHook","trace","hasConsole","VUE_OP","HOOKS","finishRootSpan","findTrackComponent","trackComponents","formattedName","extractComponentName","compo","createTracingMixins","operation","internalHooks","internalHook","isRoot","oldSpan","globalWithVue","DEFAULT_CONFIG","vueIntegration","integrationOptions","vueInit","appWithInstance","init$1","instrumentVueRouter","startNavigationSpanFn","isFirstPageLoad","isPageLoadNavigation","spanName","transactionSource","lastIndex","getActiveRootSpan","browserTracingIntegration$1","routeLabel","useErrorHandling","processError","Sentry.captureMessage","Sentry.captureException","useAuth","loginUrl","redirectUrl","ignoreKeys","BaseApi","cfg","json","redirectToLogin","basePath","getFromLocalStorage","csrfToken","isMarketing","fields","field","sort","isDesc","snake","ModelApi","itemKey","ids","itemsKey","ModelClass","_BaseModel","model","Model","BaseModel","User","UserApi","userApi","useDataStore","organization","contentTypes","globalTags","organizationTags","isLoadingUser","useCurrentUser","loadUser","loadedUser","clearUser","updateUser","userId","addresses","timezone","email","isSuperAdmin","isAdmin","hasEmail","hasSeenSenderIdWarning","hasDismissedGetStarted","shouldShowGetStarted","sawTos","canEditTemplateLibrary","canManageInteractions","canManageAutomations","canManageEnrollments","canManageSchedules","canManageCourses","canManageMembers","canManageAdmins","Organization","OrganizationApi","organizationId","organizationApi","smsImage","slackImage","teamsImage","emailImage","whatsappImage","addressTypes","basicAddressTypes","integrationAddressTypes","addressTypeOptions","basicAddressTypeOptions","isLoadingOrganization","useCurrentOrganization","setOrganization","loadOrganization","loadedOrganization","clearOrganization","switchOrganization","isNudgesEnabled","isAiEnabled","isExternalManagerEnabled","isRatingQuestionEnabled","isConfidenceLiftEnabled","isNpsSurveyEnabled","isLearnerSentimentEnabled","isBlankDaysEnabled","isEmailRequiredInCsv","hasChannels","hasCohorts","availableAddressTypes","availableAddressTypeOptions","anonymizePii","goToAnalytics","goToBuildCourseWithAI","goToContentLibraryOverview","createCourseWithAi","analyticsAndClose","dismissAndClose","useTimezone","defaultTimezone","ensureArray","toggleValueInArray","toggleValueInArrayInPlace","arraysMatch","array1","array2","arraysMatchExactly","arraySequence","step","setValueAtIndex","insertAfter","afterValue","summarizeNumbers","mapFn","arrayFn","flatArrayToOptions","convertToOptions","valueKey","labelKey","getOptionLabel","unknown","dateFormats","dateTokens","dateUnits","dateSigns","meridiems","hourOptions","minuteOptions","meridiemOptions","tokenToDateTime","instruction","isJson","formatDate","format","locale","dateIsWithinNumDays","numDays","today","endDate","inputValueToUTCDateTime","dt","roundMinute","minute","useDate","formattedDate","useDocument","src","script","usePageStore","tryOnScopeDispose","createEventHook","off","offFn","toValue","isClient","notNullish","toString","isIOS","getIsIOS","createFilterWrapper","filter","debounceFilter","timer","maxTimer","lastRejector","_clearTimeout","timer2","invoke","maxDuration","throttleFilter","lastExec","isLeading","lastValue","trailing","leading","rejectOnCancel","clear","_invoke","elapsed","createSingletonPromise","_promise","_prev","getLifeCycleTarget","useDebounceFn","useThrottleFn","tryOnMounted","sync","useTimeoutFn","isPending","watchArray","oldList","newList","oldListRemains","added","found","removed","_2","computedAsync","evaluationCallback","optionsOrRef","evaluating","onInvalidate","counterAtBeginning","hasFinished","cancelCallback","defaultWindow","defaultDocument","defaultNavigator","unrefElement","elRef","plain","useEventListener","options2","stopWatch","optionsClone","_iOSWorkaround","onClickOutside","window","capture","detectIframe","shouldListen","shouldIgnore","target2","isProcessingClick","useMounted","useSupported","usePermission","permissionDesc","controls","isSupported","permissionStatus","desc","useClipboard","copiedDuring","legacy","isClipboardApiSupported","permissionRead","permissionWrite","copied","updateText","isAllowed","legacyRead","legacyCopy","ta","_c","useDropZone","isOverDropZone","files","isValid","multiple","preventDefaultForUnhandled","getFiles","_a2","_b2","checkDataTypes","types","dataTypes","checkValidity","dataTypesValid","multipleFilesValid","handleDragEvent","_d","currentFiles","useIntersectionObserver","rootMargin","targets","_target","targets2","root2","observer","useElementVisibility","scrollTarget","elementIsVisible","intersectionObserverEntries","isIntersecting","latestTime","DEFAULT_OPTIONS","useFileDialog","onChange","changeTrigger","onCancel","cancelTrigger","open","localOptions","ARRIVED_STATE_THRESHOLD_PIXELS","useScroll","throttle","idle","onStop","onScroll","eventListenerOptions","behavior","internalX","internalY","x2","scrollTo","y2","_x","_y","_element","scrollContainer","isScrolling","arrivedState","directions","onScrollEnd","onScrollEndDebounced","setArrivedState","display","flexDirection","scrollLeft","left","right","scrollTop","top","bottom","onScrollHandler","eventTarget","UseMouseBuiltinExtractors","useMouse","touch","resetOnTouchEnds","eventFilter","_prevMouseEvent","sourceType","extractor","mouseHandler","touchHandler","scrollHandler","pos","mouseHandlerWrapper","touchHandlerWrapper","scrollHandlerWrapper","listenerOptions","useMouseInElement","handleOutside","targetRef","elementX","elementY","elementPositionX","elementPositionY","elementHeight","elementWidth","isOutside","elX","elY","usePage","setHeader","main","behaviorRef","scrollY","useTimezoneDetection","useValueToggle","isValue","setValue","setTrue","setFalse","statuses","statusIcons","useFlashMessagesStore","flashMessages","createFlashMessage","showFlashMessage","hideFlashMessage","messageId","useFlashMessages","setFlashSuccess","setFlashFailure","useLegacyFrontend","navBar","navBarTimeout","overlay","button","setElementText","getMetaTagContent","setDocumentTitle","handleGetStartedClick","updateHeaderOnChange","registerGlobalErrorListeners","browserTimezone","isShowingGetStartedModal","showGetStartedModal","hideGetStartedModal","tosDate","shouldShowTos","isShowingTosModal","showTosModal","hideTosModal","updateUserAndHideTosModal","storedToken","pageToken","adjustNavBarZIndex","useScrollIntoView","block","inline","autoScrollIntoView","scrollIntoView","__expose","_createElementBlock","tabs","activeTab","withAutoRouting","changeTab","tab","icon","actualIcon","normalizedMessage","min","round","floor","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","evaluate","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","direction","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","computeCoordsFromPlacement","_ref","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","statefulPlacement","middlewareData","resetCount","nextX","nextY","detectOverflow","_await$platform$isEle","elements","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","arrow","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","alignmentOffset","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflow","overflows","overflowsData","sides","_middlewareData$flip2","_overflowsData$filter","nextPlacement","resetPlacement","_overflowsData$filter2","currentSideAxis","convertValueToCoords","mainAxisMulti","crossAxisMulti","mainAxis","crossAxis","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","getNodeName","isNode","getWindow","_node$ownerDocument","getDocumentElement","isHTMLElement","isShadowRoot","isOverflowElement","overflowX","overflowY","getComputedStyle","isTableElement","isTopLayer","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","getCssDimensions","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","convertOffsetParentRelativeRectToViewportRelativeRect","documentElement","topLayer","offsets","isOffsetParentAnElement","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","getViewportRect","visualViewport","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","isStaticPositioned","getTrueOffsetParent","polyfill","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","observeMove","onMove","io","_io","refresh","skip","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","autoUpdate","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","shift$1","flip$1","arrow$1","platformWithCache","computePosition$1","hasWindow","isComponentPublicInstance","getDPR","roundByDPR","dpr","useFloating","whileElementsMountedOption","openOption","_toValue","middlewareOption","placementOption","_toValue2","strategyOption","_toValue3","transformOption","_toValue4","referenceElement","floatingElement","isPositioned","floatingStyles","initialStyles","xVal","yVal","whileElementsMountedCleanup","attach","showDelay","hideDelay","cleanText","tooltip","tooltipArrow","isVisible","arrowStyles","isMouseOverTrigger","isOutsideTooltip","show","hide","mouseEnter","mouseLeave","toDate","argument","argStr","constructFrom","addDays","amount","_date","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","dateWithDays","minutesToAdd","msToAdd","addMilliseconds","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","addHours","getDefaultOptions","startOfWeek","weekStartsOn","day","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfDay","getTimezoneOffsetInMilliseconds","utcDate","differenceInCalendarDays","dateLeft","dateRight","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","startOfISOWeekYear","fourthOfJanuary","addQuarters","addYears","compareAsc","_dateLeft","_dateRight","getQuarter","differenceInCalendarYears","differenceInYears","sign","difference","isLastYearNotFull","eachDayOfInterval","startDate","reversed","currentDate","dates","startOfQuarter","currentMonth","month","eachQuarterOfInterval","startOfMonth","endOfYear","startOfYear","cleanDate","endOfWeek","endOfQuarter","formatDistanceLocale","formatDistance","tokenValue","buildFormatLongFn","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","buildLocalizeFn","valuesArray","defaultWidth","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","findKey","predicate","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","enUS","getDayOfYear","getISOWeek","getWeekYear","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","targetLength","lightFormatters","signedYear","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","absOffset","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","datePattern","timePattern","dateTimeFormat","longFormatters","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","_message","subject","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","formatStr","defaultLocale","_f","_h","_g","originalDate","substring","firstCharacter","longFormatter","cleanEscapedString","formatterOptions","part","formatter","getDay","getDaysInMonth","monthIndex","lastDayOfMonth","getInternalDefaultOptions","getHours","getISODay","getMinutes","getMonth","getSeconds","getYear","isAfter","dateToCompare","_dateToCompare","isBefore","isEqual","leftDate","rightDate","transpose","fromDate","constructor","TIMEZONE_UNIT_PRIORITY","Setter","_utcDate","ValueSetter","validateValue","priority","subPriority","flags","DateToSystemTimezoneSetter","Parser","dateString","EraParser","numericPatterns","timezonePatterns","mapValue","parseFnResult","parseNumericPattern","parseTimezonePattern","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","dayPeriod","normalizeTwoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","rangeEndCentury","isPreviousCentury","isLeapYearIndex","YearParser","valueCallback","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","setWeek","LocalWeekParser","setISOWeek","ISOWeekParser","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setDay","currentDay","dayIndex","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","setISODay","ISODayParser","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","SecondParser","FractionOfSecondParser","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","notWhitespaceRegExp","dateStr","referenceDate","subFnOptions","usedTokens","incompatibleTokens","incompatibleToken","usedToken","uniquePrioritySetters","setterArray","isSameQuarter","dateLeftStartOfQuarter","dateRightStartOfQuarter","subDays","setMonth","dateWithDesiredMonth","setHours","setMilliseconds","setMinutes","setSeconds","setYear","subMonths","dateWithoutMonths","dateWithoutDays","minutestoSub","mstoSub","subYears","Et","jn","Mn","za","Ha","Ua","Va","Wa","qe","ja","Na","fl","Ge","vl","nt","Mt","Tt","He","ml","je","Pe","ln","pl","ut","yl","Ka","Sn","$n","gl","Ie","hl","An","Ga","Ye","rn","on","Tn","bl","Gt","Yt","yt","kl","wl","Ea","Qa","$a","sa","Dl","Ke","sn","un","Ia","ra","al","Te","Ml","$l","Zn","gt","tl","yn","gn","Kt","Me","Ot","Be","_t","da","lt","Aa","St","ft","ht","Bt","Pn","De","Rn","It","Cn","pn","Al","At","it","La","hn","On","pt","xn","st","_n","jt","Sl","Tl","Bn","Rt","Fa","Pl","Ta","Sa","dn","Pa","Rl","Yn","qa","In","Ht","Qt","Nn","Se","Ra","aa","Ca","Oa","ze","cn","Cl","Ol","_l","Bl","Yl","Il","Nl","El","Fl","Ll","zl","Hl","Ul","Ba","Vl","Wl","jl","Kl","Gl","Vt","at","nl","Ql","kt","bn","kn","ca","rt","ql","Xl","Jl","Le","We","ua","Ne","Ee","ct","Ue","Zl","xl","er","tr","qt","ma","Kn","xe","Wt","Re","na","la","fa","ar","Ut","nr","En","Xt","$e","ke","Gn","Ze","Nt","Ve","Xa","Ja","va","Fn","Ln","zn","wn","oa","ll","Jt","rr","Pt","Je","Qe","or","sr","ur","ir","dr","cr","fr","vr","mr","Dn","ia","pr","yr","gr","hr","Hn","Un","br","kr","wr","Dr","Mr","$r","Ar","Tr","Sr","Pr","Rr","Cr","Or","_r","Br","ol","sl","vn","Yr","Ae","Fe","xt","zt","Da","Dt","ea","Ma","$t","Wn","wt","Xe","et","vt","ot","Ft","Lt","pa","Zt","ya","ga","ha","ba","ka","wa","Ir","Nr","Jr","Er","tn","nn","ul","il","an","Fr","Lr","zr","Hr","Ur","Vr","Wr","jr","Kr","Gr","mn","Zr","Ct","Qr","Qn","xa","mt","qr","Xr","dl","cl","xr","eo","ao","no","lo","Ya","ro","qn","Xn","oo","so","uo","Za","en","Jn","Vn","EMOJI_REMOTE_SRC","GROUP_NAMES","EMOJI_UNICODE_KEY","EMOJI_NAME_KEY","EMOJI_VARIATIONS_KEY","EMOJI_RESULT_KEY","DEFAULT_EMOJI","SKIN_TONE_NEUTRAL","SKIN_TONE_LIGHT","SKIN_TONE_MEDIUM_LIGHT","SKIN_TONE_MEDIUM","SKIN_TONE_MEDIUM_DARK","SKIN_TONE_DARK","SKIN_TONES","STATIC_TEXTS","COLOR_THEMES","smileys_people$1","animals_nature$1","food_drink$1","activities$1","travel_places$1","objects$1","symbols$1","flags$1","emojis","_groups","instanceOfAny","constructors","idbProxyableTypes","cursorAdvanceMethods","getIdbProxyableTypes","getCursorAdvanceMethods","cursorRequestMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","promisifyRequest","unlisten","success","cacheDonePromiseForTransaction","tx","complete","idbProxyTraps","replaceTraps","wrapFunction","storeNames","unwrap","transformCachableValue","openDB","blocked","upgrade","blocking","terminated","openPromise","db","readMethods","writeMethods","cachedMethods","getMethod","targetFuncName","useIndex","isWrite","storeName","oldTraps","DB_KEY","STORE_KEY","DB_VERSION","initialize","db2","oldVersion","getRecentEmojis","Store","group","initialize2","setInitialRecentEmojis","getRecent","recent2","updateLocalStore","updateSearch","updateEmoji","updateActiveGroup","updateSkinTone","tone","updateOptions","updateSelect","emoji","index2","_emoji","auto","basePlacements","clippingParents","viewport","popper","variationPlacements","beforeRead","afterRead","beforeMain","afterMain","beforeWrite","write","afterWrite","modifierPhases","ownerDocument","OwnElement","applyStyles","name2","effect$2","_ref2","styleProperties","style2","attribute","applyStyles$1","getBasePlacement","scaleX","scaleY","getLayoutRect","contains","rootNode","isFirefox","isIE","elementCss","window2","getMainAxisFromPlacement","within","max$1","withinMaxClamp","min2","max2","getFreshSideObject","mergePaddingObject","expandToHashMap","hashMap","toPaddingObject","_state$modifiersData$","arrowElement","popperOffsets2","basePlacement","arrowRect","offset2","axisProp","effect$1","_options$element","getVariation","unsetSides","roundOffsetsByDPR","mapToStyles","_Object$assign2","popper2","popperRect","variation","gpuAcceleration","adaptive","roundOffsets","_ref3","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_Object$assign","computeStyles","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash$1","getOppositeVariationPlacement","getWindowScroll","_element$ownerDocumen","winScroll","isScrollParent","_getComputedStyle","getScrollParent","listScrollParents","updatedList","getClientRectFromMixedType","clippingParent","getClippingParents","clippingParents2","canEscapeClipping","clipperElement","mainClippingParents","firstClippingParent","computeOffsets","reference2","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","_options$altBoundary","_options$padding","altContext","referenceClientRect","popperClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","placements$1","placement2","allowedPlacements","getExpandedFallbackPlacements","_options$mainAxis","_options$altAxis","checkAltAxis","_options$flipVariatio","preferredPlacement","placements2","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","_i2","fittingPlacement","checks2","_i","_ret","getSideOffsets","preventedOffsets","isAnySideFullyClipped","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","popperOffsets","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","offsetParentIsScaled","order","visited","modifier","requires","depModifier","orderModifiers","orderedModifiers","phase","debounce","fn2","pending","mergeByName","merged2","areValidElements","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers2","_generatorOptions$def2","defaultOptions2","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","reference3","popper3","_state$orderedModifie","_state$orderedModifie2","state2","_ref3$options","effect2","noopFn","defaultModifiers","createPopper","smileys_people","unicodeToEmoji","unicode","hex","filterEmojis","emojis2","keyword","skinTone","disabledGroups","_emojiData","_emojis","v_index","isMac","snakeToCapitalizedCase","_export_sfc","sfc","_sfc_main$4","bodyInner","_this","hasGroupNames","isSticky","groupNames","orderedKeys","handleMouseEnter","_hoisted_1$3","_hoisted_2$3","_hoisted_3$3","_hoisted_4$3","_hoisted_5$3","_hoisted_6$2","_hoisted_7$1","_sfc_render$4","$props","$setup","$data","$options","createElementVNode","$event","Body","animals_nature","food_drink","travel_places","objects","symbols","recent","_sfc_main$3","hasSearch","hasGroupIcons","searchValue","groups","orderedGroups","_hoisted_1$2","_hoisted_2$2","_hoisted_3$2","_hoisted_4$2","_hoisted_5$2","_hoisted_6$1","_hoisted_7","_hoisted_8","_sfc_render$3","Header","_sfc_main$2","hasError","stateSkinTone","skinToneText","hasSkinTones","updateSkinToneState","toggleSkinToneState","selectSkinTone","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","_hoisted_4$1","_hoisted_5$1","_hoisted_6","_sfc_render$2","Footer","_sfc_main$1","picker","isInputType","cursor","colorTheme","onSelect","updateCursor","clickListener","setupPopper","onChangeText","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_render$1","_component_Header","_component_Body","_component_Footer","PickerRoot","_sfc_main","_sfc_render","_component_picker_root","Picker","useVisibilityToggle","clickOutsideRef","afterHideHook","afterShowHook","beforeHideHook","beforeShowHook","onHide","onShow","beforeHide","beforeShow","toggle","onSelectEmoji","manualCount","displayThreshold","warningThreshold","dangerThreshold","dynamicCount","hasLimit","isOverDisplayThreshold","isOverWarningThreshold","isOverDangerThreshold","useFocus","hasFocus","focus","blur","useTextInsertion","inputRef","textToInsert","textBefore","textAfter","useCapybaraPeaceTreaty","isMultiline","selectOnFocus","withEnterKeyHandling","showEmojiPicker","characterLimit","ignoreCharacterLimit","manualCharacterCount","insertText","onInput","onKeydown","onKeyup","onBlur","onFocus","focusOnMount","focusOnMountDelay","displayFormat","inputFormat","outputFormat","presetDates","autoApply","convertInputValueToDateTime","convertJSDateToDateTime","convertPresetToDateTime","convertDateTimeToPickerInput","dateTime","convertDateTimeToDisplayFormat","convertDateTimeToISOString","convertDateTimeToOutputFormat","dateTimeValue","modelValue","displayJoin","displayValue","datePicker","emitValue","iso","formattedValue","onPreset","valueProp","labelProp","isMultiSelect","isFlexible","autoSelectFirstOption","dropdownRef","vSelect","calculatePosition","dropdown","keydownMapGenerator","getOptionValue","optionsForVSelect","valueForVSelect","hasBeenOpened","onOpen","onClose","openDropdown","closeDropdown","closeDropdownIfOpen","firstOption","firstValue","selectedOptionIds","numSelectedOptions","selectedOptions","firstSelectedOption","emitSelectedOptions","clearSelectedOptions","removeSelectedOption","removeId","analyticsFilter","dropdownPanel","isShowingAllSelectedOptions","hideAllSelectedOptions","showAllSelectedOptions","visibilityIgnoreRefs","filtersPanel","filtersToggle","resetValue","toggleValue","optionValue","clearValue","isSelected","isCleared","Channel","CommonChannelsApi","commonChannelsApi","selectedAddressTypes","selectedCourseType","selectedChannels","excludeDisabledSchedules","excludeDeletedSchedules","excludeAdmins","channelOptions","courseTypeOptions","numActiveFilters","toggleAddressTypes","toggleChannels","toggleCourseType","toggleExcludeAdmins","toggleExcludeDisabledSchedules","toggleExcludeDeletedSchedules","formatNumber","formatPercentage","fraction","percentage","_mergeProps","hover","currentSort","defaultDirection","getDir","totalItems","itemsPerPage","maxPages","numPages","pages","useItemSelection","selectedItems","numSelectedItems","hasSelectedItems","hasSelectedAllItems","isItemSelected","other","selectItem","unselectItem","selectedItem","toggleItem","selectAllItems","unselectAllItems","expandedItems","toggleExpand","itemId","hasItemActions","toggleAllItems","searchTerm","localSearchTerm","searchEvent","setLocalSearchTerm","clearLocalSearchTerm","clearSearch","partialSearch","fullSearch","partialSearchDebounced","showUnknown","showOther","showValueForOther","unknownLabel","otherLabel","getLabel","label","progress","isIndeterminate","dataExportStatuses","dataExportStatusOptions","dataExportContentTypes","exportStatus","exportError","exportLink","willSendEmail","isCompleted","isFailed","isProcessing","isBusy","showEmail","suffix","DataExport","DataExportsApi","dataExportsApi","useDataExportStatus","exportId","maxAttempts","onUpdate","exportInterval","exportProgress","resetExportStatus","updateExportStatus","attempts","checkExportStatus","stopCheckingExportStatus","startCheckingExportStatus","AnalyticsApi","entity","analyticsApi","useDataExportRequest","isRequestingExport","callHandler","baseParams","users","total","isLoading","currentPage","csvParams","loadData","changeSort","changeItemsPerPage","num","loadPage","page","requestExport","resetExport","downloadCsv","courses","cohorts","ResponsesApi","responseId","responsesApi","responses","changeLimit","formatted","useStoredSetting","setting","course","steps","numResponses","showProgressPercentage","setProgressPercentage","showDropOffPercentage","setDropOffPercentage","language","substep","languages","languageOptions","alphabets","courseCreateModalFlowSteps","courseEditFlowSteps","courseStatuses","courseFilterTabs","courseFilterTabOptions","courseFilterStatuses","courseFilterStatusOptions","courseFilterTypes","courseFilterTypeOptions","courseTrainingTypes","courseExpertiseLevels","courseTrainingTypeOptions","courseExpertiseLevelOptions","courseLengthOptions","courseLanguageOptions","stepTypes","substepTypes","substepTypeOptions","surveySubstepTypes","characterLimits","useAlphabet","alphabet","alphabetLength","getAlphabetLetterForIndex","accuracy","inaccuracy","isAiEvaluated","isMultipleChoice","toggleCorrect","isCorrectChoice","choiceIndex","lim","p2b","n2b","b2n","n2p","map$1","h1","eq","isShort","hexParse","alpha","hexString","HUE_RE","hsl2rgbn","hsv2rgbn","hwb2rgbn","rgb","hueValue","rgb2hsl","calln","hsl2rgb","hwb2rgb","hsv2rgb","hue","hueParse","p1","p2","deg","hslString","names$1","unpack","unpacked","tkeys","ok","nk","nameParse","RGB_RE","rgbParse","rgbString","interpolate","rgb1","rgb2","modHSL","fromObject","functionParse","Color","color","weight","w2","w1","isNullOrUndef","isNumberFinite","finiteOrDefault","valueOrDefault","toDimension","dimension","each","loopable","reverse","_elementsEqual","a0","a1","ilen","v0","v1","klen","isValidKey","_merger","tval","sval","merger","mergeIf","_mergerIf","keyResolvers","_splitKey","_getKeyResolver","resolveObjectKey","_capitalize","defined","setsEqual","_isClickEvent","PI","TAU","PITAU","INFINITY","RAD_PER_DEG","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","log10","almostEquals","epsilon","niceNum","range","roundedRange","niceRange","_factorize","sqrt","isNumber","almostWhole","rounded","_setMinAndMaxByKey","toRadians","degrees","toDegrees","radians","_decimalPlaces","getAngleFromPoint","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","angle","distanceBetweenPoints","pt1","pt2","_angleDiff","_normalizeAngle","_angleBetween","sameAngleIsFullCircle","angleToStart","angleToEnd","startToAngle","endToAngle","_limitValue","_int16Range","_isBetween","_lookup","table","cmp","hi","_lookupByKey","ti","_rlookupByKey","_filterBetween","arrayEvents","listenArrayEvents","unlistenArrayEvents","stub","_arrayUnique","requestAnimFrame","throttled","argsToUse","ticking","_toLeftRightCenter","align","_alignStartEnd","_textX","_getStartAndCountOfVisiblePoints","points","animationsDisabled","pointCount","iScale","_parsed","minDefined","maxDefined","_scaleRangesChanged","xScale","yScale","_scaleRanges","newRanges","changed","atEdge","elasticIn","elasticOut","effects","isPatternOrGradient","getHoverColor","numbers","colors","applyAnimationsDefaults","applyLayoutsDefaults","intlCache","getNumberFormat","tickValue","ticks","notation","maxTick","calculateDelta","logDelta","numDecimal","remain","Ticks","applyScaleDefaults","overrides","descriptors","getScope$1","Defaults","_descriptors","_appliers","targetScope","targetName","scopeObject","targetScopeObject","privateName","local","appliers","toFontString","font","_measureText","gc","longest","textWidth","_longestText","arrayOfThings","jlen","thing","nestedThing","gcLen","_alignPixel","chart","pixel","devicePixelRatio","halfWidth","clearCanvas","canvas","drawPoint","drawPointLegend","xOffset","yOffset","size","cornerRadius","xOffsetW","yOffsetW","rotation","radius","rad","_isPointInArea","point","area","margin","clipArea","unclipArea","_steppedLineTo","previous","midpoint","_bezierCurveTo","setRenderOpts","decorateText","metrics","yDecoration","drawBackdrop","oldColor","renderText","stroke","addRoundedRectPath","LINE_HEIGHT","FONT_STYLE","toLineHeight","numberOrZero","_readValueToProps","objProps","toTRBL","toTRBLCorners","toPadding","toFont","inputs","_addGrace","minmax","grace","beginAtZero","change","keepZero","createContext","parentContext","_createResolver","scopes","rootScopes","getTarget","finalRootScopes","_resolve","_cached","_resolveWithPrefixes","getKeysFromAllScopes","_attachContext","subProxy","descriptorDefaults","_resolveWithContext","_scriptable","_indexable","_allKeys","readKey","prefix","needsSubResolver","_proxy","_context","_subProxy","_resolveScriptable","_resolveArray","_stack","createSubResolver","isIndexable","resolver","resolveFallback","getScope","addScopes","parentScopes","parentFallback","allScopes","addScopesFromKey","subGetTarget","resolveKeysFromAllScopes","EPSILON","getPoint","getValueAxis","indexAxis","splineCurve","firstPoint","middlePoint","afterPoint","d01","d12","s01","s12","fb","monotoneAdjust","deltaK","mK","pointsLen","alphaK","betaK","tauK","squaredMagnitude","pointCurrent","pointAfter","monotoneCompute","valueAxis","pointBefore","iPixel","vPixel","splineCurveMonotone","slopeDelta","capControlPoint","capBezierPoints","inArea","inAreaPrev","inAreaNext","_updateBezierControlPoints","loop","controlPoints","_isDomSupported","_getParentNode","domNode","parseMaxStyle","styleValue","parentProperty","valueInPixels","getStyle","positions","getPositionedStyle","useOffsetPos","getCanvasPosition","touches","box","getRelativePosition","currentDevicePixelRatio","borderBox","paddings","borders","getContainerSize","maxWidth","maxHeight","containerStyle","containerBorder","containerPadding","round1","getMaximumSize","bbWidth","bbHeight","aspectRatio","margins","containerSize","retinaScale","forceRatio","forceStyle","pixelRatio","deviceHeight","deviceWidth","supportsEventListenerOptions","passiveSupported","readUsedSize","_pointInLine","_steppedInterpolation","_bezierInterpolation","cp1","cp2","getRightToLeftAdapter","rectX","itemWidth","getLeftToRightAdapter","_itemWidth","getRtlAdapter","overrideTextDirection","restoreTextDirection","propertyFn","normalizeSegment","getSegment","bounds","startBound","endBound","between","_boundSegment","compare","inside","subStart","startIsBefore","endIsBefore","shouldStart","shouldStop","_boundSegments","findStartAndEnd","spanGaps","solidSegments","_computeSegments","segmentOptions","splitByStyles","completeLoop","doSplitByStyles","chartContext","baseStyle","readStyle","datasetIndex","addStyle","styleChanged","Animator","anims","numSteps","remaining","draw","charts","animator","transparent","interpolators","factor","c0","Animation","promises","rej","Animations","animationOptions","animatedProps","newOptions","resolveTargetOptions","animations","awaitAll","running","animation","properties","anim","scaleClip","allowedOverflow","defaultClip","toClip","getSortedDatasetIndices","filterVisible","metasets","applyStack","dsIndex","singleMode","otherValue","convertObjectDataToArray","vScale","iAxisKey","vAxisKey","adata","isStacked","stacked","getStackKey","indexScale","valueScale","getUserBounds","getOrCreateStack","stacks","indexValue","subStack","getLastIndexInStack","positive","updateStacks","parsed","iAxis","vAxis","itemStacks","visualValues","getFirstScaleId","scales","createDatasetContext","createDataContext","clearStacks","isDirectUpdateMode","cloneIfNotShared","shared","createStack","canStack","DatasetController","dataset","chooseId","xid","yid","rid","iid","vid","scaleID","_data","resetNewElements","stackChanged","oldStacked","scopeKeys","_stacked","sorted","isNotInOrderComparedToPrev","labels","singleScale","xAxisKey","yAxisKey","parsedValue","otherScale","otherMin","otherMax","_skip","active","drawActiveElementsOnTop","elementType","sharing","sharedOptions","firstOpts","previouslySharedOptions","includeOptions","arg1","arg2","numMeta","numData","newCount","getAllScaleValues","visibleMetas","computeMinSampleSize","updateMinAndPrev","computeFitCategoryTraits","ruler","stackCount","thickness","computeFlexCategoryTraits","pixels","parseFloatBar","startValue","endValue","barStart","barEnd","parseValue","parseArrayOrPrimitive","isFloatBar","custom","barSign","actualBase","borderProps","setBorderSkipped","edge","parseEdge","swap","startEnd","orig","v2","setInflateAmount","inflateAmount","BarController","bars","horizontal","vpixels","ipixels","dataIndex","currentParsed","iScaleValue","skipNull","barThickness","baseValue","minBarLength","startPixel","endPixel","halfGrid","maxBarThickness","stackIndex","LineController","_dataset","maxGapLength","directUpdate","pointsCount","prevParsed","nullData","border","lastPoint","abstract","DateAdapterBase","members","adapters","binarySearch","metaset","intersect","_sorted","lookupMethod","evaluateInteractionItems","getDistanceMetricForAxis","useX","useY","deltaX","deltaY","getIntersectItems","useFinalPosition","includeInvisible","getNearestRadialItems","evaluationFunc","startAngle","endAngle","getNearestCartesianItems","distanceMetric","minDistance","inRange","getNearestItems","getAxisItems","rangeMethod","intersectsItem","Interaction","STATIC_POSITIONS","filterByPosition","filterDynamicPositionByAxis","sortByWeight","wrapBoxes","boxes","layoutBoxes","stackWeight","buildStacks","layouts","setLayoutDims","vBoxMaxWidth","hBoxMaxHeight","layout","fullSize","buildLayoutBoxes","centerHorizontal","centerVertical","getCombinedMax","chartArea","updateMaxPadding","boxPadding","updateDims","newWidth","newHeight","widthChanged","heightChanged","handleMaxPadding","updatePos","getMargins","marginForPositions","fitBoxes","refitBoxes","refit","same","setBoxDims","placeBoxes","userPadding","layoutItem","availableWidth","availableHeight","verticalBoxes","horizontalBoxes","visibleVerticalBoxCount","BasePlatform","BasicPlatform","EXPANDO_KEY","EVENT_TYPES","isNullOrEmpty","initCanvas","renderHeight","renderWidth","displayWidth","displayHeight","addListener","removeListener","fromNativeEvent","nodeListContains","nodeList","createAttachObserver","createDetachObserver","drpListeningCharts","oldDevicePixelRatio","onWindowResize","listenDevicePixelRatioChanges","unlistenDevicePixelRatioChanges","createResizeObserver","releaseObserver","createProxyAndListen","DomPlatform","initial","proxies","_detectPlatform","Element$1","autoSkip","tickOpts","determinedMaxTicks","determineMaxTicks","ticksLimit","majorIndices","getMajorIndices","numMajorIndices","newTicks","skipMajors","spacing","calculateSpacing","avgMajorSpacing","tickLength","maxScale","maxChart","evenMajorSpacing","getEvenSpacing","factors","majorStart","majorEnd","reverseAlign","offsetFromEdge","getTicksLimit","ticksLength","maxTicksLimit","sample","numItems","increment","getPixelForGridLine","offsetGridLines","validIndex","lineValue","garbageCollect","caches","getTickMarkLength","getTitleHeight","createScaleContext","createTickContext","titleAlign","titleArgs","titleX","titleY","positionAxisID","Scale","Element","_userMin","_userMax","_suggestedMin","_suggestedMax","metas","sampleSize","samplingEnabled","reversePixels","numTicks","minRotation","maxRotation","labelRotation","tickWidth","maxLabelDiagonal","labelSizes","maxLabelWidth","maxLabelHeight","minSize","titleOpts","gridOpts","isHorizontal","titleHeight","widest","highest","tickPadding","angleRadians","cos","sin","labelHeight","labelWidth","isRotated","labelsBelowTicks","offsetLeft","offsetRight","paddingLeft","paddingRight","paddingTop","paddingBottom","widths","heights","widestLabelSize","highestLabelSize","tickFont","fontString","lineHeight","nestedLabel","valueAt","decimal","optionTicks","rot","grid","borderOpts","axisWidth","axisHalfWidth","alignBorderValue","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","x1","y1","optsAtIndex","optsAtIndexBorder","lineWidth","lineColor","borderDash","borderDashOffset","tickColor","tickBorderDash","tickBorderDashOffset","crossAlign","mirror","tickAndPadding","hTickAndPadding","textAlign","lineCount","textOffset","textBaseline","halfCount","strokeColor","strokeWidth","tickTextAlign","backdrop","labelPadding","backgroundColor","drawLine","lastLineWidth","renderTextOptions","tz","gz","bz","axisID","fontSize","TypedRegistry","override","parentScope","isIChartComponent","registerDefaults","itemDefaults","routeDefaults","propertyParts","sourceName","sourceScope","Registry","typedRegistry","reg","itemReg","camelMethod","PluginService","all","plugins","allPlugins","createDescriptors","previousDescriptors","localIds","getOpts","pluginOpts","getIndexAxis","datasetDefaults","getAxisFromDefaultScaleID","getDefaultScaleIDFromAxis","idMatchesAxis","axisFromPosition","determineAxis","scaleOptions","getAxisFromDataset","retrieveAxisFromDatasets","boundDs","mergeScaleConfig","chartDefaults","configScales","chartIndexAxis","scaleConf","defaultId","defaultScaleOptions","defaultID","initOptions","initData","initConfig","keyCache","keysCached","cachedKeys","generate","addIfFound","Config","datasetType","mainScope","resetCache","_scopeCache","keyLists","subPrefixes","getResolver","needContext","subResolver","resolverCache","hasFunction","isScriptable","scriptable","indexable","KNOWN_POSITIONS","positionIsHorizontal","compare2Level","l1","onAnimationsComplete","onAnimationProgress","getCanvas","instances","getChart","moveNumericKeys","intKey","determineLastEvent","lastEvent","inChartArea","isClick","getSizeForArea","getDatasetArea","Chart$1","invalidatePlugins","userConfig","initialCanvas","existingChart","maintainAspectRatio","_aspectRatio","newSize","newRatio","scalesOptions","axisOptions","scaleOpts","isRadial","scaleType","scaleClass","hasUpdated","datasets","newControllers","ControllerClass","datasetElementType","dataElementType","animsDisabled","_active","_lastEvent","existingEvents","newEvents","_hiddenIndices","changes","_dataChanges","datasetCount","makeSet","changeSet","noArea","layers","clip","useClip","visible","_add","_remove","attached","activeElements","lastActive","pluginId","hoverOptions","Chart","lineTo","getLineMethod","pathVars","paramsStart","paramsEnd","segmentStart","segmentEnd","outside","pathSegment","lineMethod","fastPathSegment","avgX","countX","prevX","minY","maxY","lastY","pointIndex","drawX","truncX","_getSegmentMethod","_getInterpolationMethod","strokePathWithCache","strokePathDirect","segmentMethod","usePath2D","LineElement","_interpolate","interpolated","inRange$1","PointElement","mouseX","mouseY","borderWidth","getBarBounds","bar","half","skipOrLimit","parseBorderWidth","maxW","maxH","parseBorderRadius","enableBorderRadius","maxR","enableBorder","boundingRects","skipX","skipY","hasRadius","addNormalRectPath","inflateRect","refRect","BarElement","borderColor","addRectPath","_segments","tpoints","_findSegmentEnd","_getBounds","targetSegments","tgt","subBounds","fillSources","fillSource","_getEdge","_pointsFromSegments","linePoints","_createBoundaryLine","_shouldApplyFill","_resolveTarget","propagate","_decodeFill","parseFillOption","decodeTargetIndex","firstCh","_getTargetPixel","_getTargetValue","fillOption","_buildStackLine","sourcePoints","linesBelow","getLinesBelow","addPointsBelow","below","sourcePoint","postponed","findPoint","pointValue","simpleArc","_getTarget","getLineByIndex","computeBoundary","computeCircularBoundary","computeLinearBoundary","_drawfill","lineOpts","above","doFill","clipVertical","clipY","lineLoop","notShape","clipBounds","interpolatedLineTo","targetLoop","interpolatedPoint","_args","getBoxSize","labelOpts","boxHeight","boxWidth","itemsEqual","Legend","legendItems","labelFont","itemHeight","hitboxes","lineWidths","totalHeight","row","legendItem","_itemHeight","columnSizes","heightLimit","totalWidth","currentColWidth","currentColHeight","calculateItemSize","rtlHelper","hitbox","defaultColor","halfFontSize","drawLegendBox","drawOptions","centerX","centerY","yBoxTop","xBoxLeft","borderRadius","fillText","realX","fontLineHeight","calculateLegendItemHeight","titleFont","titlePadding","topPaddingPlusHalfFontSize","hitBox","lh","isListened","hoveredItem","sameItem","calculateItemWidth","calculateItemHeight","legendItemText","plugin_legend","legend","ci","usePointStyle","pointStyle","useBorderRadius","Title","textSize","fontOpts","createTitle","plugin_title","titleBlock","positioners","xSet","eventPosition","nearestElement","tp","pushOrConcat","toPush","splitNewlines","createTooltipItem","getTooltipSize","footer","bodyFont","footerFont","titleLineCount","footerLineCount","bodyLineItemCount","combinedBodyLength","bodyItem","bodyLineHeight","widthPadding","maxLineWidth","determineYAlign","doesNotFitWithAlign","xAlign","caret","determineXAlign","yAlign","chartWidth","determineAlignment","alignX","alignY","paddingAndSize","getBackgroundPoint","caretSize","caretPadding","topLeft","topRight","bottomLeft","bottomRight","getAlignedX","getBeforeAfterBodyLines","createTooltipContext","tooltipItems","overrideCallbacks","defaultCallbacks","labelCount","tooltipItem","invokeCallbackWithFallback","Tooltip","beforeTitle","afterTitle","bodyItems","scoped","beforeFooter","afterFooter","labelColors","labelPointStyles","labelTextColors","positionAndSize","backgroundPoint","tooltipPoint","caretPosition","ptX","ptY","x3","y3","titleSpacing","labelColor","labelPointStyle","colorX","rtlColorX","yOffSet","colorY","outerX","innerX","bodySpacing","bodyAlign","displayColors","xLinePadding","fillLineOfText","bodyAlignForCalculation","textColor","tooltipSize","animX","animY","opacity","hasTooltipContent","positionChanged","caretX","caretY","plugin_tooltip","addIfString","addedLabels","findOrAddLabel","_getLabelForValue","CategoryScale","generateTicks$1","generationOptions","dataRange","precision","maxTicks","maxDigits","includeBounds","maxSpaces","rmin","rmax","countDefined","minSpacing","niceMin","niceMax","numSpaces","decimalPlaces","relativeLabelSize","LinearScaleBase","setMin","setMax","minSign","maxSign","stepSize","numericGeneratorOptions","LinearScale","log10Floor","changeExponent","isMajor","tickVal","rangeExp","rangeStep","startExp","generateTicks","minExp","exp","significand","lastTick","LogarithmicScale","getTickBackdropHeight","measureLabelSize","determineLimits","fitWithPointLabels","valueCount","pointLabelOpts","additionalAngle","pointPosition","plFont","hLimits","vLimits","updateLimits","buildPointLabelItems","createPointLabelItem","itemOpts","outerDistance","pointLabelPosition","yForAngle","getTextAlignForAngle","leftForTextAlign","isNotOverlapped","centerPointLabels","drawPointLabelBox","backdropColor","backdropLeft","backdropTop","backdropWidth","backdropHeight","drawPointLabels","pointLabels","pathRadiusLine","circular","drawRadiusLine","gridLineOpts","createPointLabelContext","RadialLinearScale","leftMovement","rightMovement","topMovement","bottomMovement","angleMultiplier","scalingFactor","scaledDistance","pointLabel","distanceFromCenter","angleLines","INTERVALS","UNITS","sorter","adapter","isoWeekday","determineUnitForAutoTicks","minUnit","capacity","determineUnitForFormatting","determineMajorUnit","addTick","timestamps","setMajorTicks","majorUnit","major","ticksFromTimestamps","TimeScale","_applyBounds","timeOpts","minor","weekday","hasWeekday","formats","fmt","minorFormat","majorFormat","ticksOpts","tickLabelWidth","cosRotation","sinRotation","tickFontSize","exampleTime","displayFormats","exampleLabel","prevSource","nextSource","prevTarget","TimeSeriesScale","CommonProps","A11yProps","Props","compatProps","toRawIfProxy","cloneProxy","setOptions","nextOptions","setLabels","currentData","nextLabels","setDatasets","nextDatasets","datasetIdKey","addedDatasets","nextDataset","currentDataset","cloneData","nextData","canvasRef","chartRef","renderChart","clonedData","proxiedData","destroyChart","param1","nextOptionsProxy","nextDataProxy","prevOptionsProxy","prevDataProxy","shouldUpdate","prevOptions","prevLabels","prevDatasets","createTypedChart","registerables","reforwardRef","Bar","Line","ChartJS","Filler","chartdata","renderLineChart","ensureBoolean","preserveEmty","useTabs","activeTabKey","checkTabKeyActive","checkTabActive","setActiveTabKey","setActiveTab","tableTabs","activeTableTab","setActiveTableTab","courseOptions","distributionOptions","cohortOptions","userOptions","insights","chartData","showDropOff","showSubstepDetails","selectedStep","selectedSubstep","selectedCourseIds","selectedCohortIds","selectedChannelIds","selectedScheduleIds","selectedLearnerIds","includeNudges","dateRange","isSingleCourseSelected","firstCourseId","hasIdFilters","extractData","resetIdFilters","resetAdvancedFilters","clearAdvancedFilters","clearAllFilters","updateAddressTypes","updateCourseType","updateChannels","updateExcludeAdmins","updateExcludeDisabledSchedules","updateExcludeDeletedSchedules","setDateRange","setSelectedCourseIds","setSelectedCohortIds","setSelectedDistributionIds","setSelectedUserIds","setSpecificCourseId","setSpecificCohortId","setSpecificUserId","toggleDropOff","toggleSubstepDetails","lang","engagementView","substepDetailsView","reloadData","conditionItem","dropdownOptions","operatorOptions","relativeTimeOptions","dataType","showRelativeTimeOptions","filteredOperatorOptions","getOperatorValue","filteredRelativeTimeOptions","updateUserInput","operator","updateOperator","userInput","updateCondition","updateValueDebounced","condition","conditionKey","conditionPath","isSaving","isSaved","showSavingIndicator","showSavedIndicator","canHideSavingIndicator","hasSaved","ownKeys","enumerableOnly","sym","_objectSpread2","_defineProperty","normalizeValidatorObject","validator","unwrapValidatorResponse","unwrapNormalizedValidator","$params","$validator","validatorObj","withMessage","$message","withAsync","$watchTargets","forEach","validators","collection","others","collectionItem","collectionEntryResult","$model","innerValidators","propertyResult","validatorName","currentValidator","$response","$valid","errors","req","regex","expr","common","between$1","emailRegex","email$1","maxLength$1","minLength$1","minLength","required$1","required","validate$1","requiredIf$1","propOrFunction","parentVM","requiredIf","urlRegex","url$1","minValue$1","minValue","maxValue$1","maxValue","integer$1","integer","useValidators","helpers","asyncValidator","characterCount","valueRef","limitMaybeRef","combinedCharacterCount","requiredWithMessage","fieldName","requiredIfWithMessage","emailWithMessage","urlWithMessage","integerWithMessage","unwrapObj","stringPath","gatherBooleanGroupProperties","nestedResults","gatherArrayGroupProperties","fetchedProperty","callRule","rule","siblingState","normalizeValidatorResponse","createAsyncResult","$pending","$dirty","$lazy","$rewardEarly","watchTargets","$lastInvalidState","$lastCommittedOn","$invalid","$pendingCounter","$unwatch","ruleResult","createSyncResult","createValidatorResult","propertyKey","propertyPath","sortValidations","validationsRaw","validations","validationKeys","rules","nestedValidators","validationGroups","ROOT_PATH","createValidationResults","resultsCache","externalResults","ruleKeys","ruleKey","stringError","collectNestedValidationResults","nestedState","nestedExternalResults","nestedValidationKeys","results","nestedKey","setValidations","createMetaFields","childResults","allResults","allRes","$silentErrors","modelErrors","nestedErrors","$errors","$anyDirty","$error","$touch","$commit","globalConfig","mergedConfig","cachedExternalResults","$validationGroups","external","$validate","unwatch","$getResultsForChild","$clearExternalResults","ResultsStorage","storedRules","storedRulesKeys","newRulesKeys","paramKey","storedRuleResultPair","isValidCache","CollectFlag","VuelidateInjectChildResults","VuelidateRemoveChildResults","nestedValidations","$scope","childResultsRaw","childResultsKeys","injectChildResultsIntoParent","childScope","$stopPropagation","removeChildResultsFromParent","childKey","sendValidationResultsToParent","removeValidationResultsFromParent","ComputedProxyFactory","useVuelidate","_getCurrentInstance","$registerAs","$externalResults","currentVueInstance","componentOptions","validationResults","validationsWatchTarget","newValidationRules","automationStatuses","automationStatusOptions","Automation","AutomationsApi","automation","automationsApi","useAutomationValidation","existingAutomation","isCheckingAutomationExists","checkAutomationExists","checkAutomationExistsDebounced","uniqueName","useAutomationPreview","isRequestingAutomationPreview","automationPreviewText","useAutomationDropdownOptions","sourceOptions","triggerOptions","triggerConditionsOptions","actionOptions","actionConditionsOptions","updateModel","maxDays","minDays","showRelativeTimeInput","canRequestAutomationPreview","validExceptName","isInvalid","$v","availableTriggerConditionsOptions","letter","availableActionConditionsOptions","availableActionOptions","availableTriggerOptions","requestAutomationPreview","loadAutomationDropdownOptions","handleActionInput","handleTriggerInput","handleSourceInput","requestPreview","handleUseExistingDataFirstEnable","handleActionConditionsInput","updateNestedValueByPath","handleTriggerConditionsInput","handleNumDaysDelayBeforeAction","numValue","keyOrIndex","fullStructure","currentInFull","parentInFull","saveModel","noEmptyObjects","useAutomationEditing","isUpdatingAutomation","saveAutomation","goToAutomationsOverview","save","rows","useKeyboardItemSelection","itemRefs","focusRef","selectedIndex","confirmedIndex","hasItems","selectedRef","selectNext","selectPrev","clearSelection","searchResults","hasPartialSearch","numResults","hasResults","resultsPanel","isShowingResults","hideResults","showResultsIfHasResults","resultRefs","searchPanel","selectResult","hasNestedContent","menu","goToEditAutomation","useItemsPerPage","setItemsPerPage","useQuerying","isLoadingItems","isLoadingMoreItems","hasLoadedItems","hasLoadedAllItems","isBatchQuerying","getQueryParams","getExportQueryParams","queryItems","flatArray","loadItems","loadMoreItems","reloadItems","loadItemsBatched","unloadItems","loadItemsForPage","loadMoreItemsThrottled","newLimit","reload","newSort","changeSearch","newSearch","setFilter","newFilter","isFilterActive","resetFilter","changeFilter","filterObj","isEmptyFilterValue","isDefaultFilterValue","addItem","afterItem","removeItem","replaceItem","useSearch","fullSearchHandler","partialSearchHandler","partialSearchResults","isDoingFullSearch","goToCreateAutomation","automationBeingEdited","isShowingWarningModal","showWarningModal","hideWarningModal","automations","totalAutomations","queryAutomations","loadAutomations","reloadAutomations","loadAutomationsForPage","isLoadingAutomations","confirmToggleAutomation","showToggleAutomationModal","hideToggleAutomationModal","useAutomationCreation","isSavingAutomation","isSingle","single","activeStep","scrollPage","scrollToTop","TimezonesApi","timezonesApi","timezones","isLoadingTimezones","hasLoadedTimezones","loadingPromise","useTimezones","loadTimezones","isChecked","cohortCreateFlowSteps","cohortAddLearnersFlowSteps","cohortLearnerSelectionMethods","cohortLogEvents","cohortLogEventOptions","Cohort","ruleset","CohortsApi","identifier","cohortsApi","useCohortValidation","existingCohort","isCheckingCohortExists","checkCohortExists","checkCohortExistsDebounced","methodOptions","nameInput","continueToNextStep","continueWithoutLearners","__classPrivateFieldGet","kind","_Mime_extensionToType","_Mime_typeToExtension","_Mime_typeToExtensions","Mime","typeMap","extensions","ext","allExtensions","extension","starred","currentType","hasPath","mime","standardTypes","otherTypes","fileTypes","imageFileTypes","videoFileTypes","importFileTypes","fileExtensionConversions","multipliers","loadVideoMetadata","video","fileTypeToExtension","fileType","convert","formatFileSize","bytes","parseFileSize","multiplier","validateVideoFileDurations","videoFiles","validateFileSizes","maxFileSize","maxTotalSize","sum","isSameFile","validateFileSizeByType","validateVideoFileDuration","useFileSize","formattedFileSize","ImageApi","imageKey","tempBucketFilename","maxlength","imageApi","useImageSource","isImageKey","isFile","imageSrc","loadImage","img","useImage","image","imageWidth","imageHeight","imageRatio","card","cardWidth","cardHeight","uploadStates","getState","setState","deleteState","hasState","useFileUploadState","fileUploadState","showIcon","staticIcon","isImage","isVideo","shouldShowProcessingAlert","useFileSelection","dropzone","allowMultiple","allowedFileTypes","customFileValidator","onFiles","accept","onDrop","fileList","maxNumFiles","preventDuplicates","selectedFiles","numSelectedFiles","hasSelectedFiles","appendFiles","setFiles","removeFile","chooseFiles","Address","fieldRuleConditions","fieldSources","fieldTypes","fieldRuleConditionOptions","metadataFieldTypes","metadataFieldTypeOptions","_MetadataField","MetadataField","Learner","address","LearnersApi","learnersApi","learners","selectedLearners","localSelection","hasSelectedLearners","numSelectedLearners","isLearnerSelected","toggleLearner","unselectAllLearners","isSearching","queryLearners","clearLearners","useRelativeDates","constructString","updateValue","updateAmount","updateUnit","updateSign","unitOptions","signOptions","userField","metadataFieldId","fieldOptions","conditionOptions","fieldValue","selectedField","selectedCondition","filteredConditionOptions","ValueInputComponent","TextInput","DateInput","RelativeDateInput","updateRule","updateRuleField","userFieldOptions","userFieldOptionsForCohortRules","userFieldOptionsForCsv","userHeaderRegex","MetadataFieldsApi","metadataFieldsApi","useMetadataFields","metadataFields","metadataField","useMetadataFieldOptions","initialOptions","loadMetadataFields","addMetadataField","useCohortRuleManagement","createRule","rulesets","hasRulesets","hasRules","hasValues","createRuleset","updateRulesets","cloneRulesets","addRuleset","removeRuleset","rulesetIndex","addRule","ruleIndex","removeRule","validateRulesets","confirm","fileMap","useCohortCsvFile","cohort","csvFile","setCsvFile","clearCsvFile","useCohortCreation","isDynamic","isAddingExisting","isCreatingCohort","useSteps","initialSteps","setSteps","newSteps","initialIndex","activeStepIndex","activeStepRoute","hasActiveStepRoute","isOnActiveStepRoute","canGoToPrevStep","canGoToNextStep","routeStep","checkStepActive","isGoingBack","clearGoingBack","setGoingBack","goToStep","stepIndex","goToFirstStep","goToLastStep","goToNextStep","goToPrevStep","learnersStepComponent","CohortCreateFlowLearnersStepDynamic","CohortCreateFlowLearnersStepExisting","CohortCreateFlowLearnersStepCsv","createCohort","updateSelectedLearners","learner","cancel","continueFromDetailsStep","CohortCreatorsApi","cohortCreatorsApi","isDynamicOptions","creators","loadCreators","useItemRemoval","successMessage","failureMessage","itemsToRemove","idsToRemove","numItemsToRemove","hasItemsToRemove","isRemovingItems","setItemsToRemove","clearItemsToRemove","useCohortRemoval","cohortsToRemove","numCohortsToRemove","hasCohortsToRemove","isRemovingCohorts","setCohortsToRemove","clearCohortsToRemove","removeCohorts","totalCohorts","queryCohorts","loadCohorts","loadCohortsForPage","reloadCohorts","isLoadingCohorts","selectedCohorts","toggleAllCohorts","toggleCohort","numSelectedCohorts","hasSelectedCohorts","unselectAllCohorts","isShowingCreateFlow","showCreateFlow","hideCreateFlow","confirmCohortCreation","goToManageCohort","cancelCohortRemoval","confirmCohortRemoval","goToAnalyzeCohort","asIana","timezoneLabel","previewRows","hasHeader","setHasHeader","hasCheckedRows","showIntegrationWarning","clearFileAndGoBack","selectInput","filteredValues","columns","previewColumn","previewValues","showPreview","hidePreview","mappedOptions","suggestedOptions","hasSuggestions","useSuggested","usePrevious","previousMappings","hasPreviousMappings","toggleUseSuggested","use","toggleUsePrevious","requiredColumns","isMissingAddressTypeMapping","isMissingAddressValueMapping","isMissingEmailMapping","missingMappings","missing","hasMappingErrors","showMappingErrors","validateAndContinue","sortedErrors","BulkUploadError","BulkUploadErrorsApi","bulkUploadErrorsApi","loadErrors","isLoadingErrors","isLoadingSummary","testIds","useUuid","generateUuid","randomInt","randomFloat","pickRandom","useFakeProgress","frequency","frequencyJitter","targetDuration","incrementJitter","autoStart","extractOptions","setTargetDuration","numIncrements","targetIncrement","setProgress","incrementProgress","getIncrement","getTickTimeout","cancelTick","startProgress","stopProgress","onlyIfHigher","resetProgress","useCohortCsvProcessing","hasStrippedOffHeader","numRowsProcessed","numRowsSucceeded","hasErrors","isProcessingComplete","isProcessingChunk","pollingInterval","mappedFields","processChunk","chunk","isDryRun","rowIncrement","checkCsvProcessingStatus","processingProgress","module","this","useCsvParsing","csvData","chunkCallback","completeCallback","csvDataSize","parsingProgress","parsingError","isParsing","isParsingComplete","parseCsvData","Papa","abortParsing","processChunkDryRun","pollProcessingStatusDryRun","isProcessingDryRun","isProcessingDryRunComplete","processingProgressDryRun","hasErrorsDryRun","isParsingDryRun","isParsingDryRunComplete","parsingProgressDryRun","parsingErrorDryRun","abortParsingDryRun","processChunkLiveRun","pollProcessingStatusLiveRun","isProcessingLiveRun","isProcessingLiveRunComplete","processingProgressLiveRun","hasErrorsLiveRun","numRowsSucceededLiveRun","parseCsvDataLiveRun","isParsingLiveRun","isParsingLiveRunComplete","parsingProgressLiveRun","parsingErrorLiveRun","abortParsingLiveRun","statusText","isDone","numErrors","setNumErrors","useMetadataFieldCreation","isCreatingMetadataField","useMetadataFieldValidation","existingMetadataField","isCheckingMetadataFieldExists","checkMetadataFieldExists","checkMetadataFieldExistsDebounced","createMetadataField","current_ansi","VALID_ANSI","CS2CP","set_ansi","cp","reset_ansi","set_cp","reset_cp","char_codes","utf16leread","utf16beread","debom","_getchar","_getansi","$cptable","Base64_map","Base64_encode","c3","e3","e4","Base64_decode","has_buf","Buffer_from","nbfs","enc","new_raw_buf","new_unsafe_buf","s2a","a2s","ab2a","bconcat","bufs","maxlen","utf8decode","widx","ridx","chr0","chr1","_strrev","pad0","pad_","rpad_","pad0r1","pad0r2","p2_32","pad0r","SSF_isgeneral","SSF_init_table","table_fmt","SSF_default_map","SSF_default_str","SSF_frac","mixed","sgn","P_2","P_1","Q_2","Q_1","SSF_parse_date_code","b2","dow","dout","SSF_fix_hijri","SSFbasedate","SSFdnthresh","SSFbase1904","datenum_local","date1904","epoch","SSF_strip_decimal","SSF_normalize_exp","SSF_small_exp","SSF_large_exp","SSF_general_num","SSF_general","SSF_format","SSF_write_date","ss0","ss","outl","outstr","commaify","pct1","write_num_pct","sfmt","mul","write_num","write_num_cm","write_num_exp","period","fakee","$$","$2","$3","frac1","write_num_f1","aval","den","myn","myd","write_num_f2","dec1","closeparen","phone","hashq","cc","rnd","dd","dec","_frac","carry","flr","write_num_flt","ffmt","ri","ff","lres","rres","write_num_cm2","write_num_pct2","write_num_exp2","write_num_int","SSF_split_fmt","in_str","SSF_abstime","fmt_is_date","eval_fmt","flen","lst","ssm","nstr","jj","vv","myv","ostr","decpt","lasti","retval","cfregex2","chkcond","thresh","choose_fmt","lat","m1","m2","SSF_load","make_ssf","SSFImplicit","dateNFregex","dateNF_regex","dateNF","dateNF_fix","datestr","timestr","CRC32","signed_crc_table","T0","slice_by_16_tables","TT","T1","T2","T3","T4","T5","T6","T7","T8","T9","Tb","Tc","Td","Tf","crc32_bstr","bstr","seed","crc32_buf","crc32_str","CFB","exports","namecmp","dirname","write_dos_date","hms","ymd","parse_dos_date","parse_extra_field","blob","prep_blob","sz","fs","get_fs","parse_zip","parse_mad","mver","ssz","nmfs","difat_sec_cnt","dir_start","minifat_start","difat_start","fat_addrs","mv","check_get_mver","check_shifts","dir_cnt","sectors","sectorify","sleuth_fat","sector_list","make_sector_list","ENDOFCHAIN","Paths","FileIndex","FullPaths","read_directory","build_full_paths","HEADER_SIGNATURE","nsectors","FI","FP","dad","get_mfat_entry","mini","MSSZ","__readInt32LE","new_buf","cnt","sector","get_sector_list","chkd","buf_chain","modulus","addr","__toBuffer","minifat_store","namelen","__utf16le","ctime","read_date","mtime","__readUInt32LE","read_file","init_cfb","cfb","seed_cfb","nm","rebuild_cfb","_file","fullPaths","HEADER_CLSID","elt","_write","_opts","write_mad","write_zip","mini_size","fat_size","mini_cnt","mfat_cnt","fat_base","fat_cnt","difat_cnt","HEADER_SIG","chainit","consts","_nm","find","UCFullPaths","UCPaths","UCPath","write_file","_zlib","use_zlib","zlib","InflateRaw","InflRaw","_inflateRawSync","usz","_inflate","_deflateRawSync","_deflate","CLEN_ORDER","LEN_LN","DST_LN","bit_swap_8","use_typed_arrays","bitswap8","bit_swap_n","rev","read_bits_2","read_bits_3","read_bits_4","read_bits_5","read_bits_7","read_bits_n","write_bits_3","write_bits_1","write_bits_8","write_bits_16","realloc","zero_fill_array","build_tree","clens","cmap","MAX","ccode","bl_count","ctree","cleni","fix_lmap","fix_dmap","dlens","_deflateRaw","DST_LN_RE","LEN_LN_RE","write_stored","boff","write_huff_fixed","addrs","mlen","len_eb","dst_eb","dyn_lmap","dyn_dmap","dyn_cmap","dyn_len_1","dyn_len_2","dyn","_HLIT","_HDIST","_HCLEN","next_code","hcodes","inflate","outbuf","woff","OL","max_len_1","max_len_2","bits","dst","warn_or_throw","wrn","fcnt","start_cd","csz","efsz","fcsz","EF","parse_local_file","meth","crc32","_csz","_usz","ef","cfb_add","cdirs","fp","fi","crcs","sz_cd","namebuf","ContentTypeMap","get_content_type","write_base64_76","write_quoted_printable","encoded","si","parse_quoted_printable","di","oi","parse_mime","fname","cte","ctype","fdata","mboundary","start_di","cstr","dispcnt","csl","qp","cfb_new","unsafe","fpath","cfb_del","cfb_mov","old_name","new_name","cfb_gc","ReadShift","CheckField","read_binary","infile","ks","o2","evert","basedate","datenum","dnthresh","refdate","refoffset","numdate","parse_isodur","sec","good_pd_date_1","good_pd_date","good_pd","parseDate","fixdate","cc2str","debomit","utf8write","dup","fuzzynum","lower_months","fuzzydate","split_regex","safe_split_regex","getdatastr","getdatabin","getdata","safegetzipfile","zip","getzipfile","getzipdata","safe","getzipstr","getzipbin","zipentries","zip_add_file","zip_read","resolve_path","XML_HEADER","attregexg","tagregex1","tagregex2","tagregex","nsregex","nsregex2","parsexmltag","skip_root","skip_LC","quot","strip_ns","encodings","rencoding","unescapexml","encregex","coderegex","decregex","htmlcharegex","escapehtml","xlml_fixstr","entregex","entrepl","parsexmlbool","utf8reada","utf8readb","ww","utf8readc","utf8corpus","utf8read","matchtag","mtcache","htmldecode","entities","vtregex","vt_cache","vtvregex","vtmregex","parseVector","wtregex","wxt_helper","writextag","xlml_normalize","xlmlregex","XMLNS","XMLNS_main","read_double_le","write_double_le","bs","av","___toBuffer","___utf16le","__readUInt16LE","___hexlify","__hexlify","___utf8","__readUInt8","__utf8","___lpstr","__lpstr","___cpstr","__cpstr","___lpwstr","__lpwstr","___lpp4","__lpp4","___8lpp4","__8lpp4","___double","__double","is_buf","__readInt16LE","__readInt32BE","oI","oR","loc","__writeUInt32LE","__writeInt32LE","__writeUInt16LE","WriteShift","hexstr","fld","parsenoop","recordhopper","tmpbyte","cntbyte","RT","XLSBRecordEnum","buf_array","blksz","newblk","curbuf","endbuf","shift_cell_xls","cell","shift_range_xls","encode_cell_xls","biff","encode_cell","fix_col","fix_row","encode_range_xls","encode_col","encode_row","decode_row","rowstr","unfix_row","decode_col","colstr","unfix_col","split_cell","decode_cell","decode_range","encode_range","cs","safe_decode_range","safe_format_cell","format_cell","BErr","sheet_to_workbook","sheet","sheets","sheet_add_aoa","_ws","dense","ws","_R","_C","_origin","_range","__R","__C","cell_ref","aoa_to_sheet","parse_Int32LE","parse_XLWideString","cchCharacters","parse_StrRun","parse_RichStr","rgsStrRun","dwSizeStrRun","parse_BrtCommentText","parse_XLSBCell","iStyleRef","parse_XLSBShortCell","parse_XLSBCodeName","parse_XLNullableWideString","parse_XLNameWideString","parse_RelID","parse_RkNumber","fX100","fInt","RK","parse_RfX","parse_UncheckedRfX","parse_Xnum","parse_BrtColor","xColorType","nTS","bR","bG","bB","icv","XLSIcv","rgb2Hex","parse_FontFlags","parse_ClipboardFormatOrString","ClipFmt","parse_ClipboardFormatOrAnsiString","parse_ClipboardFormatOrUnicodeString","VT_I2","VT_I4","VT_BOOL","VT_VARIANT","VT_UI4","VT_FILETIME","VT_BLOB","VT_CF","VT_VECTOR_VARIANT","VT_VECTOR_LPSTR","VT_STRING","VT_USTR","VT_CUSTOM","DocSummaryPIDDSI","SummaryPIDSI","CountryEnum","XLSFillPattern","rgbify","_XLSIcv","RBErr","ct2type","new_ct","parse_ct","ctext","RELS","get_rels_path","parse_rels","currentFilePath","rels","rel","canonictarget","CT_ODS","parse_manifest","FEtag","CORE_PROPS","CORE_PROPS_REGEX","parse_core_props","EXT_PROPS","load_props_pairs","HP","TOP","hp","parse_ext_props","xml","custregex","parse_cust_props","toks","XLMLDocPropsMap","evert_XLMLDPM","xlml_set_prop","parse_FILETIME","dwLowDateTime","dwHighDateTime","parse_lpstr","pad","parse_lpwstr","parse_VtStringBase","stringType","parse_VtString","parse_VtUnalignedString","parse_VtVecLpwstrValue","parse_VtVecUnalignedLpstrValue","parse_VtHeadingPair","headingString","parse_TypedPropertyValue","headerParts","parse_VtVecHeadingPairValue","cElements","parse_dictionary","CodePage","dict","pid","parse_BLOB","parse_ClipboardData","parse_PropertySet","PIDSI","start_addr","NumProps","Dictionary","DictObj","PropID","Offset","PropH","fail","piddsi","oldpos","parsebool","parse_PropertySetStream","clsid","NumSets","FMTID0","FMTID1","Offset0","Offset1","SystemIdentifier","CLSID","PSet0","rval","PSet1","parsenoop2","parslurp","parseuint16","parseuint16a","parse_Bes","parse_ShortXLUnicodeString","cch","encoding","fHighByte","parse_XLUnicodeRichExtendedString","fExtSt","fRichSt","cRun","cbExtRst","parse_XLUnicodeStringNoCch","parse_XLUnicodeString","parse_XLUnicodeString2","parse_ControlInfo","accel","parse_URLMoniker","parse_FileMoniker","cAnti","preamble","ansiPath","unicodePath","parse_HyperlinkMoniker","parse_HyperlinkString","parse_Hyperlink","sVer","displayName","targetFrameName","moniker","oleMoniker","Loc","guid","fileTime","parse_LongRGBA","parse_LongRGB","parse_XLSCell","rw","ixfe","parse_frtHeader","parse_OptXLUnicodeString","parse_XTI","iSupBook","itabFirst","itabLast","parse_RkRec","parse_AddinUdf","udfName","parse_Ref8U","rwFirst","rwLast","colFirst","colLast","parse_RefU","parse_Ref","parse_FtCmo","parse_FtNts","parse_FtCf","parse_FtSkip","FtTab","parse_FtArray","fts","parse_BOF","parse_InterfaceHdr","parse_WriteAccess","UserName","parse_WsBool","parse_BoundSheet8","hidden","parse_SST","ucnt","strs","parse_ExtSST","extsst","parse_Row","miyRw","parse_ForceFullCalculation","fullcalc","parse_RecalcId","parse_DefaultRowHeight","parse_Window1","xWn","yWn","dxWn","dyWn","iTabCur","iTabFirst","ctabSel","wTabRatio","parse_Window2","parse_Pane","parse_Font","parse_LabelSst","parse_Label","parse_Format","numFmtId","fmtstr","parse_BIFF2Format","parse_Dimensions","parse_RK","rkrec","parse_MulRk","rkrecs","lastcol","parse_MulBlank","ixfes","parse_CellStyleXF","parse_XF","parse_Guts","parse_BoolErr","parse_Number","xnum","parse_XLHeaderFooter","parse_SupBook","ctab","virtPath","rgst","parse_ExternName","XLSLblBuiltIn","parse_Lbl","chKey","cce","itab","npflen","rgce","parse_NameParsedFormula","parse_ExternSheet","parse_BIFF5ExternSheet","parse_NameCmt","cchName","cchComment","comment","parse_ShrFmla","cUse","parse_SharedParsedFormula","parse_Array","parse_ArrayParsedFormula","parse_MTRSettings","fMTREnabled","fUserSetThreadCount","cUserThreadCount","parse_NoteSh","idObj","stAuthor","parse_Note","parse_MergeCells","merges","cmcs","parse_Obj","parse_BIFF5Obj","cmo","parse_BIFF5OT","cf","grbit","parse_TxO","texts","controlInfo","cchText","hdr","parse_HLink","hlink","parse_HLinkTooltip","wzTooltip","parse_Country","parse_ClrtClient","ccv","parse_Palette","parse_XFCRC","parse_ColInfo","coldx","parse_Setup","parse_ShtProps","parse_Blank","parse_Scl","parse_String","parse_ImData","lcb","parse_BIFF2STR","parse_BIFF2NUM","parse_BIFF2INT","parse_BIFF2STRING","parse_BIFF2FONTXTRA","parse_RString","DBF_SUPPORTED_VERSIONS","DBF","dbf_codepage_map","dbf_reverse_map","dbf_to_aoa","vfp","l7","nrow","fpos","rlen","current_cp","hend","dbf_to_sheet","dbf_to_workbook","_RLEN","sheet_to_dbf","aoa","sheet_to_json","cols","hcnt","coltypes","colwidths","coldecimals","guess","_guess","hf","hb","rout","_s","SYLK","sylk_escapes","sylk_char_regex","sylk_char_fn","decode_sylk_char","newcc","sylk_to_aoa","sylk_to_aoa_str","records","rj","next_cell_format","sht","rowinfo","colinfo","cw","Mval","rstr","C_seen_K","C_seen_X","C_seen_S","C_seen_E","formula","rc_to_a1","shrbase","shift_formula_str","F_seen","process_col","pt2px","sylk_to_sheet","aoasht","sylk_to_workbook","write_ws_cell_sylk","a1_to_rc","write_ws_cols_sylk","rec","width2px","px2char","write_ws_rows_sylk","px2pt","sheet_to_sylk","RS","coord","DIF","dif_to_aoa","dif_to_aoa_str","dif_to_sheet","dif_to_workbook","sheet_to_dif","push_field","topic","push_value","ETH","encode","eth_to_aoa","eth_to_sheet","eth_to_workbook","sep","sheet_to_eth_data","sheet_to_eth","PRN","set_text_arr","prn_to_aoa_str","guess_seps","guess_sep_weights","guess_sep","instr","dsv_to_sheet_str","sepcc","startcc","_re","finish_cell","fuzzyfmla","prn_to_sheet_str","prn_to_sheet","firstbyte","prn_to_workbook","sheet_to_prn","read_wb_ID","OLD_WTF","WK_","lotushopper","Enum","WK1Enum","lotus_to_workbook","lotus_to_workbook_buf","next_n","sidx","snames","realnames","refguess","sheetRows","tmpcell","WK3Enum","osheets","rnames","sheet_to_wk1","write_biff_rec","write_BOF_WK1","write_RANGE","max_R","write_INTEGER","write_NUMBER","write_LABEL","book_to_wk3","wb","write_BOF_WK3","write_XFORMAT_SHEETNAME","wsidx","write_NUMBER_17","write_LABEL_16","wscnt","parse_RANGE","parse_cell","parse_LABEL","parse_INTEGER","parse_NUMBER","parse_FORMULA","wk1_fmla_to_csf","wk1_parse_rc","FuncTab","BinOpTab","argc","argL","argR","parse_cell_3","parse_LABEL_16","parse_NUMBER_18","parse_NUMBER_17","parse_FORMULA_19","parse_NUMBER_25","parse_NUMBER_27","parse_FORMULA_28","parse_SHEETNAMECS","parse_SHEETNAMELP","parse_SHEETINFOQP","parse_XFORMAT","parse_rpr","rpr","parse_rs","tregex","rpregex","parse_r","rregex","rend","rs","rs_to_html","nlregex","parse_rpr2","intro","outro","r_to_html","terms","sitregex","sirregex","sirphregex","parse_si","sstr0","sstr1","sstr2","parse_sst_xml","sst","parse_BrtBeginSst","parse_sst_bin","_JS2ANSI","parse_CRYPTOVersion","parse_DataSpaceVersionInfo","parse_DataSpaceMapEntry","comps","parse_DataSpaceMap","parse_DataSpaceDefinition","parse_TransformInfoHeader","parse_Primary","parse_EncryptionHeader","parse_EncryptionVerifier","parse_EncryptionInfo","vers","parse_EncInfoStd","parse_EncInfoExt","parse_EncInfoAgl","verifier","KeyData","parse_RC4CryptoHeader","parse_RC4Header","crypto_CreatePasswordVerifier_Method1","Password","Verifier","PasswordArray","PasswordDecoded","PasswordByte","Intermediate1","Intermediate2","Intermediate3","crypto_CreateXorArray_Method1","PadArray","InitialCode","XorMatrix","Ror","Byte","XorRor","byte1","byte2","CreateXorKey_Method1","XorKey","CurrentElement","Char","password","Index","ObfuscationArray","Temp","PasswordLastChar","PadIndex","crypto_DecryptData_Method1","Data","XorArrayIndex","XorArray","Value","crypto_MakeXorDecryptor","parse_XORObfuscation","parse_FilePassHeader","parse_FilePass","RTF","rtf_to_sheet","rtf_to_sheet_str","rowtf","rtfre","last_index","rtf_to_workbook","sheet_to_rtf","hex2RGB","rgb2HSL","H6","L2","hsl2RGB","hsl","h6","rgb_tint","tint","DEF_MDW","MAX_MDW","MIN_MDW","MDW","px","char2width","chr","cycle_width","collw","find_mdw_colw","_MDW","coll","DEF_PPI","PPI","XLMLPatternTypeMap","parse_borders","themes","parse_fills","parse_fonts","parse_numFmts","cellXF_uint","cellXF_bool","parse_cellXfs","xf","parse_sty_xml","numFmtRegex","cellXfRegex","fillsRegex","fontsRegex","bordersRegex","parse_BrtFmt","stFmtCode","parse_BrtFont","bls","underline","family","bCharSet","parse_BrtFill","parse_BrtXF","ixfeParent","ifmt","parse_BrtBorder","parse_sty_bin","XLSXThemeClrScheme","parse_clrScheme","parse_fontScheme","parse_fmtScheme","clrsregex","fntsregex","fmtsregex","parse_themeElements","themeltregex","parse_theme_xml","write_theme","Themes","parse_Theme","dwThemeVersion","themeXML","parse_ColorTheme","parse_FullColorExt","parse_IcvXF","parse_XFExtGradient","parse_ExtProp","extType","parse_XFExt","cexts","update_xfext","xfext","xfe","parse_BrtMdtinfo","parse_BrtMdb","parse_BrtBeginEsmdb","parse_xlmeta_bin","metatype","parse_xlmeta_xml","lastmeta","parse_cc_xml","parse_BrtCalcChainItem$","parse_cc_bin","parse_xlink_bin","parse_drawing","sheet_insert_comments","comments","threaded","people","parse_comments_xml","authors","commentList","authtag","cmnttag","cm","textMatch","parse_tcmnt_xml","tidx","parse_people_xml","parse_BrtBeginComment","rfx","parse_BrtCommentAuthor","parse_comments_bin","CT_VBA","make_vba_xls","newcfb","newpath","parse_ds_bin","parse_ds_xml","parse_ms_bin","parse_ms_xml","rcregex","rcbase","rcfunc","cRel","rRel","fstr","crefregex","$0","$4","$5","shift_formula_xlsx","_xlfn","parseread1","parse_ColRelU","parse_RgceArea","parse_RgceArea_BIFF2","parse_RgceAreaRel","parse_RgceLoc","parse_RgceLoc_BIFF2","parse_RgceElfLoc","parse_RgceLocRel","parse_RgceLocRel_BIFF2","parse_PtgArea","parse_PtgArea3d","ixti","parse_PtgAreaErr","parse_PtgAreaErr3d","parse_PtgAreaN","parse_PtgArray","parse_PtgAttrBaxcel","bitSemi","bitBaxcel","parse_PtgAttrChoose","parse_PtgAttrGoto","bitGoto","parse_PtgAttrIf","bitIf","parse_PtgAttrIfError","parse_PtgAttrSemi","parse_PtgAttrSpaceType","parse_PtgAttrSpace","parse_PtgAttrSpaceSemi","parse_PtgRef","parse_PtgRefN","parse_PtgRef3d","parse_PtgFunc","iftab","FtabArgc","Ftab","parse_PtgFuncVar","cparams","parsetab","Cetab","parse_PtgAttrSum","parse_PtgExp","parse_PtgErr","parse_PtgInt","parse_PtgBool","parse_PtgNum","parse_PtgStr","parse_SerAr","parse_PtgExtraMem","parse_PtgExtraArray","parse_PtgName","nameindex","parse_PtgNameX","parse_PtgNameX_BIFF5","parse_PtgMemArea","parse_PtgMemFunc","parse_PtgRefErr","parse_PtgRefErr3d","parse_PtgMemErr","parse_PtgMemNoMem","parse_PtgTbl","parse_PtgElfLoc","parse_PtgElfNoop","parse_PtgElfCol","parse_PtgElfColS","parse_PtgElfColSV","parse_PtgElfColV","parse_PtgElfLel","parse_PtgElfRadical","parse_PtgElfRadicalLel","parse_PtgElfRadicalS","parse_PtgElfRw","parse_PtgElfRwV","PtgListRT","parse_PtgList","parse_PtgSxName","parse_PtgSheet","parse_PtgEndSheet","parse_PtgMemAreaN","parse_PtgMemNoMemN","parse_PtgAttrNoop","PtgTypes","PtgDupes","Ptg18","Ptg19","parse_RgbExtra","parse_Rgce","ptgs","stringify_array","PtgBinOp","formula_quote_sheet_name","sname","get_ixti_raw","supbooks","XTI","get_ixti","ixtiraw","stringify_formula","nameidx","last_sp","sp","fflen","lbl","bookidx","externbook","ixtidata","lp","rp","parsedf","fnd","PtgNonDisp","_left","rgcb","parse_XLSCellParsedFormula","parse_FormulaValue","parse_Formula","cbf","parse_XLSBParsedFormula","parse_XLSBArrayParsedFormula","parse_XLSBCellParsedFormula","parse_XLSBNameParsedFormula","parse_XLSBSharedParsedFormula","ods_to_csf_formula","ods_to_csf_3D","_ssfopts","default_margins","defs","safe_format","fmtid","fillid","parse_ws_xml_dim","mergecregex","sheetdataregex","hlinkregex","dimregex","colregex","afregex","marginregex","sheetprregex","sheetprregex2","svsregex","parse_ws_xml","data1","data2","mtch","sheetPr","parse_ws_xml_sheetpr","parse_ws_xml_sheetpr2","svs","parse_ws_xml_sheetviews","parse_ws_xml_cols","parse_ws_xml_data","afilter","parse_ws_xml_autofilter","_merge","parse_ws_xml_hlinks","parse_ws_xml_margins","tmpref","rng","seencol","coli","colm","colM","sviewregex","cellregex","rowregex","isregex","refregex","match_v","match_f","sdata","cells","cref","tagr","tagc","sstr","ftag","do_format","arrayf","sharedf","rowobj","rowrite","sheetStubs","marr","marrlen","xlen","rstarti","outa","rslice","___f","_tag","parse_BrtRowHdr","parse_BrtWsDim","parse_BrtWsFmtInfo","parse_BrtWsProp","parse_BrtCellBlank","parse_BrtShortBlank","parse_BrtCellBool","fBool","parse_BrtShortBool","parse_BrtCellError","bError","parse_BrtShortError","parse_BrtCellIsst","isst","parse_BrtShortIsst","parse_BrtCellReal","parse_BrtShortReal","parse_BrtCellRk","parse_BrtShortRk","parse_BrtCellRString","parse_BrtCellSt","parse_BrtShortSt","parse_BrtFmlaBool","parse_BrtFmlaError","parse_BrtFmlaNum","parse_BrtFmlaString","parse_BrtMergeCell","parse_BrtHLink","relId","parse_BrtPane","parse_BrtArrFmla","fAlwaysCalc","parse_BrtShrFmla","BrtMarginKeys","parse_BrtMargins","parse_BrtBeginWsView","parse_BrtDVal","parse_BrtDVal14","parse_ws_bin","ai","af","RR","aii","parse_Cache","nf","parse_chart","csheet","nc","parse_cs_xml","parse_BrtCsProp","parse_cs_bin","WBPropsDef","WBViewDef","SheetDef","CalcPrDef","push_defaults_array","push_defaults","parse_wb_defaults","badchars","check_ws_name","_good","wbnsregex","parse_wb_xml","xmlns","dname","dnstart","parse_BrtBundleSh","parse_BrtWbProp","strName","parse_BrtFRTArchID$","parse_BrtName","parse_wb_bin","Names","parse_wb","parse_ws","parse_cs","parse_ms","parse_ds","parse_sty","parse_theme","parse_sst","parse_cmnt","parse_cc","parse_xlink","parse_xlmeta","attregexg2","attregex2","xlml_parsexmltag","words","xlml_parsexmltagobj","XLMLFormatMap","xlml_format","xlml_set_custprop","Custprops","oval","safe_format_xlml","process_style_xlml","stag","parse_xlml_data","csty","sid","interiors","xlml_clean_comment","parse_xlml_xml","opening","ishtml","_o","html_to_workbook","sheetnames","cursheet","sheetname","dtag","didx","fidx","pidx","cstys","Workbook","wsprops","raw_Rn3","cma","cmd","ssfidx","_col","_NamedRange","_DefinedName","AutoFilter","parse_fods","pagemargins","parse_xlml","fix_read_opts","parse_compobj","CONTINUE_RT","slurp","RecordType","nextrt","XLSRecordEnum","safe_format_xf","make_cell","parse_workbook","Sheets","Directory","last_formula","cur_sheet","Preamble","lastcell","last_cell","cmnt","rngC","rngR","temp_val","country","XFs","palette","get_rgb","process_cell_style","xfd","addcell","file_depth","afi","last_RT","BIFF2Fmt","BIFF2FmtTable","FilterDatabases","last_lbl","seen_codepage","cpval","tmpri","fakebs8","_fr","_fc","_fe","_arraystart","_j","_ixfe","b4idx","b2idx","noteobj","PSCLSID","parse_xls_props","DSI","DocSummary","SI","Summary","parse_xlscfb","CompObj","WB","WorkbookP","html_to_sheet","mtch2","CS","hd","midx","make_html_row","HTML_BEGIN","HTML_END","book_new","book_append_sheet","make_html_preamble","sheet_to_html","sheet_add_dom","or_R","or_C","is_dom_element_hidden","elts","Aelts","Aelti","parse_dom_table","table_to_book","get_computed_style","get_get_computed_style_function","parse_text_p","fixed","number_formats_ods","parse_content_xml","NFtag","NF","sheetag","rowtag","SheetNames","ctag","textp","textpidx","textR","row_ol","number_format_map","mrange","mR","mC","rowpeat","colpeat","atag","_Ref","creatoridx","isstub","intable","rptR","rpt","nrange","ptp","parse_ods","u8_to_dataview","u8str","u8","u8concat","u8a","popcnt","readDecimal128LE","mantissa","parse_varint49","ptr","varint","varint_to_i32","i32","parse_shallow","mappa","parse_iwa_file","mi","parse_snappy_chunk","chunks","decompress_iwa_file","parse_old_storage","rsst","dv","data_offset","ieee","parse_new_storage","d128","parse_cell_storage","parse_TSP_Reference","pb","parse_TST_TableDataList","rtp","rtpref","mtype","tswpsa","parse_TST_TileRowInfo","_k","_m","wide_offsets","used_storage_u8","used_storage","used_storage_offsets","parse_TST_Tile","parse_TST_TableModelArchive","tile","_tile","parse_TST_TableInfoArchive","tableref","parse_TN_SheetArchive","shapeoffs","parse_TN_DocumentArchive","sheetoffs","parse_numbers_iwa","indices","packets","packet","docroot","iwam","fix_opts_func","get_sheet_type","safe_parse_wbrels","wbrels","safe_parse_sheet","relsPath","sheetRels","stype","dfile","drelsp","chartp","crelsp","tcomments","strip_front_slash","_zip","xlsb","binname","propdata","custprops","deps","wbsheets","wbext","wbrelsi","wbrelsfile","nmode","wsloop","snjseen","snj","parse_xlsxcfb","dsm","seds","einfo","read_cfb","read_zip","read_plaintext","read_plaintext_raw","read_utf16","bstrify","read_prn","readSync","ab","vu","make_json_row","defval","isempty","outi","header_cnt","qreg","make_csv_row","FS","txt","sheet_to_csv","endregex","sheet_to_txt","sheet_to_formulae","cmds","sheet_add_json","js","JS","ws_get_cell_stub","json_to_sheet","RC","wb_sheet_idx","sh","roll","book_set_sheet_visibility","vis","cell_set_number_format","cell_set_hyperlink","cell_set_internal_link","cell_add_comment","author","sheet_set_array_formula","dynamic","rngstr","utils","xlsxToCsv","xlsxFile","workbook","XLSX.read","worksheet","XLSX.utils","CohortLearnersApi","learnerIds","cohortLearnersApi","useCohortLearnerAddition","isAddingLearners","getColumnValue","normalizeLabel","useSuggestedFieldOptions","getSuggestedOption","valueMatch","labelMatch","bestMatch","useCsvPreview","previewer","previewResults","previewError","isLoadingPreview","previewData","previewColumns","previewCsvData","preloadedCsvFile","learnersToAdd","setLearnersToAdd","setMappedOption","dynamicSteps","isProcessingCsvFile","isShowingMetadataFieldModal","showMetadataFieldModal","hideMetadataFieldModal","indexForNewMetadataField","createMetadataFieldForIndex","cancelMetadataFieldCreation","processMetadataFieldCreation","addLearnersToCohort","continueFromUploadStep","continueFromColumnMappingStep","clearFileAndStartOver","useCohortLearnerRemoval","learnersToRemove","numLearnersToRemove","hasLearnersToRemove","isRemovingLearners","setLearnersToRemove","clearLearnersToRemove","removeLearnersFromCohort","totalLearners","loadLearners","loadLearnersForPage","reloadLearners","isLoadingLearners","isUploadErrorsModalOpen","showUploadErrorsModal","hideUploadErrorsModal","toggleAllLearners","cancelLearnerRemoval","confirmLearnerRemoval","goToViewLearner","addLearners","downloadLearners","actor","isUser","useInfiniteScroll","clientHeight","scrollHeight","CohortLog","CohortLogsApi","cohortLogsApi","logs","loadLogs","loadMoreLogs","isLoadingLogs","downloadLogs","useCohortEditing","isUpdatingCohort","updateCohort","learnersOverview","loadCohort","isShowingEditCohort","showEditCohort","hideEditCohort","isShowingEditRules","editRules","cancelEditRules","isShowingAddLearnersPanel","showAddLearnersPanel","hideAddLearnersPanel","confirmEditCohort","cancelLearnerAddition","confirmLearnerAddition","goToSchedulesOverviewForCohort","Tag","GlobalTagsApi","globalTagsApi","useGlobalTags","setGlobalTags","isLoadingGlobalTags","activeFilter","loadGlobalTags","selectedGlobalTags","globalTag","selectedOrgTags","orgTag","updateGlobalTags","globalTagValues","updateOrgTags","orgTagValues","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","construct","fun","thisValue","Func","arrayForEach","unapply","arrayPop","arrayPush","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","_len2","_key2","addToSet","transformCaseFunc","lcElement","cleanArray","newObject","lookupGetter","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","svg","mathMl","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","ATTR_NAME","policyName","scriptUrl","createDOMPurify","DOMPurify","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","NodeFilter","NamedNodeMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","getNextSibling","getChildNodes","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","tagName","parentTagName","_forceRemove","_removeAttribute","_initDocument","dirty","leadingWhitespace","dirtyPayload","_createNodeIterator","_isClobbered","elm","_isNode","_executeHook","entryPoint","_sanitizeElements","_isBasicCustomElement","childNodes","childCount","childClone","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","hookEvent","namespaceURI","attrValue","_sanitizeShadowDOM","shadowNode","shadowIterator","importedNode","returnNode","nodeIterator","serializedHTML","hookFunction","purify","_getDefaults","_defaults","changeDefaults","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape$1","edit","valSource","cleanUrl","noopTest","splitCells","tableRow","escaped","rtrim","invert","suffLen","currChar","findClosingBracket","outputLink","cap","lexer","indentCodeCompensation","matchIndentToCode","indentToCode","matchIndentInNode","indentInNode","_Tokenizer","trimmed","inBlockquote","currentLines","currentRaw","currentText","lastToken","oldToken","newText","newToken","bull","isordered","itemRegex","endsWithBlankLine","endEarly","itemContents","nextLine","blankLine","indent","nextBulletRegex","hrRegex","fencesBeginRegex","headingBeginRegex","htmlBeginRegex","rawLine","nextLineWithoutTabs","istask","ischecked","spacers","hasMultipleLineBreaks","aligns","trimmedUrl","rtrimSlash","lastParenIndex","linkLen","links","linkString","maskedSrc","prevChar","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","lastCharLength","hasNonSpaceChars","hasSpaceCharsOnBothEnds","prevCapZero","newline","blockCode","fences","heading","bullet","lheading","_paragraph","blockText","_blockLabel","_comment","paragraph","blockquote","blockNormal","gfmTable","blockGfm","blockPedantic","escape","inlineCode","inlineText","_punctuation","punctuation","blockSkip","emStrongLDelim","emStrongRDelimAst","emStrongRDelimUnd","anyPunctuation","autolink","_inlineComment","_inlineLabel","reflink","nolink","reflinkSearch","inlineNormal","inlinePedantic","inlineGfm","inlineBreaks","_Lexer","lastParagraphClipped","cutSrc","extTokenizer","startIndex","tempSrc","tempStart","getStartIndex","errMsg","keepPrevChar","_Renderer","langString","ordered","startAttr","itemBody","checkbox","checked","cleanHref","_TextRenderer","_Parser","anyToken","genericToken","textToken","_Hooks","markdown","Marked","tableToken","listToken","childTokens","pack","prevRenderer","extLevel","rendererProp","rendererFunc","tokenizer","tokenizerProp","tokenizerFunc","prevTokenizer","hooksProp","hooksFunc","prevHook","walkTokens","packWalktokens","blockType","origOpt","throwError","async","markedInstance","marked","defaultAllowedTags","allowedTags","sanitized","CourseCatalogApi","courseCatalogApi","goToCourseCatalogView","schedules","goToCourseCatalogOverview","distribution","isRendered","devToolsPanel","devToolsToggle","example","aiCourseCreationFlowSteps","aiCourseCreationMethods","aiSuggestionTypes","aiTaskTypes","aiTaskStatuses","aiSourceMaterialFileTypes","aiCourseCreationLanguageOptions","LLMTask","LLMServicesApi","substepId","substepType","trainingType","documentId","llmServicesApi","useModelRefs","useToggleDebounced","conditionFn","toggleDebounced","useDelay","defaultDelay","useDocumentStatus","documentStatus","documentMessage","documentCharacterCount","isCancelled","resetDocumentStatus","checkDocumentStatus","attempt","useAIUrlDocumentUpload","isProcessingSourceUrl","sourceUrlMessage","sourceUrlStatus","sourceUrlSuccess","sourceUrlError","cancelCheckingDocumentStatus","sourceUrl","useAIDocumentUpload","uploadProgress","isUploading","isUploadFinished","uploadMessage","uploadStatus","uploadSuccess","uploadError","abortUpload","updateFileUploadState","uploadDocument","useAISuggestions","sourceData","suggestions","isLoadingSuggestions","isErrorLoadingSuggestions","loadSuggestions","loadDebounced","isForMarketing","isQueueingOutlineGeneration","isQueueingCourseGeneration","uploadDocumentFromUrl","cancelSourceUrlProcessing","updateSourceUrl","processUrl","audience","expertise","expertiseCustom","objective","knowledge","numLessons","targetLanguage","documents","fileDocs","urlDocs","isCustomExpertise","hasExpertise","showAudience","showObjective","showKnowledge","showLessons","showUpload","showFiller","scrollToBottom","scrollToBottomDebounced","isTestFill","objectiveSuggestions","loadObjectiveSuggestions","isLoadingObjectiveSuggestions","knowledgeSuggestions","loadKnowledgeSuggestions","isLoadingKnowledgeSuggestions","docCharCount","totalCharCount","isOverSourceMaterialLimit","fileSelect","uploadQueue","currentUpload","addFilesToQueue","uploadNextFileInQueue","removeFileFromQueue","cancelFileUpload","uploadFile","upload","removeDocument","testFillOutForm","hideDevTools","limitedText","limited","isShowingText","LLMTasksApi","outline","llmTasksApi","useStatusProgress","stepNo","isComplete","useAiTaskStatus","autoStartChecking","resultTimeout","isOverloaded","checkStatus","stopCheckingStatus","checkInterval","startCheckingStatus","getResultPromise","taskTimeout","headerText","subheaderText","useSavingFlags","outlineGenerationTask","toggleSaved","toggleSaving","clearSavingFlags","updateTaskInBackground","updateOutline","courseGenerationTask","useAiTaskLoader","isLoadingLlmTask","llmTask","loadLlmTask","CourseSubstepAnswer","CourseSubstep","answers","answer","combinedCaracterLimit","isActivation","isPassive","successResponse","failureResponse","aiEvaluatedExampleAnswer","hasEnoughCorrectAnswers","appendToSubstep","choice","correctIndex","CourseStep","videoUrl","substeps","Schedule","Course","lesson","CoursesApi","isFavorite","folderId","coursesApi","callApiMethod","useAICourseCreation","models","queueOutlineGeneration","goToCoursesOverview","goToEditCourse","queueCourseGeneration","moveCourseToFolder","canGoBackFromOutlineStep","continueFromDescribeStep","continueFromReviewStep","continueFromOutlineStep","goBackFromOutlineStep","autoLoad","autoLoadedCourses","loadCourses","isLoadingWithoutOptions","isAutoLoading","useAiTaskStatuses","tasks","taskStatuses","taskInstance","taskStatus","progressSum","hasSomeErrors","courseIds","courseGenerationTasks","hasMultiple","combinedTasksArray","continueFromTranslateStep","sourceCourseId","isLoadingCourses","VideoApi","videoKey","videoApi","useVideoSource","isVideoKey","videoSrc","useVideo","videoWidth","videoHeight","videoDuration","videoRatio","videoElement","useImageUpload","getTestUuid","bucket","signedUrl","generateImageKey","prepareForUpload","uploadToTempBucket","generateSignedUrl","processImage","checkProcessingStatus","useVideoUpload","previewKey","generateVideoKey","processVideo","processFile","clearUpload","useDedicatedSmsAddress","isRequestingDedicatedSmsAddress","isEnablingDedicatedSmsAddress","preferredSmsAddress","dedicatedSmsAddress","hasPreferredSmsAddress","hasDedicatedSmsAddress","isDedicatedSmsAddressEnabled","requestDedicatedSmsAddress","enableDedicatedSmsAddress","useThumbnailExtraction","thumbnailTime","extractThumbnail","isExtractingThumbnail","currentTime","barPosition","videoCard","isVideoReady","updateVideoTime","setInitialVideoTime","handleMouseMove","newBarPosition","handleMouseUp","handleMouseDown","getVideoElementRef","updateThumbnail","useCourseValidation","existingCourse","isCheckingCourseExists","checkCourseExists","checkCourseExistsDebounced","uniqueExternalId","externalId","ContentType","ContentTypesApi","contentTypesApi","useContentTypes","setContentTypes","isLoadingContentTypes","TagsApi","tagsApi","useOrganizationTags","includeGlobal","setOrganizationTags","isLoadingOrganizationTags","UrlsApi","urlsApi","useVideoUrlMetadata","useVideoUrlValidation","activationStep","activationSubstep","activationSubstepBody","updateActivationMessage","fetchVideoUrlMetadata","hasVideoUrlError","clearVideoUrlError","isLoadingUrlMetadata","mediaOptions","isMediaUpload","isUploadingMedia","isValidVideoUrl","updateStep","modelData","validateFileSize","extractMetadata","clearVideoMetadata","toggleMediaUploadType","isShowingThumbnailModal","showThumbnailModal","hideThumbnailModal","saveThumbnail","loadOrganizationTags","loadContentTypes","useCourseContentChecks","relevantSteps","hasConfidenceLift","hasNpsSurvey","hasLearnerSentiment","canAddConfidenceLift","canAddNpsSurvey","canAddLearnerSentiment","canAddSurveyType","canAddRatingQuestion","addContentPanel","addContentToggle","addStep","addSubstep","draggableSteps","canCollapse","substepIndex","updateSubstep","answerIndex","canAddAnswer","updateAnswers","newAnswers","toggleMultiSelect","addAnswer","removeAnswer","updateAnswer","draggableAnswers","useCollapsible","isInitiallyCollapsed","isCollapsed","afterCollapseHook","afterExpandHook","beforeCollapseHook","beforeExpandHook","onCollapse","onExpand","beforeCollapse","beforeExpand","collapse","expand","SubstepComponent","SubstepMultipleChoice","SubstepAiEvaluated","SubstepSingleResponse","passiveSubstep","firstQuestion","showWarning","surveySubsteps","focusOnLastQuestion","copySubstep","draggableSubsteps","questions","startDragSubstep","stepBlock","substepBlocks","surveySubstepBlocks","baselineConfidenceBlock","focusOnSubstep","useCourseSubstepOptimization","optimizedSubstep","isOptimizing","optimizeSubstep","optimize","useCourseSubstepGeneration","generatedSubstep","isGenerating","generateSubstep","openLink","translationTypes","TranslationsApi","translationsApi","useTranslations","translations","useItemToRemove","itemToRemove","contextForItemToRemove","useCourseStepManagement","createStep","copyStep","trashStep","createSubstep","trashSubstep","appendSubstepToStep","removeSubstepFromStep","extractSurveySubsteps","remainingSubsteps","otherSteps","lessons","activeLessons","firstStep","lastStep","otherSubsteps","baseName","sequencedRegex","nonSequencedRegex","sequenced","maxSequence","isNewCourse","firstLesson","lastLesson","setIsUploadingMedia","updateShowSenderIdWarning","stepBlocks","getStepBlock","expandStep","focusOnStep","isShowingRemoveWarning","showRemoveWarning","hideRemoveWarning","isShowingSenderIdWarning","showSenderIdWarning","hideShowSenderIdWarning","highlightedStep","determineHighlightedStep","applyTranslationsToSubstep","getNewStepCopyName","updateSteps","saveInBackground","stepToRemove","setStepToRemove","clearStepToRemove","substepToRemove","setSubstepToRemove","clearSubstepToRemove","substepToRemoveParentStep","doAddStep","doCopyStep","doUpdateStep","checkIfCanRemoveStep","cantRemoveReason","doRemoveStep","confirmStepRemoval","doAddSubstep","doAddSurveySubstep","doMoveSubstep","targetStep","currentStep","isConfidenceLift","newStep","doCopySubstep","doUpdateSubstep","doReplaceSubstep","modifiedSubstep","doRemoveSubstep","processSubstepRemoval","confirmSubstepRemoval","substepToGenerate","doGenerateSubstep","clearSubstepToGenerate","substepToOptimize","doOptimizeSubstep","clearSubstepToOptimize","isDraggingQuestions","startedDraggingQuestions","stoppedDraggingQuestions","nudgeStep","nudgeSubstep","updateNudgeMessage","updateData","citation","citations","addCitation","updateCitation","removeCitation","loadRef","originalScrollTop","CommonLearnersApi","commonLearnersApi","loadMoreLearners","hasLoadedAllLearners","debouncedSearch","usePreviewCourseCreation","isCreatingEnrollments","channels","missingAddressCount","noValidAddresses","limitedAddressOptions","missingAddressWarning","disableConfirm","createEnrollments","loadChannels","fetchMissingAddressCount","useCourseAuthor","useCourseEditing","sanitizeSteps","isSavingCourse","updateCourse","isNudge","isEditingDetails","isEditingLessons","loadCourse","canSchedule","saveCourse","requiresReview","updateModelAndSave","isInvalidState","isSavingDraft","saveDraft","saveDraftInBackground","goToScheduleCourse","goToModifyCourseWithAI","saveAndSchedule","showValidationErrorsWarning","goToStepIfValid","isShowingAIPrompts","showAIPrompts","hideAIPrompts","isShowingReferences","showReferences","hideReferences","isShowingPreview","isShowingValidationErrorsWarning","hideValidationErrorsWarning","substepBlock","detailsBlock","isDetailsBlockVisible","useCourseCreation","goToEditCourseLessons","saveAndEditLessons","customLabel","useElementBounding","elementRef","goToTranslateCourseWithAI","goToViewCourse","goToAnalyzeCourse","goToContentLibraryView","taskType","needsReview","goToBuildCourseWithAIGenerationStep","goToTranslateCourseWithAIGenerationStep","goToModifyCourseWithAIGenerationStep","view","isShowingArchived","isShowingFolders","goToCreateCourse","folder","isEdit","updateName","FoldersApi","Folder","foldersApi","targetFolder","allFolders","currentFolder","parentFolder","validFolders","invalid","findDescendants","folders","descendants","subFolder","isLoadingFolders","parentFoldersPath","lastParentFolder","queryFolders","loadChildFolders","goUpOneFolder","queryFoldersDebounced","closeModal","llmTasks","useCourseManagement","courseBeingArchived","courseBeingRestored","courseBeingOrganized","newCourse","useFolderManagement","folderBeingEdited","folderBeingViewed","folderBeingArchived","folderBeingRestored","folderBeingRemoved","folderBeingOrganized","folderPath","isSavingFolder","inBackground","useLLMTaskRemoval","llmTasksToRemove","numLLMTasksToRemove","hasLLMTasksToRemove","isRemovingLLMTasks","setLLMTasksToRemove","clearLLMTasksToRemove","removeLLMTasks","useUndoMoveFolderOrCourse","movedItem","movedFromFolderId","movedToTargetFolder","useCourseAndFolderQuerying","totalCourses","hasCourses","queryCourses","loadMoreCourses","isLoadingMoreCourses","addCourseToList","removeCourseFromList","sortCourses","filterForCourses","changeCoursesSearch","changeCoursesFilter","totalFolders","hasFolders","loadFolders","reloadFolders","removeFolderFromList","changeFoldersFilter","changeFoldersSearch","folderFilter","clearFilters","loadCoursesAndFolders","queryCoursesAndFolders","isLoadingCoursesAndFolders","isShowingCreateCourseModal","showCreateCourseModal","hideCreateCourseModal","isShowingCreateFolderModal","showCreateFolderModal","hideCreateFolderModal","isLoadingCoursesOrFolders","updateRoute","viewTab","filteredTab","clearSearchAndViewAll","hadSearchTerm","viewFolder","loadLlmTasks","llmTasksReloadTimeout","startLlmTasksReloadTimeout","currentIds","newIds","clearLlmTasksReloadTimeout","startDragCourse","startDrag","startDragFolder","trackMovedItem","doOrganizeCourse","doOrganizeFolder","setCourseBeingArchived","clearCourseBeingArchived","setCourseBeingRestored","clearCourseBeingRestored","setCourseBeingOrganized","clearCourseBeingOrganized","toggleFavoriteCourse","archiveCourse","restoreCourse","organizeCourse","cloneCourse","createTemplateFromCourse","emailCourse","doToggleFavoriteCourse","doArchiveCourse","doRestoreCourse","doCloneCourse","doCreateTemplateFromCourse","doEmailCourse","setFolderBeingEdited","clearFolderBeingEdited","setFolderBeingArchived","clearFolderBeingArchived","setFolderBeingRestored","clearFolderBeingRestored","setFolderBeingRemoved","clearFolderBeingRemoved","setFolderBeingOrganized","clearFolderBeingOrganized","setFolderBeingViewed","clearFolderBeingViewed","toggleFavoriteFolder","archiveFolder","restoreFolder","organizeFolder","createFolder","updateFolder","removeFolder","loadFolderPath","clearFolderPath","doToggleFavoriteFolder","doArchiveFolder","doRestoreFolder","doCreateFolder","doUpdateFolder","doRemoveFolder","forgetMovedItem","undoMoveItem","filteredFolderId","shouldShowLlmTasks","shouldShowCourses","shouldShowNewCourseCard","shouldShowFolders","shouldShowNewFolderCard","cancelLLMTaskRemoval","confirmLLMTaskRemoval","validation","errorsArray","nameErrors","deliveryTimeType","isDeliverAt","hour","meridiem","computedDateTime","timeString","hideDropdown","inputWrapper","isShowingDropdown","toggleDropdown","handleCancel","isConcluded","hasEnrollments","validationMessages","updateStartDate","newStartDate","updateDeliverAtTime","newDeliverAtTime","ignoreValidationErrors","errorMessages","backendErrors","TimeInput","FormField","FlexColumn","SelectInput","Spinner","newNumDays","relevantValidations","stepId","dayText","keysToIgnore","_component_FormField","_component_Spinner","_component_FlexColumn","_Fragment","_renderList","_component_Tooltip","_createElementVNode","_toDisplayString","_component_SelectInput","_component_DateInput","_component_TimeInput","showStartDatePassedWarning","disableStartDatePicker","combinedErrors","selectedDays","updateSelectedDays","newSelectedDays","SideBySide","_createCommentVNode","timeType","_normalizeClass","_component_SideBySide","LegacyDistributionsApi","legacyDistributionsApi","goToSchedulesOverview","goToEditSchedule","goToScheduleEnrollment","daysOfTheWeek","weekdays","isEditingDisabled","loading","newPreferredAddressType","newSelectedAddressTypes","prevPreferredAddressType","prevSelectedAddressTypes","saving","sawEmailWarning","showCourseSelect","fetchingSteps","scheduleType","whenToDeliver","cadence","promptReply","responseRemindersEnabled","includeWeekends","scheduleTypeOptions","whenToDeliverOptions","cadenceOptions","isShowingUnsavedChangesModal","isShowingPreferredDeliveryTypeModal","isShowingEmailWarningModal","isShowingEditWarningModal","isShowingErrorModal","hasSeenEditingWarning","currentDeliverAtTime","ianaZone","disableTimezoneSelect","disableScheduleType","hasWhatsappSelected","isScheduledByStep","dayOrDateSelection","singleDayOfWeek","selectedDay","dayOrDateOptions","filteredDays","skipStartDateValidations","currentDateTime","distributionCurrentStartDate","distributionNewStartDate","hasExistingPastStartDate","hasExistingPastStartDateAndTime","hasLessonsLessThanThreeHoursApart","nextStep","is_custom_by_step","is_relative_by_step","isCustomCondition","isRelativeCondition","stepDateTime","oldVal","enums","addressType","mapSelectedAddressTypesToDistribution","handleEditingToggle","confirmEditingWarningModal","hideEditingWarningModal","selectCourse","selectedCourse","fetchCourseSteps","updateSelectedAddressTypes","updateChannel","updateTimezone","updateUseUserTimezone","updateUseCohortTimezone","loadSetupData","setData","setStartDateOnSteps","updateStepStartDay","updateIncludeWeekends","startingIndex","updateResponseRemindersEnabled","updatePromptReplyBehavior","updateCadence","setCustomScheduleType","isSelectDates","updateScheduleType","updateWhenToDeliver","address_type","customScheduleType","handleStepStartDateUpdate","handleStepDeliverAtTimeUpdate","updateStepNumDays","clearStartDate","hideUnsavedChangesModal","confirmPreferredDeliveryTypeButton","cancelPreferredDeliveryTypeButton","revertPreferredDeliveryTypeAndSelectedAddresses","saveButton","submit","showErrorModal","isBinge","scheduleStart","scheduleEnd","deliverAt","continueButton","skipStepStartDateValidations","withDeliveryTime","stepCurrentStartDate","stepNewStartDate","hasSamePastStartDateWithEnrollment","is_concluded","useCurrentStartDate","deliverAtTime","timePart","handleStartDate","deliverAtDateTime","currentDT","courseStep","stepDT","courseStepDT","stopIndex","isNotFirstRelativeStep","previousStep","useCopyToClipboard","copyToClipboard","scheduleStatuses","scheduleTypes","scheduleStatusOptions","recipientStatusTabs","recipientStatusTabOptions","SchedulesApi","schedulesApi","schedule","cohortIds","individualIds","removedIds","selectedState","isLoadingEnrollmentSummary","enrollmentSummary","loadEnrollmentSummary","enrollmentSummaryData","setSelectedState","useDeliveryTimeValidation","existingSchedule","checkTime","goToScheduleDelivery","isShowingCustomScheduleModal","showCustomScheduleModal","hideCustomScheduleModal","isShowingTimezoneWarningModal","showTimezoneWarningModal","hideTimezoneWarningModal","isShowingManageRecipients","showManageRecipients","hideShowManageRecipients","isUpdatingStatus","codeEnabled","distributionCodeSuccessMessage","distributionCodeFailMessage","distributionCodeSuccessTimeout","providers","enrollCode","enrolledCohortIds","enrolledCohorts","enrolledLearnerIds","enrolledLearners","enabledAddressTypes","isEnrolling","removedLeanerIds","deliveryTime","disableCodeEnrollCopy","disableSharing","modifiedCode","disableEnrollButton","showTimeInput","alertText","showTeamsWarning","onlyLettersAndNumbers","enroll","handlePreferredAddressType","errorMsg","handleCodeInput","updateCodeDebounced","updateCode","handleCodeSuccess","toggleCodeEnabled","showOnHomepage","prioritizeEnrollment","downloadQRCode","handleLearnerSelect","selectedSet","handleCohortSelect","updateEnabledAt","handleTimezoneWarningModalClose","isCanceled","handleRemoveLearners","uniqueLearnerIds","isWithinRange","CountryCodesApi","countryCodesApi","countryCodes","isLoadingCountryCodes","useCountryCodes","loadCountryCodes","useLearnerCreation","isCreatingLearner","createLearner","addressTypeFriendly","addressErrors","updateAddressErrors","goToAnalyzeLearner","staticOnly","autoLoadedCohorts","useLearnerRemoval","removeLearners","isShowingAddPanel","showAddPanel","hideAddPanel","canShowDefault","addressLabel","addressTypeOption","yesNoOptions","useLearnerEditing","updateMetadata","updateAddress","metadataValuesMap","addressesMap","isUpdatingLearner","updateLearner","isoCountryCode","isDefault","LearnerAddressesApi","addressId","learnerAddressesApi","useLearnerAddressManagement","isAddingAddress","addAddress","isUpdatingAddress","isRemovingAddress","removeAddress","confirmRemoveAddress","newAddressType","newAddressModel","newAddressErrors","resetErrors","updateErrors","toggleAddAddress","forceSelectDefaultAddress","defaultAddressesOfType","defaultAddr","confirmAddAddress","addressesOfType","hasAddressesOfType","hasDefaultAddressesOfType","handleDefaultSelection","resetDefaultAddressesOfType","handleNewDefaultSelection","enrollmentActions","enrollmentStatuses","enrollmentActionOptions","enrollmentBulkActionsMap","enrollmentStatusOptions","enrollmentTableFilters","enrollmentTableStates","_Enrollment","Enrollment","LearnerEnrollmentsApi","enrollment","enrollmentIds","learnerEnrollmentsApi","useLearnerEnrollmentCreation","isCreatingEnrollment","createEnrollment","errorMessage","isLoadingSchedules","goToMyEnrollmentView","isGettingHelp","useQueueReordering","initialItems","hasChanges","orderedItems","resetOrder","useEnrollmentQueueEditing","isUpdatingQueue","enrollments","updateEnrollmentQueue","close","EnrollmentsApi","enrollmentsApi","useEnrollmentManagement","isStartingEnrollment","startEnrollment","isPausingEnrollment","pauseEnrollment","isResumingEnrollment","resumeEnrollment","isCancelingEnrollment","cancelEnrollment","isReEnrollingEnrollment","reEnrollEnrollment","isPrioritizingEnrollment","isRewindingEnrollment","rewindEnrollment","isResendingLastMessage","resendLastMessage","isSendingOptOutNotification","sendOptOutNotification","isCompletingEnrollment","useEnrollmentActions","completeEnrollment","selectedEnrollment","selectedEnrollmentAction","isPerformingSelectedEnrollmentAction","prepareEnrollmentAction","cancelEnrollmentAction","queuedItems","queuedEnrollments","totalQueuedEnrollments","loadQueuedEnrollments","reloadQueuedEnrollments","loadQueuedEnrollmentsForPage","isLoadingQueuedEnrollments","queuedCurrentPage","queuedItemsPerPage","queuedChangeItemsPerPage","performSelectedEnrollmentAction","isShowingManageQueuedModal","showManageQueuedModal","hideManageQueuedModal","manageQueue","closeModalAndReloadTable","performAction","totalEnrollments","loadEnrollments","reloadEnrollments","loadEnrollmentsForPage","isLoadingEnrollments","isShowingCreateEnrollmentModal","showCreateEnrollmentModal","hideCreateEnrollmentModal","enrollmentsTable","queuesTable","createdEnrollment","fieldsToShow","cohortsToShow","isShowingAllMetadataFields","showAllMetadataFields","additionalMetadataFields","hasMoreMetadataFields","displayedMetadataFields","isShowingAllCohorts","showAllCohorts","additionalCohorts","hasMoreCohorts","displayedCohorts","loadLearner","isShowingEditPanel","showEditPanel","hideEditPanel","reloadLearner","truncated","MyEnrollmentsApi","myEnrollmentsApi","replaceEnrollment","startOrStopEnrollment","useMyEnrollmentEditing","updateFeedback","isUpdatingEnrollment","updateEnrollment","isSubmittingFeedback","submitFeedback","isStartingOrStoppingEnrollment","goToMyEnrollmentsOverview","isLoadingEnrollment","loadEnrollment","viewMessage","setViewMessage","clearViewMessage","canExpand","useTimelineDatePosition","getDateIndex","startOffset","endOffset","cellWidth","getDateOffsets","getDateRangeOffsets","getDateStyle","getDateRangeStyle","useTimelineDates","startBuffer","endBuffer","groupedDates","currentGroup","monthYear","currentDatePosition","timelineWidth","useTimelineScroll","bufferIncrease","scrollThreshold","scrollThrottle","timelineEl","handleHorizontalScroll","scrollWidth","clientWidth","scrollRight","thresholdDistance","previousStartBuffer","addedWidth","scrollToCurrentDate","isInitialLoad","currentDateIndex","centerOffset","scrollDebounce","ScheduleCreatorsApi","scheduleCreatorsApi","isCalendar","courseContentTypeOptions","scheduleStatusFilteredOptions","totalEnrollmentCount","activeEnrollmentCount","loadScheduleData","scheduleResponse","enrollmentCounts","isShowingScheduleCadenceModal","showScheduleCadenceModal","hideScheduleCadenceModal","CourseSteps","courseStepsApi","isPastDate","lessonHeader","cohortResponse","lessonsResponse","DateTimeLuxon","enrollmentState","enrollmentResponse","selectedScheduleId","selectedCohortId","selectedDate","selectedEnrollmentId","isShowingScheduleDetails","showScheduleDetails","hideScheduleDetails","isShowingCohortScheduleDetails","showCohortScheduleDetails","hideCohortScheduleDetails","isShowingEnrollmentScheduleDetails","showEnrollmentScheduleDetails","hideEnrollmentScheduleDetails","querySchedules","loadSchedules","totalSchedules","hasLoadedSchedules","isLoadingMoreSchedules","handleRecordDateClick","handleSubRecordDateClick","goToAnalyzeSchedule","createdAt","disabledAt","concludedAt","launchDate","useScheduleRemoval","schedulesToRemove","numSchedulesToRemove","hasSchedulesToRemove","isRemovingSchedules","setSchedulesToRemove","clearSchedulesToRemove","removeSchedules","useScheduleDuplication","isDuplicatingSchedule","loadSchedulesForPage","reloadSchedules","cancelScheduleRemoval","confirmScheduleRemoval","duplicateSchedule","confirmScheduleDuplication","customScheduleToShow","goToCreateSchedule","isCalendarView","isSchedulesView","graphData","containerRef","setChartScroll","containerWidth","totalLabels","_createTextVNode","sanitizedHtml","ScheduleEnrollmentsApi","bulkAction","scheduleEnrollmentsApi","useBulkEnrollmentActions","bulkEnrollmentAction","bulkEnrollmentParams","isPerformingBulkEnrollmentAction","prepareBulkEnrollmentAction","cancelBulkEnrollmentAction","cardData","stepOptions","isSelectAll","sidebarOptions","tableBlock","states","canSelectItems","exportName","selectedEnrollments","toggleAllEnrollments","toggleEnrollment","numSelectedEnrollments","hasSelectedEnrollments","unselectAllEnrollments","hasSelectedAllEnrollments","performBulkEnrollmentAction","bulkActionParams","takeBulkAction","loadMetrics","loadSidebarOptions","takeIndividualAction","updatekey","handlePageChange","handleSelectAll","selectAll","handleToggleAllEnrollments","handlestates","unselectedState","handleDateRange","exportEnrollmentsCsv","loadBasicData","useTagValidation","existingTag","isCheckingTagExists","checkTagExists","checkTagExistsDebounced","useTagCreation","isCreatingTag","useTagEditing","isUpdatingTag","tagBeingEdited","setTagBeingEdited","clearTagBeingEdited","useTagRemoval","tagsToRemove","numTagsToRemove","hasTagsToRemove","isRemovingTags","setTagsToRemove","clearTagsToRemove","removeTags","totalTags","queryTags","loadTags","loadTagsForPage","reloadTags","isLoadingTags","selectedTags","toggleAllTags","toggleTag","numSelectedTags","hasSelectedTags","unselectAllTags","modelForCreation","updateModelForCreation","createTag","isShowingCreateModal","showCreateModal","hideCreateModal","confirmTagCreation","modelForEditing","updateModelForEditing","updateTag","confirmTagUpdate","confirmTagRemoval","ChannelsApi","channelsApi","useChannelValidation","existingChannel","isCheckingChannelExists","checkChannelExists","checkChannelExistsDebounced","channel","setUploadingState","useChannelCreation","isCreatingChannel","useChannelEditing","isUpdatingChannel","channelBeingEdited","setChannelBeingEdited","clearChannelBeingEdited","useChannelRemoval","channelsToRemove","numChannelsToRemove","hasChannelsToRemove","isRemovingChannels","setChannelsToRemove","clearChannelsToRemove","removeChannels","maxChannels","totalChannels","queryChannels","loadChannelsForPage","reloadChannels","isLoadingChannels","createChannel","confirmChannelCreation","confirmChannelUpdate","confirmChannelRemoval","organizationSystemMessageTypes","whatsappIncompatibleOrganizationSystemMessages","organizationSystemMessageOptions","filteredOrganizationSystemMessageOptions","organizationSystemMessages","OrganizationSystemMessage","OrganizationSystemMessagesApi","organizationSystemMessagesApi","useOrganizationSystemMessageValidation","existingSystemMessage","messageType","isCheckingSystemMessageExists","checkSystemMessageExists","checkSystemMessageExistsDebounced","organizationSystemMessage","showWhatsappWarning","translation","messagingKey","shoudSetTextToDefaultTranslation","updateLocale","setTextToDefaultTranslation","updateMessageType","filteredMessageTypeOptions","useOrganizationSystemMessageCreation","isCreatingOrganizationSystemMessage","useOrganizationSystemMessageEditing","isUpdatingOrganizationSystemMessage","organizationSystemMessageBeingEdited","setOrganizationSystemMessageBeingEdited","clearOrganizationSystemMessageBeingEdited","useOrganizationSystemMessageRemoval","organizationSystemMessagesToRemove","numOrganizationSystemMessagesToRemove","hasOrganizationSystemMessagesToRemove","isRemovingOrganizationSystemMessages","setOrganizationSystemMessagesToRemove","clearOrganizationSystemMessagesToRemove","removeOrganizationSystemMessages","totalOrganizationSystemMessages","queryOrganizationSystemMessages","loadOrganizationSystemMessages","loadOrganizationSystemMessagesForPage","reloadOrganizationSystemMessages","isLoadingOrganizationSystemMessages","selectedOrganizationSystemMessages","toggleAllOrganizationSystemMessages","toggleOrganizationSystemMessage","numSelectedOrganizationSystemMessages","hasSelectedOrganizationSystemMessages","unselectAllOrganizationSystemMessages","createOrganizationSystemMessage","isShowingCreatePanel","showCreatePanel","hideCreatePanel","confirmOrganizationSystemMessageCreation","updateOrganizationSystemMessage","confirmOrganizationSystemMessageUpdate","confirmOrganizationSystemMessageRemoval","getLanguageLabel","getOrganizationSystemMessageLabel","sm","componentRefs","TagsOverview","ChannelsOverview","OrganizationSystemMessagesOverview","SuperAdminApi","superAdminApi","situation","clearData","checkEnrollment","updateEnrollmentIdDebounced","renderBarChart","OrganizationsApi","organizationsApi","organizations","updateParams","useOrganizationValidation","existingOrganization","isCheckingOrganizationExists","checkOrganizationExists","checkOrganizationExistsDebounced","isCheckingorganizationExists","currentOrganization","useOrganizationEditing","isUpdatingOrganization","organizationBeingEdited","setOrganizationBeingEdited","clearOrganizationBeingEdited","totalOrganizations","loadOrganizations","loadOrganizationsForPage","isLoadingOrganizations","isGeneratingSignupCode","generateSignupCode","generateDemoData","updateOrganization","confirmOrganizationUpdate","isLoadingDeliveries","modelOptions","selectedModel","isShowingModal","showModal","hideModal","isLookingUp","performLookup","magicNumbers","generalUsage","featureAdoptionRate","downloadReport","KPIQueries","EnrollmentChecker","OrganizationsOverview","MessageDeliveries","ObjectLookup","AristReports","CapacityTracking","TemplateCourse","TemplateCoursesApi","templateCoursesApi","reloadCourses","lockCourse","unlockCourse","useTemplate","cloneTemplate","isLoadingCourse","isUsingTemplate","unloadCohorts","unloadCourses","setMediaKeys","clearFilter","isShowingFilters","iconSizes","iconWrapperSizes","icons","statusDotSizes","statusConstant","statusBadgeColors","flowStep","flowIsConfirming","confirmFlowStep","lastNames","csvImportErrors","csvImportErrorsSummary","aiTaskStatusesList","aiTaskStatusesArray","aiTaskStatusIndex","aiTaskStatus","aiTaskStatusProgress","resetAiTaskStatusProgress","aiTaskStatusIsRunning","aiTaskStatusInterval","stopAITaskStatusInterval","startAITaskStatusInterval","CohortsOverview","CohortView","CoursesOverview","CourseCreate","CourseView","CourseEdit","CourseAIBuildFlow","CourseAIModifyFlow","CourseAITranslateFlow","ContentLibraryOverview","ContentLibraryView","SchedulesOverview","ScheduleCreate","ScheduleEdit","EnrollmentOptions","SchedulesLaunchDashboard","MyEnrollmentsOverview","MyEnrollmentView","LearnersOverview","LearnerView","AnalyticsDashboard","SuperAdminIndex","SettingsIndex","CourseCatalogOverview","CourseCatalogView","AutomationsOverview","AutomationsNew","AutomationsEdit","UXComponentsReference","PageNotFound","savedPosition","initSentry","Sentry.setUser","Sentry.init","Sentry.browserTracingIntegration","App","VSelect","Icon","Debug"],"mappings":"yRAAA;AAAA;AAAA;AAAA;AAAA,GAKA,2BAEA,SAASA,GAAQC,EAAK,CACd,MAAAC,EAA6B,OAAA,OAAO,IAAI,EAC9C,UAAWC,KAAOF,EAAI,MAAM,GAAG,EAAGC,EAAIC,CAAG,EAAI,EACtC,OAACC,GAAQA,KAAOF,CACzB,CAEA,MAAMG,GAA4E,CAAA,EAC5EC,GAA4E,CAAA,EAC5EC,GAAO,IAAM,CACnB,EACMC,GAAK,IAAM,GACXC,GAAQN,GAAQA,EAAI,WAAW,CAAC,IAAM,KAAOA,EAAI,WAAW,CAAC,IAAM,MACxEA,EAAI,WAAW,CAAC,EAAI,KAAOA,EAAI,WAAW,CAAC,EAAI,IAC1CO,GAAmBP,GAAQ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,MACN,GAAG,CACJ,EACD,CACEP,EAAG,OAAQ,CACT,EAAG,8UACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,0IACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,6IACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,qIACX,CAAO,CACF,CACL,CACA,CACA84F,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASE,IAAK,CACZ,OAAO75F,EAAG,EAAEoB,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEP,EAAG,OAAQ,CACT,EAAG,+HACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,8HACX,CAAO,CACF,CACL,CACA,CACAg5F,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAO95F,EAAG,EAAEoB,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEP,EAAG,OAAQ,CACT,EAAG,qMACX,CAAO,CACF,CACL,CACA,CACAi5F,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAO/5F,EAAG,EAAEoB,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEP,EAAG,OAAQ,CACT,EAAG,oMACX,CAAO,CACF,CACL,CACA,CACAk5F,GAAG,aAAe,CAChB,KAAM,CACR,EACA,SAASC,IAAK,CACZ,OAAOh6F,EAAG,EAAEoB,EACV,MACA,CACE,MAAO,6BACP,QAAS,YACT,KAAM,eACN,cAAe,OACf,MAAO,WACP,KAAM,KACP,EACD,CACEP,EAAG,OAAQ,CACT,EAAG,8NACX,CAAO,EACDA,EAAG,OAAQ,CACT,EAAG,8MACX,CAAO,CACF,CACL,CACA,CACAm5F,GAAG,aAAe,CAChB,KAAM,CACR,EACA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,OAAG,GAC1B,iBAAMA,EAAA,OAAA,YANV,EAAA,SAQYC,EAAA,IAAA,wBARZ,grBCCM6nG,GAAmB,yEACnBC,GAAc,CAClB,OAAQ,gBACR,eAAgB,kBAChB,eAAgB,mBAChB,WAAY,eACZ,WAAY,aACZ,cAAe,gBACf,QAAS,UACT,QAAS,UACT,MAAO,OACT,EACMC,GAAoB,IACpBC,GAAiB,IACjBC,GAAuB,IACvBC,GAAmB,IACnBC,IAAgB,CACpB,CAACH,EAAc,EAAG,CAAC,gBAAiB,UAAU,EAC9C,CAACD,EAAiB,EAAG,QACrB,CAACG,EAAgB,EAAG,OACtB,EACME,GAAoB,UACpBC,IAAkB,QAClBC,IAAyB,QACzBC,IAAmB,QACnBC,IAAwB,QACxBC,IAAiB,QACjBC,IAAa,CACjBN,GACAC,IACAC,IACAC,IACAC,IACAC,GACF,EACME,IAAe,CACnB,YAAa,eACb,SAAU,WACZ,EACMC,IAAe,CAAC,QAAS,OAAQ,MAAM,EACvCC,IAAmB,CACvB,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kCACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,+BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gDACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8CACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uDACA,WACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sCACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,cACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,2BACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,uBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6CACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qDACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,4BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,iBACA,kCACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sCACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iDACA,YACA,gDACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2CACA,6BACA,0CACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,gBACA,+BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wCACA,gBACA,uCACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yDACA,4BACA,wDACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,SACA,OACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sCACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0CACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oCACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,mBACH,EAAG,CACD,yBACA,yBACA,yBACA,yBACA,wBACD,CACF,EACD,CACE,EAAG,CACD,iBACA,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,aACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,0BACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,4BACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,mBACA,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,mBACA,YACA,kBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,2BACA,0BACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,4BACA,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACA,UACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,0BACA,yBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gCACA,cACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACA,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,SACA,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,gCACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,2BACA,0BACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,yBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iCACD,EACD,EAAG,aACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,6BACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,aACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,YACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,2BACH,EAAG,CACD,4BACA,4BACA,4BACA,4BACA,2BACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,2BACH,EAAG,CACD,4BACA,4BACA,4BACA,4BACA,2BACD,CACF,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,aACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,4BACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,sBACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,wBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,0BACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,wBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,uBACH,EAAG,CACD,6BACA,6BACA,6BACA,6BACA,4BACD,CACF,EACD,CACE,EAAG,CACD,8BACA,SACA,6BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,4CACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,4CACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,4CACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,iCACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,iCACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,iCACJ,EACD,CACE,EAAG,CACD,SACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,QACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,wCACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,kBACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,kBACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,kBACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,kBACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,6BACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,gBACA,QACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qCACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,sCACA,aACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,0BACA,UACD,EACD,EAAG,YACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,mCACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,4CACA,gBACA,2CACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,qCACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,eACA,GACD,EACD,EAAG,YACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,6CACA,kBACA,4CACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,wDACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,oBACA,YACA,mBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kCACD,EACD,EAAG,aACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACA,OACA,aACD,EACD,EAAG,OACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,iBACA,KACA,UACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,mBACA,KACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,mBACA,YACA,OACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,mBACA,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,YACH,EAAG,CACD,aACA,aACA,aACA,aACA,YACD,CACF,EACD,CACE,EAAG,CACD,sBACA,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,kBACA,YACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,2CACA,cACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,2BACA,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,WACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,QACH,EAAG,CACD,cACA,cACA,cACA,cACA,aACD,CACF,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,4BACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uCACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,OACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,QACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,KACD,EACD,EAAG,OACJ,CACH,EACMC,IAAmB,CACvB,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,QACD,EACD,EAAG,OACJ,CACH,EACMC,IAAe,CACnB,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,wBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,CACH,EACMC,IAAe,CACnB,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,sBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,6BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,4BACA,2BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oCACA,mCACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,WACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,qBACA,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,kBACA,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,2BACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,CACH,EACMC,IAAkB,CACtB,CACE,EAAG,CACD,4BACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,sBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,yBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,YACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oCACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,MACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACA,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,8BACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,8BACA,wBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,4BACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,OACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,8BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,6BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,sBACA,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,MACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,eACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,cACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,wBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,eACA,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACA,kBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,oBACA,uBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACA,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACA,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,2BACA,0BACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,oBACA,KACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,OACD,EACD,EAAG,OACJ,CACH,EACMC,IAAY,CAChB,CACE,EAAG,CACD,mCACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6CACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,QACA,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,oBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kCACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,sBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACA,kBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,gCACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,OACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,YACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,4BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sCACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kCACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACA,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,yBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,0BACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,OACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,0BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,4BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,YACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,SACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,CACH,EACMC,IAAY,CAChB,CACE,EAAG,CACD,2BACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,YACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,cACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,WACA,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,cACA,aACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,sBACA,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,mBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,yBACA,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,mBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wBACA,YACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wBACA,YACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,4BACA,2BACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,6BACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iDACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mDACA,oBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,qDACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yDACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kCACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uDACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,eACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,gBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,6BACA,4BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,KACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,4BACA,2BACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wDACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iFACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gCACA,eACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,uCACA,cACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,wDACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wDACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,+BACA,gBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,sCACA,QACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,uDACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iCACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oCACA,iBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,mCACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sCACA,mBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,qBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,uBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,yBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,OACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,iBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iBACA,sBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mCACA,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,+BACA,UACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,GACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,yBACA,kBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,yBACA,wBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACA,GACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,8BACA,6BACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,kBACA,iBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,mBACA,kBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,oBACA,MACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,wBACA,uBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,2BACA,0BACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,SACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,0BACA,UACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,4BACA,aACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,+BACA,UACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,+BACA,eACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,kCACA,kBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,gCACA,cACA,wBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,YACA,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,iBACA,WACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,kBACA,YACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,kBACA,IACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,aACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,OACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,KACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,OACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,OACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,WACA,MACD,EACD,EAAG,gBACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,yCACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uCACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0CACA,GACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,sBACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0CACA,GACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,iCACA,GACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,cACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0CACA,IACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0CACA,SACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,cACA,KACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,aACA,IACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,wBACA,MACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,IACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,8BACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,QACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mCACA,iBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,2BACA,QACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qCACA,OACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,WACJ,EACD,CACE,EAAG,CACD,4BACA,2BACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,4BACA,2BACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,uBACA,sBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,qBACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,2BACA,oBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,6BACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,kCACA,iCACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,qBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,sBACA,cACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,sBACA,cACD,EACD,EAAG,MACJ,EACD,CACE,EAAG,CACD,mBACA,YACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,CACH,EACMC,IAAU,CACd,CACE,EAAG,CACD,iBACA,gBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,0BACA,yBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,oBACA,mBACD,EACD,EAAG,OACJ,EACD,CACE,EAAG,CACD,mBACD,EACD,EAAG,YACJ,EACD,CACE,EAAG,CACD,cACD,EACD,EAAG,uBACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,4BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,yBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,4BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,6BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,+BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,yBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,0BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,uBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,KACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,yBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,8CACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,yBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,uBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,uBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,6BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,+BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,uBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,4BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,wBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,8BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,YACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,mBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,yBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,6BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,sBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,qBACA,KACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,kBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gCACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,iBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,8BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,2BACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,uBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,aACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,oBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,cACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,gBACA,SACD,EACD,EAAG,aACJ,EACD,CACE,EAAG,CACD,eACA,cACD,EACD,EAAG,2CACJ,EACD,CACE,EAAG,CACD,gBACA,eACD,EACD,EAAG,2CACJ,EACD,CACE,EAAG,CACD,aACA,YACD,EACD,EAAG,2CACJ,CACH,EACA,IAAIC,IAAS,CACX,eAAgBR,IAChB,eAAgBC,IAChB,WAAYC,IACZ,WAAYC,IACZ,cAAeC,IACf,QAASC,IACT,QAASC,IACT,MAAOC,GACT,EACIE,GAAU,CACZ,CACE,IAAK,SACL,MAAO,gBACP,EAAG,OACJ,EACD,CACE,IAAK,iBACL,MAAO,kBACP,EAAG,OACJ,EACD,CACE,IAAK,iBACL,MAAO,mBACP,EAAG,OACJ,EACD,CACE,IAAK,aACL,MAAO,eACP,EAAG,MACJ,EACD,CACE,IAAK,aACL,MAAO,aACP,EAAG,MACJ,EACD,CACE,IAAK,gBACL,MAAO,kBACP,EAAG,OACJ,EACD,CACE,IAAK,UACL,MAAO,UACP,EAAG,OACJ,EACD,CACE,IAAK,UACL,MAAO,UACP,EAAG,OACJ,EACD,CACE,IAAK,QACL,MAAO,QACP,EAAG,YACJ,CACH,EACA,MAAMC,IAAgB,CAAC7yI,EAAQ8yI,IAAiBA,EAAa,KAAMl7I,GAAMoI,aAAkB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,OACjB,MAAO,kBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,uBACR,EACD,CACE,MAAOA,GAAU,mBACjB,MAAO,2BACR,EACD,CACE,MAAOA,GAAU,MACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,MACjB,MAAO,oBACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,mBACR,EACD,CACE,MAAOA,GAAU,gBACjB,MAAO,mBACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,kBACR,EACD,CACE,MAAOA,GAAU,SACjB,MAAO,oBACR,EACD,CACE,MAAOA,GAAU,MACjB,MAAO,eACR,EACD,CACE,MAAOA,GAAU,UACjB,MAAO,oBACR,EACD,CACE,MAAOA,GAAU,WACjB,MAAO,+BACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,oBACR,EACD,CACE,MAAOA,GAAU,SACjB,MAAO,gBACR,EACD,CACE,MAAOA,GAAU,SACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,cACR,EACD,CACE,MAAOA,GAAU,MACjB,MAAO,uBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,WACjB,MAAO,wBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,kBACR,EACD,CACE,MAAOA,GAAU,SACjB,MAAO,mBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,mBACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,qBACR,EACD,CACE,MAAOA,GAAU,QACjB,MAAO,mBACR,EACD,CACE,MAAOA,GAAU,MACjB,MAAO,eACR,EACD,CACE,MAAOA,GAAU,OACjB,MAAO,iBACR,EACD,CACE,MAAOA,GAAU,KACjB,MAAO,YACR,EACD,CACE,MAAOA,GAAU,QACjB,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,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,IAAe,KACf,MAAe,IACvB,EAGIC,IAAiB,CACpB,KACA,QACA,aACA,WACA,YACA,iBACA,eACA,WACA,SACA,WACA,cACA,kBACA,gBACA,YACA,UACA,YACA,eACA,UACA,UACD,EAEA,SAASC,IAAOr4P,EAA2D,CAAE,OAAOA,EAAI,IAAI,SAAS2K,EAAG,CAAE,MAAO,CAAEA,GAAG,GAAI,IAAKA,GAAG,EAAG,IAAIA,EAAE,GAAG,CAAI,CAAA,CAAI,CAItJ,IAAI2tP,IAAwBD,IAAO,CAElC,EACA,SACA,SACA,MACA,IACA,SACA,SACA,MAGA,EACA,SACA,SACA,MACA,IACA,SACA,SACA,MAEA,QACA,MACA,IACA,QACA,QACA,MACA,SACA,QACA,SACA,SACA,SACA,SACA,QACA,SACA,MACA,SAEA,IACA,SACA,SACA,MACA,QACA,QACA,MACA,IACA,MACA,SACA,SACA,SACA,SACA,SACA,SACA,SAEA,QACA,QACA,SACA,SACA,SACA,SACA,QACA,QACA,MACA,QACA,MACA,QACA,SACA,SACA,QACA,QAGA,SACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACD,CAAC,EACGxB,GAAsBvL,GAAIgN,GAAO,EAGjCtE,GAAO,CACH,EAAa,SACb,EAAa,UACb,GAAa,UACb,GAAa,QACb,GAAa,SACb,GAAa,QACb,GAAa,OACb,GAAa,gBACb,IAAa,OACrB,EAEIuE,GAAQ,CACX,SAAiB,EACjB,UAAiB,EACjB,UAAiB,GACjB,QAAiB,GACjB,SAAiB,GACjB,QAAiB,GACjB,OAAiB,GACjB,gBAAiB,GACjB,QAAiB,GAClB,EAMIC,GAAgC,CAEnC,6EAA8E,YAC9E,uDAAw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UACL,IAAK,aACL,IAAK,eACL,IAAK,eACL,IAAK,aACL,IAAK,cACL,IAAK,cACL,IAAK,kBACL,IAAK,YACL,IAAK,iBACL,IAAK,cACL,IAAK,eACL,IAAK,eACL,IAAK,YACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,gBACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,gBACL,IAAK,YACL,IAAK,aACL,IAAK,UACL,IAAK,OACL,IAAK,cACL,IAAK,UACL,IAAK,YACL,IAAK,iBACL,IAAK,cACL,IAAK,oBACL,IAAK,gBACL,IAAK,eACL,IAAK,iBACL,IAAK,kBACL,IAAK,cACL,IAAK,qBACL,IAAK,SACL,IAAK,cACL,IAAK,WACL,IAAK,WACL,IAAK,eACL,IAAK,eACL,IAAK,iBACL,IAAK,eACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,YACL,IAAK,YACL,IAAK,gBACL,IAAK,cACL,IAAK,eACL,IAAK,kBACL,IAAK,oBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,YACL,IAAK,YACL,IAAK,aACL,IAAK,cACL,IAAK,UACL,IAAK,SACL,IAAK,cACL,IAAK,UACL,IAAK,oBACL,IAAK,kBACL,IAAK,QACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,oBACL,IAAK,cACL,IAAK,cACL,IAAK,mBACL,IAAK,eACL,IAAK,aACL,IAAK,eACL,IAAK,gBACL,IAAK,aACL,IAAK,cACL,IAAK,cACL,IAAK,iBACL,IAAK,YACL,IAAK,cACL,IAAK,eACL,IAAK,aACL,IAAK,aACL,IAAK,gBACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,qBACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,kBACL,IAAK,aACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,cACL,IAAK,iBACL,IAAK,qBACL,IAAK,YACL,IAAK,oBACL,IAAK,WACL,IAAK,cACL,IAAK,iBACL,IAAK,WACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,mBACL,IAAK,iBACL,IAAK,eACL,IAAK,cACL,IAAK,YACL,IAAK,kBACL,IAAK,oBACL,IAAK,iBACL,IAAK,YACL,IAAK,aACL,IAAK,oBACL,IAAK,aACL,IAAK,eACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,mBACL,IAAK,qBACL,IAAK,yBACL,IAAK,cACL,IAAK,aACL,IAAK,mBACL,IAAK,sBACL,IAAK,eACL,IAAK,eACL,IAAK,gBACL,IAAK,cACL,IAAK,kBACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,2BACL,IAAK,eACL,IAAK,iBACL,IAAK,aACL,IAAK,iBACL,IAAK,YACL,IAAK,mBACL,IAAK,cACL,IAAK,wBACL,IAAK,kBACL,IAAK,qBACL,IAAK,kBACL,IAAK,kBACL,IAAK,kBACL,IAAK,qBACL,IAAK,aACL,IAAK,iBACL,IAAK,eACL,IAAK,mBACL,IAAK,aACL,IAAK,eACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,iBACL,IAAK,uBACL,IAAK,0BACL,IAAK,iBACL,IAAK,eACL,IAAK,YACL,IAAK,cACL,IAAK,aACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,gBACL,IAAK,qBACL,IAAK,cACL,IAAK,mBACL,IAAK,uBACL,IAAK,mBACL,IAAK,kBACL,IAAK,mBACL,IAAK,cACL,IAAK,iBACL,IAAK,kBACL,IAAK,eACL,IAAK,eACL,IAAK,oBACL,IAAK,sBACL,IAAK,sBACL,IAAK,mBACL,IAAK,qBACL,IAAK,qBACL,IAAK,gBACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,mBACL,IAAK,gBACL,IAAK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IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,WACL,IAAK,OACL,IAAK,UACL,IAAK,WACL,IAAK,cACL,IAAK,iBACL,IAAK,gBACL,IAAK,iBACL,IAAK,WACL,IAAK,cACL,IAAK,iBACL,IAAK,iBACL,IAAK,aACL,IAAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,SACL,IAAK,aACL,IAAK,MACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,WACL,IAAK,UACL,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,UACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,aACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,OACL,IAAK,SACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,MACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,SACL,IAAK,WACL,IAAK,SACL,IAAK,aACL,IAAK,OACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,gBACL,IAAK,kBACL,IAAK,gBACL,IAAK,WACL,IAAK,OACL,IAAK,QACL,IAAK,aACL,IAAK,KACL,IAAK,QACL,IAAK,SACL,IAAK,YACL,IAAK,cACL,IAAK,iBACL,IAAK,OACL,IAAK,gBACL,IAAK,WACL,IAAK,cACL,IAAK,WACL,IAAK,iBACL,IAAK,aACL,IAAK,YACL,IAAK,eACL,IAAK,eACL,IAAK,cACL,IAAK,aACL,IAAK,cACL,IAAK,eACL,IAAK,SACL,IAAK,WACL,IAAK,UACL,IAAK,UACL,IAAK,YACL,IAAK,UACL,IAAK,SACL,IAAK,SACL,IAAK,aACL,IAAK,YACL,IAAK,OACL,IAAK,YACL,IAAK,QACL,IAAK,OACL,IAAK,SACL,IAAK,YACL,IAAK,QACL,IAAK,YACL,IAAK,WACL,IAAK,UACL,IAAK,cACL,IAAK,cACL,IAAK,SACL,IAAK,eACL,IAAK,WACL,IAAK,YACL,IAAK,UACL,IAAK,WACL,IAAK,cACL,IAAK,MACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,SACL,IAAK,QACL,IAAK,WACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,MACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,OACL,IAAK,OACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,WACL,IAAK,aACL,IAAK,cACL,IAAK,OACL,IAAK,WACL,IAAK,OACL,IAAK,gBACL,IAAK,YACL,IAAK,cACL,IAAK,QACL,IAAK,iBACL,IAAK,kBACL,IAAK,kBACL,IAAK,iBACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,oBACL,IAAK,QACL,IAAK,UACL,IAAK,aACL,IAAK,eACL,IAAK,QACL,IAAK,cACL,IAAK,cACL,IAAK,WACL,IAAK,eACL,IAAK,YACL,IAAK,WACL,IAAK,WACL,IAAK,OACL,IAAK,OACL,IAAK,UACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,WACL,IAAK,gBACL,IAAK,YACL,IAAK,kBACL,IAAK,eACL,IAAK,gBACL,IAAK,mBACL,IAAK,cACL,IAAK,gBACL,IAAK,cACL,IAAK,WACL,IAAK,MACL,IAAK,YACL,IAAK,aACL,IAAK,qBACL,IAAK,mBACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,UACL,IAAK,QACL,IAAK,SACL,IAAK,OACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,aACL,IAAK,cACL,IAAK,YACL,IAAK,SACL,IAAK,UACL,IAAK,QACL,IAAK,YACL,IAAK,YACL,IAAK,aACL,IAAK,SACL,IAAK,WACL,IAAK,QACL,IAAK,SACL,IAAK,SACL,IAAK,QACL,IAAK,SACL,IAAK,MACL,IAAK,OACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,OACL,IAAK,OACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,WACL,IAAK,OACL,IAAK,YACL,IAAK,YACL,IAAK,UACL,IAAK,aACL,IAAK,aACL,IAAK,QACL,IAAK,QACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,SACL,IAAK,WACL,IAAK,UACL,IAAK,QACL,IAAK,UACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,aACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,YACL,IAAK,YACL,IAAK,YACL,IAAK,YACL,IAAK,YACL,IAAK,cACL,IAAK,UACL,IAAK,YACL,IAAK,WACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,UACL,IAAK,cACL,IAAK,MACL,IAAK,cACL,IAAK,MACL,IAAK,aACL,IAAK,gBACL,IAAK,UACL,IAAK,eACL,IAAK,UACL,IAAK,WACL,IAAK,SACL,IAAK,YACL,IAAK,YACP,EACID,IAAW,CACb,EAAG,EACH,EAAG,EACH,GAAI,EACJ,GAAI,EAC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AK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACL,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oBACN,KAAM,CACJ,gBAAiB,EAClB,EACD,SAAU,CACR,CACE,KAAM,2BACN,KAAM,WACN,UAAWC,EACZ,EACD,CACE,KAAM,yBACN,KAAM,SACN,UAAWA,EACZ,EACD,CACE,KAAM,0BACN,KAAM,UACN,UAAWA,EACZ,EACD,CACE,KAAM,2BACN,KAAM,WACN,UAAWA,EACZ,CACF,CACF,EACD,CACE,KAAM,qBACN,KAAM,CACJ,gBAAiB,EAClB,EACD,SAAU,CACR,CACE,KAAM,4BACN,KAAM,WACN,UAAWC,EACZ,EACD,CACE,KAAM,4BACN,KAAM,WACN,UAAWA,EACZ,CACF,CACF,EACD,CACE,KAAM,wBACN,KAAM,CACJ,gBAAiB,EAClB,EACD,SAAU,CACR,CACE,KAAM,sCACN,KAAM,kBACN,UAAWC,EACZ,EACD,CACE,KAAM,+BACN,KAAM,WACN,UAAWA,EACZ,CACF,CACF,EAGD,CACE,KAAM,2BACN,KAAM,mBACN,MAAO,oBACP,UAAWC,GACZ,EACD,CACE,KAAM,uBACN,KAAM,4BACN,MAAO,6BACP,UAAWC,GACZ,EAGD,CACE,KAAM,aACN,SAAU,CACR,CACE,KAAM,qBACN,KAAM,GACN,UAAWC,GACZ,EACD,CACE,KAAM,kBACN,KAAM,MACN,UAAWC,GACZ,EACD,CACE,KAAM,gBACN,KAAM,WACN,UAAWC,GACZ,CACF,CACF,EACD,CACE,KAAM,sBACN,KAAM,oCACN,UAAWC,GACZ,EACD,CACE,KAAM,oBACN,KAAM,0BACN,UAAWC,GACZ,EAGD,CACE,KAAM,0BACN,KAAM,kBACN,UAAWC,IACX,KAAM,CACJ,aAAc,CAAC,IAAK,GAAG,CACxB,CACF,EACD,CACE,KAAM,qBACN,KAAM,2BACN,UAAWC,IACX,KAAM,CACJ,aAAc,CAAC,IAAK,GAAG,CACxB,CACF,EAGD,CACE,KAAM,oBACN,KAAM,YACN,UAAWC,GACZ,EACD,CACE,KAAM,eACN,KAAM,gBACN,UAAWC,GACZ,EAGD,CAC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D,CACL,CAAG,CACH,CCnGA,MAAMhmB,GAAMsd,GAAUq4T,EAAG,EACnB93T,IAAQI,GAAa,EAG3Bje,GACG,IAAI6d,GAAK,EACT,IAAI4Z,EAAM,EAGbz3B,GACG,UAAU,UAAW41U,EAAO,EAC5B,UAAU,OAAQC,EAAI,EACtB,UAAU,QAASC,EAAK,EAG3BP,IAAWv1U,GAAKy3B,EAAa,EAG7B,KAAM,CAAC,aAAAklD,GAAY,EAAID,GAAkB,EACzC18E,GAAI,OAAO,aAAe28E,IAG1B38E,GACG,MAAM,SAAS","x_google_ignoreList":[0,1,2,3,4,5,6,19,24,25,26,27,28,29,30,31,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,205,206,224,225,226,227,228,229,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,352,407,408,409,410,419,421,456,457,458,459,516,522,545,546,614]}